From 64d11cc9df6d786775bdd9677274ccbddf5ee9f8 Mon Sep 17 00:00:00 2001 From: Jing Jin <8752427+jinjingforever@users.noreply.github.com> Date: Mon, 28 Oct 2024 09:55:41 -0700 Subject: [PATCH] Update package --- src/server/package/pyproject.toml | 2 +- .../src/model_explorer/web_app/index.html | 6 +- .../model_explorer/web_app/main-HQELKSO7.js | 4358 ---------------- .../model_explorer/web_app/main-MXYLYF2Q.js | 4377 +++++++++++++++++ .../web_app/polyfills-FFHMD2TL.js | 2 + .../web_app/polyfills-SCHOHYNV.js | 2 - .../web_app/styles-A5CA6XFW.css | 1 + .../web_app/styles-GNTXUQ3P.css | 1 - .../model_explorer/web_app/worker-JQ3C3QUW.js | 3 - .../model_explorer/web_app/worker-KVPVY7KV.js | 3 + 10 files changed, 4387 insertions(+), 4368 deletions(-) delete mode 100644 src/server/package/src/model_explorer/web_app/main-HQELKSO7.js create mode 100644 src/server/package/src/model_explorer/web_app/main-MXYLYF2Q.js create mode 100644 src/server/package/src/model_explorer/web_app/polyfills-FFHMD2TL.js delete mode 100644 src/server/package/src/model_explorer/web_app/polyfills-SCHOHYNV.js create mode 100644 src/server/package/src/model_explorer/web_app/styles-A5CA6XFW.css delete mode 100644 src/server/package/src/model_explorer/web_app/styles-GNTXUQ3P.css delete mode 100644 src/server/package/src/model_explorer/web_app/worker-JQ3C3QUW.js create mode 100644 src/server/package/src/model_explorer/web_app/worker-KVPVY7KV.js diff --git a/src/server/package/pyproject.toml b/src/server/package/pyproject.toml index dbcf449b..171473f1 100644 --- a/src/server/package/pyproject.toml +++ b/src/server/package/pyproject.toml @@ -1,6 +1,6 @@ [project] name = "ai-edge-model-explorer" -version = "0.1.13" +version = "0.1.14" authors = [ { name="Google LLC", email="opensource@google.com" }, ] diff --git a/src/server/package/src/model_explorer/web_app/index.html b/src/server/package/src/model_explorer/web_app/index.html index db9fca93..720ba72e 100644 --- a/src/server/package/src/model_explorer/web_app/index.html +++ b/src/server/package/src/model_explorer/web_app/index.html @@ -27,9 +27,9 @@ - - + + - + diff --git a/src/server/package/src/model_explorer/web_app/main-HQELKSO7.js b/src/server/package/src/model_explorer/web_app/main-HQELKSO7.js deleted file mode 100644 index 99be4b3b..00000000 --- a/src/server/package/src/model_explorer/web_app/main-HQELKSO7.js +++ /dev/null @@ -1,4358 +0,0 @@ -var CR=Object.defineProperty,J5=Object.defineProperties;var e8=Object.getOwnPropertyDescriptors;var dv=Object.getOwnPropertySymbols;var SR=Object.prototype.hasOwnProperty,MR=Object.prototype.propertyIsEnumerable;var wR=(i,e,t)=>e in i?CR(i,e,{enumerable:!0,configurable:!0,writable:!0,value:t}):i[e]=t,Z=(i,e)=>{for(var t in e||={})SR.call(e,t)&&wR(i,t,e[t]);if(dv)for(var t of dv(e))MR.call(e,t)&&wR(i,t,e[t]);return i},yt=(i,e)=>J5(i,e8(e));var dS=(i,e)=>{var t={};for(var n in i)SR.call(i,n)&&e.indexOf(n)<0&&(t[n]=i[n]);if(i!=null&&dv)for(var n of dv(i))e.indexOf(n)<0&&MR.call(i,n)&&(t[n]=i[n]);return t};var t8=(i,e)=>{for(var t in e)CR(i,t,{get:e[t],enumerable:!0})};var It=(i,e,t)=>new Promise((n,r)=>{var o=c=>{try{a(t.next(c))}catch(l){r(l)}},s=c=>{try{a(t.throw(c))}catch(l){r(l)}},a=c=>c.done?n(c.value):Promise.resolve(c.value).then(o,s);a((t=t.apply(i,e)).next())});function ER(i,e){return Object.is(i,e)}var ki=null,wf=!1,uv=1,Do=Symbol("SIGNAL");function ln(i){let e=ki;return ki=i,e}function IR(){return ki}function n8(){return wf}var Tu={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function fS(i){if(wf)throw new Error("");if(ki===null)return;ki.consumerOnSignalRead(i);let e=ki.nextProducerIndex++;if(_v(ki),ei.nextProducerIndex;)i.producerNode.pop(),i.producerLastReadVersion.pop(),i.producerIndexOfThis.pop()}}function fv(i){_v(i);for(let e=0;e0}function _v(i){i.producerNode??=[],i.producerIndexOfThis??=[],i.producerLastReadVersion??=[]}function AR(i){i.liveConsumerNode??=[],i.liveConsumerIndexOfThis??=[]}function NR(i){return i.producerNode!==void 0}function mS(i){let e=Object.create(r8);e.computation=i;let t=()=>{if(TR(e),fS(e),e.value===hv)throw e.error;return e.value};return t[Do]=e,t}var uS=Symbol("UNSET"),hS=Symbol("COMPUTING"),hv=Symbol("ERRORED"),r8=yt(Z({},Tu),{value:uS,dirty:!0,error:null,equal:ER,producerMustRecompute(i){return i.value===uS||i.value===hS},producerRecomputeValue(i){if(i.value===hS)throw new Error("Detected cycle in computations.");let e=i.value;i.value=hS;let t=Sf(i),n;try{n=i.computation()}catch(r){n=hv,i.error=r}finally{pv(i,t)}if(e!==uS&&e!==hv&&n!==hv&&i.equal(e,n)){i.value=e;return}i.value=n,i.version++}});function o8(){throw new Error}var kR=o8;function LR(){kR()}function FR(i){kR=i}var s8=null;function BR(i){let e=Object.create(zR);e.value=i;let t=()=>(fS(e),e.value);return t[Do]=e,t}function gS(i,e){PR()||LR(),i.equal(i.value,e)||(i.value=e,a8(i))}function VR(i,e){PR()||LR(),gS(i,e(i.value))}var zR=yt(Z({},Tu),{equal:ER,value:void 0});function a8(i){i.version++,i8(),DR(i),s8?.()}function UR(i,e,t){let n=Object.create(c8);t&&(n.consumerAllowSignalWrites=!0),n.fn=i,n.schedule=e;let r=c=>{n.cleanupFn=c};function o(c){return c.fn===null&&c.schedule===null}function s(c){o(c)||(mv(c),c.cleanupFn(),c.fn=null,c.schedule=null,c.cleanupFn=pS)}let a=()=>{if(n.fn===null)return;if(n8())throw new Error("Schedulers cannot synchronously execute watches while scheduling.");if(n.dirty=!1,n.hasRun&&!fv(n))return;n.hasRun=!0;let c=Sf(n);try{n.cleanupFn(),n.cleanupFn=pS,n.fn(r)}finally{pv(n,c)}};return n.ref={notify:()=>OR(n),run:a,cleanup:()=>n.cleanupFn(),destroy:()=>s(n),[Do]:n},n.ref}var pS=()=>{},c8=yt(Z({},Tu),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!1,consumerMarkedDirty:i=>{i.schedule!==null&&i.schedule(i.ref)},hasRun:!1,cleanupFn:pS});function Mt(i){return typeof i=="function"}function Du(i){let t=i(n=>{Error.call(n),n.stack=new Error().stack});return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}var vv=Du(i=>function(t){i(this),this.message=t?`${t.length} errors occurred during unsubscription: -${t.map((n,r)=>`${r+1}) ${n.toString()}`).join(` - `)}`:"",this.name="UnsubscriptionError",this.errors=t});function Rl(i,e){if(i){let t=i.indexOf(e);0<=t&&i.splice(t,1)}}var Ct=class i{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:n}=this;if(Mt(n))try{n()}catch(o){e=o instanceof vv?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{HR(o)}catch(s){e=e??[],s instanceof vv?e=[...e,...s.errors]:e.push(s)}}if(e)throw new vv(e)}}add(e){var t;if(e&&e!==this)if(this.closed)HR(e);else{if(e instanceof i){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)&&Rl(t,e)}remove(e){let{_finalizers:t}=this;t&&Rl(t,e),e instanceof i&&e._removeParent(this)}};Ct.EMPTY=(()=>{let i=new Ct;return i.closed=!0,i})();var _S=Ct.EMPTY;function bv(i){return i instanceof Ct||i&&"closed"in i&&Mt(i.remove)&&Mt(i.add)&&Mt(i.unsubscribe)}function HR(i){Mt(i)?i():i.unsubscribe()}var as={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Pu={setTimeout(i,e,...t){let{delegate:n}=Pu;return n?.setTimeout?n.setTimeout(i,e,...t):setTimeout(i,e,...t)},clearTimeout(i){let{delegate:e}=Pu;return(e?.clearTimeout||clearTimeout)(i)},delegate:void 0};function yv(i){Pu.setTimeout(()=>{let{onUnhandledError:e}=as;if(e)e(i);else throw i})}function Al(){}var GR=vS("C",void 0,void 0);function jR(i){return vS("E",void 0,i)}function WR(i){return vS("N",i,void 0)}function vS(i,e,t){return{kind:i,value:e,error:t}}var Nl=null;function Ou(i){if(as.useDeprecatedSynchronousErrorHandling){let e=!Nl;if(e&&(Nl={errorThrown:!1,error:null}),i(),e){let{errorThrown:t,error:n}=Nl;if(Nl=null,t)throw n}}else i()}function $R(i){as.useDeprecatedSynchronousErrorHandling&&Nl&&(Nl.errorThrown=!0,Nl.error=i)}var kl=class extends Ct{constructor(e){super(),this.isStopped=!1,e?(this.destination=e,bv(e)&&e.add(this)):this.destination=u8}static create(e,t,n){return new ba(e,t,n)}next(e){this.isStopped?yS(WR(e),this):this._next(e)}error(e){this.isStopped?yS(jR(e),this):(this.isStopped=!0,this._error(e))}complete(){this.isStopped?yS(GR,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()}}},l8=Function.prototype.bind;function bS(i,e){return l8.call(i,e)}var xS=class{constructor(e){this.partialObserver=e}next(e){let{partialObserver:t}=this;if(t.next)try{t.next(e)}catch(n){xv(n)}}error(e){let{partialObserver:t}=this;if(t.error)try{t.error(e)}catch(n){xv(n)}else xv(e)}complete(){let{partialObserver:e}=this;if(e.complete)try{e.complete()}catch(t){xv(t)}}},ba=class extends kl{constructor(e,t,n){super();let r;if(Mt(e)||!e)r={next:e??void 0,error:t??void 0,complete:n??void 0};else{let o;this&&as.useDeprecatedNextContext?(o=Object.create(e),o.unsubscribe=()=>this.unsubscribe(),r={next:e.next&&bS(e.next,o),error:e.error&&bS(e.error,o),complete:e.complete&&bS(e.complete,o)}):r=e}this.destination=new xS(r)}};function xv(i){as.useDeprecatedSynchronousErrorHandling?$R(i):yv(i)}function d8(i){throw i}function yS(i,e){let{onStoppedNotification:t}=as;t&&Pu.setTimeout(()=>t(i,e))}var u8={closed:!0,next:Al,error:d8,complete:Al};var Ru=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Tr(i){return i}function wS(...i){return CS(i)}function CS(i){return i.length===0?Tr:i.length===1?i[0]:function(t){return i.reduce((n,r)=>r(n),t)}}var Et=(()=>{class i{constructor(t){t&&(this._subscribe=t)}lift(t){let n=new i;return n.source=this,n.operator=t,n}subscribe(t,n,r){let o=p8(t)?t:new ba(t,n,r);return Ou(()=>{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(n){t.error(n)}}forEach(t,n){return n=qR(n),new n((r,o)=>{let s=new ba({next:a=>{try{t(a)}catch(c){o(c),s.unsubscribe()}},error:o,complete:r});this.subscribe(s)})}_subscribe(t){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(t)}[Ru](){return this}pipe(...t){return CS(t)(this)}toPromise(t){return t=qR(t),new t((n,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>n(o))})}}return i.create=e=>new i(e),i})();function qR(i){var e;return(e=i??as.Promise)!==null&&e!==void 0?e:Promise}function h8(i){return i&&Mt(i.next)&&Mt(i.error)&&Mt(i.complete)}function p8(i){return i&&i instanceof kl||h8(i)&&bv(i)}function SS(i){return Mt(i?.lift)}function Lt(i){return e=>{if(SS(e))return e.lift(function(t){try{return i(t,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function kt(i,e,t,n,r){return new MS(i,e,t,n,r)}var MS=class extends kl{constructor(e,t,n,r,o,s){super(e),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=t?function(a){try{t(a)}catch(c){e.error(c)}}:super._next,this._error=r?function(a){try{r(a)}catch(c){e.error(c)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}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))}}};function Au(){return Lt((i,e)=>{let t=null;i._refCount++;let n=kt(e,void 0,void 0,void 0,()=>{if(!i||i._refCount<=0||0<--i._refCount){t=null;return}let r=i._connection,o=t;t=null,r&&(!o||r===o)&&r.unsubscribe(),e.unsubscribe()});i.subscribe(n),n.closed||(t=i.connect())})}var mc=class extends Et{constructor(e,t){super(),this.source=e,this.subjectFactory=t,this._subject=null,this._refCount=0,this._connection=null,SS(e)&&(this.lift=e.lift)}_subscribe(e){return this.getSubject().subscribe(e)}getSubject(){let e=this._subject;return(!e||e.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:e}=this;this._subject=this._connection=null,e?.unsubscribe()}connect(){let e=this._connection;if(!e){e=this._connection=new Ct;let t=this.getSubject();e.add(this.source.subscribe(kt(t,void 0,()=>{this._teardown(),t.complete()},n=>{this._teardown(),t.error(n)},()=>this._teardown()))),e.closed&&(this._connection=null,e=Ct.EMPTY)}return e}refCount(){return Au()(this)}};var Nu={schedule(i){let e=requestAnimationFrame,t=cancelAnimationFrame,{delegate:n}=Nu;n&&(e=n.requestAnimationFrame,t=n.cancelAnimationFrame);let r=e(o=>{t=void 0,i(o)});return new Ct(()=>t?.(r))},requestAnimationFrame(...i){let{delegate:e}=Nu;return(e?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){let{delegate:e}=Nu;return(e?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0};var YR=Du(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var pe=(()=>{class i extends Et{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(t){let n=new wv(this,this);return n.operator=t,n}_throwIfClosed(){if(this.closed)throw new YR}next(t){Ou(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(t)}})}error(t){Ou(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=t;let{observers:n}=this;for(;n.length;)n.shift().error(t)}})}complete(){Ou(()=>{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:n,isStopped:r,observers:o}=this;return n||r?_S:(this.currentObservers=null,o.push(t),new Ct(()=>{this.currentObservers=null,Rl(o,t)}))}_checkFinalizedStatuses(t){let{hasError:n,thrownError:r,isStopped:o}=this;n?t.error(r):o&&t.complete()}asObservable(){let t=new Et;return t.source=this,t}}return i.create=(e,t)=>new wv(e,t),i})(),wv=class extends pe{constructor(e,t){super(),this.destination=e,this.source=t}next(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.next)===null||n===void 0||n.call(t,e)}error(e){var t,n;(n=(t=this.destination)===null||t===void 0?void 0:t.error)===null||n===void 0||n.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,n;return(n=(t=this.source)===null||t===void 0?void 0:t.subscribe(e))!==null&&n!==void 0?n:_S}};var On=class extends pe{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:n}=this;if(e)throw t;return this._throwIfClosed(),n}next(e){super.next(this._value=e)}};var Mf={now(){return(Mf.delegate||Date).now()},delegate:void 0};var ya=class extends pe{constructor(e=1/0,t=1/0,n=Mf){super(),this._bufferSize=e,this._windowTime=t,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=t===1/0,this._bufferSize=Math.max(1,e),this._windowTime=Math.max(1,t)}next(e){let{isStopped:t,_buffer:n,_infiniteTimeWindow:r,_timestampProvider:o,_windowTime:s}=this;t||(n.push(e),!r&&n.push(o.now()+s)),this._trimBuffer(),super.next(e)}_subscribe(e){this._throwIfClosed(),this._trimBuffer();let t=this._innerSubscribe(e),{_infiniteTimeWindow:n,_buffer:r}=this,o=r.slice();for(let s=0;sXR(e)&&i()),e},clearImmediate(i){XR(i)}};var{setImmediate:m8,clearImmediate:g8}=ZR,If={setImmediate(...i){let{delegate:e}=If;return(e?.setImmediate||m8)(...i)},clearImmediate(i){let{delegate:e}=If;return(e?.clearImmediate||g8)(i)},delegate:void 0};var Sv=class extends gc{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,n=0){return n!==null&&n>0?super.requestAsyncId(e,t,n):(e.actions.push(this),e._scheduled||(e._scheduled=If.setImmediate(e.flush.bind(e,void 0))))}recycleAsyncId(e,t,n=0){var r;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(e,t,n);let{actions:o}=e;t!=null&&((r=o[o.length-1])===null||r===void 0?void 0:r.id)!==t&&(If.clearImmediate(t),e._scheduled===t&&(e._scheduled=void 0))}};var ku=class i{constructor(e,t=i.now){this.schedulerActionCtor=e,this.now=t}schedule(e,t=0,n){return new this.schedulerActionCtor(this,e).schedule(n,t)}};ku.now=Mf.now;var _c=class extends ku{constructor(e,t=ku.now){super(e,t),this.actions=[],this._active=!1}flush(e){let{actions:t}=this;if(this._active){t.push(e);return}let n;this._active=!0;do if(n=e.execute(e.state,e.delay))break;while(e=t.shift());if(this._active=!1,n){for(;e=t.shift();)e.unsubscribe();throw n}}};var Mv=class extends _c{flush(e){this._active=!0;let t=this._scheduled;this._scheduled=void 0;let{actions:n}=this,r;e=e||n.shift();do if(r=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}}};var Tf=new Mv(Sv);var xa=new _c(gc),QR=xa;var Ev=class extends gc{constructor(e,t){super(e,t),this.scheduler=e,this.work=t}requestAsyncId(e,t,n=0){return n!==null&&n>0?super.requestAsyncId(e,t,n):(e.actions.push(this),e._scheduled||(e._scheduled=Nu.requestAnimationFrame(()=>e.flush(void 0))))}recycleAsyncId(e,t,n=0){var r;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(e,t,n);let{actions:o}=e;t!=null&&((r=o[o.length-1])===null||r===void 0?void 0:r.id)!==t&&(Nu.cancelAnimationFrame(t),e._scheduled=void 0)}};var Iv=class extends _c{flush(e){this._active=!0;let t=this._scheduled;this._scheduled=void 0;let{actions:n}=this,r;e=e||n.shift();do if(r=e.execute(e.state,e.delay))break;while((e=n[0])&&e.id===t&&n.shift());if(this._active=!1,r){for(;(e=n[0])&&e.id===t&&n.shift();)e.unsubscribe();throw r}}};var Tv=new Iv(Ev);var Dr=new Et(i=>i.complete());function Dv(i){return i&&Mt(i.schedule)}function TS(i){return i[i.length-1]}function Pv(i){return Mt(TS(i))?i.pop():void 0}function Ds(i){return Dv(TS(i))?i.pop():void 0}function KR(i,e){return typeof TS(i)=="number"?i.pop():e}function eA(i,e,t,n){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{l(n.next(d))}catch(u){s(u)}}function c(d){try{l(n.throw(d))}catch(u){s(u)}}function l(d){d.done?o(d.value):r(d.value).then(a,c)}l((n=n.apply(i,e||[])).next())})}function JR(i){var e=typeof Symbol=="function"&&Symbol.iterator,t=e&&i[e],n=0;if(t)return t.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&n>=i.length&&(i=void 0),{value:i&&i[n++],done:!i}}};throw new TypeError(e?"Object is not iterable.":"Symbol.iterator is not defined.")}function Ll(i){return this instanceof Ll?(this.v=i,this):new Ll(i)}function tA(i,e,t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=t.apply(i,e||[]),r,o=[];return r={},a("next"),a("throw"),a("return",s),r[Symbol.asyncIterator]=function(){return this},r;function s(p){return function(f){return Promise.resolve(f).then(p,u)}}function a(p,f){n[p]&&(r[p]=function(m){return new Promise(function(y,g){o.push([p,m,y,g])>1||c(p,m)})},f&&(r[p]=f(r[p])))}function c(p,f){try{l(n[p](f))}catch(m){h(o[0][3],m)}}function l(p){p.value instanceof Ll?Promise.resolve(p.value.v).then(d,u):h(o[0][2],p)}function d(p){c("next",p)}function u(p){c("throw",p)}function h(p,f){p(f),o.shift(),o.length&&c(o[0][0],o[0][1])}}function nA(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var e=i[Symbol.asyncIterator],t;return e?e.call(i):(i=typeof JR=="function"?JR(i):i[Symbol.iterator](),t={},n("next"),n("throw"),n("return"),t[Symbol.asyncIterator]=function(){return this},t);function n(o){t[o]=i[o]&&function(s){return new Promise(function(a,c){s=i[o](s),r(a,c,s.done,s.value)})}}function r(o,s,a,c){Promise.resolve(c).then(function(l){o({value:l,done:a})},s)}}var Lu=i=>i&&typeof i.length=="number"&&typeof i!="function";function Ov(i){return Mt(i?.then)}function Rv(i){return Mt(i[Ru])}function Av(i){return Symbol.asyncIterator&&Mt(i?.[Symbol.asyncIterator])}function Nv(i){return new TypeError(`You provided ${i!==null&&typeof i=="object"?"an invalid object":`'${i}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function _8(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var kv=_8();function Lv(i){return Mt(i?.[kv])}function Fv(i){return tA(this,arguments,function*(){let t=i.getReader();try{for(;;){let{value:n,done:r}=yield Ll(t.read());if(r)return yield Ll(void 0);yield yield Ll(n)}}finally{t.releaseLock()}})}function Bv(i){return Mt(i?.getReader)}function Cn(i){if(i instanceof Et)return i;if(i!=null){if(Rv(i))return v8(i);if(Lu(i))return b8(i);if(Ov(i))return y8(i);if(Av(i))return iA(i);if(Lv(i))return x8(i);if(Bv(i))return w8(i)}throw Nv(i)}function v8(i){return new Et(e=>{let t=i[Ru]();if(Mt(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function b8(i){return new Et(e=>{for(let t=0;t{i.then(t=>{e.closed||(e.next(t),e.complete())},t=>e.error(t)).then(null,yv)})}function x8(i){return new Et(e=>{for(let t of i)if(e.next(t),e.closed)return;e.complete()})}function iA(i){return new Et(e=>{C8(i,e).catch(t=>e.error(t))})}function w8(i){return iA(Fv(i))}function C8(i,e){var t,n,r,o;return eA(this,void 0,void 0,function*(){try{for(t=nA(i);n=yield t.next(),!n.done;){let s=n.value;if(e.next(s),e.closed)return}}catch(s){r={error:s}}finally{try{n&&!n.done&&(o=t.return)&&(yield o.call(t))}finally{if(r)throw r.error}}e.complete()})}function Jr(i,e,t,n=0,r=!1){let o=e.schedule(function(){t(),r?i.add(this.schedule(null,n)):this.unsubscribe()},n);if(i.add(o),!r)return o}function Vv(i,e=0){return Lt((t,n)=>{t.subscribe(kt(n,r=>Jr(n,i,()=>n.next(r),e),()=>Jr(n,i,()=>n.complete(),e),r=>Jr(n,i,()=>n.error(r),e)))})}function zv(i,e=0){return Lt((t,n)=>{n.add(i.schedule(()=>t.subscribe(n),e))})}function rA(i,e){return Cn(i).pipe(zv(e),Vv(e))}function oA(i,e){return Cn(i).pipe(zv(e),Vv(e))}function sA(i,e){return new Et(t=>{let n=0;return e.schedule(function(){n===i.length?t.complete():(t.next(i[n++]),t.closed||this.schedule())})})}function aA(i,e){return new Et(t=>{let n;return Jr(t,e,()=>{n=i[kv](),Jr(t,e,()=>{let r,o;try{({value:r,done:o}=n.next())}catch(s){t.error(s);return}o?t.complete():t.next(r)},0,!0)}),()=>Mt(n?.return)&&n.return()})}function Uv(i,e){if(!i)throw new Error("Iterable cannot be null");return new Et(t=>{Jr(t,e,()=>{let n=i[Symbol.asyncIterator]();Jr(t,e,()=>{n.next().then(r=>{r.done?t.complete():t.next(r.value)})},0,!0)})})}function cA(i,e){return Uv(Fv(i),e)}function lA(i,e){if(i!=null){if(Rv(i))return rA(i,e);if(Lu(i))return sA(i,e);if(Ov(i))return oA(i,e);if(Av(i))return Uv(i,e);if(Lv(i))return aA(i,e);if(Bv(i))return cA(i,e)}throw Nv(i)}function Jn(i,e){return e?lA(i,e):Cn(i)}function Ke(...i){let e=Ds(i);return Jn(i,e)}function vc(i,e){let t=Mt(i)?i:()=>i,n=r=>r.error(t());return new Et(e?r=>e.schedule(n,0,r):n)}function Fl(i){return!!i&&(i instanceof Et||Mt(i.lift)&&Mt(i.subscribe))}var wa=Du(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"});function dA(i){return i instanceof Date&&!isNaN(i)}function Je(i,e){return Lt((t,n)=>{let r=0;t.subscribe(kt(n,o=>{n.next(i.call(e,o,r++))}))})}var{isArray:S8}=Array;function M8(i,e){return S8(e)?i(...e):i(e)}function Fu(i){return Je(e=>M8(i,e))}var{isArray:E8}=Array,{getPrototypeOf:I8,prototype:T8,keys:D8}=Object;function Hv(i){if(i.length===1){let e=i[0];if(E8(e))return{args:e,keys:null};if(P8(e)){let t=D8(e);return{args:t.map(n=>e[n]),keys:t}}}return{args:i,keys:null}}function P8(i){return i&&typeof i=="object"&&I8(i)===T8}function Gv(i,e){return i.reduce((t,n,r)=>(t[n]=e[r],t),{})}function eo(...i){let e=Ds(i),t=Pv(i),{args:n,keys:r}=Hv(i);if(n.length===0)return Jn([],e);let o=new Et(O8(n,e,r?s=>Gv(r,s):Tr));return t?o.pipe(Fu(t)):o}function O8(i,e,t=Tr){return n=>{uA(e,()=>{let{length:r}=i,o=new Array(r),s=r,a=r;for(let c=0;c{let l=Jn(i[c],e),d=!1;l.subscribe(kt(n,u=>{o[c]=u,d||(d=!0,a--),a||n.next(t(o.slice()))},()=>{--s||n.complete()}))},n)},n)}}function uA(i,e,t){i?Jr(t,i,e):e()}function hA(i,e,t,n,r,o,s,a){let c=[],l=0,d=0,u=!1,h=()=>{u&&!c.length&&!l&&e.complete()},p=m=>l{o&&e.next(m),l++;let y=!1;Cn(t(m,d++)).subscribe(kt(e,g=>{r?.(g),o?p(g):e.next(g)},()=>{y=!0},void 0,()=>{if(y)try{for(l--;c.length&&lf(g)):f(g)}h()}catch(g){e.error(g)}}))};return i.subscribe(kt(e,p,()=>{u=!0,h()})),()=>{a?.()}}function ti(i,e,t=1/0){return Mt(e)?ti((n,r)=>Je((o,s)=>e(n,o,r,s))(Cn(i(n,r))),t):(typeof e=="number"&&(t=e),Lt((n,r)=>hA(n,r,i,t)))}function Df(i=1/0){return ti(Tr,i)}function pA(){return Df(1)}function Ps(...i){return pA()(Jn(i,Ds(i)))}function Po(i){return new Et(e=>{Cn(i()).subscribe(e)})}function Pf(...i){let e=Pv(i),{args:t,keys:n}=Hv(i),r=new Et(o=>{let{length:s}=t;if(!s){o.complete();return}let a=new Array(s),c=s,l=s;for(let d=0;d{u||(u=!0,l--),a[d]=h},()=>c--,void 0,()=>{(!c||!u)&&(l||o.next(n?Gv(n,a):a),o.complete())}))}});return e?r.pipe(Fu(e)):r}var R8=["addListener","removeListener"],A8=["addEventListener","removeEventListener"],N8=["on","off"];function yn(i,e,t,n){if(Mt(t)&&(n=t,t=void 0),n)return yn(i,e,t).pipe(Fu(n));let[r,o]=F8(i)?A8.map(s=>a=>i[s](e,a,t)):k8(i)?R8.map(fA(i,e)):L8(i)?N8.map(fA(i,e)):[];if(!r&&Lu(i))return ti(s=>yn(s,e,t))(Cn(i));if(!r)throw new TypeError("Invalid event target");return new Et(s=>{let a=(...c)=>s.next(1o(a)})}function fA(i,e){return t=>n=>i[t](e,n)}function k8(i){return Mt(i.addListener)&&Mt(i.removeListener)}function L8(i){return Mt(i.on)&&Mt(i.off)}function F8(i){return Mt(i.addEventListener)&&Mt(i.removeEventListener)}function Bu(i=0,e,t=QR){let n=-1;return e!=null&&(Dv(e)?t=e:n=e),new Et(r=>{let o=dA(i)?+i-t.now():i;o<0&&(o=0);let s=0;return t.schedule(function(){r.closed||(r.next(s++),0<=n?this.schedule(void 0,n):r.complete())},o)})}function DS(i=0,e=xa){return i<0&&(i=0),Bu(i,i,e)}function Zn(...i){let e=Ds(i),t=KR(i,1/0),n=i;return n.length?n.length===1?Cn(n[0]):Df(t)(Jn(n,e)):Dr}function qt(i,e){return Lt((t,n)=>{let r=0;t.subscribe(kt(n,o=>i.call(e,o,r++)&&n.next(o)))})}function Of(i){return Lt((e,t)=>{let n=!1,r=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,n){n=!1;let l=r;r=null,t.next(l)}s&&t.complete()},c=()=>{o=null,s&&t.complete()};e.subscribe(kt(t,l=>{n=!0,r=l,o||Cn(i(l)).subscribe(o=kt(t,a,c))},()=>{s=!0,(!n||!o||o.closed)&&t.complete()}))})}function jv(i,e=xa){return Of(()=>Bu(i,e))}function Os(i){return Lt((e,t)=>{let n=null,r=!1,o;n=e.subscribe(kt(t,void 0,void 0,s=>{o=Cn(i(s,Os(i)(e))),n?(n.unsubscribe(),n=null,o.subscribe(t)):r=!0})),r&&(n.unsubscribe(),n=null,o.subscribe(t))})}function mA(i,e,t,n,r){return(o,s)=>{let a=t,c=e,l=0;o.subscribe(kt(s,d=>{let u=l++;c=a?i(c,d,u):(a=!0,d),n&&s.next(c)},r&&(()=>{a&&s.next(c),s.complete()})))}}function bc(i,e){return Mt(e)?ti(i,e,1):ti(i,1)}function Oo(i,e=xa){return Lt((t,n)=>{let r=null,o=null,s=null,a=()=>{if(r){r.unsubscribe(),r=null;let l=o;o=null,n.next(l)}};function c(){let l=s+i,d=e.now();if(d{o=l,s=e.now(),r||(r=e.schedule(c,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{o=r=null}))})}function yc(i){return Lt((e,t)=>{let n=!1;e.subscribe(kt(t,r=>{n=!0,t.next(r)},()=>{n||t.next(i),t.complete()}))})}function _n(i){return i<=0?()=>Dr:Lt((e,t)=>{let n=0;e.subscribe(kt(t,r=>{++n<=i&&(t.next(r),i<=n&&t.complete())}))})}function gA(){return Lt((i,e)=>{i.subscribe(kt(e,Al))})}function Rf(i){return Je(()=>i)}function PS(i,e){return e?t=>Ps(e.pipe(_n(1),gA()),t.pipe(PS(i))):ti((t,n)=>Cn(i(t,n)).pipe(_n(1),Rf(t)))}function Vu(i,e=xa){let t=Bu(i,e);return PS(()=>t)}function xc(i,e=Tr){return i=i??B8,Lt((t,n)=>{let r,o=!0;t.subscribe(kt(n,s=>{let a=e(s);(o||!i(r,a))&&(o=!1,r=a,n.next(s))}))})}function B8(i,e){return i===e}function Wv(i=V8){return Lt((e,t)=>{let n=!1;e.subscribe(kt(t,r=>{n=!0,t.next(r)},()=>n?t.complete():t.error(i())))})}function V8(){return new wa}function wc(i){return Lt((e,t)=>{try{e.subscribe(t)}finally{t.add(i)}})}function Rs(i,e){let t=arguments.length>=2;return n=>n.pipe(i?qt((r,o)=>i(r,o,n)):Tr,_n(1),t?yc(e):Wv(()=>new wa))}function zu(i){return i<=0?()=>Dr:Lt((e,t)=>{let n=[];e.subscribe(kt(t,r=>{n.push(r),i{for(let r of n)t.next(r);t.complete()},void 0,()=>{n=null}))})}function OS(i,e){let t=arguments.length>=2;return n=>n.pipe(i?qt((r,o)=>i(r,o,n)):Tr,zu(1),t?yc(e):Wv(()=>new wa))}function RS(i,e){return Lt(mA(i,e,arguments.length>=2,!0))}function Af(i={}){let{connector:e=()=>new pe,resetOnError:t=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return o=>{let s,a,c,l=0,d=!1,u=!1,h=()=>{a?.unsubscribe(),a=void 0},p=()=>{h(),s=c=void 0,d=u=!1},f=()=>{let m=s;p(),m?.unsubscribe()};return Lt((m,y)=>{l++,!u&&!d&&h();let g=c=c??e();y.add(()=>{l--,l===0&&!u&&!d&&(a=AS(f,r))}),g.subscribe(y),!s&&l>0&&(s=new ba({next:_=>g.next(_),error:_=>{u=!0,h(),a=AS(p,t,_),g.error(_)},complete:()=>{d=!0,h(),a=AS(p,n),g.complete()}}),Cn(m).subscribe(s))})(o)}}function AS(i,e,...t){if(e===!0){i();return}if(e===!1)return;let n=new ba({next:()=>{n.unsubscribe(),i()}});return Cn(e(...t)).subscribe(n)}function $v(i,e,t){let n,r=!1;return i&&typeof i=="object"?{bufferSize:n=1/0,windowTime:e=1/0,refCount:r=!1,scheduler:t}=i:n=i??1/0,Af({connector:()=>new ya(n,e,t),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:r})}function Nf(i){return qt((e,t)=>i<=t)}function gi(...i){let e=Ds(i);return Lt((t,n)=>{(e?Ps(i,t,e):Ps(i,t)).subscribe(n)})}function Qn(i,e){return Lt((t,n)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&n.complete();t.subscribe(kt(n,c=>{r?.unsubscribe();let l=0,d=o++;Cn(i(c,d)).subscribe(r=kt(n,u=>n.next(e?e(c,u,d,l++):u),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function Ze(i){return Lt((e,t)=>{Cn(i).subscribe(kt(t,()=>t.complete(),Al)),!t.closed&&e.subscribe(t)})}function NS(i,e=!1){return Lt((t,n)=>{let r=0;t.subscribe(kt(n,o=>{let s=i(o,r++);(s||e)&&n.next(o),!s&&n.complete()}))})}function En(i,e,t){let n=Mt(i)||e||t?{next:i,error:e,complete:t}:i;return n?Lt((r,o)=>{var s;(s=n.subscribe)===null||s===void 0||s.call(n);let a=!0;r.subscribe(kt(o,c=>{var l;(l=n.next)===null||l===void 0||l.call(n,c),o.next(c)},()=>{var c;a=!1,(c=n.complete)===null||c===void 0||c.call(n),o.complete()},c=>{var l;a=!1,(l=n.error)===null||l===void 0||l.call(n,c),o.error(c)},()=>{var c,l;a&&((c=n.unsubscribe)===null||c===void 0||c.call(n)),(l=n.finalize)===null||l===void 0||l.call(n)}))}):Tr}var sN="https://g.co/ng/security#xss",Oe=class extends Error{constructor(e,t){super(oE(e,t)),this.code=e}};function oE(i,e){return`${`NG0${Math.abs(i)}`}${e?": "+e:""}`}function Wf(i){return{toString:i}.toString()}var qv="__parameters__";function z8(i){return function(...t){if(i){let n=i(...t);for(let r in n)this[r]=n[r]}}}function aN(i,e,t){return Wf(()=>{let n=z8(e);function r(...o){if(this instanceof r)return n.apply(this,o),this;let s=new r(...o);return a.annotation=s,a;function a(c,l,d){let u=c.hasOwnProperty(qv)?c[qv]:Object.defineProperty(c,qv,{value:[]})[qv];for(;u.length<=d;)u.push(null);return(u[d]=u[d]||[]).push(s),c}}return t&&(r.prototype=Object.create(t.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}var Lf=globalThis;function Gn(i){for(let e in i)if(i[e]===Gn)return e;throw Error("Could not find renamed property on target object.")}function U8(i,e){for(let t in e)e.hasOwnProperty(t)&&!i.hasOwnProperty(t)&&(i[t]=e[t])}function Rr(i){if(typeof i=="string")return i;if(Array.isArray(i))return"["+i.map(Rr).join(", ")+"]";if(i==null)return""+i;if(i.overriddenName)return`${i.overriddenName}`;if(i.name)return`${i.name}`;let e=i.toString();if(e==null)return""+e;let t=e.indexOf(` -`);return t===-1?e:e.substring(0,t)}function XS(i,e){return i==null||i===""?e===null?"":e:e==null||e===""?i:i+" "+e}var H8=Gn({__forward_ref__:Gn});function kr(i){return i.__forward_ref__=kr,i.toString=function(){return Rr(this())},i}function Yi(i){return cN(i)?i():i}function cN(i){return typeof i=="function"&&i.hasOwnProperty(H8)&&i.__forward_ref__===kr}function J(i){return{token:i.token,providedIn:i.providedIn||null,factory:i.factory,value:void 0}}function it(i){return{providers:i.providers||[],imports:i.imports||[]}}function T0(i){return _A(i,dN)||_A(i,uN)}function lN(i){return T0(i)!==null}function _A(i,e){return i.hasOwnProperty(e)?i[e]:null}function G8(i){let e=i&&(i[dN]||i[uN]);return e||null}function vA(i){return i&&(i.hasOwnProperty(bA)||i.hasOwnProperty(j8))?i[bA]:null}var dN=Gn({\u0275prov:Gn}),bA=Gn({\u0275inj:Gn}),uN=Gn({ngInjectableDef:Gn}),j8=Gn({ngInjectorDef:Gn}),me=class{constructor(e,t){this._desc=e,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,typeof t=="number"?this.__NG_ELEMENT_ID__=t:t!==void 0&&(this.\u0275prov=J({token:this,providedIn:t.providedIn||"root",factory:t.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function hN(i){return i&&!!i.\u0275providers}var W8=Gn({\u0275cmp:Gn}),$8=Gn({\u0275dir:Gn}),q8=Gn({\u0275pipe:Gn}),Y8=Gn({\u0275mod:Gn}),o0=Gn({\u0275fac:Gn}),kf=Gn({__NG_ELEMENT_ID__:Gn}),yA=Gn({__NG_ENV_ID__:Gn});function As(i){return typeof i=="string"?i:i==null?"":String(i)}function X8(i){return typeof i=="function"?i.name||i.toString():typeof i=="object"&&i!=null&&typeof i.type=="function"?i.type.name||i.type.toString():As(i)}function Z8(i,e){let t=e?`. Dependency path: ${e.join(" > ")} > ${i}`:"";throw new Oe(-200,i)}function sE(i,e){throw new Oe(-201,!1)}var tn=function(i){return i[i.Default=0]="Default",i[i.Host=1]="Host",i[i.Self=2]="Self",i[i.SkipSelf=4]="SkipSelf",i[i.Optional=8]="Optional",i}(tn||{}),ZS;function pN(){return ZS}function Ro(i){let e=ZS;return ZS=i,e}function fN(i,e,t){let n=T0(i);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(t&tn.Optional)return null;if(e!==void 0)return e;sE(i,"Injector")}var Q8={},Ff=Q8,QS="__NG_DI_FLAG__",s0="ngTempTokenPath",K8="ngTokenPath",J8=/\n/gm,eW="\u0275",xA="__source",ju;function tW(){return ju}function Cc(i){let e=ju;return ju=i,e}function nW(i,e=tn.Default){if(ju===void 0)throw new Oe(-203,!1);return ju===null?fN(i,void 0,e):ju.get(i,e&tn.Optional?null:void 0,e)}function X(i,e=tn.Default){return(pN()||nW)(Yi(i),e)}function te(i,e=tn.Default){return X(i,D0(e))}function D0(i){return typeof i>"u"||typeof i=="number"?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function KS(i){let e=[];for(let t=0;t ");else if(typeof e=="object"){let o=[];for(let s in e)if(e.hasOwnProperty(s)){let a=e[s];o.push(s+":"+(typeof a=="string"?JSON.stringify(a):Rr(a)))}r=`{${o.join(", ")}}`}return`${t}${n?"("+n+")":""}[${r}]: ${i.replace(J8,` - `)}`}var P0=mN(aN("Optional"),8);var aE=mN(aN("SkipSelf"),4);function $u(i,e){let t=i.hasOwnProperty(o0);return t?i[o0]:null}function sW(i,e,t){if(i.length!==e.length)return!1;for(let n=0;nArray.isArray(t)?cE(t,e):e(t))}function gN(i,e,t){e>=i.length?i.push(t):i.splice(e,0,t)}function a0(i,e){return e>=i.length-1?i.pop():i.splice(e,1)[0]}function cW(i,e){let t=[];for(let n=0;ne;){let o=r-2;i[r]=i[o],r--}i[e]=t,i[e+1]=n}}function O0(i,e,t){let n=$f(i,e);return n>=0?i[n|1]=t:(n=~n,lW(i,n,e,t)),n}function kS(i,e){let t=$f(i,e);if(t>=0)return i[t|1]}function $f(i,e){return dW(i,e,1)}function dW(i,e,t){let n=0,r=i.length>>t;for(;r!==n;){let o=n+(r-n>>1),s=i[o<e?r=o:n=o+1}return~(r<e){s=o-1;break}}}for(;o-1){let o;for(;++ro?u="":u=r[d+1].toLowerCase(),n&2&&l!==u){if(cs(n))return!1;s=!0}}}}return cs(n)||s}function cs(i){return(i&1)===0}function gW(i,e,t,n){if(e===null)return-1;let r=0;if(n||!t){let o=!1;for(;r-1)for(t++;t0?'="'+a+'"':"")+"]"}else n&8?r+="."+s:n&4&&(r+=" "+s);else r!==""&&!cs(s)&&(e+=CA(o,r),r=""),n=s,o=o||!cs(n);t++}return r!==""&&(e+=CA(o,r)),e}function wW(i){return i.map(xW).join(",")}function CW(i){let e=[],t=[],n=1,r=2;for(;n{let e=EN(i),t=yt(Z({},e),{decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===bN.OnPush,directiveDefs:null,pipeDefs:null,dependencies:e.standalone&&i.dependencies||null,getStandaloneInjector:null,signals:i.signals??!1,data:i.data||{},encapsulation:i.encapsulation||Ls.Emulated,styles:i.styles||Pr,_:null,schemas:i.schemas||null,tView:null,id:""});IN(t);let n=i.dependencies;return t.directiveDefs=MA(n,!1),t.pipeDefs=MA(n,!0),t.id=EW(t),t})}function SW(i){return Ic(i)||dE(i)}function MW(i){return i!==null}function rt(i){return Wf(()=>({type:i.type,bootstrap:i.bootstrap||Pr,declarations:i.declarations||Pr,imports:i.imports||Pr,exports:i.exports||Pr,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function SA(i,e){if(i==null)return Ca;let t={};for(let n in i)if(i.hasOwnProperty(n)){let r=i[n],o,s,a=Ec.None;Array.isArray(r)?(a=r[0],o=r[1],s=r[2]??o):(o=r,s=r),e?(t[o]=a!==Ec.None?[n,a]:n,e[o]=s):t[o]=n}return t}function Ve(i){return Wf(()=>{let e=EN(i);return IN(e),e})}function Ic(i){return i[W8]||null}function dE(i){return i[$8]||null}function CN(i){return i[q8]||null}function SN(i){let e=Ic(i)||dE(i)||CN(i);return e!==null?e.standalone:!1}function MN(i,e){let t=i[Y8]||null;if(!t&&e===!0)throw new Error(`Type ${Rr(i)} does not have '\u0275mod' property.`);return t}function EN(i){let e={};return{type:i.type,providersResolver:null,factory:null,hostBindings:i.hostBindings||null,hostVars:i.hostVars||0,hostAttrs:i.hostAttrs||null,contentQueries:i.contentQueries||null,declaredInputs:e,inputTransforms:null,inputConfig:i.inputs||Ca,exportAs:i.exportAs||null,standalone:i.standalone===!0,signals:i.signals===!0,selectors:i.selectors||Pr,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:SA(i.inputs,e),outputs:SA(i.outputs),debugInfo:null}}function IN(i){i.features?.forEach(e=>e(i))}function MA(i,e){if(!i)return null;let t=e?CN:SW;return()=>(typeof i=="function"?i():i).map(n=>t(n)).filter(MW)}function EW(i){let e=0,t=[i.selectors,i.ngContentSelectors,i.hostVars,i.hostAttrs,i.consts,i.vars,i.decls,i.encapsulation,i.standalone,i.signals,i.exportAs,JSON.stringify(i.inputs),JSON.stringify(i.outputs),Object.getOwnPropertyNames(i.type.prototype),!!i.contentQueries,!!i.viewQuery].join("|");for(let r of t)e=Math.imul(31,e)+r.charCodeAt(0)<<0;return e+=2147483648,"c"+e}function R0(i){return{\u0275providers:i}}function IW(...i){return{\u0275providers:TN(!0,i),\u0275fromNgModule:!0}}function TN(i,...e){let t=[],n=new Set,r,o=s=>{t.push(s)};return cE(e,s=>{let a=s;eM(a,o,[],n)&&(r||=[],r.push(a))}),r!==void 0&&DN(r,o),t}function DN(i,e){for(let t=0;t{e(o,n)})}}function eM(i,e,t,n){if(i=Yi(i),!i)return!1;let r=null,o=vA(i),s=!o&&Ic(i);if(!o&&!s){let c=i.ngModule;if(o=vA(c),o)r=c;else return!1}else{if(s&&!s.standalone)return!1;r=i}let a=n.has(r);if(s){if(a)return!1;if(n.add(r),s.dependencies){let c=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let l of c)eM(l,e,t,n)}}else if(o){if(o.imports!=null&&!a){n.add(r);let l;try{cE(o.imports,d=>{eM(d,e,t,n)&&(l||=[],l.push(d))})}finally{}l!==void 0&&DN(l,e)}if(!a){let l=$u(r)||(()=>new r);e({provide:r,useFactory:l,deps:Pr},r),e({provide:vN,useValue:r,multi:!0},r),e({provide:qu,useValue:()=>X(r),multi:!0},r)}let c=o.providers;if(c!=null&&!a){let l=i;uE(c,d=>{e(d,l)})}}else return!1;return r!==i&&i.providers!==void 0}function uE(i,e){for(let t of i)hN(t)&&(t=t.\u0275providers),Array.isArray(t)?uE(t,e):e(t)}var TW=Gn({provide:String,useValue:Gn});function PN(i){return i!==null&&typeof i=="object"&&TW in i}function DW(i){return!!(i&&i.useExisting)}function PW(i){return!!(i&&i.useFactory)}function Yu(i){return typeof i=="function"}function OW(i){return!!i.useClass}var A0=new me(""),Kv={},RW={},LS;function N0(){return LS===void 0&&(LS=new c0),LS}var Xi=class{},Vf=class extends Xi{get destroyed(){return this._destroyed}constructor(e,t,n,r){super(),this.parent=t,this.source=n,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,nM(e,s=>this.processProvider(s)),this.records.set(_N,Uu(void 0,this)),r.has("environment")&&this.records.set(Xi,Uu(void 0,this));let o=this.records.get(A0);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(vN,Pr,tn.Self))}destroy(){this.assertNotDestroyed(),this._destroyed=!0;let e=ln(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let t=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of t)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),ln(e)}}onDestroy(e){return this.assertNotDestroyed(),this._onDestroyHooks.push(e),()=>this.removeOnDestroy(e)}runInContext(e){this.assertNotDestroyed();let t=Cc(this),n=Ro(void 0),r;try{return e()}finally{Cc(t),Ro(n)}}get(e,t=Ff,n=tn.Default){if(this.assertNotDestroyed(),e.hasOwnProperty(yA))return e[yA](this);n=D0(n);let r,o=Cc(this),s=Ro(void 0);try{if(!(n&tn.SkipSelf)){let c=this.records.get(e);if(c===void 0){let l=FW(e)&&T0(e);l&&this.injectableDefInScope(l)?c=Uu(tM(e),Kv):c=null,this.records.set(e,c)}if(c!=null)return this.hydrate(e,c)}let a=n&tn.Self?N0():this.parent;return t=n&tn.Optional&&t===Ff?null:t,a.get(e,t)}catch(a){if(a.name==="NullInjectorError"){if((a[s0]=a[s0]||[]).unshift(Rr(e)),o)throw a;return rW(a,e,"R3InjectorError",this.source)}else throw a}finally{Ro(s),Cc(o)}}resolveInjectorInitializers(){let e=ln(null),t=Cc(this),n=Ro(void 0),r;try{let o=this.get(qu,Pr,tn.Self);for(let s of o)s()}finally{Cc(t),Ro(n),ln(e)}}toString(){let e=[],t=this.records;for(let n of t.keys())e.push(Rr(n));return`R3Injector[${e.join(", ")}]`}assertNotDestroyed(){if(this._destroyed)throw new Oe(205,!1)}processProvider(e){e=Yi(e);let t=Yu(e)?e:Yi(e&&e.provide),n=NW(e);if(!Yu(e)&&e.multi===!0){let r=this.records.get(t);r||(r=Uu(void 0,Kv,!0),r.factory=()=>KS(r.multi),this.records.set(t,r)),t=e,r.multi.push(e)}this.records.set(t,n)}hydrate(e,t){let n=ln(null);try{return t.value===Kv&&(t.value=RW,t.value=t.factory()),typeof t.value=="object"&&t.value&&LW(t.value)&&this._ngOnDestroyHooks.add(t.value),t.value}finally{ln(n)}}injectableDefInScope(e){if(!e.providedIn)return!1;let t=Yi(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 tM(i){let e=T0(i),t=e!==null?e.factory:$u(i);if(t!==null)return t;if(i instanceof me)throw new Oe(204,!1);if(i instanceof Function)return AW(i);throw new Oe(204,!1)}function AW(i){if(i.length>0)throw new Oe(204,!1);let t=G8(i);return t!==null?()=>t.factory(i):()=>new i}function NW(i){if(PN(i))return Uu(void 0,i.useValue);{let e=ON(i);return Uu(e,Kv)}}function ON(i,e,t){let n;if(Yu(i)){let r=Yi(i);return $u(r)||tM(r)}else if(PN(i))n=()=>Yi(i.useValue);else if(PW(i))n=()=>i.useFactory(...KS(i.deps||[]));else if(DW(i))n=()=>X(Yi(i.useExisting));else{let r=Yi(i&&(i.useClass||i.provide));if(kW(i))n=()=>new r(...KS(i.deps));else return $u(r)||tM(r)}return n}function Uu(i,e,t=!1){return{factory:i,value:e,multi:t?[]:void 0}}function kW(i){return!!i.deps}function LW(i){return i!==null&&typeof i=="object"&&typeof i.ngOnDestroy=="function"}function FW(i){return typeof i=="function"||typeof i=="object"&&i instanceof me}function nM(i,e){for(let t of i)Array.isArray(t)?nM(t,e):t&&hN(t)?nM(t.\u0275providers,e):e(t)}function Vs(i,e){i instanceof Vf&&i.assertNotDestroyed();let t,n=Cc(i),r=Ro(void 0);try{return e()}finally{Cc(n),Ro(r)}}function RN(){return pN()!==void 0||tW()!=null}function ih(i){if(!RN())throw new Oe(-203,!1)}function BW(i){return typeof i=="function"}var zs=0,Gt=1,Rt=2,mr=3,ds=4,to=5,Xu=6,l0=7,pr=8,Zu=9,Fs=10,ai=11,zf=12,EA=13,rh=14,lo=15,zl=16,Hu=17,Sa=18,k0=19,AN=20,Sc=21,Jv=22,Ao=23,Ar=25,hE=1;var Ul=7,d0=8,Qu=9,fr=10,u0=function(i){return i[i.None=0]="None",i[i.HasTransplantedViews=2]="HasTransplantedViews",i}(u0||{});function Mc(i){return Array.isArray(i)&&typeof i[hE]=="object"}function Ta(i){return Array.isArray(i)&&i[hE]===!0}function pE(i){return(i.flags&4)!==0}function L0(i){return i.componentOffset>-1}function F0(i){return(i.flags&1)===1}function Ma(i){return!!i.template}function iM(i){return(i[Rt]&512)!==0}var rM=class{constructor(e,t,n){this.previousValue=e,this.currentValue=t,this.firstChange=n}isFirstChange(){return this.firstChange}};function NN(i,e,t,n){e!==null?e.applyValueToInputSignal(e,n):i[t]=n}function dn(){return kN}function kN(i){return i.type.prototype.ngOnChanges&&(i.setInput=zW),VW}dn.ngInherit=!0;function VW(){let i=FN(this),e=i?.current;if(e){let t=i.previous;if(t===Ca)i.previous=e;else for(let n in e)t[n]=e[n];i.current=null,this.ngOnChanges(e)}}function zW(i,e,t,n,r){let o=this.declaredInputs[n],s=FN(i)||UW(i,{previous:Ca,current:null}),a=s.current||(s.current={}),c=s.previous,l=c[o];a[o]=new rM(l&&l.currentValue,t,c===Ca),NN(i,e,r,t)}var LN="__ngSimpleChanges__";function FN(i){return i[LN]||null}function UW(i,e){return i[LN]=e}var IA=null;var Ns=function(i,e,t){IA?.(i,e,t)},BN="svg",HW="math";function Bs(i){for(;Array.isArray(i);)i=i[zs];return i}function GW(i){for(;Array.isArray(i);){if(typeof i[hE]=="object")return i;i=i[zs]}return null}function VN(i,e){return Bs(e[i])}function ko(i,e){return Bs(e[i.index])}function fE(i,e){return i.data[e]}function jW(i,e){return i[e]}function Rc(i,e){let t=e[i];return Mc(t)?t:t[zs]}function WW(i){return(i[Rt]&4)===4}function mE(i){return(i[Rt]&128)===128}function $W(i){return Ta(i[mr])}function Tc(i,e){return e==null?null:i[e]}function zN(i){i[Hu]=0}function UN(i){i[Rt]&1024||(i[Rt]|=1024,mE(i)&&B0(i))}function qW(i,e){for(;i>0;)e=e[rh],i--;return e}function Uf(i){return!!(i[Rt]&9216||i[Ao]?.dirty)}function oM(i){i[Fs].changeDetectionScheduler?.notify(7),i[Rt]&64&&(i[Rt]|=1024),Uf(i)&&B0(i)}function B0(i){i[Fs].changeDetectionScheduler?.notify(0);let e=Hl(i);for(;e!==null&&!(e[Rt]&8192||(e[Rt]|=8192,!mE(e)));)e=Hl(e)}function HN(i,e){if((i[Rt]&256)===256)throw new Oe(911,!1);i[Sc]===null&&(i[Sc]=[]),i[Sc].push(e)}function YW(i,e){if(i[Sc]===null)return;let t=i[Sc].indexOf(e);t!==-1&&i[Sc].splice(t,1)}function Hl(i){let e=i[mr];return Ta(e)?e[mr]:e}var Yt={lFrame:KN(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var GN=!1;function XW(){return Yt.lFrame.elementDepthCount}function ZW(){Yt.lFrame.elementDepthCount++}function QW(){Yt.lFrame.elementDepthCount--}function jN(){return Yt.bindingsEnabled}function WN(){return Yt.skipHydrationRootTNode!==null}function KW(i){return Yt.skipHydrationRootTNode===i}function JW(){Yt.skipHydrationRootTNode=null}function jt(){return Yt.lFrame.lView}function ci(){return Yt.lFrame.tView}function B(i){return Yt.lFrame.contextLView=i,i[pr]}function V(i){return Yt.lFrame.contextLView=null,i}function Qi(){let i=$N();for(;i!==null&&i.type===64;)i=i.parent;return i}function $N(){return Yt.lFrame.currentTNode}function e6(){let i=Yt.lFrame,e=i.currentTNode;return i.isParent?e:e.parent}function Yl(i,e){let t=Yt.lFrame;t.currentTNode=i,t.isParent=e}function gE(){return Yt.lFrame.isParent}function _E(){Yt.lFrame.isParent=!1}function t6(){return Yt.lFrame.contextLView}function qN(){return GN}function TA(i){GN=i}function YN(){let i=Yt.lFrame,e=i.bindingRootIndex;return e===-1&&(e=i.bindingRootIndex=i.tView.bindingStartIndex),e}function XN(){return Yt.lFrame.bindingIndex}function n6(i){return Yt.lFrame.bindingIndex=i}function Xl(){return Yt.lFrame.bindingIndex++}function V0(i){let e=Yt.lFrame,t=e.bindingIndex;return e.bindingIndex=e.bindingIndex+i,t}function i6(){return Yt.lFrame.inI18n}function r6(i,e){let t=Yt.lFrame;t.bindingIndex=t.bindingRootIndex=i,sM(e)}function o6(){return Yt.lFrame.currentDirectiveIndex}function sM(i){Yt.lFrame.currentDirectiveIndex=i}function vE(i){let e=Yt.lFrame.currentDirectiveIndex;return e===-1?null:i[e]}function bE(){return Yt.lFrame.currentQueryIndex}function z0(i){Yt.lFrame.currentQueryIndex=i}function s6(i){let e=i[Gt];return e.type===2?e.declTNode:e.type===1?i[to]:null}function ZN(i,e,t){if(t&tn.SkipSelf){let r=e,o=i;for(;r=r.parent,r===null&&!(t&tn.Host);)if(r=s6(o),r===null||(o=o[rh],r.type&10))break;if(r===null)return!1;e=r,i=o}let n=Yt.lFrame=QN();return n.currentTNode=e,n.lView=i,!0}function yE(i){let e=QN(),t=i[Gt];Yt.lFrame=e,e.currentTNode=t.firstChild,e.lView=i,e.tView=t,e.contextLView=i,e.bindingIndex=t.bindingStartIndex,e.inI18n=!1}function QN(){let i=Yt.lFrame,e=i===null?null:i.child;return e===null?KN(i):e}function KN(i){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:i,child:null,inI18n:!1};return i!==null&&(i.child=e),e}function JN(){let i=Yt.lFrame;return Yt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}var ek=JN;function xE(){let i=JN();i.isParent=!0,i.tView=null,i.selectedIndex=-1,i.contextLView=null,i.elementDepthCount=0,i.currentDirectiveIndex=-1,i.currentNamespace=null,i.bindingRootIndex=-1,i.bindingIndex=-1,i.currentQueryIndex=0}function a6(i){return(Yt.lFrame.contextLView=qW(i,Yt.lFrame.contextLView))[pr]}function Us(){return Yt.lFrame.selectedIndex}function Gl(i){Yt.lFrame.selectedIndex=i}function U0(){let i=Yt.lFrame;return fE(i.tView,i.selectedIndex)}function uo(){Yt.lFrame.currentNamespace=BN}function H0(){c6()}function c6(){Yt.lFrame.currentNamespace=null}function l6(){return Yt.lFrame.currentNamespace}var tk=!0;function G0(){return tk}function j0(i){tk=i}function d6(i,e,t){let{ngOnChanges:n,ngOnInit:r,ngDoCheck:o}=e.type.prototype;if(n){let s=kN(e);(t.preOrderHooks??=[]).push(i,s),(t.preOrderCheckHooks??=[]).push(i,s)}r&&(t.preOrderHooks??=[]).push(0-i,r),o&&((t.preOrderHooks??=[]).push(i,o),(t.preOrderCheckHooks??=[]).push(i,o))}function W0(i,e){for(let t=e.directiveStart,n=e.directiveEnd;t=n)break}else e[c]<0&&(i[Hu]+=65536),(a>14>16&&(i[Rt]&3)===e&&(i[Rt]+=16384,DA(a,o)):DA(a,o)}var Wu=-1,jl=class{constructor(e,t,n){this.factory=e,this.resolving=!1,this.canSeeViewProviders=t,this.injectImpl=n}};function h6(i){return i instanceof jl}function p6(i){return(i.flags&8)!==0}function f6(i){return(i.flags&16)!==0}var BS={},aM=class{constructor(e,t){this.injector=e,this.parentInjector=t}get(e,t,n){n=D0(n);let r=this.injector.get(e,BS,n);return r!==BS||t===BS?r:this.parentInjector.get(e,t,n)}};function ik(i){return i!==Wu}function h0(i){return i&32767}function m6(i){return i>>16}function p0(i,e){let t=m6(i),n=e;for(;t>0;)n=n[rh],t--;return n}var cM=!0;function PA(i){let e=cM;return cM=i,e}var g6=256,rk=g6-1,ok=5,_6=0,ks={};function v6(i,e,t){let n;typeof t=="string"?n=t.charCodeAt(0)||0:t.hasOwnProperty(kf)&&(n=t[kf]),n==null&&(n=t[kf]=_6++);let r=n&rk,o=1<>ok)]|=o}function f0(i,e){let t=sk(i,e);if(t!==-1)return t;let n=e[Gt];n.firstCreatePass&&(i.injectorIndex=e.length,VS(n.data,i),VS(e,null),VS(n.blueprint,null));let r=wE(i,e),o=i.injectorIndex;if(ik(r)){let s=h0(r),a=p0(r,e),c=a[Gt].data;for(let l=0;l<8;l++)e[o+l]=a[s+l]|c[s+l]}return e[o+8]=r,o}function VS(i,e){i.push(0,0,0,0,0,0,0,0,e)}function sk(i,e){return i.injectorIndex===-1||i.parent&&i.parent.injectorIndex===i.injectorIndex||e[i.injectorIndex+8]===null?-1:i.injectorIndex}function wE(i,e){if(i.parent&&i.parent.injectorIndex!==-1)return i.parent.injectorIndex;let t=0,n=null,r=e;for(;r!==null;){if(n=uk(r),n===null)return Wu;if(t++,r=r[rh],n.injectorIndex!==-1)return n.injectorIndex|t<<16}return Wu}function lM(i,e,t){v6(i,e,t)}function b6(i,e){if(e==="class")return i.classes;if(e==="style")return i.styles;let t=i.attrs;if(t){let n=t.length,r=0;for(;r>20,u=n?a:a+d,h=r?a+d:l;for(let p=u;p=c&&f.type===t)return p}if(r){let p=s[c];if(p&&Ma(p)&&p.type===t)return c}return null}function Wl(i,e,t,n){let r=i[t],o=e.data;if(h6(r)){let s=r;s.resolving&&Z8(X8(o[t]));let a=PA(s.canSeeViewProviders);s.resolving=!0;let c,l=s.injectImpl?Ro(s.injectImpl):null,d=ZN(i,n,tn.Default);try{r=i[t]=s.factory(void 0,o,i,n),e.firstCreatePass&&t>=n.directiveStart&&d6(t,o[t],e)}finally{l!==null&&Ro(l),PA(a),s.resolving=!1,ek()}}return r}function x6(i){if(typeof i=="string")return i.charCodeAt(0)||0;let e=i.hasOwnProperty(kf)?i[kf]:void 0;return typeof e=="number"?e>=0?e&rk:w6:e}function OA(i,e,t){let n=1<>ok)]&n)}function RA(i,e){return!(i&tn.Self)&&!(i&tn.Host&&e)}var Vl=class{constructor(e,t){this._tNode=e,this._lView=t}get(e,t,n){return lk(this._tNode,this._lView,e,D0(n),t)}};function w6(){return new Vl(Qi(),jt())}function Li(i){return Wf(()=>{let e=i.prototype.constructor,t=e[o0]||dM(e),n=Object.prototype,r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){let o=r[o0]||dM(r);if(o&&o!==t)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function dM(i){return cN(i)?()=>{let e=dM(Yi(i));return e&&e()}:$u(i)}function C6(i,e,t,n,r){let o=i,s=e;for(;o!==null&&s!==null&&s[Rt]&2048&&!(s[Rt]&512);){let a=dk(o,s,t,n|tn.Self,ks);if(a!==ks)return a;let c=o.parent;if(!c){let l=s[AN];if(l){let d=l.get(t,ks,n);if(d!==ks)return d}c=uk(s),s=s[rh]}o=c}return r}function uk(i){let e=i[Gt],t=e.type;return t===2?e.declTNode:t===1?i[to]:null}function Lr(i){return b6(Qi(),i)}function AA(i,e=null,t=null,n){let r=hk(i,e,t,n);return r.resolveInjectorInitializers(),r}function hk(i,e=null,t=null,n,r=new Set){let o=[t||Pr,IW(i)];return n=n||(typeof i=="object"?void 0:Rr(i)),new Vf(o,e||N0(),n||null,r)}var Bl=class Bl{static create(e,t){if(Array.isArray(e))return AA({name:""},t,e,"");{let n=e.name??"";return AA({name:n},e.parent,e.providers,n)}}};Bl.THROW_IF_NOT_FOUND=Ff,Bl.NULL=new c0,Bl.\u0275prov=J({token:Bl,providedIn:"any",factory:()=>X(_N)}),Bl.__NG_ELEMENT_ID__=-1;var vt=Bl;var S6=new me("");S6.__NG_ELEMENT_ID__=i=>{let e=Qi();if(e===null)throw new Oe(204,!1);if(e.type&2)return e.value;if(i&tn.Optional)return null;throw new Oe(204,!1)};var M6="ngOriginalError";function zS(i){return i[M6]}var Nr=class{constructor(){this._console=console}handleError(e){let t=this._findOriginalError(e);this._console.error("ERROR",e),t&&this._console.error("ORIGINAL ERROR",t)}_findOriginalError(e){let t=e&&zS(e);for(;t&&zS(t);)t=zS(t);return t||null}},pk=new me("",{providedIn:"root",factory:()=>te(Nr).handleError.bind(void 0)}),Fi=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=E6,e.__NG_ENV_ID__=n=>n;let i=e;return i})(),uM=class extends Fi{constructor(e){super(),this._lView=e}onDestroy(e){return HN(this._lView,e),()=>YW(this._lView,e)}};function E6(){return new uM(jt())}function I6(){return oh(Qi(),jt())}function oh(i,e){return new Re(ko(i,e))}var Re=(()=>{let e=class e{constructor(n){this.nativeElement=n}};e.__NG_ELEMENT_ID__=I6;let i=e;return i})();function fk(i){return i instanceof Re?i.nativeElement:i}var Zl=(()=>{let e=class e{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new On(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let n=this.taskId++;return this.pendingTasks.add(n),n}remove(n){this.pendingTasks.delete(n),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}};e.\u0275prov=J({token:e,providedIn:"root",factory:()=>new e});let i=e;return i})();var hM=class extends pe{constructor(e=!1){super(),this.destroyRef=void 0,this.pendingTasks=void 0,this.__isAsync=e,RN()&&(this.destroyRef=te(Fi,{optional:!0})??void 0,this.pendingTasks=te(Zl,{optional:!0})??void 0)}emit(e){let t=ln(null);try{super.next(e)}finally{ln(t)}}subscribe(e,t,n){let r=e,o=t||(()=>null),s=n;if(e&&typeof e=="object"){let c=e;r=c.next?.bind(c),o=c.error?.bind(c),s=c.complete?.bind(c)}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 Ct&&e.add(a),a}wrapInTimeout(e){return t=>{let n=this.pendingTasks?.add();setTimeout(()=>{e(t),n!==void 0&&this.pendingTasks?.remove(n)})}}},Ie=hM;function T6(){return this._results[Symbol.iterator]()}var Zi=class i{get changes(){return this._changes??=new Ie}constructor(e=!1){this._emitDistinctChangesOnly=e,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;let t=i.prototype;t[Symbol.iterator]||(t[Symbol.iterator]=T6)}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 n=aW(e);(this._changesDetected=!sW(this._results,n,t))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.emit(this)}onDirty(e){this._onDirty=e}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}};function mk(i){return(i.flags&128)===128}var gk=new Map,D6=0;function P6(){return D6++}function O6(i){gk.set(i[k0],i)}function R6(i){gk.delete(i[k0])}var NA="__ngContext__";function Dc(i,e){Mc(e)?(i[NA]=e[k0],O6(e)):i[NA]=e}function _k(i){return bk(i[zf])}function vk(i){return bk(i[ds])}function bk(i){for(;i!==null&&!Ta(i);)i=i[ds];return i}var pM;function yk(i){pM=i}function A6(){if(pM!==void 0)return pM;if(typeof document<"u")return document;throw new Oe(210,!1)}var qf=new me("",{providedIn:"root",factory:()=>N6}),N6="ng",CE=new me(""),Da=new me("",{providedIn:"platform",factory:()=>"unknown"});var jn=new me(""),Yf=new me("",{providedIn:"root",factory:()=>A6().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var k6="h",L6="b";var F6=()=>null;function SE(i,e,t=!1){return F6(i,e,t)}var xk=!1,B6=new me("",{providedIn:"root",factory:()=>xk});var Yv;function V6(){if(Yv===void 0&&(Yv=null,Lf.trustedTypes))try{Yv=Lf.trustedTypes.createPolicy("angular",{createHTML:i=>i,createScript:i=>i,createScriptURL:i=>i})}catch{}return Yv}function $0(i){return V6()?.createHTML(i)||i}var Ea=class{constructor(e){this.changingThisBreaksApplicationSecurity=e}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${sN})`}},fM=class extends Ea{getTypeName(){return"HTML"}},mM=class extends Ea{getTypeName(){return"Style"}},gM=class extends Ea{getTypeName(){return"Script"}},_M=class extends Ea{getTypeName(){return"URL"}},vM=class extends Ea{getTypeName(){return"ResourceURL"}};function Hs(i){return i instanceof Ea?i.changingThisBreaksApplicationSecurity:i}function Ql(i,e){let t=z6(i);if(t!=null&&t!==e){if(t==="ResourceURL"&&e==="URL")return!0;throw new Error(`Required a safe ${e}, got a ${t} (see ${sN})`)}return t===e}function z6(i){return i instanceof Ea&&i.getTypeName()||null}function wk(i){return new fM(i)}function Ck(i){return new mM(i)}function Sk(i){return new gM(i)}function Mk(i){return new _M(i)}function Ek(i){return new vM(i)}function U6(i){let e=new yM(i);return H6()?new bM(e):e}var bM=class{constructor(e){this.inertDocumentHelper=e}getInertBodyElement(e){e=""+e;try{let t=new window.DOMParser().parseFromString($0(e),"text/html").body;return t===null?this.inertDocumentHelper.getInertBodyElement(e):(t.removeChild(t.firstChild),t)}catch{return null}}},yM=class{constructor(e){this.defaultDoc=e,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(e){let t=this.inertDocument.createElement("template");return t.innerHTML=$0(e),t}};function H6(){try{return!!new window.DOMParser().parseFromString($0(""),"text/html")}catch{return!1}}var G6=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function q0(i){return i=String(i),i.match(G6)?i:"unsafe:"+i}function Pa(i){let e={};for(let t of i.split(","))e[t]=!0;return e}function Xf(...i){let e={};for(let t of i)for(let n in t)t.hasOwnProperty(n)&&(e[n]=!0);return e}var Ik=Pa("area,br,col,hr,img,wbr"),Tk=Pa("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),Dk=Pa("rp,rt"),j6=Xf(Dk,Tk),W6=Xf(Tk,Pa("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")),$6=Xf(Dk,Pa("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")),kA=Xf(Ik,W6,$6,j6),Pk=Pa("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),q6=Pa("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"),Y6=Pa("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"),X6=Xf(Pk,q6,Y6),Z6=Pa("script,style,template"),xM=class{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(e){let t=e.firstChild,n=!0,r=[];for(;t;){if(t.nodeType===Node.ELEMENT_NODE?n=this.startElement(t):t.nodeType===Node.TEXT_NODE?this.chars(t.nodeValue):this.sanitizedSomething=!0,n&&t.firstChild){r.push(t),t=J6(t);continue}for(;t;){t.nodeType===Node.ELEMENT_NODE&&this.endElement(t);let o=K6(t);if(o){t=o;break}t=r.pop()}}return this.buf.join("")}startElement(e){let t=LA(e).toLowerCase();if(!kA.hasOwnProperty(t))return this.sanitizedSomething=!0,!Z6.hasOwnProperty(t);this.buf.push("<"),this.buf.push(t);let n=e.attributes;for(let r=0;r"),!0}endElement(e){let t=LA(e).toLowerCase();kA.hasOwnProperty(t)&&!Ik.hasOwnProperty(t)&&(this.buf.push(""))}chars(e){this.buf.push(FA(e))}};function Q6(i,e){return(i.compareDocumentPosition(e)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function K6(i){let e=i.nextSibling;if(e&&i!==e.previousSibling)throw Ok(e);return e}function J6(i){let e=i.firstChild;if(e&&Q6(i,e))throw Ok(e);return e}function LA(i){let e=i.nodeName;return typeof e=="string"?e:"FORM"}function Ok(i){return new Error(`Failed to sanitize html because the element is clobbered: ${i.outerHTML}`)}var e$=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,t$=/([^\#-~ |!])/g;function FA(i){return i.replace(/&/g,"&").replace(e$,function(e){let t=e.charCodeAt(0),n=e.charCodeAt(1);return"&#"+((t-55296)*1024+(n-56320)+65536)+";"}).replace(t$,function(e){return"&#"+e.charCodeAt(0)+";"}).replace(//g,">")}var Xv;function Rk(i,e){let t=null;try{Xv=Xv||U6(i);let n=e?String(e):"";t=Xv.getInertBodyElement(n);let r=5,o=n;do{if(r===0)throw new Error("Failed to sanitize html because the input is unstable");r--,n=o,o=t.innerHTML,t=Xv.getInertBodyElement(n)}while(n!==o);let a=new xM().sanitizeChildren(BA(t)||t);return $0(a)}finally{if(t){let n=BA(t)||t;for(;n.firstChild;)n.removeChild(n.firstChild)}}}function BA(i){return"content"in i&&n$(i)?i.content:null}function n$(i){return i.nodeType===Node.ELEMENT_NODE&&i.nodeName==="TEMPLATE"}var Fr=function(i){return i[i.NONE=0]="NONE",i[i.HTML=1]="HTML",i[i.STYLE=2]="STYLE",i[i.SCRIPT=3]="SCRIPT",i[i.URL=4]="URL",i[i.RESOURCE_URL=5]="RESOURCE_URL",i}(Fr||{});function ME(i){let e=i$();return e?e.sanitize(Fr.URL,i)||"":Ql(i,"URL")?Hs(i):q0(As(i))}function i$(){let i=jt();return i&&i[Fs].sanitizer}var r$=/^>|^->||--!>|)/g,s$="\u200B$1\u200B";function a$(i){return i.replace(r$,e=>e.replace(o$,s$))}function Ak(i){return i.ownerDocument.defaultView}function Y0(i){return i.ownerDocument}function Nk(i){return i instanceof Function?i():i}function kk(i){return(i??te(vt)).get(Da)==="browser"}var Ia=function(i){return i[i.Important=1]="Important",i[i.DashCase=2]="DashCase",i}(Ia||{}),c$;function EE(i,e){return c$(i,e)}function Gu(i,e,t,n,r){if(n!=null){let o,s=!1;Ta(n)?o=n:Mc(n)&&(s=!0,n=n[zs]);let a=Bs(n);i===0&&t!==null?r==null?zk(e,t,a):m0(e,t,a,r||null,!0):i===1&&t!==null?m0(e,t,a,r||null,!0):i===2?C$(e,a,s):i===3&&e.destroyNode(a),o!=null&&M$(e,i,o,t,r)}}function l$(i,e){return i.createText(e)}function d$(i,e,t){i.setValue(e,t)}function u$(i,e){return i.createComment(a$(e))}function Lk(i,e,t){return i.createElement(e,t)}function h$(i,e){Fk(i,e),e[zs]=null,e[to]=null}function p$(i,e,t,n,r,o){n[zs]=r,n[to]=e,Q0(i,n,t,1,r,o)}function Fk(i,e){e[Fs].changeDetectionScheduler?.notify(8),Q0(i,e,e[ai],2,null,null)}function f$(i){let e=i[zf];if(!e)return US(i[Gt],i);for(;e;){let t=null;if(Mc(e))t=e[zf];else{let n=e[fr];n&&(t=n)}if(!t){for(;e&&!e[ds]&&e!==i;)Mc(e)&&US(e[Gt],e),e=e[mr];e===null&&(e=i),Mc(e)&&US(e[Gt],e),t=e&&e[ds]}e=t}}function m$(i,e,t,n){let r=fr+n,o=t.length;n>0&&(t[r-1][ds]=e),n0&&(i[t-1][ds]=n[ds]);let o=a0(i,fr+e);h$(n[Gt],n);let s=o[Sa];s!==null&&s.detachView(o[Gt]),n[mr]=null,n[ds]=null,n[Rt]&=-129}return n}function X0(i,e){if(!(e[Rt]&256)){let t=e[ai];t.destroyNode&&Q0(i,e,t,3,null,null),f$(e)}}function US(i,e){if(e[Rt]&256)return;let t=ln(null);try{e[Rt]&=-129,e[Rt]|=256,e[Ao]&&mv(e[Ao]),_$(i,e),g$(i,e),e[Gt].type===1&&e[ai].destroy();let n=e[zl];if(n!==null&&Ta(e[mr])){n!==e[mr]&&IE(n,e);let r=e[Sa];r!==null&&r.detachView(i)}R6(e)}finally{ln(t)}}function g$(i,e){let t=i.cleanup,n=e[l0];if(t!==null)for(let o=0;o=0?n[s]():n[-s].unsubscribe(),o+=2}else{let s=n[t[o+1]];t[o].call(s)}n!==null&&(e[l0]=null);let r=e[Sc];if(r!==null){e[Sc]=null;for(let o=0;o-1){let{encapsulation:o}=i.data[n.directiveStart+r];if(o===Ls.None||o===Ls.Emulated)return null}return ko(n,t)}}function m0(i,e,t,n,r){i.insertBefore(e,t,n,r)}function zk(i,e,t){i.appendChild(e,t)}function VA(i,e,t,n,r){n!==null?m0(i,e,t,n,r):zk(i,e,t)}function b$(i,e,t,n){i.removeChild(e,t,n)}function TE(i,e){return i.parentNode(e)}function y$(i,e){return i.nextSibling(e)}function Uk(i,e,t){return w$(i,e,t)}function x$(i,e,t){return i.type&40?ko(i,t):null}var w$=x$,zA;function Z0(i,e,t,n){let r=Vk(i,n,e),o=e[ai],s=n.parent||e[to],a=Uk(s,n,e);if(r!=null)if(Array.isArray(t))for(let c=0;cAr&&$k(i,e,Ar,!1),Ns(s?2:0,r),t(n,r)}finally{Gl(o),Ns(s?3:1,r)}}function OE(i,e,t){if(pE(e)){let n=ln(null);try{let r=e.directiveStart,o=e.directiveEnd;for(let s=r;snull;function N$(i,e,t,n){let r=t2(e);r.push(t),i.firstCreatePass&&n2(i).push(n,r.length-1)}function k$(i,e,t,n,r,o){let s=e?e.injectorIndex:-1,a=0;return WN()&&(a|=128),{type:t,index:n,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:r,attrs:o,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs: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}}function UA(i,e,t,n,r){for(let o in e){if(!e.hasOwnProperty(o))continue;let s=e[o];if(s===void 0)continue;n??={};let a,c=Ec.None;Array.isArray(s)?(a=s[0],c=s[1]):a=s;let l=o;if(r!==null){if(!r.hasOwnProperty(o))continue;l=r[o]}i===0?HA(n,t,l,a,c):HA(n,t,l,a)}return n}function HA(i,e,t,n,r){let o;i.hasOwnProperty(t)?(o=i[t]).push(e,n):o=i[t]=[e,n],r!==void 0&&o.push(r)}function L$(i,e,t){let n=e.directiveStart,r=e.directiveEnd,o=i.data,s=e.attrs,a=[],c=null,l=null;for(let d=n;d0;){let t=i[--e];if(typeof t=="number"&&t<0)return t}return 0}function U$(i,e,t,n){let r=t.directiveStart,o=t.directiveEnd;L0(t)&&Y$(e,t,i.data[r+t.componentOffset]),i.firstCreatePass||f0(t,e),Dc(n,e);let s=t.initialInputs;for(let a=r;a{B0(i.lView)},consumerOnSignalRead(){this.lView[Ao]=this}});function a9(i){let e=i[Ao]??Object.create(c9);return e.lView=i,e}var c9=yt(Z({},Tu),{consumerIsAlwaysLive:!0,consumerMarkedDirty:i=>{let e=Hl(i.lView);for(;e&&!c2(e[Gt]);)e=Hl(e);e&&UN(e)},consumerOnSignalRead(){this.lView[Ao]=this}});function c2(i){return i.type!==2}var l9=100;function l2(i,e=!0,t=0){let n=i[Fs],r=n.rendererFactory,o=!1;o||r.begin?.();try{d9(i,t)}catch(s){throw e&&r2(i,s),s}finally{o||(r.end?.(),n.inlineEffectRunner?.flush())}}function d9(i,e){let t=qN();try{TA(!0),MM(i,e);let n=0;for(;Uf(i);){if(n===l9)throw new Oe(103,!1);n++,MM(i,1)}}finally{TA(t)}}function u9(i,e,t,n){let r=e[Rt];if((r&256)===256)return;let o=!1,s=!1;!o&&e[Fs].inlineEffectRunner?.flush(),yE(e);let a=!0,c=null,l=null;o||(c2(i)?(l=i9(e),c=Sf(l)):IR()===null?(a=!1,l=a9(e),c=Sf(l)):e[Ao]&&(mv(e[Ao]),e[Ao]=null));try{zN(e),n6(i.bindingStartIndex),t!==null&&Xk(i,e,t,2,n);let d=(r&3)===3;if(!o)if(d){let p=i.preOrderCheckHooks;p!==null&&e0(e,p,null)}else{let p=i.preOrderHooks;p!==null&&t0(e,p,0,null),FS(e,0)}if(s||h9(e),d2(e,0),i.contentQueries!==null&&e2(i,e),!o)if(d){let p=i.contentCheckHooks;p!==null&&e0(e,p)}else{let p=i.contentHooks;p!==null&&t0(e,p,1),FS(e,1)}T$(i,e);let u=i.components;u!==null&&h2(e,u,0);let h=i.viewQuery;if(h!==null&&SM(2,h,n),!o)if(d){let p=i.viewCheckHooks;p!==null&&e0(e,p)}else{let p=i.viewHooks;p!==null&&t0(e,p,2),FS(e,2)}if(i.firstUpdatePass===!0&&(i.firstUpdatePass=!1),e[Jv]){for(let p of e[Jv])p();e[Jv]=null}o||(e[Rt]&=-73)}catch(d){throw o||B0(e),d}finally{l!==null&&(pv(l,c),a&&o9(l)),xE()}}function d2(i,e){for(let t=_k(i);t!==null;t=vk(t))for(let n=fr;n-1&&(Hf(e,n),a0(t,n))}this._attachedToViewContainer=!1}X0(this._lView[Gt],this._lView)}onDestroy(e){HN(this._lView,e)}markForCheck(){zE(this._cdRefInjectingView||this._lView,4)}detach(){this._lView[Rt]&=-129}reattach(){oM(this._lView),this._lView[Rt]|=128}detectChanges(){this._lView[Rt]|=1024,l2(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new Oe(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let e=iM(this._lView),t=this._lView[zl];t!==null&&!e&&IE(t,this._lView),Fk(this._lView[Gt],this._lView)}attachToAppRef(e){if(this._attachedToViewContainer)throw new Oe(902,!1);this._appRef=e;let t=iM(this._lView),n=this._lView[zl];n!==null&&!t&&Bk(n,this._lView),oM(this._lView)}},Wn=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=g9;let i=e;return i})(),f9=Wn,m9=class extends f9{constructor(e,t,n){super(),this._declarationLView=e,this._declarationTContainer=t,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(e,t){return this.createEmbeddedViewImpl(e,t)}createEmbeddedViewImpl(e,t,n){let r=Zf(this._declarationLView,this._declarationTContainer,e,{embeddedViewInjector:t,dehydratedView:n});return new $l(r)}};function g9(){return eb(Qi(),jt())}function eb(i,e){return i.type&4?new m9(e,i,oh(i,e)):null}var UEe=new RegExp(`^(\\d+)*(${L6}|${k6})*(.*)`);var _9=()=>null;function Ju(i,e){return _9(i,e)}var eh=class{},UE=new me("",{providedIn:"root",factory:()=>!1});var p2=new me(""),EM=class{},_0=class{};function v9(i){let e=Error(`No component factory found for ${Rr(i)}.`);return e[b9]=i,e}var b9="ngComponent";var IM=class{resolveComponentFactory(e){throw v9(e)}},KE=class KE{};KE.NULL=new IM;var us=KE,Pc=class{},Kl=(()=>{let e=class e{constructor(){this.destroyNode=null}};e.__NG_ELEMENT_ID__=()=>y9();let i=e;return i})();function y9(){let i=jt(),e=Qi(),t=Rc(e.index,i);return(Mc(t)?t:i)[ai]}var x9=(()=>{let e=class e{};e.\u0275prov=J({token:e,providedIn:"root",factory:()=>null});let i=e;return i})();var GA=new Set;function Lo(i){GA.has(i)||(GA.add(i),performance?.mark?.("mark_feature_usage",{detail:{feature:i}}))}function f2(i){let e=!0;return setTimeout(()=>{e&&(e=!1,i())}),typeof Lf.requestAnimationFrame=="function"&&Lf.requestAnimationFrame(()=>{e&&(e=!1,i())}),()=>{e=!1}}function jA(i){let e=!0;return queueMicrotask(()=>{e&&i()}),()=>{e=!1}}function WA(...i){}var Fe=class i{constructor({enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:t=!1,shouldCoalesceRunChangeDetection:n=!1}){if(this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Ie(!1),this.onMicrotaskEmpty=new Ie(!1),this.onStable=new Ie(!1),this.onError=new Ie(!1),typeof Zone>"u")throw new Oe(908,!1);Zone.assertZonePatched();let r=this;r._nesting=0,r._outer=r._inner=Zone.current,Zone.TaskTrackingZoneSpec&&(r._inner=r._inner.fork(new Zone.TaskTrackingZoneSpec)),e&&Zone.longStackTraceZoneSpec&&(r._inner=r._inner.fork(Zone.longStackTraceZoneSpec)),r.shouldCoalesceEventChangeDetection=!n&&t,r.shouldCoalesceRunChangeDetection=n,r.callbackScheduled=!1,S9(r)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get("isAngularZone")===!0}static assertInAngularZone(){if(!i.isInAngularZone())throw new Oe(909,!1)}static assertNotInAngularZone(){if(i.isInAngularZone())throw new Oe(909,!1)}run(e,t,n){return this._inner.run(e,t,n)}runTask(e,t,n,r){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,e,w9,WA,WA);try{return o.runTask(s,t,n)}finally{o.cancelTask(s)}}runGuarded(e,t,n){return this._inner.runGuarded(e,t,n)}runOutsideAngular(e){return this._outer.run(e)}},w9={};function HE(i){if(i._nesting==0&&!i.hasPendingMicrotasks&&!i.isStable)try{i._nesting++,i.onMicrotaskEmpty.emit(null)}finally{if(i._nesting--,!i.hasPendingMicrotasks)try{i.runOutsideAngular(()=>i.onStable.emit(null))}finally{i.isStable=!0}}}function C9(i){i.isCheckStableRunning||i.callbackScheduled||(i.callbackScheduled=!0,Zone.root.run(()=>{f2(()=>{i.callbackScheduled=!1,TM(i),i.isCheckStableRunning=!0,HE(i),i.isCheckStableRunning=!1})}),TM(i))}function S9(i){let e=()=>{C9(i)};i._inner=i._inner.fork({name:"angular",properties:{isAngularZone:!0},onInvokeTask:(t,n,r,o,s,a)=>{if(M9(a))return t.invokeTask(r,o,s,a);try{return $A(i),t.invokeTask(r,o,s,a)}finally{(i.shouldCoalesceEventChangeDetection&&o.type==="eventTask"||i.shouldCoalesceRunChangeDetection)&&e(),qA(i)}},onInvoke:(t,n,r,o,s,a,c)=>{try{return $A(i),t.invoke(r,o,s,a,c)}finally{i.shouldCoalesceRunChangeDetection&&!i.callbackScheduled&&!E9(a)&&e(),qA(i)}},onHasTask:(t,n,r,o)=>{t.hasTask(r,o),n===r&&(o.change=="microTask"?(i._hasPendingMicrotasks=o.microTask,TM(i),HE(i)):o.change=="macroTask"&&(i.hasPendingMacrotasks=o.macroTask))},onHandleError:(t,n,r,o)=>(t.handleError(r,o),i.runOutsideAngular(()=>i.onError.emit(o)),!1)})}function TM(i){i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&i.callbackScheduled===!0?i.hasPendingMicrotasks=!0:i.hasPendingMicrotasks=!1}function $A(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function qA(i){i._nesting--,HE(i)}var DM=class{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Ie,this.onMicrotaskEmpty=new Ie,this.onStable=new Ie,this.onError=new Ie}run(e,t,n){return e.apply(t,n)}runGuarded(e,t,n){return e.apply(t,n)}runOutsideAngular(e){return e()}runTask(e,t,n,r){return e.apply(t,n)}};function M9(i){return m2(i,"__ignore_ng_zone__")}function E9(i){return m2(i,"__scheduler_tick__")}function m2(i,e){return!Array.isArray(i)||i.length!==1?!1:i[0]?.data?.[e]===!0}var Or=function(i){return i[i.EarlyRead=0]="EarlyRead",i[i.Write=1]="Write",i[i.MixedReadWrite=2]="MixedReadWrite",i[i.Read=3]="Read",i}(Or||{}),g2={destroy(){}};function Kf(i,e){!e&&ih(Kf);let t=e?.injector??te(vt);return kk(t)?(Lo("NgAfterRender"),_2(i,t,!1,e?.phase??Or.MixedReadWrite)):g2}function Hi(i,e){!e&&ih(Hi);let t=e?.injector??te(vt);return kk(t)?(Lo("NgAfterNextRender"),_2(i,t,!0,e?.phase??Or.MixedReadWrite)):g2}function I9(i,e){if(i instanceof Function)switch(e){case Or.EarlyRead:return{earlyRead:i};case Or.Write:return{write:i};case Or.MixedReadWrite:return{mixedReadWrite:i};case Or.Read:return{read:i}}return i}function _2(i,e,t,n){let r=I9(i,n),o=e.get(GE),s=o.handler??=new OM,a=[],c=[],l=()=>{for(let p of c)s.unregister(p);d()},d=e.get(Fi).onDestroy(l),u=0,h=(p,f)=>{if(!f)return;let m=t?(...g)=>(u--,u<1&&l(),f(...g)):f,y=Vs(e,()=>new PM(p,a,m));s.register(y),c.push(y),u++};return h(Or.EarlyRead,r.earlyRead),h(Or.Write,r.write),h(Or.MixedReadWrite,r.mixedReadWrite),h(Or.Read,r.read),{destroy:l}}var PM=class{constructor(e,t,n){this.phase=e,this.pipelinedArgs=t,this.callbackFn=n,this.zone=te(Fe),this.errorHandler=te(Nr,{optional:!0}),te(eh,{optional:!0})?.notify(6)}invoke(){try{let e=this.zone.runOutsideAngular(()=>this.callbackFn.apply(null,this.pipelinedArgs));this.pipelinedArgs.splice(0,this.pipelinedArgs.length,e)}catch(e){this.errorHandler?.handleError(e)}}},OM=class{constructor(){this.executingCallbacks=!1,this.buckets={[Or.EarlyRead]:new Set,[Or.Write]:new Set,[Or.MixedReadWrite]:new Set,[Or.Read]:new Set},this.deferredCallbacks=new Set}register(e){(this.executingCallbacks?this.deferredCallbacks:this.buckets[e.phase]).add(e)}unregister(e){this.buckets[e.phase].delete(e),this.deferredCallbacks.delete(e)}execute(){this.executingCallbacks=!0;for(let e of Object.values(this.buckets))for(let t of e)t.invoke();this.executingCallbacks=!1;for(let e of this.deferredCallbacks)this.buckets[e.phase].add(e);this.deferredCallbacks.clear()}destroy(){for(let e of Object.values(this.buckets))e.clear();this.deferredCallbacks.clear()}},GE=(()=>{let e=class e{constructor(){this.handler=null,this.internalCallbacks=[]}execute(){this.executeInternalCallbacks(),this.handler?.execute()}executeInternalCallbacks(){let n=[...this.internalCallbacks];this.internalCallbacks.length=0;for(let r of n)r()}ngOnDestroy(){this.handler?.destroy(),this.handler=null,this.internalCallbacks.length=0}};e.\u0275prov=J({token:e,providedIn:"root",factory:()=>new e});let i=e;return i})();function v0(i,e,t){let n=t?i.styles:null,r=t?i.classes:null,o=0;if(e!==null)for(let s=0;s0&&jk(i,t,o.join(" "))}}function N9(i,e,t){let n=i.projection=[];for(let r=0;r{let e=class e{};e.__NG_ELEMENT_ID__=L9;let i=e;return i})();function L9(){let i=Qi();return b2(i,jt())}var F9=Zt,v2=class extends F9{constructor(e,t,n){super(),this._lContainer=e,this._hostTNode=t,this._hostLView=n}get element(){return oh(this._hostTNode,this._hostLView)}get injector(){return new Vl(this._hostTNode,this._hostLView)}get parentInjector(){let e=wE(this._hostTNode,this._hostLView);if(ik(e)){let t=p0(e,this._hostLView),n=h0(e),r=t[Gt].data[n+8];return new Vl(r,t)}else return new Vl(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(e){let t=XA(this._lContainer);return t!==null&&t[e]||null}get length(){return this._lContainer.length-fr}createEmbeddedView(e,t,n){let r,o;typeof n=="number"?r=n:n!=null&&(r=n.index,o=n.injector);let s=Ju(this._lContainer,e.ssrId),a=e.createEmbeddedViewImpl(t||{},o,s);return this.insertImpl(a,r,Ku(this._hostTNode,s)),a}createComponent(e,t,n,r,o){let s=e&&!BW(e),a;if(s)a=t;else{let f=t||{};a=f.index,n=f.injector,r=f.projectableNodes,o=f.environmentInjector||f.ngModuleRef}let c=s?e:new th(Ic(e)),l=n||this.parentInjector;if(!o&&c.ngModule==null){let m=(s?l:this.parentInjector).get(Xi,null);m&&(o=m)}let d=Ic(c.componentType??{}),u=Ju(this._lContainer,d?.id??null),h=u?.firstChild??null,p=c.create(l,r,h,o);return this.insertImpl(p.hostView,a,Ku(this._hostTNode,u)),p}insert(e,t){return this.insertImpl(e,t,!0)}insertImpl(e,t,n){let r=e._lView;if($W(r)){let a=this.indexOf(e);if(a!==-1)this.detach(a);else{let c=r[mr],l=new v2(c,c[to],c[mr]);l.detach(l.indexOf(e))}}let o=this._adjustIndex(t),s=this._lContainer;return Qf(s,r,o,n),e.attachToViewContainerRef(),gN(HS(s),o,e),e}move(e,t){return this.insert(e,t)}indexOf(e){let t=XA(this._lContainer);return t!==null?t.indexOf(e):-1}remove(e){let t=this._adjustIndex(e,-1),n=Hf(this._lContainer,t);n&&(a0(HS(this._lContainer),t),X0(n[Gt],n))}detach(e){let t=this._adjustIndex(e,-1),n=Hf(this._lContainer,t);return n&&a0(HS(this._lContainer),t)!=null?new $l(n):null}_adjustIndex(e,t=0){return e??this.length+t}};function XA(i){return i[d0]}function HS(i){return i[d0]||(i[d0]=[])}function b2(i,e){let t,n=e[i.index];return Ta(n)?t=n:(t=Jk(n,e,null,i),e[i.index]=t,J0(e,t)),V9(t,e,i,n),new v2(t,i,e)}function B9(i,e){let t=i[ai],n=t.createComment(""),r=ko(e,i),o=TE(t,r);return m0(t,o,n,y$(t,r),!1),n}var V9=H9,z9=()=>!1;function U9(i,e,t){return z9(i,e,t)}function H9(i,e,t,n){if(i[Ul])return;let r;t.type&8?r=Bs(n):r=B9(e,t),i[Ul]=r}var AM=class i{constructor(e){this.queryList=e,this.matches=null}clone(){return new i(this.queryList)}setDirty(){this.queryList.setDirty()}},NM=class i{constructor(e=[]){this.queries=e}createEmbeddedView(e){let t=e.queries;if(t!==null){let n=e.contentQueries!==null?e.contentQueries[0]:t.length,r=[];for(let o=0;o0)n.push(s[a/2]);else{let l=o[a+1],d=e[-c];for(let u=fr;ue.trim())}function C2(i,e,t){i.queries===null&&(i.queries=new kM),i.queries.track(new LM(e,t))}function X9(i,e){let t=i.contentQueries||(i.contentQueries=[]),n=t.length?t[t.length-1]:-1;e!==n&&t.push(i.queries.length-1,e)}function WE(i,e){return i.queries.getByIndex(e)}function S2(i,e){let t=i[Gt],n=WE(t,e);return n.crossesNgTemplate?FM(t,i,e,[]):y2(t,i,n,e)}function $E(i){return typeof i=="function"&&i[Do]!==void 0}function ct(i,e){Lo("NgSignals");let t=BR(i),n=t[Do];return e?.equal&&(n.equal=e.equal),t.set=r=>gS(n,r),t.update=r=>VR(n,r),t.asReadonly=Z9.bind(t),t}function Z9(){let i=this[Do];if(i.readonlyFn===void 0){let e=()=>this();e[Do]=i,i.readonlyFn=e}return i.readonlyFn}function M2(i,e){let t,n=mS(()=>{t._dirtyCounter();let r=e7(t,i);if(e&&r===void 0)throw new Oe(-951,!1);return r});return t=n[Do],t._dirtyCounter=ct(0),t._flatValue=void 0,n}function Q9(){return M2(!0,!1)}function K9(){return M2(!0,!0)}function J9(i,e){let t=i[Do];t._lView=jt(),t._queryIndex=e,t._queryList=jE(t._lView,e),t._queryList.onDirty(()=>t._dirtyCounter.update(n=>n+1))}function e7(i,e){let t=i._lView,n=i._queryIndex;if(t===void 0||n===void 0||t[Rt]&4)return e?void 0:Pr;let r=jE(t,n),o=S2(t,n);return r.reset(o,fk),e?r.first:r._changesDetected||i._flatValue===void 0?i._flatValue=r.toArray():i._flatValue}function ZA(i,e){return Q9()}function t7(i,e){return K9()}var E2=(ZA.required=t7,ZA);function n7(i){return Object.getPrototypeOf(i.prototype).constructor}function sn(i){let e=n7(i.type),t=!0,n=[i];for(;e;){let r;if(Ma(i))r=e.\u0275cmp||e.\u0275dir;else{if(e.\u0275cmp)throw new Oe(903,!1);r=e.\u0275dir}if(r){if(t){n.push(r);let s=i;s.inputs=Zv(i.inputs),s.inputTransforms=Zv(i.inputTransforms),s.declaredInputs=Zv(i.declaredInputs),s.outputs=Zv(i.outputs);let a=r.hostBindings;a&&a7(i,a);let c=r.viewQuery,l=r.contentQueries;if(c&&o7(i,c),l&&s7(i,l),i7(i,r),U8(i.outputs,r.outputs),Ma(r)&&r.data.animation){let d=i.data;d.animation=(d.animation||[]).concat(r.data.animation)}}let o=r.features;if(o)for(let s=0;s=0;n--){let r=i[n];r.hostVars=e+=r.hostVars,r.hostAttrs=Bf(r.hostAttrs,t=Bf(t,r.hostAttrs))}}function Zv(i){return i===Ca?{}:i===Pr?[]:i}function o7(i,e){let t=i.viewQuery;t?i.viewQuery=(n,r)=>{e(n,r),t(n,r)}:i.viewQuery=e}function s7(i,e){let t=i.contentQueries;t?i.contentQueries=(n,r,o)=>{e(n,r,o),t(n,r,o)}:i.contentQueries=e}function a7(i,e){let t=i.hostBindings;t?i.hostBindings=(n,r)=>{e(n,r),t(n,r)}:i.hostBindings=e}function I2(i){let e=t=>{let n=(Array.isArray(i)?i:i()).map(r=>typeof r=="function"?{directive:Yi(r),inputs:Ca,outputs:Ca}:{directive:Yi(r.directive),inputs:QA(r.inputs),outputs:QA(r.outputs)});t.hostDirectives===null?(t.findHostDirectiveDefs=T2,t.hostDirectives=n):t.hostDirectives.unshift(...n)};return e.ngInherit=!0,e}function T2(i,e,t){if(i.hostDirectives!==null)for(let n of i.hostDirectives){let r=dE(n.directive);c7(r.declaredInputs,n.inputs),T2(r,e,t),t.set(r,n),e.push(r)}}function QA(i){if(i===void 0||i.length===0)return Ca;let e={};for(let t=0;tt()),this.destroyCbs=null}onDestroy(e){this.destroyCbs.push(e)}},VM=class extends Gf{constructor(e){super(),this.moduleType=e}create(e){return new BM(this.moduleType,e,[])}};var x0=class extends Oc{constructor(e){super(),this.componentFactoryResolver=new b0(this),this.instance=null;let t=new Vf([...e.providers,{provide:Oc,useValue:this},{provide:us,useValue:this.componentFactoryResolver}],e.parent||N0(),e.debugName,new Set(["environment"]));this.injector=t,e.runEnvironmentInitializers&&t.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(e){this.injector.onDestroy(e)}};function qE(i,e,t=null){return new x0({providers:i,parent:e,debugName:t,runEnvironmentInitializers:!0}).injector}function D2(i){return d7(i)?Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i:!1}function l7(i,e){if(Array.isArray(i))for(let t=0;t>17&32767}function b7(i){return(i&2)==2}function y7(i,e){return i&131071|e<<17}function UM(i){return i|2}function nh(i){return(i&131068)>>2}function GS(i,e){return i&-131069|e<<2}function x7(i){return(i&1)===1}function HM(i){return i|1}function w7(i,e,t,n,r,o){let s=o?e.classBindings:e.styleBindings,a=ql(s),c=nh(s);i[n]=t;let l=!1,d;if(Array.isArray(t)){let u=t;d=u[1],(d===null||$f(u,d)>0)&&(l=!0)}else d=t;if(r)if(c!==0){let h=ql(i[a+1]);i[n+1]=Qv(h,a),h!==0&&(i[h+1]=GS(i[h+1],n)),i[a+1]=y7(i[a+1],n)}else i[n+1]=Qv(a,0),a!==0&&(i[a+1]=GS(i[a+1],n)),a=n;else i[n+1]=Qv(c,0),a===0?a=n:i[c+1]=GS(i[c+1],n),c=n;l&&(i[n+1]=UM(i[n+1])),KA(i,d,n,!0),KA(i,d,n,!1),C7(e,d,i,n,o),s=Qv(a,c),o?e.classBindings=s:e.styleBindings=s}function C7(i,e,t,n,r){let o=r?i.residualClasses:i.residualStyles;o!=null&&typeof e=="string"&&$f(o,e)>=0&&(t[n+1]=HM(t[n+1]))}function KA(i,e,t,n){let r=i[t+1],o=e===null,s=n?ql(r):nh(r),a=!1;for(;s!==0&&(a===!1||o);){let c=i[s],l=i[s+1];S7(c,e)&&(a=!0,i[s+1]=n?HM(l):UM(l)),s=n?ql(l):nh(l)}a&&(i[t+1]=n?UM(r):HM(r))}function S7(i,e){return i===null||e==null||(Array.isArray(i)?i[1]:i)===e?!0:Array.isArray(i)&&typeof e=="string"?$f(i,e)>=0:!1}var ls={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function M7(i){return i.substring(ls.key,ls.keyEnd)}function E7(i){return I7(i),R2(i,A2(i,0,ls.textEnd))}function R2(i,e){let t=ls.textEnd;return t===e?-1:(e=ls.keyEnd=T7(i,ls.key=e,t),A2(i,e,t))}function I7(i){ls.key=0,ls.keyEnd=0,ls.value=0,ls.valueEnd=0,ls.textEnd=i.length}function A2(i,e,t){for(;e32;)e++;return e}function R(i,e,t){let n=jt(),r=Xl();if(No(n,r,e)){let o=ci(),s=U0();kE(o,s,n,i,e,n[ai],t,!1)}return R}function GM(i,e,t,n,r){let o=e.inputs,s=r?"class":"style";FE(i,t,o[s],s,n)}function Jt(i,e,t){return k2(i,e,t,!1),Jt}function re(i,e){return k2(i,e,null,!0),re}function Vr(i){L2(N7,N2,i,!0)}function N2(i,e){for(let t=E7(e);t>=0;t=R2(e,t))O0(i,M7(e),!0)}function k2(i,e,t,n){let r=jt(),o=ci(),s=V0(2);if(o.firstUpdatePass&&B2(o,i,s,n),e!==Br&&No(r,s,e)){let a=o.data[Us()];V2(o,a,r,r[ai],i,r[s+1]=L7(e,t),n,s)}}function L2(i,e,t,n){let r=ci(),o=V0(2);r.firstUpdatePass&&B2(r,null,o,n);let s=jt();if(t!==Br&&No(s,o,t)){let a=r.data[Us()];if(z2(a,n)&&!F2(r,o)){let c=n?a.classesWithoutHost:a.stylesWithoutHost;c!==null&&(t=XS(c,t||"")),GM(r,a,s,t,n)}else k7(r,a,s,s[ai],s[o+1],s[o+1]=A7(i,e,t),n,o)}}function F2(i,e){return e>=i.expandoStartIndex}function B2(i,e,t,n){let r=i.data;if(r[t+1]===null){let o=r[Us()],s=F2(i,t);z2(o,n)&&e===null&&!s&&(e=!1),e=D7(r,o,e,n),w7(r,o,e,t,s,n)}}function D7(i,e,t,n){let r=vE(i),o=n?e.residualClasses:e.residualStyles;if(r===null)(n?e.classBindings:e.styleBindings)===0&&(t=jS(null,i,e,t,n),t=jf(t,e.attrs,n),o=null);else{let s=e.directiveStylingLast;if(s===-1||i[s]!==r)if(t=jS(r,i,e,t,n),o===null){let c=P7(i,e,n);c!==void 0&&Array.isArray(c)&&(c=jS(null,i,e,c[1],n),c=jf(c,e.attrs,n),O7(i,e,n,c))}else o=R7(i,e,n)}return o!==void 0&&(n?e.residualClasses=o:e.residualStyles=o),t}function P7(i,e,t){let n=t?e.classBindings:e.styleBindings;if(nh(n)!==0)return i[ql(n)]}function O7(i,e,t,n){let r=t?e.classBindings:e.styleBindings;i[ql(r)]=n}function R7(i,e,t){let n,r=e.directiveEnd;for(let o=1+e.directiveStylingLast;o0;){let c=i[r],l=Array.isArray(c),d=l?c[1]:c,u=d===null,h=t[r+1];h===Br&&(h=u?Pr:void 0);let p=u?kS(h,n):d===n?h:void 0;if(l&&!C0(p)&&(p=kS(c,n)),C0(p)&&(a=p,s))return a;let f=i[r+1];r=s?ql(f):nh(f)}if(e!==null){let c=o?e.residualClasses:e.residualStyles;c!=null&&(a=kS(c,n))}return a}function C0(i){return i!==void 0}function L7(i,e){return i==null||i===""||(typeof e=="string"?i=i+e:typeof i=="object"&&(i=Rr(Hs(i)))),i}function z2(i,e){return(i.flags&(e?8:16))!==0}function U2(i,e,t){let n=jt(),r=O2(n,i,e,t);L2(O0,N2,r,!0)}var jM=class{destroy(e){}updateValue(e,t){}swap(e,t){let n=Math.min(e,t),r=Math.max(e,t),o=this.detach(r);if(r-n>1){let s=this.detach(n);this.attach(n,o),this.attach(r,s)}else this.attach(n,o)}move(e,t){this.attach(t,this.detach(e))}};function WS(i,e,t,n,r){return i===t&&Object.is(e,n)?1:Object.is(r(i,e),r(t,n))?-1:0}function F7(i,e,t){let n,r,o=0,s=i.length-1,a=void 0;if(Array.isArray(e)){let c=e.length-1;for(;o<=s&&o<=c;){let l=i.at(o),d=e[o],u=WS(o,l,o,d,t);if(u!==0){u<0&&i.updateValue(o,d),o++;continue}let h=i.at(s),p=e[c],f=WS(s,h,c,p,t);if(f!==0){f<0&&i.updateValue(s,p),s--,c--;continue}let m=t(o,l),y=t(s,h),g=t(o,d);if(Object.is(g,y)){let _=t(c,p);Object.is(_,m)?(i.swap(o,s),i.updateValue(s,p),c--,s--):i.move(s,o),i.updateValue(o,d),o++;continue}if(n??=new S0,r??=tN(i,o,s,t),WM(i,n,o,g))i.updateValue(o,d),o++,s++;else if(r.has(g))n.set(m,i.detach(o)),s--;else{let _=i.create(o,e[o]);i.attach(o,_),o++,s++}}for(;o<=c;)eN(i,n,t,o,e[o]),o++}else if(e!=null){let c=e[Symbol.iterator](),l=c.next();for(;!l.done&&o<=s;){let d=i.at(o),u=l.value,h=WS(o,d,o,u,t);if(h!==0)h<0&&i.updateValue(o,u),o++,l=c.next();else{n??=new S0,r??=tN(i,o,s,t);let p=t(o,u);if(WM(i,n,o,p))i.updateValue(o,u),o++,s++,l=c.next();else if(!r.has(p))i.attach(o,i.create(o,u)),o++,s++,l=c.next();else{let f=t(o,d);n.set(f,i.detach(o)),s--}}}for(;!l.done;)eN(i,n,t,i.length,l.value),l=c.next()}for(;o<=s;)i.destroy(i.detach(s--));n?.forEach(c=>{i.destroy(c)})}function WM(i,e,t,n){return e!==void 0&&e.has(n)?(i.attach(t,e.get(n)),e.delete(n),!0):!1}function eN(i,e,t,n,r){if(WM(i,e,n,t(n,r)))i.updateValue(n,r);else{let o=i.create(n,r);i.attach(n,o)}}function tN(i,e,t,n){let r=new Set;for(let o=e;o<=t;o++)r.add(n(o,i.at(o)));return r}var S0=class{constructor(){this.kvMap=new Map,this._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 n=this.kvMap.get(e);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,t)}else this.kvMap.set(e,t)}forEach(e){for(let[t,n]of this.kvMap)if(e(n,t),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),e(n,t)}}};function oe(i,e){Lo("NgControlFlow");let t=jt(),n=Xl(),r=t[n]!==Br?t[n]:-1,o=r!==-1?M0(t,Ar+r):void 0,s=0;if(No(t,n,i)){let a=ln(null);try{if(o!==void 0&&s2(o,s),i!==-1){let c=Ar+i,l=M0(t,c),d=XM(t[Gt],c),u=Ju(l,d.tView.ssrId),h=Zf(t,d,e,{dehydratedView:u});Qf(l,h,s,Ku(d,u))}}finally{ln(a)}}else if(o!==void 0){let a=o2(o,s);a!==void 0&&(a[pr]=e)}}var $M=class{constructor(e,t,n){this.lContainer=e,this.$implicit=t,this.$index=n}get $count(){return this.lContainer.length-fr}};function tb(i){return i}function gr(i,e){return e}var qM=class{constructor(e,t,n){this.hasEmptyBlock=e,this.trackByFn=t,this.liveCollection=n}};function rn(i,e,t,n,r,o,s,a,c,l,d,u,h){Lo("NgControlFlow");let p=jt(),f=ci(),m=c!==void 0,y=jt(),g=a?s.bind(y[lo][pr]):s,_=new qM(m,g);y[Ar+i]=_,w0(p,f,i+1,e,t,n,r,Tc(f.consts,o)),m&&w0(p,f,i+2,c,l,d,u,Tc(f.consts,h))}var YM=class extends jM{constructor(e,t,n){super(),this.lContainer=e,this.hostLView=t,this.templateTNode=n,this.operationsCounter=void 0,this.needsIndexUpdate=!1}get length(){return this.lContainer.length-fr}at(e){return this.getLView(e)[pr].$implicit}attach(e,t){let n=t[Xu];this.needsIndexUpdate||=e!==this.length,Qf(this.lContainer,t,e,Ku(this.templateTNode,n))}detach(e){return this.needsIndexUpdate||=e!==this.length-1,B7(this.lContainer,e)}create(e,t){let n=Ju(this.lContainer,this.templateTNode.tView.ssrId),r=Zf(this.hostLView,this.templateTNode,new $M(this.lContainer,t,e),{dehydratedView:n});return this.operationsCounter?.recordCreate(),r}destroy(e){X0(e[Gt],e),this.operationsCounter?.recordDestroy()}updateValue(e,t){this.getLView(e)[pr].$implicit=t}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let e=0;e(j0(!0),Lk(n,r,l6()));function H7(i,e,t,n,r){let o=e.consts,s=Tc(o,n),a=sh(e,i,8,"ng-container",s);s!==null&&v0(a,s,!0);let c=Tc(o,r);return LE(e,t,a,c),e.queries!==null&&e.queries.elementStart(e,a),a}function ho(i,e,t){let n=jt(),r=ci(),o=i+Ar,s=r.firstCreatePass?H7(o,r,n,e,t):r.data[o];Yl(s,!0);let a=G7(r,n,s,i);return n[o]=a,G0()&&Z0(r,n,a,s),Dc(a,n),F0(s)&&(RE(r,n,s),OE(r,s,n)),t!=null&&AE(n,s),ho}function po(){let i=Qi(),e=ci();return gE()?_E():(i=i.parent,Yl(i,!1)),e.firstCreatePass&&(W0(e,i),pE(i)&&e.queries.elementEnd(i)),po}function Ki(i,e,t){return ho(i,e,t),po(),Ki}var G7=(i,e,t,n)=>(j0(!0),u$(e[ai],""));function ne(){return jt()}function Fo(i,e,t){let n=jt(),r=Xl();if(No(n,r,e)){let o=ci(),s=U0();kE(o,s,n,i,e,n[ai],t,!0)}return Fo}function Jf(i,e,t){let n=jt(),r=Xl();if(No(n,r,e)){let o=ci(),s=U0(),a=vE(o.data),c=i2(a,s,n);kE(o,s,n,i,e,c,t,!0)}return Jf}var E0="en-US";var j7=E0;function W7(i){typeof i=="string"&&(j7=i.toLowerCase().replace(/_/g,"-"))}var $7=(i,e,t)=>{};function H(i,e,t,n){let r=jt(),o=ci(),s=Qi();return H2(o,r,r[ai],s,i,e,n),H}function YE(i,e){let t=Qi(),n=jt(),r=ci(),o=vE(r.data),s=i2(o,t,n);return H2(r,n,s,t,i,e),YE}function q7(i,e,t,n){let r=i.cleanup;if(r!=null)for(let o=0;oc?a[c]:null}typeof s=="string"&&(o+=2)}return null}function H2(i,e,t,n,r,o,s){let a=F0(n),l=i.firstCreatePass&&n2(i),d=e[pr],u=t2(e),h=!0;if(n.type&3||s){let m=ko(n,e),y=s?s(m):m,g=u.length,_=s?C=>s(Bs(C[n.index])):n.index,x=null;if(!s&&a&&(x=q7(i,e,r,n.index)),x!==null){let C=x.__ngLastListenerFn__||x;C.__ngNextListenerFn__=o,x.__ngLastListenerFn__=o,h=!1}else{o=iN(n,e,d,o),$7(m,r,o);let C=t.listen(y,r,o);u.push(o,C),l&&l.push(r,_,g,g+1)}}else o=iN(n,e,d,o);let p=n.outputs,f;if(h&&p!==null&&(f=p[r])){let m=f.length;if(m)for(let y=0;y-1?Rc(i.index,e):e;zE(s,5);let a=nN(e,t,n,o),c=r.__ngNextListenerFn__;for(;c;)a=nN(e,t,c,o)&&a,c=c.__ngNextListenerFn__;return a}}function I(i=1){return a6(i)}function Y7(i,e){let t=null,n=_W(i);for(let r=0;r(j0(!0),l$(e[ai],n));function st(i){return Se("",i,""),st}function Se(i,e,t){let n=jt(),r=O2(n,i,e,t);return r!==Br&&BE(n,Us(),r),Se}function XE(i,e,t,n,r){let o=jt(),s=_7(o,i,e,t,n,r);return s!==Br&&BE(o,Us(),s),XE}function Jl(i,e,t,n,r,o,s,a,c){let l=jt(),d=v7(l,i,e,t,n,r,o,s,a,c);return d!==Br&&BE(l,Us(),d),Jl}function Q7(i,e,t){let n=ci();if(n.firstCreatePass){let r=Ma(i);ZM(t,n.data,n.blueprint,r,!0),ZM(e,n.data,n.blueprint,r,!1)}}function ZM(i,e,t,n,r){if(i=Yi(i),Array.isArray(i))for(let o=0;o>20;if(Yu(i)||!i.multi){let p=new jl(l,r,M),f=qS(c,e,r?d:d+h,u);f===-1?(lM(f0(a,s),o,c),$S(o,i,e.length),e.push(c),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),t.push(p),s.push(p)):(t[f]=p,s[f]=p)}else{let p=qS(c,e,d+h,u),f=qS(c,e,d,d+h),m=p>=0&&t[p],y=f>=0&&t[f];if(r&&!y||!r&&!m){lM(f0(a,s),o,c);let g=eq(r?J7:K7,t.length,r,n,l);!r&&y&&(t[f].providerFactory=g),$S(o,i,e.length,0),e.push(c),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),t.push(g),s.push(g)}else{let g=W2(t[r?f:p],l,!r&&n);$S(o,i,p>-1?p:f,g)}!r&&n&&y&&t[f].componentProviders++}}}function $S(i,e,t,n){let r=Yu(e),o=OW(e);if(r||o){let c=(o?Yi(e.useClass):e).prototype.ngOnDestroy;if(c){let l=i.destroyHooks||(i.destroyHooks=[]);if(!r&&e.multi){let d=l.indexOf(t);d===-1?l.push(t,[n,c]):l[d+1].push(n,c)}else l.push(t,c)}}}function W2(i,e,t){return t&&i.componentProviders++,i.multi.push(e)-1}function qS(i,e,t,n){for(let r=t;r{t.providersResolver=(n,r)=>Q7(n,r?r(i):i,e)}}var tq=(()=>{let e=class e{constructor(n){this._injector=n,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(n){if(!n.standalone)return null;if(!this.cachedInjectors.has(n)){let r=TN(!1,n.type),o=r.length>0?qE([r],this._injector,`Standalone[${n.type.name}]`):null;this.cachedInjectors.set(n,o)}return this.cachedInjectors.get(n)}ngOnDestroy(){try{for(let n of this.cachedInjectors.values())n!==null&&n.destroy()}finally{this.cachedInjectors.clear()}}};e.\u0275prov=J({token:e,providedIn:"environment",factory:()=>new e(X(Xi))});let i=e;return i})();function le(i){Lo("NgStandalone"),i.getStandaloneInjector=e=>e.get(tq).getOrCreateStandaloneInjector(i)}function $2(i,e,t){let n=YN()+i,r=jt();return r[n]===Br?P2(r,n,t?e.call(t):e()):u7(r,n)}function Ac(i,e,t,n){return iq(jt(),YN(),i,e,t,n)}function nq(i,e){let t=i[e];return t===Br?void 0:t}function iq(i,e,t,n,r,o){let s=e+t;return No(i,s,r)?P2(i,s+1,o?n.call(o,r):n(r)):nq(i,s+1)}function Tt(i,e){return eb(i,e)}var nb=(()=>{let e=class e{log(n){console.log(n)}warn(n){console.warn(n)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"platform"});let i=e;return i})();var q2=new me("");function ed(i){return!!i&&typeof i.then=="function"}function Y2(i){return!!i&&typeof i.subscribe=="function"}var X2=new me(""),Z2=(()=>{let e=class e{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((n,r)=>{this.resolve=n,this.reject=r}),this.appInits=te(X2,{optional:!0})??[]}runInitializers(){if(this.initialized)return;let n=[];for(let o of this.appInits){let s=o();if(ed(s))n.push(s);else if(Y2(s)){let a=new Promise((c,l)=>{s.subscribe({complete:c,error:l})});n.push(a)}}let r=()=>{this.done=!0,this.resolve()};Promise.all(n).then(()=>{r()}).catch(o=>{this.reject(o)}),n.length===0&&r(),this.initialized=!0}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),ZE=new me("");function rq(){FR(()=>{throw new Oe(600,!1)})}function oq(i){return i.isBoundToModule}var sq=10;function aq(i,e,t){try{let n=t();return ed(n)?n.catch(r=>{throw e.runOutsideAngular(()=>i.handleError(r)),r}):n}catch(n){throw e.runOutsideAngular(()=>i.handleError(n)),n}}var hs=(()=>{let e=class e{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=te(pk),this.afterRenderEffectManager=te(GE),this.zonelessEnabled=te(UE),this.externalTestViews=new Set,this.beforeRender=new pe,this.afterTick=new pe,this.componentTypes=[],this.components=[],this.isStable=te(Zl).hasPendingTasks.pipe(Je(n=>!n)),this._injector=te(Xi)}get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}get injector(){return this._injector}bootstrap(n,r){let o=n instanceof _0;if(!this._injector.get(Z2).done){let p=!o&&SN(n),f=!1;throw new Oe(405,f)}let a;o?a=n:a=this._injector.get(us).resolveComponentFactory(n),this.componentTypes.push(a.componentType);let c=oq(a)?void 0:this._injector.get(Oc),l=r||a.selector,d=a.create(vt.NULL,[],l,c),u=d.location.nativeElement,h=d.injector.get(q2,null);return h?.registerApplication(u),d.onDestroy(()=>{this.detachView(d.hostView),YS(this.components,d),h?.unregisterApplication(u)}),this._loadComponent(d),d}tick(){this._tick(!0)}_tick(n){if(this._runningTick)throw new Oe(101,!1);let r=ln(null);try{this._runningTick=!0,this.detectChangesInAttachedViews(n)}catch(o){this.internalErrorHandler(o)}finally{this._runningTick=!1,ln(r),this.afterTick.next()}}detectChangesInAttachedViews(n){let r=null;this._injector.destroyed||(r=this._injector.get(Pc,null,{optional:!0}));let o=0,s=this.afterRenderEffectManager;for(;oUf(c))&&(s.execute(),!this.allViews.some(({_lView:c})=>Uf(c))))break}}attachView(n){let r=n;this._views.push(r),r.attachToAppRef(this)}detachView(n){let r=n;YS(this._views,r),r.detachFromAppRef()}_loadComponent(n){this.attachView(n.hostView),this.tick(),this.components.push(n);let r=this._injector.get(ZE,[]);[...this._bootstrapListeners,...r].forEach(o=>o(n))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(n=>n()),this._views.slice().forEach(n=>n.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(n){return this._destroyListeners.push(n),()=>YS(this._destroyListeners,n)}destroy(){if(this._destroyed)throw new Oe(406,!1);let n=this._injector;n.destroy&&!n.destroyed&&n.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function YS(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function cq(i,e,t,n){if(!t&&!Uf(i))return;l2(i,e,t&&!n?0:1)}var KM=class{constructor(e,t){this.ngModuleFactory=e,this.componentFactories=t}},QE=(()=>{let e=class e{compileModuleSync(n){return new VM(n)}compileModuleAsync(n){return Promise.resolve(this.compileModuleSync(n))}compileModuleAndAllComponentsSync(n){let r=this.compileModuleSync(n),o=MN(n),s=Nk(o.declarations).reduce((a,c)=>{let l=Ic(c);return l&&a.push(new th(l)),a},[]);return new KM(r,s)}compileModuleAndAllComponentsAsync(n){return Promise.resolve(this.compileModuleAndAllComponentsSync(n))}clearCache(){}clearCacheFor(n){}getModuleId(n){}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var lq=(()=>{let e=class e{constructor(){this.zone=te(Fe),this.changeDetectionScheduler=te(eh),this.applicationRef=te(hs)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),dq=new me("",{factory:()=>!1});function Q2({ngZoneFactory:i,ignoreChangesOutsideZone:e}){return i??=()=>new Fe(J2()),[{provide:Fe,useFactory:i},{provide:qu,multi:!0,useFactory:()=>{let t=te(lq,{optional:!0});return()=>t.initialize()}},{provide:qu,multi:!0,useFactory:()=>{let t=te(hq);return()=>{t.initialize()}}},{provide:pk,useFactory:uq},e===!0?{provide:p2,useValue:!0}:[]]}function uq(){let i=te(Fe),e=te(Nr);return t=>i.runOutsideAngular(()=>e.handleError(t))}function K2(i){let e=i?.ignoreChangesOutsideZone,t=Q2({ngZoneFactory:()=>{let n=J2(i);return n.shouldCoalesceEventChangeDetection&&Lo("NgZone_CoalesceEvent"),new Fe(n)},ignoreChangesOutsideZone:e});return R0([{provide:dq,useValue:!0},{provide:UE,useValue:!1},t])}function J2(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:i?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:i?.runCoalescing??!1}}var hq=(()=>{let e=class e{constructor(){this.subscription=new Ct,this.initialized=!1,this.zone=te(Fe),this.pendingTasks=te(Zl)}initialize(){if(this.initialized)return;this.initialized=!0;let n=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(n=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Fe.assertNotInAngularZone(),queueMicrotask(()=>{n!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(n),n=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Fe.assertInAngularZone(),n??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var pq=(()=>{let e=class e{constructor(){this.appRef=te(hs),this.taskService=te(Zl),this.ngZone=te(Fe),this.zonelessEnabled=te(UE),this.disableScheduling=te(p2,{optional:!0})??!1,this.zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run,this.schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}],this.subscriptions=new Ct,this.cancelScheduledCallback=null,this.shouldRefreshViews=!1,this.useMicrotaskScheduler=!1,this.runningTick=!1,this.pendingRenderTaskId=null,this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof DM||!this.zoneIsDefined)}notify(n){if(!this.zonelessEnabled&&n===5)return;switch(n){case 3:case 2:case 0:case 4:case 5:case 1:{this.shouldRefreshViews=!0;break}case 8:case 7:case 6:case 9:default:}if(!this.shouldScheduleTick())return;let r=this.useMicrotaskScheduler?jA:f2;this.pendingRenderTaskId=this.taskService.add(),this.zoneIsDefined?Zone.root.run(()=>{this.cancelScheduledCallback=r(()=>{this.tick(this.shouldRefreshViews)})}):this.cancelScheduledCallback=r(()=>{this.tick(this.shouldRefreshViews)})}shouldScheduleTick(){return!(this.disableScheduling||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Fe.isInAngularZone())}tick(n){if(this.runningTick||this.appRef.destroyed)return;let r=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick(n)},void 0,this.schedulerTickApplyArgs)}catch(o){throw this.taskService.remove(r),o}finally{this.cleanup()}this.useMicrotaskScheduler=!0,jA(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(r)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.shouldRefreshViews=!1,this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let n=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(n)}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function fq(){return typeof $localize<"u"&&$localize.locale||E0}var ib=new me("",{providedIn:"root",factory:()=>te(ib,tn.Optional|tn.SkipSelf)||fq()});var eL=new me("");var r0=null;function mq(i=[],e){return vt.create({name:e,providers:[{provide:A0,useValue:"platform"},{provide:eL,useValue:new Set([()=>r0=null])},...i]})}function gq(i=[]){if(r0)return r0;let e=mq(i);return r0=e,rq(),_q(e),e}function _q(i){i.get(CE,null)?.forEach(t=>t())}var Ne=(()=>{let e=class e{};e.__NG_ELEMENT_ID__=vq;let i=e;return i})();function vq(i){return bq(Qi(),jt(),(i&16)===16)}function bq(i,e,t){if(L0(i)&&!t){let n=Rc(i.index,e);return new $l(n,n)}else if(i.type&175){let n=e[lo];return new $l(n,e)}return null}var JM=class{constructor(){}supports(e){return D2(e)}create(e){return new eE(e)}},yq=(i,e)=>e,eE=class{constructor(e){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=e||yq}forEachItem(e){let t;for(t=this._itHead;t!==null;t=t._next)e(t)}forEachOperation(e){let t=this._itHead,n=this._removalsHead,r=0,o=null;for(;t||n;){let s=!n||t&&t.currentIndex{s=this._trackByFn(r,a),t===null||!Object.is(t.trackById,s)?(t=this._mismatch(t,a,s,r),n=!0):(n&&(t=this._verifyReinsertion(t,a,s,r)),Object.is(t.item,a)||this._addIdentityChange(t,a)),t=t._next,r++}),this.length=r;return this._truncate(t),this.collection=e,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let e;for(e=this._previousItHead=this._itHead;e!==null;e=e._next)e._nextPrevious=e._next;for(e=this._additionsHead;e!==null;e=e._nextAdded)e.previousIndex=e.currentIndex;for(this._additionsHead=this._additionsTail=null,e=this._movesHead;e!==null;e=e._nextMoved)e.previousIndex=e.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(e,t,n,r){let o;return e===null?o=this._itTail:(o=e._prev,this._remove(e)),e=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null),e!==null?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._reinsertAfter(e,o,r)):(e=this._linkedRecords===null?null:this._linkedRecords.get(n,r),e!==null?(Object.is(e.item,t)||this._addIdentityChange(e,t),this._moveAfter(e,o,r)):e=this._addAfter(new tE(t,n),o,r)),e}_verifyReinsertion(e,t,n,r){let o=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null);return o!==null?e=this._reinsertAfter(o,e._prev,r):e.currentIndex!=r&&(e.currentIndex=r,this._addToMoves(e,r)),e}_truncate(e){for(;e!==null;){let t=e._next;this._addToRemovals(this._unlink(e)),e=t}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(e,t,n){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(e);let r=e._prevRemoved,o=e._nextRemoved;return r===null?this._removalsHead=o:r._nextRemoved=o,o===null?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(e,t,n),this._addToMoves(e,n),e}_moveAfter(e,t,n){return this._unlink(e),this._insertAfter(e,t,n),this._addToMoves(e,n),e}_addAfter(e,t,n){return this._insertAfter(e,t,n),this._additionsTail===null?this._additionsTail=this._additionsHead=e:this._additionsTail=this._additionsTail._nextAdded=e,e}_insertAfter(e,t,n){let r=t===null?this._itHead:t._next;return e._next=r,e._prev=t,r===null?this._itTail=e:r._prev=e,t===null?this._itHead=e:t._next=e,this._linkedRecords===null&&(this._linkedRecords=new I0),this._linkedRecords.put(e),e.currentIndex=n,e}_remove(e){return this._addToRemovals(this._unlink(e))}_unlink(e){this._linkedRecords!==null&&this._linkedRecords.remove(e);let t=e._prev,n=e._next;return t===null?this._itHead=n:t._next=n,n===null?this._itTail=t:n._prev=t,e}_addToMoves(e,t){return e.previousIndex===t||(this._movesTail===null?this._movesTail=this._movesHead=e:this._movesTail=this._movesTail._nextMoved=e),e}_addToRemovals(e){return this._unlinkedRecords===null&&(this._unlinkedRecords=new I0),this._unlinkedRecords.put(e),e.currentIndex=null,e._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=e,e._prevRemoved=null):(e._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=e),e}_addIdentityChange(e,t){return e.item=t,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=e:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=e,e}},tE=class{constructor(e,t){this.item=e,this.trackById=t,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}},nE=class{constructor(){this._head=null,this._tail=null}add(e){this._head===null?(this._head=this._tail=e,e._nextDup=null,e._prevDup=null):(this._tail._nextDup=e,e._prevDup=this._tail,e._nextDup=null,this._tail=e)}get(e,t){let n;for(n=this._head;n!==null;n=n._nextDup)if((t===null||t<=n.currentIndex)&&Object.is(n.trackById,e))return n;return null}remove(e){let t=e._prevDup,n=e._nextDup;return t===null?this._head=n:t._nextDup=n,n===null?this._tail=t:n._prevDup=t,this._head===null}},I0=class{constructor(){this.map=new Map}put(e){let t=e.trackById,n=this.map.get(t);n||(n=new nE,this.map.set(t,n)),n.add(e)}get(e,t){let n=e,r=this.map.get(n);return r?r.get(e,t):null}remove(e){let t=e.trackById;return this.map.get(t).remove(e)&&this.map.delete(t),e}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function rN(i,e,t){let n=i.previousIndex;if(n===null)return n;let r=0;return t&&n{let e=class e{constructor(n){this.factories=n}static create(n,r){if(r!=null){let o=r.factories.slice();n=n.concat(o)}return new e(n)}static extend(n){return{provide:e,useFactory:r=>e.create(n,r||oN()),deps:[[e,new aE,new P0]]}}find(n){let r=this.factories.find(o=>o.supports(n));if(r!=null)return r;throw new Oe(901,!1)}};e.\u0275prov=J({token:e,providedIn:"root",factory:oN});let i=e;return i})();function tL(i){try{let{rootComponent:e,appProviders:t,platformProviders:n}=i,r=gq(n),o=[Q2({}),{provide:eh,useExisting:pq},...t||[]],a=new x0({providers:o,parent:r,debugName:"",runEnvironmentInitializers:!1}).injector,c=a.get(Fe);return c.run(()=>{a.resolveInjectorInitializers();let l=a.get(Nr,null),d;c.runOutsideAngular(()=>{d=c.onError.subscribe({next:p=>{l.handleError(p)}})});let u=()=>a.destroy(),h=r.get(eL);return h.add(u),a.onDestroy(()=>{d.unsubscribe(),h.delete(u)}),aq(l,c,()=>{let p=a.get(Z2);return p.runInitializers(),p.donePromise.then(()=>{let f=a.get(ib,E0);W7(f||E0);let m=a.get(hs);return e!==void 0&&m.bootstrap(e),m})})})}catch(e){return Promise.reject(e)}}var nL=new me("");function et(i){return typeof i=="boolean"?i:i!=null&&i!=="false"}function ni(i,e=NaN){return!isNaN(parseFloat(i))&&!isNaN(Number(i))?Number(i):e}function Bt(i,e){Lo("NgSignals");let t=mS(i);return e?.equal&&(t[Do].equal=e.equal),t}function zr(i){let e=ln(null);try{return i()}finally{ln(e)}}var xq=new me("",{providedIn:"root",factory:()=>te(wq)}),wq=(()=>{let e=class e{};e.\u0275prov=J({token:e,providedIn:"root",factory:()=>new iE});let i=e;return i})(),iE=class{constructor(){this.queuedEffectCount=0,this.queues=new Map,this.pendingTasks=te(Zl),this.taskId=null}scheduleEffect(e){if(this.enqueue(e),this.taskId===null){let t=this.taskId=this.pendingTasks.add();queueMicrotask(()=>{this.flush(),this.pendingTasks.remove(t),this.taskId=null})}}enqueue(e){let t=e.creationZone;this.queues.has(t)||this.queues.set(t,new Set);let n=this.queues.get(t);n.has(e)||(this.queuedEffectCount++,n.add(e))}flush(){for(;this.queuedEffectCount>0;)for(let[e,t]of this.queues)e===null?this.flushQueue(t):e.run(()=>this.flushQueue(t))}flushQueue(e){for(let t of e)e.delete(t),this.queuedEffectCount--,t.run()}},rE=class{constructor(e,t,n,r,o,s){this.scheduler=e,this.effectFn=t,this.creationZone=n,this.injector=o,this.watcher=UR(a=>this.runEffect(a),()=>this.schedule(),s),this.unregisterOnDestroy=r?.onDestroy(()=>this.destroy())}runEffect(e){try{this.effectFn(e)}catch(t){this.injector.get(Nr,null,{optional:!0})?.handleError(t)}}run(){this.watcher.run()}schedule(){this.scheduler.scheduleEffect(this)}destroy(){this.watcher.destroy(),this.unregisterOnDestroy?.()}};function lt(i,e){Lo("NgSignals"),!e?.injector&&ih(lt);let t=e?.injector??te(vt),n=e?.manualCleanup!==!0?t.get(Fi):null,r=new rE(t.get(xq),i,typeof Zone>"u"?null:Zone.current,n,t,e?.allowSignalWrites??!1),o=t.get(Ne,null,{optional:!0});return!o||!(o._lView[Rt]&8)?r.watcher.notify():(o._lView[Jv]??=[]).push(r.watcher.notify),r}function iL(i,e){let t=Ic(i),n=e.elementInjector||N0();return new th(t).create(n,e.projectableNodes,e.hostElement,e.environmentInjector)}var lL=null;function Oa(){return lL}function dL(i){lL??=i}var rb=class{};var Xe=new me(""),uL=(()=>{let e=class e{historyGo(n){throw new Error("")}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:()=>te(Cq),providedIn:"platform"});let i=e;return i})();var Cq=(()=>{let e=class e extends uL{constructor(){super(),this._doc=te(Xe),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Oa().getBaseHref(this._doc)}onPopState(n){let r=Oa().getGlobalEventTarget(this._doc,"window");return r.addEventListener("popstate",n,!1),()=>r.removeEventListener("popstate",n)}onHashChange(n){let r=Oa().getGlobalEventTarget(this._doc,"window");return r.addEventListener("hashchange",n,!1),()=>r.removeEventListener("hashchange",n)}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(n){this._location.pathname=n}pushState(n,r,o){this._history.pushState(n,r,o)}replaceState(n,r,o){this._history.replaceState(n,r,o)}forward(){this._history.forward()}back(){this._history.back()}historyGo(n=0){this._history.go(n)}getState(){return this._history.state}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:()=>new e,providedIn:"platform"});let i=e;return i})();function hL(i,e){if(i.length==0)return e;if(e.length==0)return i;let t=0;return i.endsWith("/")&&t++,e.startsWith("/")&&t++,t==2?i+e.substring(1):t==1?i+e:i+"/"+e}function rL(i){let e=i.match(/#|\?|$/),t=e&&e.index||i.length,n=t-(i[t-1]==="/"?1:0);return i.slice(0,n)+i.slice(t)}function nd(i){return i&&i[0]!=="?"?"?"+i:i}var ab=(()=>{let e=class e{historyGo(n){throw new Error("")}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:()=>te(pL),providedIn:"root"});let i=e;return i})(),Sq=new me(""),pL=(()=>{let e=class e extends ab{constructor(n,r){super(),this._platformLocation=n,this._removeListenerFns=[],this._baseHref=r??this._platformLocation.getBaseHrefFromDOM()??te(Xe).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(n){this._removeListenerFns.push(this._platformLocation.onPopState(n),this._platformLocation.onHashChange(n))}getBaseHref(){return this._baseHref}prepareExternalUrl(n){return hL(this._baseHref,n)}path(n=!1){let r=this._platformLocation.pathname+nd(this._platformLocation.search),o=this._platformLocation.hash;return o&&n?`${r}${o}`:r}pushState(n,r,o,s){let a=this.prepareExternalUrl(o+nd(s));this._platformLocation.pushState(n,r,a)}replaceState(n,r,o,s){let a=this.prepareExternalUrl(o+nd(s));this._platformLocation.replaceState(n,r,a)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(n=0){this._platformLocation.historyGo?.(n)}};e.\u0275fac=function(r){return new(r||e)(X(uL),X(Sq,8))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Ra=(()=>{let e=class e{constructor(n){this._subject=new Ie,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=n;let r=this._locationStrategy.getBaseHref();this._basePath=Iq(rL(oL(r))),this._locationStrategy.onPopState(o=>{this._subject.emit({url:this.path(!0),pop:!0,state:o.state,type:o.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(n=!1){return this.normalize(this._locationStrategy.path(n))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(n,r=""){return this.path()==this.normalize(n+nd(r))}normalize(n){return e.stripTrailingSlash(Eq(this._basePath,oL(n)))}prepareExternalUrl(n){return n&&n[0]!=="/"&&(n="/"+n),this._locationStrategy.prepareExternalUrl(n)}go(n,r="",o=null){this._locationStrategy.pushState(o,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+nd(r)),o)}replaceState(n,r="",o=null){this._locationStrategy.replaceState(o,"",n,r),this._notifyUrlChangeListeners(this.prepareExternalUrl(n+nd(r)),o)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(n=0){this._locationStrategy.historyGo?.(n)}onUrlChange(n){return this._urlChangeListeners.push(n),this._urlChangeSubscription??=this.subscribe(r=>{this._notifyUrlChangeListeners(r.url,r.state)}),()=>{let r=this._urlChangeListeners.indexOf(n);this._urlChangeListeners.splice(r,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(n="",r){this._urlChangeListeners.forEach(o=>o(n,r))}subscribe(n,r,o){return this._subject.subscribe({next:n,error:r,complete:o})}};e.normalizeQueryParams=nd,e.joinWithSlash=hL,e.stripTrailingSlash=rL,e.\u0275fac=function(r){return new(r||e)(X(ab))},e.\u0275prov=J({token:e,factory:()=>Mq(),providedIn:"root"});let i=e;return i})();function Mq(){return new Ra(X(ab))}function Eq(i,e){if(!i||!e.startsWith(i))return e;let t=e.substring(i.length);return t===""||["/",";","?","#"].includes(t[0])?t:e}function oL(i){return i.replace(/\/index.html$/,"")}function Iq(i){if(new RegExp("^(https?:)?//").test(i)){let[,t]=i.split(/\/\/[^\/]+/);return t}return i}function fL(i,e){e=encodeURIComponent(e);for(let t of i.split(";")){let n=t.indexOf("="),[r,o]=n==-1?[t,""]:[t.slice(0,n),t.slice(n+1)];if(r.trim()===e)return decodeURIComponent(o)}return null}var JE=/\s+/,sL=[],cb=(()=>{let e=class e{constructor(n,r){this._ngEl=n,this._renderer=r,this.initialClasses=sL,this.stateMap=new Map}set klass(n){this.initialClasses=n!=null?n.trim().split(JE):sL}set ngClass(n){this.rawClass=typeof n=="string"?n.trim().split(JE):n}ngDoCheck(){for(let r of this.initialClasses)this._updateState(r,!0);let n=this.rawClass;if(Array.isArray(n)||n instanceof Set)for(let r of n)this._updateState(r,!0);else if(n!=null)for(let r of Object.keys(n))this._updateState(r,!!n[r]);this._applyStateDiff()}_updateState(n,r){let o=this.stateMap.get(n);o!==void 0?(o.enabled!==r&&(o.changed=!0,o.enabled=r),o.touched=!0):this.stateMap.set(n,{enabled:r,changed:!0,touched:!0})}_applyStateDiff(){for(let n of this.stateMap){let r=n[0],o=n[1];o.changed?(this._toggleClass(r,o.enabled),o.changed=!1):o.touched||(o.enabled&&this._toggleClass(r,!1),this.stateMap.delete(r)),o.touched=!1}}_toggleClass(n,r){n=n.trim(),n.length>0&&n.split(JE).forEach(o=>{r?this._renderer.addClass(this._ngEl.nativeElement,o):this._renderer.removeClass(this._ngEl.nativeElement,o)})}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Kl))},e.\u0275dir=Ve({type:e,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"},standalone:!0});let i=e;return i})();var e1=class{constructor(e,t,n,r){this.$implicit=e,this.ngForOf=t,this.index=n,this.count=r}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},Mi=(()=>{let e=class e{set ngForOf(n){this._ngForOf=n,this._ngForOfDirty=!0}set ngForTrackBy(n){this._trackByFn=n}get ngForTrackBy(){return this._trackByFn}constructor(n,r,o){this._viewContainer=n,this._template=r,this._differs=o,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(n){n&&(this._template=n)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let n=this._ngForOf;if(!this._differ&&n)if(0)try{}catch{}else this._differ=this._differs.find(n).create(this.ngForTrackBy)}if(this._differ){let n=this._differ.diff(this._ngForOf);n&&this._applyChanges(n)}}_applyChanges(n){let r=this._viewContainer;n.forEachOperation((o,s,a)=>{if(o.previousIndex==null)r.createEmbeddedView(this._template,new e1(o.item,this._ngForOf,-1,-1),a===null?void 0:a);else if(a==null)r.remove(s===null?void 0:s);else if(s!==null){let c=r.get(s);r.move(c,a),aL(c,o)}});for(let o=0,s=r.length;o{let s=r.get(o.currentIndex);aL(s,o)})}static ngTemplateContextGuard(n,r){return!0}};e.\u0275fac=function(r){return new(r||e)(M(Zt),M(Wn),M(td))},e.\u0275dir=Ve({type:e,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0});let i=e;return i})();function aL(i,e){i.context.$implicit=e.item}var Tn=(()=>{let e=class e{constructor(n,r){this._viewContainer=n,this._context=new t1,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=r}set ngIf(n){this._context.$implicit=this._context.ngIf=n,this._updateView()}set ngIfThen(n){cL("ngIfThen",n),this._thenTemplateRef=n,this._thenViewRef=null,this._updateView()}set ngIfElse(n){cL("ngIfElse",n),this._elseTemplateRef=n,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(n,r){return!0}};e.\u0275fac=function(r){return new(r||e)(M(Zt),M(Wn))},e.\u0275dir=Ve({type:e,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0});let i=e;return i})(),t1=class{constructor(){this.$implicit=null,this.ngIf=null}};function cL(i,e){if(!!!(!e||e.createEmbeddedView))throw new Error(`${i} must be a TemplateRef, but received '${Rr(e)}'.`)}var n1=class{constructor(e,t){this._viewContainerRef=e,this._templateRef=t,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(e){e&&!this._created?this.create():!e&&this._created&&this.destroy()}},i1=(()=>{let e=class e{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(n){this._ngSwitch=n,this._caseCount===0&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(n){this._defaultViews.push(n)}_matchCase(n){let r=n===this._ngSwitch;return this._lastCasesMatched||=r,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),r}_updateDefaultCases(n){if(this._defaultViews.length>0&&n!==this._defaultUsed){this._defaultUsed=n;for(let r of this._defaultViews)r.enforceState(n)}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=Ve({type:e,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0});let i=e;return i})(),mL=(()=>{let e=class e{constructor(n,r,o){this.ngSwitch=o,o._addCase(),this._view=new n1(n,r)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}};e.\u0275fac=function(r){return new(r||e)(M(Zt),M(Wn),M(i1,9))},e.\u0275dir=Ve({type:e,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0});let i=e;return i})();var Gs=(()=>{let e=class e{constructor(n){this._viewContainerRef=n,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(n){if(this._shouldRecreateView(n)){let r=this._viewContainerRef;if(this._viewRef&&r.remove(r.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let o=this._createContextForwardProxy();this._viewRef=r.createEmbeddedView(this.ngTemplateOutlet,o,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(n){return!!n.ngTemplateOutlet||!!n.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(n,r,o)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,r,o):!1,get:(n,r,o)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,r,o)}})}};e.\u0275fac=function(r){return new(r||e)(M(Zt))},e.\u0275dir=Ve({type:e,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[dn]});let i=e;return i})();var Ae=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({});let i=e;return i})(),r1="browser",Tq="server";function gL(i){return i===r1}function o1(i){return i===Tq}var ob=class{};var a1=class{};var ah=class i{constructor(e){this.normalizedNames=new Map,this.lazyUpdate=null,e?typeof e=="string"?this.lazyInit=()=>{this.headers=new Map,e.split(` -`).forEach(t=>{let n=t.indexOf(":");if(n>0){let r=t.slice(0,n),o=r.toLowerCase(),s=t.slice(n+1).trim();this.maybeSetNormalizedName(r,o),this.headers.has(o)?this.headers.get(o).push(s):this.headers.set(o,[s])}})}:typeof Headers<"u"&&e instanceof Headers?(this.headers=new Map,e.forEach((t,n)=>{this.setHeaderEntries(n,t)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(e).forEach(([t,n])=>{this.setHeaderEntries(t,n)})}: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 i?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 i;return t.lazyInit=this.lazyInit&&this.lazyInit instanceof i?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 n=e.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(e.name,t);let r=(e.op==="a"?this.headers.get(t):void 0)||[];r.push(...n),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}}setHeaderEntries(e,t){let n=(Array.isArray(t)?t:[t]).map(o=>o.toString()),r=e.toLowerCase();this.headers.set(r,n),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 c1=class{encodeKey(e){return _L(e)}encodeValue(e){return _L(e)}decodeKey(e){return decodeURIComponent(e)}decodeValue(e){return decodeURIComponent(e)}};function Dq(i,e){let t=new Map;return i.length>0&&i.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))],c=t.get(s)||[];c.push(a),t.set(s,c)}),t}var Pq=/%(\d[a-f0-9])/gi,Oq={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function _L(i){return encodeURIComponent(i).replace(Pq,(e,t)=>Oq[t]??e)}function lb(i){return`${i}`}var Nc=class i{constructor(e={}){if(this.updates=null,this.cloneFrom=null,this.encoder=e.encoder||new c1,e.fromString){if(e.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=Dq(e.fromString,this.encoder)}else e.fromObject?(this.map=new Map,Object.keys(e.fromObject).forEach(t=>{let n=e.fromObject[t],r=Array.isArray(n)?n.map(lb):[lb(n)];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(n=>{let r=e[n];Array.isArray(r)?r.forEach(o=>{t.push({param:n,value:o,op:"a"})}):t.push({param:n,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(n=>t+"="+this.encoder.encodeValue(n)).join("&")}).filter(e=>e!=="").join("&")}clone(e){let t=new i({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(lb(e.value)),this.map.set(e.param,t);break;case"d":if(e.value!==void 0){let n=this.map.get(e.param)||[],r=n.indexOf(lb(e.value));r!==-1&&n.splice(r,1),n.length>0?this.map.set(e.param,n):this.map.delete(e.param)}else{this.map.delete(e.param);break}}}),this.cloneFrom=this.updates=null)}};var l1=class{constructor(){this.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()}};function Rq(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function vL(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function bL(i){return typeof Blob<"u"&&i instanceof Blob}function yL(i){return typeof FormData<"u"&&i instanceof FormData}function Aq(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var em=class i{constructor(e,t,n,r){this.url=t,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=e.toUpperCase();let o;if(Rq(this.method)||r?(this.body=n!==void 0?n:null,o=r):o=n,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),this.transferCache=o.transferCache),this.headers??=new ah,this.context??=new l1,!this.params)this.params=new Nc,this.urlWithParams=t;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=t;else{let a=t.indexOf("?"),c=a===-1?"?":ah.set(p,e.setHeaders[p]),l)),e.setParams&&(d=Object.keys(e.setParams).reduce((h,p)=>h.set(p,e.setParams[p]),d)),new i(t,n,s,{params:d,headers:l,context:u,reportProgress:c,responseType:r,withCredentials:a,transferCache:o})}},xL=function(i){return i[i.Sent=0]="Sent",i[i.UploadProgress=1]="UploadProgress",i[i.ResponseHeader=2]="ResponseHeader",i[i.DownloadProgress=3]="DownloadProgress",i[i.Response=4]="Response",i[i.User=5]="User",i}(xL||{}),d1=class{constructor(e,t=200,n="OK"){this.headers=e.headers||new ah,this.status=e.status!==void 0?e.status:t,this.statusText=e.statusText||n,this.url=e.url||null,this.ok=this.status>=200&&this.status<300}};var u1=class i extends d1{constructor(e={}){super(e),this.type=xL.Response,this.body=e.body!==void 0?e.body:null}clone(e={}){return new i({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})}};function s1(i,e){return{body:e,headers:i.headers,context:i.context,observe:i.observe,params:i.params,reportProgress:i.reportProgress,responseType:i.responseType,withCredentials:i.withCredentials,transferCache:i.transferCache}}var wL=(()=>{let e=class e{constructor(n){this.handler=n}request(n,r,o={}){let s;if(n instanceof em)s=n;else{let l;o.headers instanceof ah?l=o.headers:l=new ah(o.headers);let d;o.params&&(o.params instanceof Nc?d=o.params:d=new Nc({fromObject:o.params})),s=new em(n,r,o.body!==void 0?o.body:null,{headers:l,context:o.context,params:d,reportProgress:o.reportProgress,responseType:o.responseType||"json",withCredentials:o.withCredentials,transferCache:o.transferCache})}let a=Ke(s).pipe(bc(l=>this.handler.handle(l)));if(n instanceof em||o.observe==="events")return a;let c=a.pipe(qt(l=>l instanceof u1));switch(o.observe||"body"){case"body":switch(s.responseType){case"arraybuffer":return c.pipe(Je(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return c.pipe(Je(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return c.pipe(Je(l=>{if(l.body!==null&&typeof l.body!="string")throw new Error("Response is not a string.");return l.body}));case"json":default:return c.pipe(Je(l=>l.body))}case"response":return c;default:throw new Error(`Unreachable: unhandled observe type ${o.observe}}`)}}delete(n,r={}){return this.request("DELETE",n,r)}get(n,r={}){return this.request("GET",n,r)}head(n,r={}){return this.request("HEAD",n,r)}jsonp(n,r){return this.request("JSONP",n,{params:new Nc().append(r,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(n,r={}){return this.request("OPTIONS",n,r)}patch(n,r,o={}){return this.request("PATCH",n,s1(o,r))}post(n,r,o={}){return this.request("POST",n,s1(o,r))}put(n,r,o={}){return this.request("PUT",n,s1(o,r))}};e.\u0275fac=function(r){return new(r||e)(X(a1))},e.\u0275prov=J({token:e,factory:e.\u0275fac});let i=e;return i})();var f1=class extends rb{constructor(){super(...arguments),this.supportsDOMEvents=!0}},m1=class i extends f1{static makeCurrent(){dL(new i)}onAndCancel(e,t,n){return e.addEventListener(t,n),()=>{e.removeEventListener(t,n)}}dispatchEvent(e,t){e.dispatchEvent(t)}remove(e){e.parentNode&&e.parentNode.removeChild(e)}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=kq();return t==null?null:Lq(t)}resetBaseElement(){tm=null}getUserAgent(){return window.navigator.userAgent}getCookie(e){return fL(document.cookie,e)}},tm=null;function kq(){return tm=tm||document.querySelector("base"),tm?tm.getAttribute("href"):null}function Lq(i){return new URL(i,document.baseURI).pathname}var Fq=(()=>{let e=class e{build(){return new XMLHttpRequest}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:e.\u0275fac});let i=e;return i})(),db=new me(""),ML=(()=>{let e=class e{constructor(n,r){this._zone=r,this._eventNameToPlugin=new Map,n.forEach(o=>{o.manager=this}),this._plugins=n.slice().reverse()}addEventListener(n,r,o){return this._findPluginFor(r).addEventListener(n,r,o)}getZone(){return this._zone}_findPluginFor(n){let r=this._eventNameToPlugin.get(n);if(r)return r;if(r=this._plugins.find(s=>s.supports(n)),!r)throw new Oe(5101,!1);return this._eventNameToPlugin.set(n,r),r}};e.\u0275fac=function(r){return new(r||e)(X(db),X(Fe))},e.\u0275prov=J({token:e,factory:e.\u0275fac});let i=e;return i})(),nm=class{constructor(e){this._doc=e}},h1="ng-app-id",EL=(()=>{let e=class e{constructor(n,r,o,s={}){this.doc=n,this.appId=r,this.nonce=o,this.platformId=s,this.styleRef=new Map,this.hostNodes=new Set,this.styleNodesInDOM=this.collectServerRenderedStyles(),this.platformIsServer=o1(s),this.resetHostNodes()}addStyles(n){for(let r of n)this.changeUsageCount(r,1)===1&&this.onStyleAdded(r)}removeStyles(n){for(let r of n)this.changeUsageCount(r,-1)<=0&&this.onStyleRemoved(r)}ngOnDestroy(){let n=this.styleNodesInDOM;n&&(n.forEach(r=>r.remove()),n.clear());for(let r of this.getAllStyles())this.onStyleRemoved(r);this.resetHostNodes()}addHost(n){this.hostNodes.add(n);for(let r of this.getAllStyles())this.addStyleToHost(n,r)}removeHost(n){this.hostNodes.delete(n)}getAllStyles(){return this.styleRef.keys()}onStyleAdded(n){for(let r of this.hostNodes)this.addStyleToHost(r,n)}onStyleRemoved(n){let r=this.styleRef;r.get(n)?.elements?.forEach(o=>o.remove()),r.delete(n)}collectServerRenderedStyles(){let n=this.doc.head?.querySelectorAll(`style[${h1}="${this.appId}"]`);if(n?.length){let r=new Map;return n.forEach(o=>{o.textContent!=null&&r.set(o.textContent,o)}),r}return null}changeUsageCount(n,r){let o=this.styleRef;if(o.has(n)){let s=o.get(n);return s.usage+=r,s.usage}return o.set(n,{usage:r,elements:[]}),r}getStyleElement(n,r){let o=this.styleNodesInDOM,s=o?.get(r);if(s?.parentNode===n)return o.delete(r),s.removeAttribute(h1),s;{let a=this.doc.createElement("style");return this.nonce&&a.setAttribute("nonce",this.nonce),a.textContent=r,this.platformIsServer&&a.setAttribute(h1,this.appId),n.appendChild(a),a}}addStyleToHost(n,r){let o=this.getStyleElement(n,r),s=this.styleRef,a=s.get(r)?.elements;a?a.push(o):s.set(r,{elements:[o],usage:1})}resetHostNodes(){let n=this.hostNodes;n.clear(),n.add(this.doc.head)}};e.\u0275fac=function(r){return new(r||e)(X(Xe),X(qf),X(Yf,8),X(Da))},e.\u0275prov=J({token:e,factory:e.\u0275fac});let i=e;return i})(),p1={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"},_1=/%COMP%/g,IL="%COMP%",Bq=`_nghost-${IL}`,Vq=`_ngcontent-${IL}`,zq=!0,Uq=new me("",{providedIn:"root",factory:()=>zq});function Hq(i){return Vq.replace(_1,i)}function Gq(i){return Bq.replace(_1,i)}function TL(i,e){return e.map(t=>t.replace(_1,i))}var ub=(()=>{let e=class e{constructor(n,r,o,s,a,c,l,d=null){this.eventManager=n,this.sharedStylesHost=r,this.appId=o,this.removeStylesOnCompDestroy=s,this.doc=a,this.platformId=c,this.ngZone=l,this.nonce=d,this.rendererByCompId=new Map,this.platformIsServer=o1(c),this.defaultRenderer=new im(n,a,l,this.platformIsServer)}createRenderer(n,r){if(!n||!r)return this.defaultRenderer;this.platformIsServer&&r.encapsulation===Ls.ShadowDom&&(r=yt(Z({},r),{encapsulation:Ls.Emulated}));let o=this.getOrCreateRenderer(n,r);return o instanceof hb?o.applyToHost(n):o instanceof rm&&o.applyStyles(),o}getOrCreateRenderer(n,r){let o=this.rendererByCompId,s=o.get(r.id);if(!s){let a=this.doc,c=this.ngZone,l=this.eventManager,d=this.sharedStylesHost,u=this.removeStylesOnCompDestroy,h=this.platformIsServer;switch(r.encapsulation){case Ls.Emulated:s=new hb(l,d,r,this.appId,u,a,c,h);break;case Ls.ShadowDom:return new g1(l,d,n,r,a,c,this.nonce,h);default:s=new rm(l,d,r,u,a,c,h);break}o.set(r.id,s)}return s}ngOnDestroy(){this.rendererByCompId.clear()}};e.\u0275fac=function(r){return new(r||e)(X(ML),X(EL),X(qf),X(Uq),X(Xe),X(Da),X(Fe),X(Yf))},e.\u0275prov=J({token:e,factory:e.\u0275fac});let i=e;return i})(),im=class{constructor(e,t,n,r){this.eventManager=e,this.doc=t,this.ngZone=n,this.platformIsServer=r,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(e,t){return t?this.doc.createElementNS(p1[t]||t,e):this.doc.createElement(e)}createComment(e){return this.doc.createComment(e)}createText(e){return this.doc.createTextNode(e)}appendChild(e,t){(CL(e)?e.content:e).appendChild(t)}insertBefore(e,t,n){e&&(CL(e)?e.content:e).insertBefore(t,n)}removeChild(e,t){e&&e.removeChild(t)}selectRootElement(e,t){let n=typeof e=="string"?this.doc.querySelector(e):e;if(!n)throw new Oe(-5104,!1);return t||(n.textContent=""),n}parentNode(e){return e.parentNode}nextSibling(e){return e.nextSibling}setAttribute(e,t,n,r){if(r){t=r+":"+t;let o=p1[r];o?e.setAttributeNS(o,t,n):e.setAttribute(t,n)}else e.setAttribute(t,n)}removeAttribute(e,t,n){if(n){let r=p1[n];r?e.removeAttributeNS(r,t):e.removeAttribute(`${n}:${t}`)}else e.removeAttribute(t)}addClass(e,t){e.classList.add(t)}removeClass(e,t){e.classList.remove(t)}setStyle(e,t,n,r){r&(Ia.DashCase|Ia.Important)?e.style.setProperty(t,n,r&Ia.Important?"important":""):e.style[t]=n}removeStyle(e,t,n){n&Ia.DashCase?e.style.removeProperty(t):e.style[t]=""}setProperty(e,t,n){e!=null&&(e[t]=n)}setValue(e,t){e.nodeValue=t}listen(e,t,n){if(typeof e=="string"&&(e=Oa().getGlobalEventTarget(this.doc,e),!e))throw new Error(`Unsupported event target ${e} for event ${t}`);return this.eventManager.addEventListener(e,t,this.decoratePreventDefault(n))}decoratePreventDefault(e){return t=>{if(t==="__ngUnwrap__")return e;(this.platformIsServer?this.ngZone.runGuarded(()=>e(t)):e(t))===!1&&t.preventDefault()}}};function CL(i){return i.tagName==="TEMPLATE"&&i.content!==void 0}var g1=class extends im{constructor(e,t,n,r,o,s,a,c){super(e,o,s,c),this.sharedStylesHost=t,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let l=TL(r.id,r.styles);for(let d of l){let u=document.createElement("style");a&&u.setAttribute("nonce",a),u.textContent=d,this.shadowRoot.appendChild(u)}}nodeOrShadowRoot(e){return e===this.hostEl?this.shadowRoot:e}appendChild(e,t){return super.appendChild(this.nodeOrShadowRoot(e),t)}insertBefore(e,t,n){return super.insertBefore(this.nodeOrShadowRoot(e),t,n)}removeChild(e,t){return super.removeChild(this.nodeOrShadowRoot(e),t)}parentNode(e){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(e)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},rm=class extends im{constructor(e,t,n,r,o,s,a,c){super(e,o,s,a),this.sharedStylesHost=t,this.removeStylesOnCompDestroy=r,this.styles=c?TL(c,n.styles):n.styles}applyStyles(){this.sharedStylesHost.addStyles(this.styles)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles)}},hb=class extends rm{constructor(e,t,n,r,o,s,a,c){let l=r+"-"+n.id;super(e,t,n,o,s,a,c,l),this.contentAttr=Hq(l),this.hostAttr=Gq(l)}applyToHost(e){this.applyStyles(),this.setAttribute(e,this.hostAttr,"")}createElement(e,t){let n=super.createElement(e,t);return super.setAttribute(n,this.contentAttr,""),n}},jq=(()=>{let e=class e extends nm{constructor(n){super(n)}supports(n){return!0}addEventListener(n,r,o){return n.addEventListener(r,o,!1),()=>this.removeEventListener(n,r,o)}removeEventListener(n,r,o){return n.removeEventListener(r,o)}};e.\u0275fac=function(r){return new(r||e)(X(Xe))},e.\u0275prov=J({token:e,factory:e.\u0275fac});let i=e;return i})(),Wq=(()=>{let e=class e extends nm{constructor(n){super(n),this.delegate=te(nL,{optional:!0})}supports(n){return this.delegate?this.delegate.supports(n):!1}addEventListener(n,r,o){return this.delegate.addEventListener(n,r,o)}removeEventListener(n,r,o){return this.delegate.removeEventListener(n,r,o)}};e.\u0275fac=function(r){return new(r||e)(X(Xe))},e.\u0275prov=J({token:e,factory:e.\u0275fac});let i=e;return i})(),SL=["alt","control","meta","shift"],$q={"\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"},qq={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey},Yq=(()=>{let e=class e extends nm{constructor(n){super(n)}supports(n){return e.parseEventName(n)!=null}addEventListener(n,r,o){let s=e.parseEventName(r),a=e.eventCallback(s.fullKey,o,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Oa().onAndCancel(n,s.domEventName,a))}static parseEventName(n){let r=n.toLowerCase().split("."),o=r.shift();if(r.length===0||!(o==="keydown"||o==="keyup"))return null;let s=e._normalizeKey(r.pop()),a="",c=r.indexOf("code");if(c>-1&&(r.splice(c,1),a="code."),SL.forEach(d=>{let u=r.indexOf(d);u>-1&&(r.splice(u,1),a+=d+".")}),a+=s,r.length!=0||s.length===0)return null;let l={};return l.domEventName=o,l.fullKey=a,l}static matchEventFullKeyCode(n,r){let o=$q[n.key]||n.key,s="";return r.indexOf("code.")>-1&&(o=n.code,s="code."),o==null||!o?!1:(o=o.toLowerCase(),o===" "?o="space":o==="."&&(o="dot"),SL.forEach(a=>{if(a!==o){let c=qq[a];c(n)&&(s+=a+".")}}),s+=o,s===r)}static eventCallback(n,r,o){return s=>{e.matchEventFullKeyCode(s,n)&&o.runGuarded(()=>r(s))}}static _normalizeKey(n){return n==="esc"?"escape":n}};e.\u0275fac=function(r){return new(r||e)(X(Xe))},e.\u0275prov=J({token:e,factory:e.\u0275fac});let i=e;return i})();function DL(i,e){return tL(Z({rootComponent:i},Xq(e)))}function Xq(i){return{appProviders:[...eY,...i?.providers??[]],platformProviders:Jq}}function Zq(){m1.makeCurrent()}function Qq(){return new Nr}function Kq(){return yk(document),document}var Jq=[{provide:Da,useValue:r1},{provide:CE,useValue:Zq,multi:!0},{provide:Xe,useFactory:Kq,deps:[]}];var eY=[{provide:A0,useValue:"root"},{provide:Nr,useFactory:Qq,deps:[]},{provide:db,useClass:jq,multi:!0,deps:[Xe,Fe,Da]},{provide:db,useClass:Yq,multi:!0,deps:[Xe]},{provide:db,useClass:Wq,multi:!0},ub,EL,ML,{provide:Pc,useExisting:ub},{provide:ob,useClass:Fq,deps:[]},[]];var PL=(()=>{let e=class e{constructor(n){this._doc=n}getTitle(){return this._doc.title}setTitle(n){this._doc.title=n||""}};e.\u0275fac=function(r){return new(r||e)(X(Xe))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var v1=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:function(r){let o=null;return r?o=new(r||e):o=X(tY),o},providedIn:"root"});let i=e;return i})(),tY=(()=>{let e=class e extends v1{constructor(n){super(),this._doc=n}sanitize(n,r){if(r==null)return null;switch(n){case Fr.NONE:return r;case Fr.HTML:return Ql(r,"HTML")?Hs(r):Rk(this._doc,String(r)).toString();case Fr.STYLE:return Ql(r,"Style")?Hs(r):r;case Fr.SCRIPT:if(Ql(r,"Script"))return Hs(r);throw new Oe(5200,!1);case Fr.URL:return Ql(r,"URL")?Hs(r):q0(String(r));case Fr.RESOURCE_URL:if(Ql(r,"ResourceURL"))return Hs(r);throw new Oe(5201,!1);default:throw new Oe(5202,!1)}}bypassSecurityTrustHtml(n){return wk(n)}bypassSecurityTrustStyle(n){return Ck(n)}bypassSecurityTrustScript(n){return Sk(n)}bypassSecurityTrustUrl(n){return Mk(n)}bypassSecurityTrustResourceUrl(n){return Ek(n)}};e.\u0275fac=function(r){return new(r||e)(X(Xe))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Qt="primary",xm=Symbol("RouteTitle"),C1=class{constructor(e){this.params=e||{}}has(e){return Object.prototype.hasOwnProperty.call(this.params,e)}get(e){if(this.has(e)){let t=this.params[e];return Array.isArray(t)?t[0]:t}return null}getAll(e){if(this.has(e)){let t=this.params[e];return Array.isArray(t)?t:[t]}return[]}get keys(){return Object.keys(this.params)}};function ph(i){return new C1(i)}function nY(i,e,t){let n=t.path.split("/");if(n.length>i.length||t.pathMatch==="full"&&(e.hasChildren()||n.lengthn[o]===r)}else return i===e}function zL(i){return i.length>0?i[i.length-1]:null}function Lc(i){return Fl(i)?i:ed(i)?Jn(Promise.resolve(i)):Ke(i)}var rY={exact:HL,subset:GL},UL={exact:oY,subset:sY,ignored:()=>!0};function RL(i,e,t){return rY[t.paths](i.root,e.root,t.matrixParams)&&UL[t.queryParams](i.queryParams,e.queryParams)&&!(t.fragment==="exact"&&i.fragment!==e.fragment)}function oY(i,e){return js(i,e)}function HL(i,e,t){if(!rd(i.segments,e.segments)||!mb(i.segments,e.segments,t)||i.numberOfChildren!==e.numberOfChildren)return!1;for(let n in e.children)if(!i.children[n]||!HL(i.children[n],e.children[n],t))return!1;return!0}function sY(i,e){return Object.keys(e).length<=Object.keys(i).length&&Object.keys(e).every(t=>VL(i[t],e[t]))}function GL(i,e,t){return jL(i,e,e.segments,t)}function jL(i,e,t,n){if(i.segments.length>t.length){let r=i.segments.slice(0,t.length);return!(!rd(r,t)||e.hasChildren()||!mb(r,t,n))}else if(i.segments.length===t.length){if(!rd(i.segments,t)||!mb(i.segments,t,n))return!1;for(let r in e.children)if(!i.children[r]||!GL(i.children[r],e.children[r],n))return!1;return!0}else{let r=t.slice(0,i.segments.length),o=t.slice(i.segments.length);return!rd(i.segments,r)||!mb(i.segments,r,n)||!i.children[Qt]?!1:jL(i.children[Qt],e,o,n)}}function mb(i,e,t){return e.every((n,r)=>UL[t](i[r].parameters,n.parameters))}var Na=class{constructor(e=new Dn([],{}),t={},n=null){this.root=e,this.queryParams=t,this.fragment=n}get queryParamMap(){return this._queryParamMap??=ph(this.queryParams),this._queryParamMap}toString(){return lY.serialize(this)}},Dn=class{constructor(e,t){this.segments=e,this.children=t,this.parent=null,Object.values(t).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return gb(this)}},id=class{constructor(e,t){this.path=e,this.parameters=t}get parameterMap(){return this._parameterMap??=ph(this.parameters),this._parameterMap}toString(){return $L(this)}};function aY(i,e){return rd(i,e)&&i.every((t,n)=>js(t.parameters,e[n].parameters))}function rd(i,e){return i.length!==e.length?!1:i.every((t,n)=>t.path===e[n].path)}function cY(i,e){let t=[];return Object.entries(i.children).forEach(([n,r])=>{n===Qt&&(t=t.concat(e(r,n)))}),Object.entries(i.children).forEach(([n,r])=>{n!==Qt&&(t=t.concat(e(r,n)))}),t}var Z1=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:()=>new um,providedIn:"root"});let i=e;return i})(),um=class{parse(e){let t=new E1(e);return new Na(t.parseRootSegment(),t.parseQueryParams(),t.parseFragment())}serialize(e){let t=`/${om(e.root,!0)}`,n=hY(e.queryParams),r=typeof e.fragment=="string"?`#${dY(e.fragment)}`:"";return`${t}${n}${r}`}},lY=new um;function gb(i){return i.segments.map(e=>$L(e)).join("/")}function om(i,e){if(!i.hasChildren())return gb(i);if(e){let t=i.children[Qt]?om(i.children[Qt],!1):"",n=[];return Object.entries(i.children).forEach(([r,o])=>{r!==Qt&&n.push(`${r}:${om(o,!1)}`)}),n.length>0?`${t}(${n.join("//")})`:t}else{let t=cY(i,(n,r)=>r===Qt?[om(i.children[Qt],!1)]:[`${r}:${om(n,!1)}`]);return Object.keys(i.children).length===1&&i.children[Qt]!=null?`${gb(i)}/${t[0]}`:`${gb(i)}/(${t.join("//")})`}}function WL(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function pb(i){return WL(i).replace(/%3B/gi,";")}function dY(i){return encodeURI(i)}function M1(i){return WL(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function _b(i){return decodeURIComponent(i)}function AL(i){return _b(i.replace(/\+/g,"%20"))}function $L(i){return`${M1(i.path)}${uY(i.parameters)}`}function uY(i){return Object.entries(i).map(([e,t])=>`;${M1(e)}=${M1(t)}`).join("")}function hY(i){let e=Object.entries(i).map(([t,n])=>Array.isArray(n)?n.map(r=>`${pb(t)}=${pb(r)}`).join("&"):`${pb(t)}=${pb(n)}`).filter(t=>t);return e.length?`?${e.join("&")}`:""}var pY=/^[^\/()?;#]+/;function b1(i){let e=i.match(pY);return e?e[0]:""}var fY=/^[^\/()?;=#]+/;function mY(i){let e=i.match(fY);return e?e[0]:""}var gY=/^[^=?&#]+/;function _Y(i){let e=i.match(gY);return e?e[0]:""}var vY=/^[^&#]+/;function bY(i){let e=i.match(vY);return e?e[0]:""}var E1=class{constructor(e){this.url=e,this.remaining=e}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new Dn([],{}):new Dn([],this.parseChildren())}parseQueryParams(){let e={};if(this.consumeOptional("?"))do this.parseQueryParam(e);while(this.consumeOptional("&"));return e}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let e=[];for(this.peekStartsWith("(")||e.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),e.push(this.parseSegment());let t={};this.peekStartsWith("/(")&&(this.capture("/"),t=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(e.length>0||Object.keys(t).length>0)&&(n[Qt]=new Dn(e,t)),n}parseSegment(){let e=b1(this.remaining);if(e===""&&this.peekStartsWith(";"))throw new Oe(4009,!1);return this.capture(e),new id(_b(e),this.parseMatrixParams())}parseMatrixParams(){let e={};for(;this.consumeOptional(";");)this.parseParam(e);return e}parseParam(e){let t=mY(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){let r=b1(this.remaining);r&&(n=r,this.capture(n))}e[_b(t)]=_b(n)}parseQueryParam(e){let t=_Y(this.remaining);if(!t)return;this.capture(t);let n="";if(this.consumeOptional("=")){let s=bY(this.remaining);s&&(n=s,this.capture(n))}let r=AL(t),o=AL(n);if(e.hasOwnProperty(r)){let s=e[r];Array.isArray(s)||(s=[s],e[r]=s),s.push(o)}else e[r]=o}parseParens(e){let t={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let n=b1(this.remaining),r=this.remaining[n.length];if(r!=="/"&&r!==")"&&r!==";")throw new Oe(4010,!1);let o;n.indexOf(":")>-1?(o=n.slice(0,n.indexOf(":")),this.capture(o),this.capture(":")):e&&(o=Qt);let s=this.parseChildren();t[o]=Object.keys(s).length===1?s[Qt]:new Dn([],s),this.consumeOptional("//")}return t}peekStartsWith(e){return this.remaining.startsWith(e)}consumeOptional(e){return this.peekStartsWith(e)?(this.remaining=this.remaining.substring(e.length),!0):!1}capture(e){if(!this.consumeOptional(e))throw new Oe(4011,!1)}};function qL(i){return i.segments.length>0?new Dn([],{[Qt]:i}):i}function YL(i){let e={};for(let[n,r]of Object.entries(i.children)){let o=YL(r);if(n===Qt&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))e[s]=a;else(o.segments.length>0||o.hasChildren())&&(e[n]=o)}let t=new Dn(i.segments,e);return yY(t)}function yY(i){if(i.numberOfChildren===1&&i.children[Qt]){let e=i.children[Qt];return new Dn(i.segments.concat(e.segments),e.children)}return i}function hm(i){return i instanceof Na}function xY(i,e,t=null,n=null){let r=XL(i);return ZL(r,e,t,n)}function XL(i){let e;function t(o){let s={};for(let c of o.children){let l=t(c);s[c.outlet]=l}let a=new Dn(o.url,s);return o===i&&(e=a),a}let n=t(i.root),r=qL(n);return e??r}function ZL(i,e,t,n){let r=i;for(;r.parent;)r=r.parent;if(e.length===0)return y1(r,r,r,t,n);let o=wY(e);if(o.toRoot())return y1(r,r,new Dn([],{}),t,n);let s=CY(o,r,i),a=s.processChildren?cm(s.segmentGroup,s.index,o.commands):KL(s.segmentGroup,s.index,o.commands);return y1(r,s.segmentGroup,a,t,n)}function vb(i){return typeof i=="object"&&i!=null&&!i.outlets&&!i.segmentPath}function pm(i){return typeof i=="object"&&i!=null&&i.outlets}function y1(i,e,t,n,r){let o={};n&&Object.entries(n).forEach(([c,l])=>{o[c]=Array.isArray(l)?l.map(d=>`${d}`):`${l}`});let s;i===e?s=t:s=QL(i,e,t);let a=qL(YL(s));return new Na(a,o,r)}function QL(i,e,t){let n={};return Object.entries(i.children).forEach(([r,o])=>{o===e?n[r]=t:n[r]=QL(o,e,t)}),new Dn(i.segments,n)}var bb=class{constructor(e,t,n){if(this.isAbsolute=e,this.numberOfDoubleDots=t,this.commands=n,e&&n.length>0&&vb(n[0]))throw new Oe(4003,!1);let r=n.find(pm);if(r&&r!==zL(n))throw new Oe(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function wY(i){if(typeof i[0]=="string"&&i.length===1&&i[0]==="/")return new bb(!0,0,i);let e=0,t=!1,n=i.reduce((r,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([c,l])=>{a[c]=typeof l=="string"?l.split("/"):l}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return typeof o!="string"?[...r,o]:s===0?(o.split("/").forEach((a,c)=>{c==0&&a==="."||(c==0&&a===""?t=!0:a===".."?e++:a!=""&&r.push(a))}),r):[...r,o]},[]);return new bb(t,e,n)}var dh=class{constructor(e,t,n){this.segmentGroup=e,this.processChildren=t,this.index=n}};function CY(i,e,t){if(i.isAbsolute)return new dh(e,!0,0);if(!t)return new dh(e,!1,NaN);if(t.parent===null)return new dh(t,!0,0);let n=vb(i.commands[0])?0:1,r=t.segments.length-1+n;return SY(t,r,i.numberOfDoubleDots)}function SY(i,e,t){let n=i,r=e,o=t;for(;o>r;){if(o-=r,n=n.parent,!n)throw new Oe(4005,!1);r=n.segments.length}return new dh(n,!1,r-o)}function MY(i){return pm(i[0])?i[0].outlets:{[Qt]:i}}function KL(i,e,t){if(i??=new Dn([],{}),i.segments.length===0&&i.hasChildren())return cm(i,e,t);let n=EY(i,e,t),r=t.slice(n.commandIndex);if(n.match&&n.pathIndexo!==Qt)&&i.children[Qt]&&i.numberOfChildren===1&&i.children[Qt].segments.length===0){let o=cm(i.children[Qt],e,t);return new Dn(i.segments,o.children)}return Object.entries(n).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(r[o]=KL(i.children[o],e,s))}),Object.entries(i.children).forEach(([o,s])=>{n[o]===void 0&&(r[o]=s)}),new Dn(i.segments,r)}}function EY(i,e,t){let n=0,r=e,o={match:!1,pathIndex:0,commandIndex:0};for(;r=t.length)return o;let s=i.segments[r],a=t[n];if(pm(a))break;let c=`${a}`,l=n0&&c===void 0)break;if(c&&l&&typeof l=="object"&&l.outlets===void 0){if(!kL(c,l,s))return o;n+=2}else{if(!kL(c,{},s))return o;n++}r++}return{match:!0,pathIndex:r,commandIndex:n}}function I1(i,e,t){let n=i.segments.slice(0,e),r=0;for(;r{typeof n=="string"&&(n=[n]),n!==null&&(e[t]=I1(new Dn([],{}),0,n))}),e}function NL(i){let e={};return Object.entries(i).forEach(([t,n])=>e[t]=`${n}`),e}function kL(i,e,t){return i==t.path&&js(e,t.parameters)}var lm="imperative",Ji=function(i){return i[i.NavigationStart=0]="NavigationStart",i[i.NavigationEnd=1]="NavigationEnd",i[i.NavigationCancel=2]="NavigationCancel",i[i.NavigationError=3]="NavigationError",i[i.RoutesRecognized=4]="RoutesRecognized",i[i.ResolveStart=5]="ResolveStart",i[i.ResolveEnd=6]="ResolveEnd",i[i.GuardsCheckStart=7]="GuardsCheckStart",i[i.GuardsCheckEnd=8]="GuardsCheckEnd",i[i.RouteConfigLoadStart=9]="RouteConfigLoadStart",i[i.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",i[i.ChildActivationStart=11]="ChildActivationStart",i[i.ChildActivationEnd=12]="ChildActivationEnd",i[i.ActivationStart=13]="ActivationStart",i[i.ActivationEnd=14]="ActivationEnd",i[i.Scroll=15]="Scroll",i[i.NavigationSkipped=16]="NavigationSkipped",i}(Ji||{}),Bo=class{constructor(e,t){this.id=e,this.url=t}},fm=class extends Bo{constructor(e,t,n="imperative",r=null){super(e,t),this.type=Ji.NavigationStart,this.navigationTrigger=n,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},od=class extends Bo{constructor(e,t,n){super(e,t),this.urlAfterRedirects=n,this.type=Ji.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},mo=function(i){return i[i.Redirect=0]="Redirect",i[i.SupersededByNewNavigation=1]="SupersededByNewNavigation",i[i.NoDataFromResolver=2]="NoDataFromResolver",i[i.GuardRejected=3]="GuardRejected",i}(mo||{}),T1=function(i){return i[i.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",i[i.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",i}(T1||{}),Aa=class extends Bo{constructor(e,t,n,r){super(e,t),this.reason=n,this.code=r,this.type=Ji.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},sd=class extends Bo{constructor(e,t,n,r){super(e,t),this.reason=n,this.code=r,this.type=Ji.NavigationSkipped}},mm=class extends Bo{constructor(e,t,n,r){super(e,t),this.error=n,this.target=r,this.type=Ji.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},yb=class extends Bo{constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r,this.type=Ji.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},D1=class extends Bo{constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r,this.type=Ji.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},P1=class extends Bo{constructor(e,t,n,r,o){super(e,t),this.urlAfterRedirects=n,this.state=r,this.shouldActivate=o,this.type=Ji.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},O1=class extends Bo{constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r,this.type=Ji.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},R1=class extends Bo{constructor(e,t,n,r){super(e,t),this.urlAfterRedirects=n,this.state=r,this.type=Ji.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},A1=class{constructor(e){this.route=e,this.type=Ji.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},N1=class{constructor(e){this.route=e,this.type=Ji.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},k1=class{constructor(e){this.snapshot=e,this.type=Ji.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},L1=class{constructor(e){this.snapshot=e,this.type=Ji.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},F1=class{constructor(e){this.snapshot=e,this.type=Ji.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},B1=class{constructor(e){this.snapshot=e,this.type=Ji.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var gm=class{},fh=class{constructor(e,t){this.url=e,this.navigationBehaviorOptions=t}};function TY(i,e){return i.providers&&!i._injector&&(i._injector=qE(i.providers,e,`Route: ${i.path}`)),i._injector??e}function ps(i){return i.outlet||Qt}function DY(i,e){let t=i.filter(n=>ps(n)===e);return t.push(...i.filter(n=>ps(n)!==e)),t}function wm(i){if(!i)return null;if(i.routeConfig?._injector)return i.routeConfig._injector;for(let e=i.parent;e;e=e.parent){let t=e.routeConfig;if(t?._loadedInjector)return t._loadedInjector;if(t?._injector)return t._injector}return null}var V1=class{get injector(){return wm(this.route?.snapshot)??this.rootInjector}set injector(e){}constructor(e){this.rootInjector=e,this.outlet=null,this.route=null,this.children=new Ib(this.rootInjector),this.attachRef=null}},Ib=(()=>{let e=class e{constructor(n){this.rootInjector=n,this.contexts=new Map}onChildOutletCreated(n,r){let o=this.getOrCreateContext(n);o.outlet=r,this.contexts.set(n,o)}onChildOutletDestroyed(n){let r=this.getContext(n);r&&(r.outlet=null,r.attachRef=null)}onOutletDeactivated(){let n=this.contexts;return this.contexts=new Map,n}onOutletReAttached(n){this.contexts=n}getOrCreateContext(n){let r=this.getContext(n);return r||(r=new V1(this.rootInjector),this.contexts.set(n,r)),r}getContext(n){return this.contexts.get(n)||null}};e.\u0275fac=function(r){return new(r||e)(X(Xi))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),xb=class{constructor(e){this._root=e}get root(){return this._root.value}parent(e){let t=this.pathFromRoot(e);return t.length>1?t[t.length-2]:null}children(e){let t=z1(e,this._root);return t?t.children.map(n=>n.value):[]}firstChild(e){let t=z1(e,this._root);return t&&t.children.length>0?t.children[0].value:null}siblings(e){let t=U1(e,this._root);return t.length<2?[]:t[t.length-2].children.map(r=>r.value).filter(r=>r!==e)}pathFromRoot(e){return U1(e,this._root).map(t=>t.value)}};function z1(i,e){if(i===e.value)return e;for(let t of e.children){let n=z1(i,t);if(n)return n}return null}function U1(i,e){if(i===e.value)return[e];for(let t of e.children){let n=U1(i,t);if(n.length)return n.unshift(e),n}return[]}var fo=class{constructor(e,t){this.value=e,this.children=t}toString(){return`TreeNode(${this.value})`}};function lh(i){let e={};return i&&i.children.forEach(t=>e[t.value.outlet]=t),e}var wb=class extends xb{constructor(e,t){super(e),this.snapshot=t,Q1(this,e)}toString(){return this.snapshot.toString()}};function JL(i){let e=PY(i),t=new On([new id("",{})]),n=new On({}),r=new On({}),o=new On({}),s=new On(""),a=new kc(t,n,o,s,r,Qt,i,e.root);return a.snapshot=e.root,new wb(new fo(a,[]),e)}function PY(i){let e={},t={},n={},r="",o=new uh([],e,n,r,t,Qt,i,null,{});return new Sb("",new fo(o,[]))}var kc=class{constructor(e,t,n,r,o,s,a,c){this.urlSubject=e,this.paramsSubject=t,this.queryParamsSubject=n,this.fragmentSubject=r,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=c,this.title=this.dataSubject?.pipe(Je(l=>l[xm]))??Ke(void 0),this.url=e,this.params=t,this.queryParams=n,this.fragment=r,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(Je(e=>ph(e))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(Je(e=>ph(e))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function Cb(i,e,t="emptyOnly"){let n,{routeConfig:r}=i;return e!==null&&(t==="always"||r?.path===""||!e.component&&!e.routeConfig?.loadComponent)?n={params:Z(Z({},e.params),i.params),data:Z(Z({},e.data),i.data),resolve:Z(Z(Z(Z({},i.data),e.data),r?.data),i._resolvedData)}:n={params:Z({},i.params),data:Z({},i.data),resolve:Z(Z({},i.data),i._resolvedData??{})},r&&tF(r)&&(n.resolve[xm]=r.title),n}var uh=class{get title(){return this.data?.[xm]}constructor(e,t,n,r,o,s,a,c,l){this.url=e,this.params=t,this.queryParams=n,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=c,this._resolve=l}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=ph(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=ph(this.queryParams),this._queryParamMap}toString(){let e=this.url.map(n=>n.toString()).join("/"),t=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${e}', path:'${t}')`}},Sb=class extends xb{constructor(e,t){super(t),this.url=e,Q1(this,t)}toString(){return eF(this._root)}};function Q1(i,e){e.value._routerState=i,e.children.forEach(t=>Q1(i,t))}function eF(i){let e=i.children.length>0?` { ${i.children.map(eF).join(", ")} } `:"";return`${i.value}${e}`}function x1(i){if(i.snapshot){let e=i.snapshot,t=i._futureSnapshot;i.snapshot=t,js(e.queryParams,t.queryParams)||i.queryParamsSubject.next(t.queryParams),e.fragment!==t.fragment&&i.fragmentSubject.next(t.fragment),js(e.params,t.params)||i.paramsSubject.next(t.params),iY(e.url,t.url)||i.urlSubject.next(t.url),js(e.data,t.data)||i.dataSubject.next(t.data)}else i.snapshot=i._futureSnapshot,i.dataSubject.next(i._futureSnapshot.data)}function H1(i,e){let t=js(i.params,e.params)&&aY(i.url,e.url),n=!i.parent!=!e.parent;return t&&!n&&(!i.parent||H1(i.parent,e.parent))}function tF(i){return typeof i.title=="string"||i.title===null}var K1=(()=>{let e=class e{constructor(){this.activated=null,this._activatedRoute=null,this.name=Qt,this.activateEvents=new Ie,this.deactivateEvents=new Ie,this.attachEvents=new Ie,this.detachEvents=new Ie,this.parentContexts=te(Ib),this.location=te(Zt),this.changeDetector=te(Ne),this.inputBinder=te(J1,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(n){if(n.name){let{firstChange:r,previousValue:o}=n.name;if(r)return;this.isTrackedInParentContexts(o)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(o)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(n){return this.parentContexts.getContext(n)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let n=this.parentContexts.getContext(this.name);n?.route&&(n.attachRef?this.attach(n.attachRef,n.route):this.activateWith(n.route,n.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new Oe(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new Oe(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new Oe(4012,!1);this.location.detach();let n=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(n.instance),n}attach(n,r){this.activated=n,this._activatedRoute=r,this.location.insert(n.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(n.instance)}deactivate(){if(this.activated){let n=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(n)}}activateWith(n,r){if(this.isActivated)throw new Oe(4013,!1);this._activatedRoute=n;let o=this.location,a=n.snapshot.component,c=this.parentContexts.getOrCreateContext(this.name).children,l=new G1(n,c,o.injector);this.activated=o.createComponent(a,{index:o.length,injector:l,environmentInjector:r}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=Ve({type:e,selectors:[["router-outlet"]],inputs:{name:"name"},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[dn]});let i=e;return i})(),G1=class i{__ngOutletInjector(e){return new i(this.route,this.childContexts,e)}constructor(e,t,n){this.route=e,this.childContexts=t,this.parent=n}get(e,t){return e===kc?this.route:e===Ib?this.childContexts:this.parent.get(e,t)}},J1=new me("");function OY(i,e,t){let n=_m(i,e._root,t?t._root:void 0);return new wb(n,e)}function _m(i,e,t){if(t&&i.shouldReuseRoute(e.value,t.value.snapshot)){let n=t.value;n._futureSnapshot=e.value;let r=RY(i,e,t);return new fo(n,r)}else{if(i.shouldAttach(e.value)){let o=i.retrieve(e.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=e.value,s.children=e.children.map(a=>_m(i,a)),s}}let n=AY(e.value),r=e.children.map(o=>_m(i,o));return new fo(n,r)}}function RY(i,e,t){return e.children.map(n=>{for(let r of t.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return _m(i,n,r);return _m(i,n)})}function AY(i){return new kc(new On(i.url),new On(i.params),new On(i.queryParams),new On(i.fragment),new On(i.data),i.outlet,i.component,i)}var vm=class{constructor(e,t){this.redirectTo=e,this.navigationBehaviorOptions=t}},nF="ngNavigationCancelingError";function Mb(i,e){let{redirectTo:t,navigationBehaviorOptions:n}=hm(e)?{redirectTo:e,navigationBehaviorOptions:void 0}:e,r=iF(!1,mo.Redirect);return r.url=t,r.navigationBehaviorOptions=n,r}function iF(i,e){let t=new Error(`NavigationCancelingError: ${i||""}`);return t[nF]=!0,t.cancellationCode=e,t}function NY(i){return rF(i)&&hm(i.url)}function rF(i){return!!i&&i[nF]}var kY=(i,e,t,n)=>Je(r=>(new j1(e,r.targetRouterState,r.currentRouterState,t,n).activate(i),r)),j1=class{constructor(e,t,n,r,o){this.routeReuseStrategy=e,this.futureState=t,this.currState=n,this.forwardEvent=r,this.inputBindingEnabled=o}activate(e){let t=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(t,n,e),x1(this.futureState.root),this.activateChildRoutes(t,n,e)}deactivateChildRoutes(e,t,n){let r=lh(t);e.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,r[s],n),delete r[s]}),Object.values(r).forEach(o=>{this.deactivateRouteAndItsChildren(o,n)})}deactivateRoutes(e,t,n){let r=e.value,o=t?t.value:null;if(r===o)if(r.component){let s=n.getContext(r.outlet);s&&this.deactivateChildRoutes(e,t,s.children)}else this.deactivateChildRoutes(e,t,n);else o&&this.deactivateRouteAndItsChildren(t,n)}deactivateRouteAndItsChildren(e,t){e.value.component&&this.routeReuseStrategy.shouldDetach(e.value.snapshot)?this.detachAndStoreRouteSubtree(e,t):this.deactivateRouteAndOutlet(e,t)}detachAndStoreRouteSubtree(e,t){let n=t.getContext(e.value.outlet),r=n&&e.value.component?n.children:t,o=lh(e);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);if(n&&n.outlet){let s=n.outlet.detach(),a=n.children.onOutletDeactivated();this.routeReuseStrategy.store(e.value.snapshot,{componentRef:s,route:e,contexts:a})}}deactivateRouteAndOutlet(e,t){let n=t.getContext(e.value.outlet),r=n&&e.value.component?n.children:t,o=lh(e);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(e,t,n){let r=lh(t);e.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],n),this.forwardEvent(new B1(o.value.snapshot))}),e.children.length&&this.forwardEvent(new L1(e.value.snapshot))}activateRoutes(e,t,n){let r=e.value,o=t?t.value:null;if(x1(r),r===o)if(r.component){let s=n.getOrCreateContext(r.outlet);this.activateChildRoutes(e,t,s.children)}else this.activateChildRoutes(e,t,n);else if(r.component){let s=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){let a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),x1(a.route.value),this.activateChildRoutes(e,null,s.children)}else s.attachRef=null,s.route=r,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(e,null,s.children)}else this.activateChildRoutes(e,null,n)}},Eb=class{constructor(e){this.path=e,this.route=this.path[this.path.length-1]}},hh=class{constructor(e,t){this.component=e,this.route=t}};function LY(i,e,t){let n=i._root,r=e?e._root:null;return sm(n,r,t,[n.value])}function FY(i){let e=i.routeConfig?i.routeConfig.canActivateChild:null;return!e||e.length===0?null:{node:i,guards:e}}function gh(i,e){let t=Symbol(),n=e.get(i,t);return n===t?typeof i=="function"&&!lN(i)?i:e.get(i):n}function sm(i,e,t,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=lh(e);return i.children.forEach(s=>{BY(s,o[s.value.outlet],t,n.concat([s.value]),r),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>dm(a,t.getContext(s),r)),r}function BY(i,e,t,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=i.value,s=e?e.value:null,a=t?t.getContext(i.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let c=VY(s,o,o.routeConfig.runGuardsAndResolvers);c?r.canActivateChecks.push(new Eb(n)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?sm(i,e,a?a.children:null,n,r):sm(i,e,t,n,r),c&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new hh(a.outlet.component,s))}else s&&dm(e,a,r),r.canActivateChecks.push(new Eb(n)),o.component?sm(i,null,a?a.children:null,n,r):sm(i,null,t,n,r);return r}function VY(i,e,t){if(typeof t=="function")return t(i,e);switch(t){case"pathParamsChange":return!rd(i.url,e.url);case"pathParamsOrQueryParamsChange":return!rd(i.url,e.url)||!js(i.queryParams,e.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!H1(i,e)||!js(i.queryParams,e.queryParams);case"paramsChange":default:return!H1(i,e)}}function dm(i,e,t){let n=lh(i),r=i.value;Object.entries(n).forEach(([o,s])=>{r.component?e?dm(s,e.children.getContext(o),t):dm(s,null,t):dm(s,e,t)}),r.component?e&&e.outlet&&e.outlet.isActivated?t.canDeactivateChecks.push(new hh(e.outlet.component,r)):t.canDeactivateChecks.push(new hh(null,r)):t.canDeactivateChecks.push(new hh(null,r))}function Cm(i){return typeof i=="function"}function zY(i){return typeof i=="boolean"}function UY(i){return i&&Cm(i.canLoad)}function HY(i){return i&&Cm(i.canActivate)}function GY(i){return i&&Cm(i.canActivateChild)}function jY(i){return i&&Cm(i.canDeactivate)}function WY(i){return i&&Cm(i.canMatch)}function oF(i){return i instanceof wa||i?.name==="EmptyError"}var fb=Symbol("INITIAL_VALUE");function mh(){return Qn(i=>eo(i.map(e=>e.pipe(_n(1),gi(fb)))).pipe(Je(e=>{for(let t of e)if(t!==!0){if(t===fb)return fb;if(t===!1||$Y(t))return t}return!0}),qt(e=>e!==fb),_n(1)))}function $Y(i){return hm(i)||i instanceof vm}function qY(i,e){return ti(t=>{let{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=t;return s.length===0&&o.length===0?Ke(yt(Z({},t),{guardsResult:!0})):YY(s,n,r,i).pipe(ti(a=>a&&zY(a)?XY(n,o,i,e):Ke(a)),Je(a=>yt(Z({},t),{guardsResult:a})))})}function YY(i,e,t,n){return Jn(i).pipe(ti(r=>eX(r.component,r.route,t,e,n)),Rs(r=>r!==!0,!0))}function XY(i,e,t,n){return Jn(e).pipe(bc(r=>Ps(QY(r.route.parent,n),ZY(r.route,n),JY(i,r.path,t),KY(i,r.route,t))),Rs(r=>r!==!0,!0))}function ZY(i,e){return i!==null&&e&&e(new F1(i)),Ke(!0)}function QY(i,e){return i!==null&&e&&e(new k1(i)),Ke(!0)}function KY(i,e,t){let n=e.routeConfig?e.routeConfig.canActivate:null;if(!n||n.length===0)return Ke(!0);let r=n.map(o=>Po(()=>{let s=wm(e)??t,a=gh(o,s),c=HY(a)?a.canActivate(e,i):Vs(s,()=>a(e,i));return Lc(c).pipe(Rs())}));return Ke(r).pipe(mh())}function JY(i,e,t){let n=e[e.length-1],o=e.slice(0,e.length-1).reverse().map(s=>FY(s)).filter(s=>s!==null).map(s=>Po(()=>{let a=s.guards.map(c=>{let l=wm(s.node)??t,d=gh(c,l),u=GY(d)?d.canActivateChild(n,i):Vs(l,()=>d(n,i));return Lc(u).pipe(Rs())});return Ke(a).pipe(mh())}));return Ke(o).pipe(mh())}function eX(i,e,t,n,r){let o=e&&e.routeConfig?e.routeConfig.canDeactivate:null;if(!o||o.length===0)return Ke(!0);let s=o.map(a=>{let c=wm(e)??r,l=gh(a,c),d=jY(l)?l.canDeactivate(i,e,t,n):Vs(c,()=>l(i,e,t,n));return Lc(d).pipe(Rs())});return Ke(s).pipe(mh())}function tX(i,e,t,n){let r=e.canLoad;if(r===void 0||r.length===0)return Ke(!0);let o=r.map(s=>{let a=gh(s,i),c=UY(a)?a.canLoad(e,t):Vs(i,()=>a(e,t));return Lc(c)});return Ke(o).pipe(mh(),sF(n))}function sF(i){return wS(En(e=>{if(typeof e!="boolean")throw Mb(i,e)}),Je(e=>e===!0))}function nX(i,e,t,n){let r=e.canMatch;if(!r||r.length===0)return Ke(!0);let o=r.map(s=>{let a=gh(s,i),c=WY(a)?a.canMatch(e,t):Vs(i,()=>a(e,t));return Lc(c)});return Ke(o).pipe(mh(),sF(n))}var bm=class{constructor(e){this.segmentGroup=e||null}},ym=class extends Error{constructor(e){super(),this.urlTree=e}};function ch(i){return vc(new bm(i))}function iX(i){return vc(new Oe(4e3,!1))}function rX(i){return vc(iF(!1,mo.GuardRejected))}var W1=class{constructor(e,t){this.urlSerializer=e,this.urlTree=t}lineralizeSegments(e,t){let n=[],r=t.root;for(;;){if(n=n.concat(r.segments),r.numberOfChildren===0)return Ke(n);if(r.numberOfChildren>1||!r.children[Qt])return iX(`${e.redirectTo}`);r=r.children[Qt]}}applyRedirectCommands(e,t,n,r,o){if(typeof t!="string"){let a=t,{queryParams:c,fragment:l,routeConfig:d,url:u,outlet:h,params:p,data:f,title:m}=r,y=Vs(o,()=>a({params:p,data:f,queryParams:c,fragment:l,routeConfig:d,url:u,outlet:h,title:m}));if(y instanceof Na)throw new ym(y);t=y}let s=this.applyRedirectCreateUrlTree(t,this.urlSerializer.parse(t),e,n);if(t[0]==="/")throw new ym(s);return s}applyRedirectCreateUrlTree(e,t,n,r){let o=this.createSegmentGroup(e,t.root,n,r);return new Na(o,this.createQueryParams(t.queryParams,this.urlTree.queryParams),t.fragment)}createQueryParams(e,t){let n={};return Object.entries(e).forEach(([r,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);n[r]=t[a]}else n[r]=o}),n}createSegmentGroup(e,t,n,r){let o=this.createSegments(e,t.segments,n,r),s={};return Object.entries(t.children).forEach(([a,c])=>{s[a]=this.createSegmentGroup(e,c,n,r)}),new Dn(o,s)}createSegments(e,t,n,r){return t.map(o=>o.path[0]===":"?this.findPosParam(e,o,r):this.findOrReturn(o,n))}findPosParam(e,t,n){let r=n[t.path.substring(1)];if(!r)throw new Oe(4001,!1);return r}findOrReturn(e,t){let n=0;for(let r of t){if(r.path===e.path)return t.splice(n),r;n++}return e}},$1={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function oX(i,e,t,n,r){let o=eI(i,e,t);return o.matched?(n=TY(e,n),nX(n,e,t,r).pipe(Je(s=>s===!0?o:Z({},$1)))):Ke(o)}function eI(i,e,t){if(e.path==="**")return sX(t);if(e.path==="")return e.pathMatch==="full"&&(i.hasChildren()||t.length>0)?Z({},$1):{matched:!0,consumedSegments:[],remainingSegments:t,parameters:{},positionalParamSegments:{}};let r=(e.matcher||nY)(t,i,e);if(!r)return Z({},$1);let o={};Object.entries(r.posParams??{}).forEach(([a,c])=>{o[a]=c.path});let s=r.consumed.length>0?Z(Z({},o),r.consumed[r.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:t.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function sX(i){return{matched:!0,parameters:i.length>0?zL(i).parameters:{},consumedSegments:i,remainingSegments:[],positionalParamSegments:{}}}function LL(i,e,t,n){return t.length>0&&lX(i,t,n)?{segmentGroup:new Dn(e,cX(n,new Dn(t,i.children))),slicedSegments:[]}:t.length===0&&dX(i,t,n)?{segmentGroup:new Dn(i.segments,aX(i,t,n,i.children)),slicedSegments:t}:{segmentGroup:new Dn(i.segments,i.children),slicedSegments:t}}function aX(i,e,t,n){let r={};for(let o of t)if(Tb(i,e,o)&&!n[ps(o)]){let s=new Dn([],{});r[ps(o)]=s}return Z(Z({},n),r)}function cX(i,e){let t={};t[Qt]=e;for(let n of i)if(n.path===""&&ps(n)!==Qt){let r=new Dn([],{});t[ps(n)]=r}return t}function lX(i,e,t){return t.some(n=>Tb(i,e,n)&&ps(n)!==Qt)}function dX(i,e,t){return t.some(n=>Tb(i,e,n))}function Tb(i,e,t){return(i.hasChildren()||e.length>0)&&t.pathMatch==="full"?!1:t.path===""}function uX(i,e,t,n){return ps(i)!==n&&(n===Qt||!Tb(e,t,i))?!1:eI(e,i,t).matched}function hX(i,e,t){return e.length===0&&!i.children[t]}var q1=class{};function pX(i,e,t,n,r,o,s="emptyOnly"){return new Y1(i,e,t,n,r,s,o).recognize()}var fX=31,Y1=class{constructor(e,t,n,r,o,s,a){this.injector=e,this.configLoader=t,this.rootComponentType=n,this.config=r,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new W1(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(e){return new Oe(4002,`'${e.segmentGroup}'`)}recognize(){let e=LL(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(e).pipe(Je(({children:t,rootSnapshot:n})=>{let r=new fo(n,t),o=new Sb("",r),s=xY(n,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(e){let t=new uh([],Object.freeze({}),Object.freeze(Z({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),Qt,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,e,Qt,t).pipe(Je(n=>({children:n,rootSnapshot:t})),Os(n=>{if(n instanceof ym)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof bm?this.noMatchError(n):n}))}processSegmentGroup(e,t,n,r,o){return n.segments.length===0&&n.hasChildren()?this.processChildren(e,t,n,o):this.processSegment(e,t,n,n.segments,r,!0,o).pipe(Je(s=>s instanceof fo?[s]:[]))}processChildren(e,t,n,r){let o=[];for(let s of Object.keys(n.children))s==="primary"?o.unshift(s):o.push(s);return Jn(o).pipe(bc(s=>{let a=n.children[s],c=DY(t,s);return this.processSegmentGroup(e,c,a,s,r)}),RS((s,a)=>(s.push(...a),s)),yc(null),OS(),ti(s=>{if(s===null)return ch(n);let a=aF(s);return mX(a),Ke(a)}))}processSegment(e,t,n,r,o,s,a){return Jn(t).pipe(bc(c=>this.processSegmentAgainstRoute(c._injector??e,t,c,n,r,o,s,a).pipe(Os(l=>{if(l instanceof bm)return Ke(null);throw l}))),Rs(c=>!!c),Os(c=>{if(oF(c))return hX(n,r,o)?Ke(new q1):ch(n);throw c}))}processSegmentAgainstRoute(e,t,n,r,o,s,a,c){return uX(n,r,o,s)?n.redirectTo===void 0?this.matchSegmentAgainstRoute(e,r,n,o,s,c):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(e,r,t,n,o,s,c):ch(r):ch(r)}expandSegmentAgainstRouteUsingRedirect(e,t,n,r,o,s,a){let{matched:c,parameters:l,consumedSegments:d,positionalParamSegments:u,remainingSegments:h}=eI(t,r,o);if(!c)return ch(t);typeof r.redirectTo=="string"&&r.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>fX&&(this.allowRedirects=!1));let p=new uh(o,l,Object.freeze(Z({},this.urlTree.queryParams)),this.urlTree.fragment,FL(r),ps(r),r.component??r._loadedComponent??null,r,BL(r)),f=Cb(p,a,this.paramsInheritanceStrategy);p.params=Object.freeze(f.params),p.data=Object.freeze(f.data);let m=this.applyRedirects.applyRedirectCommands(d,r.redirectTo,u,p,e);return this.applyRedirects.lineralizeSegments(r,m).pipe(ti(y=>this.processSegment(e,n,t,y.concat(h),s,!1,a)))}matchSegmentAgainstRoute(e,t,n,r,o,s){let a=oX(t,n,r,e,this.urlSerializer);return n.path==="**"&&(t.children={}),a.pipe(Qn(c=>c.matched?(e=n._injector??e,this.getChildConfig(e,n,r).pipe(Qn(({routes:l})=>{let d=n._loadedInjector??e,{parameters:u,consumedSegments:h,remainingSegments:p}=c,f=new uh(h,u,Object.freeze(Z({},this.urlTree.queryParams)),this.urlTree.fragment,FL(n),ps(n),n.component??n._loadedComponent??null,n,BL(n)),m=Cb(f,s,this.paramsInheritanceStrategy);f.params=Object.freeze(m.params),f.data=Object.freeze(m.data);let{segmentGroup:y,slicedSegments:g}=LL(t,h,p,l);if(g.length===0&&y.hasChildren())return this.processChildren(d,l,y,f).pipe(Je(x=>new fo(f,x)));if(l.length===0&&g.length===0)return Ke(new fo(f,[]));let _=ps(n)===o;return this.processSegment(d,l,y,g,_?Qt:o,!0,f).pipe(Je(x=>new fo(f,x instanceof fo?[x]:[])))}))):ch(t)))}getChildConfig(e,t,n){return t.children?Ke({routes:t.children,injector:e}):t.loadChildren?t._loadedRoutes!==void 0?Ke({routes:t._loadedRoutes,injector:t._loadedInjector}):tX(e,t,n,this.urlSerializer).pipe(ti(r=>r?this.configLoader.loadChildren(e,t).pipe(En(o=>{t._loadedRoutes=o.routes,t._loadedInjector=o.injector})):rX(t))):Ke({routes:[],injector:e})}};function mX(i){i.sort((e,t)=>e.value.outlet===Qt?-1:t.value.outlet===Qt?1:e.value.outlet.localeCompare(t.value.outlet))}function gX(i){let e=i.value.routeConfig;return e&&e.path===""}function aF(i){let e=[],t=new Set;for(let n of i){if(!gX(n)){e.push(n);continue}let r=e.find(o=>n.value.routeConfig===o.value.routeConfig);r!==void 0?(r.children.push(...n.children),t.add(r)):e.push(n)}for(let n of t){let r=aF(n.children);e.push(new fo(n.value,r))}return e.filter(n=>!t.has(n))}function FL(i){return i.data||{}}function BL(i){return i.resolve||{}}function _X(i,e,t,n,r,o){return ti(s=>pX(i,e,t,n,s.extractedUrl,r,o).pipe(Je(({state:a,tree:c})=>yt(Z({},s),{targetSnapshot:a,urlAfterRedirects:c}))))}function vX(i,e){return ti(t=>{let{targetSnapshot:n,guards:{canActivateChecks:r}}=t;if(!r.length)return Ke(t);let o=new Set(r.map(c=>c.route)),s=new Set;for(let c of o)if(!s.has(c))for(let l of cF(c))s.add(l);let a=0;return Jn(s).pipe(bc(c=>o.has(c)?bX(c,n,i,e):(c.data=Cb(c,c.parent,i).resolve,Ke(void 0))),En(()=>a++),zu(1),ti(c=>a===s.size?Ke(t):Dr))})}function cF(i){let e=i.children.map(t=>cF(t)).flat();return[i,...e]}function bX(i,e,t,n){let r=i.routeConfig,o=i._resolve;return r?.title!==void 0&&!tF(r)&&(o[xm]=r.title),yX(o,i,e,n).pipe(Je(s=>(i._resolvedData=s,i.data=Cb(i,i.parent,t).resolve,null)))}function yX(i,e,t,n){let r=S1(i);if(r.length===0)return Ke({});let o={};return Jn(r).pipe(ti(s=>xX(i[s],e,t,n).pipe(Rs(),En(a=>{if(a instanceof vm)throw Mb(new um,a);o[s]=a}))),zu(1),Rf(o),Os(s=>oF(s)?Dr:vc(s)))}function xX(i,e,t,n){let r=wm(e)??n,o=gh(i,r),s=o.resolve?o.resolve(e,t):Vs(r,()=>o(e,t));return Lc(s)}function w1(i){return Qn(e=>{let t=i(e);return t?Jn(t).pipe(Je(()=>e)):Ke(e)})}var lF=(()=>{let e=class e{buildTitle(n){let r,o=n.root;for(;o!==void 0;)r=this.getResolvedTitleForRoute(o)??r,o=o.children.find(s=>s.outlet===Qt);return r}getResolvedTitleForRoute(n){return n.data[xm]}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:()=>te(wX),providedIn:"root"});let i=e;return i})(),wX=(()=>{let e=class e extends lF{constructor(n){super(),this.title=n}updateTitle(n){let r=this.buildTitle(n);r!==void 0&&this.title.setTitle(r)}};e.\u0275fac=function(r){return new(r||e)(X(PL))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),tI=new me("",{providedIn:"root",factory:()=>({})}),CX=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=ce({type:e,selectors:[["ng-component"]],standalone:!0,features:[le],decls:1,vars:0,template:function(r,o){r&1&&ee(0,"router-outlet")},dependencies:[K1],encapsulation:2});let i=e;return i})();function nI(i){let e=i.children&&i.children.map(nI),t=e?yt(Z({},i),{children:e}):Z({},i);return!t.component&&!t.loadComponent&&(e||t.loadChildren)&&t.outlet&&t.outlet!==Qt&&(t.component=CX),t}var iI=new me(""),SX=(()=>{let e=class e{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=te(QE)}loadComponent(n){if(this.componentLoaders.get(n))return this.componentLoaders.get(n);if(n._loadedComponent)return Ke(n._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(n);let r=Lc(n.loadComponent()).pipe(Je(dF),En(s=>{this.onLoadEndListener&&this.onLoadEndListener(n),n._loadedComponent=s}),wc(()=>{this.componentLoaders.delete(n)})),o=new mc(r,()=>new pe).pipe(Au());return this.componentLoaders.set(n,o),o}loadChildren(n,r){if(this.childrenLoaders.get(r))return this.childrenLoaders.get(r);if(r._loadedRoutes)return Ke({routes:r._loadedRoutes,injector:r._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(r);let s=MX(r,this.compiler,n,this.onLoadEndListener).pipe(wc(()=>{this.childrenLoaders.delete(r)})),a=new mc(s,()=>new pe).pipe(Au());return this.childrenLoaders.set(r,a),a}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function MX(i,e,t,n){return Lc(i.loadChildren()).pipe(Je(dF),ti(r=>r instanceof Gf||Array.isArray(r)?Ke(r):Jn(e.compileModuleAsync(r))),Je(r=>{n&&n(i);let o,s,a=!1;return Array.isArray(r)?(s=r,a=!0):(o=r.create(t).injector,s=o.get(iI,[],{optional:!0,self:!0}).flat()),{routes:s.map(nI),injector:o}}))}function EX(i){return i&&typeof i=="object"&&"default"in i}function dF(i){return EX(i)?i.default:i}var rI=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:()=>te(IX),providedIn:"root"});let i=e;return i})(),IX=(()=>{let e=class e{shouldProcessUrl(n){return!0}extract(n){return n}merge(n,r){return n}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),TX=new me("");var DX=new me(""),PX=(()=>{let e=class e{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new pe,this.transitionAbortSubject=new pe,this.configLoader=te(SX),this.environmentInjector=te(Xi),this.urlSerializer=te(Z1),this.rootContexts=te(Ib),this.location=te(Ra),this.inputBindingEnabled=te(J1,{optional:!0})!==null,this.titleStrategy=te(lF),this.options=te(tI,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=te(rI),this.createViewTransition=te(TX,{optional:!0}),this.navigationErrorHandler=te(DX,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>Ke(void 0),this.rootComponentType=null;let n=o=>this.events.next(new A1(o)),r=o=>this.events.next(new N1(o));this.configLoader.onLoadEndListener=r,this.configLoader.onLoadStartListener=n}complete(){this.transitions?.complete()}handleNavigationRequest(n){let r=++this.navigationId;this.transitions?.next(yt(Z(Z({},this.transitions.value),n),{id:r}))}setupNavigations(n,r,o){return this.transitions=new On({id:0,currentUrlTree:r,currentRawUrl:r,extractedUrl:this.urlHandlingStrategy.extract(r),urlAfterRedirects:this.urlHandlingStrategy.extract(r),rawUrl:r,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:lm,restoredState:null,currentSnapshot:o.snapshot,targetSnapshot:null,currentRouterState:o,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(qt(s=>s.id!==0),Je(s=>yt(Z({},s),{extractedUrl:this.urlHandlingStrategy.extract(s.rawUrl)})),Qn(s=>{let a=!1,c=!1;return Ke(s).pipe(Qn(l=>{if(this.navigationId>s.id)return this.cancelNavigationTransition(s,"",mo.SupersededByNewNavigation),Dr;this.currentTransition=s,this.currentNavigation={id:l.id,initialUrl:l.rawUrl,extractedUrl:l.extractedUrl,targetBrowserUrl:typeof l.extras.browserUrl=="string"?this.urlSerializer.parse(l.extras.browserUrl):l.extras.browserUrl,trigger:l.source,extras:l.extras,previousNavigation:this.lastSuccessfulNavigation?yt(Z({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let d=!n.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),u=l.extras.onSameUrlNavigation??n.onSameUrlNavigation;if(!d&&u!=="reload"){let h="";return this.events.next(new sd(l.id,this.urlSerializer.serialize(l.rawUrl),h,T1.IgnoredSameUrlNavigation)),l.resolve(!1),Dr}if(this.urlHandlingStrategy.shouldProcessUrl(l.rawUrl))return Ke(l).pipe(Qn(h=>{let p=this.transitions?.getValue();return this.events.next(new fm(h.id,this.urlSerializer.serialize(h.extractedUrl),h.source,h.restoredState)),p!==this.transitions?.getValue()?Dr:Promise.resolve(h)}),_X(this.environmentInjector,this.configLoader,this.rootComponentType,n.config,this.urlSerializer,this.paramsInheritanceStrategy),En(h=>{s.targetSnapshot=h.targetSnapshot,s.urlAfterRedirects=h.urlAfterRedirects,this.currentNavigation=yt(Z({},this.currentNavigation),{finalUrl:h.urlAfterRedirects});let p=new yb(h.id,this.urlSerializer.serialize(h.extractedUrl),this.urlSerializer.serialize(h.urlAfterRedirects),h.targetSnapshot);this.events.next(p)}));if(d&&this.urlHandlingStrategy.shouldProcessUrl(l.currentRawUrl)){let{id:h,extractedUrl:p,source:f,restoredState:m,extras:y}=l,g=new fm(h,this.urlSerializer.serialize(p),f,m);this.events.next(g);let _=JL(this.rootComponentType).snapshot;return this.currentTransition=s=yt(Z({},l),{targetSnapshot:_,urlAfterRedirects:p,extras:yt(Z({},y),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=p,Ke(s)}else{let h="";return this.events.next(new sd(l.id,this.urlSerializer.serialize(l.extractedUrl),h,T1.IgnoredByUrlHandlingStrategy)),l.resolve(!1),Dr}}),En(l=>{let d=new D1(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(d)}),Je(l=>(this.currentTransition=s=yt(Z({},l),{guards:LY(l.targetSnapshot,l.currentSnapshot,this.rootContexts)}),s)),qY(this.environmentInjector,l=>this.events.next(l)),En(l=>{if(s.guardsResult=l.guardsResult,l.guardsResult&&typeof l.guardsResult!="boolean")throw Mb(this.urlSerializer,l.guardsResult);let d=new P1(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot,!!l.guardsResult);this.events.next(d)}),qt(l=>l.guardsResult?!0:(this.cancelNavigationTransition(l,"",mo.GuardRejected),!1)),w1(l=>{if(l.guards.canActivateChecks.length)return Ke(l).pipe(En(d=>{let u=new O1(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(u)}),Qn(d=>{let u=!1;return Ke(d).pipe(vX(this.paramsInheritanceStrategy,this.environmentInjector),En({next:()=>u=!0,complete:()=>{u||this.cancelNavigationTransition(d,"",mo.NoDataFromResolver)}}))}),En(d=>{let u=new R1(d.id,this.urlSerializer.serialize(d.extractedUrl),this.urlSerializer.serialize(d.urlAfterRedirects),d.targetSnapshot);this.events.next(u)}))}),w1(l=>{let d=u=>{let h=[];u.routeConfig?.loadComponent&&!u.routeConfig._loadedComponent&&h.push(this.configLoader.loadComponent(u.routeConfig).pipe(En(p=>{u.component=p}),Je(()=>{})));for(let p of u.children)h.push(...d(p));return h};return eo(d(l.targetSnapshot.root)).pipe(yc(null),_n(1))}),w1(()=>this.afterPreactivation()),Qn(()=>{let{currentSnapshot:l,targetSnapshot:d}=s,u=this.createViewTransition?.(this.environmentInjector,l.root,d.root);return u?Jn(u).pipe(Je(()=>s)):Ke(s)}),Je(l=>{let d=OY(n.routeReuseStrategy,l.targetSnapshot,l.currentRouterState);return this.currentTransition=s=yt(Z({},l),{targetRouterState:d}),this.currentNavigation.targetRouterState=d,s}),En(()=>{this.events.next(new gm)}),kY(this.rootContexts,n.routeReuseStrategy,l=>this.events.next(l),this.inputBindingEnabled),_n(1),En({next:l=>{a=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new od(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects))),this.titleStrategy?.updateTitle(l.targetRouterState.snapshot),l.resolve(!0)},complete:()=>{a=!0}}),Ze(this.transitionAbortSubject.pipe(En(l=>{throw l}))),wc(()=>{!a&&!c&&this.cancelNavigationTransition(s,"",mo.SupersededByNewNavigation),this.currentTransition?.id===s.id&&(this.currentNavigation=null,this.currentTransition=null)}),Os(l=>{if(c=!0,rF(l))this.events.next(new Aa(s.id,this.urlSerializer.serialize(s.extractedUrl),l.message,l.cancellationCode)),NY(l)?this.events.next(new fh(l.url,l.navigationBehaviorOptions)):s.resolve(!1);else{let d=new mm(s.id,this.urlSerializer.serialize(s.extractedUrl),l,s.targetSnapshot??void 0);try{let u=Vs(this.environmentInjector,()=>this.navigationErrorHandler?.(d));if(u instanceof vm){let{message:h,cancellationCode:p}=Mb(this.urlSerializer,u);this.events.next(new Aa(s.id,this.urlSerializer.serialize(s.extractedUrl),h,p)),this.events.next(new fh(u.redirectTo,u.navigationBehaviorOptions))}else{this.events.next(d);let h=n.errorHandler(l);s.resolve(!!h)}}catch(u){this.options.resolveNavigationPromiseOnError?s.resolve(!1):s.reject(u)}}return Dr}))}))}cancelNavigationTransition(n,r,o){let s=new Aa(n.id,this.urlSerializer.serialize(n.extractedUrl),r,o);this.events.next(s),n.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let n=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),r=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return n.toString()!==r?.toString()&&!this.currentNavigation?.extras.skipLocationChange}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function OX(i){return i!==lm}var RX=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:()=>te(AX),providedIn:"root"});let i=e;return i})(),X1=class{shouldDetach(e){return!1}store(e,t){}shouldAttach(e){return!1}retrieve(e){return null}shouldReuseRoute(e,t){return e.routeConfig===t.routeConfig}},AX=(()=>{let e=class e extends X1{};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Li(e)))(o||e)}})(),e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),uF=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:()=>te(NX),providedIn:"root"});let i=e;return i})(),NX=(()=>{let e=class e extends uF{constructor(){super(...arguments),this.location=te(Ra),this.urlSerializer=te(Z1),this.options=te(tI,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=te(rI),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new Na,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=JL(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(n){return this.location.subscribe(r=>{r.type==="popstate"&&n(r.url,r.state)})}handleRouterEvent(n,r){if(n instanceof fm)this.stateMemento=this.createStateMemento();else if(n instanceof sd)this.rawUrlTree=r.initialUrl;else if(n instanceof yb){if(this.urlUpdateStrategy==="eager"&&!r.extras.skipLocationChange){let o=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl);this.setBrowserUrl(r.targetBrowserUrl??o,r)}}else n instanceof gm?(this.currentUrlTree=r.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(r.finalUrl,r.initialUrl),this.routerState=r.targetRouterState,this.urlUpdateStrategy==="deferred"&&!r.extras.skipLocationChange&&this.setBrowserUrl(r.targetBrowserUrl??this.rawUrlTree,r)):n instanceof Aa&&(n.code===mo.GuardRejected||n.code===mo.NoDataFromResolver)?this.restoreHistory(r):n instanceof mm?this.restoreHistory(r,!0):n instanceof od&&(this.lastSuccessfulId=n.id,this.currentPageId=this.browserPageId)}setBrowserUrl(n,r){let o=n instanceof Na?this.urlSerializer.serialize(n):n;if(this.location.isCurrentPathEqualTo(o)||r.extras.replaceUrl){let s=this.browserPageId,a=Z(Z({},r.extras.state),this.generateNgRouterState(r.id,s));this.location.replaceState(o,"",a)}else{let s=Z(Z({},r.extras.state),this.generateNgRouterState(r.id,this.browserPageId+1));this.location.go(o,"",s)}}restoreHistory(n,r=!1){if(this.canceledNavigationResolution==="computed"){let o=this.browserPageId,s=this.currentPageId-o;s!==0?this.location.historyGo(s):this.currentUrlTree===n.finalUrl&&s===0&&(this.resetState(n),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(r&&this.resetState(n),this.resetUrlToCurrentUrlTree())}resetState(n){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,n.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(n,r){return this.canceledNavigationResolution==="computed"?{navigationId:n,\u0275routerPageId:r}:{navigationId:n}}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Li(e)))(o||e)}})(),e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),am=function(i){return i[i.COMPLETE=0]="COMPLETE",i[i.FAILED=1]="FAILED",i[i.REDIRECTING=2]="REDIRECTING",i}(am||{});function kX(i,e){i.events.pipe(qt(t=>t instanceof od||t instanceof Aa||t instanceof mm||t instanceof sd),Je(t=>t instanceof od||t instanceof sd?am.COMPLETE:(t instanceof Aa?t.code===mo.Redirect||t.code===mo.SupersededByNewNavigation:!1)?am.REDIRECTING:am.FAILED),qt(t=>t!==am.REDIRECTING),_n(1)).subscribe(()=>{e()})}function LX(i){throw i}var FX={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},BX={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},_h=(()=>{let e=class e{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.console=te(nb),this.stateManager=te(uF),this.options=te(tI,{optional:!0})||{},this.pendingTasks=te(Zl),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=te(PX),this.urlSerializer=te(Z1),this.location=te(Ra),this.urlHandlingStrategy=te(rI),this._events=new pe,this.errorHandler=this.options.errorHandler||LX,this.navigated=!1,this.routeReuseStrategy=te(RX),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=te(iI,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!te(J1,{optional:!0}),this.eventsSubscription=new Ct,this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:n=>{this.console.warn(n)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let n=this.navigationTransitions.events.subscribe(r=>{try{let o=this.navigationTransitions.currentTransition,s=this.navigationTransitions.currentNavigation;if(o!==null&&s!==null){if(this.stateManager.handleRouterEvent(r,s),r instanceof Aa&&r.code!==mo.Redirect&&r.code!==mo.SupersededByNewNavigation)this.navigated=!0;else if(r instanceof od)this.navigated=!0;else if(r instanceof fh){let a=r.navigationBehaviorOptions,c=this.urlHandlingStrategy.merge(r.url,o.currentRawUrl),l=Z({browserUrl:o.extras.browserUrl,info:o.extras.info,skipLocationChange:o.extras.skipLocationChange,replaceUrl:o.extras.replaceUrl||this.urlUpdateStrategy==="eager"||OX(o.source)},a);this.scheduleNavigation(c,lm,null,l,{resolve:o.resolve,reject:o.reject,promise:o.promise})}}zX(r)&&this._events.next(r)}catch(o){this.navigationTransitions.transitionAbortSubject.next(o)}});this.eventsSubscription.add(n)}resetRootComponentType(n){this.routerState.root.component=n,this.navigationTransitions.rootComponentType=n}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),lm,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((n,r)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(n,"popstate",r)},0)})}navigateToSyncWithBrowser(n,r,o){let s={replaceUrl:!0},a=o?.navigationId?o:null;if(o){let l=Z({},o);delete l.navigationId,delete l.\u0275routerPageId,Object.keys(l).length!==0&&(s.state=l)}let c=this.parseUrl(n);this.scheduleNavigation(c,r,a,s)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(n){this.config=n.map(nI),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(n,r={}){let{relativeTo:o,queryParams:s,fragment:a,queryParamsHandling:c,preserveFragment:l}=r,d=l?this.currentUrlTree.fragment:a,u=null;switch(c){case"merge":u=Z(Z({},this.currentUrlTree.queryParams),s);break;case"preserve":u=this.currentUrlTree.queryParams;break;default:u=s||null}u!==null&&(u=this.removeEmptyProps(u));let h;try{let p=o?o.snapshot:this.routerState.snapshot.root;h=XL(p)}catch{(typeof n[0]!="string"||n[0][0]!=="/")&&(n=[]),h=this.currentUrlTree.root}return ZL(h,n,u,d??null)}navigateByUrl(n,r={skipLocationChange:!1}){let o=hm(n)?n:this.parseUrl(n),s=this.urlHandlingStrategy.merge(o,this.rawUrlTree);return this.scheduleNavigation(s,lm,null,r)}navigate(n,r={skipLocationChange:!1}){return VX(n),this.navigateByUrl(this.createUrlTree(n,r),r)}serializeUrl(n){return this.urlSerializer.serialize(n)}parseUrl(n){try{return this.urlSerializer.parse(n)}catch{return this.urlSerializer.parse("/")}}isActive(n,r){let o;if(r===!0?o=Z({},FX):r===!1?o=Z({},BX):o=r,hm(n))return RL(this.currentUrlTree,n,o);let s=this.parseUrl(n);return RL(this.currentUrlTree,s,o)}removeEmptyProps(n){return Object.entries(n).reduce((r,[o,s])=>(s!=null&&(r[o]=s),r),{})}scheduleNavigation(n,r,o,s,a){if(this.disposed)return Promise.resolve(!1);let c,l,d;a?(c=a.resolve,l=a.reject,d=a.promise):d=new Promise((h,p)=>{c=h,l=p});let u=this.pendingTasks.add();return kX(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(u))}),this.navigationTransitions.handleNavigationRequest({source:r,restoredState:o,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:n,extras:s,resolve:c,reject:l,promise:d,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),d.catch(h=>Promise.reject(h))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function VX(i){for(let e=0;et.\u0275providers)])}function HX(i){return i.routerState.root}function GX(){let i=te(vt);return e=>{let t=i.get(hs);if(e!==t.components[0])return;let n=i.get(_h),r=i.get(jX);i.get(WX)===1&&n.initialNavigation(),i.get($X,null,tn.Optional)?.setUpPreloading(),i.get(UX,null,tn.Optional)?.init(),n.resetRootComponentType(t.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}var jX=new me("",{factory:()=>new pe}),WX=new me("",{providedIn:"root",factory:()=>1});var $X=new me("");var fF=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275cmp=ce({type:i,selectors:[["app-root"]],standalone:!0,features:[le],decls:1,vars:0,template:function(n,r){n&1&&ee(0,"router-outlet")},dependencies:[Ae,K1]})}return i})();var zt=function(i){return i[i.State=0]="State",i[i.Transition=1]="Transition",i[i.Sequence=2]="Sequence",i[i.Group=3]="Group",i[i.Animate=4]="Animate",i[i.Keyframes=5]="Keyframes",i[i.Style=6]="Style",i[i.Trigger=7]="Trigger",i[i.Reference=8]="Reference",i[i.AnimateChild=9]="AnimateChild",i[i.AnimateRef=10]="AnimateRef",i[i.Query=11]="Query",i[i.Stagger=12]="Stagger",i}(zt||{}),Ws="*";function li(i,e){return{type:zt.Trigger,name:i,definitions:e,options:{}}}function Rn(i,e=null){return{type:zt.Animate,styles:e,timings:i}}function mF(i,e=null){return{type:zt.Group,steps:i,options:e}}function gF(i,e=null){return{type:zt.Sequence,steps:i,options:e}}function Kt(i){return{type:zt.Style,styles:i,offset:null}}function vi(i,e,t){return{type:zt.State,name:i,styles:e,options:t}}function An(i,e,t=null){return{type:zt.Transition,expr:i,animation:e,options:t}}function _F(i=null){return{type:zt.AnimateChild,options:i}}function vF(i,e,t=null){return{type:zt.Query,selector:i,animation:e,options:t}}var Fc=class{constructor(e=0,t=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=e+t}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(e=>e()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(e){this._position=this.totalTime?e*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},Sm=class{constructor(e){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=e;let t=0,n=0,r=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++t==o&&this._onFinish()}),s.onDestroy(()=>{++n==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this.players.forEach(e=>e.init())}onStart(e){this._onStartFns.push(e)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(e=>e()),this._onStartFns=[])}onDone(e){this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(e=>e.play())}pause(){this.players.forEach(e=>e.pause())}restart(){this.players.forEach(e=>e.restart())}finish(){this._onFinish(),this.players.forEach(e=>e.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(e=>e.destroy()),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}reset(){this.players.forEach(e=>e.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(e){let t=e*this.totalTime;this.players.forEach(n=>{let r=n.totalTime?Math.min(1,t/n.totalTime):1;n.setPosition(r)})}getPosition(){let e=this.players.reduce((t,n)=>t===null||n.totalTime>t.totalTime?n:t,null);return e!=null?e.getPosition():0}beforeDestroy(){this.players.forEach(e=>{e.beforeDestroy&&e.beforeDestroy()})}triggerCallback(e){let t=e=="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},Db="!";function bF(i){return new Oe(3e3,!1)}function qX(){return new Oe(3100,!1)}function YX(){return new Oe(3101,!1)}function XX(i){return new Oe(3001,!1)}function ZX(i){return new Oe(3003,!1)}function QX(i){return new Oe(3004,!1)}function KX(i,e){return new Oe(3005,!1)}function JX(){return new Oe(3006,!1)}function eZ(){return new Oe(3007,!1)}function tZ(i,e){return new Oe(3008,!1)}function nZ(i){return new Oe(3002,!1)}function iZ(i,e,t,n,r){return new Oe(3010,!1)}function rZ(){return new Oe(3011,!1)}function oZ(){return new Oe(3012,!1)}function sZ(){return new Oe(3200,!1)}function aZ(){return new Oe(3202,!1)}function cZ(){return new Oe(3013,!1)}function lZ(i){return new Oe(3014,!1)}function dZ(i){return new Oe(3015,!1)}function uZ(i){return new Oe(3016,!1)}function hZ(i,e){return new Oe(3404,!1)}function pZ(i){return new Oe(3502,!1)}function fZ(i){return new Oe(3503,!1)}function mZ(){return new Oe(3300,!1)}function gZ(i){return new Oe(3504,!1)}function _Z(i){return new Oe(3301,!1)}function vZ(i,e){return new Oe(3302,!1)}function bZ(i){return new Oe(3303,!1)}function yZ(i,e){return new Oe(3400,!1)}function xZ(i){return new Oe(3401,!1)}function wZ(i){return new Oe(3402,!1)}function CZ(i,e){return new Oe(3505,!1)}function Bc(i){switch(i.length){case 0:return new Fc;case 1:return i[0];default:return new Sm(i)}}function AF(i,e,t=new Map,n=new Map){let r=[],o=[],s=-1,a=null;if(e.forEach(c=>{let l=c.get("offset"),d=l==s,u=d&&a||new Map;c.forEach((h,p)=>{let f=p,m=h;if(p!=="offset")switch(f=i.normalizePropertyName(f,r),m){case Db:m=t.get(p);break;case Ws:m=n.get(p);break;default:m=i.normalizeStyleValue(p,f,m,r);break}u.set(f,m)}),d||o.push(u),a=u,s=l}),r.length)throw pZ(r);return o}function II(i,e,t,n){switch(e){case"start":i.onStart(()=>n(t&&oI(t,"start",i)));break;case"done":i.onDone(()=>n(t&&oI(t,"done",i)));break;case"destroy":i.onDestroy(()=>n(t&&oI(t,"destroy",i)));break}}function oI(i,e,t){let n=t.totalTime,r=!!t.disabled,o=TI(i.element,i.triggerName,i.fromState,i.toState,e||i.phaseName,n??i.totalTime,r),s=i._data;return s!=null&&(o._data=s),o}function TI(i,e,t,n,r="",o=0,s){return{element:i,triggerName:e,fromState:t,toState:n,phaseName:r,totalTime:o,disabled:!!s}}function _o(i,e,t){let n=i.get(e);return n||i.set(e,n=t),n}function yF(i){let e=i.indexOf(":"),t=i.substring(1,e),n=i.slice(e+1);return[t,n]}var SZ=typeof document>"u"?null:document.documentElement;function DI(i){let e=i.parentNode||i.host||null;return e===SZ?null:e}function MZ(i){return i.substring(1,6)=="ebkit"}var ad=null,xF=!1;function EZ(i){ad||(ad=IZ()||{},xF=ad.style?"WebkitAppearance"in ad.style:!1);let e=!0;return ad.style&&!MZ(i)&&(e=i in ad.style,!e&&xF&&(e="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in ad.style)),e}function IZ(){return typeof document<"u"?document.body:null}function NF(i,e){for(;e;){if(e===i)return!0;e=DI(e)}return!1}function kF(i,e,t){if(t)return Array.from(i.querySelectorAll(e));let n=i.querySelector(e);return n?[n]:[]}var PI=(()=>{let e=class e{validateStyleProperty(n){return EZ(n)}containsElement(n,r){return NF(n,r)}getParentElement(n){return DI(n)}query(n,r,o){return kF(n,r,o)}computeStyle(n,r,o){return o||""}animate(n,r,o,s,a,c=[],l){return new Fc(o,s)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:e.\u0275fac});let i=e;return i})(),NI=class NI{};NI.NOOP=new PI;var dd=NI,ud=class{};var TZ=1e3,LF="{{",DZ="}}",FF="ng-enter",uI="ng-leave",Pb="ng-trigger",kb=".ng-trigger",wF="ng-animating",hI=".ng-animating";function ka(i){if(typeof i=="number")return i;let e=i.match(/^(-?[\.\d]+)(m?s)/);return!e||e.length<2?0:pI(parseFloat(e[1]),e[2])}function pI(i,e){switch(e){case"s":return i*TZ;default:return i}}function Lb(i,e,t){return i.hasOwnProperty("duration")?i:PZ(i,e,t)}function PZ(i,e,t){let n=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,r,o=0,s="";if(typeof i=="string"){let a=i.match(n);if(a===null)return e.push(bF(i)),{duration:0,delay:0,easing:""};r=pI(parseFloat(a[1]),a[2]);let c=a[3];c!=null&&(o=pI(parseFloat(c),a[4]));let l=a[5];l&&(s=l)}else r=i;if(!t){let a=!1,c=e.length;r<0&&(e.push(qX()),a=!0),o<0&&(e.push(YX()),a=!0),a&&e.splice(c,0,bF(i))}return{duration:r,delay:o,easing:s}}function OZ(i){return i.length?i[0]instanceof Map?i:i.map(e=>new Map(Object.entries(e))):[]}function $s(i,e,t){e.forEach((n,r)=>{let o=OI(r);t&&!t.has(r)&&t.set(r,i.style[o]),i.style[o]=n})}function ld(i,e){e.forEach((t,n)=>{let r=OI(n);i.style[r]=""})}function Mm(i){return Array.isArray(i)?i.length==1?i[0]:gF(i):i}function RZ(i,e,t){let n=e.params||{},r=BF(i);r.length&&r.forEach(o=>{n.hasOwnProperty(o)||t.push(XX(o))})}var fI=new RegExp(`${LF}\\s*(.+?)\\s*${DZ}`,"g");function BF(i){let e=[];if(typeof i=="string"){let t;for(;t=fI.exec(i);)e.push(t[1]);fI.lastIndex=0}return e}function Im(i,e,t){let n=`${i}`,r=n.replace(fI,(o,s)=>{let a=e[s];return a==null&&(t.push(ZX(s)),a=""),a.toString()});return r==n?i:r}var AZ=/-+([a-z0-9])/g;function OI(i){return i.replace(AZ,(...e)=>e[1].toUpperCase())}function NZ(i,e){return i===0||e===0}function kZ(i,e,t){if(t.size&&e.length){let n=e[0],r=[];if(t.forEach((o,s)=>{n.has(s)||r.push(s),n.set(s,o)}),r.length)for(let o=1;os.set(a,RI(i,a)))}}return e}function go(i,e,t){switch(e.type){case zt.Trigger:return i.visitTrigger(e,t);case zt.State:return i.visitState(e,t);case zt.Transition:return i.visitTransition(e,t);case zt.Sequence:return i.visitSequence(e,t);case zt.Group:return i.visitGroup(e,t);case zt.Animate:return i.visitAnimate(e,t);case zt.Keyframes:return i.visitKeyframes(e,t);case zt.Style:return i.visitStyle(e,t);case zt.Reference:return i.visitReference(e,t);case zt.AnimateChild:return i.visitAnimateChild(e,t);case zt.AnimateRef:return i.visitAnimateRef(e,t);case zt.Query:return i.visitQuery(e,t);case zt.Stagger:return i.visitStagger(e,t);default:throw QX(e.type)}}function RI(i,e){return window.getComputedStyle(i)[e]}var LZ=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),Fb=class extends ud{normalizePropertyName(e,t){return OI(e)}normalizeStyleValue(e,t,n,r){let o="",s=n.toString().trim();if(LZ.has(t)&&n!==0&&n!=="0")if(typeof n=="number")o="px";else{let a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&r.push(KX(e,n))}return s+o}};var Bb="*";function FZ(i,e){let t=[];return typeof i=="string"?i.split(/\s*,\s*/).forEach(n=>BZ(n,t,e)):t.push(i),t}function BZ(i,e,t){if(i[0]==":"){let c=VZ(i,t);if(typeof c=="function"){e.push(c);return}i=c}let n=i.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(n==null||n.length<4)return t.push(dZ(i)),e;let r=n[1],o=n[2],s=n[3];e.push(CF(r,s));let a=r==Bb&&s==Bb;o[0]=="<"&&!a&&e.push(CF(s,r))}function VZ(i,e){switch(i){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(t,n)=>parseFloat(n)>parseFloat(t);case":decrement":return(t,n)=>parseFloat(n) *"}}var Ob=new Set(["true","1"]),Rb=new Set(["false","0"]);function CF(i,e){let t=Ob.has(i)||Rb.has(i),n=Ob.has(e)||Rb.has(e);return(r,o)=>{let s=i==Bb||i==r,a=e==Bb||e==o;return!s&&t&&typeof r=="boolean"&&(s=r?Ob.has(i):Rb.has(i)),!a&&n&&typeof o=="boolean"&&(a=o?Ob.has(e):Rb.has(e)),s&&a}}var VF=":self",zZ=new RegExp(`s*${VF}s*,?`,"g");function zF(i,e,t,n){return new mI(i).build(e,t,n)}var SF="",mI=class{constructor(e){this._driver=e}build(e,t,n){let r=new gI(t);return this._resetContextStyleTimingState(r),go(this,Mm(e),r)}_resetContextStyleTimingState(e){e.currentQuerySelector=SF,e.collectedStyles=new Map,e.collectedStyles.set(SF,new Map),e.currentTime=0}visitTrigger(e,t){let n=t.queryCount=0,r=t.depCount=0,o=[],s=[];return e.name.charAt(0)=="@"&&t.errors.push(JX()),e.definitions.forEach(a=>{if(this._resetContextStyleTimingState(t),a.type==zt.State){let c=a,l=c.name;l.toString().split(/\s*,\s*/).forEach(d=>{c.name=d,o.push(this.visitState(c,t))}),c.name=l}else if(a.type==zt.Transition){let c=this.visitTransition(a,t);n+=c.queryCount,r+=c.depCount,s.push(c)}else t.errors.push(eZ())}),{type:zt.Trigger,name:e.name,states:o,transitions:s,queryCount:n,depCount:r,options:null}}visitState(e,t){let n=this.visitStyle(e.styles,t),r=e.options&&e.options.params||null;if(n.containsDynamicStyles){let o=new Set,s=r||{};n.styles.forEach(a=>{a instanceof Map&&a.forEach(c=>{BF(c).forEach(l=>{s.hasOwnProperty(l)||o.add(l)})})}),o.size&&t.errors.push(tZ(e.name,[...o.values()]))}return{type:zt.State,name:e.name,style:n,options:r?{params:r}:null}}visitTransition(e,t){t.queryCount=0,t.depCount=0;let n=go(this,Mm(e.animation),t),r=FZ(e.expr,t.errors);return{type:zt.Transition,matchers:r,animation:n,queryCount:t.queryCount,depCount:t.depCount,options:cd(e.options)}}visitSequence(e,t){return{type:zt.Sequence,steps:e.steps.map(n=>go(this,n,t)),options:cd(e.options)}}visitGroup(e,t){let n=t.currentTime,r=0,o=e.steps.map(s=>{t.currentTime=n;let a=go(this,s,t);return r=Math.max(r,t.currentTime),a});return t.currentTime=r,{type:zt.Group,steps:o,options:cd(e.options)}}visitAnimate(e,t){let n=jZ(e.timings,t.errors);t.currentAnimateTimings=n;let r,o=e.styles?e.styles:Kt({});if(o.type==zt.Keyframes)r=this.visitKeyframes(o,t);else{let s=e.styles,a=!1;if(!s){a=!0;let l={};n.easing&&(l.easing=n.easing),s=Kt(l)}t.currentTime+=n.duration+n.delay;let c=this.visitStyle(s,t);c.isEmptyStep=a,r=c}return t.currentAnimateTimings=null,{type:zt.Animate,timings:n,style:r,options:null}}visitStyle(e,t){let n=this._makeStyleAst(e,t);return this._validateStyleAst(n,t),n}_makeStyleAst(e,t){let n=[],r=Array.isArray(e.styles)?e.styles:[e.styles];for(let a of r)typeof a=="string"?a===Ws?n.push(a):t.errors.push(nZ(a)):n.push(new Map(Object.entries(a)));let o=!1,s=null;return n.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o)){for(let c of a.values())if(c.toString().indexOf(LF)>=0){o=!0;break}}}),{type:zt.Style,styles:n,easing:s,offset:e.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(e,t){let n=t.currentAnimateTimings,r=t.currentTime,o=t.currentTime;n&&o>0&&(o-=n.duration+n.delay),e.styles.forEach(s=>{typeof s!="string"&&s.forEach((a,c)=>{let l=t.collectedStyles.get(t.currentQuerySelector),d=l.get(c),u=!0;d&&(o!=r&&o>=d.startTime&&r<=d.endTime&&(t.errors.push(iZ(c,d.startTime,d.endTime,o,r)),u=!1),o=d.startTime),u&&l.set(c,{startTime:o,endTime:r}),t.options&&RZ(a,t.options,t.errors)})})}visitKeyframes(e,t){let n={type:zt.Keyframes,styles:[],options:null};if(!t.currentAnimateTimings)return t.errors.push(rZ()),n;let r=1,o=0,s=[],a=!1,c=!1,l=0,d=e.steps.map(g=>{let _=this._makeStyleAst(g,t),x=_.offset!=null?_.offset:GZ(_.styles),C=0;return x!=null&&(o++,C=_.offset=x),c=c||C<0||C>1,a=a||C0&&o{let x=h>0?_==p?1:h*_:s[_],C=x*y;t.currentTime=f+m.delay+C,m.duration=C,this._validateStyleAst(g,t),g.offset=x,n.styles.push(g)}),n}visitReference(e,t){return{type:zt.Reference,animation:go(this,Mm(e.animation),t),options:cd(e.options)}}visitAnimateChild(e,t){return t.depCount++,{type:zt.AnimateChild,options:cd(e.options)}}visitAnimateRef(e,t){return{type:zt.AnimateRef,animation:this.visitReference(e.animation,t),options:cd(e.options)}}visitQuery(e,t){let n=t.currentQuerySelector,r=e.options||{};t.queryCount++,t.currentQuery=e;let[o,s]=UZ(e.selector);t.currentQuerySelector=n.length?n+" "+o:o,_o(t.collectedStyles,t.currentQuerySelector,new Map);let a=go(this,Mm(e.animation),t);return t.currentQuery=null,t.currentQuerySelector=n,{type:zt.Query,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:e.selector,options:cd(e.options)}}visitStagger(e,t){t.currentQuery||t.errors.push(cZ());let n=e.timings==="full"?{duration:0,delay:0,easing:"full"}:Lb(e.timings,t.errors,!0);return{type:zt.Stagger,animation:go(this,Mm(e.animation),t),timings:n,options:null}}};function UZ(i){let e=!!i.split(/\s*,\s*/).find(t=>t==VF);return e&&(i=i.replace(zZ,"")),i=i.replace(/@\*/g,kb).replace(/@\w+/g,t=>kb+"-"+t.slice(1)).replace(/:animating/g,hI),[i,e]}function HZ(i){return i?Z({},i):null}var gI=class{constructor(e){this.errors=e,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}};function GZ(i){if(typeof i=="string")return null;let e=null;if(Array.isArray(i))i.forEach(t=>{if(t instanceof Map&&t.has("offset")){let n=t;e=parseFloat(n.get("offset")),n.delete("offset")}});else if(i instanceof Map&&i.has("offset")){let t=i;e=parseFloat(t.get("offset")),t.delete("offset")}return e}function jZ(i,e){if(i.hasOwnProperty("duration"))return i;if(typeof i=="number"){let o=Lb(i,e).duration;return sI(o,0,"")}let t=i;if(t.split(/\s+/).some(o=>o.charAt(0)=="{"&&o.charAt(1)=="{")){let o=sI(0,0,"");return o.dynamic=!0,o.strValue=t,o}let r=Lb(t,e);return sI(r.duration,r.delay,r.easing)}function cd(i){return i?(i=Z({},i),i.params&&(i.params=HZ(i.params))):i={},i}function sI(i,e,t){return{duration:i,delay:e,easing:t}}function AI(i,e,t,n,r,o,s=null,a=!1){return{type:1,element:i,keyframes:e,preStyleProps:t,postStyleProps:n,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}var Tm=class{constructor(){this._map=new Map}get(e){return this._map.get(e)||[]}append(e,t){let n=this._map.get(e);n||this._map.set(e,n=[]),n.push(...t)}has(e){return this._map.has(e)}clear(){this._map.clear()}},WZ=1,$Z=":enter",qZ=new RegExp($Z,"g"),YZ=":leave",XZ=new RegExp(YZ,"g");function UF(i,e,t,n,r,o=new Map,s=new Map,a,c,l=[]){return new _I().buildKeyframes(i,e,t,n,r,o,s,a,c,l)}var _I=class{buildKeyframes(e,t,n,r,o,s,a,c,l,d=[]){l=l||new Tm;let u=new vI(e,t,l,r,o,d,[]);u.options=c;let h=c.delay?ka(c.delay):0;u.currentTimeline.delayNextStep(h),u.currentTimeline.setStyles([s],null,u.errors,c),go(this,n,u);let p=u.timelines.filter(f=>f.containsAnimation());if(p.length&&a.size){let f;for(let m=p.length-1;m>=0;m--){let y=p[m];if(y.element===t){f=y;break}}f&&!f.allowOnlyTimelineStyles()&&f.setStyles([a],null,u.errors,c)}return p.length?p.map(f=>f.buildKeyframes()):[AI(t,[],[],[],0,h,"",!1)]}visitTrigger(e,t){}visitState(e,t){}visitTransition(e,t){}visitAnimateChild(e,t){let n=t.subInstructions.get(t.element);if(n){let r=t.createSubContext(e.options),o=t.currentTimeline.currentTime,s=this._visitSubInstructions(n,r,r.options);o!=s&&t.transformIntoNewTimeline(s)}t.previousNode=e}visitAnimateRef(e,t){let n=t.createSubContext(e.options);n.transformIntoNewTimeline(),this._applyAnimationRefDelays([e.options,e.animation.options],t,n),this.visitReference(e.animation,n),t.transformIntoNewTimeline(n.currentTimeline.currentTime),t.previousNode=e}_applyAnimationRefDelays(e,t,n){for(let r of e){let o=r?.delay;if(o){let s=typeof o=="number"?o:ka(Im(o,r?.params??{},t.errors));n.delayNextStep(s)}}}_visitSubInstructions(e,t,n){let o=t.currentTimeline.currentTime,s=n.duration!=null?ka(n.duration):null,a=n.delay!=null?ka(n.delay):null;return s!==0&&e.forEach(c=>{let l=t.appendInstructionToTimeline(c,s,a);o=Math.max(o,l.duration+l.delay)}),o}visitReference(e,t){t.updateOptions(e.options,!0),go(this,e.animation,t),t.previousNode=e}visitSequence(e,t){let n=t.subContextCount,r=t,o=e.options;if(o&&(o.params||o.delay)&&(r=t.createSubContext(o),r.transformIntoNewTimeline(),o.delay!=null)){r.previousNode.type==zt.Style&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=Vb);let s=ka(o.delay);r.delayNextStep(s)}e.steps.length&&(e.steps.forEach(s=>go(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>n&&r.transformIntoNewTimeline()),t.previousNode=e}visitGroup(e,t){let n=[],r=t.currentTimeline.currentTime,o=e.options&&e.options.delay?ka(e.options.delay):0;e.steps.forEach(s=>{let a=t.createSubContext(e.options);o&&a.delayNextStep(o),go(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),n.push(a.currentTimeline)}),n.forEach(s=>t.currentTimeline.mergeTimelineCollectedStyles(s)),t.transformIntoNewTimeline(r),t.previousNode=e}_visitTiming(e,t){if(e.dynamic){let n=e.strValue,r=t.params?Im(n,t.params,t.errors):n;return Lb(r,t.errors)}else return{duration:e.duration,delay:e.delay,easing:e.easing}}visitAnimate(e,t){let n=t.currentAnimateTimings=this._visitTiming(e.timings,t),r=t.currentTimeline;n.delay&&(t.incrementTime(n.delay),r.snapshotCurrentStyles());let o=e.style;o.type==zt.Keyframes?this.visitKeyframes(o,t):(t.incrementTime(n.duration),this.visitStyle(o,t),r.applyStylesToKeyframe()),t.currentAnimateTimings=null,t.previousNode=e}visitStyle(e,t){let n=t.currentTimeline,r=t.currentAnimateTimings;!r&&n.hasCurrentStyleProperties()&&n.forwardFrame();let o=r&&r.easing||e.easing;e.isEmptyStep?n.applyEmptyStep(o):n.setStyles(e.styles,o,t.errors,t.options),t.previousNode=e}visitKeyframes(e,t){let n=t.currentAnimateTimings,r=t.currentTimeline.duration,o=n.duration,a=t.createSubContext().currentTimeline;a.easing=n.easing,e.styles.forEach(c=>{let l=c.offset||0;a.forwardTime(l*o),a.setStyles(c.styles,c.easing,t.errors,t.options),a.applyStylesToKeyframe()}),t.currentTimeline.mergeTimelineCollectedStyles(a),t.transformIntoNewTimeline(r+o),t.previousNode=e}visitQuery(e,t){let n=t.currentTimeline.currentTime,r=e.options||{},o=r.delay?ka(r.delay):0;o&&(t.previousNode.type===zt.Style||n==0&&t.currentTimeline.hasCurrentStyleProperties())&&(t.currentTimeline.snapshotCurrentStyles(),t.previousNode=Vb);let s=n,a=t.invokeQuery(e.selector,e.originalSelector,e.limit,e.includeSelf,!!r.optional,t.errors);t.currentQueryTotal=a.length;let c=null;a.forEach((l,d)=>{t.currentQueryIndex=d;let u=t.createSubContext(e.options,l);o&&u.delayNextStep(o),l===t.element&&(c=u.currentTimeline),go(this,e.animation,u),u.currentTimeline.applyStylesToKeyframe();let h=u.currentTimeline.currentTime;s=Math.max(s,h)}),t.currentQueryIndex=0,t.currentQueryTotal=0,t.transformIntoNewTimeline(s),c&&(t.currentTimeline.mergeTimelineCollectedStyles(c),t.currentTimeline.snapshotCurrentStyles()),t.previousNode=e}visitStagger(e,t){let n=t.parentContext,r=t.currentTimeline,o=e.timings,s=Math.abs(o.duration),a=s*(t.currentQueryTotal-1),c=s*t.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":c=a-c;break;case"full":c=n.currentStaggerTime;break}let d=t.currentTimeline;c&&d.delayNextStep(c);let u=d.currentTime;go(this,e.animation,t),t.previousNode=e,n.currentStaggerTime=r.currentTime-u+(r.startTime-n.currentTimeline.startTime)}},Vb={},vI=class i{constructor(e,t,n,r,o,s,a,c){this._driver=e,this.element=t,this.subInstructions=n,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=Vb,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=c||new zb(this._driver,t,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(e,t){if(!e)return;let n=e,r=this.options;n.duration!=null&&(r.duration=ka(n.duration)),n.delay!=null&&(r.delay=ka(n.delay));let o=n.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!t||!s.hasOwnProperty(a))&&(s[a]=Im(o[a],s,this.errors))})}}_copyOptions(){let e={};if(this.options){let t=this.options.params;if(t){let n=e.params={};Object.keys(t).forEach(r=>{n[r]=t[r]})}}return e}createSubContext(e=null,t,n){let r=t||this.element,o=new i(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,n||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(e),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(e){return this.previousNode=Vb,this.currentTimeline=this.currentTimeline.fork(this.element,e),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(e,t,n){let r={duration:t??e.duration,delay:this.currentTimeline.currentTime+(n??0)+e.delay,easing:""},o=new bI(this._driver,e.element,e.keyframes,e.preStyleProps,e.postStyleProps,r,e.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(e){this.currentTimeline.forwardTime(this.currentTimeline.duration+e)}delayNextStep(e){e>0&&this.currentTimeline.delayNextStep(e)}invokeQuery(e,t,n,r,o,s){let a=[];if(r&&a.push(this.element),e.length>0){e=e.replace(qZ,"."+this._enterClassName),e=e.replace(XZ,"."+this._leaveClassName);let c=n!=1,l=this._driver.query(this.element,e,c);n!==0&&(l=n<0?l.slice(l.length+n,l.length):l.slice(0,n)),a.push(...l)}return!o&&a.length==0&&s.push(lZ(t)),a}},zb=class i{constructor(e,t,n,r){this._driver=e,this.element=t,this.startTime=n,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(t),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(t,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(e){let t=this._keyframes.size===1&&this._pendingStyles.size;this.duration||t?(this.forwardTime(this.currentTime+e),t&&this.snapshotCurrentStyles()):this.startTime+=e}fork(e,t){return this.applyStylesToKeyframe(),new i(this._driver,e,t||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=WZ,this._loadKeyframe()}forwardTime(e){this.applyStylesToKeyframe(),this.duration=e,this._loadKeyframe()}_updateStyle(e,t){this._localTimelineStyles.set(e,t),this._globalTimelineStyles.set(e,t),this._styleSummary.set(e,{time:this.currentTime,value:t})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(e){e&&this._previousKeyframe.set("easing",e);for(let[t,n]of this._globalTimelineStyles)this._backFill.set(t,n||Ws),this._currentKeyframe.set(t,Ws);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(e,t,n,r){t&&this._previousKeyframe.set("easing",t);let o=r&&r.params||{},s=ZZ(e,this._globalTimelineStyles);for(let[a,c]of s){let l=Im(c,o,n);this._pendingStyles.set(a,l),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Ws),this._updateStyle(a,l)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((e,t)=>{this._currentKeyframe.set(t,e)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((e,t)=>{this._currentKeyframe.has(t)||this._currentKeyframe.set(t,e)}))}snapshotCurrentStyles(){for(let[e,t]of this._localTimelineStyles)this._pendingStyles.set(e,t),this._updateStyle(e,t)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let e=[];for(let t in this._currentKeyframe)e.push(t);return e}mergeTimelineCollectedStyles(e){e._styleSummary.forEach((t,n)=>{let r=this._styleSummary.get(n);(!r||t.time>r.time)&&this._updateStyle(n,t.value)})}buildKeyframes(){this.applyStylesToKeyframe();let e=new Set,t=new Set,n=this._keyframes.size===1&&this.duration===0,r=[];this._keyframes.forEach((a,c)=>{let l=new Map([...this._backFill,...a]);l.forEach((d,u)=>{d===Db?e.add(u):d===Ws&&t.add(u)}),n||l.set("offset",c/this.duration),r.push(l)});let o=[...e.values()],s=[...t.values()];if(n){let a=r[0],c=new Map(a);a.set("offset",0),c.set("offset",1),r=[a,c]}return AI(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}},bI=class extends zb{constructor(e,t,n,r,o,s,a=!1){super(e,t,s.delay),this.keyframes=n,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let e=this.keyframes,{delay:t,duration:n,easing:r}=this.timings;if(this._stretchStartingKeyframe&&t){let o=[],s=n+t,a=t/s,c=new Map(e[0]);c.set("offset",0),o.push(c);let l=new Map(e[0]);l.set("offset",MF(a)),o.push(l);let d=e.length-1;for(let u=1;u<=d;u++){let h=new Map(e[u]),p=h.get("offset"),f=t+p*n;h.set("offset",MF(f/s)),o.push(h)}n=s,t=0,r="",e=o}return AI(this.element,e,this.preStyleProps,this.postStyleProps,n,t,r,!0)}};function MF(i,e=3){let t=Math.pow(10,e-1);return Math.round(i*t)/t}function ZZ(i,e){let t=new Map,n;return i.forEach(r=>{if(r==="*"){n??=e.keys();for(let o of n)t.set(o,Ws)}else for(let[o,s]of r)t.set(o,s)}),t}function EF(i,e,t,n,r,o,s,a,c,l,d,u,h){return{type:0,element:i,triggerName:e,isRemovalTransition:r,fromState:t,fromStyles:o,toState:n,toStyles:s,timelines:a,queriedElements:c,preStyleProps:l,postStyleProps:d,totalTime:u,errors:h}}var aI={},Ub=class{constructor(e,t,n){this._triggerName=e,this.ast=t,this._stateStyles=n}match(e,t,n,r){return QZ(this.ast.matchers,e,t,n,r)}buildStyles(e,t,n){let r=this._stateStyles.get("*");return e!==void 0&&(r=this._stateStyles.get(e?.toString())||r),r?r.buildStyles(t,n):new Map}build(e,t,n,r,o,s,a,c,l,d){let u=[],h=this.ast.options&&this.ast.options.params||aI,p=a&&a.params||aI,f=this.buildStyles(n,p,u),m=c&&c.params||aI,y=this.buildStyles(r,m,u),g=new Set,_=new Map,x=new Map,C=r==="void",T={params:HF(m,h),delay:this.ast.options?.delay},D=d?[]:UF(e,t,this.ast.animation,o,s,f,y,T,l,u),E=0;return D.forEach(A=>{E=Math.max(A.duration+A.delay,E)}),u.length?EF(t,this._triggerName,n,r,C,f,y,[],[],_,x,E,u):(D.forEach(A=>{let j=A.element,q=_o(_,j,new Set);A.preStyleProps.forEach(P=>q.add(P));let z=_o(x,j,new Set);A.postStyleProps.forEach(P=>z.add(P)),j!==t&&g.add(j)}),EF(t,this._triggerName,n,r,C,f,y,D,[...g.values()],_,x,E))}};function QZ(i,e,t,n,r){return i.some(o=>o(e,t,n,r))}function HF(i,e){let t=Z({},e);return Object.entries(i).forEach(([n,r])=>{r!=null&&(t[n]=r)}),t}var yI=class{constructor(e,t,n){this.styles=e,this.defaultParams=t,this.normalizer=n}buildStyles(e,t){let n=new Map,r=HF(e,this.defaultParams);return this.styles.styles.forEach(o=>{typeof o!="string"&&o.forEach((s,a)=>{s&&(s=Im(s,r,t));let c=this.normalizer.normalizePropertyName(a,t);s=this.normalizer.normalizeStyleValue(a,c,s,t),n.set(a,s)})}),n}};function KZ(i,e,t){return new xI(i,e,t)}var xI=class{constructor(e,t,n){this.name=e,this.ast=t,this._normalizer=n,this.transitionFactories=[],this.states=new Map,t.states.forEach(r=>{let o=r.options&&r.options.params||{};this.states.set(r.name,new yI(r.style,o,n))}),IF(this.states,"true","1"),IF(this.states,"false","0"),t.transitions.forEach(r=>{this.transitionFactories.push(new Ub(e,r,this.states))}),this.fallbackTransition=JZ(e,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(e,t,n,r){return this.transitionFactories.find(s=>s.match(e,t,n,r))||null}matchStyles(e,t,n){return this.fallbackTransition.buildStyles(e,t,n)}};function JZ(i,e,t){let n=[(s,a)=>!0],r={type:zt.Sequence,steps:[],options:null},o={type:zt.Transition,animation:r,matchers:n,options:null,queryCount:0,depCount:0};return new Ub(i,o,e)}function IF(i,e,t){i.has(e)?i.has(t)||i.set(t,i.get(e)):i.has(t)&&i.set(e,i.get(t))}var eQ=new Tm,wI=class{constructor(e,t,n){this.bodyNode=e,this._driver=t,this._normalizer=n,this._animations=new Map,this._playersById=new Map,this.players=[]}register(e,t){let n=[],r=[],o=zF(this._driver,t,n,r);if(n.length)throw fZ(n);r.length&&void 0,this._animations.set(e,o)}_buildPlayer(e,t,n){let r=e.element,o=AF(this._normalizer,e.keyframes,t,n);return this._driver.animate(r,o,e.duration,e.delay,e.easing,[],!0)}create(e,t,n={}){let r=[],o=this._animations.get(e),s,a=new Map;if(o?(s=UF(this._driver,t,o,FF,uI,new Map,new Map,n,eQ,r),s.forEach(d=>{let u=_o(a,d.element,new Map);d.postStyleProps.forEach(h=>u.set(h,null))})):(r.push(mZ()),s=[]),r.length)throw gZ(r);a.forEach((d,u)=>{d.forEach((h,p)=>{d.set(p,this._driver.computeStyle(u,p,Ws))})});let c=s.map(d=>{let u=a.get(d.element);return this._buildPlayer(d,new Map,u)}),l=Bc(c);return this._playersById.set(e,l),l.onDestroy(()=>this.destroy(e)),this.players.push(l),l}destroy(e){let t=this._getPlayer(e);t.destroy(),this._playersById.delete(e);let n=this.players.indexOf(t);n>=0&&this.players.splice(n,1)}_getPlayer(e){let t=this._playersById.get(e);if(!t)throw _Z(e);return t}listen(e,t,n,r){let o=TI(t,"","","");return II(this._getPlayer(e),n,o,r),()=>{}}command(e,t,n,r){if(n=="register"){this.register(e,r[0]);return}if(n=="create"){let s=r[0]||{};this.create(e,t,s);return}let o=this._getPlayer(e);switch(n){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(e);break}}},TF="ng-animate-queued",tQ=".ng-animate-queued",cI="ng-animate-disabled",nQ=".ng-animate-disabled",iQ="ng-star-inserted",rQ=".ng-star-inserted",oQ=[],GF={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},sQ={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},fs="__ng_removed",Dm=class{get params(){return this.options.params}constructor(e,t=""){this.namespaceId=t;let n=e&&e.hasOwnProperty("value"),r=n?e.value:e;if(this.value=cQ(r),n){let o=e,{value:s}=o,a=dS(o,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(e){let t=e.params;if(t){let n=this.options.params;Object.keys(t).forEach(r=>{n[r]==null&&(n[r]=t[r])})}}},Em="void",lI=new Dm(Em),CI=class{constructor(e,t,n){this.id=e,this.hostElement=t,this._engine=n,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+e,Vo(t,this._hostClassName)}listen(e,t,n,r){if(!this._triggers.has(t))throw vZ(n,t);if(n==null||n.length==0)throw bZ(t);if(!lQ(n))throw yZ(n,t);let o=_o(this._elementListeners,e,[]),s={name:t,phase:n,callback:r};o.push(s);let a=_o(this._engine.statesByElement,e,new Map);return a.has(t)||(Vo(e,Pb),Vo(e,Pb+"-"+t),a.set(t,lI)),()=>{this._engine.afterFlush(()=>{let c=o.indexOf(s);c>=0&&o.splice(c,1),this._triggers.has(t)||a.delete(t)})}}register(e,t){return this._triggers.has(e)?!1:(this._triggers.set(e,t),!0)}_getTrigger(e){let t=this._triggers.get(e);if(!t)throw xZ(e);return t}trigger(e,t,n,r=!0){let o=this._getTrigger(t),s=new Pm(this.id,t,e),a=this._engine.statesByElement.get(e);a||(Vo(e,Pb),Vo(e,Pb+"-"+t),this._engine.statesByElement.set(e,a=new Map));let c=a.get(t),l=new Dm(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&c&&l.absorbOptions(c.options),a.set(t,l),c||(c=lI),!(l.value===Em)&&c.value===l.value){if(!hQ(c.params,l.params)){let m=[],y=o.matchStyles(c.value,c.params,m),g=o.matchStyles(l.value,l.params,m);m.length?this._engine.reportError(m):this._engine.afterFlush(()=>{ld(e,y),$s(e,g)})}return}let h=_o(this._engine.playersByElement,e,[]);h.forEach(m=>{m.namespaceId==this.id&&m.triggerName==t&&m.queued&&m.destroy()});let p=o.matchTransition(c.value,l.value,e,l.params),f=!1;if(!p){if(!r)return;p=o.fallbackTransition,f=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:t,transition:p,fromState:c,toState:l,player:s,isFallbackTransition:f}),f||(Vo(e,TF),s.onStart(()=>{vh(e,TF)})),s.onDone(()=>{let m=this.players.indexOf(s);m>=0&&this.players.splice(m,1);let y=this._engine.playersByElement.get(e);if(y){let g=y.indexOf(s);g>=0&&y.splice(g,1)}}),this.players.push(s),h.push(s),s}deregister(e){this._triggers.delete(e),this._engine.statesByElement.forEach(t=>t.delete(e)),this._elementListeners.forEach((t,n)=>{this._elementListeners.set(n,t.filter(r=>r.name!=e))})}clearElementCache(e){this._engine.statesByElement.delete(e),this._elementListeners.delete(e);let t=this._engine.playersByElement.get(e);t&&(t.forEach(n=>n.destroy()),this._engine.playersByElement.delete(e))}_signalRemovalForInnerTriggers(e,t){let n=this._engine.driver.query(e,kb,!0);n.forEach(r=>{if(r[fs])return;let o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,t,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(e,t,n,r){let o=this._engine.statesByElement.get(e),s=new Map;if(o){let a=[];if(o.forEach((c,l)=>{if(s.set(l,c.value),this._triggers.has(l)){let d=this.trigger(e,l,Em,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,e,!0,t,s),n&&Bc(a).onDone(()=>this._engine.processLeaveNode(e)),!0}return!1}prepareLeaveAnimationListeners(e){let t=this._elementListeners.get(e),n=this._engine.statesByElement.get(e);if(t&&n){let r=new Set;t.forEach(o=>{let s=o.name;if(r.has(s))return;r.add(s);let c=this._triggers.get(s).fallbackTransition,l=n.get(s)||lI,d=new Dm(Em),u=new Pm(this.id,s,e);this._engine.totalQueuedPlayers++,this._queue.push({element:e,triggerName:s,transition:c,fromState:l,toState:d,player:u,isFallbackTransition:!0})})}}removeNode(e,t){let n=this._engine;if(e.childElementCount&&this._signalRemovalForInnerTriggers(e,t),this.triggerLeaveAnimation(e,t,!0))return;let r=!1;if(n.totalAnimations){let o=n.players.length?n.playersByQueriedElement.get(e):[];if(o&&o.length)r=!0;else{let s=e;for(;s=s.parentNode;)if(n.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(e),r)n.markElementAsRemoved(this.id,e,!1,t);else{let o=e[fs];(!o||o===GF)&&(n.afterFlush(()=>this.clearElementCache(e)),n.destroyInnerAnimations(e),n._onRemovalComplete(e,t))}}insertNode(e,t){Vo(e,this._hostClassName)}drainQueuedTransitions(e){let t=[];return this._queue.forEach(n=>{let r=n.player;if(r.destroyed)return;let o=n.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==n.triggerName){let c=TI(o,n.triggerName,n.fromState.value,n.toState.value);c._data=e,II(n.player,a.phase,c,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):t.push(n)}),this._queue=[],t.sort((n,r)=>{let o=n.transition.ast.depCount,s=r.transition.ast.depCount;return o==0||s==0?o-s:this._engine.driver.containsElement(n.element,r.element)?1:-1})}destroy(e){this.players.forEach(t=>t.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,e)}},SI=class{_onRemovalComplete(e,t){this.onRemovalComplete(e,t)}constructor(e,t,n){this.bodyNode=e,this.driver=t,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){let e=[];return this._namespaceList.forEach(t=>{t.players.forEach(n=>{n.queued&&e.push(n)})}),e}createNamespace(e,t){let n=new CI(e,t,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,t)?this._balanceNamespaceList(n,t):(this.newHostElements.set(t,n),this.collectEnterElement(t)),this._namespaceLookup[e]=n}_balanceNamespaceList(e,t){let n=this._namespaceList,r=this.namespacesByHostElement;if(n.length-1>=0){let s=!1,a=this.driver.getParentElement(t);for(;a;){let c=r.get(a);if(c){let l=n.indexOf(c);n.splice(l+1,0,e),s=!0;break}a=this.driver.getParentElement(a)}s||n.unshift(e)}else n.push(e);return r.set(t,e),e}register(e,t){let n=this._namespaceLookup[e];return n||(n=this.createNamespace(e,t)),n}registerTrigger(e,t,n){let r=this._namespaceLookup[e];r&&r.register(t,n)&&this.totalAnimations++}destroy(e,t){e&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let n=this._fetchNamespace(e);this.namespacesByHostElement.delete(n.hostElement);let r=this._namespaceList.indexOf(n);r>=0&&this._namespaceList.splice(r,1),n.destroy(t),delete this._namespaceLookup[e]}))}_fetchNamespace(e){return this._namespaceLookup[e]}fetchNamespacesByElement(e){let t=new Set,n=this.statesByElement.get(e);if(n){for(let r of n.values())if(r.namespaceId){let o=this._fetchNamespace(r.namespaceId);o&&t.add(o)}}return t}trigger(e,t,n,r){if(Ab(t)){let o=this._fetchNamespace(e);if(o)return o.trigger(t,n,r),!0}return!1}insertNode(e,t,n,r){if(!Ab(t))return;let o=t[fs];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;let s=this.collectedLeaveElements.indexOf(t);s>=0&&this.collectedLeaveElements.splice(s,1)}if(e){let s=this._fetchNamespace(e);s&&s.insertNode(t,n)}r&&this.collectEnterElement(t)}collectEnterElement(e){this.collectedEnterElements.push(e)}markElementAsDisabled(e,t){t?this.disabledNodes.has(e)||(this.disabledNodes.add(e),Vo(e,cI)):this.disabledNodes.has(e)&&(this.disabledNodes.delete(e),vh(e,cI))}removeNode(e,t,n){if(Ab(t)){let r=e?this._fetchNamespace(e):null;r?r.removeNode(t,n):this.markElementAsRemoved(e,t,!1,n);let o=this.namespacesByHostElement.get(t);o&&o.id!==e&&o.removeNode(t,n)}else this._onRemovalComplete(t,n)}markElementAsRemoved(e,t,n,r,o){this.collectedLeaveElements.push(t),t[fs]={namespaceId:e,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:o}}listen(e,t,n,r,o){return Ab(t)?this._fetchNamespace(e).listen(t,n,r,o):()=>{}}_buildInstruction(e,t,n,r,o){return e.transition.build(this.driver,e.element,e.fromState.value,e.toState.value,n,r,e.fromState.options,e.toState.options,t,o)}destroyInnerAnimations(e){let t=this.driver.query(e,kb,!0);t.forEach(n=>this.destroyActiveAnimationsForElement(n)),this.playersByQueriedElement.size!=0&&(t=this.driver.query(e,hI,!0),t.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(e){let t=this.playersByElement.get(e);t&&t.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(e){let t=this.playersByQueriedElement.get(e);t&&t.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(e=>{if(this.players.length)return Bc(this.players).onDone(()=>e());e()})}processLeaveNode(e){let t=e[fs];if(t&&t.setForRemoval){if(e[fs]=GF,t.namespaceId){this.destroyInnerAnimations(e);let n=this._fetchNamespace(t.namespaceId);n&&n.clearElementCache(e)}this._onRemovalComplete(e,t.setForRemoval)}e.classList?.contains(cI)&&this.markElementAsDisabled(e,!1),this.driver.query(e,nQ,!0).forEach(n=>{this.markElementAsDisabled(n,!1)})}flush(e=-1){let t=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,r)=>this._balanceNamespaceList(n,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nn()),this._flushFns=[],this._whenQuietFns.length){let n=this._whenQuietFns;this._whenQuietFns=[],t.length?Bc(t).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(e){throw wZ(e)}_flushAnimations(e,t){let n=new Tm,r=[],o=new Map,s=[],a=new Map,c=new Map,l=new Map,d=new Set;this.disabledNodes.forEach(k=>{d.add(k);let G=this.driver.query(k,tQ,!0);for(let K=0;K{let K=FF+m++;f.set(G,K),k.forEach(de=>Vo(de,K))});let y=[],g=new Set,_=new Set;for(let k=0;kg.add(de)):_.add(G))}let x=new Map,C=OF(h,Array.from(g));C.forEach((k,G)=>{let K=uI+m++;x.set(G,K),k.forEach(de=>Vo(de,K))}),e.push(()=>{p.forEach((k,G)=>{let K=f.get(G);k.forEach(de=>vh(de,K))}),C.forEach((k,G)=>{let K=x.get(G);k.forEach(de=>vh(de,K))}),y.forEach(k=>{this.processLeaveNode(k)})});let T=[],D=[];for(let k=this._namespaceList.length-1;k>=0;k--)this._namespaceList[k].drainQueuedTransitions(t).forEach(K=>{let de=K.player,De=K.element;if(T.push(de),this.collectedEnterElements.length){let Ge=De[fs];if(Ge&&Ge.setForMove){if(Ge.previousTriggersValues&&Ge.previousTriggersValues.has(K.triggerName)){let ft=Ge.previousTriggersValues.get(K.triggerName),ze=this.statesByElement.get(K.element);if(ze&&ze.has(K.triggerName)){let Qe=ze.get(K.triggerName);Qe.value=ft,ze.set(K.triggerName,Qe)}}de.destroy();return}}let Te=!u||!this.driver.containsElement(u,De),He=x.get(De),he=f.get(De),se=this._buildInstruction(K,n,he,He,Te);if(se.errors&&se.errors.length){D.push(se);return}if(Te){de.onStart(()=>ld(De,se.fromStyles)),de.onDestroy(()=>$s(De,se.toStyles)),r.push(de);return}if(K.isFallbackTransition){de.onStart(()=>ld(De,se.fromStyles)),de.onDestroy(()=>$s(De,se.toStyles)),r.push(de);return}let qe=[];se.timelines.forEach(Ge=>{Ge.stretchStartingKeyframe=!0,this.disabledNodes.has(Ge.element)||qe.push(Ge)}),se.timelines=qe,n.append(De,se.timelines);let ue={instruction:se,player:de,element:De};s.push(ue),se.queriedElements.forEach(Ge=>_o(a,Ge,[]).push(de)),se.preStyleProps.forEach((Ge,ft)=>{if(Ge.size){let ze=c.get(ft);ze||c.set(ft,ze=new Set),Ge.forEach((Qe,Ot)=>ze.add(Ot))}}),se.postStyleProps.forEach((Ge,ft)=>{let ze=l.get(ft);ze||l.set(ft,ze=new Set),Ge.forEach((Qe,Ot)=>ze.add(Ot))})});if(D.length){let k=[];D.forEach(G=>{k.push(CZ(G.triggerName,G.errors))}),T.forEach(G=>G.destroy()),this.reportError(k)}let E=new Map,A=new Map;s.forEach(k=>{let G=k.element;n.has(G)&&(A.set(G,G),this._beforeAnimationBuild(k.player.namespaceId,k.instruction,E))}),r.forEach(k=>{let G=k.element;this._getPreviousPlayers(G,!1,k.namespaceId,k.triggerName,null).forEach(de=>{_o(E,G,[]).push(de),de.destroy()})});let j=y.filter(k=>RF(k,c,l)),q=new Map;PF(q,this.driver,_,l,Ws).forEach(k=>{RF(k,c,l)&&j.push(k)});let P=new Map;p.forEach((k,G)=>{PF(P,this.driver,new Set(k),c,Db)}),j.forEach(k=>{let G=q.get(k),K=P.get(k);q.set(k,new Map([...G?.entries()??[],...K?.entries()??[]]))});let U=[],W=[],Y={};s.forEach(k=>{let{element:G,player:K,instruction:de}=k;if(n.has(G)){if(d.has(G)){K.onDestroy(()=>$s(G,de.toStyles)),K.disabled=!0,K.overrideTotalTime(de.totalTime),r.push(K);return}let De=Y;if(A.size>1){let He=G,he=[];for(;He=He.parentNode;){let se=A.get(He);if(se){De=se;break}he.push(He)}he.forEach(se=>A.set(se,De))}let Te=this._buildAnimation(K.namespaceId,de,E,o,P,q);if(K.setRealPlayer(Te),De===Y)U.push(K);else{let He=this.playersByElement.get(De);He&&He.length&&(K.parentPlayer=Bc(He)),r.push(K)}}else ld(G,de.fromStyles),K.onDestroy(()=>$s(G,de.toStyles)),W.push(K),d.has(G)&&r.push(K)}),W.forEach(k=>{let G=o.get(k.element);if(G&&G.length){let K=Bc(G);k.setRealPlayer(K)}}),r.forEach(k=>{k.parentPlayer?k.syncPlayerEvents(k.parentPlayer):k.destroy()});for(let k=0;k!Te.destroyed);De.length?dQ(this,G,De):this.processLeaveNode(G)}return y.length=0,U.forEach(k=>{this.players.push(k),k.onDone(()=>{k.destroy();let G=this.players.indexOf(k);this.players.splice(G,1)}),k.play()}),U}afterFlush(e){this._flushFns.push(e)}afterFlushAnimationsDone(e){this._whenQuietFns.push(e)}_getPreviousPlayers(e,t,n,r,o){let s=[];if(t){let a=this.playersByQueriedElement.get(e);a&&(s=a)}else{let a=this.playersByElement.get(e);if(a){let c=!o||o==Em;a.forEach(l=>{l.queued||!c&&l.triggerName!=r||s.push(l)})}}return(n||r)&&(s=s.filter(a=>!(n&&n!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(e,t,n){let r=t.triggerName,o=t.element,s=t.isRemovalTransition?void 0:e,a=t.isRemovalTransition?void 0:r;for(let c of t.timelines){let l=c.element,d=l!==o,u=_o(n,l,[]);this._getPreviousPlayers(l,d,s,a,t.toState).forEach(p=>{let f=p.getRealPlayer();f.beforeDestroy&&f.beforeDestroy(),p.destroy(),u.push(p)})}ld(o,t.fromStyles)}_buildAnimation(e,t,n,r,o,s){let a=t.triggerName,c=t.element,l=[],d=new Set,u=new Set,h=t.timelines.map(f=>{let m=f.element;d.add(m);let y=m[fs];if(y&&y.removedBeforeQueried)return new Fc(f.duration,f.delay);let g=m!==c,_=uQ((n.get(m)||oQ).map(E=>E.getRealPlayer())).filter(E=>{let A=E;return A.element?A.element===m:!1}),x=o.get(m),C=s.get(m),T=AF(this._normalizer,f.keyframes,x,C),D=this._buildPlayer(f,T,_);if(f.subTimeline&&r&&u.add(m),g){let E=new Pm(e,a,m);E.setRealPlayer(D),l.push(E)}return D});l.forEach(f=>{_o(this.playersByQueriedElement,f.element,[]).push(f),f.onDone(()=>aQ(this.playersByQueriedElement,f.element,f))}),d.forEach(f=>Vo(f,wF));let p=Bc(h);return p.onDestroy(()=>{d.forEach(f=>vh(f,wF)),$s(c,t.toStyles)}),u.forEach(f=>{_o(r,f,[]).push(p)}),p}_buildPlayer(e,t,n){return t.length>0?this.driver.animate(e.element,t,e.duration,e.delay,e.easing,n):new Fc(e.duration,e.delay)}},Pm=class{constructor(e,t,n){this.namespaceId=e,this.triggerName=t,this.element=n,this._player=new Fc,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(e){this._containsRealPlayer||(this._player=e,this._queuedCallbacks.forEach((t,n)=>{t.forEach(r=>II(e,n,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(e.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(e){this.totalTime=e}syncPlayerEvents(e){let t=this._player;t.triggerCallback&&e.onStart(()=>t.triggerCallback("start")),e.onDone(()=>this.finish()),e.onDestroy(()=>this.destroy())}_queueEvent(e,t){_o(this._queuedCallbacks,e,[]).push(t)}onDone(e){this.queued&&this._queueEvent("done",e),this._player.onDone(e)}onStart(e){this.queued&&this._queueEvent("start",e),this._player.onStart(e)}onDestroy(e){this.queued&&this._queueEvent("destroy",e),this._player.onDestroy(e)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(e){this.queued||this._player.setPosition(e)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(e){let t=this._player;t.triggerCallback&&t.triggerCallback(e)}};function aQ(i,e,t){let n=i.get(e);if(n){if(n.length){let r=n.indexOf(t);n.splice(r,1)}n.length==0&&i.delete(e)}return n}function cQ(i){return i??null}function Ab(i){return i&&i.nodeType===1}function lQ(i){return i=="start"||i=="done"}function DF(i,e){let t=i.style.display;return i.style.display=e??"none",t}function PF(i,e,t,n,r){let o=[];t.forEach(c=>o.push(DF(c)));let s=[];n.forEach((c,l)=>{let d=new Map;c.forEach(u=>{let h=e.computeStyle(l,u,r);d.set(u,h),(!h||h.length==0)&&(l[fs]=sQ,s.push(l))}),i.set(l,d)});let a=0;return t.forEach(c=>DF(c,o[a++])),s}function OF(i,e){let t=new Map;if(i.forEach(a=>t.set(a,[])),e.length==0)return t;let n=1,r=new Set(e),o=new Map;function s(a){if(!a)return n;let c=o.get(a);if(c)return c;let l=a.parentNode;return t.has(l)?c=l:r.has(l)?c=n:c=s(l),o.set(a,c),c}return e.forEach(a=>{let c=s(a);c!==n&&t.get(c).push(a)}),t}function Vo(i,e){i.classList?.add(e)}function vh(i,e){i.classList?.remove(e)}function dQ(i,e,t){Bc(t).onDone(()=>i.processLeaveNode(e))}function uQ(i){let e=[];return jF(i,e),e}function jF(i,e){for(let t=0;tr.add(o)):e.set(i,n),t.delete(i),!0}var yh=class{constructor(e,t,n){this._driver=t,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new SI(e.body,t,n),this._timelineEngine=new wI(e.body,t,n),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(e,t,n,r,o){let s=e+"-"+r,a=this._triggerCache[s];if(!a){let c=[],l=[],d=zF(this._driver,o,c,l);if(c.length)throw hZ(r,c);l.length&&void 0,a=KZ(r,d,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(t,r,a)}register(e,t){this._transitionEngine.register(e,t)}destroy(e,t){this._transitionEngine.destroy(e,t)}onInsert(e,t,n,r){this._transitionEngine.insertNode(e,t,n,r)}onRemove(e,t,n){this._transitionEngine.removeNode(e,t,n)}disableAnimations(e,t){this._transitionEngine.markElementAsDisabled(e,t)}process(e,t,n,r){if(n.charAt(0)=="@"){let[o,s]=yF(n),a=r;this._timelineEngine.command(o,t,s,a)}else this._transitionEngine.trigger(e,t,n,r)}listen(e,t,n,r,o){if(n.charAt(0)=="@"){let[s,a]=yF(n);return this._timelineEngine.listen(s,t,a,o)}return this._transitionEngine.listen(e,t,n,r,o)}flush(e=-1){this._transitionEngine.flush(e)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(e){this._transitionEngine.afterFlushAnimationsDone(e)}};function pQ(i,e){let t=null,n=null;return Array.isArray(e)&&e.length?(t=dI(e[0]),e.length>1&&(n=dI(e[e.length-1]))):e instanceof Map&&(t=dI(e)),t||n?new MI(i,t,n):null}var bh=class bh{constructor(e,t,n){this._element=e,this._startStyles=t,this._endStyles=n,this._state=0;let r=bh.initialStylesByElement.get(e);r||bh.initialStylesByElement.set(e,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&$s(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&($s(this._element,this._initialStyles),this._endStyles&&($s(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(bh.initialStylesByElement.delete(this._element),this._startStyles&&(ld(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(ld(this._element,this._endStyles),this._endStyles=null),$s(this._element,this._initialStyles),this._state=3)}};bh.initialStylesByElement=new WeakMap;var MI=bh;function dI(i){let e=null;return i.forEach((t,n)=>{fQ(n)&&(e=e||new Map,e.set(n,t))}),e}function fQ(i){return i==="display"||i==="position"}var Hb=class{constructor(e,t,n,r){this.element=e,this.keyframes=t,this.options=n,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(e=>e()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let e=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,e,this.options),this._finalKeyframe=e.length?e[e.length-1]:new Map;let t=()=>this._onFinish();this.domPlayer.addEventListener("finish",t),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",t)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(e){let t=[];return e.forEach(n=>{t.push(Object.fromEntries(n))}),t}_triggerWebAnimation(e,t,n){return e.animate(this._convertKeyframesToObject(t),n)}onStart(e){this._originalOnStartFns.push(e),this._onStartFns.push(e)}onDone(e){this._originalOnDoneFns.push(e),this._onDoneFns.push(e)}onDestroy(e){this._onDestroyFns.push(e)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(e=>e()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(e=>e()),this._onDestroyFns=[])}setPosition(e){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=e*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let e=new Map;this.hasStarted()&&this._finalKeyframe.forEach((n,r)=>{r!=="offset"&&e.set(r,this._finished?n:RI(this.element,r))}),this.currentSnapshot=e}triggerCallback(e){let t=e==="start"?this._onStartFns:this._onDoneFns;t.forEach(n=>n()),t.length=0}},Gb=class{validateStyleProperty(e){return!0}validateAnimatableStyleProperty(e){return!0}containsElement(e,t){return NF(e,t)}getParentElement(e){return DI(e)}query(e,t,n){return kF(e,t,n)}computeStyle(e,t,n){return RI(e,t)}animate(e,t,n,r,o,s=[]){let a=r==0?"both":"forwards",c={duration:n,delay:r,fill:a};o&&(c.easing=o);let l=new Map,d=s.filter(p=>p instanceof Hb);NZ(n,r)&&d.forEach(p=>{p.currentSnapshot.forEach((f,m)=>l.set(m,f))});let u=OZ(t).map(p=>new Map(p));u=kZ(e,u,l);let h=pQ(e,u);return new Hb(e,u,c,h)}};var Nb="@",WF="@.disabled",jb=class{constructor(e,t,n,r){this.namespaceId=e,this.delegate=t,this.engine=n,this._onDestroy=r,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(e){this.delegate.destroyNode?.(e)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(e,t){return this.delegate.createElement(e,t)}createComment(e){return this.delegate.createComment(e)}createText(e){return this.delegate.createText(e)}appendChild(e,t){this.delegate.appendChild(e,t),this.engine.onInsert(this.namespaceId,t,e,!1)}insertBefore(e,t,n,r=!0){this.delegate.insertBefore(e,t,n),this.engine.onInsert(this.namespaceId,t,e,r)}removeChild(e,t,n){this.engine.onRemove(this.namespaceId,t,this.delegate)}selectRootElement(e,t){return this.delegate.selectRootElement(e,t)}parentNode(e){return this.delegate.parentNode(e)}nextSibling(e){return this.delegate.nextSibling(e)}setAttribute(e,t,n,r){this.delegate.setAttribute(e,t,n,r)}removeAttribute(e,t,n){this.delegate.removeAttribute(e,t,n)}addClass(e,t){this.delegate.addClass(e,t)}removeClass(e,t){this.delegate.removeClass(e,t)}setStyle(e,t,n,r){this.delegate.setStyle(e,t,n,r)}removeStyle(e,t,n){this.delegate.removeStyle(e,t,n)}setProperty(e,t,n){t.charAt(0)==Nb&&t==WF?this.disableAnimations(e,!!n):this.delegate.setProperty(e,t,n)}setValue(e,t){this.delegate.setValue(e,t)}listen(e,t,n){return this.delegate.listen(e,t,n)}disableAnimations(e,t){this.engine.disableAnimations(e,t)}},EI=class extends jb{constructor(e,t,n,r,o){super(t,n,r,o),this.factory=e,this.namespaceId=t}setProperty(e,t,n){t.charAt(0)==Nb?t.charAt(1)=="."&&t==WF?(n=n===void 0?!0:!!n,this.disableAnimations(e,n)):this.engine.process(this.namespaceId,e,t.slice(1),n):this.delegate.setProperty(e,t,n)}listen(e,t,n){if(t.charAt(0)==Nb){let r=mQ(e),o=t.slice(1),s="";return o.charAt(0)!=Nb&&([o,s]=gQ(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{let c=a._data||-1;this.factory.scheduleListenerCallback(c,n,a)})}return this.delegate.listen(e,t,n)}};function mQ(i){switch(i){case"body":return document.body;case"document":return document;case"window":return window;default:return i}}function gQ(i){let e=i.indexOf("."),t=i.substring(0,e),n=i.slice(e+1);return[t,n]}var Wb=class{constructor(e,t,n){this.delegate=e,this.engine=t,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,t.onRemovalComplete=(r,o)=>{let s=o?.parentNode(r);s&&o.removeChild(s,r)}}createRenderer(e,t){let n="",r=this.delegate.createRenderer(e,t);if(!e||!t?.data?.animation){let l=this._rendererCache,d=l.get(r);if(!d){let u=()=>l.delete(r);d=new jb(n,r,this.engine,u),l.set(r,d)}return d}let o=t.id,s=t.id+"-"+this._currentId;this._currentId++,this.engine.register(s,e);let a=l=>{Array.isArray(l)?l.forEach(a):this.engine.registerTrigger(o,s,e,l.name,l)};return t.data.animation.forEach(a),new EI(this,s,r,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(e,t,n){if(e>=0&&et(n));return}let r=this._animationCallbacksBuffer;r.length==0&&queueMicrotask(()=>{this._zone.run(()=>{r.forEach(o=>{let[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),r.push([t,n])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}};var vQ=(()=>{let e=class e extends yh{constructor(n,r,o){super(n,r,o)}ngOnDestroy(){this.flush()}};e.\u0275fac=function(r){return new(r||e)(X(Xe),X(dd),X(ud))},e.\u0275prov=J({token:e,factory:e.\u0275fac});let i=e;return i})();function bQ(){return new Fb}function yQ(i,e,t){return new Wb(i,e,t)}var $F=[{provide:ud,useFactory:bQ},{provide:yh,useClass:vQ},{provide:Pc,useFactory:yQ,deps:[ub,yh,Fe]}],xQ=[{provide:dd,useFactory:()=>new Gb},{provide:jn,useValue:"BrowserAnimations"},...$F],bIe=[{provide:dd,useClass:PI},{provide:jn,useValue:"NoopAnimations"},...$F];function qF(){return Lo("NgEagerAnimations"),[...xQ]}var Vc=function(i){return i[i.MAIN_PANEL=0]="MAIN_PANEL",i[i.POPUP=1]="POPUP",i[i.GRAPH_PANEL=2]="GRAPH_PANEL",i}(Vc||{}),kI=function(i){return i[i.WEBGL=0]="WEBGL",i}(kI||{}),xt=function(i){return i.NODE_LABEL="title",i.INPUT_METADATA="input",i.OUTPUT_METADATA="output",i.ATTRIBUTE="list",i}(xt||{}),Nn=function(i){return i.OP_NODE_ID="Op node id",i.OP_ATTRS="Op node attributes",i.OP_INPUTS="Op node inputs",i.OP_OUTPUTS="Op node outputs",i.LAYER_NODE_CHILDREN_COUNT="Layer node children count",i.LAYER_NODE_DESCENDANTS_COUNT="Layer node descendants count",i.LAYER_NODE_ATTRS="Layer node attributes",i}(Nn||{}),zc=function(i){return i.TENSOR_SHAPE="Tensor shape",i}(zc||{}),mn=function(i){return i[i.REGULAR=0]="REGULAR",i[i.MEDIUM=1]="MEDIUM",i[i.BOLD=2]="BOLD",i[i.MONOSPACE_MEDIUM=3]="MONOSPACE_MEDIUM",i[i.ICONS=4]="ICONS",i}(mn||{}),Uc=function(i){return i.OP_NODE_ID="id",i.NUMBER_OF_CHILDREN="#children",i.NUMBER_OF_DESCENDANTS="#descendants",i}(Uc||{}),qs=function(i){return i.NODE_BG_COLOR="node_bg_color",i.NODE_TEXT_COLOR="node_text_color",i.NODE_BORDER_COLOR="node_border_color",i}(qs||{}),$b=function(i){return i.V2="v2",i}($b||{}),Vn=function(i){return i.REGEX="regex",i.ATTR_VALUE_RANGE="attr_value_range",i.NODE_TYPE="node_type",i}(Vn||{}),_r=function(i){return i.OP_NODES="op_nodes",i.LAYER_NODES="layer_nodes",i.OP_AND_LAYER_NODES="op_and_layer_nodes",i}(_r||{});function Ei(i){i||(ih(Ei),i=te(Fi));let e=new Et(t=>i.onDestroy(t.next.bind(t)));return t=>t.pipe(Ze(e))}function qb(i,e){!e?.injector&&ih(qb);let t=e?.injector??te(vt),n=new ya(1),r=lt(()=>{let o;try{o=i()}catch(s){zr(()=>n.error(s));return}zr(()=>n.next(o))},{injector:t,manualCleanup:!0});return t.get(Fi).onDestroy(()=>{r.destroy(),n.complete()}),n.asObservable()}var zo=11,Yb=4;var LI=16,FI=200,Om=12,Rm=1e3;var en=.001,BI=25,VI=5,Xb="me_test",YF=.1,Zb="model_explorer_show_on_node_item_types_v2",Qb="model_explorer_show_on_edge_item_types_v2",La="Node data provider: ",Hc=10,Kb=7.5,Fa="__value",Uo="__tensor_tag",zI=20,Jb={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};var XF="model-explorer-export-to-resource",xh=14;var Ys=function(i){return i[i.OP_NODE=0]="OP_NODE",i[i.GROUP_NODE=1]="GROUP_NODE",i}(Ys||{});var kIe=new OffscreenCanvas(300,300);var Am=typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);function St(i){return i?.nodeType===Ys.OP_NODE}function wt(i){return i?.nodeType===Ys.GROUP_NODE}function UI(i){let e=[];for(let[t,n]of Object.entries(i))switch(t){case Nn.OP_NODE_ID:n.selected&&e.push(Uc.OP_NODE_ID);break;default:break}return e}function HI(i){let e=[];for(let[t,n]of Object.entries(i))switch(t){case Nn.LAYER_NODE_CHILDREN_COUNT:n.selected&&e.push(Uc.NUMBER_OF_CHILDREN);break;case Nn.LAYER_NODE_DESCENDANTS_COUNT:n.selected&&e.push(Uc.NUMBER_OF_DESCENDANTS);break;default:break}return e}function ey(i,e){if(St(i))switch(e.toLowerCase()){case Uc.OP_NODE_ID:return i.id;case"namespace":return hd(i);default:break}else if(wt(i))switch(e.toLowerCase()){case"namespace":return hd(i);case Uc.NUMBER_OF_CHILDREN:return String((i.nsChildrenIds||[]).length);case Uc.NUMBER_OF_DESCENDANTS:return String((i.descendantsNodeIds||[]).length);default:break}return""}function hd(i){return i.fullNamespace||i.namespace||""}function Ur(){return Math.random().toString(36).slice(-6)}function Nm(i,e,t,n=!1){let r=[];i==null?r=e.rootNodes.map(o=>o.id):r=i.nsChildrenIds||[];for(let o of r){let s=e.nodesById[o];if(s&&wt(s)&&(n||!n&&s.expanded)){let a=s.nsChildrenIds||[];(n?a.filter(l=>wt(e.nodesById[l])).length===0:a.filter(l=>wt(e.nodesById[l])).every(l=>!e.nodesById[l].expanded))&&t.push(s.id),Nm(s,e,t,n)}}}function wh(i,e,t,n){let r=[];if(i.length===2)r=i;else if(i.length===3&&i[0].x===i[1].x&&i[1].x===i[2].x)r=i;else{let o=!0,s=0;for(let c=0;cl?1:-1;if(s!==0&&s!==u){o=!1;break}s=u}let a=n.Vector3;if(o){let l=e().x(h=>h.x).y(h=>h.y).curve(t)(i).split(/M|C/).filter(h=>h!=="").map(h=>h.split(",").map(p=>Number(p))),d=new a(l[0][0],l[0][1],0),u=new n.CurvePath;for(let h=1;hnew a(d.x,d.y,0));r=new n.CatmullRomCurve3(c,!1,"catmullrom",YF).getPoints(BI)}}return r}function ty(){let i=ZF();return i?i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.contentEditable==="true":!1}function ZF(i=document){let e=i.activeElement;return e?e.shadowRoot?ZF(e.shadowRoot):e:null}function wQ(i,e,t){let n=t[Uo];return n?`Input${i}:${n} (${e.label})`:`Input${i} (${e.label})`}function CQ(i,e,t){let n=`Output${i}`;if(t.label==="GraphInputs"){let r=e.tensor_name;r!=null&&(n=`${n} (${r})`)}else{let r=e[Uo];r&&(n=`Output${i}:${r}`)}return n}function QF(i){let e=((i||{}).shape||"").replace(/ /g,"").replace(/×/g,"x");return e===""&&(e="?"),e}function GI(i,e=""){let t=i.attrs||{},n=[],r=new RegExp(e,"i");for(let o of Object.keys(t)){let s=o,a=t[o],c=[`${s}:${a}`,`${s}=${a}`];if(e.trim()===""||c.some(l=>r.test(l))){let l=a;s===Fa?l=a.replace(/\s/gm,""):l=a.replace(/(\r\n|\n|\r)/gm," "),n.push({key:s,value:l})}}return n}function jI(i,e,t=""){let n=e.groupNodeAttributes?.[i.id.replace("___group___","")]||{},r=[],o=new RegExp(t,"i");for(let s of Object.keys(n)){let a=s,c=n[s],l=[`${a}:${c}`,`${a}=${c}`];if(t.trim()===""||l.some(d=>o.test(d))){let d=c.replace(/(\r\n|\n|\r)/gm," ");r.push({key:a,value:d})}}return r}function WI(i,e){let t=i.incomingEdges||[],n=[];for(let r=0;rHc){let r=t.length-Hc;n.push({key:`(${r} more input${r===1?"":"s"} omitted)`,value:"..."})}return n}function $I(i){let e=[],t=i.outputsMetadata||{},n=Object.values(t);for(let r=0;rHc){let r=n.length-Hc;e.push({key:`(${r} more output${r===1?"":"s"} omitted)`,value:"..."})}return e}function qI(i,e,t,n){let r=[],o=Object.keys(t).filter(a=>t[a].selected).filter(a=>a.startsWith(La)).map(a=>a.replace(La,"")),s=Object.values(n).filter(a=>o.includes(a.runName));for(let a of s){let c=(a.results||{})?.[e][i.id]?.strValue||"-";r.push({key:a.runName,value:c})}return r}function YI(i,e){let t=i.split("/"),n=e.split("/"),r="";for(let o=Math.min(t.length,n.length);o>0;o--){let s=t.slice(0,o).join("/"),a=n.slice(0,o).join("/");if(s===a){r=a;break}}return r}function KF(i){return new RegExp(/Only `SavedModel`s with \d+ MetaGraph are supported. Instead, it has \d+/).test(i)?`${i}. Try using the "TF adapter (direct)" adapter.`:i}function XI(i,e,t,n){let r=[],o=new Set;if(i.has(xt.NODE_LABEL)&&e.test(t.label)&&(r.push({type:xt.NODE_LABEL}),o.add(xt.NODE_LABEL)),i.has(xt.ATTRIBUTE)){let s=JF(t,n);for(let a of Object.keys(s)){let c=s[a],l=`${a}:${c}`,d=`${a}=${c}`;(e.test(l)||e.test(d))&&(r.push({type:xt.ATTRIBUTE,matchedAttrId:a}),o.add(xt.ATTRIBUTE))}}if(i.has(xt.INPUT_METADATA)&&St(t))for(let s of t.incomingEdges||[]){let a=n.nodesById[s.sourceNodeId];e.test(a.label)&&(r.push({type:xt.INPUT_METADATA,matchedText:a.label}),o.add(xt.INPUT_METADATA));let c=t.inputsMetadata||{},l=(c[s.targetNodeInputId]||{})[Uo];l&&e.test(l)&&(r.push({type:xt.INPUT_METADATA,matchedText:l}),o.add(xt.INPUT_METADATA));let d=(a.outputsMetadata||{})[s.sourceNodeOutputId]||{};for(let h of Object.keys(d)){if(h.startsWith("__"))continue;let p=d[h],f=`${h}:${p}`,m=`${h}=${p}`;(e.test(p)||e.test(f)||e.test(m))&&(r.push({type:xt.INPUT_METADATA,matchedText:p}),o.add(xt.INPUT_METADATA))}let u=c[s.targetNodeInputId]||{};for(let h of Object.keys(u)){if(h.startsWith("__"))continue;let p=u[h],f=`${h}:${p}`,m=`${h}=${p}`;(e.test(p)||e.test(f)||e.test(m))&&(r.push({type:xt.INPUT_METADATA,matchedText:p}),o.add(xt.INPUT_METADATA))}}if(i.has(xt.OUTPUT_METADATA)&&St(t)){let s=t.outputsMetadata||{};for(let a of t.outgoingEdges||[]){let c=n.nodesById[a.targetNodeId];e.test(c.label)&&(r.push({type:xt.OUTPUT_METADATA,matchedText:c.label}),o.add(xt.OUTPUT_METADATA));let l=(s[a.sourceNodeOutputId]||{})[Uo];l&&e.test(l)&&(r.push({type:xt.OUTPUT_METADATA,matchedText:l}),o.add(xt.OUTPUT_METADATA))}for(let a of Object.values(s))for(let c of Object.keys(a)){if(c.startsWith("__"))continue;let l=a[c],d=`${c}:${l}`,u=`${c}=${l}`;(e.test(l)||e.test(d)||e.test(u))&&(r.push({type:xt.OUTPUT_METADATA,matchedText:l}),o.add(xt.OUTPUT_METADATA))}}return{matches:r,matchTypes:o}}function JF(i,e){let t={};if(St(i))t=Z({},i.attrs||{}),t.id=i.id;else if(wt(i)){t={"#descendants":`${(i.descendantsNodeIds||[]).length}`,"#children":`${(i.nsChildrenIds||[]).length}`,namespace:i.namespace||i.savedNamespace||""};let n=e.groupNodeAttributes?.[i.id.replace("___group___","")]||{};t=Z(Z({},t),n)}return t}function SQ(i,e,t,n,r){let o=[],a=JF(n,r)[i];if(a!=null){let c=Number(a);!isNaN(c)&&c>=e&&c<=t&&o.push({type:xt.ATTRIBUTE,matchedAttrId:i})}return o}function Ch(i){for(let e of i.filter(t=>t.type!==Vn.NODE_TYPE))switch(e.type){case Vn.REGEX:if(e.queryRegex!=="")return!0;break;case Vn.ATTR_VALUE_RANGE:if(e.attrName!=="")return!0;break;default:break}return!1}function ny(i){return i.map(e=>({queries:e.queries.map(n=>{switch(n.type){case Vn.REGEX:{let r=new RegExp("","i");try{r=new RegExp(n.queryRegex,"i")}catch(s){console.warn("Failed to create regex",s)}return{type:Vn.REGEX,queryRegex:r,matchTypes:new Set(n.matchTypes)}}case Vn.NODE_TYPE:case Vn.ATTR_VALUE_RANGE:return n;default:return}}),nodeType:e.nodeType,styles:e.styles}))}function km(i,e,t){let n=!0;for(let r of e)if(r.type===Vn.NODE_TYPE){let o=!0;if((St(i)&&r.nodeType===_r.LAYER_NODES||wt(i)&&r.nodeType===_r.OP_NODES)&&(o=!1),!o){n=!1;break}}else if(r.type===Vn.REGEX){if(XI(r.matchTypes,r.queryRegex,i,t).matches.length===0){n=!1;break}}else if(r.type===Vn.ATTR_VALUE_RANGE){if(r.attrName!==""&&SQ(r.attrName,r.min??Number.NEGATIVE_INFINITY,r.max??Number.POSITIVE_INFINITY,i,t).length===0){n=!1;break}}else n=!1;return n}function iy(i,e){window.parent.postMessage({cmd:XF,name:i,resource:e},"*")}function pd(){return window.devicePixelRatio===1?1.5:window.devicePixelRatio}function fd(i,e){let t=i.styles[e];return t?typeof t=="string"?t:t.value:""}function md(i){return i.split(` -`).map(e=>e.trim()).filter(e=>e!=="")}function ZI(i){return(md(i).length-1)*xh}var tr=function(i){return i[i.PROCESS_GRAPH_REQ=0]="PROCESS_GRAPH_REQ",i[i.PROCESS_GRAPH_RESP=1]="PROCESS_GRAPH_RESP",i[i.EXPAND_OR_COLLAPSE_GROUP_NODE_REQ=2]="EXPAND_OR_COLLAPSE_GROUP_NODE_REQ",i[i.EXPAND_OR_COLLAPSE_GROUP_NODE_RESP=3]="EXPAND_OR_COLLAPSE_GROUP_NODE_RESP",i[i.RELAYOUT_GRAPH_REQ=4]="RELAYOUT_GRAPH_REQ",i[i.RELAYOUT_GRAPH_RESP=5]="RELAYOUT_GRAPH_RESP",i[i.LOCATE_NODE_REQ=6]="LOCATE_NODE_REQ",i[i.LOCATE_NODE_RESP=7]="LOCATE_NODE_RESP",i[i.UPDATE_PROCESSING_PROGRESS=8]="UPDATE_PROCESSING_PROGRESS",i[i.PREPARE_POPUP_REQ=9]="PREPARE_POPUP_REQ",i[i.PREPARE_POPUP_RESP=10]="PREPARE_POPUP_RESP",i[i.CLEANUP=11]="CLEANUP",i}(tr||{}),gd=function(i){return i.PROCESSING_NODES_AND_EDGES="Processing nodes and edges",i.PROCESSING_LAYER_NAMESPACES="Processing layer namespaces",i.PROCESSING_LAYOUT_DATA="Processing layout data",i.SPLITTING_LARGE_LAYERS="Splitting large layers (if any)",i.LAYING_OUT_ROOT_LAYER="Laying out root layer",i.FINDING_IDENTICAL_LAYERS="Finding identical layers",i}(gd||{}),e3=[gd.PROCESSING_NODES_AND_EDGES,gd.PROCESSING_LAYER_NAMESPACES,gd.PROCESSING_LAYOUT_DATA,gd.SPLITTING_LARGE_LAYERS,gd.LAYING_OUT_ROOT_LAYER,gd.FINDING_IDENTICAL_LAYERS];var no=(()=>{class i{getItem(t){return window.localStorage.getItem(t)}setItem(t,n){window.localStorage.setItem(t,n)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Gc=(()=>{class i{curUiState=ct({paneStates:[this.createInitialPaneState()]});setDeepestExpandedGroupNodeIds(t,n){this.curUiState.update(r=>{let o=r.paneStates[n];return o?(o.deepestExpandedGroupNodeIds=t,Z({},r)):r})}setSelectedNodeId(t,n){this.curUiState.update(r=>{let o=r.paneStates[n];return o?(o.selectedNodeId=t,Z({},r)):r})}setSelectedGraphId(t,n,r){this.curUiState.update(o=>{let s=o.paneStates[r];return s?(s.selectedGraphId=t,s.selectedCollectionLabel=n,Z({},o)):o})}setFlattenLayers(t,n){this.curUiState.update(r=>{let o=r.paneStates[n];return o?(o.flattenLayers=t,Z({},r)):r})}addPane(){this.curUiState.update(t=>{t.paneStates.length>1&&(t.paneStates=[t.paneStates[0]]),t.paneStates.push(this.createInitialPaneState());for(let n of t.paneStates)n.widthFraction=.5;return Z({},t)})}removePane(t){this.curUiState.update(n=>(n.paneStates.splice(t,1),n.paneStates.length===1&&(n.paneStates[0].widthFraction=1),Z({},n)))}resizePane(t){this.curUiState.update(n=>(n.paneStates.length===2&&(n.paneStates[0].widthFraction=t,n.paneStates[1].widthFraction=1-t),Z({},n)))}swapPane(){this.curUiState.update(t=>(t.paneStates.length===2&&(t.paneStates=[t.paneStates[1],t.paneStates[0]]),Z({},t)))}selectPane(t){this.curUiState.update(n=>{for(let r=0;r{class i{worker;constructor(){this.worker=new Worker(new URL("worker-JQ3C3QUW.js",import.meta.url),{type:"classic"})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var at=(()=>{class i{localStorageService;uiStateService;workerService;curGraphCollections=ct([]);curToLocateNodeInfo=ct(void 0);curSelectedRenderer=ct(void 0);spaceKeyToZoomFitClicked=new pe;searchKeyClicked=new pe;addSnapshotClicked=new pe;curSnapshotToRestore=new pe;expandOrCollapseAllGraphLayersClicked=new pe;downloadAsPngClicked=new pe;config=ct(void 0);curInitialUiState=ct(void 0);panes=ct([{id:Ur(),widthFraction:1}]);selectedPaneId=ct(this.panes()[0].id);modelGraphProcessed$=new pe;remoteNodeDataPaths=ct([]);selectedNode=ct(void 0);hoveredNode=ct(void 0);doubleClickedNode=ct(void 0);testMode=!1;groupNodeChildrenCountThresholdFromUrl=null;paneIdToGraph={};paneIdToCurModelGraphs={};constructor(t,n,r){this.localStorageService=t,this.uiStateService=n,this.workerService=r,this.listenToWorker(),this.init()}addGraphCollections(t){this.curGraphCollections.update(n=>{let r=[...n],o={};for(let s of t){let a={},c={};for(let h of s.graphs){(h.id==null||h.id==="")&&(h.id="unnamed_graph");let p=h.id,f=o[p];f==null?(o[p]=0,f=0):(h.id=`${h.id} (${f+1})`,c[p]=h.id),o[p]=f+1,a[h.id]=h,h.collectionLabel=s.label}for(let h of s.graphs)for(let p of h.nodes)if(p.subgraphIds!=null&&p.subgraphIds.length>0){p.subgraphIds=p.subgraphIds.map(f=>c[f]||f),h.subGraphIds==null&&(h.subGraphIds=[]),h.subGraphIds.push(...p.subgraphIds);for(let f of p.subgraphIds)a[f].parentGraphId=h.id}let l=s.graphs.filter(h=>h.parentGraphId==null),d=[],u=(h,p=0)=>{let f=[];h==null?f=l:f=(h.subGraphIds||[]).map(m=>a[m]),f.sort((m,y)=>y.nodes.length-m.nodes.length);for(let m of f)m.level=p,d.push(m),u(m,p+1)};u(),s.graphs=d}return r.push(...t),r})}selectGraphInPane(t,n,r=!1,o,s=!0){if(n===1&&this.panes().length===1){this.openGraphInSplitPane(t);return}if((this.panes()[n].modelGraph?.id||"")===t.id)return;let c=this.panes()[n];c.searchResults=void 0,c.selectedNodeDataProviderRunId=void 0;let l=c.id;if(this.paneIdToGraph[l]=t,this.uiStateService.setSelectedGraphId(t.id,t.collectionLabel||"",this.getPaneIndexById(l)),c.subgraphBreadcrumbs!=null&&c.subgraphBreadcrumbs.length>0){let d=[...c.subgraphBreadcrumbs];d[d.length-1].graphId=t.id,c.subgraphBreadcrumbs=d}this.processGraph(l,r,o,s)}selectGraphInCurrentPane(t,n=!1,r,o=!0){this.selectGraphInPane(t,this.getPaneIndexById(this.selectedPaneId()),n,r,o)}openGraphInSplitPane(t,n=!1,r=!0){let o=Ur();this.paneIdToGraph[o]=t,this.panes.update(c=>{let l=c[0];return l.widthFraction=.5,c.push({id:o,widthFraction:.5,flattenLayers:n,showOnNodeItemTypes:{[o]:this.getSavedShowOnNodeItemTypes()},showOnEdgeItemTypes:{[o]:this.getSavedShowOnEdgeItemTypes()}}),[...c]}),this.curSelectedRenderer.set({id:o,ownerType:Vc.GRAPH_PANEL});let s=this.getPaneIndexById(o);this.uiStateService.addPane(),this.selectPane(o),this.uiStateService.setSelectedGraphId(t.id,t.collectionLabel||"",s),this.uiStateService.setFlattenLayers(n,s);let a={eventType:tr.PROCESS_GRAPH_REQ,graph:t,showOnNodeItemTypes:this.getShowOnNodeItemTypes(o,o),nodeDataProviderRuns:{},config:this.config?this.config():void 0,paneId:o,groupNodeChildrenCountThreshold:this.getGroupNodeChildrenCountThreshold(),flattenLayers:n,keepLayersWithASingleChild:this.config()?.keepLayersWithASingleChild,initialLayout:r};this.workerService.worker.postMessage(a)}processGraph(t,n=!1,r,o=!0){if(r!=null){let a=this.getPaneById(t);a&&(a.snapshotToRestore=r)}this.setPaneLoading(t);let s={eventType:tr.PROCESS_GRAPH_REQ,graph:this.paneIdToGraph[t],showOnNodeItemTypes:this.getShowOnNodeItemTypes(t,t),nodeDataProviderRuns:{},config:this.config?this.config():void 0,paneId:t,groupNodeChildrenCountThreshold:this.getGroupNodeChildrenCountThreshold(),flattenLayers:n,keepLayersWithASingleChild:this.config()?.keepLayersWithASingleChild,initialLayout:o};this.workerService.worker.postMessage(s)}setFlattenLayersInCurrentPane(t){let n=this.getSelectedPane();if(!n)return;this.panes.update(o=>(n.flattenLayers=t,n.searchResults=void 0,[...o]));let r=this.getPaneIndexById(n.id);this.uiStateService.setFlattenLayers(t,r),this.uiStateService.setDeepestExpandedGroupNodeIds([],r)}toggleFlattenLayers(t){let n=this.getPaneById(t);if(!n)return;let r=n.flattenLayers===!0;this.panes.update(s=>(n.flattenLayers=!r,n.searchResults=void 0,[...s]));let o=this.getPaneIndexById(t);this.uiStateService.setFlattenLayers(!r,o),this.uiStateService.setDeepestExpandedGroupNodeIds([],o)}getFlattenLayers(t){return this.getPaneById(t)?.flattenLayers===!0}selectPane(t){this.selectedPaneId.set(t),this.uiStateService.selectPane(this.getPaneIndexById(t))}selectPaneByIndex(t){let n=this.panes()[t];n&&this.selectPane(n.id)}selectNode(t,n){this.panes.update(o=>{let s=this.getPaneById(t);return s?(s.selectedNodeInfo=n,[...o]):o}),this.uiStateService.setSelectedNodeId(n?.nodeId||"",this.getPaneIndexById(t));let r=this.getPaneById(t)?.modelGraph;if(r){let o=n?.nodeId||"",s=r.nodesById[o];if(s&&St(s)&&window.parent){let a=s.outputsMetadata||{},c=[];for(let l of Object.keys(a)){let u=a[l].tensor_name;u&&c.push(u)}window.parent.postMessage({cmd:"model-explorer-node-selected",nodeId:o,outputTensorNames:c},"*")}}if(r){let o=n?.nodeId||"";this.updateSelectedNode(o,r.id,r.collectionLabel,r.nodesById[o])}}getModelGraphFromSelectedPane(){return this.getPaneById(this.selectedPaneId())?.modelGraph}getModelGraphFromPane(t){return this.getPaneById(t)?.modelGraph}getModelGraphFromPaneIndex(t){return this.panes()[t]?.modelGraph}getSelectedNodeInfoFromSelectedPane(){return this.getPaneById(this.selectedPaneId())?.selectedNodeInfo}getSelectedPane(){return this.getPaneById(this.selectedPaneId())}setPaneWidthFraction(t){this.panes.update(n=>n.length!==2?n:(n[0].widthFraction=t,n[1].widthFraction=1-t,[...n])),this.uiStateService.resizePane(t)}setSelectedNodeDataProviderRunId(t,n){this.panes.update(r=>{let o=this.getPaneById(t);return o?(o.selectedNodeDataProviderRunId=n,[...r]):r})}getSelectedNodeDataProviderRunId(t){return this.getPaneById(t)?.selectedNodeDataProviderRunId}setPaneHasArtificialLayers(t,n){this.panes.update(r=>{let o=this.getPaneById(t);return o?(o.hasArtificialLayers=n,[...r]):r})}setNodeToReveal(t,n){this.panes.update(r=>{let o=this.getPaneById(t);return o?(o.nodeIdToReveal=n,[...r]):r})}closePane(t){delete this.paneIdToGraph[t],delete this.paneIdToCurModelGraphs[t],this.panes.update(n=>{let r=n.findIndex(o=>o.id===t);return r>=0&&(n.splice(r,1),this.uiStateService.removePane(r)),n[0].widthFraction=1,[...n]}),this.selectPane(this.panes()[0].id)}swapPane(){this.panes.update(t=>t.length!==2?t:[t[1],t[0]]),this.uiStateService.swapPane()}getPaneById(t){return this.panes().find(n=>n.id===t)}getPaneIndexById(t){return this.panes().findIndex(n=>n.id===t)}addSnapshot(t,n,r){this.panes.update(o=>{let s=this.getPaneById(r);return s&&(s.snapshots==null&&(s.snapshots={}),s.snapshots[n]==null&&(s.snapshots[n]=[]),s.snapshots[n].push(t)),[...o]})}deleteSnapshot(t,n,r){this.panes.update(o=>{let s=this.getPaneById(r);return s&&s.snapshots&&s.snapshots[n]&&s.snapshots[n].splice(t,1),[...o]})}getGraphById(t){for(let n of this.curGraphCollections())for(let r of n.graphs)if(r.id===t)return r}addSubgraphBreadcrumbItem(t,n,r,o){this.panes.update(s=>{let a=this.getPaneById(t);if(!a)return s;let c=[...a.subgraphBreadcrumbs||[]];return c.length===0?c.push({graphId:n,snapshot:o}):c[c.length-1]={graphId:n,snapshot:o},c.push({graphId:r}),a.subgraphBreadcrumbs=c,[...s]})}setCurrentSubgraphBreadcrumb(t,n){this.panes.update(r=>{let o=this.getPaneById(t);if(!o)return r;let s=[...o.subgraphBreadcrumbs||[]];return s.splice(n+1),s.length===1&&(s=[]),o.subgraphBreadcrumbs=s,[...r]})}setSearchResults(t,n){this.panes.update(r=>{let o=this.getPaneById(t);return o?(o.searchResults=n,[...r]):r})}clearSearchResults(t){this.panes.update(n=>{let r=this.getPaneById(t);return r?(r.searchResults={results:{}},[...n]):n})}toggleShowOnNode(t,n,r,o){this.panes.update(s=>{let a=this.getPaneById(t);if(!a)return s;a.showOnNodeItemTypes||(a.showOnNodeItemTypes={}),a.showOnNodeItemTypes[n]==null&&(a.showOnNodeItemTypes[n]={}),a.showOnNodeItemTypes[n][r]==null&&(a.showOnNodeItemTypes[n][r]={selected:!1});let c=a.showOnNodeItemTypes[n][r].selected;return a.showOnNodeItemTypes[n]=Z({},a.showOnNodeItemTypes[n]),a.showOnNodeItemTypes[n][r].selected=o??!c,a.showOnNodeItemTypes=Z({},a.showOnNodeItemTypes),[...s]})}toggleShowOnEdge(t,n,r,o){this.panes.update(s=>{let a=this.getPaneById(t);if(!a)return s;a.showOnEdgeItemTypes||(a.showOnEdgeItemTypes={}),a.showOnEdgeItemTypes[n]==null&&(a.showOnEdgeItemTypes[n]={}),a.showOnEdgeItemTypes[n][r]==null&&(a.showOnEdgeItemTypes[n][r]={selected:!1});let c=a.showOnEdgeItemTypes[n][r].selected;return a.showOnEdgeItemTypes[n]=Z({},a.showOnEdgeItemTypes[n]),a.showOnEdgeItemTypes[n][r].selected=o??!c,a.showOnEdgeItemTypes=Z({},a.showOnEdgeItemTypes),[...s]})}setShowOnNodeFilter(t,n,r,o){this.panes.update(s=>{let a=this.getPaneById(t);return a?(a.showOnNodeItemTypes||(a.showOnNodeItemTypes={}),a.showOnNodeItemTypes[n]==null&&(a.showOnNodeItemTypes[n]={}),a.showOnNodeItemTypes[n][r]==null&&(a.showOnNodeItemTypes[n][r]={selected:!1}),a.showOnNodeItemTypes[n][r].filterRegex=o,a.showOnNodeItemTypes=Z({},a.showOnNodeItemTypes),[...s]):s})}setShowOnNode(t,n,r){this.panes.update(o=>{let s=this.getPaneById(t);return s?(s.showOnNodeItemTypes||(s.showOnNodeItemTypes={}),s.showOnNodeItemTypes=Z({},s.showOnNodeItemTypes),s.showOnNodeItemTypes[n]=r,[...o]):o})}setShowOnEdge(t,n,r){this.panes.update(o=>{let s=this.getPaneById(t);return s?(s.showOnEdgeItemTypes||(s.showOnEdgeItemTypes={}),s.showOnEdgeItemTypes=Z({},s.showOnEdgeItemTypes),s.showOnEdgeItemTypes[n]=r,[...o]):o})}deleteShowOnNodeItemType(t){this.panes.update(n=>{for(let r of n){r.showOnNodeItemTypes=Z({},r.showOnNodeItemTypes);for(let o of Object.keys(r.showOnNodeItemTypes))for(let s of t){let a=r.showOnNodeItemTypes[o][s];a&&(a.selected=!1)}}return[...n]})}getShowOnNodeItemTypes(t,n){let r=this.getPaneById(t);return r?JSON.parse(JSON.stringify((r.showOnNodeItemTypes||{})[n]||{})):{}}getSavedShowOnNodeItemTypes(){let t={};if(!this.testMode){let n=this.localStorageService.getItem(Zb);n&&(t=JSON.parse(n))}return t}getSavedShowOnEdgeItemTypes(){let t={};if(!this.testMode){let n=this.localStorageService.getItem(Qb);n&&(t=JSON.parse(n))}return t}getShowOnEdgeItemTypes(t,n){let r=this.getPaneById(t);return r?JSON.parse(JSON.stringify((r.showOnEdgeItemTypes||{})[n]||{})):{}}getGraphByPaneId(t){return this.paneIdToGraph[t]}updateCurrentModelGraph(t,n){this.paneIdToCurModelGraphs[t]=n}getCurrentModelGraphFromPane(t){return this.paneIdToCurModelGraphs[t]}updateSelectedNode(t,n,r,o){let s=this.selectedNode();(s?.nodeId!==t||s?.graphId!==n||s?.collectionLabel!==r)&&this.selectedNode.set({nodeId:t,graphId:n,collectionLabel:r,node:o})}updateHoveredNode(t,n,r,o){let s=this.hoveredNode();(s?.nodeId!==t||s?.graphId!==n||s?.collectionLabel!==r)&&this.hoveredNode.set({nodeId:t,graphId:n,collectionLabel:r,node:o})}updateDoubleClickedNode(t,n,r,o){let s=this.doubleClickedNode();(s?.nodeId!==t||s?.graphId!==n||s?.collectionLabel!==r)&&this.doubleClickedNode.set({nodeId:t,graphId:n,collectionLabel:r,node:o})}reset(){this.workerService.worker.postMessage({eventType:tr.CLEANUP}),this.curGraphCollections.set([]),this.curToLocateNodeInfo.set(void 0),this.curSelectedRenderer.set(void 0),this.config.set(void 0),this.curInitialUiState.set(void 0),this.panes.set([{id:Ur(),widthFraction:1}]),this.selectedPaneId.set(this.panes()[0].id),this.remoteNodeDataPaths.set([]),this.groupNodeChildrenCountThresholdFromUrl=null,this.paneIdToGraph={},this.paneIdToCurModelGraphs={},this.init()}listenToWorker(){this.workerService.worker.addEventListener("message",t=>{let n=t.data;switch(n.eventType){case tr.PROCESS_GRAPH_RESP:this.handleGraphProcessed(n.modelGraph,n.paneId);break;default:break}})}init(){this.curSelectedRenderer.set({id:this.panes()[0].id,ownerType:Vc.GRAPH_PANEL});let t=new URLSearchParams(document.location.search);this.testMode=t.get("test_mode")==="1",this.groupNodeChildrenCountThresholdFromUrl=t.get("groupNodeChildrenCountThreshold");let n=this.panes()[0];n.showOnNodeItemTypes={[n.id]:this.getSavedShowOnNodeItemTypes()},n.showOnEdgeItemTypes={[n.id]:this.getSavedShowOnEdgeItemTypes()}}handleGraphProcessed(t,n){this.panes.update(r=>{for(let o of r)if(o.id===n){o.modelGraph=t;break}return[...r]}),this.modelGraphProcessed$.next({paneIndex:this.getPaneIndexById(n),modelGraph:t})}setPaneLoading(t){this.panes.update(n=>{for(let r of n)if(r.id===t){r.modelGraph=void 0;break}return[...n]})}getGroupNodeChildrenCountThreshold(){let t=Rm;return this.config&&(t=this.config()?.artificialLayerNodeCountThreshold||Rm),this.groupNodeChildrenCountThresholdFromUrl!=null&&(t=Number(this.groupNodeChildrenCountThresholdFromUrl)),t}static \u0275fac=function(n){return new(n||i)(X(no),X(Gc),X(jc))};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var s3=(()=>{let e=class e{constructor(n,r){this._renderer=n,this._elementRef=r,this.onChange=o=>{},this.onTouched=()=>{}}setProperty(n,r){this._renderer.setProperty(this._elementRef.nativeElement,n,r)}registerOnTouched(n){this.onTouched=n}registerOnChange(n){this.onChange=n}setDisabledState(n){this.setProperty("disabled",n)}};e.\u0275fac=function(r){return new(r||e)(M(Kl),M(Re))},e.\u0275dir=Ve({type:e});let i=e;return i})(),a3=(()=>{let e=class e extends s3{};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Li(e)))(o||e)}})(),e.\u0275dir=Ve({type:e,features:[sn]});let i=e;return i})(),Ba=new me(""),MQ={provide:Ba,useExisting:kr(()=>Um),multi:!0},Um=(()=>{let e=class e extends a3{writeValue(n){this.setProperty("checked",n)}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Li(e)))(o||e)}})(),e.\u0275dir=Ve({type:e,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(r,o){r&1&&H("change",function(a){return o.onChange(a.target.checked)})("blur",function(){return o.onTouched()})},features:[Ft([MQ]),sn]});let i=e;return i})(),EQ={provide:Ba,useExisting:kr(()=>Xs),multi:!0};function IQ(){let i=Oa()?Oa().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var TQ=new me(""),Xs=(()=>{let e=class e extends s3{constructor(n,r,o){super(n,r),this._compositionMode=o,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!IQ())}writeValue(n){let r=n??"";this.setProperty("value",r)}_handleInput(n){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(n)}_compositionStart(){this._composing=!0}_compositionEnd(n){this._composing=!1,this._compositionMode&&this.onChange(n)}};e.\u0275fac=function(r){return new(r||e)(M(Kl),M(Re),M(TQ,8))},e.\u0275dir=Ve({type:e,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(r,o){r&1&&H("input",function(a){return o._handleInput(a.target.value)})("blur",function(){return o.onTouched()})("compositionstart",function(){return o._compositionStart()})("compositionend",function(a){return o._compositionEnd(a.target.value)})},features:[Ft([EQ]),sn]});let i=e;return i})();function Wc(i){return i==null||(typeof i=="string"||Array.isArray(i))&&i.length===0}function c3(i){return i!=null&&typeof i.length=="number"}var vd=new me(""),iT=new me(""),DQ=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,oy=class{static min(e){return PQ(e)}static max(e){return OQ(e)}static required(e){return RQ(e)}static requiredTrue(e){return AQ(e)}static email(e){return NQ(e)}static minLength(e){return kQ(e)}static maxLength(e){return LQ(e)}static pattern(e){return FQ(e)}static nullValidator(e){return l3(e)}static compose(e){return m3(e)}static composeAsync(e){return g3(e)}};function PQ(i){return e=>{if(Wc(e.value)||Wc(i))return null;let t=parseFloat(e.value);return!isNaN(t)&&t{if(Wc(e.value)||Wc(i))return null;let t=parseFloat(e.value);return!isNaN(t)&&t>i?{max:{max:i,actual:e.value}}:null}}function RQ(i){return Wc(i.value)?{required:!0}:null}function AQ(i){return i.value===!0?null:{required:!0}}function NQ(i){return Wc(i.value)||DQ.test(i.value)?null:{email:!0}}function kQ(i){return e=>Wc(e.value)||!c3(e.value)?null:e.value.lengthc3(e.value)&&e.value.length>i?{maxlength:{requiredLength:i,actualLength:e.value.length}}:null}function FQ(i){if(!i)return l3;let e,t;return typeof i=="string"?(t="",i.charAt(0)!=="^"&&(t+="^"),t+=i,i.charAt(i.length-1)!=="$"&&(t+="$"),e=new RegExp(t)):(t=i.toString(),e=i),n=>{if(Wc(n.value))return null;let r=n.value;return e.test(r)?null:{pattern:{requiredPattern:t,actualValue:r}}}}function l3(i){return null}function d3(i){return i!=null}function u3(i){return ed(i)?Jn(i):i}function h3(i){let e={};return i.forEach(t=>{e=t!=null?Z(Z({},e),t):e}),Object.keys(e).length===0?null:e}function p3(i,e){return e.map(t=>t(i))}function BQ(i){return!i.validate}function f3(i){return i.map(e=>BQ(e)?e:t=>e.validate(t))}function m3(i){if(!i)return null;let e=i.filter(d3);return e.length==0?null:function(t){return h3(p3(t,e))}}function rT(i){return i!=null?m3(f3(i)):null}function g3(i){if(!i)return null;let e=i.filter(d3);return e.length==0?null:function(t){let n=p3(t,e).map(u3);return Pf(n).pipe(Je(h3))}}function oT(i){return i!=null?g3(f3(i)):null}function t3(i,e){return i===null?[e]:Array.isArray(i)?[...i,e]:[i,e]}function _3(i){return i._rawValidators}function v3(i){return i._rawAsyncValidators}function JI(i){return i?Array.isArray(i)?i:[i]:[]}function sy(i,e){return Array.isArray(i)?i.includes(e):i===e}function n3(i,e){let t=JI(e);return JI(i).forEach(r=>{sy(t,r)||t.push(r)}),t}function i3(i,e){return JI(e).filter(t=>!sy(i,t))}var ay=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(e){this._rawValidators=e||[],this._composedValidatorFn=rT(this._rawValidators)}_setAsyncValidators(e){this._rawAsyncValidators=e||[],this._composedAsyncValidatorFn=oT(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(e){this._onDestroyCallbacks.push(e)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(e=>e()),this._onDestroyCallbacks=[]}reset(e=void 0){this.control&&this.control.reset(e)}hasError(e,t){return this.control?this.control.hasError(e,t):!1}getError(e,t){return this.control?this.control.getError(e,t):null}},Ih=class extends ay{get formDirective(){return null}get path(){return null}},_d=class extends ay{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},eT=class{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}},VQ={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},uTe=yt(Z({},VQ),{"[class.ng-submitted]":"isSubmitted"}),Ho=(()=>{let e=class e extends eT{constructor(n){super(n)}};e.\u0275fac=function(r){return new(r||e)(M(_d,2))},e.\u0275dir=Ve({type:e,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(r,o){r&2&&re("ng-untouched",o.isUntouched)("ng-touched",o.isTouched)("ng-pristine",o.isPristine)("ng-dirty",o.isDirty)("ng-valid",o.isValid)("ng-invalid",o.isInvalid)("ng-pending",o.isPending)},features:[sn]});let i=e;return i})();var Lm="VALID",ry="INVALID",Mh="PENDING",Fm="DISABLED",$c=class{},cy=class extends $c{constructor(e,t){super(),this.value=e,this.source=t}},Vm=class extends $c{constructor(e,t){super(),this.pristine=e,this.source=t}},zm=class extends $c{constructor(e,t){super(),this.touched=e,this.source=t}},Eh=class extends $c{constructor(e,t){super(),this.status=e,this.source=t}},tT=class extends $c{constructor(e){super(),this.source=e}},nT=class extends $c{constructor(e){super(),this.source=e}};function b3(i){return(my(i)?i.validators:i)||null}function zQ(i){return Array.isArray(i)?rT(i):i||null}function y3(i,e){return(my(e)?e.asyncValidators:i)||null}function UQ(i){return Array.isArray(i)?oT(i):i||null}function my(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function HQ(i,e,t){let n=i.controls;if(!(e?Object.keys(n):n).length)throw new Oe(1e3,"");if(!n[t])throw new Oe(1001,"")}function GQ(i,e,t){i._forEachChild((n,r)=>{if(t[r]===void 0)throw new Oe(1002,"")})}var ly=class{constructor(e,t){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=Bt(()=>this.statusReactive()),this.statusReactive=ct(void 0),this._pristine=Bt(()=>this.pristineReactive()),this.pristineReactive=ct(!0),this._touched=Bt(()=>this.touchedReactive()),this.touchedReactive=ct(!1),this._events=new pe,this.events=this._events.asObservable(),this._onDisabledChange=[],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 zr(this.statusReactive)}set status(e){zr(()=>this.statusReactive.set(e))}get valid(){return this.status===Lm}get invalid(){return this.status===ry}get pending(){return this.status==Mh}get disabled(){return this.status===Fm}get enabled(){return this.status!==Fm}get pristine(){return zr(this.pristineReactive)}set pristine(e){zr(()=>this.pristineReactive.set(e))}get dirty(){return!this.pristine}get touched(){return zr(this.touchedReactive)}set touched(e){zr(()=>this.touchedReactive.set(e))}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(e){this._assignValidators(e)}setAsyncValidators(e){this._assignAsyncValidators(e)}addValidators(e){this.setValidators(n3(e,this._rawValidators))}addAsyncValidators(e){this.setAsyncValidators(n3(e,this._rawAsyncValidators))}removeValidators(e){this.setValidators(i3(e,this._rawValidators))}removeAsyncValidators(e){this.setAsyncValidators(i3(e,this._rawAsyncValidators))}hasValidator(e){return sy(this._rawValidators,e)}hasAsyncValidator(e){return sy(this._rawAsyncValidators,e)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(e={}){let t=this.touched===!1;this.touched=!0;let n=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsTouched(yt(Z({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new zm(!0,n))}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 n=e.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:e.emitEvent,sourceControl:n})}),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,n),t&&e.emitEvent!==!1&&this._events.next(new zm(!1,n))}markAsDirty(e={}){let t=this.pristine===!0;this.pristine=!1;let n=e.sourceControl??this;this._parent&&!e.onlySelf&&this._parent.markAsDirty(yt(Z({},e),{sourceControl:n})),t&&e.emitEvent!==!1&&this._events.next(new Vm(!1,n))}markAsPristine(e={}){let t=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=e.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:e.emitEvent})}),this._parent&&!e.onlySelf&&this._parent._updatePristine(e,n),t&&e.emitEvent!==!1&&this._events.next(new Vm(!0,n))}markAsPending(e={}){this.status=Mh;let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new Eh(this.status,t)),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.markAsPending(yt(Z({},e),{sourceControl:t}))}disable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=Fm,this.errors=null,this._forEachChild(r=>{r.disable(yt(Z({},e),{onlySelf:!0}))}),this._updateValue();let n=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new cy(this.value,n)),this._events.next(new Eh(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(yt(Z({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(e={}){let t=this._parentMarkedDirty(e.onlySelf);this.status=Lm,this._forEachChild(n=>{n.enable(yt(Z({},e),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:e.emitEvent}),this._updateAncestors(yt(Z({},e),{skipPristineCheck:t}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(e,t){this._parent&&!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 n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===Lm||this.status===Mh)&&this._runAsyncValidator(n,e.emitEvent)}let t=e.sourceControl??this;e.emitEvent!==!1&&(this._events.next(new cy(this.value,t)),this._events.next(new Eh(this.status,t)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!e.onlySelf&&this._parent.updateValueAndValidity(yt(Z({},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()?Fm:Lm}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(e,t){if(this.asyncValidator){this.status=Mh,this._hasOwnPendingAsyncValidator={emitEvent:t!==!1};let n=u3(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:t,shouldHaveEmitted:e})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let e=this._hasOwnPendingAsyncValidator?.emitEvent??!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((n,r)=>n&&n._find(r),this)}getError(e,t){let n=t?this.get(t):this;return n&&n.errors?n.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,n){this.status=this._calculateStatus(),e&&this.statusChanges.emit(this.status),(e||n)&&this._events.next(new Eh(this.status,t)),this._parent&&this._parent._updateControlsErrors(e,t,n)}_initObservables(){this.valueChanges=new Ie,this.statusChanges=new Ie}_calculateStatus(){return this._allControlsDisabled()?Fm:this.errors?ry:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Mh)?Mh:this._anyControlsHaveStatus(ry)?ry:Lm}_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 n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,this._parent&&!e.onlySelf&&this._parent._updatePristine(e,t),r&&this._events.next(new Vm(this.pristine,t))}_updateTouched(e={},t){this.touched=this._anyControlsTouched(),this._events.next(new zm(this.touched,t)),this._parent&&!e.onlySelf&&this._parent._updateTouched(e,t)}_registerOnCollectionChange(e){this._onCollectionChange=e}_setUpdateStrategy(e){my(e)&&e.updateOn!=null&&(this._updateOn=e.updateOn)}_parentMarkedDirty(e){let t=this._parent&&this._parent.dirty;return!e&&!!t&&!this._parent._anyControlsDirty()}_find(e){return null}_assignValidators(e){this._rawValidators=Array.isArray(e)?e.slice():e,this._composedValidatorFn=zQ(this._rawValidators)}_assignAsyncValidators(e){this._rawAsyncValidators=Array.isArray(e)?e.slice():e,this._composedAsyncValidatorFn=UQ(this._rawAsyncValidators)}},dy=class extends ly{constructor(e,t,n){super(b3(t),y3(n,t)),this.controls=e,this._initObservables(),this._setUpdateStrategy(t),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(e,t){return this.controls[e]?this.controls[e]:(this.controls[e]=t,t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange),t)}addControl(e,t,n={}){this.registerControl(e,t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(e,t={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],this.updateValueAndValidity({emitEvent:t.emitEvent}),this._onCollectionChange()}setControl(e,t,n={}){this.controls[e]&&this.controls[e]._registerOnCollectionChange(()=>{}),delete this.controls[e],t&&this.registerControl(e,t),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(e){return this.controls.hasOwnProperty(e)&&this.controls[e].enabled}setValue(e,t={}){GQ(this,!0,e),Object.keys(e).forEach(n=>{HQ(this,!0,n),this.controls[n].setValue(e[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t)}patchValue(e,t={}){e!=null&&(Object.keys(e).forEach(n=>{let r=this.controls[n];r&&r.patchValue(e[n],{onlySelf:!0,emitEvent:t.emitEvent})}),this.updateValueAndValidity(t))}reset(e={},t={}){this._forEachChild((n,r)=>{n.reset(e?e[r]:null,{onlySelf:!0,emitEvent:t.emitEvent})}),this._updatePristine(t,this),this._updateTouched(t,this),this.updateValueAndValidity(t)}getRawValue(){return this._reduceChildren({},(e,t,n)=>(e[n]=t.getRawValue(),e))}_syncPendingControls(){let e=this._reduceChildren(!1,(t,n)=>n._syncPendingControls()?!0:t);return e&&this.updateValueAndValidity({onlySelf:!0}),e}_forEachChild(e){Object.keys(this.controls).forEach(t=>{let n=this.controls[t];n&&e(n,t)})}_setUpControls(){this._forEachChild(e=>{e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(e){for(let[t,n]of Object.entries(this.controls))if(this.contains(t)&&e(n))return!0;return!1}_reduceValue(){let e={};return this._reduceChildren(e,(t,n,r)=>((n.enabled||this.disabled)&&(t[r]=n.value),t))}_reduceChildren(e,t){let n=e;return this._forEachChild((r,o)=>{n=t(n,r,o)}),n}_allControlsDisabled(){for(let e of Object.keys(this.controls))if(this.controls[e].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(e){return this.controls.hasOwnProperty(e)?this.controls[e]:null}};var gy=new me("CallSetDisabledState",{providedIn:"root",factory:()=>sT}),sT="always";function uy(i,e,t=sT){aT(i,e),e.valueAccessor.writeValue(i.value),(i.disabled||t==="always")&&e.valueAccessor.setDisabledState?.(i.disabled),WQ(i,e),qQ(i,e),$Q(i,e),jQ(i,e)}function hy(i,e,t=!0){let n=()=>{};e.valueAccessor&&(e.valueAccessor.registerOnChange(n),e.valueAccessor.registerOnTouched(n)),fy(i,e),i&&(e._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function py(i,e){i.forEach(t=>{t.registerOnValidatorChange&&t.registerOnValidatorChange(e)})}function jQ(i,e){if(e.valueAccessor.setDisabledState){let t=n=>{e.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(t),e._registerOnDestroy(()=>{i._unregisterOnDisabledChange(t)})}}function aT(i,e){let t=_3(i);e.validator!==null?i.setValidators(t3(t,e.validator)):typeof t=="function"&&i.setValidators([t]);let n=v3(i);e.asyncValidator!==null?i.setAsyncValidators(t3(n,e.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();py(e._rawValidators,r),py(e._rawAsyncValidators,r)}function fy(i,e){let t=!1;if(i!==null){if(e.validator!==null){let r=_3(i);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==e.validator);o.length!==r.length&&(t=!0,i.setValidators(o))}}if(e.asyncValidator!==null){let r=v3(i);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==e.asyncValidator);o.length!==r.length&&(t=!0,i.setAsyncValidators(o))}}}let n=()=>{};return py(e._rawValidators,n),py(e._rawAsyncValidators,n),t}function WQ(i,e){e.valueAccessor.registerOnChange(t=>{i._pendingValue=t,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&x3(i,e)})}function $Q(i,e){e.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&x3(i,e),i.updateOn!=="submit"&&i.markAsTouched()})}function x3(i,e){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),e.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function qQ(i,e){let t=(n,r)=>{e.valueAccessor.writeValue(n),r&&e.viewToModelUpdate(n)};i.registerOnChange(t),e._registerOnDestroy(()=>{i._unregisterOnChange(t)})}function w3(i,e){i==null,aT(i,e)}function YQ(i,e){return fy(i,e)}function XQ(i,e){if(!i.hasOwnProperty("model"))return!1;let t=i.model;return t.isFirstChange()?!0:!Object.is(e,t.currentValue)}function ZQ(i){return Object.getPrototypeOf(i.constructor)===a3}function C3(i,e){i._syncPendingControls(),e.forEach(t=>{let n=t.control;n.updateOn==="submit"&&n._pendingChange&&(t.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function QQ(i,e){if(!e)return null;Array.isArray(e);let t,n,r;return e.forEach(o=>{o.constructor===Xs?t=o:ZQ(o)?n=o:r=o}),r||n||t||null}function KQ(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}var JQ={provide:Ih,useExisting:kr(()=>cT)},Bm=Promise.resolve(),cT=(()=>{let e=class e extends Ih{get submitted(){return zr(this.submittedReactive)}constructor(n,r,o){super(),this.callSetDisabledState=o,this._submitted=Bt(()=>this.submittedReactive()),this.submittedReactive=ct(!1),this._directives=new Set,this.ngSubmit=new Ie,this.form=new dy({},rT(n),oT(r))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(n){Bm.then(()=>{let r=this._findContainer(n.path);n.control=r.registerControl(n.name,n.control),uy(n.control,n,this.callSetDisabledState),n.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(n)})}getControl(n){return this.form.get(n.path)}removeControl(n){Bm.then(()=>{let r=this._findContainer(n.path);r&&r.removeControl(n.name),this._directives.delete(n)})}addFormGroup(n){Bm.then(()=>{let r=this._findContainer(n.path),o=new dy({});w3(o,n),r.registerControl(n.name,o),o.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(n){Bm.then(()=>{let r=this._findContainer(n.path);r&&r.removeControl(n.name)})}getFormGroup(n){return this.form.get(n.path)}updateModel(n,r){Bm.then(()=>{this.form.get(n.path).setValue(r)})}setValue(n){this.control.setValue(n)}onSubmit(n){return this.submittedReactive.set(!0),C3(this.form,this._directives),this.ngSubmit.emit(n),n?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(n=void 0){this.form.reset(n),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(n){return n.pop(),n.length?this.form.get(n):this.form}};e.\u0275fac=function(r){return new(r||e)(M(vd,10),M(iT,10),M(gy,8))},e.\u0275dir=Ve({type:e,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(r,o){r&1&&H("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Ft([JQ]),sn]});let i=e;return i})();function r3(i,e){let t=i.indexOf(e);t>-1&&i.splice(t,1)}function o3(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var vr=class extends ly{constructor(e=null,t,n){super(b3(t),y3(n,t)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(e),this._setUpdateStrategy(t),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),my(t)&&(t.nonNullable||t.initialValueIsDefault)&&(o3(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(n=>n(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),this._pendingChange=!1}_updateValue(){}_anyControls(e){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(e){this._onChange.push(e)}_unregisterOnChange(e){r3(this._onChange,e)}registerOnDisabledChange(e){this._onDisabledChange.push(e)}_unregisterOnDisabledChange(e){r3(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){o3(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 eK=i=>i instanceof vr;var S3=new me(""),tK={provide:_d,useExisting:kr(()=>vo)},vo=(()=>{let e=class e extends _d{set isDisabled(n){}constructor(n,r,o,s,a){super(),this._ngModelWarningConfig=s,this.callSetDisabledState=a,this.update=new Ie,this._ngModelWarningSent=!1,this._setValidators(n),this._setAsyncValidators(r),this.valueAccessor=QQ(this,o)}ngOnChanges(n){if(this._isControlChanged(n)){let r=n.form.previousValue;r&&hy(r,this,!1),uy(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}XQ(n,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&hy(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(n){this.viewModel=n,this.update.emit(n)}_isControlChanged(n){return n.hasOwnProperty("form")}};e._ngModelWarningSentOnce=!1,e.\u0275fac=function(r){return new(r||e)(M(vd,10),M(iT,10),M(Ba,10),M(S3,8),M(gy,8))},e.\u0275dir=Ve({type:e,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[Ft([tK]),sn,dn]});let i=e;return i})(),nK={provide:Ih,useExisting:kr(()=>lT)},lT=(()=>{let e=class e extends Ih{get submitted(){return zr(this._submittedReactive)}set submitted(n){this._submittedReactive.set(n)}constructor(n,r,o){super(),this.callSetDisabledState=o,this._submitted=Bt(()=>this._submittedReactive()),this._submittedReactive=ct(!1),this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new Ie,this._setValidators(n),this._setAsyncValidators(r)}ngOnChanges(n){this._checkFormPresent(),n.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(fy(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(n){let r=this.form.get(n.path);return uy(r,n,this.callSetDisabledState),r.updateValueAndValidity({emitEvent:!1}),this.directives.push(n),r}getControl(n){return this.form.get(n.path)}removeControl(n){hy(n.control||null,n,!1),KQ(this.directives,n)}addFormGroup(n){this._setUpFormContainer(n)}removeFormGroup(n){this._cleanUpFormContainer(n)}getFormGroup(n){return this.form.get(n.path)}addFormArray(n){this._setUpFormContainer(n)}removeFormArray(n){this._cleanUpFormContainer(n)}getFormArray(n){return this.form.get(n.path)}updateModel(n,r){this.form.get(n.path).setValue(r)}onSubmit(n){return this._submittedReactive.set(!0),C3(this.form,this.directives),this.ngSubmit.emit(n),this.form._events.next(new tT(this.control)),n?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(n=void 0){this.form.reset(n),this._submittedReactive.set(!1),this.form._events.next(new nT(this.form))}_updateDomValue(){this.directives.forEach(n=>{let r=n.control,o=this.form.get(n.path);r!==o&&(hy(r||null,n),eK(o)&&(uy(o,n,this.callSetDisabledState),n.control=o))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(n){let r=this.form.get(n.path);w3(r,n),r.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(n){if(this.form){let r=this.form.get(n.path);r&&YQ(r,n)&&r.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){aT(this.form,this),this._oldForm&&fy(this._oldForm,this)}_checkFormPresent(){this.form}};e.\u0275fac=function(r){return new(r||e)(M(vd,10),M(iT,10),M(gy,8))},e.\u0275dir=Ve({type:e,selectors:[["","formGroup",""]],hostBindings:function(r,o){r&1&&H("submit",function(a){return o.onSubmit(a)})("reset",function(){return o.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Ft([nK]),sn,dn]});let i=e;return i})();var iK=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({});let i=e;return i})();var br=(()=>{let e=class e{static withConfig(n){return{ngModule:e,providers:[{provide:S3,useValue:n.warnOnNgModelWithFormControl??"always"},{provide:gy,useValue:n.callSetDisabledState??sT}]}}};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({imports:[iK]});let i=e;return i})();var uT;try{uT=typeof Intl<"u"&&Intl.v8BreakIterator}catch{uT=!1}var gn=(()=>{let e=class e{constructor(n){this._platformId=n,this.isBrowser=this._platformId?gL(this._platformId):typeof document=="object"&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!!(window.chrome||uT)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}};e.\u0275fac=function(r){return new(r||e)(X(Da))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Hm;function rK(){if(Hm==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>Hm=!0}))}finally{Hm=Hm||!1}return Hm}function Hr(i){return rK()?i:!!i.capture}var ms=function(i){return i[i.NORMAL=0]="NORMAL",i[i.NEGATED=1]="NEGATED",i[i.INVERTED=2]="INVERTED",i}(ms||{}),_y,yd;function vy(){if(yd==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return yd=!1,yd;if("scrollBehavior"in document.documentElement.style)yd=!0;else{let i=Element.prototype.scrollTo;i?yd=!/\{\s*\[native code\]\s*\}/.test(i.toString()):yd=!1}}return yd}function Th(){if(typeof document!="object"||!document)return ms.NORMAL;if(_y==null){let i=document.createElement("div"),e=i.style;i.dir="rtl",e.width="1px",e.overflow="auto",e.visibility="hidden",e.pointerEvents="none",e.position="absolute";let t=document.createElement("div"),n=t.style;n.width="2px",n.height="1px",i.appendChild(t),document.body.appendChild(i),_y=ms.NORMAL,i.scrollLeft===0&&(i.scrollLeft=1,_y=i.scrollLeft===0?ms.NEGATED:ms.INVERTED),i.remove()}return _y}var dT;function oK(){if(dT==null){let i=typeof document<"u"?document.head:null;dT=!!(i&&(i.createShadowRoot||i.attachShadow))}return dT}function Dh(i){if(oK()){let e=i.getRootNode?i.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&e instanceof ShadowRoot)return e}return null}function Gm(){let i=typeof document<"u"&&document?document.activeElement:null;for(;i&&i.shadowRoot;){let e=i.shadowRoot.activeElement;if(e===i)break;i=e}return i}function Ii(i){return i.composedPath?i.composedPath()[0]:i.target}function jm(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}function bi(i,...e){return e.length?e.some(t=>i[t]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}function Ph(i){return i!=null&&`${i}`!="false"}function Qs(i,e=0){return sK(i)?Number(i):e}function sK(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}function xd(i){return Array.isArray(i)?i:[i]}function yi(i){return i==null?"":typeof i=="string"?i:`${i}px`}function nr(i){return i instanceof Re?i.nativeElement:i}var aK=(()=>{let e=class e{create(n){return typeof MutationObserver>"u"?null:new MutationObserver(n)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var by=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({providers:[aK]});let i=e;return i})();var M3=new Set,wd,cK=(()=>{let e=class e{constructor(n,r){this._platform=n,this._nonce=r,this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):dK}matchMedia(n){return(this._platform.WEBKIT||this._platform.BLINK)&&lK(n,this._nonce),this._matchMedia(n)}};e.\u0275fac=function(r){return new(r||e)(X(gn),X(Yf,8))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function lK(i,e){if(!M3.has(i))try{wd||(wd=document.createElement("style"),e&&wd.setAttribute("nonce",e),wd.setAttribute("type","text/css"),document.head.appendChild(wd)),wd.sheet&&(wd.sheet.insertRule(`@media ${i} {body{ }}`,0),M3.add(i))}catch(t){console.error(t)}}function dK(i){return{matches:i==="all"||i==="",media:i,addListener:()=>{},removeListener:()=>{}}}var Oh=(()=>{let e=class e{constructor(n,r){this._mediaMatcher=n,this._zone=r,this._queries=new Map,this._destroySubject=new pe}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(n){return E3(xd(n)).some(o=>this._registerQuery(o).mql.matches)}observe(n){let o=E3(xd(n)).map(a=>this._registerQuery(a).observable),s=eo(o);return s=Ps(s.pipe(_n(1)),s.pipe(Nf(1),Oo(0))),s.pipe(Je(a=>{let c={matches:!1,breakpoints:{}};return a.forEach(({matches:l,query:d})=>{c.matches=c.matches||l,c.breakpoints[d]=l}),c}))}_registerQuery(n){if(this._queries.has(n))return this._queries.get(n);let r=this._mediaMatcher.matchMedia(n),s={observable:new Et(a=>{let c=l=>this._zone.run(()=>a.next(l));return r.addListener(c),()=>{r.removeListener(c)}}).pipe(gi(r),Je(({matches:a})=>({query:n,matches:a})),Ze(this._destroySubject)),mql:r};return this._queries.set(n,s),s}};e.\u0275fac=function(r){return new(r||e)(X(cK),X(Fe))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function E3(i){return i.map(e=>e.split(",")).reduce((e,t)=>e.concat(t)).map(e=>e.trim())}var yy={XSmall:"(max-width: 599.98px)",Small:"(min-width: 600px) and (max-width: 959.98px)",Medium:"(min-width: 960px) and (max-width: 1279.98px)",Large:"(min-width: 1280px) and (max-width: 1919.98px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.98px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.98px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"};var O3=" ";function Lh(i,e,t){let n=Sy(i,e);t=t.trim(),!n.some(r=>r.trim()===t)&&(n.push(t),i.setAttribute(e,n.join(O3)))}function Yc(i,e,t){let n=Sy(i,e);t=t.trim();let r=n.filter(o=>o!==t);r.length?i.setAttribute(e,r.join(O3)):i.removeAttribute(e)}function Sy(i,e){return i.getAttribute(e)?.match(/\S+/g)??[]}var R3="cdk-describedby-message",xy="cdk-describedby-host",fT=0,A3=(()=>{let e=class e{constructor(n,r){this._platform=r,this._messageRegistry=new Map,this._messagesContainer=null,this._id=`${fT++}`,this._document=n,this._id=te(qf)+"-"+fT++}describe(n,r,o){if(!this._canBeDescribed(n,r))return;let s=hT(r,o);typeof r!="string"?(I3(r,this._id),this._messageRegistry.set(s,{messageElement:r,referenceCount:0})):this._messageRegistry.has(s)||this._createMessageElement(r,o),this._isElementDescribedByMessage(n,s)||this._addMessageReference(n,s)}removeDescription(n,r,o){if(!r||!this._isElementNode(n))return;let s=hT(r,o);if(this._isElementDescribedByMessage(n,s)&&this._removeMessageReference(n,s),typeof r=="string"){let a=this._messageRegistry.get(s);a&&a.referenceCount===0&&this._deleteMessageElement(s)}this._messagesContainer?.childNodes.length===0&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let n=this._document.querySelectorAll(`[${xy}="${this._id}"]`);for(let r=0;ro.indexOf(R3)!=0);n.setAttribute("aria-describedby",r.join(" "))}_addMessageReference(n,r){let o=this._messageRegistry.get(r);Lh(n,"aria-describedby",o.messageElement.id),n.setAttribute(xy,this._id),o.referenceCount++}_removeMessageReference(n,r){let o=this._messageRegistry.get(r);o.referenceCount--,Yc(n,"aria-describedby",o.messageElement.id),n.removeAttribute(xy)}_isElementDescribedByMessage(n,r){let o=Sy(n,"aria-describedby"),s=this._messageRegistry.get(r),a=s&&s.messageElement.id;return!!a&&o.indexOf(a)!=-1}_canBeDescribed(n,r){if(!this._isElementNode(n))return!1;if(r&&typeof r=="object")return!0;let o=r==null?"":`${r}`.trim(),s=n.getAttribute("aria-label");return o?!s||s.trim()!==o:!1}_isElementNode(n){return n.nodeType===this._document.ELEMENT_NODE}};e.\u0275fac=function(r){return new(r||e)(X(Xe),X(gn))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function hT(i,e){return typeof i=="string"?`${e||""}/${i}`:i}function I3(i,e){i.id||(i.id=`${R3}-${e}-${fT++}`)}var My=class{constructor(e,t){this._items=e,this._activeItemIndex=-1,this._activeItem=null,this._wrap=!1,this._letterKeyStream=new pe,this._typeaheadSubscription=Ct.EMPTY,this._vertical=!0,this._allowedModifierKeys=[],this._homeAndEnd=!1,this._pageUpAndDown={enabled:!1,delta:10},this._skipPredicateFn=n=>n.disabled,this._pressedLetters=[],this.tabOut=new pe,this.change=new pe,e instanceof Zi?this._itemChangesSubscription=e.changes.subscribe(n=>this._itemsChanged(n.toArray())):$E(e)&&(this._effectRef=lt(()=>this._itemsChanged(e()),{injector:t}))}skipPredicate(e){return this._skipPredicateFn=e,this}withWrap(e=!0){return this._wrap=e,this}withVerticalOrientation(e=!0){return this._vertical=e,this}withHorizontalOrientation(e){return this._horizontal=e,this}withAllowedModifierKeys(e){return this._allowedModifierKeys=e,this}withTypeAhead(e=200){return this._typeaheadSubscription.unsubscribe(),this._typeaheadSubscription=this._letterKeyStream.pipe(En(t=>this._pressedLetters.push(t)),Oo(e),qt(()=>this._pressedLetters.length>0),Je(()=>this._pressedLetters.join(""))).subscribe(t=>{let n=this._getItemsArray();for(let r=1;r!e[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(t){case 9:this.tabOut.next();return;case 40:if(this._vertical&&r){this.setNextItemActive();break}else return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&r){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&r){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&r){let o=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(o>0?o:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&r){let o=this._activeItemIndex+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(o=65&&t<=90||t>=48&&t<=57)&&this._letterKeyStream.next(String.fromCharCode(t)));return}this._pressedLetters=[],e.preventDefault()}get activeItemIndex(){return this._activeItemIndex}get activeItem(){return this._activeItem}isTyping(){return this._pressedLetters.length>0}setFirstItemActive(){this._setActiveItemByIndex(0,1)}setLastItemActive(){this._setActiveItemByIndex(this._getItemsArray().length-1,-1)}setNextItemActive(){this._activeItemIndex<0?this.setFirstItemActive():this._setActiveItemByDelta(1)}setPreviousItemActive(){this._activeItemIndex<0&&this._wrap?this.setLastItemActive():this._setActiveItemByDelta(-1)}updateActiveItem(e){let t=this._getItemsArray(),n=typeof e=="number"?e:t.indexOf(e),r=t[n];this._activeItem=r??null,this._activeItemIndex=n}destroy(){this._typeaheadSubscription.unsubscribe(),this._itemChangesSubscription?.unsubscribe(),this._effectRef?.destroy(),this._letterKeyStream.complete(),this.tabOut.complete(),this.change.complete(),this._pressedLetters=[]}_setActiveItemByDelta(e){this._wrap?this._setActiveInWrapMode(e):this._setActiveInDefaultMode(e)}_setActiveInWrapMode(e){let t=this._getItemsArray();for(let n=1;n<=t.length;n++){let r=(this._activeItemIndex+e*n+t.length)%t.length,o=t[r];if(!this._skipPredicateFn(o)){this.setActiveItem(r);return}}}_setActiveInDefaultMode(e){this._setActiveItemByIndex(this._activeItemIndex+e,e)}_setActiveItemByIndex(e,t){let n=this._getItemsArray();if(n[e]){for(;this._skipPredicateFn(n[e]);)if(e+=t,!n[e])return;this.setActiveItem(e)}}_getItemsArray(){return $E(this._items)?this._items():this._items instanceof Zi?this._items.toArray():this._items}_itemsChanged(e){if(this._activeItem){let t=e.indexOf(this._activeItem);t>-1&&t!==this._activeItemIndex&&(this._activeItemIndex=t)}}},Ah=class extends My{setActiveItem(e){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(e),this.activeItem&&this.activeItem.setActiveStyles()}},Ey=class extends My{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(e){return this._origin=e,this}setActiveItem(e){super.setActiveItem(e),this.activeItem&&this.activeItem.focus(this._origin)}};var Fh=(()=>{let e=class e{constructor(n){this._platform=n}isDisabled(n){return n.hasAttribute("disabled")}isVisible(n){return MK(n)&&getComputedStyle(n).visibility==="visible"}isTabbable(n){if(!this._platform.isBrowser)return!1;let r=SK(AK(n));if(r&&(T3(r)===-1||!this.isVisible(r)))return!1;let o=n.nodeName.toLowerCase(),s=T3(n);return n.hasAttribute("contenteditable")?s!==-1:o==="iframe"||o==="object"||this._platform.WEBKIT&&this._platform.IOS&&!OK(n)?!1:o==="audio"?n.hasAttribute("controls")?s!==-1:!1:o==="video"?s===-1?!1:s!==null?!0:this._platform.FIREFOX||n.hasAttribute("controls"):n.tabIndex>=0}isFocusable(n,r){return RK(n)&&!this.isDisabled(n)&&(r?.ignoreVisibility||this.isVisible(n))}};e.\u0275fac=function(r){return new(r||e)(X(gn))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function SK(i){try{return i.frameElement}catch{return null}}function MK(i){return!!(i.offsetWidth||i.offsetHeight||typeof i.getClientRects=="function"&&i.getClientRects().length)}function EK(i){let e=i.nodeName.toLowerCase();return e==="input"||e==="select"||e==="button"||e==="textarea"}function IK(i){return DK(i)&&i.type=="hidden"}function TK(i){return PK(i)&&i.hasAttribute("href")}function DK(i){return i.nodeName.toLowerCase()=="input"}function PK(i){return i.nodeName.toLowerCase()=="a"}function N3(i){if(!i.hasAttribute("tabindex")||i.tabIndex===void 0)return!1;let e=i.getAttribute("tabindex");return!!(e&&!isNaN(parseInt(e,10)))}function T3(i){if(!N3(i))return null;let e=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(e)?-1:e}function OK(i){let e=i.nodeName.toLowerCase(),t=e==="input"&&i.type;return t==="text"||t==="password"||e==="select"||e==="textarea"}function RK(i){return IK(i)?!1:EK(i)||TK(i)||i.hasAttribute("contenteditable")||N3(i)}function AK(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}var Iy=class{get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}constructor(e,t,n,r,o=!1,s){this._element=e,this._checker=t,this._ngZone=n,this._document=r,this._injector=s,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,o||this.attachAnchors()}destroy(){let e=this._startAnchor,t=this._endAnchor;e&&(e.removeEventListener("focus",this.startAnchorListener),e.remove()),t&&(t.removeEventListener("focus",this.endAnchorListener),t.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusInitialElement(e)))})}focusFirstTabbableElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusFirstTabbableElement(e)))})}focusLastTabbableElementWhenReady(e){return new Promise(t=>{this._executeOnStable(()=>t(this.focusLastTabbableElement(e)))})}_getRegionBoundary(e){let t=this._element.querySelectorAll(`[cdk-focus-region-${e}], [cdkFocusRegion${e}], [cdk-focus-${e}]`);return e=="start"?t.length?t[0]:this._getFirstTabbableElement(this._element):t.length?t[t.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(e){let t=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(t){if(!this._checker.isFocusable(t)){let n=this._getFirstTabbableElement(t);return n?.focus(e),!!n}return t.focus(e),!0}return this.focusFirstTabbableElement(e)}focusFirstTabbableElement(e){let t=this._getRegionBoundary("start");return t&&t.focus(e),!!t}focusLastTabbableElement(e){let t=this._getRegionBoundary("end");return t&&t.focus(e),!!t}hasAttached(){return this._hasAttached}_getFirstTabbableElement(e){if(this._checker.isFocusable(e)&&this._checker.isTabbable(e))return e;let t=e.children;for(let n=0;n=0;n--){let r=t[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(t[n]):null;if(r)return r}return null}_createAnchor(){let e=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,e),e.classList.add("cdk-visually-hidden"),e.classList.add("cdk-focus-trap-anchor"),e.setAttribute("aria-hidden","true"),e}_toggleAnchorTabIndex(e,t){e?t.setAttribute("tabindex","0"):t.removeAttribute("tabindex")}toggleAnchors(e){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(e,this._startAnchor),this._toggleAnchorTabIndex(e,this._endAnchor))}_executeOnStable(e){this._injector?Hi(e,{injector:this._injector}):setTimeout(e)}},Ty=(()=>{let e=class e{constructor(n,r,o){this._checker=n,this._ngZone=r,this._injector=te(vt),this._document=o}create(n,r=!1){return new Iy(n,this._checker,this._ngZone,this._document,r,this._injector)}};e.\u0275fac=function(r){return new(r||e)(X(Fh),X(Fe),X(Xe))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var mT=class extends Iy{get enabled(){return this._enabled}set enabled(e){this._enabled=e,this._enabled?this._focusTrapManager.register(this):this._focusTrapManager.deregister(this)}constructor(e,t,n,r,o,s,a,c){super(e,t,n,r,a.defer,c),this._focusTrapManager=o,this._inertStrategy=s,this._focusTrapManager.register(this)}destroy(){this._focusTrapManager.deregister(this),super.destroy()}_enable(){this._inertStrategy.preventFocus(this),this.toggleAnchors(!0)}_disable(){this._inertStrategy.allowFocus(this),this.toggleAnchors(!1)}},gT=class{constructor(){this._listener=null}preventFocus(e){this._listener&&e._document.removeEventListener("focus",this._listener,!0),this._listener=t=>this._trapFocus(e,t),e._ngZone.runOutsideAngular(()=>{e._document.addEventListener("focus",this._listener,!0)})}allowFocus(e){this._listener&&(e._document.removeEventListener("focus",this._listener,!0),this._listener=null)}_trapFocus(e,t){let n=t.target,r=e._element;n&&!r.contains(n)&&!n.closest?.("div.cdk-overlay-pane")&&setTimeout(()=>{e.enabled&&!r.contains(e._document.activeElement)&&e.focusFirstTabbableElement()})}},NK=new me("FOCUS_TRAP_INERT_STRATEGY"),kK=(()=>{let e=class e{constructor(){this._focusTrapStack=[]}register(n){this._focusTrapStack=this._focusTrapStack.filter(o=>o!==n);let r=this._focusTrapStack;r.length&&r[r.length-1]._disable(),r.push(n),n._enable()}deregister(n){n._disable();let r=this._focusTrapStack,o=r.indexOf(n);o!==-1&&(r.splice(o,1),r.length&&r[r.length-1]._enable())}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),Bh=(()=>{let e=class e{constructor(n,r,o,s,a){this._checker=n,this._ngZone=r,this._focusTrapManager=o,this._injector=te(vt),this._document=s,this._inertStrategy=a||new gT}create(n,r={defer:!1}){let o;return typeof r=="boolean"?o={defer:r}:o=r,new mT(n,this._checker,this._ngZone,this._document,this._focusTrapManager,this._inertStrategy,o,this._injector)}};e.\u0275fac=function(r){return new(r||e)(X(Fh),X(Fe),X(kK),X(Xe),X(NK,8))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function Sd(i){return i.buttons===0||i.detail===0}function Md(i){let e=i.touches&&i.touches[0]||i.changedTouches&&i.changedTouches[0];return!!e&&e.identifier===-1&&(e.radiusX==null||e.radiusX===1)&&(e.radiusY==null||e.radiusY===1)}var LK=new me("cdk-input-modality-detector-options"),FK={ignoreKeys:[18,17,224,91,16]},k3=650,Rh=Hr({passive:!0,capture:!0}),BK=(()=>{let e=class e{get mostRecentModality(){return this._modality.value}constructor(n,r,o,s){this._platform=n,this._mostRecentTarget=null,this._modality=new On(null),this._lastTouchMs=0,this._onKeydown=a=>{this._options?.ignoreKeys?.some(c=>c===a.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Ii(a))},this._onMousedown=a=>{Date.now()-this._lastTouchMs{if(Md(a)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Ii(a)},this._options=Z(Z({},FK),s),this.modalityDetected=this._modality.pipe(Nf(1)),this.modalityChanged=this.modalityDetected.pipe(xc()),n.isBrowser&&r.runOutsideAngular(()=>{o.addEventListener("keydown",this._onKeydown,Rh),o.addEventListener("mousedown",this._onMousedown,Rh),o.addEventListener("touchstart",this._onTouchstart,Rh)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,Rh),document.removeEventListener("mousedown",this._onMousedown,Rh),document.removeEventListener("touchstart",this._onTouchstart,Rh))}};e.\u0275fac=function(r){return new(r||e)(X(gn),X(Fe),X(Xe),X(LK,8))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),VK=new me("liveAnnouncerElement",{providedIn:"root",factory:zK});function zK(){return null}var UK=new me("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),HK=0,Dy=(()=>{let e=class e{constructor(n,r,o,s){this._ngZone=r,this._defaultOptions=s,this._document=o,this._liveElement=n||this._createLiveElement()}announce(n,...r){let o=this._defaultOptions,s,a;return r.length===1&&typeof r[0]=="number"?a=r[0]:[s,a]=r,this.clear(),clearTimeout(this._previousTimeout),s||(s=o&&o.politeness?o.politeness:"polite"),a==null&&o&&(a=o.duration),this._liveElement.setAttribute("aria-live",s),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(c=>this._currentResolve=c)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=n,typeof a=="number"&&(this._previousTimeout=setTimeout(()=>this.clear(),a)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){let n="cdk-live-announcer-element",r=this._document.getElementsByClassName(n),o=this._document.createElement("div");for(let s=0;s .cdk-overlay-container [aria-modal="true"]');for(let o=0;o{let e=class e{constructor(n,r,o,s,a){this._ngZone=n,this._platform=r,this._inputModalityDetector=o,this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._stopInputModalityDetector=new pe,this._rootNodeFocusAndBlurListener=c=>{let l=Ii(c);for(let d=l;d;d=d.parentElement)c.type==="focus"?this._onFocus(c,d):this._onBlur(c,d)},this._document=s,this._detectionMode=a?.detectionMode||Cy.IMMEDIATE}monitor(n,r=!1){let o=nr(n);if(!this._platform.isBrowser||o.nodeType!==1)return Ke();let s=Dh(o)||this._getDocument(),a=this._elementInfo.get(o);if(a)return r&&(a.checkChildren=!0),a.subject;let c={checkChildren:r,subject:new pe,rootNode:s};return this._elementInfo.set(o,c),this._registerGlobalListeners(c),c.subject}stopMonitoring(n){let r=nr(n),o=this._elementInfo.get(r);o&&(o.subject.complete(),this._setClasses(r),this._elementInfo.delete(r),this._removeGlobalListeners(o))}focusVia(n,r,o){let s=nr(n),a=this._getDocument().activeElement;s===a?this._getClosestElementsInfo(s).forEach(([c,l])=>this._originChanged(c,r,l)):(this._setOrigin(r),typeof s.focus=="function"&&s.focus(o))}ngOnDestroy(){this._elementInfo.forEach((n,r)=>this.stopMonitoring(r))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(n){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(n)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:n&&this._isLastInteractionFromInputLabel(n)?"mouse":"program"}_shouldBeAttributedToTouch(n){return this._detectionMode===Cy.EVENTUAL||!!n?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(n,r){n.classList.toggle("cdk-focused",!!r),n.classList.toggle("cdk-touch-focused",r==="touch"),n.classList.toggle("cdk-keyboard-focused",r==="keyboard"),n.classList.toggle("cdk-mouse-focused",r==="mouse"),n.classList.toggle("cdk-program-focused",r==="program")}_setOrigin(n,r=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=n,this._originFromTouchInteraction=n==="touch"&&r,this._detectionMode===Cy.IMMEDIATE){clearTimeout(this._originTimeoutId);let o=this._originFromTouchInteraction?k3:1;this._originTimeoutId=setTimeout(()=>this._origin=null,o)}})}_onFocus(n,r){let o=this._elementInfo.get(r),s=Ii(n);!o||!o.checkChildren&&r!==s||this._originChanged(r,this._getFocusOrigin(s),o)}_onBlur(n,r){let o=this._elementInfo.get(r);!o||o.checkChildren&&n.relatedTarget instanceof Node&&r.contains(n.relatedTarget)||(this._setClasses(r),this._emitOrigin(o,null))}_emitOrigin(n,r){n.subject.observers.length&&this._ngZone.run(()=>n.subject.next(r))}_registerGlobalListeners(n){if(!this._platform.isBrowser)return;let r=n.rootNode,o=this._rootNodeFocusListenerCount.get(r)||0;o||this._ngZone.runOutsideAngular(()=>{r.addEventListener("focus",this._rootNodeFocusAndBlurListener,wy),r.addEventListener("blur",this._rootNodeFocusAndBlurListener,wy)}),this._rootNodeFocusListenerCount.set(r,o+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Ze(this._stopInputModalityDetector)).subscribe(s=>{this._setOrigin(s,!0)}))}_removeGlobalListeners(n){let r=n.rootNode;if(this._rootNodeFocusListenerCount.has(r)){let o=this._rootNodeFocusListenerCount.get(r);o>1?this._rootNodeFocusListenerCount.set(r,o-1):(r.removeEventListener("focus",this._rootNodeFocusAndBlurListener,wy),r.removeEventListener("blur",this._rootNodeFocusAndBlurListener,wy),this._rootNodeFocusListenerCount.delete(r))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(n,r,o){this._setClasses(n,r),this._emitOrigin(o,r),this._lastFocusOrigin=r}_getClosestElementsInfo(n){let r=[];return this._elementInfo.forEach((o,s)=>{(s===n||o.checkChildren&&s.contains(n))&&r.push([s,o])}),r}_isLastInteractionFromInputLabel(n){let{_mostRecentTarget:r,mostRecentModality:o}=this._inputModalityDetector;if(o!=="mouse"||!r||r===n||n.nodeName!=="INPUT"&&n.nodeName!=="TEXTAREA"||n.disabled)return!1;let s=n.labels;if(s){for(let a=0;a{let e=class e{constructor(n,r){this._platform=n,this._document=r,this._breakpointSubscription=te(Oh).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return Cd.NONE;let n=this._document.createElement("div");n.style.backgroundColor="rgb(1,2,3)",n.style.position="absolute",this._document.body.appendChild(n);let r=this._document.defaultView||window,o=r&&r.getComputedStyle?r.getComputedStyle(n):null,s=(o&&o.backgroundColor||"").replace(/ /g,"");switch(n.remove(),s){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return Cd.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return Cd.BLACK_ON_WHITE}return Cd.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let n=this._document.body.classList;n.remove(pT,D3,P3),this._hasCheckedHighContrastMode=!0;let r=this.getHighContrastMode();r===Cd.BLACK_ON_WHITE?n.add(pT,D3):r===Cd.WHITE_ON_BLACK&&n.add(pT,P3)}}};e.\u0275fac=function(r){return new(r||e)(X(gn),X(Xe))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),Py=(()=>{let e=class e{constructor(n){n._applyBodyHighContrastModeCssClasses()}};e.\u0275fac=function(r){return new(r||e)(X(bT))},e.\u0275mod=rt({type:e}),e.\u0275inj=it({imports:[by]});let i=e;return i})();var jK=new me("cdk-dir-doc",{providedIn:"root",factory:WK});function WK(){return te(Xe)}var $K=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function qK(i){let e=i?.toLowerCase()||"";return e==="auto"&&typeof navigator<"u"&&navigator?.language?$K.test(navigator.language)?"rtl":"ltr":e==="rtl"?"rtl":"ltr"}var di=(()=>{let e=class e{constructor(n){if(this.value="ltr",this.change=new Ie,n){let r=n.body?n.body.dir:null,o=n.documentElement?n.documentElement.dir:null;this.value=qK(r||o||"ltr")}}ngOnDestroy(){this.change.complete()}};e.\u0275fac=function(r){return new(r||e)(X(jK,8))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Xc=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({});let i=e;return i})();var YK=["*",[["mat-option"],["ng-container"]]],XK=["*","mat-option, ng-container"],ZK=["text"],QK=[[["mat-icon"]],"*"],KK=["mat-icon","*"];function JK(i,e){if(i&1&&ee(0,"mat-pseudo-checkbox",1),i&2){let t=I();R("disabled",t.disabled)("state",t.selected?"checked":"unchecked")}}function eJ(i,e){if(i&1&&ee(0,"mat-pseudo-checkbox",3),i&2){let t=I();R("disabled",t.disabled)}}function tJ(i,e){if(i&1&&(v(0,"span",4),S(1),b()),i&2){let t=I();w(),Se("(",t.group.label,")")}}var nJ=["mat-internal-form-field",""],iJ=["*"];var MT=(()=>{let e=class e{};e.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)",e.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)",e.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)",e.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)";let i=e;return i})();function rJ(){return!0}var oJ=new me("mat-sanity-checks",{providedIn:"root",factory:rJ}),Ut=(()=>{let e=class e{constructor(n,r,o){this._sanityChecks=r,this._document=o,this._hasDoneGlobalChecks=!1,n._applyBodyHighContrastModeCssClasses(),this._hasDoneGlobalChecks||(this._hasDoneGlobalChecks=!0)}_checkIsEnabled(n){return jm()?!1:typeof this._sanityChecks=="boolean"?this._sanityChecks:!!this._sanityChecks[n]}};e.\u0275fac=function(r){return new(r||e)(X(bT),X(oJ,8),X(Xe))},e.\u0275mod=rt({type:e}),e.\u0275inj=it({imports:[Xc,Xc]});let i=e;return i})();var Ry=class{constructor(e,t,n,r,o){this._defaultMatcher=e,this.ngControl=t,this._parentFormGroup=n,this._parentForm=r,this._stateChanges=o,this.errorState=!1}updateErrorState(){let e=this.errorState,t=this._parentFormGroup||this._parentForm,n=this.matcher||this._defaultMatcher,r=this.ngControl?this.ngControl.control:null,o=n?.isErrorState(r,t)??!1;o!==e&&(this.errorState=o,this._stateChanges.next())}};var j3=(()=>{let e=class e{isErrorState(n,r){return!!(n&&n.invalid&&(n.touched||r&&r.submitted))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var jo=function(i){return i[i.FADING_IN=0]="FADING_IN",i[i.VISIBLE=1]="VISIBLE",i[i.FADING_OUT=2]="FADING_OUT",i[i.HIDDEN=3]="HIDDEN",i}(jo||{}),wT=class{constructor(e,t,n,r=!1){this._renderer=e,this.element=t,this.config=n,this._animationForciblyDisabledThroughCss=r,this.state=jo.HIDDEN}fadeOut(){this._renderer.fadeOutRipple(this)}},L3=Hr({passive:!0,capture:!0}),CT=class{constructor(){this._events=new Map,this._delegateEventHandler=e=>{let t=Ii(e);t&&this._events.get(e.type)?.forEach((n,r)=>{(r===t||r.contains(t))&&n.forEach(o=>o.handleEvent(e))})}}addHandler(e,t,n,r){let o=this._events.get(t);if(o){let s=o.get(n);s?s.add(r):o.set(n,new Set([r]))}else this._events.set(t,new Map([[n,new Set([r])]])),e.runOutsideAngular(()=>{document.addEventListener(t,this._delegateEventHandler,L3)})}removeHandler(e,t,n){let r=this._events.get(e);if(!r)return;let o=r.get(t);o&&(o.delete(n),o.size===0&&r.delete(t),r.size===0&&(this._events.delete(e),document.removeEventListener(e,this._delegateEventHandler,L3)))}},F3={enterDuration:225,exitDuration:150},sJ=800,B3=Hr({passive:!0,capture:!0}),V3=["mousedown","touchstart"],z3=["mouseup","mouseleave","touchend","touchcancel"],Wm=class Wm{constructor(e,t,n,r){this._target=e,this._ngZone=t,this._platform=r,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=nr(n))}fadeInRipple(e,t,n={}){let r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o=Z(Z({},F3),n.animation);n.centered&&(e=r.left+r.width/2,t=r.top+r.height/2);let s=n.radius||aJ(e,t,r),a=e-r.left,c=t-r.top,l=o.enterDuration,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=`${a-s}px`,d.style.top=`${c-s}px`,d.style.height=`${s*2}px`,d.style.width=`${s*2}px`,n.color!=null&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${l}ms`,this._containerElement.appendChild(d);let u=window.getComputedStyle(d),h=u.transitionProperty,p=u.transitionDuration,f=h==="none"||p==="0s"||p==="0s, 0s"||r.width===0&&r.height===0,m=new wT(this,d,n,f);d.style.transform="scale3d(1, 1, 1)",m.state=jo.FADING_IN,n.persistent||(this._mostRecentTransientRipple=m);let y=null;return!f&&(l||o.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let g=()=>{y&&(y.fallbackTimer=null),clearTimeout(x),this._finishRippleTransition(m)},_=()=>this._destroyRipple(m),x=setTimeout(_,l+100);d.addEventListener("transitionend",g),d.addEventListener("transitioncancel",_),y={onTransitionEnd:g,onTransitionCancel:_,fallbackTimer:x}}),this._activeRipples.set(m,y),(f||!l)&&this._finishRippleTransition(m),m}fadeOutRipple(e){if(e.state===jo.FADING_OUT||e.state===jo.HIDDEN)return;let t=e.element,n=Z(Z({},F3),e.config.animation);t.style.transitionDuration=`${n.exitDuration}ms`,t.style.opacity="0",e.state=jo.FADING_OUT,(e._animationForciblyDisabledThroughCss||!n.exitDuration)&&this._finishRippleTransition(e)}fadeOutAll(){this._getActiveRipples().forEach(e=>e.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(e=>{e.config.persistent||e.fadeOut()})}setupTriggerEvents(e){let t=nr(e);!this._platform.isBrowser||!t||t===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=t,V3.forEach(n=>{Wm._eventManager.addHandler(this._ngZone,n,t,this)}))}handleEvent(e){e.type==="mousedown"?this._onMousedown(e):e.type==="touchstart"?this._onTouchStart(e):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{z3.forEach(t=>{this._triggerElement.addEventListener(t,this,B3)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(e){e.state===jo.FADING_IN?this._startFadeOutTransition(e):e.state===jo.FADING_OUT&&this._destroyRipple(e)}_startFadeOutTransition(e){let t=e===this._mostRecentTransientRipple,{persistent:n}=e.config;e.state=jo.VISIBLE,!n&&(!t||!this._isPointerDown)&&e.fadeOut()}_destroyRipple(e){let t=this._activeRipples.get(e)??null;this._activeRipples.delete(e),this._activeRipples.size||(this._containerRect=null),e===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),e.state=jo.HIDDEN,t!==null&&(e.element.removeEventListener("transitionend",t.onTransitionEnd),e.element.removeEventListener("transitioncancel",t.onTransitionCancel),t.fallbackTimer!==null&&clearTimeout(t.fallbackTimer)),e.element.remove()}_onMousedown(e){let t=Sd(e),n=this._lastTouchStartEvent&&Date.now(){let t=e.state===jo.VISIBLE||e.config.terminateOnPointerUp&&e.state===jo.FADING_IN;!e.config.persistent&&t&&e.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let e=this._triggerElement;e&&(V3.forEach(t=>Wm._eventManager.removeHandler(t,e,this)),this._pointerUpEventsRegistered&&(z3.forEach(t=>e.removeEventListener(t,this,B3)),this._pointerUpEventsRegistered=!1))}};Wm._eventManager=new CT;var ST=Wm;function aJ(i,e,t){let n=Math.max(Math.abs(i-t.left),Math.abs(i-t.right)),r=Math.max(Math.abs(e-t.top),Math.abs(e-t.bottom));return Math.sqrt(n*n+r*r)}var W3=new me("mat-ripple-global-options"),gs=(()=>{let e=class e{get disabled(){return this._disabled}set disabled(n){n&&this.fadeOutAllNonPersistent(),this._disabled=n,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(n){this._trigger=n,this._setupTriggerEventsIfEnabled()}constructor(n,r,o,s,a){this._elementRef=n,this._animationMode=a,this.radius=0,this._disabled=!1,this._isInitialized=!1,this._globalOptions=s||{},this._rippleRenderer=new ST(this,r,n,o)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:Z(Z(Z({},this._globalOptions.animation),this._animationMode==="NoopAnimations"?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(n,r=0,o){return typeof n=="number"?this._rippleRenderer.fadeInRipple(n,r,Z(Z({},this.rippleConfig),o)):this._rippleRenderer.fadeInRipple(0,0,Z(Z({},this.rippleConfig),n))}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Fe),M(gn),M(W3,8),M(jn,8))},e.\u0275dir=Ve({type:e,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(r,o){r&2&&re("mat-ripple-unbounded",o.unbounded)},inputs:{color:[0,"matRippleColor","color"],unbounded:[0,"matRippleUnbounded","unbounded"],centered:[0,"matRippleCentered","centered"],radius:[0,"matRippleRadius","radius"],animation:[0,"matRippleAnimation","animation"],disabled:[0,"matRippleDisabled","disabled"],trigger:[0,"matRippleTrigger","trigger"]},exportAs:["matRipple"],standalone:!0});let i=e;return i})(),Id=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({imports:[Ut,Ut]});let i=e;return i})(),cJ=(()=>{let e=class e{constructor(n){this._animationMode=n,this.state="unchecked",this.disabled=!1,this.appearance="full"}};e.\u0275fac=function(r){return new(r||e)(M(jn,8))},e.\u0275cmp=ce({type:e,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(r,o){r&2&&re("mat-pseudo-checkbox-indeterminate",o.state==="indeterminate")("mat-pseudo-checkbox-checked",o.state==="checked")("mat-pseudo-checkbox-disabled",o.disabled)("mat-pseudo-checkbox-minimal",o.appearance==="minimal")("mat-pseudo-checkbox-full",o.appearance==="full")("_mat-animation-noopable",o._animationMode==="NoopAnimations")},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},standalone:!0,features:[le],decls:0,vars:0,template:function(r,o){},styles:['.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-minimal-pseudo-checkbox-selected-checkmark-color)}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color)}.mat-pseudo-checkbox-full{border-color:var(--mat-full-pseudo-checkbox-unselected-icon-color);border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-full-pseudo-checkbox-disabled-unselected-icon-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-full-pseudo-checkbox-selected-icon-color);border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-full-pseudo-checkbox-selected-checkmark-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-full-pseudo-checkbox-disabled-selected-icon-color)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-full-pseudo-checkbox-disabled-selected-checkmark-color)}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}'],encapsulation:2,changeDetection:0});let i=e;return i})(),lJ=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({imports:[Ut]});let i=e;return i})(),Vh=new me("MAT_OPTION_PARENT_COMPONENT"),dJ=0,zh=new me("MatOptgroup"),$3=(()=>{let e=class e{constructor(n){this.disabled=!1,this._labelId=`mat-optgroup-label-${dJ++}`,this._inert=n?.inertGroups??!1}};e.\u0275fac=function(r){return new(r||e)(M(Vh,8))},e.\u0275cmp=ce({type:e,selectors:[["mat-optgroup"]],hostAttrs:[1,"mat-mdc-optgroup"],hostVars:3,hostBindings:function(r,o){r&2&&Ye("role",o._inert?null:"group")("aria-disabled",o._inert?null:o.disabled.toString())("aria-labelledby",o._inert?null:o._labelId)},inputs:{label:"label",disabled:[2,"disabled","disabled",et]},exportAs:["matOptgroup"],standalone:!0,features:[Ft([{provide:zh,useExisting:e}]),nn,le],ngContentSelectors:XK,decls:5,vars:4,consts:[["role","presentation",1,"mat-mdc-optgroup-label",3,"id"],[1,"mdc-list-item__primary-text"]],template:function(r,o){r&1&&(In(YK),v(0,"span",0)(1,"span",1),S(2),Wt(3),b()(),Wt(4,1)),r&2&&(re("mdc-list-item--disabled",o.disabled),R("id",o._labelId),w(2),Se("",o.label," "))},styles:[".mat-mdc-optgroup{color:var(--mat-optgroup-label-text-color);font-family:var(--mat-optgroup-label-text-font);line-height:var(--mat-optgroup-label-text-line-height);font-size:var(--mat-optgroup-label-text-size);letter-spacing:var(--mat-optgroup-label-text-tracking);font-weight:var(--mat-optgroup-label-text-weight)}.mat-mdc-optgroup-label{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;outline:none}.mat-mdc-optgroup-label.mdc-list-item--disabled{opacity:.38}.mat-mdc-optgroup-label .mdc-list-item__primary-text{font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;white-space:normal}"],encapsulation:2,changeDetection:0});let i=e;return i})(),uJ=0,$m=class{constructor(e,t=!1){this.source=e,this.isUserInput=t}},Zc=(()=>{let e=class e{get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(n){this._disabled=n}get disableRipple(){return!!(this._parent&&this._parent.disableRipple)}get hideSingleSelectionIndicator(){return!!(this._parent&&this._parent.hideSingleSelectionIndicator)}constructor(n,r,o,s){this._element=n,this._changeDetectorRef=r,this._parent=o,this.group=s,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id=`mat-option-${uJ++}`,this.onSelectionChange=new Ie,this._stateChanges=new pe}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(n=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),n&&this._emitSelectionChangeEvent())}deselect(n=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),n&&this._emitSelectionChangeEvent())}focus(n,r){let o=this._getHostElement();typeof o.focus=="function"&&o.focus(r)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(n){(n.keyCode===13||n.keyCode===32)&&!bi(n)&&(this._selectViaInteraction(),n.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=this.multiple?!this._selected:!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){let n=this.viewValue;n!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=n)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(n=!1){this.onSelectionChange.emit(new $m(this,n))}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Ne),M(Vh,8),M(zh,8))},e.\u0275cmp=ce({type:e,selectors:[["mat-option"]],viewQuery:function(r,o){if(r&1&&Ee(ZK,7),r&2){let s;be(s=ye())&&(o._text=s.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(r,o){r&1&&H("click",function(){return o._selectViaInteraction()})("keydown",function(a){return o._handleKeydown(a)}),r&2&&(Fo("id",o.id),Ye("aria-selected",o.selected)("aria-disabled",o.disabled.toString()),re("mdc-list-item--selected",o.selected)("mat-mdc-option-multiple",o.multiple)("mat-mdc-option-active",o.active)("mdc-list-item--disabled",o.disabled))},inputs:{value:"value",id:"id",disabled:[2,"disabled","disabled",et]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],standalone:!0,features:[nn,le],ngContentSelectors:KK,decls:8,vars:5,consts:[["text",""],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled"]],template:function(r,o){r&1&&(In(QK),$(0,JK,1,2,"mat-pseudo-checkbox",1),Wt(1),v(2,"span",2,0),Wt(4,1),b(),$(5,eJ,1,1,"mat-pseudo-checkbox",3)(6,tJ,2,1,"span",4),ee(7,"div",5)),r&2&&(oe(o.multiple?0:-1),w(5),oe(!o.multiple&&o.selected&&!o.hideSingleSelectionIndicator?5:-1),w(),oe(o.group&&o.group._inert?6:-1),w(),R("matRippleTrigger",o._getHostElement())("matRippleDisabled",o.disabled||o.disableRipple))},dependencies:[cJ,gs],styles:['.mat-mdc-option{-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--mat-option-label-text-color);font-family:var(--mat-option-label-text-font);line-height:var(--mat-option-label-text-line-height);font-size:var(--mat-option-label-text-size);letter-spacing:var(--mat-option-label-text-tracking);font-weight:var(--mat-option-label-text-weight)}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var(--mat-option-hover-state-layer-color)}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var(--mat-option-focus-state-layer-color);outline:0}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color)}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple){background-color:var(--mat-option-selected-state-layer-color)}.mat-mdc-option.mdc-list-item{align-items:center;background:rgba(0,0,0,0)}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}.cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .cdk-high-contrast-active .mat-mdc-option.mdc-list-item--selected:not(.mat-mdc-option-multiple)::after{right:auto;left:16px}.mat-mdc-option-multiple{--mdc-list-list-item-selected-container-color:var(--mdc-list-list-item-container-color, transparent)}.mat-mdc-option-active .mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0});let i=e;return i})();function Ay(i,e,t){if(t.length){let n=e.toArray(),r=t.toArray(),o=0;for(let s=0;st+n?Math.max(0,i-n+e):t}var Uh=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({imports:[Id,Ut,lJ]});let i=e;return i})(),U3={capture:!0},H3=["focus","mousedown","mouseenter","touchstart"],yT="mat-ripple-loader-uninitialized",xT="mat-ripple-loader-class-name",G3="mat-ripple-loader-centered",Oy="mat-ripple-loader-disabled",q3=(()=>{let e=class e{constructor(){this._document=te(Xe,{optional:!0}),this._animationMode=te(jn,{optional:!0}),this._globalRippleOptions=te(W3,{optional:!0}),this._platform=te(gn),this._ngZone=te(Fe),this._hosts=new Map,this._onInteraction=n=>{let r=Ii(n);if(r instanceof HTMLElement){let o=r.closest(`[${yT}="${this._globalRippleOptions?.namespace??""}"]`);o&&this._createRipple(o)}},this._ngZone.runOutsideAngular(()=>{for(let n of H3)this._document?.addEventListener(n,this._onInteraction,U3)})}ngOnDestroy(){let n=this._hosts.keys();for(let r of n)this.destroyRipple(r);for(let r of H3)this._document?.removeEventListener(r,this._onInteraction,U3)}configureRipple(n,r){n.setAttribute(yT,this._globalRippleOptions?.namespace??""),(r.className||!n.hasAttribute(xT))&&n.setAttribute(xT,r.className||""),r.centered&&n.setAttribute(G3,""),r.disabled&&n.setAttribute(Oy,"")}getRipple(n){return this._hosts.get(n)||this._createRipple(n)}setDisabled(n,r){let o=this._hosts.get(n);if(o){o.disabled=r;return}r?n.setAttribute(Oy,""):n.removeAttribute(Oy)}_createRipple(n){if(!this._document)return;let r=this._hosts.get(n);if(r)return r;n.querySelector(".mat-ripple")?.remove();let o=this._document.createElement("span");o.classList.add("mat-ripple",n.getAttribute(xT)),n.append(o);let s=new gs(new Re(o),this._ngZone,this._platform,this._globalRippleOptions?this._globalRippleOptions:void 0,this._animationMode?this._animationMode:void 0);return s._isInitialized=!0,s.trigger=n,s.centered=n.hasAttribute(G3),s.disabled=n.hasAttribute(Oy),this.attachRipple(n,s),s}attachRipple(n,r){n.removeAttribute(yT),this._hosts.set(n,r)}destroyRipple(n){let r=this._hosts.get(n);r&&(r.ngOnDestroy(),this._hosts.delete(n))}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),Hh=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=ce({type:e,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(r,o){r&2&&re("mdc-form-field--align-end",o.labelPosition==="before")},inputs:{labelPosition:"labelPosition"},standalone:!0,features:[le],attrs:nJ,ngContentSelectors:iJ,decls:1,vars:0,template:function(r,o){r&1&&(In(),Wt(0))},styles:[".mat-internal-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-flex;align-items:center;vertical-align:middle}.mat-internal-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mat-internal-form-field>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end .mdc-form-field--align-end label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0}"],encapsulation:2,changeDetection:0});let i=e;return i})();var hJ=["mat-button",""],pJ=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],fJ=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"];var mJ=".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}";var gJ=["mat-icon-button",""],_J=["*"];var vJ=new me("MAT_BUTTON_CONFIG");var bJ=[{attribute:"mat-button",mdcClasses:["mdc-button","mat-mdc-button"]},{attribute:"mat-flat-button",mdcClasses:["mdc-button","mdc-button--unelevated","mat-mdc-unelevated-button"]},{attribute:"mat-raised-button",mdcClasses:["mdc-button","mdc-button--raised","mat-mdc-raised-button"]},{attribute:"mat-stroked-button",mdcClasses:["mdc-button","mdc-button--outlined","mat-mdc-outlined-button"]},{attribute:"mat-fab",mdcClasses:["mdc-fab","mat-mdc-fab-base","mat-mdc-fab"]},{attribute:"mat-mini-fab",mdcClasses:["mdc-fab","mat-mdc-fab-base","mdc-fab--mini","mat-mdc-mini-fab"]},{attribute:"mat-icon-button",mdcClasses:["mdc-icon-button","mat-mdc-icon-button"]}],Y3=(()=>{let e=class e{get ripple(){return this._rippleLoader?.getRipple(this._elementRef.nativeElement)}set ripple(n){this._rippleLoader?.attachRipple(this._elementRef.nativeElement,n)}get disableRipple(){return this._disableRipple}set disableRipple(n){this._disableRipple=n,this._updateRippleDisabled()}get disabled(){return this._disabled}set disabled(n){this._disabled=n,this._updateRippleDisabled()}constructor(n,r,o,s){this._elementRef=n,this._platform=r,this._ngZone=o,this._animationMode=s,this._focusMonitor=te(Gr),this._rippleLoader=te(q3),this._isFab=!1,this._disableRipple=!1,this._disabled=!1;let a=te(vJ,{optional:!0}),c=n.nativeElement,l=c.classList;this.disabledInteractive=a?.disabledInteractive??!1,this.color=a?.color??null,this._rippleLoader?.configureRipple(c,{className:"mat-mdc-button-ripple"});for(let{attribute:d,mdcClasses:u}of bJ)c.hasAttribute(d)&&l.add(...u)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(n="program",r){n?this._focusMonitor.focusVia(this._elementRef.nativeElement,n,r):this._elementRef.nativeElement.focus(r)}_getAriaDisabled(){return this.ariaDisabled!=null?this.ariaDisabled:this.disabled&&this.disabledInteractive?!0:null}_getDisabledAttribute(){return this.disabledInteractive||!this.disabled?null:!0}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}};e.\u0275fac=function(r){PE()},e.\u0275dir=Ve({type:e,inputs:{color:"color",disableRipple:[2,"disableRipple","disableRipple",et],disabled:[2,"disabled","disabled",et],ariaDisabled:[2,"aria-disabled","ariaDisabled",et],disabledInteractive:[2,"disabledInteractive","disabledInteractive",et]},features:[nn]});let i=e;return i})();var Ti=(()=>{let e=class e extends Y3{constructor(n,r,o,s){super(n,r,o,s)}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(gn),M(Fe),M(jn,8))},e.\u0275cmp=ce({type:e,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""]],hostVars:14,hostBindings:function(r,o){r&2&&(Ye("disabled",o._getDisabledAttribute())("aria-disabled",o._getAriaDisabled()),Vr(o.color?"mat-"+o.color:""),re("mat-mdc-button-disabled",o.disabled)("mat-mdc-button-disabled-interactive",o.disabledInteractive)("_mat-animation-noopable",o._animationMode==="NoopAnimations")("mat-unthemed",!o.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[sn,le],attrs:hJ,ngContentSelectors:fJ,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(r,o){r&1&&(In(pJ),ee(0,"span",0),Wt(1),v(2,"span",1),Wt(3,1),b(),Wt(4,2),ee(5,"span",2)(6,"span",3)),r&2&&re("mdc-button__ripple",!o._isFab)("mdc-fab__ripple",o._isFab)},styles:['.mat-mdc-button-base{text-decoration:none}.mdc-button{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0);padding:0 8px}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__label{position:relative}.mat-mdc-button{padding:0 var(--mat-text-button-horizontal-padding, 8px);height:var(--mdc-text-button-container-height);font-family:var(--mdc-text-button-label-text-font);font-size:var(--mdc-text-button-label-text-size);letter-spacing:var(--mdc-text-button-label-text-tracking);text-transform:var(--mdc-text-button-label-text-transform);font-weight:var(--mdc-text-button-label-text-weight)}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-text-button-with-icon-horizontal-padding, 8px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-offset, 0);margin-left:var(--mat-text-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, 0)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-text-button-ripple-color)}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-state-layer-color)}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-disabled-state-layer-color)}.mat-mdc-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-hover-state-layer-opacity)}.mat-mdc-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-focus-state-layer-opacity)}.mat-mdc-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-pressed-state-layer-opacity)}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-text-button-touch-target-display)}.mat-mdc-button,.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape)}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color)}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-text-button-disabled-label-text-color)}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-unelevated-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 var(--mat-filled-button-horizontal-padding, 16px);height:var(--mdc-filled-button-container-height);font-family:var(--mdc-filled-button-label-text-font);font-size:var(--mdc-filled-button-label-text-size);letter-spacing:var(--mdc-filled-button-label-text-tracking);text-transform:var(--mdc-filled-button-label-text-transform);font-weight:var(--mdc-filled-button-label-text-weight)}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -4px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -4px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-filled-button-ripple-color)}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-state-layer-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-disabled-state-layer-color)}.mat-mdc-unelevated-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-hover-state-layer-opacity)}.mat-mdc-unelevated-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-focus-state-layer-opacity)}.mat-mdc-unelevated-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-pressed-state-layer-opacity)}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-filled-button-touch-target-display)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color);background-color:var(--mdc-filled-button-container-color)}.mat-mdc-unelevated-button,.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape)}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-filled-button-disabled-label-text-color);background-color:var(--mdc-filled-button-disabled-container-color)}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 var(--mat-protected-button-horizontal-padding, 16px);box-shadow:var(--mdc-protected-button-container-elevation-shadow);height:var(--mdc-protected-button-container-height);font-family:var(--mdc-protected-button-label-text-font);font-size:var(--mdc-protected-button-label-text-size);letter-spacing:var(--mdc-protected-button-label-text-tracking);text-transform:var(--mdc-protected-button-label-text-transform);font-weight:var(--mdc-protected-button-label-text-weight)}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -4px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -4px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-protected-button-ripple-color)}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-state-layer-color)}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-disabled-state-layer-color)}.mat-mdc-raised-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-hover-state-layer-opacity)}.mat-mdc-raised-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-focus-state-layer-opacity)}.mat-mdc-raised-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-pressed-state-layer-opacity)}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-protected-button-touch-target-display)}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color);background-color:var(--mdc-protected-button-container-color)}.mat-mdc-raised-button,.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape)}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation-shadow)}.mat-mdc-raised-button:focus{box-shadow:var(--mdc-protected-button-focus-container-elevation-shadow)}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mdc-protected-button-pressed-container-elevation-shadow)}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-protected-button-disabled-label-text-color);background-color:var(--mdc-protected-button-disabled-container-color)}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation-shadow)}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1);padding:0 var(--mat-outlined-button-horizontal-padding, 15px);height:var(--mdc-outlined-button-container-height);font-family:var(--mdc-outlined-button-label-text-font);font-size:var(--mdc-outlined-button-label-text-size);letter-spacing:var(--mdc-outlined-button-label-text-tracking);text-transform:var(--mdc-outlined-button-label-text-transform);font-weight:var(--mdc-outlined-button-label-text-weight);border-radius:var(--mdc-outlined-button-container-shape);border-width:var(--mdc-outlined-button-outline-width)}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -4px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -4px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-outlined-button-ripple-color)}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-state-layer-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-disabled-state-layer-color)}.mat-mdc-outlined-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-hover-state-layer-opacity)}.mat-mdc-outlined-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-focus-state-layer-opacity)}.mat-mdc-outlined-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-pressed-state-layer-opacity)}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-outlined-button-touch-target-display)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color);border-color:var(--mdc-outlined-button-outline-color)}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-outlined-button-disabled-label-text-color);border-color:var(--mdc-outlined-button-disabled-outline-color)}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button .mdc-button__ripple{border-width:var(--mdc-outlined-button-outline-width);border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-button .mat-icon,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-unelevated-button .mat-icon,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-raised-button .mat-icon,.mat-mdc-outlined-button .mdc-button__label,.mat-mdc-outlined-button .mat-icon{z-index:1;position:relative}.mat-mdc-button .mat-mdc-focus-indicator,.mat-mdc-unelevated-button .mat-mdc-focus-indicator,.mat-mdc-raised-button .mat-mdc-focus-indicator,.mat-mdc-outlined-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-raised-button:focus .mat-mdc-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px}.mat-mdc-unelevated-button .mat-mdc-focus-indicator::before,.mat-mdc-raised-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-mdc-focus-indicator::before{margin:calc(calc(var(--mat-mdc-focus-indicator-border-width, 3px) + 3px)*-1)}',".cdk-high-contrast-active .mat-mdc-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-unelevated-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-raised-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-outlined-button:not(.mdc-button--outlined),.cdk-high-contrast-active .mat-mdc-icon-button{outline:solid 1px}"],encapsulation:2,changeDetection:0});let i=e;return i})();var Wo=(()=>{let e=class e extends Y3{constructor(n,r,o,s){super(n,r,o,s),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(gn),M(Fe),M(jn,8))},e.\u0275cmp=ce({type:e,selectors:[["button","mat-icon-button",""]],hostVars:14,hostBindings:function(r,o){r&2&&(Ye("disabled",o._getDisabledAttribute())("aria-disabled",o._getAriaDisabled()),Vr(o.color?"mat-"+o.color:""),re("mat-mdc-button-disabled",o.disabled)("mat-mdc-button-disabled-interactive",o.disabledInteractive)("_mat-animation-noopable",o._animationMode==="NoopAnimations")("mat-unthemed",!o.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[sn,le],attrs:gJ,ngContentSelectors:_J,decls:4,vars:0,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-mdc-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(r,o){r&1&&(In(),ee(0,"span",0),Wt(1),ee(2,"span",1)(3,"span",2))},styles:['.mat-mdc-icon-button{-webkit-user-select:none;user-select:none;display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;z-index:0;overflow:visible;border-radius:50%;flex-shrink:0;text-align:center;width:var(--mdc-icon-button-state-layer-size, 48px);height:var(--mdc-icon-button-state-layer-size, 48px);padding:calc(calc(var(--mdc-icon-button-state-layer-size, 48px) - var(--mdc-icon-button-icon-size, 24px)) / 2);font-size:var(--mdc-icon-button-icon-size);color:var(--mdc-icon-button-icon-color);-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-icon-button-disabled-icon-color)}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button img,.mat-mdc-icon-button svg{width:var(--mdc-icon-button-icon-size);height:var(--mdc-icon-button-icon-size);vertical-align:baseline}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-icon-button .mdc-button__label,.mat-mdc-icon-button .mat-icon{z-index:1;position:relative}.mat-mdc-icon-button .mat-mdc-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-mdc-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color)}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color)}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color)}.mat-mdc-icon-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity)}.mat-mdc-icon-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity)}.mat-mdc-icon-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity)}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-icon-button-touch-target-display)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button[hidden]{display:none}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',mJ],encapsulation:2,changeDetection:0});let i=e;return i})();var xn=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({imports:[Ut,Id,Ut]});let i=e;return i})();function Ks(i,e){return ie?1:i>=e?0:NaN}function ky(i){return i.length===1&&(i=yJ(i)),{left:function(e,t,n,r){for(n==null&&(n=0),r==null&&(r=e.length);n>>1;i(e[o],t)<0?n=o+1:r=o}return n},right:function(e,t,n,r){for(n==null&&(n=0),r==null&&(r=e.length);n>>1;i(e[o],t)>0?r=o:n=o+1}return n}}}function yJ(i){return function(e,t){return Ks(i(e),t)}}var X3=ky(Ks),xJ=X3.right,wJ=X3.left;var Z3=Array.prototype,SJ=Z3.slice,MJ=Z3.map;var nPe=Math.sqrt(50),iPe=Math.sqrt(10),rPe=Math.sqrt(2);var OJ=Array.prototype.slice;var RJ={value:function(){}};function tB(){for(var i=0,e=arguments.length,t={},n;i=0&&(n=t.slice(r+1),t=t.slice(0,r)),t&&!e.hasOwnProperty(t))throw new Error("unknown type: "+t);return{type:t,name:n}})}Fy.prototype=tB.prototype={constructor:Fy,on:function(i,e){var t=this._,n=AJ(i+"",t),r,o=-1,s=n.length;if(arguments.length<2){for(;++o0)for(var t=new Array(r),n=0,r,o;n=0&&(e=i.slice(0,t))!=="xmlns"&&(i=i.slice(t+1)),TT.hasOwnProperty(e)?{space:TT[e],local:i}:i}function kJ(i){return function(){var e=this.ownerDocument,t=this.namespaceURI;return t===By&&e.documentElement.namespaceURI===By?e.createElement(i):e.createElementNS(t,i)}}function LJ(i){return function(){return this.ownerDocument.createElementNS(i.space,i.local)}}function Vy(i){var e=Ha(i);return(e.local?LJ:kJ)(e)}function FJ(){}function Td(i){return i==null?FJ:function(){return this.querySelector(i)}}function nB(i){typeof i!="function"&&(i=Td(i));for(var e=this._groups,t=e.length,n=new Array(t),r=0;r=x&&(x=_+1);!(T=y[x])&&++x=0;)(s=n[r])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function pB(i){i||(i=UJ);function e(u,h){return u&&h?i(u.__data__,h.__data__):!u-!h}for(var t=this._groups,n=t.length,r=new Array(n),o=0;oe?1:i>=e?0:NaN}function fB(){var i=arguments[0];return arguments[0]=this,i.apply(null,arguments),this}function mB(){var i=new Array(this.size()),e=-1;return this.each(function(){i[++e]=this}),i}function gB(){for(var i=this._groups,e=0,t=i.length;e1?this.each((e==null?YJ:typeof e=="function"?ZJ:XJ)(i,e,t??"")):Qc(this.node(),i)}function Qc(i,e){return i.style.getPropertyValue(e)||Uy(i).getComputedStyle(i,null).getPropertyValue(e)}function QJ(i){return function(){delete this[i]}}function KJ(i,e){return function(){this[i]=e}}function JJ(i,e){return function(){var t=e.apply(this,arguments);t==null?delete this[i]:this[i]=t}}function wB(i,e){return arguments.length>1?this.each((e==null?QJ:typeof e=="function"?JJ:KJ)(i,e)):this.node()[i]}function CB(i){return i.trim().split(/^|\s+/)}function DT(i){return i.classList||new SB(i)}function SB(i){this._node=i,this._names=CB(i.getAttribute("class")||"")}SB.prototype={add:function(i){var e=this._names.indexOf(i);e<0&&(this._names.push(i),this._node.setAttribute("class",this._names.join(" ")))},remove:function(i){var e=this._names.indexOf(i);e>=0&&(this._names.splice(e,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(i){return this._names.indexOf(i)>=0}};function MB(i,e){for(var t=DT(i),n=-1,r=e.length;++n=0&&(t=e.slice(n+1),e=e.slice(0,n)),{type:e,name:t}})}function _ee(i){return function(){var e=this.__on;if(e){for(var t=0,n=-1,r=e.length,o;t>8&15|e>>4&240,e>>4&15|e&240,(e&15)<<4|e&15,1):t===8?qy(e>>24&255,e>>16&255,e>>8&255,(e&255)/255):t===4?qy(e>>12&15|e>>8&240,e>>8&15|e>>4&240,e>>4&15|e&240,((e&15)<<4|e&15)/255):null):(e=wee.exec(i))?new bo(e[1],e[2],e[3],1):(e=Cee.exec(i))?new bo(e[1]*255/100,e[2]*255/100,e[3]*255/100,1):(e=See.exec(i))?qy(e[1],e[2],e[3],e[4]):(e=Mee.exec(i))?qy(e[1]*255/100,e[2]*255/100,e[3]*255/100,e[4]):(e=Eee.exec(i))?ZB(e[1],e[2]/100,e[3]/100,1):(e=Iee.exec(i))?ZB(e[1],e[2]/100,e[3]/100,e[4]):jB.hasOwnProperty(i)?qB(jB[i]):i==="transparent"?new bo(NaN,NaN,NaN,0):null}function qB(i){return new bo(i>>16&255,i>>8&255,i&255,1)}function qy(i,e,t,n){return n<=0&&(i=e=t=NaN),new bo(i,e,t,n)}function Dee(i){return i instanceof tg||(i=_s(i)),i?(i=i.rgb(),new bo(i.r,i.g,i.b,i.opacity)):new bo}function $h(i,e,t,n){return arguments.length===1?Dee(i):new bo(i,e,t,n??1)}function bo(i,e,t,n){this.r=+i,this.g=+e,this.b=+t,this.opacity=+n}$y(bo,$h,NT(tg,{brighter:function(i){return i=i==null?Yy:Math.pow(Yy,i),new bo(this.r*i,this.g*i,this.b*i,this.opacity)},darker:function(i){return i=i==null?Jm:Math.pow(Jm,i),new bo(this.r*i,this.g*i,this.b*i,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:YB,formatHex:YB,formatRgb:XB,toString:XB}));function YB(){return"#"+kT(this.r)+kT(this.g)+kT(this.b)}function XB(){var i=this.opacity;return i=isNaN(i)?1:Math.max(0,Math.min(1,i)),(i===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(i===1?")":", "+i+")")}function kT(i){return i=Math.max(0,Math.min(255,Math.round(i)||0)),(i<16?"0":"")+i.toString(16)}function ZB(i,e,t,n){return n<=0?i=e=t=NaN:t<=0||t>=1?i=e=NaN:e<=0&&(i=NaN),new Js(i,e,t,n)}function QB(i){if(i instanceof Js)return new Js(i.h,i.s,i.l,i.opacity);if(i instanceof tg||(i=_s(i)),!i)return new Js;if(i instanceof Js)return i;i=i.rgb();var e=i.r/255,t=i.g/255,n=i.b/255,r=Math.min(e,t,n),o=Math.max(e,t,n),s=NaN,a=o-r,c=(o+r)/2;return a?(e===o?s=(t-n)/a+(t0&&c<1?0:s,new Js(s,a,c,i.opacity)}function KB(i,e,t,n){return arguments.length===1?QB(i):new Js(i,e,t,n??1)}function Js(i,e,t,n){this.h=+i,this.s=+e,this.l=+t,this.opacity=+n}$y(Js,KB,NT(tg,{brighter:function(i){return i=i==null?Yy:Math.pow(Yy,i),new Js(this.h,this.s,this.l*i,this.opacity)},darker:function(i){return i=i==null?Jm:Math.pow(Jm,i),new Js(this.h,this.s,this.l*i,this.opacity)},rgb:function(){var i=this.h%360+(this.h<0)*360,e=isNaN(i)||isNaN(this.s)?0:this.s,t=this.l,n=t+(t<.5?t:1-t)*e,r=2*t-n;return new bo(LT(i>=240?i-240:i+120,r,n),LT(i,r,n),LT(i<120?i+240:i-120,r,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var i=this.opacity;return i=isNaN(i)?1:Math.max(0,Math.min(1,i)),(i===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(i===1?")":", "+i+")")}}));function LT(i,e,t){return(i<60?e+(t-e)*i/60:i<180?t:i<240?e+(t-e)*(240-i)/60:e)*255}function FT(i,e,t,n,r){var o=i*i,s=o*i;return((1-3*i+3*o-s)*e+(4-6*o+3*s)*t+(1+3*i+3*o-3*s)*n+s*r)/6}function JB(i){var e=i.length-1;return function(t){var n=t<=0?t=0:t>=1?(t=1,e-1):Math.floor(t*e),r=i[n],o=i[n+1],s=n>0?i[n-1]:2*r-o,a=nt&&(o=e.slice(t,o),a[s]?a[s]+=o:a[++s]=o),(n=n[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,c.push({i:s,x:jr(n,r)})),t=BT.lastIndex;return t180?d+=360:d-l>180&&(l+=360),h.push({i:u.push(r(u)+"rotate(",null,n)-2,x:jr(l,d)})):d&&u.push(r(u)+"rotate("+d+n)}function a(l,d,u,h){l!==d?h.push({i:u.push(r(u)+"skewX(",null,n)-2,x:jr(l,d)}):d&&u.push(r(u)+"skewX("+d+n)}function c(l,d,u,h,p,f){if(l!==u||d!==h){var m=p.push(r(p)+"scale(",null,",",null,")");f.push({i:m-4,x:jr(l,u)},{i:m-2,x:jr(d,h)})}else(u!==1||h!==1)&&p.push(r(p)+"scale("+u+","+h+")")}return function(l,d){var u=[],h=[];return l=i(l),d=i(d),o(l.translateX,l.translateY,d.translateX,d.translateY,u,h),s(l.rotate,d.rotate,u,h),a(l.skewX,d.skewX,u,h),c(l.scaleX,l.scaleY,d.scaleX,d.scaleY,u,h),l=d=null,function(p){for(var f=-1,m=h.length,y;++f=0&&i._call.call(null,e),i=i._next;--qh}function mV(){Od=(Jy=lg.now())+ex,qh=ag=0;try{vV()}finally{qh=0,Uee(),Od=0}}function zee(){var i=lg.now(),e=i-Jy;e>gV&&(ex-=e,Jy=i)}function Uee(){for(var i,e=Ky,t,n=1/0;e;)e._call?(n>e._time&&(n=e._time),i=e,e=e._next):(t=e._next,e._next=null,e=i?i._next=t:Ky=t);cg=i,$T(n)}function $T(i){if(!qh){ag&&(ag=clearTimeout(ag));var e=i-Od;e>24?(i<1/0&&(ag=setTimeout(mV,i-lg.now()-ex)),sg&&(sg=clearInterval(sg))):(sg||(Jy=lg.now(),sg=setInterval(zee,gV)),qh=1,_V(mV))}}function nx(i,e,t){var n=new dg;return e=e==null?0:+e,n.restart(function(r){n.stop(),i(r+e)},e,t),n}var Hee=Xm("start","end","cancel","interrupt"),Gee=[],yV=0,qT=1,rx=2,ix=3,bV=4,ox=5,ug=6;function Kc(i,e,t,n,r,o){var s=i.__transition;if(!s)i.__transition={};else if(t in s)return;jee(i,t,{name:e,index:n,group:r,on:Hee,tween:Gee,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:yV})}function hg(i,e){var t=Vi(i,e);if(t.state>yV)throw new Error("too late; already scheduled");return t}function Wr(i,e){var t=Vi(i,e);if(t.state>ix)throw new Error("too late; already running");return t}function Vi(i,e){var t=i.__transition;if(!t||!(t=t[e]))throw new Error("transition not found");return t}function jee(i,e,t){var n=i.__transition,r;n[e]=t,t.timer=tx(o,0,t.time);function o(l){t.state=qT,t.timer.restart(s,t.delay,t.time),t.delay<=l&&s(l-t.delay)}function s(l){var d,u,h,p;if(t.state!==qT)return c();for(d in n)if(p=n[d],p.name===t.name){if(p.state===ix)return nx(s);p.state===bV?(p.state=ug,p.timer.stop(),p.on.call("interrupt",i,i.__data__,p.index,p.group),delete n[d]):+drx&&n.state=0&&(e=e.slice(0,t)),!e||e==="start"})}function lte(i,e,t){var n,r,o=cte(e)?hg:Wr;return function(){var s=o(this,i),a=s.on;a!==n&&(r=(n=a).copy()).on(e,t),s.on=r}}function PV(i,e){var t=this._id;return arguments.length<2?Vi(this.node(),t).on.on(i):this.each(lte(t,i,e))}function dte(i){return function(){var e=this.parentNode;for(var t in this.__transition)if(+t!==i)return;e&&e.removeChild(this)}}function OV(){return this.on("end.remove",dte(this._id))}function RV(i){var e=this._name,t=this._id;typeof i!="function"&&(i=Td(i));for(var n=this._groups,r=n.length,o=new Array(r),s=0;sRd)if(!(Math.abs(d*a-c*l)>Rd)||!r)this._+="L"+(this._x1=i)+","+(this._y1=e);else{var h=t-o,p=n-s,f=a*a+c*c,m=h*h+p*p,y=Math.sqrt(f),g=Math.sqrt(u),_=r*Math.tan((KT-Math.acos((f+u-m)/(2*y*g)))/2),x=_/g,C=_/y;Math.abs(x-1)>Rd&&(this._+="L"+(i+x*l)+","+(e+x*d)),this._+="A"+r+","+r+",0,0,"+ +(d*h>l*p)+","+(this._x1=i+C*a)+","+(this._y1=e+C*c)}},arc:function(i,e,t,n,r,o){i=+i,e=+e,t=+t,o=!!o;var s=t*Math.cos(n),a=t*Math.sin(n),c=i+s,l=e+a,d=1^o,u=o?n-r:r-n;if(t<0)throw new Error("negative radius: "+t);this._x1===null?this._+="M"+c+","+l:(Math.abs(this._x1-c)>Rd||Math.abs(this._y1-l)>Rd)&&(this._+="L"+c+","+l),t&&(u<0&&(u=u%JT+JT),u>Dte?this._+="A"+t+","+t+",0,1,"+d+","+(i-s)+","+(e-a)+"A"+t+","+t+",0,1,"+d+","+(this._x1=c)+","+(this._y1=l):u>Rd&&(this._+="A"+t+","+t+",0,"+ +(u>=KT)+","+d+","+(this._x1=i+t*Math.cos(r))+","+(this._y1=e+t*Math.sin(r))))},rect:function(i,e,t,n){this._+="M"+(this._x0=this._x1=+i)+","+(this._y0=this._y1=+e)+"h"+ +t+"v"+ +n+"h"+-t+"Z"},toString:function(){return this._}};var tD=$V;var yo="$";function lx(){}lx.prototype=qV.prototype={constructor:lx,has:function(i){return yo+i in this},get:function(i){return this[yo+i]},set:function(i,e){return this[yo+i]=e,this},remove:function(i){var e=yo+i;return e in this&&delete this[e]},clear:function(){for(var i in this)i[0]===yo&&delete this[i]},keys:function(){var i=[];for(var e in this)e[0]===yo&&i.push(e.slice(1));return i},values:function(){var i=[];for(var e in this)e[0]===yo&&i.push(this[e]);return i},entries:function(){var i=[];for(var e in this)e[0]===yo&&i.push({key:e.slice(1),value:this[e]});return i},size:function(){var i=0;for(var e in this)e[0]===yo&&++i;return i},empty:function(){for(var i in this)if(i[0]===yo)return!1;return!0},each:function(i){for(var e in this)e[0]===yo&&i(this[e],e.slice(1),this)}};function qV(i,e){var t=new lx;if(i instanceof lx)i.each(function(a,c){t.set(c,a)});else if(Array.isArray(i)){var n=-1,r=i.length,o;if(e==null)for(;++n1);return n+r*a*Math.sqrt(-2*Math.log(s)/s)}}return t.source=i,t}(qo);var kte=function i(e){function t(){var n=nD.source(e).apply(this,arguments);return function(){return Math.exp(n())}}return t.source=i,t}(qo);var iD=function i(e){function t(n){return function(){for(var r=0,o=0;o0)){if(m/=p,p<0){if(m0){if(m>h)return;m>u&&(u=m)}if(m=n-a,!(!p&&m<0)){if(m/=p,p<0){if(m>h)return;m>u&&(u=m)}else if(p>0){if(m0)){if(m/=f,f<0){if(m0){if(m>h)return;m>u&&(u=m)}if(m=r-c,!(!f&&m<0)){if(m/=f,f<0){if(m>h)return;m>u&&(u=m)}else if(f>0){if(m0)&&!(h<1)||(u>0&&(i[0]=[a+u*p,c+u*f]),h<1&&(i[1]=[a+h*p,c+h*f])),!0}}}}}function Zte(i,e,t,n,r){var o=i[1];if(o)return!0;var s=i[0],a=i.left,c=i.right,l=a[0],d=a[1],u=c[0],h=c[1],p=(l+u)/2,f=(d+h)/2,m,y;if(h===d){if(p=n)return;if(l>u){if(!s)s=[p,t];else if(s[1]>=r)return;o=[p,r]}else{if(!s)s=[p,r];else if(s[1]1)if(l>u){if(!s)s=[(t-y)/m,t];else if(s[1]>=r)return;o=[(r-y)/m,r]}else{if(!s)s=[(r-y)/m,r];else if(s[1]=n)return;o=[n,m*n+y]}else{if(!s)s=[n,m*n+y];else if(s[0]Un||Math.abs(o[0][1]-o[1][1])>Un))&&delete Gi[r]}function dz(i){return $r[i.index]={site:i,halfedges:[]}}function Qte(i,e){var t=i.site,n=e.left,r=e.right;return t===r&&(r=n,n=t),r?Math.atan2(r[1]-n[1],r[0]-n[0]):(t===n?(n=e[1],r=e[0]):(n=e[0],r=e[1]),Math.atan2(n[0]-r[0],r[1]-n[1]))}function dD(i,e){return e[+(e.left!==i.site)]}function Kte(i,e){return e[+(e.left===i.site)]}function uz(){for(var i=0,e=$r.length,t,n,r,o;iUn||Math.abs(y-p)>Un)&&(l.splice(c,0,Gi.push(tp(a,f,Math.abs(m-i)Un?[i,Math.abs(h-i)Un?[Math.abs(p-n)Un?[t,Math.abs(h-t)Un?[Math.abs(p-e)=-fz)){var p=c*c+l*l,f=d*d+u*u,m=(u*p-l*f)/h,y=(c*f-d*p)/h,g=pz.pop()||new Jte;g.arc=i,g.site=r,g.x=m+s,g.y=(g.cy=y+a)+Math.sqrt(m*m+y*y),i.circle=g;for(var _=null,x=np._;x;)if(g.yUn)a=a.L;else if(s=e-tne(a,t),s>Un){if(!a.R){n=a;break}a=a.R}else{o>-Un?(n=a.P,r=a):s>-Un?(n=a,r=a.N):n=r=a;break}dz(i);var c=mz(i);if(Fd.insert(n,c),!(!n&&!r)){if(n===r){Ld(n),r=mz(n.site),Fd.insert(c,r),c.edge=r.edge=ep(n.site,c.site),kd(n),kd(r);return}if(!r){c.edge=ep(n.site,c.site);return}Ld(n),Ld(r);var l=n.site,d=l[0],u=l[1],h=i[0]-d,p=i[1]-u,f=r.site,m=f[0]-d,y=f[1]-u,g=2*(h*y-p*m),_=h*h+p*p,x=m*m+y*y,C=[(y*_-p*x)/g+d,(h*x-m*_)/g+u];yg(r.edge,l,f,C),c.edge=ep(l,i,null,C),r.edge=ep(i,f,null,C),kd(n),kd(r)}}function bz(i,e){var t=i.site,n=t[0],r=t[1],o=r-e;if(!o)return n;var s=i.P;if(!s)return-1/0;t=s.site;var a=t[0],c=t[1],l=c-e;if(!l)return a;var d=a-n,u=1/o-1/l,h=d/l;return u?(-h+Math.sqrt(h*h-2*u*(d*d/(-2*l)-c+l/2+r-o/2)))/u+n:(n+a)/2}function tne(i,e){var t=i.N;if(t)return bz(t,e);var n=i.site;return n[1]===e?n[0]:1/0}var Un=1e-6,fz=1e-12,Fd,$r,np,Gi;function nne(i,e,t){return(i[0]-t[0])*(e[1]-i[1])-(i[0]-e[0])*(t[1]-i[1])}function ine(i,e){return e[1]-i[1]||e[0]-i[0]}function px(i,e){var t=i.sort(ine).pop(),n,r,o;for(Gi=[],$r=new Array(i.length),Fd=new lD,np=new lD;;)if(o=hx,t&&(!o||t[1]=s)return null;var c=i-a.site[0],l=e-a.site[1],d=c*c+l*l;do a=n.cells[r=o],o=null,a.halfedges.forEach(function(u){var h=n.edges[u],p=h.left;if(!((p===a.site||!p)&&!(p=h.right))){var f=i-p[0],m=e-p[1],y=f*f+m*m;yn?(n+r)/2:Math.min(0,n)||Math.max(0,r),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function fD(){var i=rne,e=one,t=cne,n=sne,r=ane,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,c=WT,l=Xm("start","zoom","end"),d,u,h=500,p=150,f=0;function m(P){P.property("__zoom",yz).on("wheel.zoom",D).on("mousedown.zoom",E).on("dblclick.zoom",A).filter(r).on("touchstart.zoom",j).on("touchmove.zoom",q).on("touchend.zoom touchcancel.zoom",z).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}m.transform=function(P,U,W){var Y=P.selection?P.selection():P;Y.property("__zoom",yz),P!==Y?x(P,U,W):Y.interrupt().each(function(){C(this,arguments).start().zoom(null,typeof U=="function"?U.apply(this,arguments):U).end()})},m.scaleBy=function(P,U,W){m.scaleTo(P,function(){var Y=this.__zoom.k,k=typeof U=="function"?U.apply(this,arguments):U;return Y*k},W)},m.scaleTo=function(P,U,W){m.transform(P,function(){var Y=e.apply(this,arguments),k=this.__zoom,G=W==null?_(Y):typeof W=="function"?W.apply(this,arguments):W,K=k.invert(G),de=typeof U=="function"?U.apply(this,arguments):U;return t(g(y(k,de),G,K),Y,s)},W)},m.translateBy=function(P,U,W){m.transform(P,function(){return t(this.__zoom.translate(typeof U=="function"?U.apply(this,arguments):U,typeof W=="function"?W.apply(this,arguments):W),e.apply(this,arguments),s)})},m.translateTo=function(P,U,W,Y){m.transform(P,function(){var k=e.apply(this,arguments),G=this.__zoom,K=Y==null?_(k):typeof Y=="function"?Y.apply(this,arguments):Y;return t(Bd.translate(K[0],K[1]).scale(G.k).translate(typeof U=="function"?-U.apply(this,arguments):-U,typeof W=="function"?-W.apply(this,arguments):-W),k,s)},Y)};function y(P,U){return U=Math.max(o[0],Math.min(o[1],U)),U===P.k?P:new na(U,P.x,P.y)}function g(P,U,W){var Y=U[0]-W[0]*P.k,k=U[1]-W[1]*P.k;return Y===P.x&&k===P.y?P:new na(P.k,Y,k)}function _(P){return[(+P[0][0]+ +P[1][0])/2,(+P[0][1]+ +P[1][1])/2]}function x(P,U,W){P.on("start.zoom",function(){C(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).end()}).tween("zoom",function(){var Y=this,k=arguments,G=C(Y,k),K=e.apply(Y,k),de=W==null?_(K):typeof W=="function"?W.apply(Y,k):W,De=Math.max(K[1][0]-K[0][0],K[1][1]-K[0][1]),Te=Y.__zoom,He=typeof U=="function"?U.apply(Y,k):U,he=c(Te.invert(de).concat(De/Te.k),He.invert(de).concat(De/He.k));return function(se){if(se===1)se=He;else{var qe=he(se),ue=De/qe[2];se=new na(ue,de[0]-qe[0]*ue,de[1]-qe[1]*ue)}G.zoom(null,se)}})}function C(P,U,W){return!W&&P.__zooming||new T(P,U)}function T(P,U){this.that=P,this.args=U,this.active=0,this.extent=e.apply(P,U),this.taps=0}T.prototype={start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(P,U){return this.mouse&&P!=="mouse"&&(this.mouse[1]=U.invert(this.mouse[0])),this.touch0&&P!=="touch"&&(this.touch0[1]=U.invert(this.touch0[0])),this.touch1&&P!=="touch"&&(this.touch1[1]=U.invert(this.touch1[0])),this.that.__zoom=U,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(P){PT(new hD(m,P,this.that.__zoom),l.apply,l,[P,this.that,this.args])}};function D(){if(!i.apply(this,arguments))return;var P=C(this,arguments),U=this.__zoom,W=Math.max(o[0],Math.min(o[1],U.k*Math.pow(2,n.apply(this,arguments)))),Y=jh(this);if(P.wheel)(P.mouse[0][0]!==Y[0]||P.mouse[0][1]!==Y[1])&&(P.mouse[1]=U.invert(P.mouse[0]=Y)),clearTimeout(P.wheel);else{if(U.k===W)return;P.mouse=[Y,U.invert(Y)],Jc(this),P.start()}ip(),P.wheel=setTimeout(k,p),P.zoom("mouse",t(g(y(U,W),P.mouse[0],P.mouse[1]),P.extent,s));function k(){P.wheel=null,P.end()}}function E(){if(u||!i.apply(this,arguments))return;var P=C(this,arguments,!0),U=$o(ht.view).on("mousemove.zoom",G,!0).on("mouseup.zoom",K,!0),W=jh(this),Y=ht.clientX,k=ht.clientY;RT(ht.view),fx(),P.mouse=[W,this.__zoom.invert(W)],Jc(this),P.start();function G(){if(ip(),!P.moved){var de=ht.clientX-Y,De=ht.clientY-k;P.moved=de*de+De*De>f}P.zoom("mouse",t(g(P.that.__zoom,P.mouse[0]=jh(P.that),P.mouse[1]),P.extent,s))}function K(){U.on("mousemove.zoom mouseup.zoom",null),AT(ht.view,P.moved),ip(),P.end()}}function A(){if(i.apply(this,arguments)){var P=this.__zoom,U=jh(this),W=P.invert(U),Y=P.k*(ht.shiftKey?.5:2),k=t(g(y(P,Y),U,W),e.apply(this,arguments),s);ip(),a>0?$o(this).transition().duration(a).call(x,k,U):$o(this).call(m.transform,k)}}function j(){if(i.apply(this,arguments)){var P=ht.touches,U=P.length,W=C(this,arguments,ht.changedTouches.length===U),Y,k,G,K;for(fx(),k=0;kv4,AddEquation:()=>qd,AddOperation:()=>f4,AdditiveAnimationBlendMode:()=>XP,AdditiveBlending:()=>KD,AlphaFormat:()=>E4,AlwaysDepth:()=>a4,AlwaysStencilFunc:()=>yH,AmbientLight:()=>L_,AmbientLightProbe:()=>Bw,AnimationClip:()=>pu,AnimationLoader:()=>yP,AnimationMixer:()=>Gw,AnimationObjectGroup:()=>Hw,AnimationUtils:()=>Kn,ArcCurve:()=>s_,ArrayCamera:()=>Zg,ArrowHelper:()=>zP,Audio:()=>z_,AudioAnalyser:()=>zw,AudioContext:()=>rO,AudioListener:()=>SP,AudioLoader:()=>Lw,AxesHelper:()=>Qw,AxisHelper:()=>qce,BackSide:()=>Ci,BasicDepthPacking:()=>_H,BasicShadowMap:()=>hne,BinaryTextureLoader:()=>Kce,Bone:()=>Wp,BooleanKeyframeTrack:()=>sc,BoundingBoxHelper:()=>Yce,Box2:()=>vl,Box3:()=>qr,Box3Helper:()=>BP,BoxBufferGeometry:()=>ul,BoxGeometry:()=>ul,BoxHelper:()=>Zw,BufferAttribute:()=>un,BufferGeometry:()=>Dt,BufferGeometryLoader:()=>Nw,ByteType:()=>y4,Cache:()=>fu,Camera:()=>iu,CameraHelper:()=>FP,CanvasRenderer:()=>ele,CanvasTexture:()=>yw,CatmullRomCurve3:()=>a_,CineonToneMapping:()=>_4,CircleBufferGeometry:()=>n_,CircleGeometry:()=>n_,ClampToEdgeWrapping:()=>or,Clock:()=>Vw,Color:()=>je,ColorKeyframeTrack:()=>D_,CompressedTexture:()=>t_,CompressedTextureLoader:()=>xP,ConeBufferGeometry:()=>i_,ConeGeometry:()=>i_,CubeCamera:()=>kp,CubeReflectionMapping:()=>_u,CubeRefractionMapping:()=>vu,CubeTexture:()=>hl,CubeTextureLoader:()=>Iw,CubeUVReflectionMapping:()=>tf,CubeUVRefractionMapping:()=>H_,CubicBezierCurve:()=>$p,CubicBezierCurve3:()=>c_,CubicInterpolant:()=>Sw,CullFaceBack:()=>QD,CullFaceFront:()=>$U,CullFaceFrontBack:()=>une,CullFaceNone:()=>WU,Curve:()=>Xr,CurvePath:()=>Cw,CustomBlending:()=>YU,CustomToneMapping:()=>b4,CylinderBufferGeometry:()=>au,CylinderGeometry:()=>au,Cylindrical:()=>OP,DataTexture:()=>Ka,DataTexture2DArray:()=>Bp,DataTexture3D:()=>Xg,DataTextureLoader:()=>Tw,DataUtils:()=>HP,DecrementStencilOp:()=>Cne,DecrementWrapStencilOp:()=>Mne,DefaultLoadingManager:()=>UH,DepthFormat:()=>Kd,DepthStencilFormat:()=>Dp,DepthTexture:()=>xw,DirectionalLight:()=>k_,DirectionalLightHelper:()=>LP,DiscreteInterpolant:()=>Mw,DodecahedronBufferGeometry:()=>r_,DodecahedronGeometry:()=>r_,DoubleSide:()=>tu,DstAlphaFactor:()=>t4,DstColorFactor:()=>i4,DynamicBufferAttribute:()=>Fce,DynamicCopyUsage:()=>Vne,DynamicDrawUsage:()=>Op,DynamicReadUsage:()=>Lne,EdgesGeometry:()=>o_,EdgesHelper:()=>Xce,EllipseCurve:()=>cu,EqualDepth:()=>l4,EqualStencilFunc:()=>Dne,EquirectangularReflectionMapping:()=>Bg,EquirectangularRefractionMapping:()=>Vg,Euler:()=>nu,EventDispatcher:()=>sa,ExtrudeBufferGeometry:()=>oc,ExtrudeGeometry:()=>oc,FaceColors:()=>Ece,FileLoader:()=>Qo,FlatShading:()=>WP,Float16BufferAttribute:()=>pw,Float32Attribute:()=>Wce,Float32BufferAttribute:()=>ot,Float64Attribute:()=>$ce,Float64BufferAttribute:()=>fw,FloatType:()=>ra,Fog:()=>Kg,FogExp2:()=>Qg,Font:()=>ale,FontLoader:()=>sle,FrontSide:()=>eu,Frustum:()=>ru,GLBufferAttribute:()=>$w,GLSL1:()=>Une,GLSL3:()=>pP,GammaEncoding:()=>eC,GreaterDepth:()=>u4,GreaterEqualDepth:()=>d4,GreaterEqualStencilFunc:()=>Ane,GreaterStencilFunc:()=>One,GridHelper:()=>Xw,Group:()=>Za,HalfFloatType:()=>Zd,HemisphereLight:()=>O_,HemisphereLightHelper:()=>NP,HemisphereLightProbe:()=>Fw,IcosahedronBufferGeometry:()=>h_,IcosahedronGeometry:()=>h_,ImageBitmapLoader:()=>kw,ImageLoader:()=>mu,ImageUtils:()=>ec,ImmediateRenderObject:()=>cle,IncrementStencilOp:()=>wne,IncrementWrapStencilOp:()=>Sne,InstancedBufferAttribute:()=>nc,InstancedBufferGeometry:()=>V_,InstancedInterleavedBuffer:()=>Ww,InstancedMesh:()=>Jg,Int16Attribute:()=>Uce,Int16BufferAttribute:()=>uw,Int32Attribute:()=>Gce,Int32BufferAttribute:()=>hw,Int8Attribute:()=>Bce,Int8BufferAttribute:()=>cw,IntType:()=>w4,InterleavedBuffer:()=>tc,InterleavedBufferAttribute:()=>ml,Interpolant:()=>Ms,InterpolateDiscrete:()=>Gg,InterpolateLinear:()=>jg,InterpolateSmooth:()=>nw,InvertStencilOp:()=>Ene,JSONLoader:()=>tle,KeepStencilOp:()=>iw,KeyframeTrack:()=>Mo,LOD:()=>_w,LatheBufferGeometry:()=>p_,LatheGeometry:()=>p_,Layers:()=>Yg,LensFlare:()=>ile,LessDepth:()=>c4,LessEqualDepth:()=>rw,LessEqualStencilFunc:()=>Pne,LessStencilFunc:()=>Tne,Light:()=>Eo,LightProbe:()=>gu,Line:()=>Ss,Line3:()=>qw,LineBasicMaterial:()=>Ri,LineCurve:()=>lu,LineCurve3:()=>ww,LineDashedMaterial:()=>I_,LineLoop:()=>e_,LinePieces:()=>Sce,LineSegments:()=>Cr,LineStrip:()=>Cce,LinearEncoding:()=>cr,LinearFilter:()=>zi,LinearInterpolant:()=>T_,LinearMipMapLinearFilter:()=>_ne,LinearMipMapNearestFilter:()=>gne,LinearMipmapLinearFilter:()=>bu,LinearMipmapNearestFilter:()=>YP,LinearToneMapping:()=>m4,Loader:()=>lr,LoaderUtils:()=>ef,LoadingManager:()=>P_,LogLuvEncoding:()=>gH,LoopOnce:()=>hH,LoopPingPong:()=>fH,LoopRepeat:()=>pH,LuminanceAlphaFormat:()=>T4,LuminanceFormat:()=>I4,MOUSE:()=>lne,Material:()=>Oi,MaterialLoader:()=>Aw,Math:()=>nie,MathUtils:()=>nie,Matrix3:()=>Si,Matrix4:()=>dt,MaxEquation:()=>nP,Mesh:()=>pi,MeshBasicMaterial:()=>ws,MeshDepthMaterial:()=>Vp,MeshDistanceMaterial:()=>zp,MeshFaceMaterial:()=>Tce,MeshLambertMaterial:()=>M_,MeshMatcapMaterial:()=>E_,MeshNormalMaterial:()=>S_,MeshPhongMaterial:()=>w_,MeshPhysicalMaterial:()=>x_,MeshStandardMaterial:()=>Jp,MeshToonMaterial:()=>C_,MinEquation:()=>tP,MirroredRepeatWrapping:()=>Ug,MixOperation:()=>p4,MultiMaterial:()=>Dce,MultiplyBlending:()=>eP,MultiplyOperation:()=>U_,NearestFilter:()=>Pi,NearestMipMapLinearFilter:()=>mne,NearestMipMapNearestFilter:()=>fne,NearestMipmapLinearFilter:()=>sw,NearestMipmapNearestFilter:()=>ow,NeverDepth:()=>s4,NeverStencilFunc:()=>Ine,NoBlending:()=>Qa,NoColors:()=>Mce,NoToneMapping:()=>cl,NormalAnimationBlendMode:()=>Jw,NormalBlending:()=>Ep,NotEqualDepth:()=>h4,NotEqualStencilFunc:()=>Rne,NumberKeyframeTrack:()=>uu,Object3D:()=>hn,ObjectLoader:()=>wP,ObjectSpaceNormalMap:()=>bH,OctahedronBufferGeometry:()=>Zp,OctahedronGeometry:()=>Zp,OneFactor:()=>KU,OneMinusDstAlphaFactor:()=>n4,OneMinusDstColorFactor:()=>r4,OneMinusSrcAlphaFactor:()=>qP,OneMinusSrcColorFactor:()=>e4,OrthographicCamera:()=>ou,PCFShadowMap:()=>jP,PCFSoftShadowMap:()=>qU,PMREMGenerator:()=>mw,ParametricGeometry:()=>rle,Particle:()=>Oce,ParticleBasicMaterial:()=>Nce,ParticleSystem:()=>Rce,ParticleSystemMaterial:()=>kce,Path:()=>du,PerspectiveCamera:()=>Di,Plane:()=>Xo,PlaneBufferGeometry:()=>Fp,PlaneGeometry:()=>Fp,PlaneHelper:()=>VP,PointCloud:()=>Pce,PointCloudMaterial:()=>Ace,PointLight:()=>N_,PointLightHelper:()=>AP,Points:()=>su,PointsMaterial:()=>ic,PolarGridHelper:()=>kP,PolyhedronBufferGeometry:()=>rc,PolyhedronGeometry:()=>rc,PositionalAudio:()=>MP,PropertyBinding:()=>qn,PropertyMixer:()=>Uw,QuadraticBezierCurve:()=>qp,QuadraticBezierCurve3:()=>Yp,Quaternion:()=>Ui,QuaternionKeyframeTrack:()=>_l,QuaternionLinearInterpolant:()=>Ew,REVISION:()=>GP,RGBADepthPacking:()=>vH,RGBAFormat:()=>sr,RGBAIntegerFormat:()=>k4,RGBA_ASTC_10x10_Format:()=>Y4,RGBA_ASTC_10x5_Format:()=>W4,RGBA_ASTC_10x6_Format:()=>$4,RGBA_ASTC_10x8_Format:()=>q4,RGBA_ASTC_12x10_Format:()=>X4,RGBA_ASTC_12x12_Format:()=>Z4,RGBA_ASTC_4x4_Format:()=>F4,RGBA_ASTC_5x4_Format:()=>B4,RGBA_ASTC_5x5_Format:()=>V4,RGBA_ASTC_6x5_Format:()=>z4,RGBA_ASTC_6x6_Format:()=>U4,RGBA_ASTC_8x5_Format:()=>H4,RGBA_ASTC_8x6_Format:()=>G4,RGBA_ASTC_8x8_Format:()=>j4,RGBA_BPTC_Format:()=>Q4,RGBA_ETC2_EAC_Format:()=>hP,RGBA_PVRTC_2BPPV1_Format:()=>dP,RGBA_PVRTC_4BPPV1_Format:()=>lP,RGBA_S3TC_DXT1_Format:()=>rP,RGBA_S3TC_DXT3_Format:()=>oP,RGBA_S3TC_DXT5_Format:()=>sP,RGBDEncoding:()=>KP,RGBEEncoding:()=>tC,RGBEFormat:()=>D4,RGBFormat:()=>Qd,RGBIntegerFormat:()=>N4,RGBM16Encoding:()=>QP,RGBM7Encoding:()=>ZP,RGB_ETC1_Format:()=>L4,RGB_ETC2_Format:()=>uP,RGB_PVRTC_2BPPV1_Format:()=>cP,RGB_PVRTC_4BPPV1_Format:()=>aP,RGB_S3TC_DXT1_Format:()=>iP,RGFormat:()=>R4,RGIntegerFormat:()=>A4,RawShaderMaterial:()=>pl,Ray:()=>ca,Raycaster:()=>TP,RectAreaLight:()=>F_,RedFormat:()=>P4,RedIntegerFormat:()=>O4,ReinhardToneMapping:()=>g4,RepeatWrapping:()=>zg,ReplaceStencilOp:()=>xne,ReverseSubtractEquation:()=>ZU,RingBufferGeometry:()=>f_,RingGeometry:()=>f_,SRGB8_ALPHA8_ASTC_10x10_Format:()=>lH,SRGB8_ALPHA8_ASTC_10x5_Format:()=>sH,SRGB8_ALPHA8_ASTC_10x6_Format:()=>aH,SRGB8_ALPHA8_ASTC_10x8_Format:()=>cH,SRGB8_ALPHA8_ASTC_12x10_Format:()=>dH,SRGB8_ALPHA8_ASTC_12x12_Format:()=>uH,SRGB8_ALPHA8_ASTC_4x4_Format:()=>K4,SRGB8_ALPHA8_ASTC_5x4_Format:()=>J4,SRGB8_ALPHA8_ASTC_5x5_Format:()=>eH,SRGB8_ALPHA8_ASTC_6x5_Format:()=>tH,SRGB8_ALPHA8_ASTC_6x6_Format:()=>nH,SRGB8_ALPHA8_ASTC_8x5_Format:()=>iH,SRGB8_ALPHA8_ASTC_8x6_Format:()=>rH,SRGB8_ALPHA8_ASTC_8x8_Format:()=>oH,Scene:()=>Up,SceneUtils:()=>nle,ShaderChunk:()=>an,ShaderLib:()=>xs,ShaderMaterial:()=>Cs,ShadowMaterial:()=>y_,Shape:()=>Zo,ShapeBufferGeometry:()=>Qp,ShapeGeometry:()=>Qp,ShapePath:()=>UP,ShapeUtils:()=>oa,ShortType:()=>x4,Skeleton:()=>vw,SkeletonHelper:()=>Yw,SkinnedMesh:()=>jp,SmoothShading:()=>pne,Sphere:()=>aa,SphereBufferGeometry:()=>Kp,SphereGeometry:()=>Kp,Spherical:()=>PP,SphericalHarmonics3:()=>B_,SplineCurve:()=>Xp,SpotLight:()=>A_,SpotLightHelper:()=>RP,Sprite:()=>Gp,SpriteMaterial:()=>Hp,SrcAlphaFactor:()=>$P,SrcAlphaSaturateFactor:()=>o4,SrcColorFactor:()=>JU,StaticCopyUsage:()=>Bne,StaticDrawUsage:()=>Pp,StaticReadUsage:()=>kne,StereoCamera:()=>CP,StreamCopyUsage:()=>zne,StreamDrawUsage:()=>Nne,StreamReadUsage:()=>Fne,StringKeyframeTrack:()=>ac,SubtractEquation:()=>XU,SubtractiveBlending:()=>JD,TOUCH:()=>dne,TangentSpaceNormalMap:()=>yu,TetrahedronBufferGeometry:()=>m_,TetrahedronGeometry:()=>m_,TextGeometry:()=>ole,Texture:()=>Wi,TextureLoader:()=>Dw,TorusBufferGeometry:()=>g_,TorusGeometry:()=>g_,TorusKnotBufferGeometry:()=>__,TorusKnotGeometry:()=>__,Triangle:()=>ar,TriangleFanDrawMode:()=>bne,TriangleStripDrawMode:()=>vne,TrianglesDrawMode:()=>mH,TubeBufferGeometry:()=>v_,TubeGeometry:()=>v_,UVMapping:()=>Kw,Uint16Attribute:()=>Hce,Uint16BufferAttribute:()=>Rp,Uint32Attribute:()=>jce,Uint32BufferAttribute:()=>Ap,Uint8Attribute:()=>Vce,Uint8BufferAttribute:()=>lw,Uint8ClampedAttribute:()=>zce,Uint8ClampedBufferAttribute:()=>dw,Uniform:()=>jw,UniformsLib:()=>Ue,UniformsUtils:()=>SH,UnsignedByteType:()=>Ja,UnsignedInt248Type:()=>Ip,UnsignedIntType:()=>Ag,UnsignedShort4444Type:()=>C4,UnsignedShort5551Type:()=>S4,UnsignedShort565Type:()=>M4,UnsignedShortType:()=>Hg,VSMShadowMap:()=>Cp,Vector2:()=>we,Vector3:()=>O,Vector4:()=>Sn,VectorKeyframeTrack:()=>hu,Vertex:()=>Lce,VertexColors:()=>Ice,VideoTexture:()=>bw,WebGL1Renderer:()=>gw,WebGLCubeRenderTarget:()=>Lp,WebGLMultipleRenderTargets:()=>aw,WebGLMultisampleRenderTarget:()=>qg,WebGLRenderTarget:()=>So,WebGLRenderTargetCube:()=>Jce,WebGLRenderer:()=>kn,WebGLUtils:()=>LH,WireframeGeometry:()=>b_,WireframeHelper:()=>Zce,WrapAroundEnding:()=>Wg,XHRLoader:()=>Qce,ZeroCurvatureEnding:()=>Yd,ZeroFactor:()=>QU,ZeroSlopeEnding:()=>Xd,ZeroStencilOp:()=>yne,sRGBEncoding:()=>bl});var GP="134",lne={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},dne={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},WU=0,QD=1,$U=2,une=3,hne=0,jP=1,qU=2,Cp=3,eu=0,Ci=1,tu=2,WP=1,pne=2,Qa=0,Ep=1,KD=2,JD=3,eP=4,YU=5,qd=100,XU=101,ZU=102,tP=103,nP=104,QU=200,KU=201,JU=202,e4=203,$P=204,qP=205,t4=206,n4=207,i4=208,r4=209,o4=210,s4=0,a4=1,c4=2,rw=3,l4=4,d4=5,u4=6,h4=7,U_=0,p4=1,f4=2,cl=0,m4=1,g4=2,_4=3,v4=4,b4=5,Kw=300,_u=301,vu=302,Bg=303,Vg=304,tf=306,H_=307,zg=1e3,or=1001,Ug=1002,Pi=1003,ow=1004,fne=1004,sw=1005,mne=1005,zi=1006,YP=1007,gne=1007,bu=1008,_ne=1008,Ja=1009,y4=1010,x4=1011,Hg=1012,w4=1013,Ag=1014,ra=1015,Zd=1016,C4=1017,S4=1018,M4=1019,Ip=1020,E4=1021,Qd=1022,sr=1023,I4=1024,T4=1025,D4=sr,Kd=1026,Dp=1027,P4=1028,O4=1029,R4=1030,A4=1031,N4=1032,k4=1033,iP=33776,rP=33777,oP=33778,sP=33779,aP=35840,cP=35841,lP=35842,dP=35843,L4=36196,uP=37492,hP=37496,F4=37808,B4=37809,V4=37810,z4=37811,U4=37812,H4=37813,G4=37814,j4=37815,W4=37816,$4=37817,q4=37818,Y4=37819,X4=37820,Z4=37821,Q4=36492,K4=37840,J4=37841,eH=37842,tH=37843,nH=37844,iH=37845,rH=37846,oH=37847,sH=37848,aH=37849,cH=37850,lH=37851,dH=37852,uH=37853,hH=2200,pH=2201,fH=2202,Gg=2300,jg=2301,nw=2302,Yd=2400,Xd=2401,Wg=2402,Jw=2500,XP=2501,mH=0,vne=1,bne=2,cr=3e3,bl=3001,eC=3007,tC=3002,gH=3003,ZP=3004,QP=3005,KP=3006,_H=3200,vH=3201,yu=0,bH=1,yne=0,iw=7680,xne=7681,wne=7682,Cne=7683,Sne=34055,Mne=34056,Ene=5386,Ine=512,Tne=513,Dne=514,Pne=515,One=516,Rne=517,Ane=518,yH=519,Pp=35044,Op=35048,Nne=35040,kne=35045,Lne=35049,Fne=35041,Bne=35046,Vne=35050,zne=35042,Une="100",pP="300 es",sa=class{addEventListener(e,t){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[e]===void 0&&(n[e]=[]),n[e].indexOf(t)===-1&&n[e].push(t)}hasEventListener(e,t){if(this._listeners===void 0)return!1;let n=this._listeners;return n[e]!==void 0&&n[e].indexOf(t)!==-1}removeEventListener(e,t){if(this._listeners===void 0)return;let r=this._listeners[e];if(r!==void 0){let o=r.indexOf(t);o!==-1&&r.splice(o,1)}}dispatchEvent(e){if(this._listeners===void 0)return;let n=this._listeners[e.type];if(n!==void 0){e.target=this;let r=n.slice(0);for(let o=0,s=r.length;o>8&255]+ir[i>>16&255]+ir[i>>24&255]+"-"+ir[e&255]+ir[e>>8&255]+"-"+ir[e>>16&15|64]+ir[e>>24&255]+"-"+ir[t&63|128]+ir[t>>8&255]+"-"+ir[t>>16&255]+ir[t>>24&255]+ir[n&255]+ir[n>>8&255]+ir[n>>16&255]+ir[n>>24&255]).toUpperCase()}function rr(i,e,t){return Math.max(e,Math.min(t,i))}function JP(i,e){return(i%e+e)%e}function Gne(i,e,t,n,r){return n+(i-e)*(r-n)/(t-e)}function jne(i,e,t){return i!==e?(t-i)/(e-i):0}function Ng(i,e,t){return(1-t)*i+t*e}function Wne(i,e,t,n){return Ng(i,e,1-Math.exp(-t*n))}function $ne(i,e=1){return e-Math.abs(JP(i,e*2)-e)}function qne(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*(3-2*i))}function Yne(i,e,t){return i<=e?0:i>=t?1:(i=(i-e)/(t-e),i*i*i*(i*(i*6-15)+10))}function Xne(i,e){return i+Math.floor(Math.random()*(e-i+1))}function Zne(i,e){return i+Math.random()*(e-i)}function Qne(i){return i*(.5-Math.random())}function Kne(i){return i!==void 0&&(mx=i%2147483647),mx=mx*16807%2147483647,(mx-1)/2147483646}function Jne(i){return i*Jd}function eie(i){return i*$g}function fP(i){return(i&i-1)===0&&i!==0}function xH(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function wH(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function tie(i,e,t,n,r){let o=Math.cos,s=Math.sin,a=o(t/2),c=s(t/2),l=o((e+n)/2),d=s((e+n)/2),u=o((e-n)/2),h=s((e-n)/2),p=o((n-e)/2),f=s((n-e)/2);switch(r){case"XYX":i.set(a*d,c*u,c*h,a*l);break;case"YZY":i.set(c*h,a*d,c*u,a*l);break;case"ZXZ":i.set(c*u,c*h,a*d,a*l);break;case"XZX":i.set(a*d,c*f,c*p,a*l);break;case"YXY":i.set(c*p,a*d,c*f,a*l);break;case"ZYZ":i.set(c*f,c*p,a*d,a*l);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}var nie=Object.freeze({__proto__:null,DEG2RAD:Jd,RAD2DEG:$g,generateUUID:Co,clamp:rr,euclideanModulo:JP,mapLinear:Gne,inverseLerp:jne,lerp:Ng,damp:Wne,pingpong:$ne,smoothstep:qne,smootherstep:Yne,randInt:Xne,randFloat:Zne,randFloatSpread:Qne,seededRandom:Kne,degToRad:Jne,radToDeg:eie,isPowerOfTwo:fP,ceilPowerOfTwo:xH,floorPowerOfTwo:wH,setQuaternionFromProperEuler:tie}),we=class{constructor(e=0,t=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,t){return t!==void 0?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(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,t){return t!==void 0?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(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,n=this.y,r=e.elements;return this.x=r[0]*t+r[3]*n+r[6],this.y=r[1]*t+r[4]*n+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=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(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}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y;return t*t+n*n}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,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,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,n){return n!==void 0&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=e.getX(t),this.y=e.getY(t),this}rotateAround(e,t){let n=Math.cos(t),r=Math.sin(t),o=this.x-e.x,s=this.y-e.y;return this.x=o*n-s*r+e.x,this.y=o*r+s*n+e.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};we.prototype.isVector2=!0;var Si=class{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,r,o,s,a,c,l){let d=this.elements;return d[0]=e,d[1]=r,d[2]=a,d[3]=t,d[4]=o,d[5]=c,d[6]=n,d[7]=s,d[8]=l,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],this}extractBasis(e,t,n){return e.setFromMatrix3Column(this,0),t.setFromMatrix3Column(this,1),n.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 n=e.elements,r=t.elements,o=this.elements,s=n[0],a=n[3],c=n[6],l=n[1],d=n[4],u=n[7],h=n[2],p=n[5],f=n[8],m=r[0],y=r[3],g=r[6],_=r[1],x=r[4],C=r[7],T=r[2],D=r[5],E=r[8];return o[0]=s*m+a*_+c*T,o[3]=s*y+a*x+c*D,o[6]=s*g+a*C+c*E,o[1]=l*m+d*_+u*T,o[4]=l*y+d*x+u*D,o[7]=l*g+d*C+u*E,o[2]=h*m+p*_+f*T,o[5]=h*y+p*x+f*D,o[8]=h*g+p*C+f*E,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],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],c=e[6],l=e[7],d=e[8];return t*s*d-t*a*l-n*o*d+n*a*c+r*o*l-r*s*c}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],c=e[6],l=e[7],d=e[8],u=d*s-a*l,h=a*c-d*o,p=l*o-s*c,f=t*u+n*h+r*p;if(f===0)return this.set(0,0,0,0,0,0,0,0,0);let m=1/f;return e[0]=u*m,e[1]=(r*l-d*n)*m,e[2]=(a*n-r*s)*m,e[3]=h*m,e[4]=(d*t-r*c)*m,e[5]=(r*o-a*t)*m,e[6]=p*m,e[7]=(n*c-l*t)*m,e[8]=(s*t-n*o)*m,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,n,r,o,s,a){let c=Math.cos(o),l=Math.sin(o);return this.set(n*c,n*l,-n*(c*s+l*a)+s+e,-r*l,r*c,-r*(-l*s+c*a)+a+t,0,0,1),this}scale(e,t){let n=this.elements;return n[0]*=e,n[3]*=e,n[6]*=e,n[1]*=t,n[4]*=t,n[7]*=t,this}rotate(e){let t=Math.cos(e),n=Math.sin(e),r=this.elements,o=r[0],s=r[3],a=r[6],c=r[1],l=r[4],d=r[7];return r[0]=t*o+n*c,r[3]=t*s+n*l,r[6]=t*a+n*d,r[1]=-n*o+t*c,r[4]=-n*s+t*l,r[7]=-n*a+t*d,this}translate(e,t){let n=this.elements;return n[0]+=e*n[2],n[3]+=e*n[5],n[6]+=e*n[8],n[1]+=t*n[2],n[4]+=t*n[5],n[7]+=t*n[8],this}equals(e){let t=this.elements,n=e.elements;for(let r=0;r<9;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<9;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e}clone(){return new this.constructor().fromArray(this.elements)}};Si.prototype.isMatrix3=!0;function CH(i){if(i.length===0)return-1/0;let e=i[0];for(let t=1,n=i.length;te&&(e=i[t]);return e}var iie={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Sp(i,e){return new iie[i](e)}function nC(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function xz(i,e=0){let t=3735928559^e,n=1103547991^e;for(let r=0,o;r>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(t^t>>>13,3266489909),4294967296*(2097151&n)+(t>>>0)}var rp,ec=class{static getDataURL(e){if(/^data:/i.test(e.src)||typeof HTMLCanvasElement>"u")return e.src;let t;if(e instanceof HTMLCanvasElement)t=e;else{rp===void 0&&(rp=nC("canvas")),rp.width=e.width,rp.height=e.height;let n=rp.getContext("2d");e instanceof ImageData?n.putImageData(e,0,0):n.drawImage(e,0,0,e.width,e.height),t=rp}return t.width>2048||t.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",e),t.toDataURL("image/jpeg",.6)):t.toDataURL("image/png")}},rie=0,Wi=class i extends sa{constructor(e=i.DEFAULT_IMAGE,t=i.DEFAULT_MAPPING,n=or,r=or,o=zi,s=bu,a=sr,c=Ja,l=1,d=cr){super(),Object.defineProperty(this,"id",{value:rie++}),this.uuid=Co(),this.name="",this.image=e,this.mipmaps=[],this.mapping=t,this.wrapS=n,this.wrapT=r,this.magFilter=o,this.minFilter=s,this.anisotropy=l,this.format=a,this.internalFormat=null,this.type=c,this.offset=new we(0,0),this.repeat=new we(1,1),this.center=new we(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Si,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=d,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(e){return this.name=e.name,this.image=e.image,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.wrapS=e.wrapS,this.wrapT=e.wrapT,this.magFilter=e.magFilter,this.minFilter=e.minFilter,this.anisotropy=e.anisotropy,this.format=e.format,this.internalFormat=e.internalFormat,this.type=e.type,this.offset.copy(e.offset),this.repeat.copy(e.repeat),this.center.copy(e.center),this.rotation=e.rotation,this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrix.copy(e.matrix),this.generateMipmaps=e.generateMipmaps,this.premultiplyAlpha=e.premultiplyAlpha,this.flipY=e.flipY,this.unpackAlignment=e.unpackAlignment,this.encoding=e.encoding,this.userData=JSON.parse(JSON.stringify(e.userData)),this}toJSON(e){let t=e===void 0||typeof e=="string";if(!t&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];let n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,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,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(this.image!==void 0){let r=this.image;if(r.uuid===void 0&&(r.uuid=Co()),!t&&e.images[r.uuid]===void 0){let o;if(Array.isArray(r)){o=[];for(let s=0,a=r.length;s1)switch(this.wrapS){case zg:e.x=e.x-Math.floor(e.x);break;case or:e.x=e.x<0?0:1;break;case Ug:Math.abs(Math.floor(e.x)%2)===1?e.x=Math.ceil(e.x)-e.x:e.x=e.x-Math.floor(e.x);break}if(e.y<0||e.y>1)switch(this.wrapT){case zg:e.y=e.y-Math.floor(e.y);break;case or:e.y=e.y<0?0:1;break;case Ug:Math.abs(Math.floor(e.y)%2)===1?e.y=Math.ceil(e.y)-e.y:e.y=e.y-Math.floor(e.y);break}return this.flipY&&(e.y=1-e.y),e}set needsUpdate(e){e===!0&&this.version++}};Wi.DEFAULT_IMAGE=void 0;Wi.DEFAULT_MAPPING=Kw;Wi.prototype.isTexture=!0;function gD(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?ec.getDataURL(i):i.data?{data:Array.prototype.slice.call(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}var Sn=class{constructor(e=0,t=0,n=0,r=1){this.x=e,this.y=t,this.z=n,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,n,r){return this.x=e,this.y=t,this.z=n,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,t){return t!==void 0?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(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,t){return t!==void 0?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(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,n=this.y,r=this.z,o=this.w,s=e.elements;return this.x=s[0]*t+s[4]*n+s[8]*r+s[12]*o,this.y=s[1]*t+s[5]*n+s[9]*r+s[13]*o,this.z=s[2]*t+s[6]*n+s[10]*r+s[14]*o,this.w=s[3]*t+s[7]*n+s[11]*r+s[15]*o,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,n,r,o,c=e.elements,l=c[0],d=c[4],u=c[8],h=c[1],p=c[5],f=c[9],m=c[2],y=c[6],g=c[10];if(Math.abs(d-h)<.01&&Math.abs(u-m)<.01&&Math.abs(f-y)<.01){if(Math.abs(d+h)<.1&&Math.abs(u+m)<.1&&Math.abs(f+y)<.1&&Math.abs(l+p+g-3)<.1)return this.set(1,0,0,0),this;t=Math.PI;let x=(l+1)/2,C=(p+1)/2,T=(g+1)/2,D=(d+h)/4,E=(u+m)/4,A=(f+y)/4;return x>C&&x>T?x<.01?(n=0,r=.707106781,o=.707106781):(n=Math.sqrt(x),r=D/n,o=E/n):C>T?C<.01?(n=.707106781,r=0,o=.707106781):(r=Math.sqrt(C),n=D/r,o=A/r):T<.01?(n=.707106781,r=.707106781,o=0):(o=Math.sqrt(T),n=E/o,r=A/o),this.set(n,r,o,t),this}let _=Math.sqrt((y-f)*(y-f)+(u-m)*(u-m)+(h-d)*(h-d));return Math.abs(_)<.001&&(_=1),this.x=(y-f)/_,this.y=(u-m)/_,this.z=(h-d)/_,this.w=Math.acos((l+p+g-1)/2),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=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this.w=Math.max(e.w,Math.min(t.w,this.w)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this.w=Math.max(e,Math.min(t,this.w)),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(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,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this.w=e.w+(t.w-e.w)*n,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,n){return n!==void 0&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),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}};Sn.prototype.isVector4=!0;var So=class extends sa{constructor(e,t,n={}){super(),this.width=e,this.height=t,this.depth=1,this.scissor=new Sn(0,0,e,t),this.scissorTest=!1,this.viewport=new Sn(0,0,e,t),this.texture=new Wi(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.image={width:e,height:t,depth:1},this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.internalFormat=n.internalFormat!==void 0?n.internalFormat:null,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:zi,this.depthBuffer=n.depthBuffer!==void 0?n.depthBuffer:!0,this.stencilBuffer=n.stencilBuffer!==void 0?n.stencilBuffer:!1,this.depthTexture=n.depthTexture!==void 0?n.depthTexture:null}setTexture(e){e.image={width:this.width,height:this.height,depth:this.depth},this.texture=e}setSize(e,t,n=1){(this.width!==e||this.height!==t||this.depth!==n)&&(this.width=e,this.height=t,this.depth=n,this.texture.image.width=e,this.texture.image.height=t,this.texture.image.depth=n,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){return this.width=e.width,this.height=e.height,this.depth=e.depth,this.viewport.copy(e.viewport),this.texture=e.texture.clone(),this.texture.image=Z({},this.texture.image),this.depthBuffer=e.depthBuffer,this.stencilBuffer=e.stencilBuffer,this.depthTexture=e.depthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}};So.prototype.isWebGLRenderTarget=!0;var aw=class extends So{constructor(e,t,n){super(e,t);let r=this.texture;this.texture=[];for(let o=0;o=0?1:-1,x=1-g*g;if(x>Number.EPSILON){let T=Math.sqrt(x),D=Math.atan2(T,g*_);y=Math.sin(y*D)/T,a=Math.sin(a*D)/T}let C=a*_;if(c=c*y+h*C,l=l*y+p*C,d=d*y+f*C,u=u*y+m*C,y===1-a){let T=1/Math.sqrt(c*c+l*l+d*d+u*u);c*=T,l*=T,d*=T,u*=T}}e[t]=c,e[t+1]=l,e[t+2]=d,e[t+3]=u}static multiplyQuaternionsFlat(e,t,n,r,o,s){let a=n[r],c=n[r+1],l=n[r+2],d=n[r+3],u=o[s],h=o[s+1],p=o[s+2],f=o[s+3];return e[t]=a*f+d*u+c*p-l*h,e[t+1]=c*f+d*h+l*u-a*p,e[t+2]=l*f+d*p+a*h-c*u,e[t+3]=d*f-a*u-c*h-l*p,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,n,r){return this._x=e,this._y=t,this._z=n,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){if(!(e&&e.isEuler))throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");let n=e._x,r=e._y,o=e._z,s=e._order,a=Math.cos,c=Math.sin,l=a(n/2),d=a(r/2),u=a(o/2),h=c(n/2),p=c(r/2),f=c(o/2);switch(s){case"XYZ":this._x=h*d*u+l*p*f,this._y=l*p*u-h*d*f,this._z=l*d*f+h*p*u,this._w=l*d*u-h*p*f;break;case"YXZ":this._x=h*d*u+l*p*f,this._y=l*p*u-h*d*f,this._z=l*d*f-h*p*u,this._w=l*d*u+h*p*f;break;case"ZXY":this._x=h*d*u-l*p*f,this._y=l*p*u+h*d*f,this._z=l*d*f+h*p*u,this._w=l*d*u-h*p*f;break;case"ZYX":this._x=h*d*u-l*p*f,this._y=l*p*u+h*d*f,this._z=l*d*f-h*p*u,this._w=l*d*u+h*p*f;break;case"YZX":this._x=h*d*u+l*p*f,this._y=l*p*u+h*d*f,this._z=l*d*f-h*p*u,this._w=l*d*u-h*p*f;break;case"XZY":this._x=h*d*u-l*p*f,this._y=l*p*u-h*d*f,this._z=l*d*f+h*p*u,this._w=l*d*u+h*p*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return t!==!1&&this._onChangeCallback(),this}setFromAxisAngle(e,t){let n=t/2,r=Math.sin(n);return this._x=e.x*r,this._y=e.y*r,this._z=e.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(e){let t=e.elements,n=t[0],r=t[4],o=t[8],s=t[1],a=t[5],c=t[9],l=t[2],d=t[6],u=t[10],h=n+a+u;if(h>0){let p=.5/Math.sqrt(h+1);this._w=.25/p,this._x=(d-c)*p,this._y=(o-l)*p,this._z=(s-r)*p}else if(n>a&&n>u){let p=2*Math.sqrt(1+n-a-u);this._w=(d-c)/p,this._x=.25*p,this._y=(r+s)/p,this._z=(o+l)/p}else if(a>u){let p=2*Math.sqrt(1+a-n-u);this._w=(o-l)/p,this._x=(r+s)/p,this._y=.25*p,this._z=(c+d)/p}else{let p=2*Math.sqrt(1+u-n-a);this._w=(s-r)/p,this._x=(o+l)/p,this._y=(c+d)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(e,t){let n=e.dot(t)+1;return nMath.abs(e.z)?(this._x=-e.y,this._y=e.x,this._z=0,this._w=n):(this._x=0,this._y=-e.z,this._z=e.y,this._w=n)):(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=n),this.normalize()}angleTo(e){return 2*Math.acos(Math.abs(rr(this.dot(e),-1,1)))}rotateTowards(e,t){let n=this.angleTo(e);if(n===0)return this;let r=Math.min(1,t/n);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,t){return t!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(e,t)):this.multiplyQuaternions(this,e)}premultiply(e){return this.multiplyQuaternions(e,this)}multiplyQuaternions(e,t){let n=e._x,r=e._y,o=e._z,s=e._w,a=t._x,c=t._y,l=t._z,d=t._w;return this._x=n*d+s*a+r*l-o*c,this._y=r*d+s*c+o*a-n*l,this._z=o*d+s*l+n*c-r*a,this._w=s*d-n*a-r*c-o*l,this._onChangeCallback(),this}slerp(e,t){if(t===0)return this;if(t===1)return this.copy(e);let n=this._x,r=this._y,o=this._z,s=this._w,a=s*e._w+n*e._x+r*e._y+o*e._z;if(a<0?(this._w=-e._w,this._x=-e._x,this._y=-e._y,this._z=-e._z,a=-a):this.copy(e),a>=1)return this._w=s,this._x=n,this._y=r,this._z=o,this;let c=1-a*a;if(c<=Number.EPSILON){let p=1-t;return this._w=p*s+t*this._w,this._x=p*n+t*this._x,this._y=p*r+t*this._y,this._z=p*o+t*this._z,this.normalize(),this._onChangeCallback(),this}let l=Math.sqrt(c),d=Math.atan2(l,a),u=Math.sin((1-t)*d)/l,h=Math.sin(t*d)/l;return this._w=s*u+this._w*h,this._x=n*u+this._x*h,this._y=r*u+this._y*h,this._z=o*u+this._z*h,this._onChangeCallback(),this}slerpQuaternions(e,t,n){this.copy(e).slerp(t,n)}random(){let e=Math.random(),t=Math.sqrt(1-e),n=Math.sqrt(e),r=2*Math.PI*Math.random(),o=2*Math.PI*Math.random();return this.set(t*Math.cos(r),n*Math.sin(o),n*Math.cos(o),t*Math.sin(r))}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}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}};Ui.prototype.isQuaternion=!0;var O=class{constructor(e=0,t=0,n=0){this.x=e,this.y=t,this.z=n}set(e,t,n){return n===void 0&&(n=this.z),this.x=e,this.y=t,this.z=n,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,t){return t!==void 0?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(e,t)):(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,t){return t!==void 0?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(e,t)):(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,t){return t!==void 0?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(e,t)):(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 e&&e.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion(wz.setFromEuler(e))}applyAxisAngle(e,t){return this.applyQuaternion(wz.setFromAxisAngle(e,t))}applyMatrix3(e){let t=this.x,n=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[3]*n+o[6]*r,this.y=o[1]*t+o[4]*n+o[7]*r,this.z=o[2]*t+o[5]*n+o[8]*r,this}applyNormalMatrix(e){return this.applyMatrix3(e).normalize()}applyMatrix4(e){let t=this.x,n=this.y,r=this.z,o=e.elements,s=1/(o[3]*t+o[7]*n+o[11]*r+o[15]);return this.x=(o[0]*t+o[4]*n+o[8]*r+o[12])*s,this.y=(o[1]*t+o[5]*n+o[9]*r+o[13])*s,this.z=(o[2]*t+o[6]*n+o[10]*r+o[14])*s,this}applyQuaternion(e){let t=this.x,n=this.y,r=this.z,o=e.x,s=e.y,a=e.z,c=e.w,l=c*t+s*r-a*n,d=c*n+a*t-o*r,u=c*r+o*n-s*t,h=-o*t-s*n-a*r;return this.x=l*c+h*-o+d*-a-u*-s,this.y=d*c+h*-s+u*-o-l*-a,this.z=u*c+h*-a+l*-s-d*-o,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,n=this.y,r=this.z,o=e.elements;return this.x=o[0]*t+o[4]*n+o[8]*r,this.y=o[1]*t+o[5]*n+o[9]*r,this.z=o[2]*t+o[6]*n+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=Math.max(e.x,Math.min(t.x,this.x)),this.y=Math.max(e.y,Math.min(t.y,this.y)),this.z=Math.max(e.z,Math.min(t.z,this.z)),this}clampScalar(e,t){return this.x=Math.max(e,Math.min(t,this.x)),this.y=Math.max(e,Math.min(t,this.y)),this.z=Math.max(e,Math.min(t,this.z)),this}clampLength(e,t){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(e,Math.min(t,n)))}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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(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,n){return this.x=e.x+(t.x-e.x)*n,this.y=e.y+(t.y-e.y)*n,this.z=e.z+(t.z-e.z)*n,this}cross(e,t){return t!==void 0?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(e,t)):this.crossVectors(this,e)}crossVectors(e,t){let n=e.x,r=e.y,o=e.z,s=t.x,a=t.y,c=t.z;return this.x=r*c-o*a,this.y=o*s-n*c,this.z=n*a-r*s,this}projectOnVector(e){let t=e.lengthSq();if(t===0)return this.set(0,0,0);let n=e.dot(this)/t;return this.copy(e).multiplyScalar(n)}projectOnPlane(e){return _D.copy(this).projectOnVector(e),this.sub(_D)}reflect(e){return this.sub(_D.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 n=this.dot(e)/t;return Math.acos(rr(n,-1,1))}distanceTo(e){return Math.sqrt(this.distanceToSquared(e))}distanceToSquared(e){let t=this.x-e.x,n=this.y-e.y,r=this.z-e.z;return t*t+n*n+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,n){let r=Math.sin(t)*e;return this.x=r*Math.sin(n),this.y=Math.cos(t)*e,this.z=r*Math.cos(n),this}setFromCylindrical(e){return this.setFromCylindricalCoords(e.radius,e.theta,e.y)}setFromCylindricalCoords(e,t,n){return this.x=e*Math.sin(t),this.y=n,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(),n=this.setFromMatrixColumn(e,1).length(),r=this.setFromMatrixColumn(e,2).length();return this.x=t,this.y=n,this.z=r,this}setFromMatrixColumn(e,t){return this.fromArray(e.elements,t*4)}setFromMatrix3Column(e,t){return this.fromArray(e.elements,t*3)}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,n){return n!==void 0&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),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()-.5)*2,t=Math.random()*Math.PI*2,n=Math.sqrt(1-e**2);return this.x=n*Math.cos(t),this.y=n*Math.sin(t),this.z=e,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};O.prototype.isVector3=!0;var _D=new O,wz=new Ui,qr=class{constructor(e=new O(1/0,1/0,1/0),t=new O(-1/0,-1/0,-1/0)){this.min=e,this.max=t}set(e,t){return this.min.copy(e),this.max.copy(t),this}setFromArray(e){let t=1/0,n=1/0,r=1/0,o=-1/0,s=-1/0,a=-1/0;for(let c=0,l=e.length;co&&(o=d),u>s&&(s=u),h>a&&(a=h)}return this.min.set(t,n,r),this.max.set(o,s,a),this}setFromBufferAttribute(e){let t=1/0,n=1/0,r=1/0,o=-1/0,s=-1/0,a=-1/0;for(let c=0,l=e.count;co&&(o=d),u>s&&(s=u),h>a&&(a=h)}return this.min.set(t,n,r),this.max.set(o,s,a),this}setFromPoints(e){this.makeEmpty();for(let t=0,n=e.length;tthis.max.x||e.ythis.max.y||e.zthis.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.xthis.max.x||e.max.ythis.max.y||e.max.zthis.max.z)}intersectsSphere(e){return this.clampPoint(e.center,wg),wg.distanceToSquared(e.center)<=e.radius*e.radius}intersectsPlane(e){let t,n;return e.normal.x>0?(t=e.normal.x*this.min.x,n=e.normal.x*this.max.x):(t=e.normal.x*this.max.x,n=e.normal.x*this.min.x),e.normal.y>0?(t+=e.normal.y*this.min.y,n+=e.normal.y*this.max.y):(t+=e.normal.y*this.max.y,n+=e.normal.y*this.min.y),e.normal.z>0?(t+=e.normal.z*this.min.z,n+=e.normal.z*this.max.z):(t+=e.normal.z*this.max.z,n+=e.normal.z*this.min.z),t<=-e.constant&&n>=-e.constant}intersectsTriangle(e){if(this.isEmpty())return!1;this.getCenter(Cg),gx.subVectors(this.max,Cg),op.subVectors(e.a,Cg),sp.subVectors(e.b,Cg),ap.subVectors(e.c,Cg),el.subVectors(sp,op),tl.subVectors(ap,sp),Vd.subVectors(op,ap);let t=[0,-el.z,el.y,0,-tl.z,tl.y,0,-Vd.z,Vd.y,el.z,0,-el.x,tl.z,0,-tl.x,Vd.z,0,-Vd.x,-el.y,el.x,0,-tl.y,tl.x,0,-Vd.y,Vd.x,0];return!bD(t,op,sp,ap,gx)||(t=[1,0,0,0,1,0,0,0,1],!bD(t,op,sp,ap,gx))?!1:(_x.crossVectors(el,tl),t=[_x.x,_x.y,_x.z],bD(t,op,sp,ap,gx))}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return wg.copy(e).clamp(this.min,this.max).sub(e).length()}getBoundingSphere(e){return this.getCenter(e.center),e.radius=this.getSize(wg).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:(ja[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(e),ja[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(e),ja[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(e),ja[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(e),ja[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(e),ja[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(e),ja[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(e),ja[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(e),this.setFromPoints(ja),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)}};qr.prototype.isBox3=!0;var ja=[new O,new O,new O,new O,new O,new O,new O,new O],wg=new O,vD=new qr,op=new O,sp=new O,ap=new O,el=new O,tl=new O,Vd=new O,Cg=new O,gx=new O,_x=new O,zd=new O;function bD(i,e,t,n,r){for(let o=0,s=i.length-3;o<=s;o+=3){zd.fromArray(i,o);let a=r.x*Math.abs(zd.x)+r.y*Math.abs(zd.y)+r.z*Math.abs(zd.z),c=e.dot(zd),l=t.dot(zd),d=n.dot(zd);if(Math.max(-Math.max(c,l,d),Math.min(c,l,d))>a)return!1}return!0}var oie=new qr,Cz=new O,yD=new O,xD=new O,aa=class{constructor(e=new O,t=-1){this.center=e,this.radius=t}set(e,t){return this.center.copy(e),this.radius=t,this}setFromPoints(e,t){let n=this.center;t!==void 0?n.copy(t):oie.setFromPoints(e).getCenter(n);let r=0;for(let o=0,s=e.length;othis.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){xD.subVectors(e,this.center);let t=xD.lengthSq();if(t>this.radius*this.radius){let n=Math.sqrt(t),r=(n-this.radius)*.5;this.center.add(xD.multiplyScalar(r/n)),this.radius+=r}return this}union(e){return yD.subVectors(e.center,this.center).normalize().multiplyScalar(e.radius),this.expandByPoint(Cz.copy(e.center).add(yD)),this.expandByPoint(Cz.copy(e.center).sub(yD)),this}equals(e){return e.center.equals(this.center)&&e.radius===this.radius}clone(){return new this.constructor().copy(this)}},Wa=new O,wD=new O,vx=new O,nl=new O,CD=new O,bx=new O,SD=new O,ca=class{constructor(e=new O,t=new O(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.direction).multiplyScalar(e).add(this.origin)}lookAt(e){return this.direction.copy(e).sub(this.origin).normalize(),this}recast(e){return this.origin.copy(this.at(e,Wa)),this}closestPointToPoint(e,t){t.subVectors(e,this.origin);let n=t.dot(this.direction);return n<0?t.copy(this.origin):t.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(e){return Math.sqrt(this.distanceSqToPoint(e))}distanceSqToPoint(e){let t=Wa.subVectors(e,this.origin).dot(this.direction);return t<0?this.origin.distanceToSquared(e):(Wa.copy(this.direction).multiplyScalar(t).add(this.origin),Wa.distanceToSquared(e))}distanceSqToSegment(e,t,n,r){wD.copy(e).add(t).multiplyScalar(.5),vx.copy(t).sub(e).normalize(),nl.copy(this.origin).sub(wD);let o=e.distanceTo(t)*.5,s=-this.direction.dot(vx),a=nl.dot(this.direction),c=-nl.dot(vx),l=nl.lengthSq(),d=Math.abs(1-s*s),u,h,p,f;if(d>0)if(u=s*c-a,h=s*a-c,f=o*d,u>=0)if(h>=-f)if(h<=f){let m=1/d;u*=m,h*=m,p=u*(u+s*h+2*a)+h*(s*u+h+2*c)+l}else h=o,u=Math.max(0,-(s*h+a)),p=-u*u+h*(h+2*c)+l;else h=-o,u=Math.max(0,-(s*h+a)),p=-u*u+h*(h+2*c)+l;else h<=-f?(u=Math.max(0,-(-s*o+a)),h=u>0?-o:Math.min(Math.max(-o,-c),o),p=-u*u+h*(h+2*c)+l):h<=f?(u=0,h=Math.min(Math.max(-o,-c),o),p=h*(h+2*c)+l):(u=Math.max(0,-(s*o+a)),h=u>0?o:Math.min(Math.max(-o,-c),o),p=-u*u+h*(h+2*c)+l);else h=s>0?-o:o,u=Math.max(0,-(s*h+a)),p=-u*u+h*(h+2*c)+l;return n&&n.copy(this.direction).multiplyScalar(u).add(this.origin),r&&r.copy(vx).multiplyScalar(h).add(wD),p}intersectSphere(e,t){Wa.subVectors(e.center,this.origin);let n=Wa.dot(this.direction),r=Wa.dot(Wa)-n*n,o=e.radius*e.radius;if(r>o)return null;let s=Math.sqrt(o-r),a=n-s,c=n+s;return a<0&&c<0?null:a<0?this.at(c,t):this.at(a,t)}intersectsSphere(e){return 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 n=-(this.origin.dot(e.normal)+e.constant)/t;return n>=0?n:null}intersectPlane(e,t){let n=this.distanceToPlane(e);return n===null?null:this.at(n,t)}intersectsPlane(e){let t=e.distanceToPoint(this.origin);return t===0||e.normal.dot(this.direction)*t<0}intersectBox(e,t){let n,r,o,s,a,c,l=1/this.direction.x,d=1/this.direction.y,u=1/this.direction.z,h=this.origin;return l>=0?(n=(e.min.x-h.x)*l,r=(e.max.x-h.x)*l):(n=(e.max.x-h.x)*l,r=(e.min.x-h.x)*l),d>=0?(o=(e.min.y-h.y)*d,s=(e.max.y-h.y)*d):(o=(e.max.y-h.y)*d,s=(e.min.y-h.y)*d),n>s||o>r||((o>n||n!==n)&&(n=o),(s=0?(a=(e.min.z-h.z)*u,c=(e.max.z-h.z)*u):(a=(e.max.z-h.z)*u,c=(e.min.z-h.z)*u),n>c||a>r)||((a>n||n!==n)&&(n=a),(c=0?n:r,t)}intersectsBox(e){return this.intersectBox(e,Wa)!==null}intersectTriangle(e,t,n,r,o){CD.subVectors(t,e),bx.subVectors(n,e),SD.crossVectors(CD,bx);let s=this.direction.dot(SD),a;if(s>0){if(r)return null;a=1}else if(s<0)a=-1,s=-s;else return null;nl.subVectors(this.origin,e);let c=a*this.direction.dot(bx.crossVectors(nl,bx));if(c<0)return null;let l=a*this.direction.dot(CD.cross(nl));if(l<0||c+l>s)return null;let d=-a*nl.dot(SD);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)}},dt=class i{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(e,t,n,r,o,s,a,c,l,d,u,h,p,f,m,y){let g=this.elements;return g[0]=e,g[4]=t,g[8]=n,g[12]=r,g[1]=o,g[5]=s,g[9]=a,g[13]=c,g[2]=l,g[6]=d,g[10]=u,g[14]=h,g[3]=p,g[7]=f,g[11]=m,g[15]=y,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 i().fromArray(this.elements)}copy(e){let t=this.elements,n=e.elements;return t[0]=n[0],t[1]=n[1],t[2]=n[2],t[3]=n[3],t[4]=n[4],t[5]=n[5],t[6]=n[6],t[7]=n[7],t[8]=n[8],t[9]=n[9],t[10]=n[10],t[11]=n[11],t[12]=n[12],t[13]=n[13],t[14]=n[14],t[15]=n[15],this}copyPosition(e){let t=this.elements,n=e.elements;return t[12]=n[12],t[13]=n[13],t[14]=n[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,n){return e.setFromMatrixColumn(this,0),t.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(e,t,n){return this.set(e.x,t.x,n.x,0,e.y,t.y,n.y,0,e.z,t.z,n.z,0,0,0,0,1),this}extractRotation(e){let t=this.elements,n=e.elements,r=1/cp.setFromMatrixColumn(e,0).length(),o=1/cp.setFromMatrixColumn(e,1).length(),s=1/cp.setFromMatrixColumn(e,2).length();return t[0]=n[0]*r,t[1]=n[1]*r,t[2]=n[2]*r,t[3]=0,t[4]=n[4]*o,t[5]=n[5]*o,t[6]=n[6]*o,t[7]=0,t[8]=n[8]*s,t[9]=n[9]*s,t[10]=n[10]*s,t[11]=0,t[12]=0,t[13]=0,t[14]=0,t[15]=1,this}makeRotationFromEuler(e){e&&e.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");let t=this.elements,n=e.x,r=e.y,o=e.z,s=Math.cos(n),a=Math.sin(n),c=Math.cos(r),l=Math.sin(r),d=Math.cos(o),u=Math.sin(o);if(e.order==="XYZ"){let h=s*d,p=s*u,f=a*d,m=a*u;t[0]=c*d,t[4]=-c*u,t[8]=l,t[1]=p+f*l,t[5]=h-m*l,t[9]=-a*c,t[2]=m-h*l,t[6]=f+p*l,t[10]=s*c}else if(e.order==="YXZ"){let h=c*d,p=c*u,f=l*d,m=l*u;t[0]=h+m*a,t[4]=f*a-p,t[8]=s*l,t[1]=s*u,t[5]=s*d,t[9]=-a,t[2]=p*a-f,t[6]=m+h*a,t[10]=s*c}else if(e.order==="ZXY"){let h=c*d,p=c*u,f=l*d,m=l*u;t[0]=h-m*a,t[4]=-s*u,t[8]=f+p*a,t[1]=p+f*a,t[5]=s*d,t[9]=m-h*a,t[2]=-s*l,t[6]=a,t[10]=s*c}else if(e.order==="ZYX"){let h=s*d,p=s*u,f=a*d,m=a*u;t[0]=c*d,t[4]=f*l-p,t[8]=h*l+m,t[1]=c*u,t[5]=m*l+h,t[9]=p*l-f,t[2]=-l,t[6]=a*c,t[10]=s*c}else if(e.order==="YZX"){let h=s*c,p=s*l,f=a*c,m=a*l;t[0]=c*d,t[4]=m-h*u,t[8]=f*u+p,t[1]=u,t[5]=s*d,t[9]=-a*d,t[2]=-l*d,t[6]=p*u+f,t[10]=h-m*u}else if(e.order==="XZY"){let h=s*c,p=s*l,f=a*c,m=a*l;t[0]=c*d,t[4]=-u,t[8]=l*d,t[1]=h*u+m,t[5]=s*d,t[9]=p*u-f,t[2]=f*u-p,t[6]=a*d,t[10]=m*u+h}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(sie,e,aie)}lookAt(e,t,n){let r=this.elements;return xo.subVectors(e,t),xo.lengthSq()===0&&(xo.z=1),xo.normalize(),il.crossVectors(n,xo),il.lengthSq()===0&&(Math.abs(n.z)===1?xo.x+=1e-4:xo.z+=1e-4,xo.normalize(),il.crossVectors(n,xo)),il.normalize(),yx.crossVectors(xo,il),r[0]=il.x,r[4]=yx.x,r[8]=xo.x,r[1]=il.y,r[5]=yx.y,r[9]=xo.y,r[2]=il.z,r[6]=yx.z,r[10]=xo.z,this}multiply(e,t){return t!==void 0?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(e,t)):this.multiplyMatrices(this,e)}premultiply(e){return this.multiplyMatrices(e,this)}multiplyMatrices(e,t){let n=e.elements,r=t.elements,o=this.elements,s=n[0],a=n[4],c=n[8],l=n[12],d=n[1],u=n[5],h=n[9],p=n[13],f=n[2],m=n[6],y=n[10],g=n[14],_=n[3],x=n[7],C=n[11],T=n[15],D=r[0],E=r[4],A=r[8],j=r[12],q=r[1],z=r[5],P=r[9],U=r[13],W=r[2],Y=r[6],k=r[10],G=r[14],K=r[3],de=r[7],De=r[11],Te=r[15];return o[0]=s*D+a*q+c*W+l*K,o[4]=s*E+a*z+c*Y+l*de,o[8]=s*A+a*P+c*k+l*De,o[12]=s*j+a*U+c*G+l*Te,o[1]=d*D+u*q+h*W+p*K,o[5]=d*E+u*z+h*Y+p*de,o[9]=d*A+u*P+h*k+p*De,o[13]=d*j+u*U+h*G+p*Te,o[2]=f*D+m*q+y*W+g*K,o[6]=f*E+m*z+y*Y+g*de,o[10]=f*A+m*P+y*k+g*De,o[14]=f*j+m*U+y*G+g*Te,o[3]=_*D+x*q+C*W+T*K,o[7]=_*E+x*z+C*Y+T*de,o[11]=_*A+x*P+C*k+T*De,o[15]=_*j+x*U+C*G+T*Te,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],n=e[4],r=e[8],o=e[12],s=e[1],a=e[5],c=e[9],l=e[13],d=e[2],u=e[6],h=e[10],p=e[14],f=e[3],m=e[7],y=e[11],g=e[15];return f*(+o*c*u-r*l*u-o*a*h+n*l*h+r*a*p-n*c*p)+m*(+t*c*p-t*l*h+o*s*h-r*s*p+r*l*d-o*c*d)+y*(+t*l*u-t*a*p-o*s*u+n*s*p+o*a*d-n*l*d)+g*(-r*a*d-t*c*u+t*a*h+r*s*u-n*s*h+n*c*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,n){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]=n),this}invert(){let e=this.elements,t=e[0],n=e[1],r=e[2],o=e[3],s=e[4],a=e[5],c=e[6],l=e[7],d=e[8],u=e[9],h=e[10],p=e[11],f=e[12],m=e[13],y=e[14],g=e[15],_=u*y*l-m*h*l+m*c*p-a*y*p-u*c*g+a*h*g,x=f*h*l-d*y*l-f*c*p+s*y*p+d*c*g-s*h*g,C=d*m*l-f*u*l+f*a*p-s*m*p-d*a*g+s*u*g,T=f*u*c-d*m*c-f*a*h+s*m*h+d*a*y-s*u*y,D=t*_+n*x+r*C+o*T;if(D===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let E=1/D;return e[0]=_*E,e[1]=(m*h*o-u*y*o-m*r*p+n*y*p+u*r*g-n*h*g)*E,e[2]=(a*y*o-m*c*o+m*r*l-n*y*l-a*r*g+n*c*g)*E,e[3]=(u*c*o-a*h*o-u*r*l+n*h*l+a*r*p-n*c*p)*E,e[4]=x*E,e[5]=(d*y*o-f*h*o+f*r*p-t*y*p-d*r*g+t*h*g)*E,e[6]=(f*c*o-s*y*o-f*r*l+t*y*l+s*r*g-t*c*g)*E,e[7]=(s*h*o-d*c*o+d*r*l-t*h*l-s*r*p+t*c*p)*E,e[8]=C*E,e[9]=(f*u*o-d*m*o-f*n*p+t*m*p+d*n*g-t*u*g)*E,e[10]=(s*m*o-f*a*o+f*n*l-t*m*l-s*n*g+t*a*g)*E,e[11]=(d*a*o-s*u*o-d*n*l+t*u*l+s*n*p-t*a*p)*E,e[12]=T*E,e[13]=(d*m*r-f*u*r+f*n*h-t*m*h-d*n*y+t*u*y)*E,e[14]=(f*a*r-s*m*r-f*n*c+t*m*c+s*n*y-t*a*y)*E,e[15]=(s*u*r-d*a*r+d*n*c-t*u*c-s*n*h+t*a*h)*E,this}scale(e){let t=this.elements,n=e.x,r=e.y,o=e.z;return t[0]*=n,t[4]*=r,t[8]*=o,t[1]*=n,t[5]*=r,t[9]*=o,t[2]*=n,t[6]*=r,t[10]*=o,t[3]*=n,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],n=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,n,r))}makeTranslation(e,t,n){return this.set(1,0,0,e,0,1,0,t,0,0,1,n,0,0,0,1),this}makeRotationX(e){let t=Math.cos(e),n=Math.sin(e);return this.set(1,0,0,0,0,t,-n,0,0,n,t,0,0,0,0,1),this}makeRotationY(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,0,n,0,0,1,0,0,-n,0,t,0,0,0,0,1),this}makeRotationZ(e){let t=Math.cos(e),n=Math.sin(e);return this.set(t,-n,0,0,n,t,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(e,t){let n=Math.cos(t),r=Math.sin(t),o=1-n,s=e.x,a=e.y,c=e.z,l=o*s,d=o*a;return this.set(l*s+n,l*a-r*c,l*c+r*a,0,l*a+r*c,d*a+n,d*c-r*s,0,l*c-r*a,d*c+r*s,o*c*c+n,0,0,0,0,1),this}makeScale(e,t,n){return this.set(e,0,0,0,0,t,0,0,0,0,n,0,0,0,0,1),this}makeShear(e,t,n,r,o,s){return this.set(1,n,o,0,e,1,s,0,t,r,1,0,0,0,0,1),this}compose(e,t,n){let r=this.elements,o=t._x,s=t._y,a=t._z,c=t._w,l=o+o,d=s+s,u=a+a,h=o*l,p=o*d,f=o*u,m=s*d,y=s*u,g=a*u,_=c*l,x=c*d,C=c*u,T=n.x,D=n.y,E=n.z;return r[0]=(1-(m+g))*T,r[1]=(p+C)*T,r[2]=(f-x)*T,r[3]=0,r[4]=(p-C)*D,r[5]=(1-(h+g))*D,r[6]=(y+_)*D,r[7]=0,r[8]=(f+x)*E,r[9]=(y-_)*E,r[10]=(1-(h+m))*E,r[11]=0,r[12]=e.x,r[13]=e.y,r[14]=e.z,r[15]=1,this}decompose(e,t,n){let r=this.elements,o=cp.set(r[0],r[1],r[2]).length(),s=cp.set(r[4],r[5],r[6]).length(),a=cp.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),e.x=r[12],e.y=r[13],e.z=r[14],vs.copy(this);let l=1/o,d=1/s,u=1/a;return vs.elements[0]*=l,vs.elements[1]*=l,vs.elements[2]*=l,vs.elements[4]*=d,vs.elements[5]*=d,vs.elements[6]*=d,vs.elements[8]*=u,vs.elements[9]*=u,vs.elements[10]*=u,t.setFromRotationMatrix(vs),n.x=o,n.y=s,n.z=a,this}makePerspective(e,t,n,r,o,s){s===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");let a=this.elements,c=2*o/(t-e),l=2*o/(n-r),d=(t+e)/(t-e),u=(n+r)/(n-r),h=-(s+o)/(s-o),p=-2*s*o/(s-o);return a[0]=c,a[4]=0,a[8]=d,a[12]=0,a[1]=0,a[5]=l,a[9]=u,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(e,t,n,r,o,s){let a=this.elements,c=1/(t-e),l=1/(n-r),d=1/(s-o),u=(t+e)*c,h=(n+r)*l,p=(s+o)*d;return a[0]=2*c,a[4]=0,a[8]=0,a[12]=-u,a[1]=0,a[5]=2*l,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*d,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(e){let t=this.elements,n=e.elements;for(let r=0;r<16;r++)if(t[r]!==n[r])return!1;return!0}fromArray(e,t=0){for(let n=0;n<16;n++)this.elements[n]=e[n+t];return this}toArray(e=[],t=0){let n=this.elements;return e[t]=n[0],e[t+1]=n[1],e[t+2]=n[2],e[t+3]=n[3],e[t+4]=n[4],e[t+5]=n[5],e[t+6]=n[6],e[t+7]=n[7],e[t+8]=n[8],e[t+9]=n[9],e[t+10]=n[10],e[t+11]=n[11],e[t+12]=n[12],e[t+13]=n[13],e[t+14]=n[14],e[t+15]=n[15],e}};dt.prototype.isMatrix4=!0;var cp=new O,vs=new dt,sie=new O(0,0,0),aie=new O(1,1,1),il=new O,yx=new O,xo=new O,Sz=new dt,Mz=new Ui,nu=class i{constructor(e=0,t=0,n=0,r=i.DefaultOrder){this._x=e,this._y=t,this._z=n,this._order=r}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 order(){return this._order}set order(e){this._order=e,this._onChangeCallback()}set(e,t,n,r=this._order){return this._x=e,this._y=t,this._z=n,this._order=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._order)}copy(e){return this._x=e._x,this._y=e._y,this._z=e._z,this._order=e._order,this._onChangeCallback(),this}setFromRotationMatrix(e,t=this._order,n=!0){let r=e.elements,o=r[0],s=r[4],a=r[8],c=r[1],l=r[5],d=r[9],u=r[2],h=r[6],p=r[10];switch(t){case"XYZ":this._y=Math.asin(rr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-d,p),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(h,l),this._z=0);break;case"YXZ":this._x=Math.asin(-rr(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(a,p),this._z=Math.atan2(c,l)):(this._y=Math.atan2(-u,o),this._z=0);break;case"ZXY":this._x=Math.asin(rr(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-u,p),this._z=Math.atan2(-s,l)):(this._y=0,this._z=Math.atan2(c,o));break;case"ZYX":this._y=Math.asin(-rr(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(c,o)):(this._x=0,this._z=Math.atan2(-s,l));break;case"YZX":this._z=Math.asin(rr(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-d,l),this._y=Math.atan2(-u,o)):(this._x=0,this._y=Math.atan2(a,p));break;case"XZY":this._z=Math.asin(-rr(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(h,l),this._y=Math.atan2(a,o)):(this._x=Math.atan2(-d,p),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+t)}return this._order=t,n===!0&&this._onChangeCallback(),this}setFromQuaternion(e,t,n){return Sz.makeRotationFromQuaternion(e),this.setFromRotationMatrix(Sz,t,n)}setFromVector3(e,t=this._order){return this.set(e.x,e.y,e.z,t)}reorder(e){return Mz.setFromEuler(this),this.setFromQuaternion(Mz,e)}equals(e){return e._x===this._x&&e._y===this._y&&e._z===this._z&&e._order===this._order}fromArray(e){return this._x=e[0],this._y=e[1],this._z=e[2],e[3]!==void 0&&(this._order=e[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._order,e}toVector3(e){return e?e.set(this._x,this._y,this._z):new O(this._x,this._y,this._z)}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}};nu.prototype.isEuler=!0;nu.DefaultOrder="XYZ";nu.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];var Yg=class{constructor(){this.mask=1}set(e){this.mask=1<1){for(let t=0;t1){for(let n=0;n0){r.children=[];for(let a=0;a0){r.animations=[];for(let a=0;a0&&(n.geometries=a),c.length>0&&(n.materials=c),l.length>0&&(n.textures=l),d.length>0&&(n.images=d),u.length>0&&(n.shapes=u),h.length>0&&(n.skeletons=h),p.length>0&&(n.animations=p)}return n.object=r,n;function s(a){let c=[];for(let l in a){let d=a[l];delete d.metadata,c.push(d)}return c}}clone(e){return new this.constructor().copy(this,e)}copy(e,t=!0){if(this.name=e.name,this.up.copy(e.up),this.position.copy(e.position),this.rotation.order=e.rotation.order,this.quaternion.copy(e.quaternion),this.scale.copy(e.scale),this.matrix.copy(e.matrix),this.matrixWorld.copy(e.matrixWorld),this.matrixAutoUpdate=e.matrixAutoUpdate,this.matrixWorldNeedsUpdate=e.matrixWorldNeedsUpdate,this.layers.mask=e.layers.mask,this.visible=e.visible,this.castShadow=e.castShadow,this.receiveShadow=e.receiveShadow,this.frustumCulled=e.frustumCulled,this.renderOrder=e.renderOrder,this.userData=JSON.parse(JSON.stringify(e.userData)),t===!0)for(let n=0;n0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(e,t,n,r,o){bs.subVectors(r,t),qa.subVectors(n,t),MD.subVectors(e,t);let s=bs.dot(bs),a=bs.dot(qa),c=bs.dot(MD),l=qa.dot(qa),d=qa.dot(MD),u=s*l-a*a;if(u===0)return o.set(-2,-1,-1);let h=1/u,p=(l*c-a*d)*h,f=(s*d-a*c)*h;return o.set(1-p-f,f,p)}static containsPoint(e,t,n,r){return this.getBarycoord(e,t,n,r,Ya),Ya.x>=0&&Ya.y>=0&&Ya.x+Ya.y<=1}static getUV(e,t,n,r,o,s,a,c){return this.getBarycoord(e,t,n,r,Ya),c.set(0,0),c.addScaledVector(o,Ya.x),c.addScaledVector(s,Ya.y),c.addScaledVector(a,Ya.z),c}static isFrontFacing(e,t,n,r){return bs.subVectors(n,t),qa.subVectors(e,t),bs.cross(qa).dot(r)<0}set(e,t,n){return this.a.copy(e),this.b.copy(t),this.c.copy(n),this}setFromPointsAndIndices(e,t,n,r){return this.a.copy(e[t]),this.b.copy(e[n]),this.c.copy(e[r]),this}setFromAttributeAndIndices(e,t,n,r){return this.a.fromBufferAttribute(e,t),this.b.fromBufferAttribute(e,n),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 bs.subVectors(this.c,this.b),qa.subVectors(this.a,this.b),bs.cross(qa).length()*.5}getMidpoint(e){return e.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(e){return i.getNormal(this.a,this.b,this.c,e)}getPlane(e){return e.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(e,t){return i.getBarycoord(e,this.a,this.b,this.c,t)}getUV(e,t,n,r,o){return i.getUV(e,this.a,this.b,this.c,t,n,r,o)}containsPoint(e){return i.containsPoint(e,this.a,this.b,this.c)}isFrontFacing(e){return i.isFrontFacing(this.a,this.b,this.c,e)}intersectsBox(e){return e.intersectsTriangle(this)}closestPointToPoint(e,t){let n=this.a,r=this.b,o=this.c,s,a;dp.subVectors(r,n),up.subVectors(o,n),ED.subVectors(e,n);let c=dp.dot(ED),l=up.dot(ED);if(c<=0&&l<=0)return t.copy(n);ID.subVectors(e,r);let d=dp.dot(ID),u=up.dot(ID);if(d>=0&&u<=d)return t.copy(r);let h=c*u-d*l;if(h<=0&&c>=0&&d<=0)return s=c/(c-d),t.copy(n).addScaledVector(dp,s);TD.subVectors(e,o);let p=dp.dot(TD),f=up.dot(TD);if(f>=0&&p<=f)return t.copy(o);let m=p*l-c*f;if(m<=0&&l>=0&&f<=0)return a=l/(l-f),t.copy(n).addScaledVector(up,a);let y=d*f-p*u;if(y<=0&&u-d>=0&&p-f>=0)return Oz.subVectors(o,r),a=(u-d)/(u-d+(p-f)),t.copy(r).addScaledVector(Oz,a);let g=1/(y+m+h);return s=m*g,a=h*g,t.copy(n).addScaledVector(dp,s).addScaledVector(up,a)}equals(e){return e.a.equals(this.a)&&e.b.equals(this.b)&&e.c.equals(this.c)}},hie=0,Oi=class extends sa{constructor(){super(),Object.defineProperty(this,"id",{value:hie++}),this.uuid=Co(),this.name="",this.type="Material",this.fog=!0,this.blending=Ep,this.side=eu,this.vertexColors=!1,this.opacity=1,this.format=sr,this.transparent=!1,this.blendSrc=$P,this.blendDst=qP,this.blendEquation=qd,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=rw,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=yH,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=iw,this.stencilZFail=iw,this.stencilZPass=iw,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.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}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(e){if(e!==void 0)for(let t in e){let n=e[t];if(n===void 0){console.warn("THREE.Material: '"+t+"' parameter is undefined.");continue}if(t==="shading"){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===WP;continue}let r=this[t];if(r===void 0){console.warn("THREE."+this.type+": '"+t+"' is not a property of this material.");continue}r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[t]=n}}toJSON(e){let t=e===void 0||typeof e=="string";t&&(e={textures:{},images:{}});let n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(e).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(e).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(e).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(e).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(e).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(e).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(e).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(e).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(e).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(e).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(e).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(e).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(e).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(e).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(e).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(e).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(e).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(e).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(e).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(e).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(e).uuid),this.attenuationDistance!==void 0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Ep&&(n.blending=this.blending),this.side!==eu&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.format!==sr&&(n.format=this.format),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(n.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=this.flatShading),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),JSON.stringify(this.userData)!=="{}"&&(n.userData=this.userData);function r(o){let s=[];for(let a in o){let c=o[a];delete c.metadata,s.push(c)}return s}if(t){let o=r(e.textures),s=r(e.images);o.length>0&&(n.textures=o),s.length>0&&(n.images=s)}return n}clone(){return new this.constructor().copy(this)}copy(e){this.name=e.name,this.fog=e.fog,this.blending=e.blending,this.side=e.side,this.vertexColors=e.vertexColors,this.opacity=e.opacity,this.format=e.format,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.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,n=null;if(t!==null){let r=t.length;n=new Array(r);for(let o=0;o!==r;++o)n[o]=t[o].clone()}return this.clippingPlanes=n,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.alphaToCoverage=e.alphaToCoverage,this.premultipliedAlpha=e.premultipliedAlpha,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++}};Oi.prototype.isMaterial=!0;var Rz={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},ys={h:0,s:0,l:0},wx={h:0,s:0,l:0};function DD(i,e,t){return t<0&&(t+=1),t>1&&(t-=1),t<1/6?i+(e-i)*6*t:t<1/2?e:t<2/3?i+(e-i)*6*(2/3-t):i}function PD(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function OD(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}var je=(()=>{class i{constructor(t,n,r){return n===void 0&&r===void 0?this.set(t):this.setRGB(t,n,r)}set(t){return t&&t.isColor?this.copy(t):typeof t=="number"?this.setHex(t):typeof t=="string"&&this.setStyle(t),this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,this}setRGB(t,n,r){return this.r=t,this.g=n,this.b=r,this}setHSL(t,n,r){if(t=JP(t,1),n=rr(n,0,1),r=rr(r,0,1),n===0)this.r=this.g=this.b=r;else{let o=r<=.5?r*(1+n):r+n-r*n,s=2*r-o;this.r=DD(s,o,t+1/3),this.g=DD(s,o,t),this.b=DD(s,o,t-1/3)}return this}setStyle(t){function n(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let r;if(r=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.exec(t)){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 this.r=Math.min(255,parseInt(o[1],10))/255,this.g=Math.min(255,parseInt(o[2],10))/255,this.b=Math.min(255,parseInt(o[3],10))/255,n(o[4]),this;if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(o[1],10))/100,this.g=Math.min(100,parseInt(o[2],10))/100,this.b=Math.min(100,parseInt(o[3],10))/100,n(o[4]),this;break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a)){let c=parseFloat(o[1])/360,l=parseInt(o[2],10)/100,d=parseInt(o[3],10)/100;return n(o[4]),this.setHSL(c,l,d)}break}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(t)){let o=r[1],s=o.length;if(s===3)return this.r=parseInt(o.charAt(0)+o.charAt(0),16)/255,this.g=parseInt(o.charAt(1)+o.charAt(1),16)/255,this.b=parseInt(o.charAt(2)+o.charAt(2),16)/255,this;if(s===6)return this.r=parseInt(o.charAt(0)+o.charAt(1),16)/255,this.g=parseInt(o.charAt(2)+o.charAt(3),16)/255,this.b=parseInt(o.charAt(4)+o.charAt(5),16)/255,this}return t&&t.length>0?this.setColorName(t):this}setColorName(t){let n=Rz[t.toLowerCase()];return n!==void 0?this.setHex(n):console.warn("THREE.Color: Unknown color "+t),this}clone(){return new this.constructor(this.r,this.g,this.b)}copy(t){return this.r=t.r,this.g=t.g,this.b=t.b,this}copyGammaToLinear(t,n=2){return this.r=Math.pow(t.r,n),this.g=Math.pow(t.g,n),this.b=Math.pow(t.b,n),this}copyLinearToGamma(t,n=2){let r=n>0?1/n:1;return this.r=Math.pow(t.r,r),this.g=Math.pow(t.g,r),this.b=Math.pow(t.b,r),this}convertGammaToLinear(t){return this.copyGammaToLinear(this,t),this}convertLinearToGamma(t){return this.copyLinearToGamma(this,t),this}copySRGBToLinear(t){return this.r=PD(t.r),this.g=PD(t.g),this.b=PD(t.b),this}copyLinearToSRGB(t){return this.r=OD(t.r),this.g=OD(t.g),this.b=OD(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return this.r*255<<16^this.g*255<<8^this.b*255<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(t){let n=this.r,r=this.g,o=this.b,s=Math.max(n,r,o),a=Math.min(n,r,o),c,l,d=(a+s)/2;if(a===s)c=0,l=0;else{let u=s-a;switch(l=d<=.5?u/(s+a):u/(2-s-a),s){case n:c=(r-o)/u+(r65535?Ap:Rp)(e,1):this.index=e,this}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,n=0){this.groups.push({start:e,count:t,materialIndex:n})}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 n=this.attributes.normal;if(n!==void 0){let o=new Si().getNormalMatrix(e);n.applyNormalMatrix(o),n.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 Yo.makeRotationFromQuaternion(e),this.applyMatrix4(Yo),this}rotateX(e){return Yo.makeRotationX(e),this.applyMatrix4(Yo),this}rotateY(e){return Yo.makeRotationY(e),this.applyMatrix4(Yo),this}rotateZ(e){return Yo.makeRotationZ(e),this.applyMatrix4(Yo),this}translate(e,t,n){return Yo.makeTranslation(e,t,n),this.applyMatrix4(Yo),this}scale(e,t,n){return Yo.makeScale(e,t,n),this.applyMatrix4(Yo),this}lookAt(e){return RD.lookAt(e),RD.updateMatrix(),this.applyMatrix4(RD.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(hp).negate(),this.translate(hp.x,hp.y,hp.z),this}setFromPoints(e){let t=[];for(let n=0,r=e.length;n0&&(e.userData=this.userData),this.parameters!==void 0){let c=this.parameters;for(let l in c)c[l]!==void 0&&(e[l]=c[l]);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 n=this.attributes;for(let c in n){let l=n[c];e.data.attributes[c]=l.toJSON(e.data)}let r={},o=!1;for(let c in this.morphAttributes){let l=this.morphAttributes[c],d=[];for(let u=0,h=l.length;u0&&(r[c]=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={center:a.center.toArray(),radius:a.radius}),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 n=e.index;n!==null&&this.setIndex(n.clone(t));let r=e.attributes;for(let l in r){let d=r[l];this.setAttribute(l,d.clone(t))}let o=e.morphAttributes;for(let l in o){let d=[],u=o[l];for(let h=0,p=u.length;h0){let r=t[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=r.length;o0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(e,t){let n=this.geometry,r=this.material,o=this.matrixWorld;if(r===void 0||(n.boundingSphere===null&&n.computeBoundingSphere(),AD.copy(n.boundingSphere),AD.applyMatrix4(o),e.ray.intersectsSphere(AD)===!1)||(Az.copy(o).invert(),pp.copy(e.ray).applyMatrix4(Az),n.boundingBox!==null&&pp.intersectsBox(n.boundingBox)===!1))return;let s;if(n.isBufferGeometry){let a=n.index,c=n.attributes.position,l=n.morphAttributes.position,d=n.morphTargetsRelative,u=n.attributes.uv,h=n.attributes.uv2,p=n.groups,f=n.drawRange;if(a!==null)if(Array.isArray(r))for(let m=0,y=p.length;mt.far?null:{distance:l,point:Px.clone(),object:i}}function Ox(i,e,t,n,r,o,s,a,c,l,d,u){rl.fromBufferAttribute(r,l),ol.fromBufferAttribute(r,d),sl.fromBufferAttribute(r,u);let h=i.morphTargetInfluences;if(o&&h){Sx.set(0,0,0),Mx.set(0,0,0),Ex.set(0,0,0);for(let f=0,m=o.length;f0?1:-1,d.push(de.x,de.y,de.z),u.push(He/E),u.push(1-De/A),G+=1}}for(let De=0;De0&&(t.defines=this.defines),t.vertexShader=this.vertexShader,t.fragmentShader=this.fragmentShader;let n={};for(let r in this.extensions)this.extensions[r]===!0&&(n[r]=!0);return Object.keys(n).length>0&&(t.extensions=n),t}};Cs.prototype.isShaderMaterial=!0;var iu=class extends hn{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new dt,this.projectionMatrix=new dt,this.projectionMatrixInverse=new dt}copy(e,t){return super.copy(e,t),this.matrixWorldInverse.copy(e.matrixWorldInverse),this.projectionMatrix.copy(e.projectionMatrix),this.projectionMatrixInverse.copy(e.projectionMatrixInverse),this}getWorldDirection(e){this.updateWorldMatrix(!0,!1);let t=this.matrixWorld.elements;return e.set(-t[8],-t[9],-t[10]).normalize()}updateMatrixWorld(e){super.updateMatrixWorld(e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(e,t){super.updateWorldMatrix(e,t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}};iu.prototype.isCamera=!0;var Di=class extends iu{constructor(e=50,t=1,n=.1,r=2e3){super(),this.type="PerspectiveCamera",this.fov=e,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=t,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.fov=e.fov,this.zoom=e.zoom,this.near=e.near,this.far=e.far,this.focus=e.focus,this.aspect=e.aspect,this.view=e.view===null?null:Object.assign({},e.view),this.filmGauge=e.filmGauge,this.filmOffset=e.filmOffset,this}setFocalLength(e){let t=.5*this.getFilmHeight()/e;this.fov=$g*2*Math.atan(t),this.updateProjectionMatrix()}getFocalLength(){let e=Math.tan(Jd*.5*this.fov);return .5*this.getFilmHeight()/e}getEffectiveFOV(){return $g*2*Math.atan(Math.tan(Jd*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(e,t,n,r,o,s){this.aspect=e/t,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=this.near,t=e*Math.tan(Jd*.5*this.fov)/this.zoom,n=2*t,r=this.aspect*n,o=-.5*r,s=this.view;if(this.view!==null&&this.view.enabled){let c=s.fullWidth,l=s.fullHeight;o+=s.offsetX*r/c,t-=s.offsetY*n/l,r*=s.width/c,n*=s.height/l}let a=this.filmOffset;a!==0&&(o+=e*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+r,t,t-n,e,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.fov=this.fov,t.object.zoom=this.zoom,t.object.near=this.near,t.object.far=this.far,t.object.focus=this.focus,t.object.aspect=this.aspect,this.view!==null&&(t.object.view=Object.assign({},this.view)),t.object.filmGauge=this.filmGauge,t.object.filmOffset=this.filmOffset,t}};Di.prototype.isPerspectiveCamera=!0;var fp=90,mp=1,kp=class extends hn{constructor(e,t,n){if(super(),this.type="CubeCamera",n.isWebGLCubeRenderTarget!==!0){console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");return}this.renderTarget=n;let r=new Di(fp,mp,e,t);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new O(1,0,0)),this.add(r);let o=new Di(fp,mp,e,t);o.layers=this.layers,o.up.set(0,-1,0),o.lookAt(new O(-1,0,0)),this.add(o);let s=new Di(fp,mp,e,t);s.layers=this.layers,s.up.set(0,0,1),s.lookAt(new O(0,1,0)),this.add(s);let a=new Di(fp,mp,e,t);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new O(0,-1,0)),this.add(a);let c=new Di(fp,mp,e,t);c.layers=this.layers,c.up.set(0,-1,0),c.lookAt(new O(0,0,1)),this.add(c);let l=new Di(fp,mp,e,t);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new O(0,0,-1)),this.add(l)}update(e,t){this.parent===null&&this.updateMatrixWorld();let n=this.renderTarget,[r,o,s,a,c,l]=this.children,d=e.xr.enabled,u=e.getRenderTarget();e.xr.enabled=!1;let h=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,e.setRenderTarget(n,0),e.render(t,r),e.setRenderTarget(n,1),e.render(t,o),e.setRenderTarget(n,2),e.render(t,s),e.setRenderTarget(n,3),e.render(t,a),e.setRenderTarget(n,4),e.render(t,c),n.texture.generateMipmaps=h,e.setRenderTarget(n,5),e.render(t,l),e.setRenderTarget(u),e.xr.enabled=d}},hl=class extends Wi{constructor(e,t,n,r,o,s,a,c,l,d){e=e!==void 0?e:[],t=t!==void 0?t:_u,super(e,t,n,r,o,s,a,c,l,d),this.flipY=!1}get images(){return this.image}set images(e){this.image=e}};hl.prototype.isCubeTexture=!0;var Lp=class extends So{constructor(e,t,n){Number.isInteger(t)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),t=n),super(e,e,t),t=t||{},this.texture=new hl(void 0,t.mapping,t.wrapS,t.wrapT,t.magFilter,t.minFilter,t.format,t.type,t.anisotropy,t.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=t.generateMipmaps!==void 0?t.generateMipmaps:!1,this.texture.minFilter=t.minFilter!==void 0?t.minFilter:zi,this.texture._needsFlipEnvMap=!1}fromEquirectangularTexture(e,t){this.texture.type=t.type,this.texture.format=sr,this.texture.encoding=t.encoding,this.texture.generateMipmaps=t.generateMipmaps,this.texture.minFilter=t.minFilter,this.texture.magFilter=t.magFilter;let n={uniforms:{tEquirect:{value:null}},vertexShader:` - - varying vec3 vWorldDirection; - - vec3 transformDirection( in vec3 dir, in mat4 matrix ) { - - return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); - - } - - void main() { - - vWorldDirection = transformDirection( position, modelMatrix ); - - #include - #include - - } - `,fragmentShader:` - - uniform sampler2D tEquirect; - - varying vec3 vWorldDirection; - - #include - - void main() { - - vec3 direction = normalize( vWorldDirection ); - - vec2 sampleUV = equirectUv( direction ); - - gl_FragColor = texture2D( tEquirect, sampleUV ); - - } - `},r=new ul(5,5,5),o=new Cs({name:"CubemapFromEquirect",uniforms:Np(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:Ci,blending:Qa});o.uniforms.tEquirect.value=t;let s=new pi(r,o),a=t.minFilter;return t.minFilter===bu&&(t.minFilter=zi),new kp(1,10,this).update(e,s),t.minFilter=a,s.geometry.dispose(),s.material.dispose(),this}clear(e,t,n,r){let o=e.getRenderTarget();for(let s=0;s<6;s++)e.setRenderTarget(this,s),e.clear(t,n,r);e.setRenderTarget(o)}};Lp.prototype.isWebGLCubeRenderTarget=!0;var BD=new O,_ie=new O,vie=new Si,Xo=class{constructor(e=new O(1,0,0),t=0){this.normal=e,this.constant=t}set(e,t){return this.normal.copy(e),this.constant=t,this}setComponents(e,t,n,r){return this.normal.set(e,t,n),this.constant=r,this}setFromNormalAndCoplanarPoint(e,t){return this.normal.copy(e),this.constant=-t.dot(this.normal),this}setFromCoplanarPoints(e,t,n){let r=BD.subVectors(n,t).cross(_ie.subVectors(e,t)).normalize();return this.setFromNormalAndCoplanarPoint(r,e),this}copy(e){return this.normal.copy(e.normal),this.constant=e.constant,this}normalize(){let e=1/this.normal.length();return this.normal.multiplyScalar(e),this.constant*=e,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(e){return this.normal.dot(e)+this.constant}distanceToSphere(e){return this.distanceToPoint(e.center)-e.radius}projectPoint(e,t){return t.copy(this.normal).multiplyScalar(-this.distanceToPoint(e)).add(e)}intersectLine(e,t){let n=e.delta(BD),r=this.normal.dot(n);if(r===0)return this.distanceToPoint(e.start)===0?t.copy(e.start):null;let o=-(e.start.dot(this.normal)+this.constant)/r;return o<0||o>1?null:t.copy(n).multiplyScalar(o).add(e.start)}intersectsLine(e){let t=this.distanceToPoint(e.start),n=this.distanceToPoint(e.end);return t<0&&n>0||n<0&&t>0}intersectsBox(e){return e.intersectsPlane(this)}intersectsSphere(e){return e.intersectsPlane(this)}coplanarPoint(e){return e.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(e,t){let n=t||vie.getNormalMatrix(e),r=this.coplanarPoint(BD).applyMatrix4(e),o=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(o),this}translate(e){return this.constant-=e.dot(this.normal),this}equals(e){return e.normal.equals(this.normal)&&e.constant===this.constant}clone(){return new this.constructor().copy(this)}};Xo.prototype.isPlane=!0;var gp=new aa,Rx=new O,ru=class{constructor(e=new Xo,t=new Xo,n=new Xo,r=new Xo,o=new Xo,s=new Xo){this.planes=[e,t,n,r,o,s]}set(e,t,n,r,o,s){let a=this.planes;return a[0].copy(e),a[1].copy(t),a[2].copy(n),a[3].copy(r),a[4].copy(o),a[5].copy(s),this}copy(e){let t=this.planes;for(let n=0;n<6;n++)t[n].copy(e.planes[n]);return this}setFromProjectionMatrix(e){let t=this.planes,n=e.elements,r=n[0],o=n[1],s=n[2],a=n[3],c=n[4],l=n[5],d=n[6],u=n[7],h=n[8],p=n[9],f=n[10],m=n[11],y=n[12],g=n[13],_=n[14],x=n[15];return t[0].setComponents(a-r,u-c,m-h,x-y).normalize(),t[1].setComponents(a+r,u+c,m+h,x+y).normalize(),t[2].setComponents(a+o,u+l,m+p,x+g).normalize(),t[3].setComponents(a-o,u-l,m-p,x-g).normalize(),t[4].setComponents(a-s,u-d,m-f,x-_).normalize(),t[5].setComponents(a+s,u+d,m+f,x+_).normalize(),this}intersectsObject(e){let t=e.geometry;return t.boundingSphere===null&&t.computeBoundingSphere(),gp.copy(t.boundingSphere).applyMatrix4(e.matrixWorld),this.intersectsSphere(gp)}intersectsSprite(e){return gp.center.set(0,0,0),gp.radius=.7071067811865476,gp.applyMatrix4(e.matrixWorld),this.intersectsSphere(gp)}intersectsSphere(e){let t=this.planes,n=e.center,r=-e.radius;for(let o=0;o<6;o++)if(t[o].distanceToPoint(n)0?e.max.x:e.min.x,Rx.y=r.normal.y>0?e.max.y:e.min.y,Rx.z=r.normal.z>0?e.max.z:e.min.z,r.distanceToPoint(Rx)<0)return!1}return!0}containsPoint(e){let t=this.planes;for(let n=0;n<6;n++)if(t[n].distanceToPoint(e)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function MH(){let i=null,e=!1,t=null,n=null;function r(o,s){t(o,s),n=i.requestAnimationFrame(r)}return{start:function(){e!==!0&&t!==null&&(n=i.requestAnimationFrame(r),e=!0)},stop:function(){i.cancelAnimationFrame(n),e=!1},setAnimationLoop:function(o){t=o},setContext:function(o){i=o}}}function bie(i,e){let t=e.isWebGL2,n=new WeakMap;function r(l,d){let u=l.array,h=l.usage,p=i.createBuffer();i.bindBuffer(d,p),i.bufferData(d,u,h),l.onUploadCallback();let f=5126;return u instanceof Float32Array?f=5126:u instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):u instanceof Uint16Array?l.isFloat16BufferAttribute?t?f=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):f=5123:u instanceof Int16Array?f=5122:u instanceof Uint32Array?f=5125:u instanceof Int32Array?f=5124:u instanceof Int8Array?f=5120:(u instanceof Uint8Array||u instanceof Uint8ClampedArray)&&(f=5121),{buffer:p,type:f,bytesPerElement:u.BYTES_PER_ELEMENT,version:l.version}}function o(l,d,u){let h=d.array,p=d.updateRange;i.bindBuffer(u,l),p.count===-1?i.bufferSubData(u,0,h):(t?i.bufferSubData(u,p.offset*h.BYTES_PER_ELEMENT,h,p.offset,p.count):i.bufferSubData(u,p.offset*h.BYTES_PER_ELEMENT,h.subarray(p.offset,p.offset+p.count)),p.count=-1)}function s(l){return l.isInterleavedBufferAttribute&&(l=l.data),n.get(l)}function a(l){l.isInterleavedBufferAttribute&&(l=l.data);let d=n.get(l);d&&(i.deleteBuffer(d.buffer),n.delete(l))}function c(l,d){if(l.isGLBufferAttribute){let h=n.get(l);(!h||h.version 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; - return cross( v1, v2 ) * theta_sintheta; -} -vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { - vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; - vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; - vec3 lightNormal = cross( v1, v2 ); - if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); - vec3 T1, T2; - T1 = normalize( V - N * dot( V, N ) ); - T2 = - cross( N, T1 ); - mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); - vec3 coords[ 4 ]; - coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); - coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); - coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); - coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); - coords[ 0 ] = normalize( coords[ 0 ] ); - coords[ 1 ] = normalize( coords[ 1 ] ); - coords[ 2 ] = normalize( coords[ 2 ] ); - coords[ 3 ] = normalize( coords[ 3 ] ); - vec3 vectorFormFactor = vec3( 0.0 ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); - vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); - float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); - return vec3( result ); -} -float G_BlinnPhong_Implicit( ) { - return 0.25; -} -float D_BlinnPhong( const in float shininess, const in float dotNH ) { - return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess ); -} -vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) { - vec3 halfDir = normalize( lightDir + viewDir ); - float dotNH = saturate( dot( normal, halfDir ) ); - float dotVH = saturate( dot( viewDir, halfDir ) ); - vec3 F = F_Schlick( specularColor, 1.0, dotVH ); - float G = G_BlinnPhong_Implicit( ); - float D = D_BlinnPhong( shininess, dotNH ); - return F * ( G * D ); -} -#if defined( USE_SHEEN ) -float D_Charlie( float roughness, float dotNH ) { - float alpha = pow2( roughness ); - float invAlpha = 1.0 / alpha; - float cos2h = dotNH * dotNH; - float sin2h = max( 1.0 - cos2h, 0.0078125 ); - return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); -} -float V_Neubelt( float dotNV, float dotNL ) { - return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); -} -vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { - vec3 halfDir = normalize( lightDir + viewDir ); - float dotNL = saturate( dot( normal, lightDir ) ); - float dotNV = saturate( dot( normal, viewDir ) ); - float dotNH = saturate( dot( normal, halfDir ) ); - float D = D_Charlie( sheenRoughness, dotNH ); - float V = V_Neubelt( dotNV, dotNL ); - return sheenColor * ( D * V ); -} -#endif`,Die=`#ifdef USE_BUMPMAP - uniform sampler2D bumpMap; - uniform float bumpScale; - vec2 dHdxy_fwd() { - vec2 dSTdx = dFdx( vUv ); - vec2 dSTdy = dFdy( vUv ); - float Hll = bumpScale * texture2D( bumpMap, vUv ).x; - float dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll; - float dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll; - return vec2( dBx, dBy ); - } - vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) { - vec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) ); - vec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) ); - vec3 vN = surf_norm; - vec3 R1 = cross( vSigmaY, vN ); - vec3 R2 = cross( vN, vSigmaX ); - float fDet = dot( vSigmaX, R1 ) * faceDirection; - vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); - return normalize( abs( fDet ) * surf_norm - vGrad ); - } -#endif`,Pie=`#if NUM_CLIPPING_PLANES > 0 - vec4 plane; - #pragma unroll_loop_start - for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { - plane = clippingPlanes[ i ]; - if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; - } - #pragma unroll_loop_end - #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES - bool clipped = true; - #pragma unroll_loop_start - for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { - plane = clippingPlanes[ i ]; - clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; - } - #pragma unroll_loop_end - if ( clipped ) discard; - #endif -#endif`,Oie=`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; - uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; -#endif`,Rie=`#if NUM_CLIPPING_PLANES > 0 - varying vec3 vClipPosition; -#endif`,Aie=`#if NUM_CLIPPING_PLANES > 0 - vClipPosition = - mvPosition.xyz; -#endif`,Nie=`#if defined( USE_COLOR_ALPHA ) - diffuseColor *= vColor; -#elif defined( USE_COLOR ) - diffuseColor.rgb *= vColor; -#endif`,kie=`#if defined( USE_COLOR_ALPHA ) - varying vec4 vColor; -#elif defined( USE_COLOR ) - varying vec3 vColor; -#endif`,Lie=`#if defined( USE_COLOR_ALPHA ) - varying vec4 vColor; -#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) - varying vec3 vColor; -#endif`,Fie=`#if defined( USE_COLOR_ALPHA ) - vColor = vec4( 1.0 ); -#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) - vColor = vec3( 1.0 ); -#endif -#ifdef USE_COLOR - vColor *= color; -#endif -#ifdef USE_INSTANCING_COLOR - vColor.xyz *= instanceColor.xyz; -#endif`,Bie=`#define PI 3.141592653589793 -#define PI2 6.283185307179586 -#define PI_HALF 1.5707963267948966 -#define RECIPROCAL_PI 0.3183098861837907 -#define RECIPROCAL_PI2 0.15915494309189535 -#define EPSILON 1e-6 -#ifndef saturate -#define saturate( a ) clamp( a, 0.0, 1.0 ) -#endif -#define whiteComplement( a ) ( 1.0 - saturate( a ) ) -float pow2( const in float x ) { return x*x; } -float pow3( const in float x ) { return x*x*x; } -float pow4( const in float x ) { float x2 = x*x; return x2*x2; } -float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } -float average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); } -highp float rand( const in vec2 uv ) { - const highp float a = 12.9898, b = 78.233, c = 43758.5453; - highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); - return fract( sin( sn ) * c ); -} -#ifdef HIGH_PRECISION - float precisionSafeLength( vec3 v ) { return length( v ); } -#else - float precisionSafeLength( vec3 v ) { - float maxComponent = max3( abs( v ) ); - return length( v / maxComponent ) * maxComponent; - } -#endif -struct IncidentLight { - vec3 color; - vec3 direction; - bool visible; -}; -struct ReflectedLight { - vec3 directDiffuse; - vec3 directSpecular; - vec3 indirectDiffuse; - vec3 indirectSpecular; -}; -struct GeometricContext { - vec3 position; - vec3 normal; - vec3 viewDir; -#ifdef USE_CLEARCOAT - vec3 clearcoatNormal; -#endif -}; -vec3 transformDirection( in vec3 dir, in mat4 matrix ) { - return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); -} -vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { - return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); -} -mat3 transposeMat3( const in mat3 m ) { - mat3 tmp; - tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); - tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); - tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); - return tmp; -} -float linearToRelativeLuminance( const in vec3 color ) { - vec3 weights = vec3( 0.2126, 0.7152, 0.0722 ); - return dot( weights, color.rgb ); -} -bool isPerspectiveMatrix( mat4 m ) { - return m[ 2 ][ 3 ] == - 1.0; -} -vec2 equirectUv( in vec3 dir ) { - float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; - float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; - return vec2( u, v ); -}`,Vie=`#ifdef ENVMAP_TYPE_CUBE_UV - #define cubeUV_maxMipLevel 8.0 - #define cubeUV_minMipLevel 4.0 - #define cubeUV_maxTileSize 256.0 - #define cubeUV_minTileSize 16.0 - float getFace( vec3 direction ) { - vec3 absDirection = abs( direction ); - float face = - 1.0; - if ( absDirection.x > absDirection.z ) { - if ( absDirection.x > absDirection.y ) - face = direction.x > 0.0 ? 0.0 : 3.0; - else - face = direction.y > 0.0 ? 1.0 : 4.0; - } else { - if ( absDirection.z > absDirection.y ) - face = direction.z > 0.0 ? 2.0 : 5.0; - else - face = direction.y > 0.0 ? 1.0 : 4.0; - } - return face; - } - vec2 getUV( vec3 direction, float face ) { - vec2 uv; - if ( face == 0.0 ) { - uv = vec2( direction.z, direction.y ) / abs( direction.x ); - } else if ( face == 1.0 ) { - uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); - } else if ( face == 2.0 ) { - uv = vec2( - direction.x, direction.y ) / abs( direction.z ); - } else if ( face == 3.0 ) { - uv = vec2( - direction.z, direction.y ) / abs( direction.x ); - } else if ( face == 4.0 ) { - uv = vec2( - direction.x, direction.z ) / abs( direction.y ); - } else { - uv = vec2( direction.x, direction.y ) / abs( direction.z ); - } - return 0.5 * ( uv + 1.0 ); - } - vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { - float face = getFace( direction ); - float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); - mipInt = max( mipInt, cubeUV_minMipLevel ); - float faceSize = exp2( mipInt ); - float texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize ); - vec2 uv = getUV( direction, face ) * ( faceSize - 1.0 ); - vec2 f = fract( uv ); - uv += 0.5 - f; - if ( face > 2.0 ) { - uv.y += faceSize; - face -= 3.0; - } - uv.x += face * faceSize; - if ( mipInt < cubeUV_maxMipLevel ) { - uv.y += 2.0 * cubeUV_maxTileSize; - } - uv.y += filterInt * 2.0 * cubeUV_minTileSize; - uv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize ); - uv *= texelSize; - vec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb; - uv.x += texelSize; - vec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb; - uv.y += texelSize; - vec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb; - uv.x -= texelSize; - vec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb; - vec3 tm = mix( tl, tr, f.x ); - vec3 bm = mix( bl, br, f.x ); - return mix( tm, bm, f.y ); - } - #define r0 1.0 - #define v0 0.339 - #define m0 - 2.0 - #define r1 0.8 - #define v1 0.276 - #define m1 - 1.0 - #define r4 0.4 - #define v4 0.046 - #define m4 2.0 - #define r5 0.305 - #define v5 0.016 - #define m5 3.0 - #define r6 0.21 - #define v6 0.0038 - #define m6 4.0 - float roughnessToMip( float roughness ) { - float mip = 0.0; - if ( roughness >= r1 ) { - mip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0; - } else if ( roughness >= r4 ) { - mip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1; - } else if ( roughness >= r5 ) { - mip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4; - } else if ( roughness >= r6 ) { - mip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5; - } else { - mip = - 2.0 * log2( 1.16 * roughness ); } - return mip; - } - vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { - float mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel ); - float mipF = fract( mip ); - float mipInt = floor( mip ); - vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); - if ( mipF == 0.0 ) { - return vec4( color0, 1.0 ); - } else { - vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); - return vec4( mix( color0, color1, mipF ), 1.0 ); - } - } -#endif`,zie=`vec3 transformedNormal = objectNormal; -#ifdef USE_INSTANCING - mat3 m = mat3( instanceMatrix ); - transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) ); - transformedNormal = m * transformedNormal; -#endif -transformedNormal = normalMatrix * transformedNormal; -#ifdef FLIP_SIDED - transformedNormal = - transformedNormal; -#endif -#ifdef USE_TANGENT - vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz; - #ifdef FLIP_SIDED - transformedTangent = - transformedTangent; - #endif -#endif`,Uie=`#ifdef USE_DISPLACEMENTMAP - uniform sampler2D displacementMap; - uniform float displacementScale; - uniform float displacementBias; -#endif`,Hie=`#ifdef USE_DISPLACEMENTMAP - transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias ); -#endif`,Gie=`#ifdef USE_EMISSIVEMAP - vec4 emissiveColor = texture2D( emissiveMap, vUv ); - emissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb; - totalEmissiveRadiance *= emissiveColor.rgb; -#endif`,jie=`#ifdef USE_EMISSIVEMAP - uniform sampler2D emissiveMap; -#endif`,Wie="gl_FragColor = linearToOutputTexel( gl_FragColor );",$ie=` -vec4 LinearToLinear( in vec4 value ) { - return value; -} -vec4 GammaToLinear( in vec4 value, in float gammaFactor ) { - return vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a ); -} -vec4 LinearToGamma( in vec4 value, in float gammaFactor ) { - return vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a ); -} -vec4 sRGBToLinear( in vec4 value ) { - return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a ); -} -vec4 LinearTosRGB( in vec4 value ) { - return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); -} -vec4 RGBEToLinear( in vec4 value ) { - return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 ); -} -vec4 LinearToRGBE( in vec4 value ) { - float maxComponent = max( max( value.r, value.g ), value.b ); - float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 ); - return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 ); -} -vec4 RGBMToLinear( in vec4 value, in float maxRange ) { - return vec4( value.rgb * value.a * maxRange, 1.0 ); -} -vec4 LinearToRGBM( in vec4 value, in float maxRange ) { - float maxRGB = max( value.r, max( value.g, value.b ) ); - float M = clamp( maxRGB / maxRange, 0.0, 1.0 ); - M = ceil( M * 255.0 ) / 255.0; - return vec4( value.rgb / ( M * maxRange ), M ); -} -vec4 RGBDToLinear( in vec4 value, in float maxRange ) { - return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 ); -} -vec4 LinearToRGBD( in vec4 value, in float maxRange ) { - float maxRGB = max( value.r, max( value.g, value.b ) ); - float D = max( maxRange / maxRGB, 1.0 ); - D = clamp( floor( D ) / 255.0, 0.0, 1.0 ); - return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D ); -} -const mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 ); -vec4 LinearToLogLuv( in vec4 value ) { - vec3 Xp_Y_XYZp = cLogLuvM * value.rgb; - Xp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) ); - vec4 vResult; - vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z; - float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0; - vResult.w = fract( Le ); - vResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0; - return vResult; -} -const mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 ); -vec4 LogLuvToLinear( in vec4 value ) { - float Le = value.z * 255.0 + value.w; - vec3 Xp_Y_XYZp; - Xp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 ); - Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y; - Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z; - vec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb; - return vec4( max( vRGB, 0.0 ), 1.0 ); -}`,qie=`#ifdef USE_ENVMAP - #ifdef ENV_WORLDPOS - vec3 cameraToFrag; - if ( isOrthographic ) { - cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); - } else { - cameraToFrag = normalize( vWorldPosition - cameraPosition ); - } - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - #ifdef ENVMAP_MODE_REFLECTION - vec3 reflectVec = reflect( cameraToFrag, worldNormal ); - #else - vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); - #endif - #else - vec3 reflectVec = vReflect; - #endif - #ifdef ENVMAP_TYPE_CUBE - vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); - envColor = envMapTexelToLinear( envColor ); - #elif defined( ENVMAP_TYPE_CUBE_UV ) - vec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 ); - #else - vec4 envColor = vec4( 0.0 ); - #endif - #ifdef ENVMAP_BLENDING_MULTIPLY - outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); - #elif defined( ENVMAP_BLENDING_MIX ) - outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); - #elif defined( ENVMAP_BLENDING_ADD ) - outgoingLight += envColor.xyz * specularStrength * reflectivity; - #endif -#endif`,Yie=`#ifdef USE_ENVMAP - uniform float envMapIntensity; - uniform float flipEnvMap; - uniform int maxMipLevel; - #ifdef ENVMAP_TYPE_CUBE - uniform samplerCube envMap; - #else - uniform sampler2D envMap; - #endif - -#endif`,Xie=`#ifdef USE_ENVMAP - uniform float reflectivity; - #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) - #define ENV_WORLDPOS - #endif - #ifdef ENV_WORLDPOS - varying vec3 vWorldPosition; - uniform float refractionRatio; - #else - varying vec3 vReflect; - #endif -#endif`,Zie=`#ifdef USE_ENVMAP - #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG ) - #define ENV_WORLDPOS - #endif - #ifdef ENV_WORLDPOS - - varying vec3 vWorldPosition; - #else - varying vec3 vReflect; - uniform float refractionRatio; - #endif -#endif`,Qie=`#ifdef USE_ENVMAP - #ifdef ENV_WORLDPOS - vWorldPosition = worldPosition.xyz; - #else - vec3 cameraToVertex; - if ( isOrthographic ) { - cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); - } else { - cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); - } - vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); - #ifdef ENVMAP_MODE_REFLECTION - vReflect = reflect( cameraToVertex, worldNormal ); - #else - vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); - #endif - #endif -#endif`,Kie=`#ifdef USE_FOG - vFogDepth = - mvPosition.z; -#endif`,Jie=`#ifdef USE_FOG - varying float vFogDepth; -#endif`,ere=`#ifdef USE_FOG - #ifdef FOG_EXP2 - float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); - #else - float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); - #endif - gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); -#endif`,tre=`#ifdef USE_FOG - uniform vec3 fogColor; - varying float vFogDepth; - #ifdef FOG_EXP2 - uniform float fogDensity; - #else - uniform float fogNear; - uniform float fogFar; - #endif -#endif`,nre=`#ifdef USE_GRADIENTMAP - uniform sampler2D gradientMap; -#endif -vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { - float dotNL = dot( normal, lightDirection ); - vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); - #ifdef USE_GRADIENTMAP - return texture2D( gradientMap, coord ).rgb; - #else - return ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 ); - #endif -}`,ire=`#ifdef USE_LIGHTMAP - vec4 lightMapTexel = texture2D( lightMap, vUv2 ); - vec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity; - #ifndef PHYSICALLY_CORRECT_LIGHTS - lightMapIrradiance *= PI; - #endif - reflectedLight.indirectDiffuse += lightMapIrradiance; -#endif`,rre=`#ifdef USE_LIGHTMAP - uniform sampler2D lightMap; - uniform float lightMapIntensity; -#endif`,ore=`vec3 diffuse = vec3( 1.0 ); -GeometricContext geometry; -geometry.position = mvPosition.xyz; -geometry.normal = normalize( transformedNormal ); -geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz ); -GeometricContext backGeometry; -backGeometry.position = geometry.position; -backGeometry.normal = -geometry.normal; -backGeometry.viewDir = geometry.viewDir; -vLightFront = vec3( 0.0 ); -vIndirectFront = vec3( 0.0 ); -#ifdef DOUBLE_SIDED - vLightBack = vec3( 0.0 ); - vIndirectBack = vec3( 0.0 ); -#endif -IncidentLight directLight; -float dotNL; -vec3 directLightColor_Diffuse; -vIndirectFront += getAmbientLightIrradiance( ambientLightColor ); -vIndirectFront += getLightProbeIrradiance( lightProbe, geometry.normal ); -#ifdef DOUBLE_SIDED - vIndirectBack += getAmbientLightIrradiance( ambientLightColor ); - vIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry.normal ); -#endif -#if NUM_POINT_LIGHTS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { - getPointLightInfo( pointLights[ i ], geometry, directLight ); - dotNL = dot( geometry.normal, directLight.direction ); - directLightColor_Diffuse = directLight.color; - vLightFront += saturate( dotNL ) * directLightColor_Diffuse; - #ifdef DOUBLE_SIDED - vLightBack += saturate( - dotNL ) * directLightColor_Diffuse; - #endif - } - #pragma unroll_loop_end -#endif -#if NUM_SPOT_LIGHTS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { - getSpotLightInfo( spotLights[ i ], geometry, directLight ); - dotNL = dot( geometry.normal, directLight.direction ); - directLightColor_Diffuse = directLight.color; - vLightFront += saturate( dotNL ) * directLightColor_Diffuse; - #ifdef DOUBLE_SIDED - vLightBack += saturate( - dotNL ) * directLightColor_Diffuse; - #endif - } - #pragma unroll_loop_end -#endif -#if NUM_DIR_LIGHTS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { - getDirectionalLightInfo( directionalLights[ i ], geometry, directLight ); - dotNL = dot( geometry.normal, directLight.direction ); - directLightColor_Diffuse = directLight.color; - vLightFront += saturate( dotNL ) * directLightColor_Diffuse; - #ifdef DOUBLE_SIDED - vLightBack += saturate( - dotNL ) * directLightColor_Diffuse; - #endif - } - #pragma unroll_loop_end -#endif -#if NUM_HEMI_LIGHTS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { - vIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal ); - #ifdef DOUBLE_SIDED - vIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry.normal ); - #endif - } - #pragma unroll_loop_end -#endif`,sre=`uniform bool receiveShadow; -uniform vec3 ambientLightColor; -uniform vec3 lightProbe[ 9 ]; -vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { - float x = normal.x, y = normal.y, z = normal.z; - vec3 result = shCoefficients[ 0 ] * 0.886227; - result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; - result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; - result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; - result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; - result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; - result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); - result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; - result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); - return result; -} -vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); - return irradiance; -} -vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { - vec3 irradiance = ambientLightColor; - return irradiance; -} -float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { - #if defined ( PHYSICALLY_CORRECT_LIGHTS ) - float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); - if ( cutoffDistance > 0.0 ) { - distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); - } - return distanceFalloff; - #else - if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) { - return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent ); - } - return 1.0; - #endif -} -float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { - return smoothstep( coneCosine, penumbraCosine, angleCosine ); -} -#if NUM_DIR_LIGHTS > 0 - struct DirectionalLight { - vec3 direction; - vec3 color; - }; - uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; - void getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) { - light.color = directionalLight.color; - light.direction = directionalLight.direction; - light.visible = true; - } -#endif -#if NUM_POINT_LIGHTS > 0 - struct PointLight { - vec3 position; - vec3 color; - float distance; - float decay; - }; - uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; - void getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) { - vec3 lVector = pointLight.position - geometry.position; - light.direction = normalize( lVector ); - float lightDistance = length( lVector ); - light.color = pointLight.color; - light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); - light.visible = ( light.color != vec3( 0.0 ) ); - } -#endif -#if NUM_SPOT_LIGHTS > 0 - struct SpotLight { - vec3 position; - vec3 direction; - vec3 color; - float distance; - float decay; - float coneCos; - float penumbraCos; - }; - uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; - void getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) { - vec3 lVector = spotLight.position - geometry.position; - light.direction = normalize( lVector ); - float angleCos = dot( light.direction, spotLight.direction ); - float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); - if ( spotAttenuation > 0.0 ) { - float lightDistance = length( lVector ); - light.color = spotLight.color * spotAttenuation; - light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); - light.visible = ( light.color != vec3( 0.0 ) ); - } else { - light.color = vec3( 0.0 ); - light.visible = false; - } - } -#endif -#if NUM_RECT_AREA_LIGHTS > 0 - struct RectAreaLight { - vec3 color; - vec3 position; - vec3 halfWidth; - vec3 halfHeight; - }; - uniform sampler2D ltc_1; uniform sampler2D ltc_2; - uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; -#endif -#if NUM_HEMI_LIGHTS > 0 - struct HemisphereLight { - vec3 direction; - vec3 skyColor; - vec3 groundColor; - }; - uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; - vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { - float dotNL = dot( normal, hemiLight.direction ); - float hemiDiffuseWeight = 0.5 * dotNL + 0.5; - vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); - return irradiance; - } -#endif`,are=`#if defined( USE_ENVMAP ) - #ifdef ENVMAP_MODE_REFRACTION - uniform float refractionRatio; - #endif - vec3 getIBLIrradiance( const in vec3 normal ) { - #if defined( ENVMAP_TYPE_CUBE_UV ) - vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); - vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 ); - return PI * envMapColor.rgb * envMapIntensity; - #else - return vec3( 0.0 ); - #endif - } - vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { - #if defined( ENVMAP_TYPE_CUBE_UV ) - vec3 reflectVec; - #ifdef ENVMAP_MODE_REFLECTION - reflectVec = reflect( - viewDir, normal ); - reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); - #else - reflectVec = refract( - viewDir, normal, refractionRatio ); - #endif - reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); - vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ); - return envMapColor.rgb * envMapIntensity; - #else - return vec3( 0.0 ); - #endif - } -#endif`,cre=`ToonMaterial material; -material.diffuseColor = diffuseColor.rgb;`,lre=`varying vec3 vViewPosition; -struct ToonMaterial { - vec3 diffuseColor; -}; -void RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { - vec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_Toon -#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon -#define Material_LightProbeLOD( material ) (0)`,dre=`BlinnPhongMaterial material; -material.diffuseColor = diffuseColor.rgb; -material.specularColor = specular; -material.specularShininess = shininess; -material.specularStrength = specularStrength;`,ure=`varying vec3 vViewPosition; -struct BlinnPhongMaterial { - vec3 diffuseColor; - vec3 specularColor; - float specularShininess; - float specularStrength; -}; -void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); - reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength; -} -void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -#define RE_Direct RE_Direct_BlinnPhong -#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong -#define Material_LightProbeLOD( material ) (0)`,hre=`PhysicalMaterial material; -material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); -vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) ); -float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); -material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; -material.roughness = min( material.roughness, 1.0 ); -#ifdef IOR - #ifdef SPECULAR - float specularIntensityFactor = specularIntensity; - vec3 specularColorFactor = specularColor; - #ifdef USE_SPECULARINTENSITYMAP - specularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a; - #endif - #ifdef USE_SPECULARCOLORMAP - specularColorFactor *= specularColorMapTexelToLinear( texture2D( specularColorMap, vUv ) ).rgb; - #endif - material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); - #else - float specularIntensityFactor = 1.0; - vec3 specularColorFactor = vec3( 1.0 ); - material.specularF90 = 1.0; - #endif - material.specularColor = mix( min( pow2( ( ior - 1.0 ) / ( ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); -#else - material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); - material.specularF90 = 1.0; -#endif -#ifdef USE_CLEARCOAT - material.clearcoat = clearcoat; - material.clearcoatRoughness = clearcoatRoughness; - material.clearcoatF0 = vec3( 0.04 ); - material.clearcoatF90 = 1.0; - #ifdef USE_CLEARCOATMAP - material.clearcoat *= texture2D( clearcoatMap, vUv ).x; - #endif - #ifdef USE_CLEARCOAT_ROUGHNESSMAP - material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y; - #endif - material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); - material.clearcoatRoughness += geometryRoughness; - material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); -#endif -#ifdef USE_SHEEN - material.sheenColor = sheenColor; - #ifdef USE_SHEENCOLORMAP - material.sheenColor *= sheenColorMapTexelToLinear( texture2D( sheenColorMap, vUv ) ).rgb; - #endif - material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); - #ifdef USE_SHEENROUGHNESSMAP - material.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a; - #endif -#endif`,pre=`struct PhysicalMaterial { - vec3 diffuseColor; - float roughness; - vec3 specularColor; - float specularF90; - #ifdef USE_CLEARCOAT - float clearcoat; - float clearcoatRoughness; - vec3 clearcoatF0; - float clearcoatF90; - #endif - #ifdef USE_SHEEN - vec3 sheenColor; - float sheenRoughness; - #endif -}; -vec3 clearcoatSpecular = vec3( 0.0 ); -vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { - float dotNV = saturate( dot( normal, viewDir ) ); - const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); - const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); - vec4 r = roughness * c0 + c1; - float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; - vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; - return fab; -} -vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { - vec2 fab = DFGApprox( normal, viewDir, roughness ); - return specularColor * fab.x + specularF90 * fab.y; -} -void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { - vec2 fab = DFGApprox( normal, viewDir, roughness ); - vec3 FssEss = specularColor * fab.x + specularF90 * fab.y; - float Ess = fab.x + fab.y; - float Ems = 1.0 - Ess; - vec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); - singleScatter += FssEss; - multiScatter += Fms * Ems; -} -#if NUM_RECT_AREA_LIGHTS > 0 - void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - vec3 normal = geometry.normal; - vec3 viewDir = geometry.viewDir; - vec3 position = geometry.position; - vec3 lightPos = rectAreaLight.position; - vec3 halfWidth = rectAreaLight.halfWidth; - vec3 halfHeight = rectAreaLight.halfHeight; - vec3 lightColor = rectAreaLight.color; - float roughness = material.roughness; - vec3 rectCoords[ 4 ]; - rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; - rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; - rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; - vec2 uv = LTC_Uv( normal, viewDir, roughness ); - vec4 t1 = texture2D( ltc_1, uv ); - vec4 t2 = texture2D( ltc_2, uv ); - mat3 mInv = mat3( - vec3( t1.x, 0, t1.y ), - vec3( 0, 1, 0 ), - vec3( t1.z, 0, t1.w ) - ); - vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); - reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); - reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); - } -#endif -void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); - vec3 irradiance = dotNL * directLight.color; - #ifdef USE_CLEARCOAT - float dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) ); - vec3 ccIrradiance = dotNLcc * directLight.color; - clearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); - #endif - #ifdef USE_SHEEN - reflectedLight.directSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness ); - #endif - reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness ); - reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { - reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); -} -void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { - #ifdef USE_CLEARCOAT - clearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); - #endif - vec3 singleScattering = vec3( 0.0 ); - vec3 multiScattering = vec3( 0.0 ); - vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; - computeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); - vec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) ); - reflectedLight.indirectSpecular += radiance * singleScattering; - reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; - reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; -} -#define RE_Direct RE_Direct_Physical -#define RE_Direct_RectArea RE_Direct_RectArea_Physical -#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical -#define RE_IndirectSpecular RE_IndirectSpecular_Physical -float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { - return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); -}`,fre=` -GeometricContext geometry; -geometry.position = - vViewPosition; -geometry.normal = normal; -geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); -#ifdef USE_CLEARCOAT - geometry.clearcoatNormal = clearcoatNormal; -#endif -IncidentLight directLight; -#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) - PointLight pointLight; - #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 - PointLightShadow pointLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { - pointLight = pointLights[ i ]; - getPointLightInfo( pointLight, geometry, directLight ); - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) - pointLightShadow = pointLightShadows[ i ]; - directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; - #endif - RE_Direct( directLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) - SpotLight spotLight; - #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 - SpotLightShadow spotLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { - spotLight = spotLights[ i ]; - getSpotLightInfo( spotLight, geometry, directLight ); - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) - spotLightShadow = spotLightShadows[ i ]; - directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0; - #endif - RE_Direct( directLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) - DirectionalLight directionalLight; - #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 - DirectionalLightShadow directionalLightShadow; - #endif - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { - directionalLight = directionalLights[ i ]; - getDirectionalLightInfo( directionalLight, geometry, directLight ); - #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) - directionalLightShadow = directionalLightShadows[ i ]; - directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; - #endif - RE_Direct( directLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) - RectAreaLight rectAreaLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { - rectAreaLight = rectAreaLights[ i ]; - RE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight ); - } - #pragma unroll_loop_end -#endif -#if defined( RE_IndirectDiffuse ) - vec3 iblIrradiance = vec3( 0.0 ); - vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); - irradiance += getLightProbeIrradiance( lightProbe, geometry.normal ); - #if ( NUM_HEMI_LIGHTS > 0 ) - #pragma unroll_loop_start - for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { - irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal ); - } - #pragma unroll_loop_end - #endif -#endif -#if defined( RE_IndirectSpecular ) - vec3 radiance = vec3( 0.0 ); - vec3 clearcoatRadiance = vec3( 0.0 ); -#endif`,mre=`#if defined( RE_IndirectDiffuse ) - #ifdef USE_LIGHTMAP - vec4 lightMapTexel = texture2D( lightMap, vUv2 ); - vec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity; - #ifndef PHYSICALLY_CORRECT_LIGHTS - lightMapIrradiance *= PI; - #endif - irradiance += lightMapIrradiance; - #endif - #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) - iblIrradiance += getIBLIrradiance( geometry.normal ); - #endif -#endif -#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) - radiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness ); - #ifdef USE_CLEARCOAT - clearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness ); - #endif -#endif`,gre=`#if defined( RE_IndirectDiffuse ) - RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight ); -#endif -#if defined( RE_IndirectSpecular ) - RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight ); -#endif`,_re=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) - gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; -#endif`,vre=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) - uniform float logDepthBufFC; - varying float vFragDepth; - varying float vIsPerspective; -#endif`,bre=`#ifdef USE_LOGDEPTHBUF - #ifdef USE_LOGDEPTHBUF_EXT - varying float vFragDepth; - varying float vIsPerspective; - #else - uniform float logDepthBufFC; - #endif -#endif`,yre=`#ifdef USE_LOGDEPTHBUF - #ifdef USE_LOGDEPTHBUF_EXT - vFragDepth = 1.0 + gl_Position.w; - vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); - #else - if ( isPerspectiveMatrix( projectionMatrix ) ) { - gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0; - gl_Position.z *= gl_Position.w; - } - #endif -#endif`,xre=`#ifdef USE_MAP - vec4 texelColor = texture2D( map, vUv ); - texelColor = mapTexelToLinear( texelColor ); - diffuseColor *= texelColor; -#endif`,wre=`#ifdef USE_MAP - uniform sampler2D map; -#endif`,Cre=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) - vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; -#endif -#ifdef USE_MAP - vec4 mapTexel = texture2D( map, uv ); - diffuseColor *= mapTexelToLinear( mapTexel ); -#endif -#ifdef USE_ALPHAMAP - diffuseColor.a *= texture2D( alphaMap, uv ).g; -#endif`,Sre=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) - uniform mat3 uvTransform; -#endif -#ifdef USE_MAP - uniform sampler2D map; -#endif -#ifdef USE_ALPHAMAP - uniform sampler2D alphaMap; -#endif`,Mre=`float metalnessFactor = metalness; -#ifdef USE_METALNESSMAP - vec4 texelMetalness = texture2D( metalnessMap, vUv ); - metalnessFactor *= texelMetalness.b; -#endif`,Ere=`#ifdef USE_METALNESSMAP - uniform sampler2D metalnessMap; -#endif`,Ire=`#ifdef USE_MORPHNORMALS - objectNormal *= morphTargetBaseInfluence; - #ifdef MORPHTARGETS_TEXTURE - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - if ( morphTargetInfluences[ i ] > 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1, 2 ) * morphTargetInfluences[ i ]; - } - #else - objectNormal += morphNormal0 * morphTargetInfluences[ 0 ]; - objectNormal += morphNormal1 * morphTargetInfluences[ 1 ]; - objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; - objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; - #endif -#endif`,Tre=`#ifdef USE_MORPHTARGETS - uniform float morphTargetBaseInfluence; - #ifdef MORPHTARGETS_TEXTURE - uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; - uniform sampler2DArray morphTargetsTexture; - uniform vec2 morphTargetsTextureSize; - vec3 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset, const in int stride ) { - float texelIndex = float( vertexIndex * stride + offset ); - float y = floor( texelIndex / morphTargetsTextureSize.x ); - float x = texelIndex - y * morphTargetsTextureSize.x; - vec3 morphUV = vec3( ( x + 0.5 ) / morphTargetsTextureSize.x, y / morphTargetsTextureSize.y, morphTargetIndex ); - return texture( morphTargetsTexture, morphUV ).xyz; - } - #else - #ifndef USE_MORPHNORMALS - uniform float morphTargetInfluences[ 8 ]; - #else - uniform float morphTargetInfluences[ 4 ]; - #endif - #endif -#endif`,Dre=`#ifdef USE_MORPHTARGETS - transformed *= morphTargetBaseInfluence; - #ifdef MORPHTARGETS_TEXTURE - for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { - #ifndef USE_MORPHNORMALS - if ( morphTargetInfluences[ i ] > 0.0 ) transformed += getMorph( gl_VertexID, i, 0, 1 ) * morphTargetInfluences[ i ]; - #else - if ( morphTargetInfluences[ i ] > 0.0 ) transformed += getMorph( gl_VertexID, i, 0, 2 ) * morphTargetInfluences[ i ]; - #endif - } - #else - transformed += morphTarget0 * morphTargetInfluences[ 0 ]; - transformed += morphTarget1 * morphTargetInfluences[ 1 ]; - transformed += morphTarget2 * morphTargetInfluences[ 2 ]; - transformed += morphTarget3 * morphTargetInfluences[ 3 ]; - #ifndef USE_MORPHNORMALS - transformed += morphTarget4 * morphTargetInfluences[ 4 ]; - transformed += morphTarget5 * morphTargetInfluences[ 5 ]; - transformed += morphTarget6 * morphTargetInfluences[ 6 ]; - transformed += morphTarget7 * morphTargetInfluences[ 7 ]; - #endif - #endif -#endif`,Pre=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; -#ifdef FLAT_SHADED - vec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) ); - vec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) ); - vec3 normal = normalize( cross( fdx, fdy ) ); -#else - vec3 normal = normalize( vNormal ); - #ifdef DOUBLE_SIDED - normal = normal * faceDirection; - #endif - #ifdef USE_TANGENT - vec3 tangent = normalize( vTangent ); - vec3 bitangent = normalize( vBitangent ); - #ifdef DOUBLE_SIDED - tangent = tangent * faceDirection; - bitangent = bitangent * faceDirection; - #endif - #if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP ) - mat3 vTBN = mat3( tangent, bitangent, normal ); - #endif - #endif -#endif -vec3 geometryNormal = normal;`,Ore=`#ifdef OBJECTSPACE_NORMALMAP - normal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; - #ifdef FLIP_SIDED - normal = - normal; - #endif - #ifdef DOUBLE_SIDED - normal = normal * faceDirection; - #endif - normal = normalize( normalMatrix * normal ); -#elif defined( TANGENTSPACE_NORMALMAP ) - vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; - mapN.xy *= normalScale; - #ifdef USE_TANGENT - normal = normalize( vTBN * mapN ); - #else - normal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection ); - #endif -#elif defined( USE_BUMPMAP ) - normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); -#endif`,Rre=`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif`,Are=`#ifndef FLAT_SHADED - varying vec3 vNormal; - #ifdef USE_TANGENT - varying vec3 vTangent; - varying vec3 vBitangent; - #endif -#endif`,Nre=`#ifndef FLAT_SHADED - vNormal = normalize( transformedNormal ); - #ifdef USE_TANGENT - vTangent = normalize( transformedTangent ); - vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); - #endif -#endif`,kre=`#ifdef USE_NORMALMAP - uniform sampler2D normalMap; - uniform vec2 normalScale; -#endif -#ifdef OBJECTSPACE_NORMALMAP - uniform mat3 normalMatrix; -#endif -#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) ) - vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) { - vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) ); - vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) ); - vec2 st0 = dFdx( vUv.st ); - vec2 st1 = dFdy( vUv.st ); - vec3 N = surf_norm; - vec3 q1perp = cross( q1, N ); - vec3 q0perp = cross( N, q0 ); - vec3 T = q1perp * st0.x + q0perp * st1.x; - vec3 B = q1perp * st0.y + q0perp * st1.y; - float det = max( dot( T, T ), dot( B, B ) ); - float scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det ); - return normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z ); - } -#endif`,Lre=`#ifdef USE_CLEARCOAT - vec3 clearcoatNormal = geometryNormal; -#endif`,Fre=`#ifdef USE_CLEARCOAT_NORMALMAP - vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0; - clearcoatMapN.xy *= clearcoatNormalScale; - #ifdef USE_TANGENT - clearcoatNormal = normalize( vTBN * clearcoatMapN ); - #else - clearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection ); - #endif -#endif`,Bre=`#ifdef USE_CLEARCOATMAP - uniform sampler2D clearcoatMap; -#endif -#ifdef USE_CLEARCOAT_ROUGHNESSMAP - uniform sampler2D clearcoatRoughnessMap; -#endif -#ifdef USE_CLEARCOAT_NORMALMAP - uniform sampler2D clearcoatNormalMap; - uniform vec2 clearcoatNormalScale; -#endif`,Vre=`#ifdef OPAQUE -diffuseColor.a = 1.0; -#endif -#ifdef USE_TRANSMISSION -diffuseColor.a *= transmissionAlpha + 0.1; -#endif -gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,zre=`vec3 packNormalToRGB( const in vec3 normal ) { - return normalize( normal ) * 0.5 + 0.5; -} -vec3 unpackRGBToNormal( const in vec3 rgb ) { - return 2.0 * rgb.xyz - 1.0; -} -const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.; -const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); -const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); -const float ShiftRight8 = 1. / 256.; -vec4 packDepthToRGBA( const in float v ) { - vec4 r = vec4( fract( v * PackFactors ), v ); - r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale; -} -float unpackRGBAToDepth( const in vec4 v ) { - return dot( v, UnpackFactors ); -} -vec4 pack2HalfToRGBA( vec2 v ) { - vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); - return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); -} -vec2 unpackRGBATo2Half( vec4 v ) { - return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); -} -float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { - return ( viewZ + near ) / ( near - far ); -} -float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) { - return linearClipZ * ( near - far ) - near; -} -float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { - return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); -} -float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) { - return ( near * far ) / ( ( far - near ) * invClipZ - far ); -}`,Ure=`#ifdef PREMULTIPLIED_ALPHA - gl_FragColor.rgb *= gl_FragColor.a; -#endif`,Hre=`vec4 mvPosition = vec4( transformed, 1.0 ); -#ifdef USE_INSTANCING - mvPosition = instanceMatrix * mvPosition; -#endif -mvPosition = modelViewMatrix * mvPosition; -gl_Position = projectionMatrix * mvPosition;`,Gre=`#ifdef DITHERING - gl_FragColor.rgb = dithering( gl_FragColor.rgb ); -#endif`,jre=`#ifdef DITHERING - vec3 dithering( vec3 color ) { - float grid_position = rand( gl_FragCoord.xy ); - vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); - dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); - return color + dither_shift_RGB; - } -#endif`,Wre=`float roughnessFactor = roughness; -#ifdef USE_ROUGHNESSMAP - vec4 texelRoughness = texture2D( roughnessMap, vUv ); - roughnessFactor *= texelRoughness.g; -#endif`,$re=`#ifdef USE_ROUGHNESSMAP - uniform sampler2D roughnessMap; -#endif`,qre=`#ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; - varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; - struct DirectionalLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; - varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ]; - struct SpotLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; - varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; - struct PointLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - float shadowCameraNear; - float shadowCameraFar; - }; - uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; - #endif - float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { - return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); - } - vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { - return unpackRGBATo2Half( texture2D( shadow, uv ) ); - } - float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ - float occlusion = 1.0; - vec2 distribution = texture2DDistribution( shadow, uv ); - float hard_shadow = step( compare , distribution.x ); - if (hard_shadow != 1.0 ) { - float distance = compare - distribution.x ; - float variance = max( 0.00000, distribution.y * distribution.y ); - float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); - } - return occlusion; - } - float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { - float shadow = 1.0; - shadowCoord.xyz /= shadowCoord.w; - shadowCoord.z += shadowBias; - bvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 ); - bool inFrustum = all( inFrustumVec ); - bvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 ); - bool frustumTest = all( frustumTestVec ); - if ( frustumTest ) { - #if defined( SHADOWMAP_TYPE_PCF ) - vec2 texelSize = vec2( 1.0 ) / shadowMapSize; - float dx0 = - texelSize.x * shadowRadius; - float dy0 = - texelSize.y * shadowRadius; - float dx1 = + texelSize.x * shadowRadius; - float dy1 = + texelSize.y * shadowRadius; - float dx2 = dx0 / 2.0; - float dy2 = dy0 / 2.0; - float dx3 = dx1 / 2.0; - float dy3 = dy1 / 2.0; - shadow = ( - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + - texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) - ) * ( 1.0 / 17.0 ); - #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) - vec2 texelSize = vec2( 1.0 ) / shadowMapSize; - float dx = texelSize.x; - float dy = texelSize.y; - vec2 uv = shadowCoord.xy; - vec2 f = fract( uv * shadowMapSize + 0.5 ); - uv -= f * texelSize; - shadow = ( - texture2DCompare( shadowMap, uv, shadowCoord.z ) + - texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + - texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + - texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + - mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), - f.x ) + - mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), - f.x ) + - mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), - f.y ) + - mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), - f.y ) + - mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), - f.x ), - mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), - texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), - f.x ), - f.y ) - ) * ( 1.0 / 9.0 ); - #elif defined( SHADOWMAP_TYPE_VSM ) - shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); - #else - shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); - #endif - } - return shadow; - } - vec2 cubeToUV( vec3 v, float texelSizeY ) { - vec3 absV = abs( v ); - float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); - absV *= scaleToCube; - v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); - vec2 planar = v.xy; - float almostATexel = 1.5 * texelSizeY; - float almostOne = 1.0 - almostATexel; - if ( absV.z >= almostOne ) { - if ( v.z > 0.0 ) - planar.x = 4.0 - v.x; - } else if ( absV.x >= almostOne ) { - float signX = sign( v.x ); - planar.x = v.z * signX + 2.0 * signX; - } else if ( absV.y >= almostOne ) { - float signY = sign( v.y ); - planar.x = v.x + 2.0 * signY + 2.0; - planar.y = v.z * signY - 2.0; - } - return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); - } - float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { - vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); - vec3 lightToPosition = shadowCoord.xyz; - float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; - vec3 bd3D = normalize( lightToPosition ); - #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) - vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; - return ( - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + - texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) - ) * ( 1.0 / 9.0 ); - #else - return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); - #endif - } -#endif`,Yre=`#ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; - varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; - struct DirectionalLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - uniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ]; - varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ]; - struct SpotLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - }; - uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; - varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; - struct PointLightShadow { - float shadowBias; - float shadowNormalBias; - float shadowRadius; - vec2 shadowMapSize; - float shadowCameraNear; - float shadowCameraFar; - }; - uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; - #endif -#endif`,Xre=`#ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 - vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); - vec4 shadowWorldPosition; - #endif - #if NUM_DIR_LIGHT_SHADOWS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { - shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); - vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { - shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 ); - vSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { - shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); - vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; - } - #pragma unroll_loop_end - #endif -#endif`,Zre=`float getShadowMask() { - float shadow = 1.0; - #ifdef USE_SHADOWMAP - #if NUM_DIR_LIGHT_SHADOWS > 0 - DirectionalLightShadow directionalLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { - directionalLight = directionalLightShadows[ i ]; - shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; - } - #pragma unroll_loop_end - #endif - #if NUM_SPOT_LIGHT_SHADOWS > 0 - SpotLightShadow spotLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { - spotLight = spotLightShadows[ i ]; - shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0; - } - #pragma unroll_loop_end - #endif - #if NUM_POINT_LIGHT_SHADOWS > 0 - PointLightShadow pointLight; - #pragma unroll_loop_start - for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { - pointLight = pointLightShadows[ i ]; - shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; - } - #pragma unroll_loop_end - #endif - #endif - return shadow; -}`,Qre=`#ifdef USE_SKINNING - mat4 boneMatX = getBoneMatrix( skinIndex.x ); - mat4 boneMatY = getBoneMatrix( skinIndex.y ); - mat4 boneMatZ = getBoneMatrix( skinIndex.z ); - mat4 boneMatW = getBoneMatrix( skinIndex.w ); -#endif`,Kre=`#ifdef USE_SKINNING - uniform mat4 bindMatrix; - uniform mat4 bindMatrixInverse; - #ifdef BONE_TEXTURE - uniform highp sampler2D boneTexture; - uniform int boneTextureSize; - mat4 getBoneMatrix( const in float i ) { - float j = i * 4.0; - float x = mod( j, float( boneTextureSize ) ); - float y = floor( j / float( boneTextureSize ) ); - float dx = 1.0 / float( boneTextureSize ); - float dy = 1.0 / float( boneTextureSize ); - y = dy * ( y + 0.5 ); - vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) ); - vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) ); - vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) ); - vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) ); - mat4 bone = mat4( v1, v2, v3, v4 ); - return bone; - } - #else - uniform mat4 boneMatrices[ MAX_BONES ]; - mat4 getBoneMatrix( const in float i ) { - mat4 bone = boneMatrices[ int(i) ]; - return bone; - } - #endif -#endif`,Jre=`#ifdef USE_SKINNING - vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); - vec4 skinned = vec4( 0.0 ); - skinned += boneMatX * skinVertex * skinWeight.x; - skinned += boneMatY * skinVertex * skinWeight.y; - skinned += boneMatZ * skinVertex * skinWeight.z; - skinned += boneMatW * skinVertex * skinWeight.w; - transformed = ( bindMatrixInverse * skinned ).xyz; -#endif`,eoe=`#ifdef USE_SKINNING - mat4 skinMatrix = mat4( 0.0 ); - skinMatrix += skinWeight.x * boneMatX; - skinMatrix += skinWeight.y * boneMatY; - skinMatrix += skinWeight.z * boneMatZ; - skinMatrix += skinWeight.w * boneMatW; - skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; - objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; - #ifdef USE_TANGENT - objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; - #endif -#endif`,toe=`float specularStrength; -#ifdef USE_SPECULARMAP - vec4 texelSpecular = texture2D( specularMap, vUv ); - specularStrength = texelSpecular.r; -#else - specularStrength = 1.0; -#endif`,noe=`#ifdef USE_SPECULARMAP - uniform sampler2D specularMap; -#endif`,ioe=`#if defined( TONE_MAPPING ) - gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); -#endif`,roe=`#ifndef saturate -#define saturate( a ) clamp( a, 0.0, 1.0 ) -#endif -uniform float toneMappingExposure; -vec3 LinearToneMapping( vec3 color ) { - return toneMappingExposure * color; -} -vec3 ReinhardToneMapping( vec3 color ) { - color *= toneMappingExposure; - return saturate( color / ( vec3( 1.0 ) + color ) ); -} -vec3 OptimizedCineonToneMapping( vec3 color ) { - color *= toneMappingExposure; - color = max( vec3( 0.0 ), color - 0.004 ); - return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); -} -vec3 RRTAndODTFit( vec3 v ) { - vec3 a = v * ( v + 0.0245786 ) - 0.000090537; - vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; - return a / b; -} -vec3 ACESFilmicToneMapping( vec3 color ) { - const mat3 ACESInputMat = mat3( - vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), - vec3( 0.04823, 0.01566, 0.83777 ) - ); - const mat3 ACESOutputMat = mat3( - vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), - vec3( -0.07367, -0.00605, 1.07602 ) - ); - color *= toneMappingExposure / 0.6; - color = ACESInputMat * color; - color = RRTAndODTFit( color ); - color = ACESOutputMat * color; - return saturate( color ); -} -vec3 CustomToneMapping( vec3 color ) { return color; }`,ooe=`#ifdef USE_TRANSMISSION - float transmissionAlpha = 1.0; - float transmissionFactor = transmission; - float thicknessFactor = thickness; - #ifdef USE_TRANSMISSIONMAP - transmissionFactor *= texture2D( transmissionMap, vUv ).r; - #endif - #ifdef USE_THICKNESSMAP - thicknessFactor *= texture2D( thicknessMap, vUv ).g; - #endif - vec3 pos = vWorldPosition; - vec3 v = normalize( cameraPosition - pos ); - vec3 n = inverseTransformDirection( normal, viewMatrix ); - vec4 transmission = getIBLVolumeRefraction( - n, v, roughnessFactor, material.diffuseColor, material.specularColor, material.specularF90, - pos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor, - attenuationColor, attenuationDistance ); - totalDiffuse = mix( totalDiffuse, transmission.rgb, transmissionFactor ); - transmissionAlpha = mix( transmissionAlpha, transmission.a, transmissionFactor ); -#endif`,soe=`#ifdef USE_TRANSMISSION - uniform float transmission; - uniform float thickness; - uniform float attenuationDistance; - uniform vec3 attenuationColor; - #ifdef USE_TRANSMISSIONMAP - uniform sampler2D transmissionMap; - #endif - #ifdef USE_THICKNESSMAP - uniform sampler2D thicknessMap; - #endif - uniform vec2 transmissionSamplerSize; - uniform sampler2D transmissionSamplerMap; - uniform mat4 modelMatrix; - uniform mat4 projectionMatrix; - varying vec3 vWorldPosition; - vec3 getVolumeTransmissionRay( vec3 n, vec3 v, float thickness, float ior, mat4 modelMatrix ) { - vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); - vec3 modelScale; - modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); - modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); - modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); - return normalize( refractionVector ) * thickness * modelScale; - } - float applyIorToRoughness( float roughness, float ior ) { - return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); - } - vec4 getTransmissionSample( vec2 fragCoord, float roughness, float ior ) { - float framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); - #ifdef TEXTURE_LOD_EXT - return texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod ); - #else - return texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod ); - #endif - } - vec3 applyVolumeAttenuation( vec3 radiance, float transmissionDistance, vec3 attenuationColor, float attenuationDistance ) { - if ( attenuationDistance == 0.0 ) { - return radiance; - } else { - vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; - vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance * radiance; - } - } - vec4 getIBLVolumeRefraction( vec3 n, vec3 v, float roughness, vec3 diffuseColor, vec3 specularColor, float specularF90, - vec3 position, mat4 modelMatrix, mat4 viewMatrix, mat4 projMatrix, float ior, float thickness, - vec3 attenuationColor, float attenuationDistance ) { - vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); - vec3 refractedRayExit = position + transmissionRay; - vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); - vec2 refractionCoords = ndcPos.xy / ndcPos.w; - refractionCoords += 1.0; - refractionCoords /= 2.0; - vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); - vec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance ); - vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); - return vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a ); - } -#endif`,aoe=`#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) ) - varying vec2 vUv; -#endif`,coe=`#ifdef USE_UV - #ifdef UVS_VERTEX_ONLY - vec2 vUv; - #else - varying vec2 vUv; - #endif - uniform mat3 uvTransform; -#endif`,loe=`#ifdef USE_UV - vUv = ( uvTransform * vec3( uv, 1 ) ).xy; -#endif`,doe=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) - varying vec2 vUv2; -#endif`,uoe=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) - attribute vec2 uv2; - varying vec2 vUv2; - uniform mat3 uv2Transform; -#endif`,hoe=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) - vUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy; -#endif`,poe=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) - vec4 worldPosition = vec4( transformed, 1.0 ); - #ifdef USE_INSTANCING - worldPosition = instanceMatrix * worldPosition; - #endif - worldPosition = modelMatrix * worldPosition; -#endif`,foe=`varying vec2 vUv; -uniform mat3 uvTransform; -void main() { - vUv = ( uvTransform * vec3( uv, 1 ) ).xy; - gl_Position = vec4( position.xy, 1.0, 1.0 ); -}`,moe=`uniform sampler2D t2D; -varying vec2 vUv; -void main() { - vec4 texColor = texture2D( t2D, vUv ); - gl_FragColor = mapTexelToLinear( texColor ); - #include - #include -}`,goe=`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include - gl_Position.z = gl_Position.w; -}`,_oe=`#include -uniform float opacity; -varying vec3 vWorldDirection; -#include -void main() { - vec3 vReflect = vWorldDirection; - #include - gl_FragColor = envColor; - gl_FragColor.a *= opacity; - #include - #include -}`,voe=`#include -#include -#include -#include -#include -#include -#include -varying vec2 vHighPrecisionZW; -void main() { - #include - #include - #ifdef USE_DISPLACEMENTMAP - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - vHighPrecisionZW = gl_Position.zw; -}`,boe=`#if DEPTH_PACKING == 3200 - uniform float opacity; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -varying vec2 vHighPrecisionZW; -void main() { - #include - vec4 diffuseColor = vec4( 1.0 ); - #if DEPTH_PACKING == 3200 - diffuseColor.a = opacity; - #endif - #include - #include - #include - #include - float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; - #if DEPTH_PACKING == 3200 - gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); - #elif DEPTH_PACKING == 3201 - gl_FragColor = packDepthToRGBA( fragCoordZ ); - #endif -}`,yoe=`#define DISTANCE -varying vec3 vWorldPosition; -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #ifdef USE_DISPLACEMENTMAP - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - vWorldPosition = worldPosition.xyz; -}`,xoe=`#define DISTANCE -uniform vec3 referencePosition; -uniform float nearDistance; -uniform float farDistance; -varying vec3 vWorldPosition; -#include -#include -#include -#include -#include -#include -#include -void main () { - #include - vec4 diffuseColor = vec4( 1.0 ); - #include - #include - #include - float dist = length( vWorldPosition - referencePosition ); - dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); - dist = saturate( dist ); - gl_FragColor = packDepthToRGBA( dist ); -}`,woe=`varying vec3 vWorldDirection; -#include -void main() { - vWorldDirection = transformDirection( position, modelMatrix ); - #include - #include -}`,Coe=`uniform sampler2D tEquirect; -varying vec3 vWorldDirection; -#include -void main() { - vec3 direction = normalize( vWorldDirection ); - vec2 sampleUV = equirectUv( direction ); - vec4 texColor = texture2D( tEquirect, sampleUV ); - gl_FragColor = mapTexelToLinear( texColor ); - #include - #include -}`,Soe=`uniform float scale; -attribute float lineDistance; -varying float vLineDistance; -#include -#include -#include -#include -#include -#include -void main() { - vLineDistance = scale * lineDistance; - #include - #include - #include - #include - #include - #include - #include -}`,Moe=`uniform vec3 diffuse; -uniform float opacity; -uniform float dashSize; -uniform float totalSize; -varying float vLineDistance; -#include -#include -#include -#include -#include -void main() { - #include - if ( mod( vLineDistance, totalSize ) > dashSize ) { - discard; - } - vec3 outgoingLight = vec3( 0.0 ); - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include - #include -}`,Eoe=`#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) - #include - #include - #include - #include - #include - #endif - #include - #include - #include - #include - #include - #include - #include - #include - #include -}`,Ioe=`uniform vec3 diffuse; -uniform float opacity; -#ifndef FLAT_SHADED - varying vec3 vNormal; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - #include - #include - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - #ifdef USE_LIGHTMAP - vec4 lightMapTexel= texture2D( lightMap, vUv2 ); - reflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity; - #else - reflectedLight.indirectDiffuse += vec3( 1.0 ); - #endif - #include - reflectedLight.indirectDiffuse *= diffuseColor.rgb; - vec3 outgoingLight = reflectedLight.indirectDiffuse; - #include - #include - #include - #include - #include - #include - #include -}`,Toe=`#define LAMBERT -varying vec3 vLightFront; -varying vec3 vIndirectFront; -#ifdef DOUBLE_SIDED - varying vec3 vLightBack; - varying vec3 vIndirectBack; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -}`,Doe=`uniform vec3 diffuse; -uniform vec3 emissive; -uniform float opacity; -varying vec3 vLightFront; -varying vec3 vIndirectFront; -#ifdef DOUBLE_SIDED - varying vec3 vLightBack; - varying vec3 vIndirectBack; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #ifdef DOUBLE_SIDED - reflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack; - #else - reflectedLight.indirectDiffuse += vIndirectFront; - #endif - #include - reflectedLight.indirectDiffuse *= BRDF_Lambert( diffuseColor.rgb ); - #ifdef DOUBLE_SIDED - reflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack; - #else - reflectedLight.directDiffuse = vLightFront; - #endif - reflectedLight.directDiffuse *= BRDF_Lambert( diffuseColor.rgb ) * getShadowMask(); - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include - #include -}`,Poe=`#define MATCAP -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; -}`,Ooe=`#define MATCAP -uniform vec3 diffuse; -uniform float opacity; -uniform sampler2D matcap; -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - #include - #include - #include - vec3 viewDir = normalize( vViewPosition ); - vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); - vec3 y = cross( viewDir, x ); - vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; - #ifdef USE_MATCAP - vec4 matcapColor = texture2D( matcap, uv ); - matcapColor = matcapTexelToLinear( matcapColor ); - #else - vec4 matcapColor = vec4( 1.0 ); - #endif - vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; - #include - #include - #include - #include - #include - #include -}`,Roe=`#define NORMAL -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) - varying vec3 vViewPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) - vViewPosition = - mvPosition.xyz; -#endif -}`,Aoe=`#define NORMAL -uniform float opacity; -#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) - varying vec3 vViewPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - gl_FragColor = vec4( packNormalToRGB( normal ), opacity ); -}`,Noe=`#define PHONG -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include - #include -}`,koe=`#define PHONG -uniform vec3 diffuse; -uniform vec3 emissive; -uniform vec3 specular; -uniform float shininess; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include - #include -}`,Loe=`#define STANDARD -varying vec3 vViewPosition; -#ifdef USE_TRANSMISSION - varying vec3 vWorldPosition; -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include -#ifdef USE_TRANSMISSION - vWorldPosition = worldPosition.xyz; -#endif -}`,Foe=`#define STANDARD -#ifdef PHYSICAL - #define IOR - #define SPECULAR -#endif -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float roughness; -uniform float metalness; -uniform float opacity; -#ifdef IOR - uniform float ior; -#endif -#ifdef SPECULAR - uniform float specularIntensity; - uniform vec3 specularColor; - #ifdef USE_SPECULARINTENSITYMAP - uniform sampler2D specularIntensityMap; - #endif - #ifdef USE_SPECULARCOLORMAP - uniform sampler2D specularColorMap; - #endif -#endif -#ifdef USE_CLEARCOAT - uniform float clearcoat; - uniform float clearcoatRoughness; -#endif -#ifdef USE_SHEEN - uniform vec3 sheenColor; - uniform float sheenRoughness; - #ifdef USE_SHEENCOLORMAP - uniform sampler2D sheenColorMap; - #endif - #ifdef USE_SHEENROUGHNESSMAP - uniform sampler2D sheenRoughnessMap; - #endif -#endif -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; - vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; - #include - vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; - #ifdef USE_CLEARCOAT - float dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) ); - vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); - outgoingLight = outgoingLight * ( 1.0 - clearcoat * Fcc ) + clearcoatSpecular * clearcoat; - #endif - #include - #include - #include - #include - #include - #include -}`,Boe=`#define TOON -varying vec3 vViewPosition; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vViewPosition = - mvPosition.xyz; - #include - #include - #include -}`,Voe=`#define TOON -uniform vec3 diffuse; -uniform vec3 emissive; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec4 diffuseColor = vec4( diffuse, opacity ); - ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); - vec3 totalEmissiveRadiance = emissive; - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; - #include - #include - #include - #include - #include - #include -}`,zoe=`uniform float size; -uniform float scale; -#include -#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - gl_PointSize = size; - #ifdef USE_SIZEATTENUATION - bool isPerspective = isPerspectiveMatrix( projectionMatrix ); - if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); - #endif - #include - #include - #include - #include -}`,Uoe=`uniform vec3 diffuse; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec3 outgoingLight = vec3( 0.0 ); - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include - #include -}`,Hoe=`#include -#include -#include -#include -#include -void main() { - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include - #include -}`,Goe=`uniform vec3 color; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -void main() { - gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); - #include - #include - #include -}`,joe=`uniform float rotation; -uniform vec2 center; -#include -#include -#include -#include -#include -void main() { - #include - vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); - vec2 scale; - scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); - scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); - #ifndef USE_SIZEATTENUATION - bool isPerspective = isPerspectiveMatrix( projectionMatrix ); - if ( isPerspective ) scale *= - mvPosition.z; - #endif - vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; - vec2 rotatedPosition; - rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; - rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; - mvPosition.xy += rotatedPosition; - gl_Position = projectionMatrix * mvPosition; - #include - #include - #include -}`,Woe=`uniform vec3 diffuse; -uniform float opacity; -#include -#include -#include -#include -#include -#include -#include -#include -void main() { - #include - vec3 outgoingLight = vec3( 0.0 ); - vec4 diffuseColor = vec4( diffuse, opacity ); - #include - #include - #include - #include - outgoingLight = diffuseColor.rgb; - #include - #include - #include - #include -}`,an={alphamap_fragment:yie,alphamap_pars_fragment:xie,alphatest_fragment:wie,alphatest_pars_fragment:Cie,aomap_fragment:Sie,aomap_pars_fragment:Mie,begin_vertex:Eie,beginnormal_vertex:Iie,bsdfs:Tie,bumpmap_pars_fragment:Die,clipping_planes_fragment:Pie,clipping_planes_pars_fragment:Oie,clipping_planes_pars_vertex:Rie,clipping_planes_vertex:Aie,color_fragment:Nie,color_pars_fragment:kie,color_pars_vertex:Lie,color_vertex:Fie,common:Bie,cube_uv_reflection_fragment:Vie,defaultnormal_vertex:zie,displacementmap_pars_vertex:Uie,displacementmap_vertex:Hie,emissivemap_fragment:Gie,emissivemap_pars_fragment:jie,encodings_fragment:Wie,encodings_pars_fragment:$ie,envmap_fragment:qie,envmap_common_pars_fragment:Yie,envmap_pars_fragment:Xie,envmap_pars_vertex:Zie,envmap_physical_pars_fragment:are,envmap_vertex:Qie,fog_vertex:Kie,fog_pars_vertex:Jie,fog_fragment:ere,fog_pars_fragment:tre,gradientmap_pars_fragment:nre,lightmap_fragment:ire,lightmap_pars_fragment:rre,lights_lambert_vertex:ore,lights_pars_begin:sre,lights_toon_fragment:cre,lights_toon_pars_fragment:lre,lights_phong_fragment:dre,lights_phong_pars_fragment:ure,lights_physical_fragment:hre,lights_physical_pars_fragment:pre,lights_fragment_begin:fre,lights_fragment_maps:mre,lights_fragment_end:gre,logdepthbuf_fragment:_re,logdepthbuf_pars_fragment:vre,logdepthbuf_pars_vertex:bre,logdepthbuf_vertex:yre,map_fragment:xre,map_pars_fragment:wre,map_particle_fragment:Cre,map_particle_pars_fragment:Sre,metalnessmap_fragment:Mre,metalnessmap_pars_fragment:Ere,morphnormal_vertex:Ire,morphtarget_pars_vertex:Tre,morphtarget_vertex:Dre,normal_fragment_begin:Pre,normal_fragment_maps:Ore,normal_pars_fragment:Rre,normal_pars_vertex:Are,normal_vertex:Nre,normalmap_pars_fragment:kre,clearcoat_normal_fragment_begin:Lre,clearcoat_normal_fragment_maps:Fre,clearcoat_pars_fragment:Bre,output_fragment:Vre,packing:zre,premultiplied_alpha_fragment:Ure,project_vertex:Hre,dithering_fragment:Gre,dithering_pars_fragment:jre,roughnessmap_fragment:Wre,roughnessmap_pars_fragment:$re,shadowmap_pars_fragment:qre,shadowmap_pars_vertex:Yre,shadowmap_vertex:Xre,shadowmask_pars_fragment:Zre,skinbase_vertex:Qre,skinning_pars_vertex:Kre,skinning_vertex:Jre,skinnormal_vertex:eoe,specularmap_fragment:toe,specularmap_pars_fragment:noe,tonemapping_fragment:ioe,tonemapping_pars_fragment:roe,transmission_fragment:ooe,transmission_pars_fragment:soe,uv_pars_fragment:aoe,uv_pars_vertex:coe,uv_vertex:loe,uv2_pars_fragment:doe,uv2_pars_vertex:uoe,uv2_vertex:hoe,worldpos_vertex:poe,background_vert:foe,background_frag:moe,cube_vert:goe,cube_frag:_oe,depth_vert:voe,depth_frag:boe,distanceRGBA_vert:yoe,distanceRGBA_frag:xoe,equirect_vert:woe,equirect_frag:Coe,linedashed_vert:Soe,linedashed_frag:Moe,meshbasic_vert:Eoe,meshbasic_frag:Ioe,meshlambert_vert:Toe,meshlambert_frag:Doe,meshmatcap_vert:Poe,meshmatcap_frag:Ooe,meshnormal_vert:Roe,meshnormal_frag:Aoe,meshphong_vert:Noe,meshphong_frag:koe,meshphysical_vert:Loe,meshphysical_frag:Foe,meshtoon_vert:Boe,meshtoon_frag:Voe,points_vert:zoe,points_frag:Uoe,shadow_vert:Hoe,shadow_frag:Goe,sprite_vert:joe,sprite_frag:Woe},Ue={common:{diffuse:{value:new je(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new Si},uv2Transform:{value:new Si},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new we(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new je(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new je(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Si}},sprite:{diffuse:{value:new je(16777215)},opacity:{value:1},center:{value:new we(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Si}}},xs={basic:{uniforms:xr([Ue.common,Ue.specularmap,Ue.envmap,Ue.aomap,Ue.lightmap,Ue.fog]),vertexShader:an.meshbasic_vert,fragmentShader:an.meshbasic_frag},lambert:{uniforms:xr([Ue.common,Ue.specularmap,Ue.envmap,Ue.aomap,Ue.lightmap,Ue.emissivemap,Ue.fog,Ue.lights,{emissive:{value:new je(0)}}]),vertexShader:an.meshlambert_vert,fragmentShader:an.meshlambert_frag},phong:{uniforms:xr([Ue.common,Ue.specularmap,Ue.envmap,Ue.aomap,Ue.lightmap,Ue.emissivemap,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,Ue.fog,Ue.lights,{emissive:{value:new je(0)},specular:{value:new je(1118481)},shininess:{value:30}}]),vertexShader:an.meshphong_vert,fragmentShader:an.meshphong_frag},standard:{uniforms:xr([Ue.common,Ue.envmap,Ue.aomap,Ue.lightmap,Ue.emissivemap,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,Ue.roughnessmap,Ue.metalnessmap,Ue.fog,Ue.lights,{emissive:{value:new je(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:an.meshphysical_vert,fragmentShader:an.meshphysical_frag},toon:{uniforms:xr([Ue.common,Ue.aomap,Ue.lightmap,Ue.emissivemap,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,Ue.gradientmap,Ue.fog,Ue.lights,{emissive:{value:new je(0)}}]),vertexShader:an.meshtoon_vert,fragmentShader:an.meshtoon_frag},matcap:{uniforms:xr([Ue.common,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,Ue.fog,{matcap:{value:null}}]),vertexShader:an.meshmatcap_vert,fragmentShader:an.meshmatcap_frag},points:{uniforms:xr([Ue.points,Ue.fog]),vertexShader:an.points_vert,fragmentShader:an.points_frag},dashed:{uniforms:xr([Ue.common,Ue.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:an.linedashed_vert,fragmentShader:an.linedashed_frag},depth:{uniforms:xr([Ue.common,Ue.displacementmap]),vertexShader:an.depth_vert,fragmentShader:an.depth_frag},normal:{uniforms:xr([Ue.common,Ue.bumpmap,Ue.normalmap,Ue.displacementmap,{opacity:{value:1}}]),vertexShader:an.meshnormal_vert,fragmentShader:an.meshnormal_frag},sprite:{uniforms:xr([Ue.sprite,Ue.fog]),vertexShader:an.sprite_vert,fragmentShader:an.sprite_frag},background:{uniforms:{uvTransform:{value:new Si},t2D:{value:null}},vertexShader:an.background_vert,fragmentShader:an.background_frag},cube:{uniforms:xr([Ue.envmap,{opacity:{value:1}}]),vertexShader:an.cube_vert,fragmentShader:an.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:an.equirect_vert,fragmentShader:an.equirect_frag},distanceRGBA:{uniforms:xr([Ue.common,Ue.displacementmap,{referencePosition:{value:new O},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:an.distanceRGBA_vert,fragmentShader:an.distanceRGBA_frag},shadow:{uniforms:xr([Ue.lights,Ue.fog,{color:{value:new je(0)},opacity:{value:1}}]),vertexShader:an.shadow_vert,fragmentShader:an.shadow_frag}};xs.physical={uniforms:xr([xs.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new we(1,1)},clearcoatNormalMap:{value:null},sheen:{value:0},sheenColor:{value:new je(0)},sheenColorMap:{value:null},sheenRoughness:{value:0},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new we},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new je(0)},specularIntensity:{value:0},specularIntensityMap:{value:null},specularColor:{value:new je(1,1,1)},specularColorMap:{value:null}}]),vertexShader:an.meshphysical_vert,fragmentShader:an.meshphysical_frag};function $oe(i,e,t,n,r){let o=new je(0),s=0,a,c,l=null,d=0,u=null;function h(f,m){let y=!1,g=m.isScene===!0?m.background:null;g&&g.isTexture&&(g=e.get(g));let _=i.xr,x=_.getSession&&_.getSession();x&&x.environmentBlendMode==="additive"&&(g=null),g===null?p(o,s):g&&g.isColor&&(p(g,1),y=!0),(i.autoClear||y)&&i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil),g&&(g.isCubeTexture||g.mapping===tf)?(c===void 0&&(c=new pi(new ul(1,1,1),new Cs({name:"BackgroundCubeMaterial",uniforms:Np(xs.cube.uniforms),vertexShader:xs.cube.vertexShader,fragmentShader:xs.cube.fragmentShader,side:Ci,depthTest:!1,depthWrite:!1,fog:!1})),c.geometry.deleteAttribute("normal"),c.geometry.deleteAttribute("uv"),c.onBeforeRender=function(C,T,D){this.matrixWorld.copyPosition(D.matrixWorld)},Object.defineProperty(c.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),n.update(c)),c.material.uniforms.envMap.value=g,c.material.uniforms.flipEnvMap.value=g.isCubeTexture&&g.isRenderTargetTexture===!1?-1:1,(l!==g||d!==g.version||u!==i.toneMapping)&&(c.material.needsUpdate=!0,l=g,d=g.version,u=i.toneMapping),f.unshift(c,c.geometry,c.material,0,0,null)):g&&g.isTexture&&(a===void 0&&(a=new pi(new Fp(2,2),new Cs({name:"BackgroundMaterial",uniforms:Np(xs.background.uniforms),vertexShader:xs.background.vertexShader,fragmentShader:xs.background.fragmentShader,side:eu,depthTest:!1,depthWrite:!1,fog:!1})),a.geometry.deleteAttribute("normal"),Object.defineProperty(a.material,"map",{get:function(){return this.uniforms.t2D.value}}),n.update(a)),a.material.uniforms.t2D.value=g,g.matrixAutoUpdate===!0&&g.updateMatrix(),a.material.uniforms.uvTransform.value.copy(g.matrix),(l!==g||d!==g.version||u!==i.toneMapping)&&(a.material.needsUpdate=!0,l=g,d=g.version,u=i.toneMapping),f.unshift(a,a.geometry,a.material,0,0,null))}function p(f,m){t.buffers.color.setClear(f.r,f.g,f.b,m,r)}return{getClearColor:function(){return o},setClearColor:function(f,m=1){o.set(f),s=m,p(o,s)},getClearAlpha:function(){return s},setClearAlpha:function(f){s=f,p(o,s)},render:h}}function qoe(i,e,t,n){let r=i.getParameter(34921),o=n.isWebGL2?null:e.get("OES_vertex_array_object"),s=n.isWebGL2||o!==null,a={},c=m(null),l=c;function d(U,W,Y,k,G){let K=!1;if(s){let de=f(k,Y,W);l!==de&&(l=de,h(l.object)),K=y(k,G),K&&g(k,G)}else{let de=W.wireframe===!0;(l.geometry!==k.id||l.program!==Y.id||l.wireframe!==de)&&(l.geometry=k.id,l.program=Y.id,l.wireframe=de,K=!0)}U.isInstancedMesh===!0&&(K=!0),G!==null&&t.update(G,34963),K&&(E(U,W,Y,k),G!==null&&i.bindBuffer(34963,t.get(G).buffer))}function u(){return n.isWebGL2?i.createVertexArray():o.createVertexArrayOES()}function h(U){return n.isWebGL2?i.bindVertexArray(U):o.bindVertexArrayOES(U)}function p(U){return n.isWebGL2?i.deleteVertexArray(U):o.deleteVertexArrayOES(U)}function f(U,W,Y){let k=Y.wireframe===!0,G=a[U.id];G===void 0&&(G={},a[U.id]=G);let K=G[W.id];K===void 0&&(K={},G[W.id]=K);let de=K[k];return de===void 0&&(de=m(u()),K[k]=de),de}function m(U){let W=[],Y=[],k=[];for(let G=0;G=0){let He=G[De];if(He===void 0&&(De==="instanceMatrix"&&U.instanceMatrix&&(He=U.instanceMatrix),De==="instanceColor"&&U.instanceColor&&(He=U.instanceColor)),He!==void 0){let he=He.normalized,se=He.itemSize,qe=t.get(He);if(qe===void 0)continue;let ue=qe.buffer,Ge=qe.type,ft=qe.bytesPerElement;if(He.isInterleavedBufferAttribute){let ze=He.data,Qe=ze.stride,Ot=He.offset;if(ze&&ze.isInstancedInterleavedBuffer){for(let _e=0;_e0&&i.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";E="mediump"}return E==="mediump"&&i.getShaderPrecisionFormat(35633,36337).precision>0&&i.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}let s=typeof WebGL2RenderingContext<"u"&&i instanceof WebGL2RenderingContext||typeof WebGL2ComputeRenderingContext<"u"&&i instanceof WebGL2ComputeRenderingContext,a=t.precision!==void 0?t.precision:"highp",c=o(a);c!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",c,"instead."),a=c);let l=s||e.has("WEBGL_draw_buffers"),d=t.logarithmicDepthBuffer===!0,u=i.getParameter(34930),h=i.getParameter(35660),p=i.getParameter(3379),f=i.getParameter(34076),m=i.getParameter(34921),y=i.getParameter(36347),g=i.getParameter(36348),_=i.getParameter(36349),x=h>0,C=s||e.has("OES_texture_float"),T=x&&C,D=s?i.getParameter(36183):0;return{isWebGL2:s,drawBuffers:l,getMaxAnisotropy:r,getMaxPrecision:o,precision:a,logarithmicDepthBuffer:d,maxTextures:u,maxVertexTextures:h,maxTextureSize:p,maxCubemapSize:f,maxAttributes:m,maxVertexUniforms:y,maxVaryings:g,maxFragmentUniforms:_,vertexTextures:x,floatFragmentTextures:C,floatVertexTextures:T,maxSamples:D}}function Zoe(i){let e=this,t=null,n=0,r=!1,o=!1,s=new Xo,a=new Si,c={value:null,needsUpdate:!1};this.uniform=c,this.numPlanes=0,this.numIntersection=0,this.init=function(u,h,p){let f=u.length!==0||h||n!==0||r;return r=h,t=d(u,p,0),n=u.length,f},this.beginShadows=function(){o=!0,d(null)},this.endShadows=function(){o=!1,l()},this.setState=function(u,h,p){let f=u.clippingPlanes,m=u.clipIntersection,y=u.clipShadows,g=i.get(u);if(!r||f===null||f.length===0||o&&!y)o?d(null):l();else{let _=o?0:n,x=_*4,C=g.clippingState||null;c.value=C,C=d(f,h,x,p);for(let T=0;T!==x;++T)C[T]=t[T];g.clippingState=C,this.numIntersection=m?this.numPlanes:0,this.numPlanes+=_}};function l(){c.value!==t&&(c.value=t,c.needsUpdate=n>0),e.numPlanes=n,e.numIntersection=0}function d(u,h,p,f){let m=u!==null?u.length:0,y=null;if(m!==0){if(y=c.value,f!==!0||y===null){let g=p+m*4,_=h.matrixWorldInverse;a.getNormalMatrix(_),(y===null||y.length0){let l=i.getRenderTarget(),d=new Lp(c.height/2);return d.fromEquirectangularTexture(i,s),e.set(s,d),i.setRenderTarget(l),s.addEventListener("dispose",r),t(d.texture,s.mapping)}else return null}}return s}function r(s){let a=s.target;a.removeEventListener("dispose",r);let c=e.get(a);c!==void 0&&(e.delete(a),c.dispose())}function o(){e=new WeakMap}return{get:n,dispose:o}}var ou=class extends iu{constructor(e=-1,t=1,n=1,r=-1,o=.1,s=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=e,this.right=t,this.top=n,this.bottom=r,this.near=o,this.far=s,this.updateProjectionMatrix()}copy(e,t){return super.copy(e,t),this.left=e.left,this.right=e.right,this.top=e.top,this.bottom=e.bottom,this.near=e.near,this.far=e.far,this.zoom=e.zoom,this.view=e.view===null?null:Object.assign({},e.view),this}setViewOffset(e,t,n,r,o,s){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=e,this.view.fullHeight=t,this.view.offsetX=n,this.view.offsetY=r,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let e=(this.right-this.left)/(2*this.zoom),t=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,o=n-e,s=n+e,a=r+t,c=r-t;if(this.view!==null&&this.view.enabled){let l=(this.right-this.left)/this.view.fullWidth/this.zoom,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=l*this.view.offsetX,s=o+l*this.view.width,a-=d*this.view.offsetY,c=a-d*this.view.height}this.projectionMatrix.makeOrthographic(o,s,a,c,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(e){let t=super.toJSON(e);return t.object.zoom=this.zoom,t.object.left=this.left,t.object.right=this.right,t.object.top=this.top,t.object.bottom=this.bottom,t.object.near=this.near,t.object.far=this.far,this.view!==null&&(t.object.view=Object.assign({},this.view)),t}};ou.prototype.isOrthographicCamera=!0;var pl=class extends Cs{constructor(e){super(e),this.type="RawShaderMaterial"}};pl.prototype.isRawShaderMaterial=!0;var Tp=4,ll=8,ia=Math.pow(2,ll),EH=[.125,.215,.35,.446,.526,.582],IH=ll-Tp+1+EH.length,_p=20,fl={[cr]:0,[bl]:1,[tC]:2,[ZP]:3,[QP]:4,[KP]:5,[eC]:6},VD=new ou,{_lodPlanes:Eg,_sizeLods:Nz,_sigmas:Ax}=Joe(),kz=new je,zD=null,$d=(1+Math.sqrt(5))/2,vp=1/$d,Lz=[new O(1,1,1),new O(-1,1,1),new O(1,1,-1),new O(-1,1,-1),new O(0,$d,vp),new O(0,$d,-vp),new O(vp,0,$d),new O(-vp,0,$d),new O($d,vp,0),new O(-$d,vp,0)],mw=class{constructor(e){this._renderer=e,this._pingPongRenderTarget=null,this._blurMaterial=ese(_p),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(e,t=0,n=.1,r=100){zD=this._renderer.getRenderTarget();let o=this._allocateTargets();return this._sceneToCubeUV(e,n,r,o),t>0&&this._blur(o,0,0,t),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(e){return this._fromTexture(e)}fromCubemap(e){return this._fromTexture(e)}compileCubemapShader(){this._cubemapShader===null&&(this._cubemapShader=Vz(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){this._equirectShader===null&&(this._equirectShader=Bz(),this._compileMaterial(this._equirectShader))}dispose(){this._blurMaterial.dispose(),this._cubemapShader!==null&&this._cubemapShader.dispose(),this._equirectShader!==null&&this._equirectShader.dispose();for(let e=0;e2?ia:0,ia,ia),d.setRenderTarget(r),y&&d.render(m,a),d.render(e,a)}m.geometry.dispose(),m.material.dispose(),d.toneMapping=p,d.outputEncoding=h,d.autoClear=u,e.background=g}_setEncoding(e,t){this._renderer.capabilities.isWebGL2===!0&&t.format===sr&&t.type===Ja&&t.encoding===bl?e.value=fl[cr]:e.value=fl[t.encoding]}_textureToCubeUV(e,t){let n=this._renderer,r=e.mapping===_u||e.mapping===vu;r?this._cubemapShader==null&&(this._cubemapShader=Vz()):this._equirectShader==null&&(this._equirectShader=Bz());let o=r?this._cubemapShader:this._equirectShader,s=new pi(Eg[0],o),a=o.uniforms;a.envMap.value=e,r||a.texelSize.value.set(1/e.image.width,1/e.image.height),this._setEncoding(a.inputEncoding,e),this._setEncoding(a.outputEncoding,t.texture),Nx(t,0,0,3*ia,2*ia),n.setRenderTarget(t),n.render(s,VD)}_applyPMREM(e){let t=this._renderer,n=t.autoClear;t.autoClear=!1;for(let r=1;r_p&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${y} samples when the maximum is set to ${_p}`);let g=[],_=0;for(let D=0;D<_p;++D){let E=D/m,A=Math.exp(-E*E/2);g.push(A),D==0?_+=A:Dll-Tp?r-ll+Tp:0);Nx(t,C,T,3*x,2*x),c.setRenderTarget(t),c.render(u,VD)}};function Koe(i){return i===void 0||i.type!==Ja?!1:i.encoding===cr||i.encoding===bl||i.encoding===eC}function Joe(){let i=[],e=[],t=[],n=ll;for(let r=0;rll-Tp?s=EH[r-ll+Tp-1]:r==0&&(s=0),t.push(s);let a=1/(o-1),c=-a/2,l=1+a/2,d=[c,c,l,c,l,l,c,c,l,l,c,l],u=6,h=6,p=3,f=2,m=1,y=new Float32Array(p*h*u),g=new Float32Array(f*h*u),_=new Float32Array(m*h*u);for(let C=0;C2?0:-1,E=[T,D,0,T+2/3,D,0,T+2/3,D+1,0,T,D,0,T+2/3,D+1,0,T,D+1,0];y.set(E,p*h*C),g.set(d,f*h*C);let A=[C,C,C,C,C,C];_.set(A,m*h*C)}let x=new Dt;x.setAttribute("position",new un(y,p)),x.setAttribute("uv",new un(g,f)),x.setAttribute("faceIndex",new un(_,m)),i.push(x),n>Tp&&n--}return{_lodPlanes:i,_sizeLods:e,_sigmas:t}}function Fz(i){let e=new So(3*ia,3*ia,i);return e.texture.mapping=tf,e.texture.name="PMREM.cubeUv",e.scissorTest=!0,e}function Nx(i,e,t,n,r){i.viewport.set(e,t,n,r),i.scissor.set(e,t,n,r)}function ese(i){let e=new Float32Array(i),t=new O(0,1,0);return new pl({name:"SphericalGaussianBlur",defines:{n:i},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:e},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:t},inputEncoding:{value:fl[cr]},outputEncoding:{value:fl[cr]}},vertexShader:eO(),fragmentShader:` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - uniform int samples; - uniform float weights[ n ]; - uniform bool latitudinal; - uniform float dTheta; - uniform float mipInt; - uniform vec3 poleAxis; - - ${tO()} - - #define ENVMAP_TYPE_CUBE_UV - #include - - vec3 getSample( float theta, vec3 axis ) { - - float cosTheta = cos( theta ); - // Rodrigues' axis-angle rotation - vec3 sampleDirection = vOutputDirection * cosTheta - + cross( axis, vOutputDirection ) * sin( theta ) - + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); - - return bilinearCubeUV( envMap, sampleDirection, mipInt ); - - } - - void main() { - - vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); - - if ( all( equal( axis, vec3( 0.0 ) ) ) ) { - - axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); - - } - - axis = normalize( axis ); - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); - - for ( int i = 1; i < n; i++ ) { - - if ( i >= samples ) { - - break; - - } - - float theta = dTheta * float( i ); - gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); - gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); - - } - - gl_FragColor = linearToOutputTexel( gl_FragColor ); - - } - `,blending:Qa,depthTest:!1,depthWrite:!1})}function Bz(){let i=new we(1,1);return new pl({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:i},inputEncoding:{value:fl[cr]},outputEncoding:{value:fl[cr]}},vertexShader:eO(),fragmentShader:` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform sampler2D envMap; - uniform vec2 texelSize; - - ${tO()} - - #include - - void main() { - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - - vec3 outputDirection = normalize( vOutputDirection ); - vec2 uv = equirectUv( outputDirection ); - - vec2 f = fract( uv / texelSize - 0.5 ); - uv -= f * texelSize; - vec3 tl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; - uv.x += texelSize.x; - vec3 tr = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; - uv.y += texelSize.y; - vec3 br = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; - uv.x -= texelSize.x; - vec3 bl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; - - vec3 tm = mix( tl, tr, f.x ); - vec3 bm = mix( bl, br, f.x ); - gl_FragColor.rgb = mix( tm, bm, f.y ); - - gl_FragColor = linearToOutputTexel( gl_FragColor ); - - } - `,blending:Qa,depthTest:!1,depthWrite:!1})}function Vz(){return new pl({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},inputEncoding:{value:fl[cr]},outputEncoding:{value:fl[cr]}},vertexShader:eO(),fragmentShader:` - - precision mediump float; - precision mediump int; - - varying vec3 vOutputDirection; - - uniform samplerCube envMap; - - ${tO()} - - void main() { - - gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); - gl_FragColor.rgb = envMapTexelToLinear( textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) ) ).rgb; - gl_FragColor = linearToOutputTexel( gl_FragColor ); - - } - `,blending:Qa,depthTest:!1,depthWrite:!1})}function eO(){return` - - precision mediump float; - precision mediump int; - - attribute vec3 position; - attribute vec2 uv; - attribute float faceIndex; - - varying vec3 vOutputDirection; - - // RH coordinate system; PMREM face-indexing convention - vec3 getDirection( vec2 uv, float face ) { - - uv = 2.0 * uv - 1.0; - - vec3 direction = vec3( uv, 1.0 ); - - if ( face == 0.0 ) { - - direction = direction.zyx; // ( 1, v, u ) pos x - - } else if ( face == 1.0 ) { - - direction = direction.xzy; - direction.xz *= -1.0; // ( -u, 1, -v ) pos y - - } else if ( face == 2.0 ) { - - direction.x *= -1.0; // ( -u, v, 1 ) pos z - - } else if ( face == 3.0 ) { - - direction = direction.zyx; - direction.xz *= -1.0; // ( -1, v, -u ) neg x - - } else if ( face == 4.0 ) { - - direction = direction.xzy; - direction.xy *= -1.0; // ( -u, -1, v ) neg y - - } else if ( face == 5.0 ) { - - direction.z *= -1.0; // ( u, v, -1 ) neg z - - } - - return direction; - - } - - void main() { - - vOutputDirection = getDirection( uv, faceIndex ); - gl_Position = vec4( position, 1.0 ); - - } - `}function tO(){return` - - uniform int inputEncoding; - uniform int outputEncoding; - - #include - - vec4 inputTexelToLinear( vec4 value ) { - - if ( inputEncoding == 0 ) { - - return value; - - } else if ( inputEncoding == 1 ) { - - return sRGBToLinear( value ); - - } else if ( inputEncoding == 2 ) { - - return RGBEToLinear( value ); - - } else if ( inputEncoding == 3 ) { - - return RGBMToLinear( value, 7.0 ); - - } else if ( inputEncoding == 4 ) { - - return RGBMToLinear( value, 16.0 ); - - } else if ( inputEncoding == 5 ) { - - return RGBDToLinear( value, 256.0 ); - - } else { - - return GammaToLinear( value, 2.2 ); - - } - - } - - vec4 linearToOutputTexel( vec4 value ) { - - if ( outputEncoding == 0 ) { - - return value; - - } else if ( outputEncoding == 1 ) { - - return LinearTosRGB( value ); - - } else if ( outputEncoding == 2 ) { - - return LinearToRGBE( value ); - - } else if ( outputEncoding == 3 ) { - - return LinearToRGBM( value, 7.0 ); - - } else if ( outputEncoding == 4 ) { - - return LinearToRGBM( value, 16.0 ); - - } else if ( outputEncoding == 5 ) { - - return LinearToRGBD( value, 256.0 ); - - } else { - - return LinearToGamma( value, 2.2 ); - - } - - } - - vec4 envMapTexelToLinear( vec4 color ) { - - return inputTexelToLinear( color ); - - } - `}function tse(i){let e=new WeakMap,t=null;function n(a){if(a&&a.isTexture&&a.isRenderTargetTexture===!1){let c=a.mapping,l=c===Bg||c===Vg,d=c===_u||c===vu;if(l||d){if(e.has(a))return e.get(a).texture;{let u=a.image;if(l&&u&&u.height>0||d&&u&&r(u)){let h=i.getRenderTarget();t===null&&(t=new mw(i));let p=l?t.fromEquirectangular(a):t.fromCubemap(a);return e.set(a,p),i.setRenderTarget(h),a.addEventListener("dispose",o),p.texture}else return null}}}return a}function r(a){let c=0,l=6;for(let d=0;d65535?Ap:Rp)(h,1);y.version=m;let g=o.get(u);g&&e.remove(g),o.set(u,y)}function d(u){let h=o.get(u);if(h){let p=u.index;p!==null&&h.versione.maxTextureSize&&(A=Math.ceil(E/e.maxTextureSize),E=e.maxTextureSize);let j=new Float32Array(E*A*4*f),q=new Bp(j,E,A,f);q.format=sr,q.type=ra;let z=D*4;for(let P=0;P0)return i;let r=e*t,o=Uz[r];if(o===void 0&&(o=new Float32Array(r),Uz[r]=o),e!==0){n.toArray(o,0);for(let s=1,a=0;s!==e;++s)a+=t,i[s].toArray(o,a)}return o}function Yr(i,e){if(i.length!==e.length)return!1;for(let t=0,n=i.length;t/gm;function mP(i){return i.replace(oae,sae)}function sae(i,e){let t=an[e];if(t===void 0)throw new Error("Can not resolve #include <"+e+">");return mP(t)}var aae=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,cae=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function Qz(i){return i.replace(cae,NH).replace(aae,lae)}function lae(i,e,t,n){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),NH(i,e,t,n)}function NH(i,e,t,n){let r="";for(let o=parseInt(e);o0?i.gammaFactor:1,p=t.isWebGL2?"":nae(t),f=iae(o),m=r.createProgram(),y,g,_=t.glslVersion?"#version "+t.glslVersion+` -`:"";t.isRawShaderMaterial?(y=[f].filter(Rg).join(` -`),y.length>0&&(y+=` -`),g=[p,f].filter(Rg).join(` -`),g.length>0&&(g+=` -`)):(y=[Kz(t),"#define SHADER_NAME "+t.shaderName,f,t.instancing?"#define USE_INSTANCING":"",t.instancingColor?"#define USE_INSTANCING_COLOR":"",t.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+h,"#define MAX_BONES "+t.maxBones,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+d:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMap&&t.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",t.normalMap&&t.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.displacementMap&&t.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",t.specularColorMap?"#define USE_SPECULARCOLORMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.sheenColorMap?"#define USE_SHEENCOLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs?"#define USE_UV":"",t.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",t.flatShading?"#define FLAT_SHADED":"",t.skinning?"#define USE_SKINNING":"",t.useVertexTexture?"#define BONE_TEXTURE":"",t.morphTargets?"#define USE_MORPHTARGETS":"",t.morphNormals&&t.flatShading===!1?"#define USE_MORPHNORMALS":"",t.morphTargets&&t.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",t.morphTargets&&t.isWebGL2?"#define MORPHTARGETS_COUNT "+t.morphTargetsCount:"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.sizeAttenuation?"#define USE_SIZEATTENUATION":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` -`].filter(Rg).join(` -`),g=[p,Kz(t),"#define SHADER_NAME "+t.shaderName,f,"#define GAMMA_FACTOR "+h,t.useFog&&t.fog?"#define USE_FOG":"",t.useFog&&t.fogExp2?"#define FOG_EXP2":"",t.map?"#define USE_MAP":"",t.matcap?"#define USE_MATCAP":"",t.envMap?"#define USE_ENVMAP":"",t.envMap?"#define "+l:"",t.envMap?"#define "+d:"",t.envMap?"#define "+u:"",t.lightMap?"#define USE_LIGHTMAP":"",t.aoMap?"#define USE_AOMAP":"",t.emissiveMap?"#define USE_EMISSIVEMAP":"",t.bumpMap?"#define USE_BUMPMAP":"",t.normalMap?"#define USE_NORMALMAP":"",t.normalMap&&t.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",t.normalMap&&t.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",t.clearcoat?"#define USE_CLEARCOAT":"",t.clearcoatMap?"#define USE_CLEARCOATMAP":"",t.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",t.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",t.specularMap?"#define USE_SPECULARMAP":"",t.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",t.specularColorMap?"#define USE_SPECULARCOLORMAP":"",t.roughnessMap?"#define USE_ROUGHNESSMAP":"",t.metalnessMap?"#define USE_METALNESSMAP":"",t.alphaMap?"#define USE_ALPHAMAP":"",t.alphaTest?"#define USE_ALPHATEST":"",t.sheen?"#define USE_SHEEN":"",t.sheenColorMap?"#define USE_SHEENCOLORMAP":"",t.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",t.transmission?"#define USE_TRANSMISSION":"",t.transmissionMap?"#define USE_TRANSMISSIONMAP":"",t.thicknessMap?"#define USE_THICKNESSMAP":"",t.vertexTangents?"#define USE_TANGENT":"",t.vertexColors||t.instancingColor?"#define USE_COLOR":"",t.vertexAlphas?"#define USE_COLOR_ALPHA":"",t.vertexUvs?"#define USE_UV":"",t.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",t.gradientMap?"#define USE_GRADIENTMAP":"",t.flatShading?"#define FLAT_SHADED":"",t.doubleSided?"#define DOUBLE_SIDED":"",t.flipSided?"#define FLIP_SIDED":"",t.shadowMapEnabled?"#define USE_SHADOWMAP":"",t.shadowMapEnabled?"#define "+c:"",t.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",t.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",t.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",t.logarithmicDepthBuffer&&t.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(t.extensionShaderTextureLOD||t.envMap)&&t.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",t.toneMapping!==cl?"#define TONE_MAPPING":"",t.toneMapping!==cl?an.tonemapping_pars_fragment:"",t.toneMapping!==cl?tae("toneMapping",t.toneMapping):"",t.dithering?"#define DITHERING":"",t.format===Qd?"#define OPAQUE":"",an.encodings_pars_fragment,t.map?Ud("mapTexelToLinear",t.mapEncoding):"",t.matcap?Ud("matcapTexelToLinear",t.matcapEncoding):"",t.envMap?Ud("envMapTexelToLinear",t.envMapEncoding):"",t.emissiveMap?Ud("emissiveMapTexelToLinear",t.emissiveMapEncoding):"",t.specularColorMap?Ud("specularColorMapTexelToLinear",t.specularColorMapEncoding):"",t.sheenColorMap?Ud("sheenColorMapTexelToLinear",t.sheenColorMapEncoding):"",t.lightMap?Ud("lightMapTexelToLinear",t.lightMapEncoding):"",eae("linearToOutputTexel",t.outputEncoding),t.depthPacking?"#define DEPTH_PACKING "+t.depthPacking:"",` -`].filter(Rg).join(` -`)),s=mP(s),s=Xz(s,t),s=Zz(s,t),a=mP(a),a=Xz(a,t),a=Zz(a,t),s=Qz(s),a=Qz(a),t.isWebGL2&&t.isRawShaderMaterial!==!0&&(_=`#version 300 es -`,y=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` -`)+` -`+y,g=["#define varying in",t.glslVersion===pP?"":"out highp vec4 pc_fragColor;",t.glslVersion===pP?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` -`)+` -`+g);let x=_+y+s,C=_+g+a,T=qz(r,35633,x),D=qz(r,35632,C);if(r.attachShader(m,T),r.attachShader(m,D),t.index0AttributeName!==void 0?r.bindAttribLocation(m,0,t.index0AttributeName):t.morphTargets===!0&&r.bindAttribLocation(m,0,"position"),r.linkProgram(m),i.debug.checkShaderErrors){let j=r.getProgramInfoLog(m).trim(),q=r.getShaderInfoLog(T).trim(),z=r.getShaderInfoLog(D).trim(),P=!0,U=!0;if(r.getProgramParameter(m,35714)===!1){P=!1;let W=Yz(r,T,"vertex"),Y=Yz(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(m,35715)+` - -Program Info Log: `+j+` -`+W+` -`+Y)}else j!==""?console.warn("THREE.WebGLProgram: Program Info Log:",j):(q===""||z==="")&&(U=!1);U&&(this.diagnostics={runnable:P,programLog:j,vertexShader:{log:q,prefix:y},fragmentShader:{log:z,prefix:g}})}r.deleteShader(T),r.deleteShader(D);let E;this.getUniforms=function(){return E===void 0&&(E=new dl(r,m)),E};let A;return this.getAttributes=function(){return A===void 0&&(A=rae(r,m)),A},this.destroy=function(){n.releaseStatesOfProgram(this),r.deleteProgram(m),this.program=void 0},this.name=t.shaderName,this.id=Kse++,this.cacheKey=e,this.usedTimes=1,this.program=m,this.vertexShader=T,this.fragmentShader=D,this}function mae(i,e,t,n,r,o,s){let a=[],c=r.isWebGL2,l=r.logarithmicDepthBuffer,d=r.floatVertexTextures,u=r.maxVertexUniforms,h=r.vertexTextures,p=r.precision,f={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},m=["precision","isWebGL2","supportsVertexTextures","outputEncoding","instancing","instancingColor","map","mapEncoding","matcap","matcapEncoding","envMap","envMapMode","envMapEncoding","envMapCubeUV","lightMap","lightMapEncoding","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","tangentSpaceNormalMap","clearcoat","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","displacementMap","specularMap",,"roughnessMap","metalnessMap","gradientMap","alphaMap","alphaTest","combine","vertexColors","vertexAlphas","vertexTangents","vertexUvs","uvsVertexOnly","fog","useFog","fogExp2","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","morphTargetsCount","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","numDirLightShadows","numPointLightShadows","numSpotLightShadows","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering","format","specularIntensityMap","specularColorMap","specularColorMapEncoding","transmission","transmissionMap","thicknessMap","sheen","sheenColorMap","sheenColorMapEncoding","sheenRoughnessMap"];function y(E){let j=E.skeleton.bones;if(d)return 1024;{let z=Math.floor((u-20)/4),P=Math.min(z,j.length);return P0,Te=E.clearcoat>0;return{isWebGL2:c,shaderID:Y,shaderName:E.type,vertexShader:G,fragmentShader:K,defines:E.defines,isRawShaderMaterial:E.isRawShaderMaterial===!0,glslVersion:E.glslVersion,precision:p,instancing:z.isInstancedMesh===!0,instancingColor:z.isInstancedMesh===!0&&z.instanceColor!==null,supportsVertexTextures:h,outputEncoding:de!==null?g(de.texture):i.outputEncoding,map:!!E.map,mapEncoding:g(E.map),matcap:!!E.matcap,matcapEncoding:g(E.matcap),envMap:!!W,envMapMode:W&&W.mapping,envMapEncoding:g(W),envMapCubeUV:!!W&&(W.mapping===tf||W.mapping===H_),lightMap:!!E.lightMap,lightMapEncoding:g(E.lightMap),aoMap:!!E.aoMap,emissiveMap:!!E.emissiveMap,emissiveMapEncoding:g(E.emissiveMap),bumpMap:!!E.bumpMap,normalMap:!!E.normalMap,objectSpaceNormalMap:E.normalMapType===bH,tangentSpaceNormalMap:E.normalMapType===yu,clearcoat:Te,clearcoatMap:Te&&!!E.clearcoatMap,clearcoatRoughnessMap:Te&&!!E.clearcoatRoughnessMap,clearcoatNormalMap:Te&&!!E.clearcoatNormalMap,displacementMap:!!E.displacementMap,roughnessMap:!!E.roughnessMap,metalnessMap:!!E.metalnessMap,specularMap:!!E.specularMap,specularIntensityMap:!!E.specularIntensityMap,specularColorMap:!!E.specularColorMap,specularColorMapEncoding:g(E.specularColorMap),alphaMap:!!E.alphaMap,alphaTest:De,gradientMap:!!E.gradientMap,sheen:E.sheen>0,sheenColorMap:!!E.sheenColorMap,sheenColorMapEncoding:g(E.sheenColorMap),sheenRoughnessMap:!!E.sheenRoughnessMap,transmission:E.transmission>0,transmissionMap:!!E.transmissionMap,thicknessMap:!!E.thicknessMap,combine:E.combine,vertexTangents:!!E.normalMap&&!!z.geometry&&!!z.geometry.attributes.tangent,vertexColors:E.vertexColors,vertexAlphas:E.vertexColors===!0&&!!z.geometry&&!!z.geometry.attributes.color&&z.geometry.attributes.color.itemSize===4,vertexUvs:!!E.map||!!E.bumpMap||!!E.normalMap||!!E.specularMap||!!E.alphaMap||!!E.emissiveMap||!!E.roughnessMap||!!E.metalnessMap||!!E.clearcoatMap||!!E.clearcoatRoughnessMap||!!E.clearcoatNormalMap||!!E.displacementMap||!!E.transmissionMap||!!E.thicknessMap||!!E.specularIntensityMap||!!E.specularColorMap||!!E.sheenColorMap||E.sheenRoughnessMap,uvsVertexOnly:!(E.map||E.bumpMap||E.normalMap||E.specularMap||E.alphaMap||E.emissiveMap||E.roughnessMap||E.metalnessMap||E.clearcoatNormalMap||E.transmission>0||E.transmissionMap||E.thicknessMap||E.specularIntensityMap||E.specularColorMap||!!E.sheen>0||E.sheenColorMap||E.sheenRoughnessMap)&&!!E.displacementMap,fog:!!P,useFog:E.fog,fogExp2:P&&P.isFogExp2,flatShading:!!E.flatShading,sizeAttenuation:E.sizeAttenuation,logarithmicDepthBuffer:l,skinning:z.isSkinnedMesh===!0&&k>0,maxBones:k,useVertexTexture:d,morphTargets:!!z.geometry&&!!z.geometry.morphAttributes.position,morphNormals:!!z.geometry&&!!z.geometry.morphAttributes.normal,morphTargetsCount:z.geometry&&z.geometry.morphAttributes.position?z.geometry.morphAttributes.position.length:0,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,format:E.format,dithering:E.dithering,shadowMapEnabled:i.shadowMap.enabled&&j.length>0,shadowMapType:i.shadowMap.type,toneMapping:E.toneMapped?i.toneMapping:cl,physicallyCorrectLights:i.physicallyCorrectLights,premultipliedAlpha:E.premultipliedAlpha,doubleSided:E.side===tu,flipSided:E.side===Ci,depthPacking:E.depthPacking!==void 0?E.depthPacking:!1,index0AttributeName:E.index0AttributeName,extensionDerivatives:E.extensions&&E.extensions.derivatives,extensionFragDepth:E.extensions&&E.extensions.fragDepth,extensionDrawBuffers:E.extensions&&E.extensions.drawBuffers,extensionShaderTextureLOD:E.extensions&&E.extensions.shaderTextureLOD,rendererExtensionFragDepth:c||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:c||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:c||n.has("EXT_shader_texture_lod"),customProgramCacheKey:E.customProgramCacheKey()}}function x(E){let A=[];if(E.shaderID?A.push(E.shaderID):(A.push(xz(E.fragmentShader)),A.push(xz(E.vertexShader))),E.defines!==void 0)for(let j in E.defines)A.push(j),A.push(E.defines[j]);if(E.isRawShaderMaterial===!1){for(let j=0;j0?r.push(x):m.transparent===!0?o.push(x):n.push(x)}function d(p,f,m,y,g,_){let x=c(p,f,m,y,g,_);m.transmission>0?r.unshift(x):m.transparent===!0?o.unshift(x):n.unshift(x)}function u(p,f){n.length>1&&n.sort(p||_ae),r.length>1&&r.sort(f||Jz),o.length>1&&o.sort(f||Jz)}function h(){for(let p=t,f=e.length;p=e.get(r).length?(s=new eU(i),e.get(r).push(s)):s=e.get(r)[o],s}function n(){e=new WeakMap}return{get:t,dispose:n}}function bae(){let i={};return{get:function(e){if(i[e.id]!==void 0)return i[e.id];let t;switch(e.type){case"DirectionalLight":t={direction:new O,color:new je};break;case"SpotLight":t={position:new O,direction:new O,color:new je,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":t={position:new O,color:new je,distance:0,decay:0};break;case"HemisphereLight":t={direction:new O,skyColor:new je,groundColor:new je};break;case"RectAreaLight":t={color:new je,position:new O,halfWidth:new O,halfHeight:new O};break}return i[e.id]=t,t}}}function yae(){let i={};return{get:function(e){if(i[e.id]!==void 0)return i[e.id];let t;switch(e.type){case"DirectionalLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new we};break;case"SpotLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new we};break;case"PointLight":t={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new we,shadowCameraNear:1,shadowCameraFar:1e3};break}return i[e.id]=t,t}}}var xae=0;function wae(i,e){return(e.castShadow?1:0)-(i.castShadow?1:0)}function Cae(i,e){let t=new bae,n=yae(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let d=0;d<9;d++)r.probe.push(new O);let o=new O,s=new dt,a=new dt;function c(d,u){let h=0,p=0,f=0;for(let j=0;j<9;j++)r.probe[j].set(0,0,0);let m=0,y=0,g=0,_=0,x=0,C=0,T=0,D=0;d.sort(wae);let E=u!==!0?Math.PI:1;for(let j=0,q=d.length;j0&&(e.isWebGL2||i.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=Ue.LTC_FLOAT_1,r.rectAreaLTC2=Ue.LTC_FLOAT_2):i.has("OES_texture_half_float_linear")===!0?(r.rectAreaLTC1=Ue.LTC_HALF_1,r.rectAreaLTC2=Ue.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=h,r.ambient[1]=p,r.ambient[2]=f;let A=r.hash;(A.directionalLength!==m||A.pointLength!==y||A.spotLength!==g||A.rectAreaLength!==_||A.hemiLength!==x||A.numDirectionalShadows!==C||A.numPointShadows!==T||A.numSpotShadows!==D)&&(r.directional.length=m,r.spot.length=g,r.rectArea.length=_,r.point.length=y,r.hemi.length=x,r.directionalShadow.length=C,r.directionalShadowMap.length=C,r.pointShadow.length=T,r.pointShadowMap.length=T,r.spotShadow.length=D,r.spotShadowMap.length=D,r.directionalShadowMatrix.length=C,r.pointShadowMatrix.length=T,r.spotShadowMatrix.length=D,A.directionalLength=m,A.pointLength=y,A.spotLength=g,A.rectAreaLength=_,A.hemiLength=x,A.numDirectionalShadows=C,A.numPointShadows=T,A.numSpotShadows=D,r.version=xae++)}function l(d,u){let h=0,p=0,f=0,m=0,y=0,g=u.matrixWorldInverse;for(let _=0,x=d.length;_=t.get(o).length?(a=new tU(i,e),t.get(o).push(a)):a=t.get(o)[s],a}function r(){t=new WeakMap}return{get:n,dispose:r}}var Vp=class extends Oi{constructor(e){super(),this.type="MeshDepthMaterial",this.depthPacking=_H,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.depthPacking=e.depthPacking,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this}};Vp.prototype.isMeshDepthMaterial=!0;var zp=class extends Oi{constructor(e){super(),this.type="MeshDistanceMaterial",this.referencePosition=new O,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(e)}copy(e){return super.copy(e),this.referencePosition.copy(e.referencePosition),this.nearDistance=e.nearDistance,this.farDistance=e.farDistance,this.map=e.map,this.alphaMap=e.alphaMap,this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this}};zp.prototype.isMeshDistanceMaterial=!0;var Mae=`void main() { - gl_Position = vec4( position, 1.0 ); -}`,Eae=`uniform sampler2D shadow_pass; -uniform vec2 resolution; -uniform float radius; -#include -void main() { - const float samples = float( VSM_SAMPLES ); - float mean = 0.0; - float squared_mean = 0.0; - float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); - float uvStart = samples <= 1.0 ? 0.0 : - 1.0; - for ( float i = 0.0; i < samples; i ++ ) { - float uvOffset = uvStart + i * uvStride; - #ifdef HORIZONTAL_PASS - vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); - mean += distribution.x; - squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; - #else - float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); - mean += depth; - squared_mean += depth * depth; - #endif - } - mean = mean / samples; - squared_mean = squared_mean / samples; - float std_dev = sqrt( squared_mean - mean * mean ); - gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); -}`;function kH(i,e,t){let n=new ru,r=new we,o=new we,s=new Sn,a=new Vp({depthPacking:vH}),c=new zp,l={},d=t.maxTextureSize,u={0:Ci,1:eu,2:tu},h=new Cs({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new we},radius:{value:4}},vertexShader:Mae,fragmentShader:Eae}),p=h.clone();p.defines.HORIZONTAL_PASS=1;let f=new Dt;f.setAttribute("position",new un(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let m=new pi(f,h),y=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=jP,this.render=function(C,T,D){if(y.enabled===!1||y.autoUpdate===!1&&y.needsUpdate===!1||C.length===0)return;let E=i.getRenderTarget(),A=i.getActiveCubeFace(),j=i.getActiveMipmapLevel(),q=i.state;q.setBlending(Qa),q.buffers.color.setClear(1,1,1,1),q.buffers.depth.setTest(!0),q.setScissorTest(!1);for(let z=0,P=C.length;zd||r.y>d)&&(r.x>d&&(o.x=Math.floor(d/Y.x),r.x=o.x*Y.x,W.mapSize.x=o.x),r.y>d&&(o.y=Math.floor(d/Y.y),r.y=o.y*Y.y,W.mapSize.y=o.y)),W.map===null&&!W.isPointLightShadow&&this.type===Cp){let G={minFilter:zi,magFilter:zi,format:sr};W.map=new So(r.x,r.y,G),W.map.texture.name=U.name+".shadowMap",W.mapPass=new So(r.x,r.y,G),W.camera.updateProjectionMatrix()}if(W.map===null){let G={minFilter:Pi,magFilter:Pi,format:sr};W.map=new So(r.x,r.y,G),W.map.texture.name=U.name+".shadowMap",W.camera.updateProjectionMatrix()}i.setRenderTarget(W.map),i.clear();let k=W.getViewportCount();for(let G=0;G0){let U=z.uuid,W=D.uuid,Y=l[U];Y===void 0&&(Y={},l[U]=Y);let k=Y[W];k===void 0&&(k=z.clone(),Y[W]=k),z=k}return z.visible=D.visible,z.wireframe=D.wireframe,q===Cp?z.side=D.shadowSide!==null?D.shadowSide:D.side:z.side=D.shadowSide!==null?D.shadowSide:u[D.side],z.alphaMap=D.alphaMap,z.alphaTest=D.alphaTest,z.clipShadows=D.clipShadows,z.clippingPlanes=D.clippingPlanes,z.clipIntersection=D.clipIntersection,z.displacementMap=D.displacementMap,z.displacementScale=D.displacementScale,z.displacementBias=D.displacementBias,z.wireframeLinewidth=D.wireframeLinewidth,z.linewidth=D.linewidth,E.isPointLight===!0&&z.isMeshDistanceMaterial===!0&&(z.referencePosition.setFromMatrixPosition(E.matrixWorld),z.nearDistance=A,z.farDistance=j),z}function x(C,T,D,E,A){if(C.visible===!1)return;if(C.layers.test(T.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&A===Cp)&&(!C.frustumCulled||n.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(D.matrixWorldInverse,C.matrixWorld);let z=e.update(C),P=C.material;if(Array.isArray(P)){let U=z.groups;for(let W=0,Y=U.length;W=1):Y.indexOf("OpenGL ES")!==-1&&(W=parseFloat(/^OpenGL ES (\d)/.exec(Y)[1]),U=W>=2);let k=null,G={},K=i.getParameter(3088),de=i.getParameter(2978),De=new Sn().fromArray(K),Te=new Sn().fromArray(de);function He(Q,$e,Me){let _t=new Uint8Array(4),ut=i.createTexture();i.bindTexture(Q,ut),i.texParameteri(Q,10241,9728),i.texParameteri(Q,10240,9728);for(let pn=0;pnke||F.height>ke)&&(Le=ke/Math.max(F.width,F.height)),Le<1||N===!0)if(typeof HTMLImageElement<"u"&&F instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&F instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&F instanceof ImageBitmap){let nt=N?wH:Math.floor,At=nt(Le*F.width),bt=nt(Le*F.height);p===void 0&&(p=m(At,bt));let Vt=ge?m(At,bt):p;return Vt.width=At,Vt.height=bt,Vt.getContext("2d").drawImage(F,0,0,At,bt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+F.width+"x"+F.height+") to ("+At+"x"+bt+")."),Vt}else return"data"in F&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+F.width+"x"+F.height+")."),F;return F}function g(F){return fP(F.width)&&fP(F.height)}function _(F){return a?!1:F.wrapS!==or||F.wrapT!==or||F.minFilter!==Pi&&F.minFilter!==zi}function x(F,N){return F.generateMipmaps&&N&&F.minFilter!==Pi&&F.minFilter!==zi}function C(F,N,ge,ke,Le=1){i.generateMipmap(F);let nt=n.get(N);nt.__maxMipLevel=Math.log2(Math.max(ge,ke,Le))}function T(F,N,ge,ke){if(a===!1)return N;if(F!==null){if(i[F]!==void 0)return i[F];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+F+"'")}let Le=N;return N===6403&&(ge===5126&&(Le=33326),ge===5131&&(Le=33325),ge===5121&&(Le=33321)),N===6407&&(ge===5126&&(Le=34837),ge===5131&&(Le=34843),ge===5121&&(Le=32849)),N===6408&&(ge===5126&&(Le=34836),ge===5131&&(Le=34842),ge===5121&&(Le=ke===bl?35907:32856)),(Le===33325||Le===33326||Le===34842||Le===34836)&&e.get("EXT_color_buffer_float"),Le}function D(F){return F===Pi||F===ow||F===sw?9728:9729}function E(F){let N=F.target;N.removeEventListener("dispose",E),j(N),N.isVideoTexture&&h.delete(N),s.memory.textures--}function A(F){let N=F.target;N.removeEventListener("dispose",A),q(N)}function j(F){let N=n.get(F);N.__webglInit!==void 0&&(i.deleteTexture(N.__webglTexture),n.remove(F))}function q(F){let N=F.texture,ge=n.get(F),ke=n.get(N);if(F){if(ke.__webglTexture!==void 0&&(i.deleteTexture(ke.__webglTexture),s.memory.textures--),F.depthTexture&&F.depthTexture.dispose(),F.isWebGLCubeRenderTarget)for(let Le=0;Le<6;Le++)i.deleteFramebuffer(ge.__webglFramebuffer[Le]),ge.__webglDepthbuffer&&i.deleteRenderbuffer(ge.__webglDepthbuffer[Le]);else i.deleteFramebuffer(ge.__webglFramebuffer),ge.__webglDepthbuffer&&i.deleteRenderbuffer(ge.__webglDepthbuffer),ge.__webglMultisampledFramebuffer&&i.deleteFramebuffer(ge.__webglMultisampledFramebuffer),ge.__webglColorRenderbuffer&&i.deleteRenderbuffer(ge.__webglColorRenderbuffer),ge.__webglDepthRenderbuffer&&i.deleteRenderbuffer(ge.__webglDepthRenderbuffer);if(F.isWebGLMultipleRenderTargets)for(let Le=0,nt=N.length;Le=c&&console.warn("THREE.WebGLTextures: Trying to use "+F+" texture units while this GPU supports only "+c),z+=1,F}function W(F,N){let ge=n.get(F);if(F.isVideoTexture&&_e(F),F.version>0&&ge.__version!==F.version){let ke=F.image;if(ke===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(ke.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{He(ge,F,N);return}}t.activeTexture(33984+N),t.bindTexture(3553,ge.__webglTexture)}function Y(F,N){let ge=n.get(F);if(F.version>0&&ge.__version!==F.version){He(ge,F,N);return}t.activeTexture(33984+N),t.bindTexture(35866,ge.__webglTexture)}function k(F,N){let ge=n.get(F);if(F.version>0&&ge.__version!==F.version){He(ge,F,N);return}t.activeTexture(33984+N),t.bindTexture(32879,ge.__webglTexture)}function G(F,N){let ge=n.get(F);if(F.version>0&&ge.__version!==F.version){he(ge,F,N);return}t.activeTexture(33984+N),t.bindTexture(34067,ge.__webglTexture)}let K={[zg]:10497,[or]:33071,[Ug]:33648},de={[Pi]:9728,[ow]:9984,[sw]:9986,[zi]:9729,[YP]:9985,[bu]:9987};function De(F,N,ge){if(ge?(i.texParameteri(F,10242,K[N.wrapS]),i.texParameteri(F,10243,K[N.wrapT]),(F===32879||F===35866)&&i.texParameteri(F,32882,K[N.wrapR]),i.texParameteri(F,10240,de[N.magFilter]),i.texParameteri(F,10241,de[N.minFilter])):(i.texParameteri(F,10242,33071),i.texParameteri(F,10243,33071),(F===32879||F===35866)&&i.texParameteri(F,32882,33071),(N.wrapS!==or||N.wrapT!==or)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),i.texParameteri(F,10240,D(N.magFilter)),i.texParameteri(F,10241,D(N.minFilter)),N.minFilter!==Pi&&N.minFilter!==zi&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),e.has("EXT_texture_filter_anisotropic")===!0){let ke=e.get("EXT_texture_filter_anisotropic");if(N.type===ra&&e.has("OES_texture_float_linear")===!1||a===!1&&N.type===Zd&&e.has("OES_texture_half_float_linear")===!1)return;(N.anisotropy>1||n.get(N).__currentAnisotropy)&&(i.texParameterf(F,ke.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(N.anisotropy,r.getMaxAnisotropy())),n.get(N).__currentAnisotropy=N.anisotropy)}}function Te(F,N){F.__webglInit===void 0&&(F.__webglInit=!0,N.addEventListener("dispose",E),F.__webglTexture=i.createTexture(),s.memory.textures++)}function He(F,N,ge){let ke=3553;N.isDataTexture2DArray&&(ke=35866),N.isDataTexture3D&&(ke=32879),Te(F,N),t.activeTexture(33984+ge),t.bindTexture(ke,F.__webglTexture),i.pixelStorei(37440,N.flipY),i.pixelStorei(37441,N.premultiplyAlpha),i.pixelStorei(3317,N.unpackAlignment),i.pixelStorei(37443,0);let Le=_(N)&&g(N.image)===!1,nt=y(N.image,Le,!1,d),At=g(nt)||a,bt=o.convert(N.format),Vt=o.convert(N.type),gt=T(N.internalFormat,bt,Vt,N.encoding);De(ke,N,At);let Q,$e=N.mipmaps;if(N.isDepthTexture)gt=6402,a?N.type===ra?gt=36012:N.type===Ag?gt=33190:N.type===Ip?gt=35056:gt=33189:N.type===ra&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),N.format===Kd&>===6402&&N.type!==Hg&&N.type!==Ag&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),N.type=Hg,Vt=o.convert(N.type)),N.format===Dp&>===6402&&(gt=34041,N.type!==Ip&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),N.type=Ip,Vt=o.convert(N.type))),t.texImage2D(3553,0,gt,nt.width,nt.height,0,bt,Vt,null);else if(N.isDataTexture)if($e.length>0&&At){for(let Me=0,_t=$e.length;Me<_t;Me++)Q=$e[Me],t.texImage2D(3553,Me,gt,Q.width,Q.height,0,bt,Vt,Q.data);N.generateMipmaps=!1,F.__maxMipLevel=$e.length-1}else t.texImage2D(3553,0,gt,nt.width,nt.height,0,bt,Vt,nt.data),F.__maxMipLevel=0;else if(N.isCompressedTexture){for(let Me=0,_t=$e.length;Me<_t;Me++)Q=$e[Me],N.format!==sr&&N.format!==Qd?bt!==null?t.compressedTexImage2D(3553,Me,gt,Q.width,Q.height,0,Q.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .uploadTexture()"):t.texImage2D(3553,Me,gt,Q.width,Q.height,0,bt,Vt,Q.data);F.__maxMipLevel=$e.length-1}else if(N.isDataTexture2DArray)t.texImage3D(35866,0,gt,nt.width,nt.height,nt.depth,0,bt,Vt,nt.data),F.__maxMipLevel=0;else if(N.isDataTexture3D)t.texImage3D(32879,0,gt,nt.width,nt.height,nt.depth,0,bt,Vt,nt.data),F.__maxMipLevel=0;else if($e.length>0&&At){for(let Me=0,_t=$e.length;Me<_t;Me++)Q=$e[Me],t.texImage2D(3553,Me,gt,bt,Vt,Q);N.generateMipmaps=!1,F.__maxMipLevel=$e.length-1}else t.texImage2D(3553,0,gt,bt,Vt,nt),F.__maxMipLevel=0;x(N,At)&&C(ke,N,nt.width,nt.height),F.__version=N.version,N.onUpdate&&N.onUpdate(N)}function he(F,N,ge){if(N.image.length!==6)return;Te(F,N),t.activeTexture(33984+ge),t.bindTexture(34067,F.__webglTexture),i.pixelStorei(37440,N.flipY),i.pixelStorei(37441,N.premultiplyAlpha),i.pixelStorei(3317,N.unpackAlignment),i.pixelStorei(37443,0);let ke=N&&(N.isCompressedTexture||N.image[0].isCompressedTexture),Le=N.image[0]&&N.image[0].isDataTexture,nt=[];for(let Me=0;Me<6;Me++)!ke&&!Le?nt[Me]=y(N.image[Me],!1,!0,l):nt[Me]=Le?N.image[Me].image:N.image[Me];let At=nt[0],bt=g(At)||a,Vt=o.convert(N.format),gt=o.convert(N.type),Q=T(N.internalFormat,Vt,gt,N.encoding);De(34067,N,bt);let $e;if(ke){for(let Me=0;Me<6;Me++){$e=nt[Me].mipmaps;for(let _t=0;_t<$e.length;_t++){let ut=$e[_t];N.format!==sr&&N.format!==Qd?Vt!==null?t.compressedTexImage2D(34069+Me,_t,Q,ut.width,ut.height,0,ut.data):console.warn("THREE.WebGLRenderer: Attempt to load unsupported compressed texture format in .setTextureCube()"):t.texImage2D(34069+Me,_t,Q,ut.width,ut.height,0,Vt,gt,ut.data)}}F.__maxMipLevel=$e.length-1}else{$e=N.mipmaps;for(let Me=0;Me<6;Me++)if(Le){t.texImage2D(34069+Me,0,Q,nt[Me].width,nt[Me].height,0,Vt,gt,nt[Me].data);for(let _t=0;_t<$e.length;_t++){let pn=$e[_t].image[Me].image;t.texImage2D(34069+Me,_t+1,Q,pn.width,pn.height,0,Vt,gt,pn.data)}}else{t.texImage2D(34069+Me,0,Q,Vt,gt,nt[Me]);for(let _t=0;_t<$e.length;_t++){let ut=$e[_t];t.texImage2D(34069+Me,_t+1,Q,Vt,gt,ut.image[Me])}}F.__maxMipLevel=$e.length}x(N,bt)&&C(34067,N,At.width,At.height),F.__version=N.version,N.onUpdate&&N.onUpdate(N)}function se(F,N,ge,ke,Le){let nt=o.convert(ge.format),At=o.convert(ge.type),bt=T(ge.internalFormat,nt,At,ge.encoding);Le===32879||Le===35866?t.texImage3D(Le,0,bt,N.width,N.height,N.depth,0,nt,At,null):t.texImage2D(Le,0,bt,N.width,N.height,0,nt,At,null),t.bindFramebuffer(36160,F),i.framebufferTexture2D(36160,ke,Le,n.get(ge).__webglTexture,0),t.bindFramebuffer(36160,null)}function qe(F,N,ge){if(i.bindRenderbuffer(36161,F),N.depthBuffer&&!N.stencilBuffer){let ke=33189;if(ge){let Le=N.depthTexture;Le&&Le.isDepthTexture&&(Le.type===ra?ke=36012:Le.type===Ag&&(ke=33190));let nt=Ot(N);i.renderbufferStorageMultisample(36161,nt,ke,N.width,N.height)}else i.renderbufferStorage(36161,ke,N.width,N.height);i.framebufferRenderbuffer(36160,36096,36161,F)}else if(N.depthBuffer&&N.stencilBuffer){if(ge){let ke=Ot(N);i.renderbufferStorageMultisample(36161,ke,35056,N.width,N.height)}else i.renderbufferStorage(36161,34041,N.width,N.height);i.framebufferRenderbuffer(36160,33306,36161,F)}else{let ke=N.isWebGLMultipleRenderTargets===!0?N.texture[0]:N.texture,Le=o.convert(ke.format),nt=o.convert(ke.type),At=T(ke.internalFormat,Le,nt,ke.encoding);if(ge){let bt=Ot(N);i.renderbufferStorageMultisample(36161,bt,At,N.width,N.height)}else i.renderbufferStorage(36161,At,N.width,N.height)}i.bindRenderbuffer(36161,null)}function ue(F,N){if(N&&N.isWebGLCubeRenderTarget)throw new Error("Depth Texture with cube render targets is not supported");if(t.bindFramebuffer(36160,F),!(N.depthTexture&&N.depthTexture.isDepthTexture))throw new Error("renderTarget.depthTexture must be an instance of THREE.DepthTexture");(!n.get(N.depthTexture).__webglTexture||N.depthTexture.image.width!==N.width||N.depthTexture.image.height!==N.height)&&(N.depthTexture.image.width=N.width,N.depthTexture.image.height=N.height,N.depthTexture.needsUpdate=!0),W(N.depthTexture,0);let ke=n.get(N.depthTexture).__webglTexture;if(N.depthTexture.format===Kd)i.framebufferTexture2D(36160,36096,3553,ke,0);else if(N.depthTexture.format===Dp)i.framebufferTexture2D(36160,33306,3553,ke,0);else throw new Error("Unknown depthTexture format")}function Ge(F){let N=n.get(F),ge=F.isWebGLCubeRenderTarget===!0;if(F.depthTexture){if(ge)throw new Error("target.depthTexture not supported in Cube render targets");ue(N.__webglFramebuffer,F)}else if(ge){N.__webglDepthbuffer=[];for(let ke=0;ke<6;ke++)t.bindFramebuffer(36160,N.__webglFramebuffer[ke]),N.__webglDepthbuffer[ke]=i.createRenderbuffer(),qe(N.__webglDepthbuffer[ke],F,!1)}else t.bindFramebuffer(36160,N.__webglFramebuffer),N.__webglDepthbuffer=i.createRenderbuffer(),qe(N.__webglDepthbuffer,F,!1);t.bindFramebuffer(36160,null)}function ft(F){let N=F.texture,ge=n.get(F),ke=n.get(N);F.addEventListener("dispose",A),F.isWebGLMultipleRenderTargets!==!0&&(ke.__webglTexture=i.createTexture(),ke.__version=N.version,s.memory.textures++);let Le=F.isWebGLCubeRenderTarget===!0,nt=F.isWebGLMultipleRenderTargets===!0,At=F.isWebGLMultisampleRenderTarget===!0,bt=N.isDataTexture3D||N.isDataTexture2DArray,Vt=g(F)||a;if(a&&N.format===Qd&&(N.type===ra||N.type===Zd)&&(N.format=sr,console.warn("THREE.WebGLRenderer: Rendering to textures with RGB format is not supported. Using RGBA format instead.")),Le){ge.__webglFramebuffer=[];for(let gt=0;gt<6;gt++)ge.__webglFramebuffer[gt]=i.createFramebuffer()}else if(ge.__webglFramebuffer=i.createFramebuffer(),nt)if(r.drawBuffers){let gt=F.texture;for(let Q=0,$e=gt.length;Q<$e;Q++){let Me=n.get(gt[Q]);Me.__webglTexture===void 0&&(Me.__webglTexture=i.createTexture(),s.memory.textures++)}}else console.warn("THREE.WebGLRenderer: WebGLMultipleRenderTargets can only be used with WebGL2 or WEBGL_draw_buffers extension.");else if(At)if(a){ge.__webglMultisampledFramebuffer=i.createFramebuffer(),ge.__webglColorRenderbuffer=i.createRenderbuffer(),i.bindRenderbuffer(36161,ge.__webglColorRenderbuffer);let gt=o.convert(N.format),Q=o.convert(N.type),$e=T(N.internalFormat,gt,Q,N.encoding),Me=Ot(F);i.renderbufferStorageMultisample(36161,Me,$e,F.width,F.height),t.bindFramebuffer(36160,ge.__webglMultisampledFramebuffer),i.framebufferRenderbuffer(36160,36064,36161,ge.__webglColorRenderbuffer),i.bindRenderbuffer(36161,null),F.depthBuffer&&(ge.__webglDepthRenderbuffer=i.createRenderbuffer(),qe(ge.__webglDepthRenderbuffer,F,!0)),t.bindFramebuffer(36160,null)}else console.warn("THREE.WebGLRenderer: WebGLMultisampleRenderTarget can only be used with WebGL2.");if(Le){t.bindTexture(34067,ke.__webglTexture),De(34067,N,Vt);for(let gt=0;gt<6;gt++)se(ge.__webglFramebuffer[gt],F,N,36064,34069+gt);x(N,Vt)&&C(34067,N,F.width,F.height),t.unbindTexture()}else if(nt){let gt=F.texture;for(let Q=0,$e=gt.length;Q<$e;Q++){let Me=gt[Q],_t=n.get(Me);t.bindTexture(3553,_t.__webglTexture),De(3553,Me,Vt),se(ge.__webglFramebuffer,F,Me,36064+Q,3553),x(Me,Vt)&&C(3553,Me,F.width,F.height)}t.unbindTexture()}else{let gt=3553;bt&&(a?gt=N.isDataTexture3D?32879:35866:console.warn("THREE.DataTexture3D and THREE.DataTexture2DArray only supported with WebGL2.")),t.bindTexture(gt,ke.__webglTexture),De(gt,N,Vt),se(ge.__webglFramebuffer,F,N,36064,gt),x(N,Vt)&&C(gt,N,F.width,F.height,F.depth),t.unbindTexture()}F.depthBuffer&&Ge(F)}function ze(F){let N=g(F)||a,ge=F.isWebGLMultipleRenderTargets===!0?F.texture:[F.texture];for(let ke=0,Le=ge.length;kep+f?(l.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:e.handedness,target:this})):!l.inputState.pinching&&h<=p-f&&(l.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:e.handedness,target:this}))}else c!==null&&e.gripSpace&&(o=t.getPose(e.gripSpace,n),o!==null&&(c.matrix.fromArray(o.transform.matrix),c.matrix.decompose(c.position,c.rotation,c.scale),o.linearVelocity?(c.hasLinearVelocity=!0,c.linearVelocity.copy(o.linearVelocity)):c.hasLinearVelocity=!1,o.angularVelocity?(c.hasAngularVelocity=!0,c.angularVelocity.copy(o.angularVelocity)):c.hasAngularVelocity=!1));return a!==null&&(a.visible=r!==null),c!==null&&(c.visible=o!==null),l!==null&&(l.visible=s!==null),this}},gP=class extends sa{constructor(e,t){super();let n=this,r=e.state,o=null,s=1,a=null,c="local-floor",l=null,d=null,u=null,h=null,p=null,f=!1,m=null,y=null,g=null,_=null,x=null,C=null,T=[],D=new Map,E=new Di;E.layers.enable(1),E.viewport=new Sn;let A=new Di;A.layers.enable(2),A.viewport=new Sn;let j=[E,A],q=new Zg;q.layers.enable(1),q.layers.enable(2);let z=null,P=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(he){let se=T[he];return se===void 0&&(se=new kg,T[he]=se),se.getTargetRaySpace()},this.getControllerGrip=function(he){let se=T[he];return se===void 0&&(se=new kg,T[he]=se),se.getGripSpace()},this.getHand=function(he){let se=T[he];return se===void 0&&(se=new kg,T[he]=se),se.getHandSpace()};function U(he){let se=D.get(he.inputSource);se&&se.dispatchEvent({type:he.type,data:he.inputSource})}function W(){D.forEach(function(he,se){he.disconnect(se)}),D.clear(),z=null,P=null,r.bindXRFramebuffer(null),e.setRenderTarget(e.getRenderTarget()),u&&t.deleteFramebuffer(u),m&&t.deleteFramebuffer(m),y&&t.deleteRenderbuffer(y),g&&t.deleteRenderbuffer(g),u=null,m=null,y=null,g=null,p=null,h=null,d=null,o=null,He.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(he){s=he,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(he){c=he,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return a},this.getBaseLayer=function(){return h!==null?h:p},this.getBinding=function(){return d},this.getFrame=function(){return _},this.getSession=function(){return o},this.setSession=function(he){return It(this,null,function*(){if(o=he,o!==null){o.addEventListener("select",U),o.addEventListener("selectstart",U),o.addEventListener("selectend",U),o.addEventListener("squeeze",U),o.addEventListener("squeezestart",U),o.addEventListener("squeezeend",U),o.addEventListener("end",W),o.addEventListener("inputsourceschange",Y);let se=t.getContextAttributes();if(se.xrCompatible!==!0&&(yield t.makeXRCompatible()),o.renderState.layers===void 0){let qe={antialias:se.antialias,alpha:se.alpha,depth:se.depth,stencil:se.stencil,framebufferScaleFactor:s};p=new XRWebGLLayer(o,t,qe),o.updateRenderState({baseLayer:p})}else if(t instanceof WebGLRenderingContext){let qe={antialias:!0,alpha:se.alpha,depth:se.depth,stencil:se.stencil,framebufferScaleFactor:s};p=new XRWebGLLayer(o,t,qe),o.updateRenderState({layers:[p]})}else{f=se.antialias;let qe=null;se.depth&&(C=256,se.stencil&&(C|=1024),x=se.stencil?33306:36096,qe=se.stencil?35056:33190);let ue={colorFormat:se.alpha?32856:32849,depthFormat:qe,scaleFactor:s};d=new XRWebGLBinding(o,t),h=d.createProjectionLayer(ue),u=t.createFramebuffer(),o.updateRenderState({layers:[h]}),f&&(m=t.createFramebuffer(),y=t.createRenderbuffer(),t.bindRenderbuffer(36161,y),t.renderbufferStorageMultisample(36161,4,32856,h.textureWidth,h.textureHeight),r.bindFramebuffer(36160,m),t.framebufferRenderbuffer(36160,36064,36161,y),t.bindRenderbuffer(36161,null),qe!==null&&(g=t.createRenderbuffer(),t.bindRenderbuffer(36161,g),t.renderbufferStorageMultisample(36161,4,qe,h.textureWidth,h.textureHeight),t.framebufferRenderbuffer(36160,x,36161,g),t.bindRenderbuffer(36161,null)),r.bindFramebuffer(36160,null))}a=yield o.requestReferenceSpace(c),He.setContext(o),He.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}})};function Y(he){let se=o.inputSources;for(let qe=0;qe0&&(g.alphaTest.value=_.alphaTest);let x=i.get(_).envMap;if(x){g.envMap.value=x,g.flipEnvMap.value=x.isCubeTexture&&x.isRenderTargetTexture===!1?-1:1,g.reflectivity.value=_.reflectivity,g.ior.value=_.ior,g.refractionRatio.value=_.refractionRatio;let D=i.get(x).__maxMipLevel;D!==void 0&&(g.maxMipLevel.value=D)}_.lightMap&&(g.lightMap.value=_.lightMap,g.lightMapIntensity.value=_.lightMapIntensity),_.aoMap&&(g.aoMap.value=_.aoMap,g.aoMapIntensity.value=_.aoMapIntensity);let C;_.map?C=_.map:_.specularMap?C=_.specularMap:_.displacementMap?C=_.displacementMap:_.normalMap?C=_.normalMap:_.bumpMap?C=_.bumpMap:_.roughnessMap?C=_.roughnessMap:_.metalnessMap?C=_.metalnessMap:_.alphaMap?C=_.alphaMap:_.emissiveMap?C=_.emissiveMap:_.clearcoatMap?C=_.clearcoatMap:_.clearcoatNormalMap?C=_.clearcoatNormalMap:_.clearcoatRoughnessMap?C=_.clearcoatRoughnessMap:_.specularIntensityMap?C=_.specularIntensityMap:_.specularColorMap?C=_.specularColorMap:_.transmissionMap?C=_.transmissionMap:_.thicknessMap?C=_.thicknessMap:_.sheenColorMap?C=_.sheenColorMap:_.sheenRoughnessMap&&(C=_.sheenRoughnessMap),C!==void 0&&(C.isWebGLRenderTarget&&(C=C.texture),C.matrixAutoUpdate===!0&&C.updateMatrix(),g.uvTransform.value.copy(C.matrix));let T;_.aoMap?T=_.aoMap:_.lightMap&&(T=_.lightMap),T!==void 0&&(T.isWebGLRenderTarget&&(T=T.texture),T.matrixAutoUpdate===!0&&T.updateMatrix(),g.uv2Transform.value.copy(T.matrix))}function r(g,_){g.diffuse.value.copy(_.color),g.opacity.value=_.opacity}function o(g,_){g.dashSize.value=_.dashSize,g.totalSize.value=_.dashSize+_.gapSize,g.scale.value=_.scale}function s(g,_,x,C){g.diffuse.value.copy(_.color),g.opacity.value=_.opacity,g.size.value=_.size*x,g.scale.value=C*.5,_.map&&(g.map.value=_.map),_.alphaMap&&(g.alphaMap.value=_.alphaMap),_.alphaTest>0&&(g.alphaTest.value=_.alphaTest);let T;_.map?T=_.map:_.alphaMap&&(T=_.alphaMap),T!==void 0&&(T.matrixAutoUpdate===!0&&T.updateMatrix(),g.uvTransform.value.copy(T.matrix))}function a(g,_){g.diffuse.value.copy(_.color),g.opacity.value=_.opacity,g.rotation.value=_.rotation,_.map&&(g.map.value=_.map),_.alphaMap&&(g.alphaMap.value=_.alphaMap),_.alphaTest>0&&(g.alphaTest.value=_.alphaTest);let x;_.map?x=_.map:_.alphaMap&&(x=_.alphaMap),x!==void 0&&(x.matrixAutoUpdate===!0&&x.updateMatrix(),g.uvTransform.value.copy(x.matrix))}function c(g,_){_.emissiveMap&&(g.emissiveMap.value=_.emissiveMap)}function l(g,_){g.specular.value.copy(_.specular),g.shininess.value=Math.max(_.shininess,1e-4),_.emissiveMap&&(g.emissiveMap.value=_.emissiveMap),_.bumpMap&&(g.bumpMap.value=_.bumpMap,g.bumpScale.value=_.bumpScale,_.side===Ci&&(g.bumpScale.value*=-1)),_.normalMap&&(g.normalMap.value=_.normalMap,g.normalScale.value.copy(_.normalScale),_.side===Ci&&g.normalScale.value.negate()),_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias)}function d(g,_){_.gradientMap&&(g.gradientMap.value=_.gradientMap),_.emissiveMap&&(g.emissiveMap.value=_.emissiveMap),_.bumpMap&&(g.bumpMap.value=_.bumpMap,g.bumpScale.value=_.bumpScale,_.side===Ci&&(g.bumpScale.value*=-1)),_.normalMap&&(g.normalMap.value=_.normalMap,g.normalScale.value.copy(_.normalScale),_.side===Ci&&g.normalScale.value.negate()),_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias)}function u(g,_){g.roughness.value=_.roughness,g.metalness.value=_.metalness,_.roughnessMap&&(g.roughnessMap.value=_.roughnessMap),_.metalnessMap&&(g.metalnessMap.value=_.metalnessMap),_.emissiveMap&&(g.emissiveMap.value=_.emissiveMap),_.bumpMap&&(g.bumpMap.value=_.bumpMap,g.bumpScale.value=_.bumpScale,_.side===Ci&&(g.bumpScale.value*=-1)),_.normalMap&&(g.normalMap.value=_.normalMap,g.normalScale.value.copy(_.normalScale),_.side===Ci&&g.normalScale.value.negate()),_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias),i.get(_).envMap&&(g.envMapIntensity.value=_.envMapIntensity)}function h(g,_,x){u(g,_),g.ior.value=_.ior,_.sheen>0&&(g.sheenColor.value.copy(_.sheenColor).multiplyScalar(_.sheen),g.sheenRoughness.value=_.sheenRoughness,_.sheenColorMap&&(g.sheenColorMap.value=_.sheenColorMap),_.sheenRoughnessMap&&(g.sheenRoughnessMap.value=_.sheenRoughnessMap)),_.clearcoat>0&&(g.clearcoat.value=_.clearcoat,g.clearcoatRoughness.value=_.clearcoatRoughness,_.clearcoatMap&&(g.clearcoatMap.value=_.clearcoatMap),_.clearcoatRoughnessMap&&(g.clearcoatRoughnessMap.value=_.clearcoatRoughnessMap),_.clearcoatNormalMap&&(g.clearcoatNormalScale.value.copy(_.clearcoatNormalScale),g.clearcoatNormalMap.value=_.clearcoatNormalMap,_.side===Ci&&g.clearcoatNormalScale.value.negate())),_.transmission>0&&(g.transmission.value=_.transmission,g.transmissionSamplerMap.value=x.texture,g.transmissionSamplerSize.value.set(x.width,x.height),_.transmissionMap&&(g.transmissionMap.value=_.transmissionMap),g.thickness.value=_.thickness,_.thicknessMap&&(g.thicknessMap.value=_.thicknessMap),g.attenuationDistance.value=_.attenuationDistance,g.attenuationColor.value.copy(_.attenuationColor)),g.specularIntensity.value=_.specularIntensity,g.specularColor.value.copy(_.specularColor),_.specularIntensityMap&&(g.specularIntensityMap.value=_.specularIntensityMap),_.specularColorMap&&(g.specularColorMap.value=_.specularColorMap)}function p(g,_){_.matcap&&(g.matcap.value=_.matcap),_.bumpMap&&(g.bumpMap.value=_.bumpMap,g.bumpScale.value=_.bumpScale,_.side===Ci&&(g.bumpScale.value*=-1)),_.normalMap&&(g.normalMap.value=_.normalMap,g.normalScale.value.copy(_.normalScale),_.side===Ci&&g.normalScale.value.negate()),_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias)}function f(g,_){_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias)}function m(g,_){_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias),g.referencePosition.value.copy(_.referencePosition),g.nearDistance.value=_.nearDistance,g.farDistance.value=_.farDistance}function y(g,_){_.bumpMap&&(g.bumpMap.value=_.bumpMap,g.bumpScale.value=_.bumpScale,_.side===Ci&&(g.bumpScale.value*=-1)),_.normalMap&&(g.normalMap.value=_.normalMap,g.normalScale.value.copy(_.normalScale),_.side===Ci&&g.normalScale.value.negate()),_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias)}return{refreshFogUniforms:e,refreshMaterialUniforms:t}}function Oae(){let i=nC("canvas");return i.style.display="block",i}function kn(i={}){let e=i.canvas!==void 0?i.canvas:Oae(),t=i.context!==void 0?i.context:null,n=i.alpha!==void 0?i.alpha:!1,r=i.depth!==void 0?i.depth:!0,o=i.stencil!==void 0?i.stencil:!0,s=i.antialias!==void 0?i.antialias:!1,a=i.premultipliedAlpha!==void 0?i.premultipliedAlpha:!0,c=i.preserveDrawingBuffer!==void 0?i.preserveDrawingBuffer:!1,l=i.powerPreference!==void 0?i.powerPreference:"default",d=i.failIfMajorPerformanceCaveat!==void 0?i.failIfMajorPerformanceCaveat:!1,u=null,h=null,p=[],f=[];this.domElement=e,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=cr,this.physicallyCorrectLights=!1,this.toneMapping=cl,this.toneMappingExposure=1;let m=this,y=!1,g=0,_=0,x=null,C=-1,T=null,D=new Sn,E=new Sn,A=null,j=e.width,q=e.height,z=1,P=null,U=null,W=new Sn(0,0,j,q),Y=new Sn(0,0,j,q),k=!1,G=[],K=new ru,de=!1,De=!1,Te=null,He=new dt,he=new O,se={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function qe(){return x===null?z:1}let ue=t;function Ge(L,ie){for(let fe=0;fe0?h=f[f.length-1]:h=null,p.pop(),p.length>0?u=p[p.length-1]:u=null};function bR(L,ie,fe,ae){if(L.visible===!1)return;if(L.layers.test(ie.layers)){if(L.isGroup)fe=L.renderOrder;else if(L.isLOD)L.autoUpdate===!0&&L.update(ie);else if(L.isLight)h.pushLight(L),L.castShadow&&h.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||K.intersectsSprite(L)){ae&&he.setFromMatrixPosition(L.matrixWorld).applyMatrix4(He);let Nt=N.update(L),Pt=L.material;Pt.visible&&u.push(L,Nt,Pt,fe,he.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(L.isSkinnedMesh&&L.skeleton.frame!==Ot.render.frame&&(L.skeleton.update(),L.skeleton.frame=Ot.render.frame),!L.frustumCulled||K.intersectsObject(L))){ae&&he.setFromMatrixPosition(L.matrixWorld).applyMatrix4(He);let Nt=N.update(L),Pt=L.material;if(Array.isArray(Pt)){let cn=Nt.groups;for(let Pn=0,fn=cn.length;Pn0&&Y5(Ce,ie,fe),ae&&Qe.viewport(D.copy(ae)),Ce.length>0&&lv(Ce,ie,fe),Ht.length>0&&lv(Ht,ie,fe),Nt.length>0&&lv(Nt,ie,fe)}function Y5(L,ie,fe){if(Te===null){let Nt=s===!0&&ze.isWebGL2===!0?qg:So;Te=new Nt(1024,1024,{generateMipmaps:!0,type:Me.convert(Zd)!==null?Zd:Ja,minFilter:bu,magFilter:Pi,wrapS:or,wrapT:or})}let ae=m.getRenderTarget();m.setRenderTarget(Te),m.clear();let Ce=m.toneMapping;m.toneMapping=cl,lv(L,ie,fe),m.toneMapping=Ce,Pe.updateMultisampleRenderTarget(Te),Pe.updateRenderTargetMipmap(Te),m.setRenderTarget(ae)}function lv(L,ie,fe){let ae=ie.isScene===!0?ie.overrideMaterial:null;for(let Ce=0,Ht=L.length;Ce=0&&ie<=L.width-ae&&fe>=0&&fe<=L.height-Ce&&ue.readPixels(ie,fe,ae,Ce,Me.convert(Pn),Me.convert(fn),Ht):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{let cn=x!==null?_e.get(x).__webglFramebuffer:null;Qe.bindFramebuffer(36160,cn)}}},this.copyFramebufferToTexture=function(L,ie,fe=0){let ae=Math.pow(2,-fe),Ce=Math.floor(ie.image.width*ae),Ht=Math.floor(ie.image.height*ae),Nt=Me.convert(ie.format);ze.isWebGL2&&(Nt===6407&&(Nt=32849),Nt===6408&&(Nt=32856)),Pe.setTexture2D(ie,0),ue.copyTexImage2D(3553,fe,Nt,L.x,L.y,Ce,Ht,0),Qe.unbindTexture()},this.copyTextureToTexture=function(L,ie,fe,ae=0){let Ce=ie.image.width,Ht=ie.image.height,Nt=Me.convert(fe.format),Pt=Me.convert(fe.type);Pe.setTexture2D(fe,0),ue.pixelStorei(37440,fe.flipY),ue.pixelStorei(37441,fe.premultiplyAlpha),ue.pixelStorei(3317,fe.unpackAlignment),ie.isDataTexture?ue.texSubImage2D(3553,ae,L.x,L.y,Ce,Ht,Nt,Pt,ie.image.data):ie.isCompressedTexture?ue.compressedTexSubImage2D(3553,ae,L.x,L.y,ie.mipmaps[0].width,ie.mipmaps[0].height,Nt,ie.mipmaps[0].data):ue.texSubImage2D(3553,ae,L.x,L.y,Nt,Pt,ie.image),ae===0&&fe.generateMipmaps&&ue.generateMipmap(3553),Qe.unbindTexture()},this.copyTextureToTexture3D=function(L,ie,fe,ae,Ce=0){if(m.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let Ht=L.max.x-L.min.x+1,Nt=L.max.y-L.min.y+1,Pt=L.max.z-L.min.z+1,cn=Me.convert(ae.format),Pn=Me.convert(ae.type),fn;if(ae.isDataTexture3D)Pe.setTexture3D(ae,0),fn=32879;else if(ae.isDataTexture2DArray)Pe.setTexture2DArray(ae,0),fn=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}ue.pixelStorei(37440,ae.flipY),ue.pixelStorei(37441,ae.premultiplyAlpha),ue.pixelStorei(3317,ae.unpackAlignment);let bn=ue.getParameter(3314),oi=ue.getParameter(32878),Tl=ue.getParameter(3316),wn=ue.getParameter(3315),yf=ue.getParameter(32877),Xn=fe.isCompressedTexture?fe.mipmaps[0]:fe.image;ue.pixelStorei(3314,Xn.width),ue.pixelStorei(32878,Xn.height),ue.pixelStorei(3316,L.min.x),ue.pixelStorei(3315,L.min.y),ue.pixelStorei(32877,L.min.z),fe.isDataTexture||fe.isDataTexture3D?ue.texSubImage3D(fn,Ce,ie.x,ie.y,ie.z,Ht,Nt,Pt,cn,Pn,Xn.data):fe.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ue.compressedTexSubImage3D(fn,Ce,ie.x,ie.y,ie.z,Ht,Nt,Pt,cn,Xn.data)):ue.texSubImage3D(fn,Ce,ie.x,ie.y,ie.z,Ht,Nt,Pt,cn,Pn,Xn),ue.pixelStorei(3314,bn),ue.pixelStorei(32878,oi),ue.pixelStorei(3316,Tl),ue.pixelStorei(3315,wn),ue.pixelStorei(32877,yf),Ce===0&&ae.generateMipmaps&&ue.generateMipmap(fn),Qe.unbindTexture()},this.initTexture=function(L){Pe.setTexture2D(L,0),Qe.unbindTexture()},this.resetState=function(){g=0,_=0,x=null,Qe.reset(),_t.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}kn.prototype.isWebGLRenderer=!0;var gw=class extends kn{};gw.prototype.isWebGL1Renderer=!0;var Qg=class i{constructor(e,t=25e-5){this.name="",this.color=new je(e),this.density=t}clone(){return new i(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}};Qg.prototype.isFogExp2=!0;var Kg=class i{constructor(e,t=1,n=1e3){this.name="",this.color=new je(e),this.near=t,this.far=n}clone(){return new i(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}};Kg.prototype.isFog=!0;var Up=class extends hn{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(e,t){return super.copy(e,t),e.background!==null&&(this.background=e.background.clone()),e.environment!==null&&(this.environment=e.environment.clone()),e.fog!==null&&(this.fog=e.fog.clone()),e.overrideMaterial!==null&&(this.overrideMaterial=e.overrideMaterial.clone()),this.autoUpdate=e.autoUpdate,this.matrixAutoUpdate=e.matrixAutoUpdate,this}toJSON(e){let t=super.toJSON(e);return this.fog!==null&&(t.object.fog=this.fog.toJSON()),t}};Up.prototype.isScene=!0;var tc=class{constructor(e,t){this.array=e,this.stride=t,this.count=e!==void 0?e.length/t:0,this.usage=Pp,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Co()}onUploadCallback(){}set needsUpdate(e){e===!0&&this.version++}setUsage(e){return this.usage=e,this}copy(e){return this.array=new e.array.constructor(e.array),this.count=e.count,this.stride=e.stride,this.usage=e.usage,this}copyAt(e,t,n){e*=this.stride,n*=t.stride;for(let r=0,o=this.stride;re.far||t.push({distance:c,point:Ig.clone(),uv:ar.getUV(Ig,kx,Dg,Lx,nU,HD,iU,new we),face:null,object:this})}copy(e){return super.copy(e),e.center!==void 0&&this.center.copy(e.center),this.material=e.material,this}};Gp.prototype.isSprite=!0;function Fx(i,e,t,n,r,o){wp.subVectors(i,t).addScalar(.5).multiply(n),r!==void 0?(Tg.x=o*wp.x-r*wp.y,Tg.y=r*wp.x+o*wp.y):Tg.copy(wp),i.copy(e),i.x+=Tg.x,i.y+=Tg.y,i.applyMatrix4(FH)}var Bx=new O,rU=new O,_w=class extends hn{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(e){super.copy(e,!1);let t=e.levels;for(let n=0,r=t.length;n0){let n,r;for(n=1,r=t.length;n0){Bx.setFromMatrixPosition(this.matrixWorld);let r=e.ray.origin.distanceTo(Bx);this.getObjectForDistance(r).raycast(e,t)}}update(e){let t=this.levels;if(t.length>1){Bx.setFromMatrixPosition(e.matrixWorld),rU.setFromMatrixPosition(this.matrixWorld);let n=Bx.distanceTo(rU)/e.zoom;t[0].object.visible=!0;let r,o;for(r=1,o=t.length;r=t[r].distance;r++)t[r-1].object.visible=!1,t[r].object.visible=!0;for(this._currentLevel=r-1;rc)continue;h.applyMatrix4(this.matrixWorld);let A=e.ray.origin.distanceTo(h);Ae.far||t.push({distance:A,point:u.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}}else{let g=Math.max(0,s.start),_=Math.min(y.count,s.start+s.count);for(let x=g,C=_-1;xc)continue;h.applyMatrix4(this.matrixWorld);let D=e.ray.origin.distanceTo(h);De.far||t.push({distance:D,point:u.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){let e=this.geometry;if(e.isBufferGeometry){let t=e.morphAttributes,n=Object.keys(t);if(n.length>0){let r=t[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=r.length;o0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}};Ss.prototype.isLine=!0;var mU=new O,gU=new O,Cr=class extends Ss{constructor(e,t){super(e,t),this.type="LineSegments"}computeLineDistances(){let e=this.geometry;if(e.isBufferGeometry)if(e.index===null){let t=e.attributes.position,n=[];for(let r=0,o=t.count;r0){let r=t[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=r.length;o0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}};su.prototype.isPoints=!0;function vU(i,e,t,n,r,o,s){let a=_P.distanceSqToPoint(i);if(ar.far)return;o.push({distance:l,distanceToRay:Math.sqrt(a),point:c,index:e,face:null,object:s})}}var bw=class extends Wi{constructor(e,t,n,r,o,s,a,c,l){super(e,t,n,r,o,s,a,c,l),this.format=a!==void 0?a:Qd,this.minFilter=s!==void 0?s:zi,this.magFilter=o!==void 0?o:zi,this.generateMipmaps=!1;let d=this;function u(){d.needsUpdate=!0,e.requestVideoFrameCallback(u)}"requestVideoFrameCallback"in e&&e.requestVideoFrameCallback(u)}clone(){return new this.constructor(this.image).copy(this)}update(){let e=this.image;"requestVideoFrameCallback"in e===!1&&e.readyState>=e.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}};bw.prototype.isVideoTexture=!0;var t_=class extends Wi{constructor(e,t,n,r,o,s,a,c,l,d,u,h){super(null,s,a,c,l,d,r,o,u,h),this.image={width:t,height:n},this.mipmaps=e,this.flipY=!1,this.generateMipmaps=!1}};t_.prototype.isCompressedTexture=!0;var yw=class extends Wi{constructor(e,t,n,r,o,s,a,c,l){super(e,t,n,r,o,s,a,c,l),this.needsUpdate=!0}};yw.prototype.isCanvasTexture=!0;var xw=class extends Wi{constructor(e,t,n,r,o,s,a,c,l,d){if(d=d!==void 0?d:Kd,d!==Kd&&d!==Dp)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&d===Kd&&(n=Hg),n===void 0&&d===Dp&&(n=Ip),super(null,r,o,s,a,c,d,n,l),this.image={width:e,height:t},this.magFilter=a!==void 0?a:Pi,this.minFilter=c!==void 0?c:Pi,this.flipY=!1,this.generateMipmaps=!1}};xw.prototype.isDepthTexture=!0;var n_=class i extends Dt{constructor(e=1,t=8,n=0,r=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:e,segments:t,thetaStart:n,thetaLength:r},t=Math.max(3,t);let o=[],s=[],a=[],c=[],l=new O,d=new we;s.push(0,0,0),a.push(0,0,1),c.push(.5,.5);for(let u=0,h=3;u<=t;u++,h+=3){let p=n+u/t*r;l.x=e*Math.cos(p),l.y=e*Math.sin(p),s.push(l.x,l.y,l.z),a.push(0,0,1),d.x=(s[h]/e+1)/2,d.y=(s[h+1]/e+1)/2,c.push(d.x,d.y)}for(let u=1;u<=t;u++)o.push(u,u+1,0);this.setIndex(o),this.setAttribute("position",new ot(s,3)),this.setAttribute("normal",new ot(a,3)),this.setAttribute("uv",new ot(c,2))}static fromJSON(e){return new i(e.radius,e.segments,e.thetaStart,e.thetaLength)}},au=class i extends Dt{constructor(e=1,t=1,n=1,r=8,o=1,s=!1,a=0,c=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:e,radiusBottom:t,height:n,radialSegments:r,heightSegments:o,openEnded:s,thetaStart:a,thetaLength:c};let l=this;r=Math.floor(r),o=Math.floor(o);let d=[],u=[],h=[],p=[],f=0,m=[],y=n/2,g=0;_(),s===!1&&(e>0&&x(!0),t>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new ot(u,3)),this.setAttribute("normal",new ot(h,3)),this.setAttribute("uv",new ot(p,2));function _(){let C=new O,T=new O,D=0,E=(t-e)/n;for(let A=0;A<=o;A++){let j=[],q=A/o,z=q*(t-e)+e;for(let P=0;P<=r;P++){let U=P/r,W=U*c+a,Y=Math.sin(W),k=Math.cos(W);T.x=z*Y,T.y=-q*n+y,T.z=z*k,u.push(T.x,T.y,T.z),C.set(Y,E,k).normalize(),h.push(C.x,C.y,C.z),p.push(U,1-q),j.push(f++)}m.push(j)}for(let A=0;A.9&&E<.1&&(x<.2&&(s[_+0]+=1),C<.2&&(s[_+2]+=1),T<.2&&(s[_+4]+=1))}}function h(_){o.push(_.x,_.y,_.z)}function p(_,x){let C=_*3;x.x=e[C+0],x.y=e[C+1],x.z=e[C+2]}function f(){let _=new O,x=new O,C=new O,T=new O,D=new we,E=new we,A=new we;for(let j=0,q=0;j0)c=r-1;else{c=r;break}if(r=c,n[r]===s)return r/(o-1);let d=n[r],h=n[r+1]-d,p=(s-d)/h;return(r+p)/(o-1)}getTangent(e,t){let r=e-1e-4,o=e+1e-4;r<0&&(r=0),o>1&&(o=1);let s=this.getPoint(r),a=this.getPoint(o),c=t||(s.isVector2?new we:new O);return c.copy(a).sub(s).normalize(),c}getTangentAt(e,t){let n=this.getUtoTmapping(e);return this.getTangent(n,t)}computeFrenetFrames(e,t){let n=new O,r=[],o=[],s=[],a=new O,c=new dt;for(let p=0;p<=e;p++){let f=p/e;r[p]=this.getTangentAt(f,new O)}o[0]=new O,s[0]=new O;let l=Number.MAX_VALUE,d=Math.abs(r[0].x),u=Math.abs(r[0].y),h=Math.abs(r[0].z);d<=l&&(l=d,n.set(1,0,0)),u<=l&&(l=u,n.set(0,1,0)),h<=l&&n.set(0,0,1),a.crossVectors(r[0],n).normalize(),o[0].crossVectors(r[0],a),s[0].crossVectors(r[0],o[0]);for(let p=1;p<=e;p++){if(o[p]=o[p-1].clone(),s[p]=s[p-1].clone(),a.crossVectors(r[p-1],r[p]),a.length()>Number.EPSILON){a.normalize();let f=Math.acos(rr(r[p-1].dot(r[p]),-1,1));o[p].applyMatrix4(c.makeRotationAxis(a,f))}s[p].crossVectors(r[p],o[p])}if(t===!0){let p=Math.acos(rr(o[0].dot(o[e]),-1,1));p/=e,r[0].dot(a.crossVectors(o[0],o[e]))>0&&(p=-p);for(let f=1;f<=e;f++)o[f].applyMatrix4(c.makeRotationAxis(r[f],p*f)),s[f].crossVectors(r[f],o[f])}return{tangents:r,normals:o,binormals:s}}clone(){return new this.constructor().copy(this)}copy(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}toJSON(){let e={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return e.arcLengthDivisions=this.arcLengthDivisions,e.type=this.type,e}fromJSON(e){return this.arcLengthDivisions=e.arcLengthDivisions,this}},cu=class extends Xr{constructor(e=0,t=0,n=1,r=1,o=0,s=Math.PI*2,a=!1,c=0){super(),this.type="EllipseCurve",this.aX=e,this.aY=t,this.xRadius=n,this.yRadius=r,this.aStartAngle=o,this.aEndAngle=s,this.aClockwise=a,this.aRotation=c}getPoint(e,t){let n=t||new we,r=Math.PI*2,o=this.aEndAngle-this.aStartAngle,s=Math.abs(o)r;)o-=r;o0?0:(Math.floor(Math.abs(a)/o)+1)*o:c===0&&a===o-1&&(a=o-2,c=1);let l,d;this.closed||a>0?l=r[(a-1)%o]:($x.subVectors(r[0],r[1]).add(r[0]),l=$x);let u=r[a%o],h=r[(a+1)%o];if(this.closed||a+2r.length-2?r.length-1:s+1],u=r[s>r.length-3?r.length-1:s+2];return n.set(bU(a,c.x,l.x,d.x,u.x),bU(a,c.y,l.y,d.y,u.y)),n}copy(e){super.copy(e),this.points=[];for(let t=0,n=e.points.length;t=n){let s=r[o]-n,a=this.curves[o],c=a.getLength(),l=c===0?0:1-s/c;return a.getPointAt(l,t)}o++}return null}getLength(){let e=this.getCurveLengths();return e[e.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;let e=[],t=0;for(let n=0,r=this.curves.length;n1&&!t[t.length-1].equals(t[0])&&t.push(t[0]),t}copy(e){super.copy(e),this.curves=[];for(let t=0,n=e.curves.length;t0){let u=l.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(l);let d=l.getPoint(1);return this.currentPoint.copy(d),this}copy(e){return super.copy(e),this.currentPoint.copy(e.currentPoint),this}toJSON(){let e=super.toJSON();return e.currentPoint=this.currentPoint.toArray(),e}fromJSON(e){return super.fromJSON(e),this.currentPoint.fromArray(e.currentPoint),this}},Zo=class extends du{constructor(e){super(e),this.uuid=Co(),this.type="Shape",this.holes=[]}getPointsHoles(e){let t=[];for(let n=0,r=this.holes.length;n80*t){a=l=i[0],c=d=i[1];for(let f=t;fl&&(l=u),h>d&&(d=h);p=Math.max(l-a,d-c),p=p!==0?1/p:0}return l_(o,s,t,a,c,p),s}};function BH(i,e,t,n,r){let o,s;if(r===ice(i,e,t,n)>0)for(o=e;o=e;o-=n)s=yU(o,i[o],i[o+1],s);return s&&iC(s,s.next)&&(u_(s),s=s.next),s}function gl(i,e){if(!i)return i;e||(e=i);let t=i,n;do if(n=!1,!t.steiner&&(iC(t,t.next)||ii(t.prev,t,t.next)===0)){if(u_(t),t=e=t.prev,t===t.next)break;n=!0}else t=t.next;while(n||t!==e);return e}function l_(i,e,t,n,r,o,s){if(!i)return;!s&&o&&Qae(i,n,r,o);let a=i,c,l;for(;i.prev!==i.next;){if(c=i.prev,l=i.next,o?Gae(i,n,r,o):Hae(i)){e.push(c.i/t),e.push(i.i/t),e.push(l.i/t),u_(i),i=l.next,a=l.next;continue}if(i=l,i===a){s?s===1?(i=jae(gl(i),e,t),l_(i,e,t,n,r,o,2)):s===2&&Wae(i,e,t,n,r,o):l_(gl(i),e,t,n,r,o,1);break}}}function Hae(i){let e=i.prev,t=i,n=i.next;if(ii(e,t,n)>=0)return!1;let r=i.next.next;for(;r!==i.prev;){if(Mp(e.x,e.y,t.x,t.y,n.x,n.y,r.x,r.y)&&ii(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function Gae(i,e,t,n){let r=i.prev,o=i,s=i.next;if(ii(r,o,s)>=0)return!1;let a=r.xo.x?r.x>s.x?r.x:s.x:o.x>s.x?o.x:s.x,d=r.y>o.y?r.y>s.y?r.y:s.y:o.y>s.y?o.y:s.y,u=vP(a,c,e,t,n),h=vP(l,d,e,t,n),p=i.prevZ,f=i.nextZ;for(;p&&p.z>=u&&f&&f.z<=h;){if(p!==i.prev&&p!==i.next&&Mp(r.x,r.y,o.x,o.y,s.x,s.y,p.x,p.y)&&ii(p.prev,p,p.next)>=0||(p=p.prevZ,f!==i.prev&&f!==i.next&&Mp(r.x,r.y,o.x,o.y,s.x,s.y,f.x,f.y)&&ii(f.prev,f,f.next)>=0))return!1;f=f.nextZ}for(;p&&p.z>=u;){if(p!==i.prev&&p!==i.next&&Mp(r.x,r.y,o.x,o.y,s.x,s.y,p.x,p.y)&&ii(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;f&&f.z<=h;){if(f!==i.prev&&f!==i.next&&Mp(r.x,r.y,o.x,o.y,s.x,s.y,f.x,f.y)&&ii(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function jae(i,e,t){let n=i;do{let r=n.prev,o=n.next.next;!iC(r,o)&&VH(r,n,n.next,o)&&d_(r,o)&&d_(o,r)&&(e.push(r.i/t),e.push(n.i/t),e.push(o.i/t),u_(n),u_(n.next),n=i=o),n=n.next}while(n!==i);return gl(n)}function Wae(i,e,t,n,r,o){let s=i;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i&&ece(s,a)){let c=zH(s,a);s=gl(s,s.next),c=gl(c,c.next),l_(s,e,t,n,r,o),l_(c,e,t,n,r,o);return}a=a.next}s=s.next}while(s!==i)}function $ae(i,e,t,n){let r=[],o,s,a,c,l;for(o=0,s=e.length;o=t.next.y&&t.next.y!==t.y){let h=t.x+(r-t.y)*(t.next.x-t.x)/(t.next.y-t.y);if(h<=n&&h>o){if(o=h,h===n){if(r===t.y)return t;if(r===t.next.y)return t.next}s=t.x=t.x&&t.x>=c&&n!==t.x&&Mp(rs.x||t.x===s.x&&Zae(s,t)))&&(s=t,d=u)),t=t.next;while(t!==a);return s}function Zae(i,e){return ii(i.prev,i,e.prev)<0&&ii(e.next,i,i.next)<0}function Qae(i,e,t,n){let r=i;do r.z===null&&(r.z=vP(r.x,r.y,e,t,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==i);r.prevZ.nextZ=null,r.prevZ=null,Kae(r)}function Kae(i){let e,t,n,r,o,s,a,c,l=1;do{for(t=i,i=null,o=null,s=0;t;){for(s++,n=t,a=0,e=0;e0||c>0&&n;)a!==0&&(c===0||!n||t.z<=n.z)?(r=t,t=t.nextZ,a--):(r=n,n=n.nextZ,c--),o?o.nextZ=r:i=r,r.prevZ=o,o=r;t=n}o.nextZ=null,l*=2}while(s>1);return i}function vP(i,e,t,n,r){return i=32767*(i-t)*r,e=32767*(e-n)*r,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,e=(e|e<<8)&16711935,e=(e|e<<4)&252645135,e=(e|e<<2)&858993459,e=(e|e<<1)&1431655765,i|e<<1}function Jae(i){let e=i,t=i;do(e.x=0&&(i-s)*(n-a)-(t-s)*(e-a)>=0&&(t-s)*(o-a)-(r-s)*(n-a)>=0}function ece(i,e){return i.next.i!==e.i&&i.prev.i!==e.i&&!tce(i,e)&&(d_(i,e)&&d_(e,i)&&nce(i,e)&&(ii(i.prev,i,e.prev)||ii(i,e.prev,e))||iC(i,e)&&ii(i.prev,i,i.next)>0&&ii(e.prev,e,e.next)>0)}function ii(i,e,t){return(e.y-i.y)*(t.x-e.x)-(e.x-i.x)*(t.y-e.y)}function iC(i,e){return i.x===e.x&&i.y===e.y}function VH(i,e,t,n){let r=Yx(ii(i,e,t)),o=Yx(ii(i,e,n)),s=Yx(ii(t,n,i)),a=Yx(ii(t,n,e));return!!(r!==o&&s!==a||r===0&&qx(i,t,e)||o===0&&qx(i,n,e)||s===0&&qx(t,i,n)||a===0&&qx(t,e,n))}function qx(i,e,t){return e.x<=Math.max(i.x,t.x)&&e.x>=Math.min(i.x,t.x)&&e.y<=Math.max(i.y,t.y)&&e.y>=Math.min(i.y,t.y)}function Yx(i){return i>0?1:i<0?-1:0}function tce(i,e){let t=i;do{if(t.i!==i.i&&t.next.i!==i.i&&t.i!==e.i&&t.next.i!==e.i&&VH(t,t.next,i,e))return!0;t=t.next}while(t!==i);return!1}function d_(i,e){return ii(i.prev,i,i.next)<0?ii(i,e,i.next)>=0&&ii(i,i.prev,e)>=0:ii(i,e,i.prev)<0||ii(i,i.next,e)<0}function nce(i,e){let t=i,n=!1,r=(i.x+e.x)/2,o=(i.y+e.y)/2;do t.y>o!=t.next.y>o&&t.next.y!==t.y&&r<(t.next.x-t.x)*(o-t.y)/(t.next.y-t.y)+t.x&&(n=!n),t=t.next;while(t!==i);return n}function zH(i,e){let t=new bP(i.i,i.x,i.y),n=new bP(e.i,e.x,e.y),r=i.next,o=e.prev;return i.next=e,e.prev=i,t.next=r,r.prev=t,n.next=t,t.prev=n,o.next=n,n.prev=o,n}function yU(i,e,t,n){let r=new bP(i,e,t);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function u_(i){i.next.prev=i.prev,i.prev.next=i.next,i.prevZ&&(i.prevZ.nextZ=i.nextZ),i.nextZ&&(i.nextZ.prevZ=i.prevZ)}function bP(i,e,t){this.i=i,this.x=e,this.y=t,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function ice(i,e,t,n){let r=0;for(let o=e,s=t-n;o2&&i[e-1].equals(i[0])&&i.pop()}function wU(i,e){for(let t=0;tNumber.EPSILON){let bt=Math.sqrt(nt),Vt=Math.sqrt(ke*ke+Le*Le),gt=Pe.x-ge/bt,Q=Pe.y+N/bt,$e=Be.x-Le/Vt,Me=Be.y+ke/Vt,_t=(($e-gt)*Le-(Me-Q)*ke)/(N*Le-ge*ke);mt=gt+N*_t-_e.x,We=Q+ge*_t-_e.y;let ut=mt*mt+We*We;if(ut<=2)return new we(mt,We);F=Math.sqrt(ut/2)}else{let bt=!1;N>Number.EPSILON?ke>Number.EPSILON&&(bt=!0):N<-Number.EPSILON?ke<-Number.EPSILON&&(bt=!0):Math.sign(ge)===Math.sign(Le)&&(bt=!0),bt?(mt=-ge,We=N,F=Math.sqrt(nt)):(mt=N,We=ge,F=Math.sqrt(nt/2))}return new we(mt/F,We/F)}let de=[];for(let _e=0,Pe=W.length,Be=Pe-1,mt=_e+1;_e=0;_e--){let Pe=_e/y,Be=p*Math.cos(Pe*Math.PI/2),mt=f*Math.sin(Pe*Math.PI/2)+m;for(let We=0,F=W.length;We=0;){let mt=Be,We=Be-1;We<0&&(We=_e.length-1);for(let F=0,N=d+y*2;F0)&&p.push(x,C,D),(g!==n-1||c0!=e>0&&this.version++,this._sheen=e}get clearcoat(){return this._clearcoat}set clearcoat(e){this._clearcoat>0!=e>0&&this.version++,this._clearcoat=e}get transmission(){return this._transmission}set transmission(e){this._transmission>0!=e>0&&this.version++,this._transmission=e}copy(e){return super.copy(e),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=e.clearcoat,this.clearcoatMap=e.clearcoatMap,this.clearcoatRoughness=e.clearcoatRoughness,this.clearcoatRoughnessMap=e.clearcoatRoughnessMap,this.clearcoatNormalMap=e.clearcoatNormalMap,this.clearcoatNormalScale.copy(e.clearcoatNormalScale),this.ior=e.ior,this.sheen=e.sheen,this.sheenColor.copy(e.sheenColor),this.sheenColorMap=e.sheenColorMap,this.sheenRoughness=e.sheenRoughness,this.sheenRoughnessMap=e.sheenRoughnessMap,this.transmission=e.transmission,this.transmissionMap=e.transmissionMap,this.thickness=e.thickness,this.thicknessMap=e.thicknessMap,this.attenuationDistance=e.attenuationDistance,this.attenuationColor.copy(e.attenuationColor),this.specularIntensity=e.specularIntensity,this.specularIntensityMap=e.specularIntensityMap,this.specularColor.copy(e.specularColor),this.specularColorMap=e.specularColorMap,this}};x_.prototype.isMeshPhysicalMaterial=!0;var w_=class extends Oi{constructor(e){super(),this.type="MeshPhongMaterial",this.color=new je(16777215),this.specular=new je(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yu,this.normalScale=new we(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=U_,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.specular.copy(e.specular),this.shininess=e.shininess,this.map=e.map,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,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.flatShading=e.flatShading,this}};w_.prototype.isMeshPhongMaterial=!0;var C_=class extends Oi{constructor(e){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new je(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yu,this.normalScale=new we(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(e)}copy(e){return super.copy(e),this.color.copy(e.color),this.map=e.map,this.gradientMap=e.gradientMap,this.lightMap=e.lightMap,this.lightMapIntensity=e.lightMapIntensity,this.aoMap=e.aoMap,this.aoMapIntensity=e.aoMapIntensity,this.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.wireframeLinecap=e.wireframeLinecap,this.wireframeLinejoin=e.wireframeLinejoin,this}};C_.prototype.isMeshToonMaterial=!0;var S_=class extends Oi{constructor(e){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yu,this.normalScale=new we(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.wireframe=e.wireframe,this.wireframeLinewidth=e.wireframeLinewidth,this.flatShading=e.flatShading,this}};S_.prototype.isMeshNormalMaterial=!0;var M_=class extends Oi{constructor(e){super(),this.type="MeshLambertMaterial",this.color=new je(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new je(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=U_,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",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.emissive.copy(e.emissive),this.emissiveMap=e.emissiveMap,this.emissiveIntensity=e.emissiveIntensity,this.specularMap=e.specularMap,this.alphaMap=e.alphaMap,this.envMap=e.envMap,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}};M_.prototype.isMeshLambertMaterial=!0;var E_=class extends Oi{constructor(e){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new je(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=yu,this.normalScale=new we(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.setValues(e)}copy(e){return super.copy(e),this.defines={MATCAP:""},this.color.copy(e.color),this.matcap=e.matcap,this.map=e.map,this.bumpMap=e.bumpMap,this.bumpScale=e.bumpScale,this.normalMap=e.normalMap,this.normalMapType=e.normalMapType,this.normalScale.copy(e.normalScale),this.displacementMap=e.displacementMap,this.displacementScale=e.displacementScale,this.displacementBias=e.displacementBias,this.alphaMap=e.alphaMap,this.flatShading=e.flatShading,this}};E_.prototype.isMeshMatcapMaterial=!0;var I_=class extends Ri{constructor(e){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(e)}copy(e){return super.copy(e),this.scale=e.scale,this.dashSize=e.dashSize,this.gapSize=e.gapSize,this}};I_.prototype.isLineDashedMaterial=!0;var ace=Object.freeze({__proto__:null,ShadowMaterial:y_,SpriteMaterial:Hp,RawShaderMaterial:pl,ShaderMaterial:Cs,PointsMaterial:ic,MeshPhysicalMaterial:x_,MeshStandardMaterial:Jp,MeshPhongMaterial:w_,MeshToonMaterial:C_,MeshNormalMaterial:S_,MeshLambertMaterial:M_,MeshDepthMaterial:Vp,MeshDistanceMaterial:zp,MeshBasicMaterial:ws,MeshMatcapMaterial:E_,LineDashedMaterial:I_,LineBasicMaterial:Ri,Material:Oi}),Kn={arraySlice:function(i,e,t){return Kn.isTypedArray(i)?new i.constructor(i.subarray(e,t!==void 0?t:i.length)):i.slice(e,t)},convertArray:function(i,e,t){return!i||!t&&i.constructor===e?i:typeof e.BYTES_PER_ELEMENT=="number"?new e(i):Array.prototype.slice.call(i)},isTypedArray:function(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)},getKeyframeOrder:function(i){function e(r,o){return i[r]-i[o]}let t=i.length,n=new Array(t);for(let r=0;r!==t;++r)n[r]=r;return n.sort(e),n},sortedArray:function(i,e,t){let n=i.length,r=new i.constructor(n);for(let o=0,s=0;s!==n;++o){let a=t[o]*e;for(let c=0;c!==e;++c)r[s++]=i[a+c]}return r},flattenJSON:function(i,e,t,n){let r=1,o=i[0];for(;o!==void 0&&o[n]===void 0;)o=i[r++];if(o===void 0)return;let s=o[n];if(s!==void 0)if(Array.isArray(s))do s=o[n],s!==void 0&&(e.push(o.time),t.push.apply(t,s)),o=i[r++];while(o!==void 0);else if(s.toArray!==void 0)do s=o[n],s!==void 0&&(e.push(o.time),s.toArray(t,t.length)),o=i[r++];while(o!==void 0);else do s=o[n],s!==void 0&&(e.push(o.time),t.push(s)),o=i[r++];while(o!==void 0)},subclip:function(i,e,t,n,r=30){let o=i.clone();o.name=e;let s=[];for(let c=0;c=n)){u.push(l.times[p]);for(let m=0;mo.tracks[c].times[0]&&(a=o.tracks[c].times[0]);for(let c=0;c=a.times[f]){let g=f*u+d,_=g+u-d;m=Kn.arraySlice(a.values,g,_)}else{let g=a.createInterpolant(),_=d,x=u-d;g.evaluate(o),m=Kn.arraySlice(g.resultBuffer,_,x)}c==="quaternion"&&new Ui().fromArray(m).normalize().conjugate().toArray(m);let y=l.times.length;for(let g=0;g=o)){let a=t[1];e=o)break t}s=n,n=0;break n}break e}for(;n>>1;et;)--s;if(++s,o!==0||s!==r){o>=s&&(s=Math.max(s,1),o=s-1);let a=this.getValueSize();this.times=Kn.arraySlice(n,o,s),this.values=Kn.arraySlice(this.values,o*a,s*a)}return this}validate(){let e=!0,t=this.getValueSize();t-Math.floor(t)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),e=!1);let n=this.times,r=this.values,o=n.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),e=!1);let s=null;for(let a=0;a!==o;a++){let c=n[a];if(typeof c=="number"&&isNaN(c)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,c),e=!1;break}if(s!==null&&s>c){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,c,s),e=!1;break}s=c}if(r!==void 0&&Kn.isTypedArray(r))for(let a=0,c=r.length;a!==c;++a){let l=r[a];if(isNaN(l)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,l),e=!1;break}}return e}optimize(){let e=Kn.arraySlice(this.times),t=Kn.arraySlice(this.values),n=this.getValueSize(),r=this.getInterpolation()===nw,o=e.length-1,s=1;for(let a=1;a0){e[s]=e[o];for(let a=o*n,c=s*n,l=0;l!==n;++l)t[c+l]=t[a+l];++s}return s!==e.length?(this.times=Kn.arraySlice(e,0,s),this.values=Kn.arraySlice(t,0,s*n)):(this.times=e,this.values=t),this}clone(){let e=Kn.arraySlice(this.times,0),t=Kn.arraySlice(this.values,0),n=this.constructor,r=new n(this.name,e,t);return r.createInterpolant=this.createInterpolant,r}};Mo.prototype.TimeBufferType=Float32Array;Mo.prototype.ValueBufferType=Float32Array;Mo.prototype.DefaultInterpolation=jg;var sc=class extends Mo{};sc.prototype.ValueTypeName="bool";sc.prototype.ValueBufferType=Array;sc.prototype.DefaultInterpolation=Gg;sc.prototype.InterpolantFactoryMethodLinear=void 0;sc.prototype.InterpolantFactoryMethodSmooth=void 0;var D_=class extends Mo{};D_.prototype.ValueTypeName="color";var uu=class extends Mo{};uu.prototype.ValueTypeName="number";var Ew=class extends Ms{constructor(e,t,n,r){super(e,t,n,r)}interpolate_(e,t,n,r){let o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,c=(n-t)/(r-t),l=e*a;for(let d=l+a;l!==d;l+=4)Ui.slerpFlat(o,0,s,l-a,s,l,c);return o}},_l=class extends Mo{InterpolantFactoryMethodLinear(e){return new Ew(this.times,this.values,this.getValueSize(),e)}};_l.prototype.ValueTypeName="quaternion";_l.prototype.DefaultInterpolation=jg;_l.prototype.InterpolantFactoryMethodSmooth=void 0;var ac=class extends Mo{};ac.prototype.ValueTypeName="string";ac.prototype.ValueBufferType=Array;ac.prototype.DefaultInterpolation=Gg;ac.prototype.InterpolantFactoryMethodLinear=void 0;ac.prototype.InterpolantFactoryMethodSmooth=void 0;var hu=class extends Mo{};hu.prototype.ValueTypeName="vector";var pu=class{constructor(e,t=-1,n,r=Jw){this.name=e,this.tracks=n,this.duration=t,this.blendMode=r,this.uuid=Co(),this.duration<0&&this.resetDuration()}static parse(e){let t=[],n=e.tracks,r=1/(e.fps||1);for(let s=0,a=n.length;s!==a;++s)t.push(lce(n[s]).scale(r));let o=new this(e.name,e.duration,t,e.blendMode);return o.uuid=e.uuid,o}static toJSON(e){let t=[],n=e.tracks,r={name:e.name,duration:e.duration,tracks:t,uuid:e.uuid,blendMode:e.blendMode};for(let o=0,s=n.length;o!==s;++o)t.push(Mo.toJSON(n[o]));return r}static CreateFromMorphTargetSequence(e,t,n,r){let o=t.length,s=[];for(let a=0;a1){let u=d[1],h=r[u];h||(r[u]=h=[]),h.push(l)}}let s=[];for(let a in r)s.push(this.CreateFromMorphTargetSequence(a,r[a],t,n));return s}static parseAnimation(e,t){if(!e)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;let n=function(u,h,p,f,m){if(p.length!==0){let y=[],g=[];Kn.flattenJSON(p,y,g,f),y.length!==0&&m.push(new u(h,y,g))}},r=[],o=e.name||"default",s=e.fps||30,a=e.blendMode,c=e.length||-1,l=e.hierarchy||[];for(let u=0;u{t&&t(o),this.manager.itemEnd(e)},0),o;if(Xa[e]!==void 0){Xa[e].push({onLoad:t,onProgress:n,onError:r});return}Xa[e]=[],Xa[e].push({onLoad:t,onProgress:n,onError:r});let s=new Request(e,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"});fetch(s).then(a=>{if(a.status===200||a.status===0){a.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received.");let c=Xa[e],l=a.body.getReader(),d=a.headers.get("Content-Length"),u=d?parseInt(d):0,h=u!==0,p=0;return new ReadableStream({start(f){m();function m(){l.read().then(({done:y,value:g})=>{if(y)f.close();else{p+=g.byteLength;let _=new ProgressEvent("progress",{lengthComputable:h,loaded:p,total:u});for(let x=0,C=c.length;x{let c=new Response(a);switch(this.responseType){case"arraybuffer":return c.arrayBuffer();case"blob":return c.blob();case"document":return c.text().then(l=>new DOMParser().parseFromString(l,this.mimeType));case"json":return c.json();default:return c.text()}}).then(a=>{fu.add(e,a);let c=Xa[e];delete Xa[e];for(let l=0,d=c.length;l{let c=Xa[e];delete Xa[e];for(let l=0,d=c.length;l0:r.vertexColors=e.vertexColors),e.uniforms!==void 0)for(let o in e.uniforms){let s=e.uniforms[o];switch(r.uniforms[o]={},s.type){case"t":r.uniforms[o].value=n(s.value);break;case"c":r.uniforms[o].value=new je().setHex(s.value);break;case"v2":r.uniforms[o].value=new we().fromArray(s.value);break;case"v3":r.uniforms[o].value=new O().fromArray(s.value);break;case"v4":r.uniforms[o].value=new Sn().fromArray(s.value);break;case"m3":r.uniforms[o].value=new Si().fromArray(s.value);break;case"m4":r.uniforms[o].value=new dt().fromArray(s.value);break;default:r.uniforms[o].value=s.value}}if(e.defines!==void 0&&(r.defines=e.defines),e.vertexShader!==void 0&&(r.vertexShader=e.vertexShader),e.fragmentShader!==void 0&&(r.fragmentShader=e.fragmentShader),e.extensions!==void 0)for(let o in e.extensions)r.extensions[o]=e.extensions[o];if(e.shading!==void 0&&(r.flatShading=e.shading===1),e.size!==void 0&&(r.size=e.size),e.sizeAttenuation!==void 0&&(r.sizeAttenuation=e.sizeAttenuation),e.map!==void 0&&(r.map=n(e.map)),e.matcap!==void 0&&(r.matcap=n(e.matcap)),e.alphaMap!==void 0&&(r.alphaMap=n(e.alphaMap)),e.bumpMap!==void 0&&(r.bumpMap=n(e.bumpMap)),e.bumpScale!==void 0&&(r.bumpScale=e.bumpScale),e.normalMap!==void 0&&(r.normalMap=n(e.normalMap)),e.normalMapType!==void 0&&(r.normalMapType=e.normalMapType),e.normalScale!==void 0){let o=e.normalScale;Array.isArray(o)===!1&&(o=[o,o]),r.normalScale=new we().fromArray(o)}return e.displacementMap!==void 0&&(r.displacementMap=n(e.displacementMap)),e.displacementScale!==void 0&&(r.displacementScale=e.displacementScale),e.displacementBias!==void 0&&(r.displacementBias=e.displacementBias),e.roughnessMap!==void 0&&(r.roughnessMap=n(e.roughnessMap)),e.metalnessMap!==void 0&&(r.metalnessMap=n(e.metalnessMap)),e.emissiveMap!==void 0&&(r.emissiveMap=n(e.emissiveMap)),e.emissiveIntensity!==void 0&&(r.emissiveIntensity=e.emissiveIntensity),e.specularMap!==void 0&&(r.specularMap=n(e.specularMap)),e.specularIntensityMap!==void 0&&(r.specularIntensityMap=n(e.specularIntensityMap)),e.specularColorMap!==void 0&&(r.specularColorMap=n(e.specularColorMap)),e.envMap!==void 0&&(r.envMap=n(e.envMap)),e.envMapIntensity!==void 0&&(r.envMapIntensity=e.envMapIntensity),e.reflectivity!==void 0&&(r.reflectivity=e.reflectivity),e.refractionRatio!==void 0&&(r.refractionRatio=e.refractionRatio),e.lightMap!==void 0&&(r.lightMap=n(e.lightMap)),e.lightMapIntensity!==void 0&&(r.lightMapIntensity=e.lightMapIntensity),e.aoMap!==void 0&&(r.aoMap=n(e.aoMap)),e.aoMapIntensity!==void 0&&(r.aoMapIntensity=e.aoMapIntensity),e.gradientMap!==void 0&&(r.gradientMap=n(e.gradientMap)),e.clearcoatMap!==void 0&&(r.clearcoatMap=n(e.clearcoatMap)),e.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=n(e.clearcoatRoughnessMap)),e.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=n(e.clearcoatNormalMap)),e.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new we().fromArray(e.clearcoatNormalScale)),e.transmissionMap!==void 0&&(r.transmissionMap=n(e.transmissionMap)),e.thicknessMap!==void 0&&(r.thicknessMap=n(e.thicknessMap)),e.sheenColorMap!==void 0&&(r.sheenColorMap=n(e.sheenColorMap)),e.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=n(e.sheenRoughnessMap)),r}setTextures(e){return this.textures=e,this}},ef=class{static decodeText(e){if(typeof TextDecoder<"u")return new TextDecoder().decode(e);let t="";for(let n=0,r=e.length;n0){let c=new P_(t);o=new mu(c),o.setCrossOrigin(this.crossOrigin);for(let l=0,d=e.length;l0){r=new mu(this.manager),r.setCrossOrigin(this.crossOrigin);for(let s=0,a=e.length;s"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(e){return this.options=e,this}load(e,t,n,r){e===void 0&&(e=""),this.path!==void 0&&(e=this.path+e),e=this.manager.resolveURL(e);let o=this,s=fu.get(e);if(s!==void 0)return o.manager.itemStart(e),setTimeout(function(){t&&t(s),o.manager.itemEnd(e)},0),s;let a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(e,a).then(function(c){return c.blob()}).then(function(c){return createImageBitmap(c,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(c){fu.add(e,c),t&&t(c),o.manager.itemEnd(e)}).catch(function(c){r&&r(c),o.manager.itemError(e),o.manager.itemEnd(e)}),o.manager.itemStart(e)}};kw.prototype.isImageBitmapLoader=!0;var Xx,rO={getContext:function(){return Xx===void 0&&(Xx=new(window.AudioContext||window.webkitAudioContext)),Xx},setContext:function(i){Xx=i}},Lw=class extends lr{constructor(e){super(e)}load(e,t,n,r){let o=this,s=new Qo(this.manager);s.setResponseType("arraybuffer"),s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(e,function(a){try{let c=a.slice(0);rO.getContext().decodeAudioData(c,function(d){t(d)})}catch(c){r?r(c):console.error(c),o.manager.itemError(e)}},n,r)}},Fw=class extends gu{constructor(e,t,n=1){super(void 0,n);let r=new je().set(e),o=new je().set(t),s=new O(r.r,r.g,r.b),a=new O(o.r,o.g,o.b),c=Math.sqrt(Math.PI),l=c*Math.sqrt(.75);this.sh.coefficients[0].copy(s).add(a).multiplyScalar(c),this.sh.coefficients[1].copy(s).sub(a).multiplyScalar(l)}};Fw.prototype.isHemisphereLightProbe=!0;var Bw=class extends gu{constructor(e,t=1){super(void 0,t);let n=new je().set(e);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}};Bw.prototype.isAmbientLightProbe=!0;var OU=new dt,RU=new dt,CP=class{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Di,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Di,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(e){let t=this._cache;if(t.focus!==e.focus||t.fov!==e.fov||t.aspect!==e.aspect*this.aspect||t.near!==e.near||t.far!==e.far||t.zoom!==e.zoom||t.eyeSep!==this.eyeSep){t.focus=e.focus,t.fov=e.fov,t.aspect=e.aspect*this.aspect,t.near=e.near,t.far=e.far,t.zoom=e.zoom,t.eyeSep=this.eyeSep;let r=e.projectionMatrix.clone(),o=t.eyeSep/2,s=o*t.near/t.focus,a=t.near*Math.tan(Jd*t.fov*.5)/t.zoom,c,l;RU.elements[12]=-o,OU.elements[12]=o,c=-a*t.aspect+s,l=a*t.aspect+s,r.elements[0]=2*t.near/(l-c),r.elements[8]=(l+c)/(l-c),this.cameraL.projectionMatrix.copy(r),c=-a*t.aspect-s,l=a*t.aspect-s,r.elements[0]=2*t.near/(l-c),r.elements[8]=(l+c)/(l-c),this.cameraR.projectionMatrix.copy(r)}this.cameraL.matrixWorld.copy(e.matrixWorld).multiply(RU),this.cameraR.matrixWorld.copy(e.matrixWorld).multiply(OU)}},Vw=class{constructor(e=!0){this.autoStart=e,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=AU(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let e=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){let t=AU();e=(t-this.oldTime)/1e3,this.oldTime=t,this.elapsedTime+=e}return e}};function AU(){return(typeof performance>"u"?Date:performance).now()}var Hd=new O,NU=new Ui,uce=new O,Gd=new O,SP=class extends hn{constructor(){super(),this.type="AudioListener",this.context=rO.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new Vw}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(e){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=e,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(e){return this.gain.gain.setTargetAtTime(e,this.context.currentTime,.01),this}updateMatrixWorld(e){super.updateMatrixWorld(e);let t=this.context.listener,n=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Hd,NU,uce),Gd.set(0,0,-1).applyQuaternion(NU),t.positionX){let r=this.context.currentTime+this.timeDelta;t.positionX.linearRampToValueAtTime(Hd.x,r),t.positionY.linearRampToValueAtTime(Hd.y,r),t.positionZ.linearRampToValueAtTime(Hd.z,r),t.forwardX.linearRampToValueAtTime(Gd.x,r),t.forwardY.linearRampToValueAtTime(Gd.y,r),t.forwardZ.linearRampToValueAtTime(Gd.z,r),t.upX.linearRampToValueAtTime(n.x,r),t.upY.linearRampToValueAtTime(n.y,r),t.upZ.linearRampToValueAtTime(n.z,r)}else t.setPosition(Hd.x,Hd.y,Hd.z),t.setOrientation(Gd.x,Gd.y,Gd.z,n.x,n.y,n.z)}},z_=class extends hn{constructor(e){super(),this.type="Audio",this.listener=e,this.context=e.context,this.gain=this.context.createGain(),this.gain.connect(e.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(e){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=e,this.connect(),this}setMediaElementSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(e),this.connect(),this}setMediaStreamSource(e){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(e),this.connect(),this}setBuffer(e){return this.buffer=e,this.sourceType="buffer",this.autoplay&&this.play(),this}play(e=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+e;let t=this.context.createBufferSource();return t.buffer=this.buffer,t.loop=this.loop,t.loopStart=this.loopStart,t.loopEnd=this.loopEnd,t.onended=this.onEnded.bind(this),t.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=t,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let e=1,t=this.filters.length;e0){this.source.disconnect(this.filters[0]);for(let e=1,t=this.filters.length;e0&&this._mixBufferRegionAdditive(n,r,this._addIndex*t,1,t);for(let c=t,l=t+t;c!==l;++c)if(n[c]!==n[c+t]){a.setValue(n,r);break}}saveOriginalState(){let e=this.binding,t=this.buffer,n=this.valueSize,r=n*this._origIndex;e.getValue(t,r);for(let o=n,s=r;o!==s;++o)t[o]=t[r+o%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let e=this.valueSize*3;this.binding.setValue(this.buffer,e)}_setAdditiveIdentityNumeric(){let e=this._addIndex*this.valueSize,t=e+this.valueSize;for(let n=e;n=.5)for(let s=0;s!==o;++s)e[t+s]=e[n+s]}_slerp(e,t,n,r){Ui.slerpFlat(e,t,e,t,e,n,r)}_slerpAdditive(e,t,n,r,o){let s=this._workIndex*o;Ui.multiplyQuaternionsFlat(e,s,e,t,e,n),Ui.slerpFlat(e,t,e,t,e,s,r)}_lerp(e,t,n,r,o){let s=1-r;for(let a=0;a!==o;++a){let c=t+a;e[c]=e[c]*s+e[n+a]*r}}_lerpAdditive(e,t,n,r,o){for(let s=0;s!==o;++s){let a=t+s;e[a]=e[a]+e[n+s]*r}}},oO="\\[\\]\\.:\\/",pce=new RegExp("["+oO+"]","g"),sO="[^"+oO+"]",fce="[^"+oO.replace("\\.","")+"]",mce=/((?:WC+[\/:])*)/.source.replace("WC",sO),gce=/(WCOD+)?/.source.replace("WCOD",fce),_ce=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",sO),vce=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",sO),bce=new RegExp("^"+mce+gce+_ce+vce+"$"),yce=["material","materials","bones"],EP=class{constructor(e,t,n){let r=n||qn.parseTrackName(t);this._targetGroup=e,this._bindings=e.subscribe_(t,r)}getValue(e,t){this.bind();let n=this._targetGroup.nCachedObjects_,r=this._bindings[n];r!==void 0&&r.getValue(e,t)}setValue(e,t){let n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,o=n.length;r!==o;++r)n[r].setValue(e,t)}bind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].bind()}unbind(){let e=this._bindings;for(let t=this._targetGroup.nCachedObjects_,n=e.length;t!==n;++t)e[t].unbind()}},qn=(()=>{class i{constructor(t,n,r){this.path=n,this.parsedPath=r||i.parseTrackName(n),this.node=i.findNode(t,this.parsedPath.nodeName)||t,this.rootNode=t,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(t,n,r){return t&&t.isAnimationObjectGroup?new i.Composite(t,n,r):new i(t,n,r)}static sanitizeNodeName(t){return t.replace(/\s/g,"_").replace(pce,"")}static parseTrackName(t){let n=bce.exec(t);if(!n)throw new Error("PropertyBinding: Cannot parse trackName: "+t);let r={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},o=r.nodeName&&r.nodeName.lastIndexOf(".");if(o!==void 0&&o!==-1){let s=r.nodeName.substring(o+1);yce.indexOf(s)!==-1&&(r.nodeName=r.nodeName.substring(0,o),r.objectName=s)}if(r.propertyName===null||r.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+t);return r}static findNode(t,n){if(!n||n===""||n==="."||n===-1||n===t.name||n===t.uuid)return t;if(t.skeleton){let r=t.skeleton.getBoneByName(n);if(r!==void 0)return r}if(t.children){let r=function(s){for(let a=0;a=o){let u=o++,h=e[u];t[h.uuid]=d,e[d]=h,t[l]=u,e[u]=c;for(let p=0,f=r;p!==f;++p){let m=n[p],y=m[u],g=m[d];m[d]=y,m[u]=g}}}this.nCachedObjects_=o}uncache(){let e=this._objects,t=this._indicesByUUID,n=this._bindings,r=n.length,o=this.nCachedObjects_,s=e.length;for(let a=0,c=arguments.length;a!==c;++a){let l=arguments[a],d=l.uuid,u=t[d];if(u!==void 0)if(delete t[d],u0&&(t[p.uuid]=u),e[u]=p,e.pop();for(let f=0,m=r;f!==m;++f){let y=n[f];y[u]=y[h],y.pop()}}}this.nCachedObjects_=o}subscribe_(e,t){let n=this._bindingsIndicesByPath,r=n[e],o=this._bindings;if(r!==void 0)return o[r];let s=this._paths,a=this._parsedPaths,c=this._objects,l=c.length,d=this.nCachedObjects_,u=new Array(l);r=o.length,n[e]=r,s.push(e),a.push(t),o.push(u);for(let h=d,p=c.length;h!==p;++h){let f=c[h];u[h]=new qn(f,e,t)}return u}unsubscribe_(e){let t=this._bindingsIndicesByPath,n=t[e];if(n!==void 0){let r=this._paths,o=this._parsedPaths,s=this._bindings,a=s.length-1,c=s[a],l=e[a];t[l]=n,s[n]=c,s.pop(),o[n]=o[a],o.pop(),r[n]=r[a],r.pop()}}};Hw.prototype.isAnimationObjectGroup=!0;var IP=class{constructor(e,t,n=null,r=t.blendMode){this._mixer=e,this._clip=t,this._localRoot=n,this.blendMode=r;let o=t.tracks,s=o.length,a=new Array(s),c={endingStart:Yd,endingEnd:Yd};for(let l=0;l!==s;++l){let d=o[l].createInterpolant(null);a[l]=d,d.settings=c}this._interpolantSettings=c,this._interpolants=a,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=pH,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(e){return this._startTime=e,this}setLoop(e,t){return this.loop=e,this.repetitions=t,this}setEffectiveWeight(e){return this.weight=e,this._effectiveWeight=this.enabled?e:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(e){return this._scheduleFading(e,0,1)}fadeOut(e){return this._scheduleFading(e,1,0)}crossFadeFrom(e,t,n){if(e.fadeOut(t),this.fadeIn(t),n){let r=this._clip.duration,o=e._clip.duration,s=o/r,a=r/o;e.warp(1,s,t),this.warp(a,1,t)}return this}crossFadeTo(e,t,n){return e.crossFadeFrom(this,t,n)}stopFading(){let e=this._weightInterpolant;return e!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}setEffectiveTimeScale(e){return this.timeScale=e,this._effectiveTimeScale=this.paused?0:e,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(e){return this.timeScale=this._clip.duration/e,this.stopWarping()}syncWith(e){return this.time=e.time,this.timeScale=e.timeScale,this.stopWarping()}halt(e){return this.warp(this._effectiveTimeScale,0,e)}warp(e,t,n){let r=this._mixer,o=r.time,s=this.timeScale,a=this._timeScaleInterpolant;a===null&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);let c=a.parameterPositions,l=a.sampleValues;return c[0]=o,c[1]=o+n,l[0]=e/s,l[1]=t/s,this}stopWarping(){let e=this._timeScaleInterpolant;return e!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(e)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(e,t,n,r){if(!this.enabled){this._updateWeight(e);return}let o=this._startTime;if(o!==null){let c=(e-o)*n;if(c<0||n===0)return;this._startTime=null,t=n*c}t*=this._updateTimeScale(e);let s=this._updateTime(t),a=this._updateWeight(e);if(a>0){let c=this._interpolants,l=this._propertyBindings;switch(this.blendMode){case XP:for(let d=0,u=c.length;d!==u;++d)c[d].evaluate(s),l[d].accumulateAdditive(a);break;case Jw:default:for(let d=0,u=c.length;d!==u;++d)c[d].evaluate(s),l[d].accumulate(r,a)}}}_updateWeight(e){let t=0;if(this.enabled){t=this.weight;let n=this._weightInterpolant;if(n!==null){let r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopFading(),r===0&&(this.enabled=!1))}}return this._effectiveWeight=t,t}_updateTimeScale(e){let t=0;if(!this.paused){t=this.timeScale;let n=this._timeScaleInterpolant;if(n!==null){let r=n.evaluate(e)[0];t*=r,e>n.parameterPositions[1]&&(this.stopWarping(),t===0?this.paused=!0:this.timeScale=t)}}return this._effectiveTimeScale=t,t}_updateTime(e){let t=this._clip.duration,n=this.loop,r=this.time+e,o=this._loopCount,s=n===fH;if(e===0)return o===-1?r:s&&(o&1)===1?t-r:r;if(n===hH){o===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=t)r=t;else if(r<0)r=0;else{this.time=r;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e<0?-1:1})}}else{if(o===-1&&(e>=0?(o=0,this._setEndings(!0,this.repetitions===0,s)):this._setEndings(this.repetitions===0,!0,s)),r>=t||r<0){let a=Math.floor(r/t);r-=t*a,o+=Math.abs(a);let c=this.repetitions-o;if(c<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=e>0?t:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:e>0?1:-1});else{if(c===1){let l=e<0;this._setEndings(l,!l,s)}else this._setEndings(!1,!1,s);this._loopCount=o,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(s&&(o&1)===1)return t-r}return r}_setEndings(e,t,n){let r=this._interpolantSettings;n?(r.endingStart=Xd,r.endingEnd=Xd):(e?r.endingStart=this.zeroSlopeAtStart?Xd:Yd:r.endingStart=Wg,t?r.endingEnd=this.zeroSlopeAtEnd?Xd:Yd:r.endingEnd=Wg)}_scheduleFading(e,t,n){let r=this._mixer,o=r.time,s=this._weightInterpolant;s===null&&(s=r._lendControlInterpolant(),this._weightInterpolant=s);let a=s.parameterPositions,c=s.sampleValues;return a[0]=o,c[0]=t,a[1]=o+e,c[1]=n,this}},Gw=class extends sa{constructor(e){super(),this._root=e,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(e,t){let n=e._localRoot||this._root,r=e._clip.tracks,o=r.length,s=e._propertyBindings,a=e._interpolants,c=n.uuid,l=this._bindingsByRootAndName,d=l[c];d===void 0&&(d={},l[c]=d);for(let u=0;u!==o;++u){let h=r[u],p=h.name,f=d[p];if(f!==void 0)s[u]=f;else{if(f=s[u],f!==void 0){f._cacheIndex===null&&(++f.referenceCount,this._addInactiveBinding(f,c,p));continue}let m=t&&t._propertyBindings[u].binding.parsedPath;f=new Uw(qn.create(n,p,m),h.ValueTypeName,h.getValueSize()),++f.referenceCount,this._addInactiveBinding(f,c,p),s[u]=f}a[u].resultBuffer=f.buffer}}_activateAction(e){if(!this._isActiveAction(e)){if(e._cacheIndex===null){let n=(e._localRoot||this._root).uuid,r=e._clip.uuid,o=this._actionsByClip[r];this._bindAction(e,o&&o.knownActions[0]),this._addInactiveAction(e,r,n)}let t=e._propertyBindings;for(let n=0,r=t.length;n!==r;++n){let o=t[n];o.useCount++===0&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(e)}}_deactivateAction(e){if(this._isActiveAction(e)){let t=e._propertyBindings;for(let n=0,r=t.length;n!==r;++n){let o=t[n];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}this._takeBackAction(e)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let e=this;this.stats={actions:{get total(){return e._actions.length},get inUse(){return e._nActiveActions}},bindings:{get total(){return e._bindings.length},get inUse(){return e._nActiveBindings}},controlInterpolants:{get total(){return e._controlInterpolants.length},get inUse(){return e._nActiveControlInterpolants}}}}_isActiveAction(e){let t=e._cacheIndex;return t!==null&&t=0;--n)e[n].stop();return this}update(e){e*=this.timeScale;let t=this._actions,n=this._nActiveActions,r=this.time+=e,o=Math.sign(e),s=this._accuIndex^=1;for(let l=0;l!==n;++l)t[l]._update(r,e,o,s);let a=this._bindings,c=this._nActiveBindings;for(let l=0;l!==c;++l)a[l].apply(s);return this}setTime(e){this.time=0;for(let t=0;tthis.max.x||e.ythis.max.y)}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}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))}intersectsBox(e){return!(e.max.xthis.max.x||e.max.ythis.max.y)}clampPoint(e,t){return t.copy(e).clamp(this.min,this.max)}distanceToPoint(e){return FU.copy(e).clamp(this.min,this.max).sub(e).length()}intersect(e){return this.min.max(e.min),this.max.min(e.max),this}union(e){return this.min.min(e.min),this.max.max(e.max),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)}};vl.prototype.isBox2=!0;var BU=new O,Zx=new O,qw=class{constructor(e=new O,t=new O){this.start=e,this.end=t}set(e,t){return this.start.copy(e),this.end.copy(t),this}copy(e){return this.start.copy(e.start),this.end.copy(e.end),this}getCenter(e){return e.addVectors(this.start,this.end).multiplyScalar(.5)}delta(e){return e.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(e,t){return this.delta(t).multiplyScalar(e).add(this.start)}closestPointToPointParameter(e,t){BU.subVectors(e,this.start),Zx.subVectors(this.end,this.start);let n=Zx.dot(Zx),o=Zx.dot(BU)/n;return t&&(o=rr(o,0,1)),o}closestPointToPoint(e,t,n){let r=this.closestPointToPointParameter(e,t);return this.delta(n).multiplyScalar(r).add(this.start)}applyMatrix4(e){return this.start.applyMatrix4(e),this.end.applyMatrix4(e),this}equals(e){return e.start.equals(this.start)&&e.end.equals(this.end)}clone(){return new this.constructor().copy(this)}},VU=new O,RP=class extends hn{constructor(e,t){super(),this.light=e,this.light.updateMatrixWorld(),this.matrix=e.matrixWorld,this.matrixAutoUpdate=!1,this.color=t;let n=new Dt,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let s=0,a=1,c=32;s.99999)this.quaternion.set(0,0,0,1);else if(e.y<-.99999)this.quaternion.set(1,0,0,0);else{jU.set(e.z,0,-e.x).normalize();let t=Math.acos(e.y);this.quaternion.setFromAxisAngle(jU,t)}}setLength(e,t=e*.2,n=t*.2){this.line.scale.set(1,Math.max(1e-4,e-t),1),this.line.updateMatrix(),this.cone.scale.set(n,t,n),this.cone.position.y=e,this.cone.updateMatrix()}setColor(e){this.line.material.color.set(e),this.cone.material.color.set(e)}copy(e){return super.copy(e,!1),this.line.copy(e.line),this.cone.copy(e.cone),this}},Qw=class extends Cr{constructor(e=1){let t=[0,0,0,e,0,0,0,0,0,0,e,0,0,0,0,0,0,e],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new Dt;r.setAttribute("position",new ot(t,3)),r.setAttribute("color",new ot(n,3));let o=new Ri({vertexColors:!0,toneMapped:!1});super(r,o),this.type="AxesHelper"}setColors(e,t,n){let r=new je,o=this.geometry.attributes.color.array;return r.set(e),r.toArray(o,0),r.toArray(o,3),r.set(t),r.toArray(o,6),r.toArray(o,9),r.set(n),r.toArray(o,12),r.toArray(o,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}},UP=class{constructor(){this.type="ShapePath",this.color=new je,this.subPaths=[],this.currentPath=null}moveTo(e,t){return this.currentPath=new du,this.subPaths.push(this.currentPath),this.currentPath.moveTo(e,t),this}lineTo(e,t){return this.currentPath.lineTo(e,t),this}quadraticCurveTo(e,t,n,r){return this.currentPath.quadraticCurveTo(e,t,n,r),this}bezierCurveTo(e,t,n,r,o,s){return this.currentPath.bezierCurveTo(e,t,n,r,o,s),this}splineThru(e){return this.currentPath.splineThru(e),this}toShapes(e,t){function n(_){let x=[];for(let C=0,T=_.length;CNumber.EPSILON){if(z<0&&(A=x[E],q=-q,j=x[D],z=-z),_.yj.y)continue;if(_.y===A.y){if(_.x===A.x)return!0}else{let P=z*(_.x-A.x)-q*(_.y-A.y);if(P===0)return!0;if(P<0)continue;T=!T}}else{if(_.y!==A.y)continue;if(j.x<=_.x&&_.x<=A.x||A.x<=_.x&&_.x<=j.x)return!0}}return T}let o=oa.isClockWise,s=this.subPaths;if(s.length===0)return[];if(t===!0)return n(s);let a,c,l,d=[];if(s.length===1)return c=s[0],l=new Zo,l.curves=c.curves,d.push(l),d;let u=!o(s[0].getPoints());u=e?!u:u;let h=[],p=[],f=[],m=0,y;p[m]=void 0,f[m]=[];for(let _=0,x=s.length;_1){let _=!1,x=[];for(let C=0,T=p.length;C0&&(_||(f=h))}let g;for(let _=0,x=p.length;_65504&&(console.warn("THREE.DataUtils.toHalfFloat(): value exceeds 65504."),e=65504),GH[0]=e;let t=wce[0],n=t>>16&32768,r=t>>12&2047,o=t>>23&255;return o<103?n:o>142?(n|=31744,n|=(o==255?0:1)&&t&8388607,n):o<113?(r|=2048,n|=(r>>114-o)+(r>>113-o&1),n):(n|=o-112<<10|r>>1,n+=r&1,n)}},Cce=0,Sce=1,Mce=0,Ece=1,Ice=2;function Tce(i){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),i}function Dce(i=[]){return console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),i.isMultiMaterial=!0,i.materials=i,i.clone=function(){return i.slice()},i}function Pce(i,e){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new su(i,e)}function Oce(i){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new Gp(i)}function Rce(i,e){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new su(i,e)}function Ace(i){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new ic(i)}function Nce(i){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new ic(i)}function kce(i){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new ic(i)}function Lce(i,e,t){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new O(i,e,t)}function Fce(i,e){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),new un(i,e).setUsage(Op)}function Bce(i,e){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new cw(i,e)}function Vce(i,e){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new lw(i,e)}function zce(i,e){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new dw(i,e)}function Uce(i,e){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new uw(i,e)}function Hce(i,e){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Rp(i,e)}function Gce(i,e){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new hw(i,e)}function jce(i,e){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Ap(i,e)}function Wce(i,e){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new ot(i,e)}function $ce(i,e){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new fw(i,e)}Xr.create=function(i,e){return console.log("THREE.Curve.create() has been deprecated"),i.prototype=Object.create(Xr.prototype),i.prototype.constructor=i,i.prototype.getPoint=e,i};du.prototype.fromPoints=function(i){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(i)};function qce(i){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new Qw(i)}function Yce(i,e){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new Zw(i,e)}function Xce(i,e){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Cr(new o_(i.geometry),new Ri({color:e!==void 0?e:16777215}))}Xw.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")};Yw.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")};function Zce(i,e){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Cr(new b_(i.geometry),new Ri({color:e!==void 0?e:16777215}))}lr.prototype.extractUrlBase=function(i){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),ef.extractUrlBase(i)};lr.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}};function Qce(i){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Qo(i)}function Kce(i){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new Tw(i)}vl.prototype.center=function(i){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(i)};vl.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()};vl.prototype.isIntersectionBox=function(i){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(i)};vl.prototype.size=function(i){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(i)};qr.prototype.center=function(i){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(i)};qr.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()};qr.prototype.isIntersectionBox=function(i){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(i)};qr.prototype.isIntersectionSphere=function(i){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(i)};qr.prototype.size=function(i){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(i)};aa.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()};ru.prototype.setFromMatrix=function(i){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(i)};qw.prototype.center=function(i){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(i)};Si.prototype.flattenToArrayOffset=function(i,e){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(i,e)};Si.prototype.multiplyVector3=function(i){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),i.applyMatrix3(this)};Si.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")};Si.prototype.applyToBufferAttribute=function(i){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),i.applyMatrix3(this)};Si.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")};Si.prototype.getInverse=function(i){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(i).invert()};dt.prototype.extractPosition=function(i){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(i)};dt.prototype.flattenToArrayOffset=function(i,e){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(i,e)};dt.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),new O().setFromMatrixColumn(this,3)};dt.prototype.setRotationFromQuaternion=function(i){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(i)};dt.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")};dt.prototype.multiplyVector3=function(i){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),i.applyMatrix4(this)};dt.prototype.multiplyVector4=function(i){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),i.applyMatrix4(this)};dt.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")};dt.prototype.rotateAxis=function(i){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),i.transformDirection(this)};dt.prototype.crossVector=function(i){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),i.applyMatrix4(this)};dt.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")};dt.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")};dt.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")};dt.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")};dt.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")};dt.prototype.applyToBufferAttribute=function(i){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),i.applyMatrix4(this)};dt.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")};dt.prototype.makeFrustum=function(i,e,t,n,r,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(i,e,n,t,r,o)};dt.prototype.getInverse=function(i){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(i).invert()};Xo.prototype.isIntersectionLine=function(i){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(i)};Ui.prototype.multiplyVector3=function(i){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),i.applyQuaternion(this)};Ui.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()};ca.prototype.isIntersectionBox=function(i){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(i)};ca.prototype.isIntersectionPlane=function(i){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(i)};ca.prototype.isIntersectionSphere=function(i){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(i)};ar.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()};ar.prototype.barycoordFromPoint=function(i,e){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(i,e)};ar.prototype.midpoint=function(i){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(i)};ar.prototypenormal=function(i){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(i)};ar.prototype.plane=function(i){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(i)};ar.barycoordFromPoint=function(i,e,t,n,r){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),ar.getBarycoord(i,e,t,n,r)};ar.normal=function(i,e,t,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),ar.getNormal(i,e,t,n)};Zo.prototype.extractAllPoints=function(i){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(i)};Zo.prototype.extrude=function(i){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new oc(this,i)};Zo.prototype.makeGeometry=function(i){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Qp(this,i)};we.prototype.fromAttribute=function(i,e,t){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(i,e,t)};we.prototype.distanceToManhattan=function(i){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(i)};we.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};O.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")};O.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")};O.prototype.getPositionFromMatrix=function(i){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(i)};O.prototype.getScaleFromMatrix=function(i){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(i)};O.prototype.getColumnFromMatrix=function(i,e){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(e,i)};O.prototype.applyProjection=function(i){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(i)};O.prototype.fromAttribute=function(i,e,t){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(i,e,t)};O.prototype.distanceToManhattan=function(i){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(i)};O.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};Sn.prototype.fromAttribute=function(i,e,t){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(i,e,t)};Sn.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};hn.prototype.getChildByName=function(i){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(i)};hn.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")};hn.prototype.translate=function(i,e){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(e,i)};hn.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")};hn.prototype.applyMatrix=function(i){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(i)};Object.defineProperties(hn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(i){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=i}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}});pi.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")};Object.defineProperties(pi.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),mH},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}});jp.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")};Di.prototype.setLens=function(i,e){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),e!==void 0&&(this.filmGauge=e),this.setFocalLength(i)};Object.defineProperties(Eo.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(i){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=i}},shadowCameraLeft:{set:function(i){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=i}},shadowCameraRight:{set:function(i){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=i}},shadowCameraTop:{set:function(i){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=i}},shadowCameraBottom:{set:function(i){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=i}},shadowCameraNear:{set:function(i){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=i}},shadowCameraFar:{set:function(i){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=i}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(i){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=i}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(i){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=i}},shadowMapHeight:{set:function(i){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=i}}});Object.defineProperties(un.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===Op},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(Op)}}});un.prototype.setDynamic=function(i){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(i===!0?Op:Pp),this};un.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},un.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")};Dt.prototype.addIndex=function(i){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(i)};Dt.prototype.addAttribute=function(i,e){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),!(e&&e.isBufferAttribute)&&!(e&&e.isInterleavedBufferAttribute)?(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(i,new un(arguments[1],arguments[2]))):i==="index"?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(e),this):this.setAttribute(i,e)};Dt.prototype.addDrawCall=function(i,e,t){t!==void 0&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(i,e)};Dt.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()};Dt.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")};Dt.prototype.removeAttribute=function(i){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(i)};Dt.prototype.applyMatrix=function(i){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(i)};Object.defineProperties(Dt.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}});tc.prototype.setDynamic=function(i){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(i===!0?Op:Pp),this};tc.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")};oc.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")};oc.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")};oc.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")};Up.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")};jw.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this};Object.defineProperties(Oi.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new je}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(i){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=i===WP}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(i){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=i}},vertexTangents:{get:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")},set:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")}}});Object.defineProperties(Cs.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(i){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=i}}});kn.prototype.clearTarget=function(i,e,t,n){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(i),this.clear(e,t,n)};kn.prototype.animate=function(i){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(i)};kn.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()};kn.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()};kn.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision};kn.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()};kn.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")};kn.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")};kn.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")};kn.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")};kn.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")};kn.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")};kn.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures};kn.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")};kn.prototype.enableScissorTest=function(i){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(i)};kn.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")};kn.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")};kn.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")};kn.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")};kn.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")};kn.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")};kn.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")};kn.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")};kn.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")};kn.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()};Object.defineProperties(kn.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(i){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=i}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(i){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=i}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(i){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=i===!0?bl:cr}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}});Object.defineProperties(kH.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}});function Jce(i,e,t){return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),new Lp(i,t)}Object.defineProperties(So.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(i){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=i}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(i){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=i}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(i){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=i}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(i){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=i}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(i){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=i}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(i){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=i}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(i){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=i}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(i){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=i}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(i){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=i}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(i){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=i}}});z_.prototype.load=function(i){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");let e=this;return new Lw().load(i,function(n){e.setBuffer(n)}),this};zw.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()};kp.prototype.updateCubeMap=function(i,e){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(i,e)};kp.prototype.clear=function(i,e,t,n){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(i,e,t,n)};ec.crossOrigin=void 0;ec.loadTexture=function(i,e,t,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");let r=new Dw;r.setCrossOrigin(this.crossOrigin);let o=r.load(i,t,void 0,n);return e&&(o.mapping=e),o};ec.loadTextureCube=function(i,e,t,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");let r=new Iw;r.setCrossOrigin(this.crossOrigin);let o=r.load(i,t,void 0,n);return e&&(o.mapping=e),o};ec.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")};ec.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};function ele(){console.error("THREE.CanvasRenderer has been removed")}function tle(){console.error("THREE.JSONLoader has been removed.")}var nle={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};function ile(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")}function rle(){return console.error("THREE.ParametricGeometry has been moved to /examples/jsm/geometries/ParametricGeometry.js"),new Dt}function ole(){return console.error("THREE.TextGeometry has been moved to /examples/jsm/geometries/TextGeometry.js"),new Dt}function sle(){console.error("THREE.FontLoader has been moved to /examples/jsm/loaders/FontLoader.js")}function ale(){console.error("THREE.Font has been moved to /examples/jsm/loaders/FontLoader.js")}function cle(){console.error("THREE.ImmediateRenderObject has been removed.")}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:GP}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=GP);var rf=(()=>{class i{linearGradientId=Math.random().toString(36).slice(-6);fillUrl=`url(#${this.linearGradientId})`;static \u0275fac=function(n){return new(n||i)};static \u0275cmp=ce({type:i,selectors:[["me-logo"]],standalone:!0,features:[le],decls:19,vars:2,consts:[["width","24","height","24","viewBox","0 0 256 256","fill","none","xmlns","http://www.w3.org/2000/svg"],["width","256","height","256","fill","none"],["d","M229 64.5V192.5L128 248.5L127.5 115.5L229 64.5Z"],["d","M208 76V99L128 141.5V116L208 76Z","fill","white"],["d","M208 122.5V141.5L128 182.5V161.5L208 122.5Z","fill","white"],["d","M208 164.5V183L128 225.5V206L208 164.5Z","fill","white"],["d","M149 106V214.5L127 226V117.5L149 106Z","fill","white"],["d","M26 61L47.5 72.5V200L26 187V61Z","fill","#FBBC04"],["d","M125.5 10.5L145.5 21V60.5L125.5 56.5V10.5Z","fill","#DCA810"],["d","M164 31L184 41.5V81L164 78V31Z","fill","#309C4D"],["d","M164 31L184 41.5L87 94L65 82L164 31Z","fill","#11792D"],["d","M208 54.5L229 64.5L128 116L107 105L208 54.5Z","fill","#2C5CAC"],["d","M125.5 10.5L145.5 21L47.5 72.5L26 61L125.5 10.5Z","fill","#C78B15"],["d","M65 82L87 94V224L65 210.5V82Z","fill","#34A853"],["d","M107 105L128 116V248.5L107 236V105Z","fill","#4285F4"],["x1","144.5","y1","232","x2","219","y2","69.5","gradientUnits","userSpaceOnUse"],["stop-color","#4285F4"],["offset","1","stop-color","#2C5CAC"]],template:function(n,r){n&1&&(uo(),v(0,"svg",0),ee(1,"rect",1)(2,"path",2)(3,"path",3)(4,"path",4)(5,"path",5)(6,"path",6)(7,"path",7)(8,"path",8)(9,"path",9)(10,"path",10)(11,"path",11)(12,"path",12)(13,"path",13)(14,"path",14),v(15,"defs")(16,"linearGradient",15),ee(17,"stop",16)(18,"stop",17),b()()()),n&2&&(w(2),Ye("fill",r.fillUrl),w(14),Ye("id",r.linearGradientId))},styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center}"]})}return i})();var yl=(()=>{class i{hiddenInputOpNodeIds=ct({});hiddenOutputIds=ct({});toggleInputOpNodeVisibility(t){this.hiddenInputOpNodeIds.update(n=>(n[t]===!0?delete n[t]:n[t]=!0,Z({},n)))}setInputOpNodeVisible(t,n){let r=this.hiddenInputOpNodeIds()[t]!==!0;for(let o of n)o!==t&&(this.hiddenInputOpNodeIds()[o]||(r=!1));if(r)this.hiddenInputOpNodeIds.set({});else{let o={};for(let s of n)s!==t&&(o[s]=!0);this.hiddenInputOpNodeIds.set(o)}}toggleOutputVisibility(t){this.hiddenOutputIds.update(n=>(n[t]===!0?delete n[t]:n[t]=!0,Z({},n)))}setOutputVisible(t,n){let r=this.hiddenOutputIds()[t]!==!0;for(let o of n)o!==t&&(this.hiddenOutputIds()[o]||(r=!1));if(r)this.hiddenOutputIds.set({});else{let o={};for(let s of n)s!==t&&(o[s]=!0);this.hiddenOutputIds.set(o)}}getInputOpNodeVisible(t){return!this.hiddenInputOpNodeIds()[t]}getOutputVisible(t){return!this.hiddenOutputIds()[t]}resetInputOutputHiddenIds(){this.hiddenInputOpNodeIds.set({}),this.hiddenOutputIds.set({})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var Ko=(()=>{class i{appService;selectedNodeIds=ct({});hasSelectedNodes=Bt(()=>Object.keys(this.selectedNodeIds()).length>0);selectedNodeCount=Bt(()=>Object.keys(this.selectedNodeIds()).length);paneId="";constructor(t){this.appService=t}toggleNode(t){this.selectedNodeIds.update(n=>{if(!this.modelGraph)return n;let r=this.modelGraph.nodesById[t];if(wt(r)){let o=r.descendantsOpNodeIds||[],s=o.some(a=>n[a]);for(let a of o)St(this.modelGraph.nodesById[a])&&(s?delete n[a]:n[a]=!0)}else n[t]?delete n[t]:n[t]=!0;return Z({},n)})}toggleNodes(t){if(t.length===0||!this.modelGraph)return;let n=Z({},this.selectedNodeIds());for(let r of t){let o=this.modelGraph.nodesById[r];if(St(o))n[r]?delete n[r]:n[r]=!0;else if(wt(o)&&!o.expanded)for(let s of o.descendantsOpNodeIds||[])n[s]?delete n[s]:n[s]=!0}this.selectedNodeIds.set(n)}clearSelection(){this.selectedNodeIds.set({})}isHiddenFromSelection(t){return t.label==="pseudo_const"}getSelectedSubgraph(){if(!this.modelGraph)return;let t=this.appService.getGraphById(this.modelGraph.id);if(!t)return;t=JSON.parse(JSON.stringify(t));let n={};for(let h of t.nodes)n[h.id]=h;let r=this.selectedNodeIds(),o=t.nodes.filter(h=>r[h.id]===!0),s=o.find(h=>h.label==="GraphInputs");if(!s){let h=t.nodes.find(p=>p.label==="GraphInputs");if(!h)throw new Error("GraphInputs node not found in the original graph.");s=structuredClone(h),s.outputsMetadata=[],o.push(s)}s.outputsMetadata=s.outputsMetadata||[];let a=new Map,c=s.outputsMetadata.length;for(let h of o){let p=(h.incomingEdges||[]).filter(f=>!r[f.sourceNodeId]);for(let f of p){let m=n[f.sourceNodeId];if(this.isHiddenFromSelection(m)){o.push(m);continue}let y=(m.outputsMetadata||[]).find(_=>_.id===f.sourceNodeOutputId);if(!y)continue;let g=(y.attrs||[]).find(_=>_.key==="tensor_index")?.value;g&&(a.has(g)||(a.set(g,c.toString()),s.outputsMetadata.push({id:c.toString(),attrs:y.attrs}),c++),f.sourceNodeId=s.id,f.sourceNodeOutputId=a.get(g))}}let l=o.find(h=>h.label==="GraphOutputs");if(!l){let h=t.nodes.find(p=>p.label==="GraphOutputs");if(!h)throw new Error("GraphOutputs node not found in the original graph.");l=structuredClone(h),l.incomingEdges=[],o.push(l)}l.incomingEdges=l.incomingEdges||[];let d=new Set,u=l.incomingEdges.length;for(let h of t.nodes){if(r[h.id])continue;let p=(h.incomingEdges||[]).filter(f=>r[f.sourceNodeId]);for(let f of p){let y=(n[f.sourceNodeId].outputsMetadata||[]).find(_=>_.id===f.sourceNodeOutputId);if(!y)continue;let g=(y.attrs||[]).find(_=>_.key==="tensor_index")?.value;if(g&&!d.has(g)){d.add(g);let _=structuredClone(f);_.targetNodeInputId=u.toString(),l.incomingEdges.push(_),u++}}}return{id:`${t.id}_subgraph`,collectionLabel:t.collectionLabel,nodes:o}}get modelGraph(){return this.appService.getCurrentModelGraphFromPane(this.paneId)}static \u0275fac=function(n){return new(n||i)(X(at))};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var oC=class{};function WH(i){return i&&typeof i.connect=="function"&&!(i instanceof mc)}var of=class{get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}constructor(e=!1,t,n=!0,r){this._multiple=e,this._emitChanges=n,this.compareWith=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new pe,t&&t.length&&(e?t.forEach(o=>this._markSelected(o)):this._markSelected(t[0]),this._selectedToEmit.length=0)}select(...e){this._verifyValueAssignment(e),e.forEach(n=>this._markSelected(n));let t=this._hasQueuedChanges();return this._emitChangeEvent(),t}deselect(...e){this._verifyValueAssignment(e),e.forEach(n=>this._unmarkSelected(n));let t=this._hasQueuedChanges();return this._emitChangeEvent(),t}setSelection(...e){this._verifyValueAssignment(e);let t=this.selected,n=new Set(e);e.forEach(o=>this._markSelected(o)),t.filter(o=>!n.has(this._getConcreteValue(o,n))).forEach(o=>this._unmarkSelected(o));let r=this._hasQueuedChanges();return this._emitChangeEvent(),r}toggle(e){return this.isSelected(e)?this.deselect(e):this.select(e)}clear(e=!0){this._unmarkAll();let t=this._hasQueuedChanges();return e&&this._emitChangeEvent(),t}isSelected(e){return this._selection.has(this._getConcreteValue(e))}isEmpty(){return this._selection.size===0}hasValue(){return!this.isEmpty()}sort(e){this._multiple&&this.selected&&this._selected.sort(e)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(e){e=this._getConcreteValue(e),this.isSelected(e)||(this._multiple||this._unmarkAll(),this.isSelected(e)||this._selection.add(e),this._emitChanges&&this._selectedToEmit.push(e))}_unmarkSelected(e){e=this._getConcreteValue(e),this.isSelected(e)&&(this._selection.delete(e),this._emitChanges&&this._deselectedToEmit.push(e))}_unmarkAll(){this.isEmpty()||this._selection.forEach(e=>this._unmarkSelected(e))}_verifyValueAssignment(e){e.length>1&&this._multiple}_hasQueuedChanges(){return!!(this._deselectedToEmit.length||this._selectedToEmit.length)}_getConcreteValue(e,t){if(this.compareWith){t=t??this._selection;for(let n of t)if(this.compareWith(e,n))return n;return e}else return e}};var $H=(()=>{let e=class e{constructor(){this._listeners=[]}notify(n,r){for(let o of this._listeners)o(n,r)}listen(n){return this._listeners.push(n),()=>{this._listeners=this._listeners.filter(r=>n!==r)}}ngOnDestroy(){this._listeners=[]}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var dle=20,xu=(()=>{let e=class e{constructor(n,r,o){this._ngZone=n,this._platform=r,this._scrolled=new pe,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map,this._document=o}register(n){this.scrollContainers.has(n)||this.scrollContainers.set(n,n.elementScrolled().subscribe(()=>this._scrolled.next(n)))}deregister(n){let r=this.scrollContainers.get(n);r&&(r.unsubscribe(),this.scrollContainers.delete(n))}scrolled(n=dle){return this._platform.isBrowser?new Et(r=>{this._globalSubscription||this._addGlobalListener();let o=n>0?this._scrolled.pipe(jv(n)).subscribe(r):this._scrolled.subscribe(r);return this._scrolledCount++,()=>{o.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):Ke()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((n,r)=>this.deregister(r)),this._scrolled.complete()}ancestorScrolled(n,r){let o=this.getAncestorScrollContainers(n);return this.scrolled(r).pipe(qt(s=>!s||o.indexOf(s)>-1))}getAncestorScrollContainers(n){let r=[];return this.scrollContainers.forEach((o,s)=>{this._scrollableContainsElement(s,n)&&r.push(s)}),r}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(n,r){let o=nr(r),s=n.getElementRef().nativeElement;do if(o==s)return!0;while(o=o.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>{let n=this._getWindow();return yn(n.document,"scroll").subscribe(()=>this._scrolled.next())})}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}};e.\u0275fac=function(r){return new(r||e)(X(Fe),X(gn),X(Xe,8))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),aO=(()=>{let e=class e{constructor(n,r,o,s){this.elementRef=n,this.scrollDispatcher=r,this.ngZone=o,this.dir=s,this._destroyed=new pe,this._elementScrolled=new Et(a=>this.ngZone.runOutsideAngular(()=>yn(this.elementRef.nativeElement,"scroll").pipe(Ze(this._destroyed)).subscribe(a)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(n){let r=this.elementRef.nativeElement,o=this.dir&&this.dir.value=="rtl";n.left==null&&(n.left=o?n.end:n.start),n.right==null&&(n.right=o?n.start:n.end),n.bottom!=null&&(n.top=r.scrollHeight-r.clientHeight-n.bottom),o&&Th()!=ms.NORMAL?(n.left!=null&&(n.right=r.scrollWidth-r.clientWidth-n.left),Th()==ms.INVERTED?n.left=n.right:Th()==ms.NEGATED&&(n.left=n.right?-n.right:n.right)):n.right!=null&&(n.left=r.scrollWidth-r.clientWidth-n.right),this._applyScrollToOptions(n)}_applyScrollToOptions(n){let r=this.elementRef.nativeElement;vy()?r.scrollTo(n):(n.top!=null&&(r.scrollTop=n.top),n.left!=null&&(r.scrollLeft=n.left))}measureScrollOffset(n){let r="left",o="right",s=this.elementRef.nativeElement;if(n=="top")return s.scrollTop;if(n=="bottom")return s.scrollHeight-s.clientHeight-s.scrollTop;let a=this.dir&&this.dir.value=="rtl";return n=="start"?n=a?o:r:n=="end"&&(n=a?r:o),a&&Th()==ms.INVERTED?n==r?s.scrollWidth-s.clientWidth-s.scrollLeft:s.scrollLeft:a&&Th()==ms.NEGATED?n==r?s.scrollLeft+s.scrollWidth-s.clientWidth:-s.scrollLeft:n==r?s.scrollLeft:s.scrollWidth-s.clientWidth-s.scrollLeft}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(xu),M(Fe),M(di,8))},e.\u0275dir=Ve({type:e,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0});let i=e;return i})(),ule=20,la=(()=>{let e=class e{constructor(n,r,o){this._platform=n,this._change=new pe,this._changeListener=s=>{this._change.next(s)},this._document=o,r.runOutsideAngular(()=>{if(n.isBrowser){let s=this._getWindow();s.addEventListener("resize",this._changeListener),s.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){let n=this._getWindow();n.removeEventListener("resize",this._changeListener),n.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let n={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),n}getViewportRect(){let n=this.getViewportScrollPosition(),{width:r,height:o}=this.getViewportSize();return{top:n.top,left:n.left,bottom:n.top+o,right:n.left+r,height:o,width:r}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let n=this._document,r=this._getWindow(),o=n.documentElement,s=o.getBoundingClientRect(),a=-s.top||n.body.scrollTop||r.scrollY||o.scrollTop||0,c=-s.left||n.body.scrollLeft||r.scrollX||o.scrollLeft||0;return{top:a,left:c}}change(n=ule){return n>0?this._change.pipe(jv(n)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let n=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:n.innerWidth,height:n.innerHeight}:{width:0,height:0}}};e.\u0275fac=function(r){return new(r||e)(X(gn),X(Fe),X(Xe,8))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var Jo=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({});let i=e;return i})(),cO=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({imports:[Xc,Jo,Xc,Jo]});let i=e;return i})();var j_=class{attach(e){return this._attachedHost=e,e.attach(this)}detach(){let e=this._attachedHost;e!=null&&(this._attachedHost=null,e.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(e){this._attachedHost=e}},Ai=class extends j_{constructor(e,t,n,r,o){super(),this.component=e,this.viewContainerRef=t,this.injector=n,this.componentFactoryResolver=r,this.projectableNodes=o}},Zr=class extends j_{constructor(e,t,n,r){super(),this.templateRef=e,this.viewContainerRef=t,this.context=n,this.injector=r}get origin(){return this.templateRef.elementRef}attach(e,t=this.context){return this.context=t,super.attach(e)}detach(){return this.context=void 0,super.detach()}},lO=class extends j_{constructor(e){super(),this.element=e instanceof Re?e.nativeElement:e}},da=class{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(e){if(e instanceof Ai)return this._attachedPortal=e,this.attachComponentPortal(e);if(e instanceof Zr)return this._attachedPortal=e,this.attachTemplatePortal(e);if(this.attachDomPortal&&e instanceof lO)return this._attachedPortal=e,this.attachDomPortal(e)}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(e){this._disposeFn=e}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}};var W_=class extends da{constructor(e,t,n,r,o){super(),this.outletElement=e,this._componentFactoryResolver=t,this._appRef=n,this._defaultInjector=r,this.attachDomPortal=s=>{this._document;let a=s.element;a.parentNode;let c=this._document.createComment("dom-portal");a.parentNode.insertBefore(c,a),this.outletElement.appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{c.parentNode&&c.parentNode.replaceChild(a,c)})},this._document=o}attachComponentPortal(e){let n=(e.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(e.component),r;return e.viewContainerRef?(r=e.viewContainerRef.createComponent(n,e.viewContainerRef.length,e.injector||e.viewContainerRef.injector,e.projectableNodes||void 0),this.setDisposeFn(()=>r.destroy())):(r=n.create(e.injector||this._defaultInjector||vt.NULL),this._appRef.attachView(r.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(r.hostView),r.destroy()})),this.outletElement.appendChild(this._getComponentRootNode(r)),this._attachedPortal=e,r}attachTemplatePortal(e){let t=e.viewContainerRef,n=t.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return n.rootNodes.forEach(r=>this.outletElement.appendChild(r)),n.detectChanges(),this.setDisposeFn(()=>{let r=t.indexOf(n);r!==-1&&t.remove(r)}),this._attachedPortal=e,n}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(e){return e.hostView.rootNodes[0]}};var es=(()=>{let e=class e extends da{constructor(n,r,o){super(),this._componentFactoryResolver=n,this._viewContainerRef=r,this._isInitialized=!1,this.attached=new Ie,this.attachDomPortal=s=>{this._document;let a=s.element;a.parentNode;let c=this._document.createComment("dom-portal");s.setAttachedHost(this),a.parentNode.insertBefore(c,a),this._getRootNode().appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{c.parentNode&&c.parentNode.replaceChild(a,c)})},this._document=o}get portal(){return this._attachedPortal}set portal(n){this.hasAttached()&&!n&&!this._isInitialized||(this.hasAttached()&&super.detach(),n&&super.attach(n),this._attachedPortal=n||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(n){n.setAttachedHost(this);let r=n.viewContainerRef!=null?n.viewContainerRef:this._viewContainerRef,s=(n.componentFactoryResolver||this._componentFactoryResolver).resolveComponentFactory(n.component),a=r.createComponent(s,r.length,n.injector||r.injector,n.projectableNodes||void 0);return r!==this._viewContainerRef&&this._getRootNode().appendChild(a.hostView.rootNodes[0]),super.setDisposeFn(()=>a.destroy()),this._attachedPortal=n,this._attachedRef=a,this.attached.emit(a),a}attachTemplatePortal(n){n.setAttachedHost(this);let r=this._viewContainerRef.createEmbeddedView(n.templateRef,n.context,{injector:n.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=n,this._attachedRef=r,this.attached.emit(r),r}_getRootNode(){let n=this._viewContainerRef.element.nativeElement;return n.nodeType===n.ELEMENT_NODE?n:n.parentNode}};e.\u0275fac=function(r){return new(r||e)(M(us),M(Zt),M(Xe))},e.\u0275dir=Ve({type:e,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],standalone:!0,features:[sn]});let i=e;return i})();var Es=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({});let i=e;return i})();var qH=vy(),dO=class{constructor(e,t){this._viewportRuler=e,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=t}attach(){}enable(){if(this._canBeEnabled()){let e=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=e.style.left||"",this._previousHTMLStyles.top=e.style.top||"",e.style.left=yi(-this._previousScrollPosition.left),e.style.top=yi(-this._previousScrollPosition.top),e.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let e=this._document.documentElement,t=this._document.body,n=e.style,r=t.style,o=n.scrollBehavior||"",s=r.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,e.classList.remove("cdk-global-scrollblock"),qH&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),qH&&(n.scrollBehavior=o,r.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let t=this._document.body,n=this._viewportRuler.getViewportSize();return t.scrollHeight>n.height||t.scrollWidth>n.width}};var uO=class{constructor(e,t,n,r){this._scrollDispatcher=e,this._ngZone=t,this._viewportRuler=n,this._config=r,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(this._scrollSubscription)return;let e=this._scrollDispatcher.scrolled(0).pipe(qt(t=>!t||!this._overlayRef.overlayElement.contains(t.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=e.subscribe(()=>{let t=this._viewportRuler.getViewportScrollPosition().top;Math.abs(t-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=e.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},sC=class{enable(){}disable(){}attach(){}};function hO(i,e){return e.some(t=>{let n=i.bottomt.bottom,o=i.rightt.right;return n||r||o||s})}function YH(i,e){return e.some(t=>{let n=i.topt.bottom,o=i.leftt.right;return n||r||o||s})}var pO=class{constructor(e,t,n,r){this._scrollDispatcher=e,this._viewportRuler=t,this._ngZone=n,this._config=r,this._scrollSubscription=null}attach(e){this._overlayRef,this._overlayRef=e}enable(){if(!this._scrollSubscription){let e=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(e).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let t=this._overlayRef.overlayElement.getBoundingClientRect(),{width:n,height:r}=this._viewportRuler.getViewportSize();hO(t,[{width:n,height:r,bottom:r,right:n,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},ple=(()=>{let e=class e{constructor(n,r,o,s){this._scrollDispatcher=n,this._viewportRuler=r,this._ngZone=o,this.noop=()=>new sC,this.close=a=>new uO(this._scrollDispatcher,this._ngZone,this._viewportRuler,a),this.block=()=>new dO(this._viewportRuler,this._document),this.reposition=a=>new pO(this._scrollDispatcher,this._viewportRuler,this._ngZone,a),this._document=s}};e.\u0275fac=function(r){return new(r||e)(X(xu),X(la),X(Fe),X(Xe))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),fi=class{constructor(e){if(this.scrollStrategy=new sC,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,e){let t=Object.keys(e);for(let n of t)e[n]!==void 0&&(this[n]=e[n])}}};var fO=class{constructor(e,t){this.connectionPair=e,this.scrollableViewProperties=t}};var eG=(()=>{let e=class e{constructor(n){this._attachedOverlays=[],this._document=n}ngOnDestroy(){this.detach()}add(n){this.remove(n),this._attachedOverlays.push(n)}remove(n){let r=this._attachedOverlays.indexOf(n);r>-1&&this._attachedOverlays.splice(r,1),this._attachedOverlays.length===0&&this.detach()}};e.\u0275fac=function(r){return new(r||e)(X(Xe))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),fle=(()=>{let e=class e extends eG{constructor(n,r){super(n),this._ngZone=r,this._keydownListener=o=>{let s=this._attachedOverlays;for(let a=s.length-1;a>-1;a--)if(s[a]._keydownEvents.observers.length>0){let c=s[a]._keydownEvents;this._ngZone?this._ngZone.run(()=>c.next(o)):c.next(o);break}}}add(n){super.add(n),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}};e.\u0275fac=function(r){return new(r||e)(X(Xe),X(Fe,8))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),mle=(()=>{let e=class e extends eG{constructor(n,r,o){super(n),this._platform=r,this._ngZone=o,this._cursorStyleIsSet=!1,this._pointerDownListener=s=>{this._pointerDownEventTarget=Ii(s)},this._clickListener=s=>{let a=Ii(s),c=s.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:a;this._pointerDownEventTarget=null;let l=this._attachedOverlays.slice();for(let d=l.length-1;d>-1;d--){let u=l[d];if(u._outsidePointerEvents.observers.length<1||!u.hasAttached())continue;if(XH(u.overlayElement,a)||XH(u.overlayElement,c))break;let h=u._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>h.next(s)):h.next(s)}}}add(n){if(super.add(n),!this._isAttached){let r=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(r)):this._addEventListeners(r),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=r.style.cursor,r.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){let n=this._document.body;n.removeEventListener("pointerdown",this._pointerDownListener,!0),n.removeEventListener("click",this._clickListener,!0),n.removeEventListener("auxclick",this._clickListener,!0),n.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(n.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(n){n.addEventListener("pointerdown",this._pointerDownListener,!0),n.addEventListener("click",this._clickListener,!0),n.addEventListener("auxclick",this._clickListener,!0),n.addEventListener("contextmenu",this._clickListener,!0)}};e.\u0275fac=function(r){return new(r||e)(X(Xe),X(gn),X(Fe,8))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function XH(i,e){let t=typeof ShadowRoot<"u"&&ShadowRoot,n=e;for(;n;){if(n===i)return!0;n=t&&n instanceof ShadowRoot?n.host:n.parentNode}return!1}var sf=(()=>{let e=class e{constructor(n,r){this._platform=r,this._document=n}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let n="cdk-overlay-container";if(this._platform.isBrowser||jm()){let o=this._document.querySelectorAll(`.${n}[platform="server"], .${n}[platform="test"]`);for(let s=0;sthis._backdropClick.next(h),this._backdropTransitionendHandler=h=>{this._disposeBackdrop(h.target)},this._keydownEvents=new pe,this._outsidePointerEvents=new pe,this._renders=new pe,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy,this._afterRenderRef=zr(()=>Kf(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(e){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let t=this._portalOutlet.attach(e);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),Hi(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof t?.onDestroy=="function"&&t.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),t}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let e=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),e}dispose(){let e=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._previousHostParent=this._pane=this._host=null,e&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(e){e!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=e,this.hasAttached()&&(e.attach(this),this.updatePosition()))}updateSize(e){this._config=Z(Z({},this._config),e),this._updateElementSize()}setDirection(e){this._config=yt(Z({},this._config),{direction:e}),this._updateElementDirection()}addPanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!0)}removePanelClass(e){this._pane&&this._toggleClasses(this._pane,e,!1)}getDirection(){let e=this._config.direction;return e?typeof e=="string"?e:e.value:"ltr"}updateScrollStrategy(e){e!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=e,this.hasAttached()&&(e.attach(this),e.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let e=this._pane.style;e.width=yi(this._config.width),e.height=yi(this._config.height),e.minWidth=yi(this._config.minWidth),e.minHeight=yi(this._config.minHeight),e.maxWidth=yi(this._config.maxWidth),e.maxHeight=yi(this._config.maxHeight)}_togglePointerEvents(e){this._pane.style.pointerEvents=e?"":"none"}_attachBackdrop(){let e="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(e)})}):this._backdropElement.classList.add(e)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let e=this._backdropElement;if(e){if(this._animationsDisabled){this._disposeBackdrop(e);return}e.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{e.addEventListener("transitionend",this._backdropTransitionendHandler)}),e.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(e)},500))}}_toggleClasses(e,t,n){let r=xd(t||[]).filter(o=>!!o);r.length&&(n?e.classList.add(...r):e.classList.remove(...r))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let e=this._renders.pipe(Ze(Zn(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),e.unsubscribe())})})}_disposeScrollStrategy(){let e=this._scrollStrategy;e&&(e.disable(),e.detach&&e.detach())}_disposeBackdrop(e){e&&(e.removeEventListener("click",this._backdropClickHandler),e.removeEventListener("transitionend",this._backdropTransitionendHandler),e.remove(),this._backdropElement===e&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}},ZH="cdk-overlay-connected-position-bounding-box",gle=/([A-Za-z%]+)$/,mO=class{get positions(){return this._preferredPositions}constructor(e,t,n,r,o){this._viewportRuler=t,this._document=n,this._platform=r,this._overlayContainer=o,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new pe,this._resizeSubscription=Ct.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(e)}attach(e){this._overlayRef&&this._overlayRef,this._validatePositions(),e.hostElement.classList.add(ZH),this._overlayRef=e,this._boundingBox=e.hostElement,this._pane=e.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._originRect,t=this._overlayRect,n=this._viewportRect,r=this._containerRect,o=[],s;for(let a of this._preferredPositions){let c=this._getOriginPoint(e,r,a),l=this._getOverlayPoint(c,t,a),d=this._getOverlayFit(l,t,n,a);if(d.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(a,c);return}if(this._canFitWithFlexibleDimensions(d,l,n)){o.push({position:a,origin:c,overlayRect:t,boundingBoxRect:this._calculateBoundingBoxRect(c,a)});continue}(!s||s.overlayFit.visibleAreac&&(c=d,a=l)}this._isPushed=!1,this._applyPosition(a.position,a.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&wu(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(ZH),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let e=this._lastPosition;if(e){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let t=this._getOriginPoint(this._originRect,this._containerRect,e);this._applyPosition(e,t)}else this.apply()}withScrollableContainers(e){return this._scrollables=e,this}withPositions(e){return this._preferredPositions=e,e.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(e){return this._viewportMargin=e,this}withFlexibleDimensions(e=!0){return this._hasFlexibleDimensions=e,this}withGrowAfterOpen(e=!0){return this._growAfterOpen=e,this}withPush(e=!0){return this._canPush=e,this}withLockedPosition(e=!0){return this._positionLocked=e,this}setOrigin(e){return this._origin=e,this}withDefaultOffsetX(e){return this._offsetX=e,this}withDefaultOffsetY(e){return this._offsetY=e,this}withTransformOriginOn(e){return this._transformOriginSelector=e,this}_getOriginPoint(e,t,n){let r;if(n.originX=="center")r=e.left+e.width/2;else{let s=this._isRtl()?e.right:e.left,a=this._isRtl()?e.left:e.right;r=n.originX=="start"?s:a}t.left<0&&(r-=t.left);let o;return n.originY=="center"?o=e.top+e.height/2:o=n.originY=="top"?e.top:e.bottom,t.top<0&&(o-=t.top),{x:r,y:o}}_getOverlayPoint(e,t,n){let r;n.overlayX=="center"?r=-t.width/2:n.overlayX==="start"?r=this._isRtl()?-t.width:0:r=this._isRtl()?0:-t.width;let o;return n.overlayY=="center"?o=-t.height/2:o=n.overlayY=="top"?0:-t.height,{x:e.x+r,y:e.y+o}}_getOverlayFit(e,t,n,r){let o=KH(t),{x:s,y:a}=e,c=this._getOffset(r,"x"),l=this._getOffset(r,"y");c&&(s+=c),l&&(a+=l);let d=0-s,u=s+o.width-n.width,h=0-a,p=a+o.height-n.height,f=this._subtractOverflows(o.width,d,u),m=this._subtractOverflows(o.height,h,p),y=f*m;return{visibleArea:y,isCompletelyWithinViewport:o.width*o.height===y,fitsInViewportVertically:m===o.height,fitsInViewportHorizontally:f==o.width}}_canFitWithFlexibleDimensions(e,t,n){if(this._hasFlexibleDimensions){let r=n.bottom-t.y,o=n.right-t.x,s=QH(this._overlayRef.getConfig().minHeight),a=QH(this._overlayRef.getConfig().minWidth),c=e.fitsInViewportVertically||s!=null&&s<=r,l=e.fitsInViewportHorizontally||a!=null&&a<=o;return c&&l}return!1}_pushOverlayOnScreen(e,t,n){if(this._previousPushAmount&&this._positionLocked)return{x:e.x+this._previousPushAmount.x,y:e.y+this._previousPushAmount.y};let r=KH(t),o=this._viewportRect,s=Math.max(e.x+r.width-o.width,0),a=Math.max(e.y+r.height-o.height,0),c=Math.max(o.top-n.top-e.y,0),l=Math.max(o.left-n.left-e.x,0),d=0,u=0;return r.width<=o.width?d=l||-s:d=e.xf&&!this._isInitialRender&&!this._growAfterOpen&&(s=e.y-f/2)}let c=t.overlayX==="start"&&!r||t.overlayX==="end"&&r,l=t.overlayX==="end"&&!r||t.overlayX==="start"&&r,d,u,h;if(l)h=n.width-e.x+this._viewportMargin*2,d=e.x-this._viewportMargin;else if(c)u=e.x,d=n.right-e.x;else{let p=Math.min(n.right-e.x+n.left,e.x),f=this._lastBoundingBoxSize.width;d=p*2,u=e.x-p,d>f&&!this._isInitialRender&&!this._growAfterOpen&&(u=e.x-f/2)}return{top:s,left:u,bottom:a,right:h,width:d,height:o}}_setBoundingBoxStyles(e,t){let n=this._calculateBoundingBoxRect(e,t);!this._isInitialRender&&!this._growAfterOpen&&(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));let r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{let o=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;r.height=yi(n.height),r.top=yi(n.top),r.bottom=yi(n.bottom),r.width=yi(n.width),r.left=yi(n.left),r.right=yi(n.right),t.overlayX==="center"?r.alignItems="center":r.alignItems=t.overlayX==="end"?"flex-end":"flex-start",t.overlayY==="center"?r.justifyContent="center":r.justifyContent=t.overlayY==="bottom"?"flex-end":"flex-start",o&&(r.maxHeight=yi(o)),s&&(r.maxWidth=yi(s))}this._lastBoundingBoxSize=n,wu(this._boundingBox.style,r)}_resetBoundingBoxStyles(){wu(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){wu(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(e,t){let n={},r=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(r){let d=this._viewportRuler.getViewportScrollPosition();wu(n,this._getExactOverlayY(t,e,d)),wu(n,this._getExactOverlayX(t,e,d))}else n.position="static";let a="",c=this._getOffset(t,"x"),l=this._getOffset(t,"y");c&&(a+=`translateX(${c}px) `),l&&(a+=`translateY(${l}px)`),n.transform=a.trim(),s.maxHeight&&(r?n.maxHeight=yi(s.maxHeight):o&&(n.maxHeight="")),s.maxWidth&&(r?n.maxWidth=yi(s.maxWidth):o&&(n.maxWidth="")),wu(this._pane.style,n)}_getExactOverlayY(e,t,n){let r={top:"",bottom:""},o=this._getOverlayPoint(t,this._overlayRect,e);if(this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,n)),e.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;r.bottom=`${s-(o.y+this._overlayRect.height)}px`}else r.top=yi(o.y);return r}_getExactOverlayX(e,t,n){let r={left:"",right:""},o=this._getOverlayPoint(t,this._overlayRect,e);this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,n));let s;if(this._isRtl()?s=e.overlayX==="end"?"left":"right":s=e.overlayX==="end"?"right":"left",s==="right"){let a=this._document.documentElement.clientWidth;r.right=`${a-(o.x+this._overlayRect.width)}px`}else r.left=yi(o.x);return r}_getScrollVisibility(){let e=this._getOriginRect(),t=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:YH(e,n),isOriginOutsideView:hO(e,n),isOverlayClipped:YH(t,n),isOverlayOutsideView:hO(t,n)}}_subtractOverflows(e,...t){return t.reduce((n,r)=>n-Math.max(r,0),e)}_getNarrowedViewportRect(){let e=this._document.documentElement.clientWidth,t=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+e-this._viewportMargin,bottom:n.top+t-this._viewportMargin,width:e-2*this._viewportMargin,height:t-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(e,t){return t==="x"?e.offsetX==null?this._offsetX:e.offsetX:e.offsetY==null?this._offsetY:e.offsetY}_validatePositions(){}_addPanelClasses(e){this._pane&&xd(e).forEach(t=>{t!==""&&this._appliedPanelClasses.indexOf(t)===-1&&(this._appliedPanelClasses.push(t),this._pane.classList.add(t))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(e=>{this._pane.classList.remove(e)}),this._appliedPanelClasses=[])}_getOriginRect(){let e=this._origin;if(e instanceof Re)return e.nativeElement.getBoundingClientRect();if(e instanceof Element)return e.getBoundingClientRect();let t=e.width||0,n=e.height||0;return{top:e.y,bottom:e.y+n,left:e.x,right:e.x+t,height:n,width:t}}};function wu(i,e){for(let t in e)e.hasOwnProperty(t)&&(i[t]=e[t]);return i}function QH(i){if(typeof i!="number"&&i!=null){let[e,t]=i.split(gle);return!t||t==="px"?parseFloat(e):null}return i||null}function KH(i){return{top:Math.floor(i.top),right:Math.floor(i.right),bottom:Math.floor(i.bottom),left:Math.floor(i.left),width:Math.floor(i.width),height:Math.floor(i.height)}}function _le(i,e){return i===e?!0:i.isOriginClipped===e.isOriginClipped&&i.isOriginOutsideView===e.isOriginOutsideView&&i.isOverlayClipped===e.isOverlayClipped&&i.isOverlayOutsideView===e.isOverlayOutsideView}var JH="cdk-global-overlay-wrapper",gO=class{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(e){let t=e.getConfig();this._overlayRef=e,this._width&&!t.width&&e.updateSize({width:this._width}),this._height&&!t.height&&e.updateSize({height:this._height}),e.hostElement.classList.add(JH),this._isDisposed=!1}top(e=""){return this._bottomOffset="",this._topOffset=e,this._alignItems="flex-start",this}left(e=""){return this._xOffset=e,this._xPosition="left",this}bottom(e=""){return this._topOffset="",this._bottomOffset=e,this._alignItems="flex-end",this}right(e=""){return this._xOffset=e,this._xPosition="right",this}start(e=""){return this._xOffset=e,this._xPosition="start",this}end(e=""){return this._xOffset=e,this._xPosition="end",this}width(e=""){return this._overlayRef?this._overlayRef.updateSize({width:e}):this._width=e,this}height(e=""){return this._overlayRef?this._overlayRef.updateSize({height:e}):this._height=e,this}centerHorizontally(e=""){return this.left(e),this._xPosition="center",this}centerVertically(e=""){return this.top(e),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),{width:r,height:o,maxWidth:s,maxHeight:a}=n,c=(r==="100%"||r==="100vw")&&(!s||s==="100%"||s==="100vw"),l=(o==="100%"||o==="100vh")&&(!a||a==="100%"||a==="100vh"),d=this._xPosition,u=this._xOffset,h=this._overlayRef.getConfig().direction==="rtl",p="",f="",m="";c?m="flex-start":d==="center"?(m="center",h?f=u:p=u):h?d==="left"||d==="end"?(m="flex-end",p=u):(d==="right"||d==="start")&&(m="flex-start",f=u):d==="left"||d==="start"?(m="flex-start",p=u):(d==="right"||d==="end")&&(m="flex-end",f=u),e.position=this._cssPosition,e.marginLeft=c?"0":p,e.marginTop=l?"0":this._topOffset,e.marginBottom=this._bottomOffset,e.marginRight=c?"0":f,t.justifyContent=m,t.alignItems=l?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let e=this._overlayRef.overlayElement.style,t=this._overlayRef.hostElement,n=t.style;t.classList.remove(JH),n.justifyContent=n.alignItems=e.marginTop=e.marginBottom=e.marginLeft=e.marginRight=e.position="",this._overlayRef=null,this._isDisposed=!0}},vle=(()=>{let e=class e{constructor(n,r,o,s){this._viewportRuler=n,this._document=r,this._platform=o,this._overlayContainer=s}global(){return new gO}flexibleConnectedTo(n){return new mO(n,this._viewportRuler,this._document,this._platform,this._overlayContainer)}};e.\u0275fac=function(r){return new(r||e)(X(la),X(Xe),X(gn),X(sf))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),ble=0,$t=(()=>{let e=class e{constructor(n,r,o,s,a,c,l,d,u,h,p,f){this.scrollStrategies=n,this._overlayContainer=r,this._componentFactoryResolver=o,this._positionBuilder=s,this._keyboardDispatcher=a,this._injector=c,this._ngZone=l,this._document=d,this._directionality=u,this._location=h,this._outsideClickDispatcher=p,this._animationsModuleType=f}create(n){let r=this._createHostElement(),o=this._createPaneElement(r),s=this._createPortalOutlet(o),a=new fi(n);return a.direction=a.direction||this._directionality.value,new cc(s,r,o,a,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(Xi))}position(){return this._positionBuilder}_createPaneElement(n){let r=this._document.createElement("div");return r.id=`cdk-overlay-${ble++}`,r.classList.add("cdk-overlay-pane"),n.appendChild(r),r}_createHostElement(){let n=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(n),n}_createPortalOutlet(n){return this._appRef||(this._appRef=this._injector.get(hs)),new W_(n,this._componentFactoryResolver,this._appRef,this._injector,this._document)}};e.\u0275fac=function(r){return new(r||e)(X(ple),X(sf),X(us),X(vle),X(fle),X(vt),X(Fe),X(Xe),X(di),X(Ra),X(mle),X(jn,8))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),yle=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],tG=new me("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let i=te($t);return()=>i.scrollStrategies.reposition()}}),$_=(()=>{let e=class e{constructor(n){this.elementRef=n}};e.\u0275fac=function(r){return new(r||e)(M(Re))},e.\u0275dir=Ve({type:e,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0});let i=e;return i})(),_O=(()=>{let e=class e{get offsetX(){return this._offsetX}set offsetX(n){this._offsetX=n,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(n){this._offsetY=n,this._position&&this._updatePositionStrategy(this._position)}get disposeOnNavigation(){return this._disposeOnNavigation}set disposeOnNavigation(n){this._disposeOnNavigation=n}constructor(n,r,o,s,a){this._overlay=n,this._dir=a,this._backdropSubscription=Ct.EMPTY,this._attachSubscription=Ct.EMPTY,this._detachSubscription=Ct.EMPTY,this._positionSubscription=Ct.EMPTY,this._disposeOnNavigation=!1,this._ngZone=te(Fe),this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.hasBackdrop=!1,this.lockPosition=!1,this.flexibleDimensions=!1,this.growAfterOpen=!1,this.push=!1,this.backdropClick=new Ie,this.positionChange=new Ie,this.attach=new Ie,this.detach=new Ie,this.overlayKeydown=new Ie,this.overlayOutsideClick=new Ie,this._templatePortal=new Zr(r,o),this._scrollStrategyFactory=s,this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(n){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),n.origin&&this.open&&this._position.apply()),n.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=yle);let n=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=n.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=n.detachments().subscribe(()=>this.detach.emit()),n.keydownEvents().subscribe(r=>{this.overlayKeydown.next(r),r.keyCode===27&&!this.disableClose&&!bi(r)&&(r.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(r=>{let o=this._getOriginElement(),s=Ii(r);(!o||o!==s&&!o.contains(s))&&this.overlayOutsideClick.next(r)})}_buildConfig(){let n=this._position=this.positionStrategy||this._createPositionStrategy(),r=new fi({direction:this._dir,positionStrategy:n,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation});return(this.width||this.width===0)&&(r.width=this.width),(this.height||this.height===0)&&(r.height=this.height),(this.minWidth||this.minWidth===0)&&(r.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(r.minHeight=this.minHeight),this.backdropClass&&(r.backdropClass=this.backdropClass),this.panelClass&&(r.panelClass=this.panelClass),r}_updatePositionStrategy(n){let r=this.positions.map(o=>({originX:o.originX,originY:o.originY,overlayX:o.overlayX,overlayY:o.overlayY,offsetX:o.offsetX||this.offsetX,offsetY:o.offsetY||this.offsetY,panelClass:o.panelClass||void 0}));return n.setOrigin(this._getOrigin()).withPositions(r).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){let n=this._overlay.position().flexibleConnectedTo(this._getOrigin());return this._updatePositionStrategy(n),n}_getOrigin(){return this.origin instanceof $_?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof $_?this.origin.elementRef.nativeElement:this.origin instanceof Re?this.origin.nativeElement:typeof Element<"u"&&this.origin instanceof Element?this.origin:null}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(n=>{this.backdropClick.emit(n)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(NS(()=>this.positionChange.observers.length>0)).subscribe(n=>{this._ngZone.run(()=>this.positionChange.emit(n)),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}};e.\u0275fac=function(r){return new(r||e)(M($t),M(Wn),M(Zt),M(tG),M(di,8))},e.\u0275dir=Ve({type:e,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[0,"cdkConnectedOverlayOrigin","origin"],positions:[0,"cdkConnectedOverlayPositions","positions"],positionStrategy:[0,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[0,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[0,"cdkConnectedOverlayOffsetY","offsetY"],width:[0,"cdkConnectedOverlayWidth","width"],height:[0,"cdkConnectedOverlayHeight","height"],minWidth:[0,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[0,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[0,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[0,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[0,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[0,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[0,"cdkConnectedOverlayOpen","open"],disableClose:[0,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[0,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[2,"cdkConnectedOverlayHasBackdrop","hasBackdrop",et],lockPosition:[2,"cdkConnectedOverlayLockPosition","lockPosition",et],flexibleDimensions:[2,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",et],growAfterOpen:[2,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",et],push:[2,"cdkConnectedOverlayPush","push",et],disposeOnNavigation:[2,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",et]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],standalone:!0,features:[nn,dn]});let i=e;return i})();function xle(i){return()=>i.scrollStrategies.reposition()}var wle={provide:tG,deps:[$t],useFactory:xle},oo=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({providers:[$t,wle],imports:[Xc,Es,cO,cO]});let i=e;return i})();var Cle=["*"],aC;function Sle(){if(aC===void 0&&(aC=null,typeof window<"u")){let i=window;i.trustedTypes!==void 0&&(aC=i.trustedTypes.createPolicy("angular#components",{createHTML:e=>e}))}return aC}function q_(i){return Sle()?.createHTML(i)||i}function nG(i){return Error(`Unable to find icon with the name "${i}"`)}function Mle(){return Error("Could not find HttpClient provider for use with Angular Material icons. Please include the HttpClientModule from @angular/common/http in your app imports.")}function iG(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function rG(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}var lc=class{constructor(e,t,n){this.url=e,this.svgText=t,this.options=n}},Ele=(()=>{let e=class e{constructor(n,r,o,s){this._httpClient=n,this._sanitizer=r,this._errorHandler=s,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=o}addSvgIcon(n,r,o){return this.addSvgIconInNamespace("",n,r,o)}addSvgIconLiteral(n,r,o){return this.addSvgIconLiteralInNamespace("",n,r,o)}addSvgIconInNamespace(n,r,o,s){return this._addSvgIconConfig(n,r,new lc(o,null,s))}addSvgIconResolver(n){return this._resolvers.push(n),this}addSvgIconLiteralInNamespace(n,r,o,s){let a=this._sanitizer.sanitize(Fr.HTML,o);if(!a)throw rG(o);let c=q_(a);return this._addSvgIconConfig(n,r,new lc("",c,s))}addSvgIconSet(n,r){return this.addSvgIconSetInNamespace("",n,r)}addSvgIconSetLiteral(n,r){return this.addSvgIconSetLiteralInNamespace("",n,r)}addSvgIconSetInNamespace(n,r,o){return this._addSvgIconSetConfig(n,new lc(r,null,o))}addSvgIconSetLiteralInNamespace(n,r,o){let s=this._sanitizer.sanitize(Fr.HTML,r);if(!s)throw rG(r);let a=q_(s);return this._addSvgIconSetConfig(n,new lc("",a,o))}registerFontClassAlias(n,r=n){return this._fontCssClassesByAlias.set(n,r),this}classNameForFontAlias(n){return this._fontCssClassesByAlias.get(n)||n}setDefaultFontSetClass(...n){return this._defaultFontSetClass=n,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(n){let r=this._sanitizer.sanitize(Fr.RESOURCE_URL,n);if(!r)throw iG(n);let o=this._cachedIconsByUrl.get(r);return o?Ke(cC(o)):this._loadSvgIconFromConfig(new lc(n,null)).pipe(En(s=>this._cachedIconsByUrl.set(r,s)),Je(s=>cC(s)))}getNamedSvgIcon(n,r=""){let o=oG(r,n),s=this._svgIconConfigs.get(o);if(s)return this._getSvgFromConfig(s);if(s=this._getIconConfigFromResolvers(r,n),s)return this._svgIconConfigs.set(o,s),this._getSvgFromConfig(s);let a=this._iconSetConfigs.get(r);return a?this._getSvgFromIconSetConfigs(n,a):vc(nG(o))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(n){return n.svgText?Ke(cC(this._svgElementFromConfig(n))):this._loadSvgIconFromConfig(n).pipe(Je(r=>cC(r)))}_getSvgFromIconSetConfigs(n,r){let o=this._extractIconWithNameFromAnySet(n,r);if(o)return Ke(o);let s=r.filter(a=>!a.svgText).map(a=>this._loadSvgIconSetFromConfig(a).pipe(Os(c=>{let d=`Loading icon set URL: ${this._sanitizer.sanitize(Fr.RESOURCE_URL,a.url)} failed: ${c.message}`;return this._errorHandler.handleError(new Error(d)),Ke(null)})));return Pf(s).pipe(Je(()=>{let a=this._extractIconWithNameFromAnySet(n,r);if(!a)throw nG(n);return a}))}_extractIconWithNameFromAnySet(n,r){for(let o=r.length-1;o>=0;o--){let s=r[o];if(s.svgText&&s.svgText.toString().indexOf(n)>-1){let a=this._svgElementFromConfig(s),c=this._extractSvgIconFromSet(a,n,s.options);if(c)return c}}return null}_loadSvgIconFromConfig(n){return this._fetchIcon(n).pipe(En(r=>n.svgText=r),Je(()=>this._svgElementFromConfig(n)))}_loadSvgIconSetFromConfig(n){return n.svgText?Ke(null):this._fetchIcon(n).pipe(En(r=>n.svgText=r))}_extractSvgIconFromSet(n,r,o){let s=n.querySelector(`[id="${r}"]`);if(!s)return null;let a=s.cloneNode(!0);if(a.removeAttribute("id"),a.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(a,o);if(a.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(a),o);let c=this._svgElementFromString(q_(""));return c.appendChild(a),this._setSvgAttributes(c,o)}_svgElementFromString(n){let r=this._document.createElement("DIV");r.innerHTML=n;let o=r.querySelector("svg");if(!o)throw Error(" tag not found");return o}_toSvgElement(n){let r=this._svgElementFromString(q_("")),o=n.attributes;for(let s=0;sq_(d)),wc(()=>this._inProgressUrlFetches.delete(a)),Af());return this._inProgressUrlFetches.set(a,l),l}_addSvgIconConfig(n,r,o){return this._svgIconConfigs.set(oG(n,r),o),this}_addSvgIconSetConfig(n,r){let o=this._iconSetConfigs.get(n);return o?o.push(r):this._iconSetConfigs.set(n,[r]),this}_svgElementFromConfig(n){if(!n.svgElement){let r=this._svgElementFromString(n.svgText);this._setSvgAttributes(r,n.options),n.svgElement=r}return n.svgElement}_getIconConfigFromResolvers(n,r){for(let o=0;oe?e.pathname+e.search:""}}var sG=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],Ole=sG.map(i=>`[${i}]`).join(", "),Rle=/^url\(['"]?#(.*?)['"]?\)$/,pt=(()=>{let e=class e{get color(){return this._color||this._defaultColor}set color(n){this._color=n}get svgIcon(){return this._svgIcon}set svgIcon(n){n!==this._svgIcon&&(n?this._updateSvgIcon(n):this._svgIcon&&this._clearSvgElement(),this._svgIcon=n)}get fontSet(){return this._fontSet}set fontSet(n){let r=this._cleanupFontValue(n);r!==this._fontSet&&(this._fontSet=r,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(n){let r=this._cleanupFontValue(n);r!==this._fontIcon&&(this._fontIcon=r,this._updateFontIconClasses())}constructor(n,r,o,s,a,c){this._elementRef=n,this._iconRegistry=r,this._location=s,this._errorHandler=a,this.inline=!1,this._previousFontSetClass=[],this._currentIconFetch=Ct.EMPTY,c&&(c.color&&(this.color=this._defaultColor=c.color),c.fontSet&&(this.fontSet=c.fontSet)),o||n.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(n){if(!n)return["",""];let r=n.split(":");switch(r.length){case 1:return["",r[0]];case 2:return r;default:throw Error(`Invalid icon name: "${n}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let n=this._elementsWithExternalReferences;if(n&&n.size){let r=this._location.getPathname();r!==this._previousPath&&(this._previousPath=r,this._prependPathToReferences(r))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(n){this._clearSvgElement();let r=this._location.getPathname();this._previousPath=r,this._cacheChildrenWithExternalReferences(n),this._prependPathToReferences(r),this._elementRef.nativeElement.appendChild(n)}_clearSvgElement(){let n=this._elementRef.nativeElement,r=n.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();r--;){let o=n.childNodes[r];(o.nodeType!==1||o.nodeName.toLowerCase()==="svg")&&o.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let n=this._elementRef.nativeElement,r=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(o=>o.length>0);this._previousFontSetClass.forEach(o=>n.classList.remove(o)),r.forEach(o=>n.classList.add(o)),this._previousFontSetClass=r,this.fontIcon!==this._previousFontIconClass&&!r.includes("mat-ligature-font")&&(this._previousFontIconClass&&n.classList.remove(this._previousFontIconClass),this.fontIcon&&n.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(n){return typeof n=="string"?n.trim().split(" ")[0]:n}_prependPathToReferences(n){let r=this._elementsWithExternalReferences;r&&r.forEach((o,s)=>{o.forEach(a=>{s.setAttribute(a.name,`url('${n}#${a.value}')`)})})}_cacheChildrenWithExternalReferences(n){let r=n.querySelectorAll(Ole),o=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let s=0;s{let c=r[s],l=c.getAttribute(a),d=l?l.match(Rle):null;if(d){let u=o.get(c);u||(u=[],o.set(c,u)),u.push({name:a,value:d[1]})}})}_updateSvgIcon(n){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),n){let[r,o]=this._splitIconName(n);r&&(this._svgNamespace=r),o&&(this._svgName=o),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(o,r).pipe(_n(1)).subscribe(s=>this._setSvgElement(s),s=>{let a=`Error retrieving icon ${r}:${o}! ${s.message}`;this._errorHandler.handleError(new Error(a))})}}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Ele),Lr("aria-hidden"),M(Dle),M(Nr),M(Tle,8))},e.\u0275cmp=ce({type:e,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(r,o){r&2&&(Ye("data-mat-icon-type",o._usingFontIcon()?"font":"svg")("data-mat-icon-name",o._svgName||o.fontIcon)("data-mat-icon-namespace",o._svgNamespace||o.fontSet)("fontIcon",o._usingFontIcon()?o.fontIcon:null),Vr(o.color?"mat-"+o.color:""),re("mat-icon-inline",o.inline)("mat-icon-no-color",o.color!=="primary"&&o.color!=="accent"&&o.color!=="warn"))},inputs:{color:"color",inline:[2,"inline","inline",et],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],standalone:!0,features:[nn,le],ngContentSelectors:Cle,decls:1,vars:0,template:function(r,o){r&1&&(In(),Wt(0))},styles:["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0});let i=e;return i})(),tt=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({imports:[Ut,Ut]});let i=e;return i})();var Ale=["mat-menu-item",""],Nle=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],kle=["mat-icon, [matMenuItemIcon]","*"];function Lle(i,e){i&1&&(uo(),v(0,"svg",2),ee(1,"polygon",3),b())}var Fle=["*"];function Ble(i,e){if(i&1){let t=ne();v(0,"div",0),H("keydown",function(r){B(t);let o=I();return V(o._handleKeydown(r))})("click",function(){B(t);let r=I();return V(r.closed.emit("click"))})("@transformMenu.start",function(r){B(t);let o=I();return V(o._onAnimationStart(r))})("@transformMenu.done",function(r){B(t);let o=I();return V(o._onAnimationDone(r))}),v(1,"div",1),Wt(2),b()()}if(i&2){let t=I();Vr(t._classList),R("id",t.panelId)("@transformMenu",t._panelAnimationState),Ye("aria-label",t.ariaLabel||null)("aria-labelledby",t.ariaLabelledby||null)("aria-describedby",t.ariaDescribedby||null)}}var vO=new me("MAT_MENU_PANEL"),Y_=(()=>{let e=class e{constructor(n,r,o,s,a){this._elementRef=n,this._document=r,this._focusMonitor=o,this._parentMenu=s,this._changeDetectorRef=a,this.role="menuitem",this.disabled=!1,this.disableRipple=!1,this._hovered=new pe,this._focused=new pe,this._highlighted=!1,this._triggersSubmenu=!1,s?.addItem?.(this)}focus(n,r){this._focusMonitor&&n?this._focusMonitor.focusVia(this._getHostElement(),n,r):this._getHostElement().focus(r),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(n){this.disabled&&(n.preventDefault(),n.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let n=this._elementRef.nativeElement.cloneNode(!0),r=n.querySelectorAll("mat-icon, .material-icons");for(let o=0;o enter",Rn("120ms cubic-bezier(0, 0, 0.2, 1)",Kt({opacity:1,transform:"scale(1)"}))),An("* => void",Rn("100ms 25ms linear",Kt({opacity:0})))]),fadeInItems:li("fadeInItems",[vi("showing",Kt({opacity:1})),An("void => *",[Kt({opacity:0}),Rn("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},WHe=lC.fadeInItems,$He=lC.transformMenu,zle=0,Ule=new me("mat-menu-default-options",{providedIn:"root",factory:Hle});function Hle(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}var ns=(()=>{let e=class e{get xPosition(){return this._xPosition}set xPosition(n){this._xPosition=n,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(n){this._yPosition=n,this.setPositionClasses()}set panelClass(n){let r=this._previousPanelClass,o=Z({},this._classList);r&&r.length&&r.split(" ").forEach(s=>{o[s]=!1}),this._previousPanelClass=n,n&&n.length&&(n.split(" ").forEach(s=>{o[s]=!0}),this._elementRef.nativeElement.className=""),this._classList=o}get classList(){return this.panelClass}set classList(n){this.panelClass=n}constructor(n,r,o,s){this._elementRef=n,this._changeDetectorRef=s,this._elevationPrefix="mat-elevation-z",this._baseElevation=null,this._directDescendantItems=new Zi,this._classList={},this._panelAnimationState="void",this._animationDone=new pe,this.closed=new Ie,this.close=this.closed,this.panelId=`mat-menu-panel-${zle++}`,this._injector=te(vt),this.overlayPanelClass=o.overlayPanelClass||"",this._xPosition=o.xPosition,this._yPosition=o.yPosition,this.backdropClass=o.backdropClass,this.overlapTrigger=o.overlapTrigger,this.hasBackdrop=o.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new Ey(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(gi(this._directDescendantItems),Qn(n=>Zn(...n.map(r=>r._focused)))).subscribe(n=>this._keyManager.updateActiveItem(n)),this._directDescendantItems.changes.subscribe(n=>{let r=this._keyManager;if(this._panelAnimationState==="enter"&&r.activeItem?._hasFocus()){let o=n.toArray(),s=Math.max(0,Math.min(o.length-1,r.activeItemIndex||0));o[s]&&!o[s].disabled?r.setActiveItem(s):r.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy()}_hovered(){return this._directDescendantItems.changes.pipe(gi(this._directDescendantItems),Qn(r=>Zn(...r.map(o=>o._hovered))))}addItem(n){}removeItem(n){}_handleKeydown(n){let r=n.keyCode,o=this._keyManager;switch(r){case 27:bi(n)||(n.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(r===38||r===40)&&o.setFocusOrigin("keyboard"),o.onKeydown(n);return}n.stopPropagation()}focusFirstItem(n="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=Hi(()=>{let r=null;if(this._directDescendantItems.length&&(r=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),!r||!r.contains(document.activeElement)){let o=this._keyManager;o.setFocusOrigin(n).setFirstItemActive(),!o.activeItem&&r&&r.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(n){if(this._baseElevation===null){let c=(typeof getComputedStyle=="function"?getComputedStyle(this._elementRef.nativeElement):null)?.getPropertyValue("--mat-menu-base-elevation-level")||"8";this._baseElevation=parseInt(c)}let r=Math.min(this._baseElevation+n,24),o=`${this._elevationPrefix}${r}`,s=Object.keys(this._classList).find(a=>a.startsWith(this._elevationPrefix));if(!s||s===this._previousElevation){let a=Z({},this._classList);this._previousElevation&&(a[this._previousElevation]=!1),a[o]=!0,this._previousElevation=o,this._classList=a}}setPositionClasses(n=this.xPosition,r=this.yPosition){this._classList=yt(Z({},this._classList),{"mat-menu-before":n==="before","mat-menu-after":n==="after","mat-menu-above":r==="above","mat-menu-below":r==="below"}),this._changeDetectorRef?.markForCheck()}_startAnimation(){this._panelAnimationState="enter"}_resetAnimation(){this._panelAnimationState="void"}_onAnimationDone(n){this._animationDone.next(n),this._isAnimating=!1}_onAnimationStart(n){this._isAnimating=!0,n.toState==="enter"&&this._keyManager.activeItemIndex===0&&(n.element.scrollTop=0)}_updateDirectDescendants(){this._allItems.changes.pipe(gi(this._allItems)).subscribe(n=>{this._directDescendantItems.reset(n.filter(r=>r._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Fe),M(Ule),M(Ne))},e.\u0275cmp=ce({type:e,selectors:[["mat-menu"]],contentQueries:function(r,o,s){if(r&1&&(_i(s,Vle,5),_i(s,Y_,5),_i(s,Y_,4)),r&2){let a;be(a=ye())&&(o.lazyContent=a.first),be(a=ye())&&(o._allItems=a),be(a=ye())&&(o.items=a)}},viewQuery:function(r,o){if(r&1&&Ee(Wn,5),r&2){let s;be(s=ye())&&(o.templateRef=s.first)}},hostVars:3,hostBindings:function(r,o){r&2&&Ye("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",et],hasBackdrop:[2,"hasBackdrop","hasBackdrop",n=>n==null?null:et(n)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],standalone:!0,features:[Ft([{provide:vO,useExisting:e}]),nn,le],ngContentSelectors:Fle,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel","mat-mdc-elevation-specific",3,"keydown","click","id"],[1,"mat-mdc-menu-content"]],template:function(r,o){r&1&&(In(),$(0,Ble,3,7,"ng-template"))},styles:['mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font);line-height:var(--mat-menu-item-label-text-line-height);font-size:var(--mat-menu-item-label-text-size);letter-spacing:var(--mat-menu-item-label-text-tracking);font-weight:var(--mat-menu-item-label-text-weight)}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;box-sizing:border-box;outline:0;border-radius:var(--mat-menu-container-shape);background-color:var(--mat-menu-container-color);will-change:transform,opacity}.mat-mdc-menu-panel.ng-animating{pointer-events:none}.mat-mdc-menu-panel.ng-animating:has(.mat-mdc-menu-content:empty){display:none}.cdk-high-contrast-active .mat-mdc-menu-panel{outline:solid 1px}.mat-mdc-menu-panel .mat-divider{color:var(--mat-menu-divider-color);margin-bottom:var(--mat-menu-divider-bottom-spacing);margin-top:var(--mat-menu-divider-top-spacing)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;padding-left:var(--mat-menu-item-leading-spacing);padding-right:var(--mat-menu-item-trailing-spacing);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0);cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px}[dir=rtl] .mat-mdc-menu-item{padding-right:var(--mat-menu-item-leading-spacing);padding-left:var(--mat-menu-item-trailing-spacing)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing);padding-right:var(--mat-menu-item-with-icon-trailing-spacing)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-right:var(--mat-menu-item-with-icon-leading-spacing);padding-left:var(--mat-menu-item-with-icon-trailing-spacing)}.mat-mdc-menu-item::-moz-focus-inner{border:0}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color)}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color)}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing);height:var(--mat-menu-item-icon-size);width:var(--mat-menu-item-icon-size)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color)}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color)}.cdk-high-contrast-active .mat-mdc-menu-item{margin-top:1px}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1)}.cdk-high-contrast-active .mat-mdc-menu-submenu-icon{fill:CanvasText}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}'],encapsulation:2,data:{animation:[lC.transformMenu,lC.fadeInItems]},changeDetection:0});let i=e;return i})(),cG=new me("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let i=te($t);return()=>i.scrollStrategies.reposition()}});function Gle(i){return()=>i.scrollStrategies.reposition()}var jle={provide:cG,deps:[$t],useFactory:Gle},aG=Hr({passive:!0});var xl=(()=>{let e=class e{get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(n){this.menu=n}get menu(){return this._menu}set menu(n){n!==this._menu&&(this._menu=n,this._menuCloseSubscription.unsubscribe(),n&&(this._parentMaterialMenu,this._menuCloseSubscription=n.close.subscribe(r=>{this._destroyMenu(r),(r==="click"||r==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(r)})),this._menuItemInstance?._setTriggersSubmenu(this.triggersSubmenu()))}constructor(n,r,o,s,a,c,l,d,u){this._overlay=n,this._element=r,this._viewContainerRef=o,this._menuItemInstance=c,this._dir=l,this._focusMonitor=d,this._ngZone=u,this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=Ct.EMPTY,this._hoverSubscription=Ct.EMPTY,this._menuCloseSubscription=Ct.EMPTY,this._changeDetectorRef=te(Ne),this._handleTouchStart=h=>{Md(h)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new Ie,this.onMenuOpen=this.menuOpened,this.menuClosed=new Ie,this.onMenuClose=this.menuClosed,this._scrollStrategy=s,this._parentMaterialMenu=a instanceof ns?a:void 0,r.nativeElement.addEventListener("touchstart",this._handleTouchStart,aG)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,aG),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this.menu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){let n=this.menu;if(this._menuOpen||!n)return;let r=this._createOverlay(n),o=r.getConfig(),s=o.positionStrategy;this._setPosition(n,s),o.hasBackdrop=n.hasBackdrop==null?!this.triggersSubmenu():n.hasBackdrop,r.attach(this._getPortal(n)),n.lazyContent&&n.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(n),n instanceof ns&&(n._startAnimation(),n._directDescendantItems.changes.pipe(Ze(n.close)).subscribe(()=>{s.withLockedPosition(!1).reapplyLastPosition(),s.withLockedPosition(!0)}))}closeMenu(){this.menu?.close.emit()}focus(n,r){this._focusMonitor&&n?this._focusMonitor.focusVia(this._element,n,r):this._element.nativeElement.focus(r)}updatePosition(){this._overlayRef?.updatePosition()}_destroyMenu(n){if(!this._overlayRef||!this.menuOpen)return;let r=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this.restoreFocus&&(n==="keydown"||!this._openedBy||!this.triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,r instanceof ns?(r._resetAnimation(),r.lazyContent?r._animationDone.pipe(qt(o=>o.toState==="void"),_n(1),Ze(r.lazyContent._attached)).subscribe({next:()=>r.lazyContent.detach(),complete:()=>this._setIsMenuOpen(!1)}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),r?.lazyContent?.detach())}_initMenu(n){n.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,n.direction=this.dir,this._setMenuElevation(n),n.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0)}_setMenuElevation(n){if(n.setElevation){let r=0,o=n.parentMenu;for(;o;)r++,o=o.parentMenu;n.setElevation(r)}}_setIsMenuOpen(n){n!==this._menuOpen&&(this._menuOpen=n,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&this._menuItemInstance._setHighlighted(n),this._changeDetectorRef.markForCheck())}_createOverlay(n){if(!this._overlayRef){let r=this._getOverlayConfig(n);this._subscribeToPositions(n,r.positionStrategy),this._overlayRef=this._overlay.create(r),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}_getOverlayConfig(n){return new fi({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:n.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:n.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir})}_subscribeToPositions(n,r){n.setPositionClasses&&r.positionChanges.subscribe(o=>{let s=o.connectionPair.overlayX==="start"?"after":"before",a=o.connectionPair.overlayY==="top"?"below":"above";this._ngZone?this._ngZone.run(()=>n.setPositionClasses(s,a)):n.setPositionClasses(s,a)})}_setPosition(n,r){let[o,s]=n.xPosition==="before"?["end","start"]:["start","end"],[a,c]=n.yPosition==="above"?["bottom","top"]:["top","bottom"],[l,d]=[a,c],[u,h]=[o,s],p=0;if(this.triggersSubmenu()){if(h=o=n.xPosition==="before"?"start":"end",s=u=o==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let f=this._parentMaterialMenu.items.first;this._parentInnerPadding=f?f._getHostElement().offsetTop:0}p=a==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else n.overlapTrigger||(l=a==="top"?"bottom":"top",d=c==="top"?"bottom":"top");r.withPositions([{originX:o,originY:l,overlayX:u,overlayY:a,offsetY:p},{originX:s,originY:l,overlayX:h,overlayY:a,offsetY:p},{originX:o,originY:d,overlayX:u,overlayY:c,offsetY:-p},{originX:s,originY:d,overlayX:h,overlayY:c,offsetY:-p}])}_menuClosingActions(){let n=this._overlayRef.backdropClick(),r=this._overlayRef.detachments(),o=this._parentMaterialMenu?this._parentMaterialMenu.closed:Ke(),s=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(qt(a=>a!==this._menuItemInstance),qt(()=>this._menuOpen)):Ke();return Zn(n,o,s,r)}_handleMousedown(n){Sd(n)||(this._openedBy=n.button===0?"mouse":void 0,this.triggersSubmenu()&&n.preventDefault())}_handleKeydown(n){let r=n.keyCode;(r===13||r===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(r===39&&this.dir==="ltr"||r===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(n){this.triggersSubmenu()?(n.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){!this.triggersSubmenu()||!this._parentMaterialMenu||(this._hoverSubscription=this._parentMaterialMenu._hovered().pipe(qt(n=>n===this._menuItemInstance&&!n.disabled),Vu(0,Tf)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof ns&&this.menu._isAnimating?this.menu._animationDone.pipe(_n(1),Vu(0,Tf),Ze(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(n){return(!this._portal||this._portal.templateRef!==n.templateRef)&&(this._portal=new Zr(n.templateRef,this._viewContainerRef)),this._portal}};e.\u0275fac=function(r){return new(r||e)(M($t),M(Re),M(Zt),M(cG),M(vO,8),M(Y_,10),M(di,8),M(Gr),M(Fe))},e.\u0275dir=Ve({type:e,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(r,o){r&1&&H("click",function(a){return o._handleClick(a)})("mousedown",function(a){return o._handleMousedown(a)})("keydown",function(a){return o._handleKeydown(a)}),r&2&&Ye("aria-haspopup",o.menu?"menu":null)("aria-expanded",o.menuOpen)("aria-controls",o.menuOpen?o.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],standalone:!0});let i=e;return i})(),ua=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({providers:[jle],imports:[Ae,Id,Ut,oo,Jo,Ut]});let i=e;return i})();var Wle=["tooltip"],uG=20;var hG=new me("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let i=te($t);return()=>i.scrollStrategies.reposition({scrollThrottle:uG})}});function $le(i){return()=>i.scrollStrategies.reposition({scrollThrottle:uG})}var qle={provide:hG,deps:[$t],useFactory:$le};function Yle(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}var Xle=new me("mat-tooltip-default-options",{providedIn:"root",factory:Yle});var lG="tooltip-panel",dG=Hr({passive:!0}),Zle=8,Qle=8,Kle=24,Jle=200,Yn=(()=>{let e=class e{get position(){return this._position}set position(n){n!==this._position&&(this._position=n,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(n){this._positionAtOrigin=Ph(n),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(n){this._disabled=Ph(n),this._disabled?this.hide(0):this._setupPointerEnterEventsIfNeeded()}get showDelay(){return this._showDelay}set showDelay(n){this._showDelay=Qs(n)}get hideDelay(){return this._hideDelay}set hideDelay(n){this._hideDelay=Qs(n),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}get message(){return this._message}set message(n){this._ariaDescriber.removeDescription(this._elementRef.nativeElement,this._message,"tooltip"),this._message=n!=null?String(n).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage(),this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")})}))}get tooltipClass(){return this._tooltipClass}set tooltipClass(n){this._tooltipClass=n,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}constructor(n,r,o,s,a,c,l,d,u,h,p,f){this._overlay=n,this._elementRef=r,this._scrollDispatcher=o,this._viewContainerRef=s,this._ngZone=a,this._platform=c,this._ariaDescriber=l,this._focusMonitor=d,this._dir=h,this._defaultOptions=p,this._position="below",this._positionAtOrigin=!1,this._disabled=!1,this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this._tooltipComponent=ede,this._viewportMargin=8,this._cssClassPrefix="mat-mdc",this.touchGestures="auto",this._message="",this._passiveListeners=[],this._destroyed=new pe,this._injector=te(vt),this._scrollStrategy=u,this._document=f,p&&(this._showDelay=p.showDelay,this._hideDelay=p.hideDelay,p.position&&(this.position=p.position),p.positionAtOrigin&&(this.positionAtOrigin=p.positionAtOrigin),p.touchGestures&&(this.touchGestures=p.touchGestures)),h.change.pipe(Ze(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)}),this._viewportMargin=Zle}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Ze(this._destroyed)).subscribe(n=>{n?n==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){let n=this._elementRef.nativeElement;clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([r,o])=>{n.removeEventListener(r,o,dG)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(n,this.message,"tooltip"),this._focusMonitor.stopMonitoring(n)}show(n=this.showDelay,r){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let o=this._createOverlay(r);this._detach(),this._portal=this._portal||new Ai(this._tooltipComponent,this._viewContainerRef);let s=this._tooltipInstance=o.attach(this._portal).instance;s._triggerElement=this._elementRef.nativeElement,s._mouseLeaveHideDelay=this._hideDelay,s.afterHidden().pipe(Ze(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),s.show(n)}hide(n=this.hideDelay){let r=this._tooltipInstance;r&&(r.isVisible()?r.hide(n):(r._cancelPendingAnimations(),this._detach()))}toggle(n){this._isTooltipVisible()?this.hide():this.show(void 0,n)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(n){if(this._overlayRef){let s=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!n)&&s._origin instanceof Re)return this._overlayRef;this._detach()}let r=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),o=this._overlay.position().flexibleConnectedTo(this.positionAtOrigin?n||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(r);return o.positionChanges.pipe(Ze(this._destroyed)).subscribe(s=>{this._updateCurrentPositionClass(s.connectionPair),this._tooltipInstance&&s.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:o,panelClass:`${this._cssClassPrefix}-${lG}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Ze(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Ze(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Ze(this._destroyed)).subscribe(s=>{this._isTooltipVisible()&&s.keyCode===27&&!bi(s)&&(s.preventDefault(),s.stopPropagation(),this._ngZone.run(()=>this.hide(0)))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(n){let r=n.getConfig().positionStrategy,o=this._getOrigin(),s=this._getOverlayPosition();r.withPositions([this._addOffset(Z(Z({},o.main),s.main)),this._addOffset(Z(Z({},o.fallback),s.fallback))])}_addOffset(n){let r=Qle,o=!this._dir||this._dir.value=="ltr";return n.originY==="top"?n.offsetY=-r:n.originY==="bottom"?n.offsetY=r:n.originX==="start"?n.offsetX=o?-r:r:n.originX==="end"&&(n.offsetX=o?r:-r),n}_getOrigin(){let n=!this._dir||this._dir.value=="ltr",r=this.position,o;r=="above"||r=="below"?o={originX:"center",originY:r=="above"?"top":"bottom"}:r=="before"||r=="left"&&n||r=="right"&&!n?o={originX:"start",originY:"center"}:(r=="after"||r=="right"&&n||r=="left"&&!n)&&(o={originX:"end",originY:"center"});let{x:s,y:a}=this._invertPosition(o.originX,o.originY);return{main:o,fallback:{originX:s,originY:a}}}_getOverlayPosition(){let n=!this._dir||this._dir.value=="ltr",r=this.position,o;r=="above"?o={overlayX:"center",overlayY:"bottom"}:r=="below"?o={overlayX:"center",overlayY:"top"}:r=="before"||r=="left"&&n||r=="right"&&!n?o={overlayX:"end",overlayY:"center"}:(r=="after"||r=="right"&&n||r=="left"&&!n)&&(o={overlayX:"start",overlayY:"center"});let{x:s,y:a}=this._invertPosition(o.overlayX,o.overlayY);return{main:o,fallback:{overlayX:s,overlayY:a}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),Hi(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()},{injector:this._injector}))}_setTooltipClass(n){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=n,this._tooltipInstance._markForCheck())}_invertPosition(n,r){return this.position==="above"||this.position==="below"?r==="top"?r="bottom":r==="bottom"&&(r="top"):n==="end"?n="start":n==="start"&&(n="end"),{x:n,y:r}}_updateCurrentPositionClass(n){let{overlayY:r,originX:o,originY:s}=n,a;if(r==="center"?this._dir&&this._dir.value==="rtl"?a=o==="end"?"left":"right":a=o==="start"?"left":"right":a=r==="bottom"&&s==="top"?"above":"below",a!==this._currentPosition){let c=this._overlayRef;if(c){let l=`${this._cssClassPrefix}-${lG}-`;c.removePanelClass(l+this._currentPosition),c.addPanelClass(l+a)}this._currentPosition=a}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",n=>{this._setupPointerExitEventsIfNeeded();let r;n.x!==void 0&&n.y!==void 0&&(r=n),this.show(void 0,r)}]):this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",n=>{let r=n.targetTouches?.[0],o=r?{x:r.clientX,y:r.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),clearTimeout(this._touchstartTimeout);let s=500;this._touchstartTimeout=setTimeout(()=>this.show(void 0,o),this._defaultOptions.touchLongPressShowDelay??s)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;let n=[];if(this._platformSupportsMouseEvents())n.push(["mouseleave",r=>{let o=r.relatedTarget;(!o||!this._overlayRef?.overlayElement.contains(o))&&this.hide()}],["wheel",r=>this._wheelListener(r)]);else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let r=()=>{clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions.touchendHideDelay)};n.push(["touchend",r],["touchcancel",r])}this._addListeners(n),this._passiveListeners.push(...n)}_addListeners(n){n.forEach(([r,o])=>{this._elementRef.nativeElement.addEventListener(r,o,dG)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(n){if(this._isTooltipVisible()){let r=this._document.elementFromPoint(n.clientX,n.clientY),o=this._elementRef.nativeElement;r!==o&&!o.contains(r)&&this.hide()}}_disableNativeGesturesIfNecessary(){let n=this.touchGestures;if(n!=="off"){let r=this._elementRef.nativeElement,o=r.style;(n==="on"||r.nodeName!=="INPUT"&&r.nodeName!=="TEXTAREA")&&(o.userSelect=o.msUserSelect=o.webkitUserSelect=o.MozUserSelect="none"),(n==="on"||!r.draggable)&&(o.webkitUserDrag="none"),o.touchAction="none",o.webkitTapHighlightColor="transparent"}}};e.\u0275fac=function(r){return new(r||e)(M($t),M(Re),M(xu),M(Zt),M(Fe),M(gn),M(A3),M(Gr),M(hG),M(di),M(Xle,8),M(Xe))},e.\u0275dir=Ve({type:e,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(r,o){r&2&&re("mat-mdc-tooltip-disabled",o.disabled)},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"],standalone:!0});let i=e;return i})(),ede=(()=>{let e=class e{constructor(n,r,o){this._changeDetectorRef=n,this._elementRef=r,this._isMultiline=!1,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new pe,this._showAnimation="mat-mdc-tooltip-show",this._hideAnimation="mat-mdc-tooltip-hide",this._animationsDisabled=o==="NoopAnimations"}show(n){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},n)}hide(n){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},n)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:n}){(!n||!this._triggerElement.contains(n))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){let n=this._elementRef.nativeElement.getBoundingClientRect();return n.height>Kle&&n.width>=Jle}_handleAnimationEnd({animationName:n}){(n===this._showAnimation||n===this._hideAnimation)&&this._finalizeAnimation(n===this._showAnimation)}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(n){n?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(n){let r=this._tooltip.nativeElement,o=this._showAnimation,s=this._hideAnimation;if(r.classList.remove(n?s:o),r.classList.add(n?o:s),this._isVisible!==n&&(this._isVisible=n,this._changeDetectorRef.markForCheck()),n&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let a=getComputedStyle(r);(a.getPropertyValue("animation-duration")==="0s"||a.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=!0)}n&&this._onShow(),this._animationsDisabled&&(r.classList.add("_mat-animation-noopable"),this._finalizeAnimation(n))}};e.\u0275fac=function(r){return new(r||e)(M(Ne),M(Re),M(jn,8))},e.\u0275cmp=ce({type:e,selectors:[["mat-tooltip-component"]],viewQuery:function(r,o){if(r&1&&Ee(Wle,7),r&2){let s;be(s=ye())&&(o._tooltip=s.first)}},hostAttrs:["aria-hidden","true"],hostVars:2,hostBindings:function(r,o){r&1&&H("mouseleave",function(a){return o._handleMouseLeave(a)}),r&2&&Jt("zoom",o.isVisible()?1:null)},standalone:!0,features:[le],decls:4,vars:4,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend","ngClass"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(r,o){if(r&1){let s=ne();v(0,"div",1,0),H("animationend",function(c){return B(s),V(o._handleAnimationEnd(c))}),v(2,"div",2),S(3),b()()}r&2&&(re("mdc-tooltip--multiline",o._isMultiline),R("ngClass",o.tooltipClass),w(3),st(o.message))},dependencies:[cb],styles:['.mat-mdc-tooltip{position:relative;transform:scale(0);display:inline-flex}.mat-mdc-tooltip::before{content:"";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-surface{word-break:normal;overflow-wrap:anywhere;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center;will-change:transform,opacity;background-color:var(--mdc-plain-tooltip-container-color);color:var(--mdc-plain-tooltip-supporting-text-color);border-radius:var(--mdc-plain-tooltip-container-shape);font-family:var(--mdc-plain-tooltip-supporting-text-font);font-size:var(--mdc-plain-tooltip-supporting-text-size);font-weight:var(--mdc-plain-tooltip-supporting-text-weight);line-height:var(--mdc-plain-tooltip-supporting-text-line-height);letter-spacing:var(--mdc-plain-tooltip-supporting-text-tracking)}.mat-mdc-tooltip-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:right}.mat-mdc-tooltip-panel.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}'],encapsulation:2,changeDetection:0});let i=e;return i})();var Xt=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({providers:[qle],imports:[Py,Ae,oo,Ut,Ut,Jo]});let i=e;return i})();var tde=/^\s*(?!javascript:)(?:[\w+.-]+:|[^:/?#]*(?:[/?#]|$))/i;function nde(i){let e=!tde.test(i);return e}function ide(i){if(!nde(i))return i}function ha(i){return ide(i)}function dc(i,e){let t=ha(e);t!==void 0&&(i.href=t)}var EGe=typeof window<"u"?window.TrustedScriptURL:void 0;var FGe=typeof window<"u"?window.TrustedHTML:void 0;var tje=typeof window<"u"?window.TrustedScript:void 0;function yO(i,e){let t=ha(e);t!==void 0&&(i.href=t)}function Rde(i,e){if(i&1&&ee(0,"div",1),i&2){let t=I();Jt("top",t.top,"px")("left",t.left,"px")("width",t.width,"px")("height",t.height,"px")("border-color",t.borderColor)("background-color",t.bgColor)}}var mG=(()=>{class i{changeDetectorRef;borderColor;bgColor;startX=-1;startY=-1;endX=-1;endY=-1;isMac=typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);constructor(t){this.changeDetectorRef=t}start(t,n){t.preventDefault(),t.stopPropagation(),this.startX=t.offsetX,this.startY=t.offsetY,this.endX=this.startX,this.endY=this.startY;let r=yn(document,"mousemove"),o=yn(window,"mouseup"),s=0,a=0;eo([r]).pipe(Ze(o)).subscribe({next:([c])=>{s=c.offsetX-this.startX,a=c.offsetY-this.startY,this.endX=this.startX+s,this.endY=this.startY+a,this.changeDetectorRef.detectChanges()},complete:()=>{let c=Math.abs(s)<5&&Math.abs(a)<5;n(c,this.startX,this.startY,this.endX,this.endY),this.startX=-1,this.startY=-1,this.endX=-1,this.endY=-1,this.changeDetectorRef.detectChanges()}})}get top(){return Math.min(this.startY,this.endY)}get left(){return Math.min(this.startX,this.endX)}get width(){return Math.abs(this.endX-this.startX)}get height(){return Math.abs(this.endY-this.startY)}static \u0275fac=function(n){return new(n||i)(M(Ne))};static \u0275cmp=ce({type:i,selectors:[["drag-area"]],inputs:{borderColor:"borderColor",bgColor:"bgColor"},standalone:!0,features:[le],decls:1,vars:1,consts:[[1,"container",3,"top","left","width","height","border-color","background-color"],[1,"container"]],template:function(n,r){n&1&&$(0,Rde,1,12,"div",0),n&2&&oe(r.startX>0?0:-1)},dependencies:[Ae],styles:[`.container[_ngcontent-%COMP%]{position:absolute;z-index:5000;box-sizing:border-box;border-width:1px;border-style:solid;pointer-events:none} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();var xO=class{constructor(){this.expansionModel=new of(!0)}toggle(e){this.expansionModel.toggle(this._trackByValue(e))}expand(e){this.expansionModel.select(this._trackByValue(e))}collapse(e){this.expansionModel.deselect(this._trackByValue(e))}isExpanded(e){return this.expansionModel.isSelected(this._trackByValue(e))}toggleDescendants(e){this.expansionModel.isSelected(this._trackByValue(e))?this.collapseDescendants(e):this.expandDescendants(e)}collapseAll(){this.expansionModel.clear()}expandDescendants(e){let t=[e];t.push(...this.getDescendants(e)),this.expansionModel.select(...t.map(n=>this._trackByValue(n)))}collapseDescendants(e){let t=[e];t.push(...this.getDescendants(e)),this.expansionModel.deselect(...t.map(n=>this._trackByValue(n)))}_trackByValue(e){return this.trackBy?this.trackBy(e):e}},pC=class extends xO{constructor(e,t,n){super(),this.getLevel=e,this.isExpandable=t,this.options=n,this.options&&(this.trackBy=this.options.trackBy)}getDescendants(e){let t=this.dataNodes.indexOf(e),n=[];for(let r=t+1;rthis._trackByValue(e)))}};var CO=new me("CDK_TREE_NODE_OUTLET_NODE"),fC=(()=>{let e=class e{constructor(n,r){this.viewContainer=n,this._node=r}};e.\u0275fac=function(r){return new(r||e)(M(Zt),M(CO,8))},e.\u0275dir=Ve({type:e,selectors:[["","cdkTreeNodeOutlet",""]],standalone:!0});let i=e;return i})(),wO=class{constructor(e){this.$implicit=e}},mC=(()=>{let e=class e{constructor(n){this.template=n}};e.\u0275fac=function(r){return new(r||e)(M(Wn))},e.\u0275dir=Ve({type:e,selectors:[["","cdkTreeNodeDef",""]],inputs:{when:[0,"cdkTreeNodeDefWhen","when"]},standalone:!0});let i=e;return i})();var Cl=(()=>{let e=class e{get dataSource(){return this._dataSource}set dataSource(n){this._dataSource!==n&&this._switchDataSource(n)}constructor(n,r){this._differs=n,this._changeDetectorRef=r,this._onDestroy=new pe,this._levels=new Map,this.viewChange=new On({start:0,end:Number.MAX_VALUE})}ngOnInit(){this._dataDiffer=this._differs.find([]).create(this.trackBy),this.treeControl}ngOnDestroy(){this._nodeOutlet.viewContainer.clear(),this.viewChange.complete(),this._onDestroy.next(),this._onDestroy.complete(),this._dataSource&&typeof this._dataSource.disconnect=="function"&&this.dataSource.disconnect(this),this._dataSubscription&&(this._dataSubscription.unsubscribe(),this._dataSubscription=null)}ngAfterContentChecked(){let n=this._nodeDefs.filter(r=>!r.when);n.length>1,this._defaultNodeDef=n[0],this.dataSource&&this._nodeDefs&&!this._dataSubscription&&this._observeRenderChanges()}_switchDataSource(n){this._dataSource&&typeof this._dataSource.disconnect=="function"&&this.dataSource.disconnect(this),this._dataSubscription&&(this._dataSubscription.unsubscribe(),this._dataSubscription=null),n||this._nodeOutlet.viewContainer.clear(),this._dataSource=n,this._nodeDefs&&this._observeRenderChanges()}_observeRenderChanges(){let n;WH(this._dataSource)?n=this._dataSource.connect(this):Fl(this._dataSource)?n=this._dataSource:Array.isArray(this._dataSource)&&(n=Ke(this._dataSource)),n&&(this._dataSubscription=n.pipe(Ze(this._onDestroy)).subscribe(r=>this.renderNodeChanges(r)))}renderNodeChanges(n,r=this._dataDiffer,o=this._nodeOutlet.viewContainer,s){let a=r.diff(n);a&&(a.forEachOperation((c,l,d)=>{if(c.previousIndex==null)this.insertNode(n[d],d,o,s);else if(d==null)o.remove(l),this._levels.delete(c.item);else{let u=o.get(l);o.move(u,d)}}),this._changeDetectorRef.detectChanges())}_getNodeDef(n,r){if(this._nodeDefs.length===1)return this._nodeDefs.first;let o=this._nodeDefs.find(s=>s.when&&s.when(r,n))||this._defaultNodeDef;return o}insertNode(n,r,o,s){let a=this._getNodeDef(n,r),c=new wO(n);this.treeControl.getLevel?c.level=this.treeControl.getLevel(n):typeof s<"u"&&this._levels.has(s)?c.level=this._levels.get(s)+1:c.level=0,this._levels.set(n,c.level),(o||this._nodeOutlet.viewContainer).createEmbeddedView(a.template,c,r),Cu.mostRecentTreeNode&&(Cu.mostRecentTreeNode.data=n)}};e.\u0275fac=function(r){return new(r||e)(M(td),M(Ne))},e.\u0275cmp=ce({type:e,selectors:[["cdk-tree"]],contentQueries:function(r,o,s){if(r&1&&_i(s,mC,5),r&2){let a;be(a=ye())&&(o._nodeDefs=a)}},viewQuery:function(r,o){if(r&1&&Ee(fC,7),r&2){let s;be(s=ye())&&(o._nodeOutlet=s.first)}},hostAttrs:["role","tree",1,"cdk-tree"],inputs:{dataSource:"dataSource",treeControl:"treeControl",trackBy:"trackBy"},exportAs:["cdkTree"],standalone:!0,features:[le],decls:1,vars:0,consts:[["cdkTreeNodeOutlet",""]],template:function(r,o){r&1&&Ki(0,0)},dependencies:[fC],encapsulation:2});let i=e;return i})(),Cu=(()=>{let e=class e{get role(){return"treeitem"}set role(n){this._elementRef.nativeElement.setAttribute("role",n)}get data(){return this._data}set data(n){n!==this._data&&(this._data=n,this._setRoleFromData(),this._dataChanges.next())}get isExpanded(){return this._tree.treeControl.isExpanded(this._data)}get level(){return this._tree.treeControl.getLevel?this._tree.treeControl.getLevel(this._data):this._parentNodeAriaLevel}constructor(n,r){this._elementRef=n,this._tree=r,this._destroyed=new pe,this._dataChanges=new pe,this._changeDetectorRef=te(Ne),e.mostRecentTreeNode=this,this.role="treeitem"}ngOnInit(){this._parentNodeAriaLevel=Ade(this._elementRef.nativeElement),this._elementRef.nativeElement.setAttribute("aria-level",`${this.level+1}`),this._tree.treeControl.expansionModel.changed.pipe(Je(()=>this.isExpanded),xc()).subscribe(()=>{this._changeDetectorRef.markForCheck()})}ngOnDestroy(){e.mostRecentTreeNode===this&&(e.mostRecentTreeNode=null),this._dataChanges.complete(),this._destroyed.next(),this._destroyed.complete()}focus(){this._elementRef.nativeElement.focus()}_setRoleFromData(){!this._tree.treeControl.isExpandable&&this._tree.treeControl.getChildren,this.role="treeitem"}};e.mostRecentTreeNode=null,e.\u0275fac=function(r){return new(r||e)(M(Re),M(Cl))},e.\u0275dir=Ve({type:e,selectors:[["cdk-tree-node"]],hostAttrs:[1,"cdk-tree-node"],hostVars:1,hostBindings:function(r,o){r&2&&Ye("aria-expanded",o.isExpanded)},inputs:{role:"role"},exportAs:["cdkTreeNode"],standalone:!0});let i=e;return i})();function Ade(i){let e=i.parentElement;for(;e&&!Nde(e);)e=e.parentElement;return e?e.classList.contains("cdk-nested-tree-node")?ni(e.getAttribute("aria-level")):0:-1}function Nde(i){let e=i.classList;return!!(e?.contains("cdk-nested-tree-node")||e?.contains("cdk-tree"))}var kde=/([A-Za-z%]+)$/,SO=(()=>{let e=class e{get level(){return this._level}set level(n){this._setLevelInput(n)}get indent(){return this._indent}set indent(n){this._setIndentInput(n)}constructor(n,r,o,s){this._treeNode=n,this._tree=r,this._element=o,this._dir=s,this._destroyed=new pe,this.indentUnits="px",this._indent=40,this._setPadding(),s&&s.change.pipe(Ze(this._destroyed)).subscribe(()=>this._setPadding(!0)),n._dataChanges.subscribe(()=>this._setPadding())}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_paddingIndent(){let n=this._treeNode.data&&this._tree.treeControl.getLevel?this._tree.treeControl.getLevel(this._treeNode.data):null,r=this._level==null?n:this._level;return typeof r=="number"?`${r*this._indent}${this.indentUnits}`:null}_setPadding(n=!1){let r=this._paddingIndent();if(r!==this._currentPadding||n){let o=this._element.nativeElement,s=this._dir&&this._dir.value==="rtl"?"paddingRight":"paddingLeft",a=s==="paddingLeft"?"paddingRight":"paddingLeft";o.style[s]=r||"",o.style[a]="",this._currentPadding=r}}_setLevelInput(n){this._level=isNaN(n)?null:n,this._setPadding()}_setIndentInput(n){let r=n,o="px";if(typeof n=="string"){let s=n.split(kde);r=s[0],o=s[1]||o}this.indentUnits=o,this._indent=ni(r),this._setPadding()}};e.\u0275fac=function(r){return new(r||e)(M(Cu),M(Cl),M(Re),M(di,8))},e.\u0275dir=Ve({type:e,selectors:[["","cdkTreeNodePadding",""]],inputs:{level:[2,"cdkTreeNodePadding","level",ni],indent:[0,"cdkTreeNodePaddingIndent","indent"]},standalone:!0,features:[nn]});let i=e;return i})(),MO=(()=>{let e=class e{constructor(n,r){this._tree=n,this._treeNode=r,this.recursive=!1}_toggle(n){this.recursive?this._tree.treeControl.toggleDescendants(this._treeNode.data):this._tree.treeControl.toggle(this._treeNode.data),n.stopPropagation()}};e.\u0275fac=function(r){return new(r||e)(M(Cl),M(Cu))},e.\u0275dir=Ve({type:e,selectors:[["","cdkTreeNodeToggle",""]],hostBindings:function(r,o){r&1&&H("click",function(a){return o._toggle(a)})},inputs:{recursive:[2,"cdkTreeNodeToggleRecursive","recursive",et]},standalone:!0,features:[nn]});let i=e;return i})();var gG=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({});let i=e;return i})();var vG=(()=>{let e=class e extends Cu{constructor(n,r,o){super(n,r),this.disabled=!1,this.tabIndex=Number(o)||0}ngOnInit(){super.ngOnInit()}ngOnDestroy(){super.ngOnDestroy()}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Cl),Lr("tabindex"))},e.\u0275dir=Ve({type:e,selectors:[["mat-tree-node"]],hostAttrs:[1,"mat-tree-node"],inputs:{disabled:[2,"disabled","disabled",et],tabIndex:[2,"tabIndex","tabIndex",n=>n==null?0:ni(n)]},exportAs:["matTreeNode"],standalone:!0,features:[Ft([{provide:Cu,useExisting:e}]),nn,sn]});let i=e;return i})(),bG=(()=>{let e=class e extends mC{};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Li(e)))(o||e)}})(),e.\u0275dir=Ve({type:e,selectors:[["","matTreeNodeDef",""]],inputs:{when:[0,"matTreeNodeDefWhen","when"],data:[0,"matTreeNode","data"]},standalone:!0,features:[Ft([{provide:mC,useExisting:e}]),sn]});let i=e;return i})();var yG=(()=>{let e=class e extends SO{get level(){return this._level}set level(n){this._setLevelInput(n)}get indent(){return this._indent}set indent(n){this._setIndentInput(n)}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Li(e)))(o||e)}})(),e.\u0275dir=Ve({type:e,selectors:[["","matTreeNodePadding",""]],inputs:{level:[2,"matTreeNodePadding","level",ni],indent:[0,"matTreeNodePaddingIndent","indent"]},standalone:!0,features:[Ft([{provide:SO,useExisting:e}]),nn,sn]});let i=e;return i})(),_G=(()=>{let e=class e{constructor(n,r){this.viewContainer=n,this._node=r}};e.\u0275fac=function(r){return new(r||e)(M(Zt),M(CO,8))},e.\u0275dir=Ve({type:e,selectors:[["","matTreeNodeOutlet",""]],standalone:!0,features:[Ft([{provide:fC,useExisting:e}])]});let i=e;return i})(),xG=(()=>{let e=class e extends Cl{constructor(){super(...arguments),this._nodeOutlet=void 0}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Li(e)))(o||e)}})(),e.\u0275cmp=ce({type:e,selectors:[["mat-tree"]],viewQuery:function(r,o){if(r&1&&Ee(_G,7),r&2){let s;be(s=ye())&&(o._nodeOutlet=s.first)}},hostAttrs:["role","tree",1,"mat-tree"],exportAs:["matTree"],standalone:!0,features:[Ft([{provide:Cl,useExisting:e}]),sn,le],decls:1,vars:0,consts:[["matTreeNodeOutlet",""]],template:function(r,o){r&1&&Ki(0,0)},dependencies:[_G],styles:[".mat-tree{display:block;background-color:var(--mat-tree-container-background-color)}.mat-tree-node,.mat-nested-tree-node{color:var(--mat-tree-node-text-color);font-family:var(--mat-tree-node-text-font);font-size:var(--mat-tree-node-text-size);font-weight:var(--mat-tree-node-text-weight)}.mat-tree-node{display:flex;align-items:center;flex:1;word-wrap:break-word;min-height:var(--mat-tree-node-min-height)}.mat-nested-tree-node{border-bottom-width:0}"],encapsulation:2});let i=e;return i})(),wG=(()=>{let e=class e extends MO{};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Li(e)))(o||e)}})(),e.\u0275dir=Ve({type:e,selectors:[["","matTreeNodeToggle",""]],inputs:{recursive:[0,"matTreeNodeToggleRecursive","recursive"]},standalone:!0,features:[Ft([{provide:MO,useExisting:e}]),sn]});let i=e;return i})();var CG=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({imports:[gG,Ut,Ut]});let i=e;return i})(),gC=class{constructor(e,t,n,r){this.transformFunction=e,this.getLevel=t,this.isExpandable=n,this.getChildren=r}_flattenNode(e,t,n,r){let o=this.transformFunction(e,t);if(n.push(o),this.isExpandable(o)){let s=this.getChildren(e);s&&(Array.isArray(s)?this._flattenChildren(s,t,n,r):s.pipe(_n(1)).subscribe(a=>{this._flattenChildren(a,t,n,r)}))}return n}_flattenChildren(e,t,n,r){e.forEach((o,s)=>{let a=r.slice();a.push(s!=e.length-1),this._flattenNode(o,t+1,n,a)})}flattenNodes(e){let t=[];return e.forEach(n=>this._flattenNode(n,0,t,[])),t}expandFlattenedNodes(e,t){let n=[],r=[];return r[0]=!0,e.forEach(o=>{let s=!0;for(let a=0;a<=this.getLevel(o);a++)s=s&&r[a];s&&n.push(o),this.isExpandable(o)&&(r[this.getLevel(o)+1]=t.isExpanded(o))}),n}},_C=class extends oC{get data(){return this._data.value}set data(e){this._data.next(e),this._flattenedData.next(this._treeFlattener.flattenNodes(this.data)),this._treeControl.dataNodes=this._flattenedData.value}constructor(e,t,n){super(),this._treeControl=e,this._treeFlattener=t,this._flattenedData=new On([]),this._expandedData=new On([]),this._data=new On([]),n&&(this.data=n)}connect(e){return Zn(e.viewChange,this._treeControl.expansionModel.changed,this._flattenedData).pipe(Je(()=>(this._expandedData.next(this._treeFlattener.expandFlattenedNodes(this._flattenedData.value,this._treeControl)),this._expandedData.value)))}disconnect(){}};var X_=200,SG=Kt({opacity:0}),MG=Kt({opacity:1}),Bde=`${X_}ms ${MT.DECELERATION_CURVE}`,Vde=`${X_}ms ${MT.STANDARD_CURVE}`,EG={bubbleContainer:li("bubbleContainer",[vi("void, hidden",SG),vi("visible",MG),An("void => *, * => visible",Rn(Bde,MG)),An("* => void, * => hidden",Rn(Vde,SG))])};function zde(i,e){i&1&&ee(0,"a",1)}var IG=(()=>{class i extends da{portalOutlet;animationState="hidden";changeDetector=te(Ne);attachComponentPortal(t){return this.portalOutlet.attachComponentPortal(t)}attachTemplatePortal(t){return this.portalOutlet.attachTemplatePortal(t)}toggleAnimation(t){this.animationState=t?"visible":"hidden",this.changeDetector.markForCheck()}static \u0275fac=(()=>{let t;return function(r){return(t||(t=Li(i)))(r||i)}})();static \u0275cmp=ce({type:i,selectors:[["bubble-container"]],viewQuery:function(n,r){if(n&1&&Ee(es,7),n&2){let o;be(o=ye())&&(r.portalOutlet=o.first)}},hostAttrs:["role","dialog",1,"bubble-container"],hostVars:1,hostBindings:function(n,r){n&2&&Jf("@bubbleContainer",r.animationState)},standalone:!0,features:[sn,le],decls:2,vars:0,consts:[["cdkPortalOutlet",""],["cdkFocusInitial","","tabindex","0"]],template:function(n,r){n&1&&(v(0,"div"),$(1,zde,1,0,"ng-template",0),b())},dependencies:[Es,es],styles:[`.bubble-container{box-shadow:0 1px 2px #3c40434d,0 1px 3px 1px #3c404326;border-radius:8px;overflow:auto;background:#fff;color:#000000de;font-family:Google Sans Text,Arial,Helvetica,sans-serif;font-size:.875rem;font-weight:400;line-height:1.25rem;letter-spacing:normal} -/** - * @license - * Copyright 2024 The Model Explorer Authors. All Rights Reserved. - * - * Licensed under the Apache License, Version 2.0 (the "License"); - * you may not use this file except in compliance with the License. - * You may obtain a copy of the License at - * - * http://www.apache.org/licenses/LICENSE-2.0 - * - * Unless required by applicable law or agreed to in writing, software - * distributed under the License is distributed on an "AS IS" BASIS, - * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. - * See the License for the specific language governing permissions and - * limitations under the License. - * ============================================================================== - */ -`],encapsulation:2,data:{animation:[EG.bubbleContainer]},changeDetection:0})}return i})();var Ude=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top",offsetY:8},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",offsetY:-8},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",offsetY:-8},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top",offsetY:8}],Hde={minWidth:220,maxWidth:420,minHeight:64,maxHeight:420},vC=(()=>{class i{ngZone;overlay;elementRef;viewContainerRef;document;focusTrapFactory;injector;overlayRef;portal;disabledInternal=!1;panelClassInternal;set dialog(t){t&&(t instanceof Wn?this.setPortal(new Zr(t,this.viewContainerRef)):this.setPortal(new Ai(t,this.viewContainerRef)))}set disabled(t){this.disabledInternal=t,this.disabledInternal&&this.closeDialog()}get disabled(){return this.disabledInternal}overlaySize;overlayPositions;overlayDimensions=Hde;set panelClass(t){this.panelClassInternal!==t&&(this.panelClassInternal&&this.overlayRef?.removePanelClass(this.panelClassInternal),t&&this.overlayRef?.addPanelClass(t),this.panelClassInternal=t)}opened=new Ie;closed=new Ie;destroyed=new ya;openStatusChange=new On(!1);openings=this.openStatusChange.pipe(qt(t=>t&&!this.disabled));bubbleContainerRef;focusTrap;elementFocusedBeforeDialogWasOpened=void 0;constructor(t,n,r,o,s,a,c){this.ngZone=t,this.overlay=n,this.elementRef=r,this.viewContainerRef=o,this.document=s,this.focusTrapFactory=a,this.injector=c,this.attachKeyboardCloseEventListeners(r.nativeElement)}ngOnInit(){}ngOnDestroy(){this.closeDialog(),this.openStatusChange.complete(),this.destroyed.next(),this.destroyed.complete(),this.overlayRef&&this.overlayRef.dispose()}setPortal(t){this.portal=t}openDialog(){if(this.disabled||this.overlayRef?.hasAttached())return;let t=this.portal;t!=null&&this.ngZone.run(()=>{this.bubbleContainerRef=this.createAndAttachBubbleContainer(),this.bubbleContainerRef.instance.attach(t);let n=this.bubbleContainerRef.location.nativeElement;this.attachMouseEventListeners(n),this.attachKeyboardCloseEventListeners(n),this.trapFocus(n),this.bubbleContainerRef.instance.toggleAnimation(!0),this.opened.observers.length&&setTimeout(()=>{this.opened.emit()},X_)})}closeDialog(){this.overlayRef?.hasAttached()&&(this.bubbleContainerRef.instance.toggleAnimation(!1),setTimeout(()=>{this.ngZone.run(()=>{this.overlayRef&&this.overlayRef.detach(),this.cleanupFocusTrap(),this.restoreFocus(),this.cleanupBubbleContainer(),this.closed.emit()})},X_))}trapFocus(t){let n=this.document.activeElement,r=this.elementRef.nativeElement;n&&n===r&&(this.document&&(this.elementFocusedBeforeDialogWasOpened=this.document.activeElement),this.focusTrap=this.focusTrapFactory.create(t),this.focusTrap.attachAnchors())}focusInitialElement(){this.focusTrap&&this.focusTrap.focusInitialElementWhenReady()}cleanupFocusTrap(){this.focusTrap&&(this.focusTrap.destroy(),this.focusTrap=void 0)}restoreFocus(){let t=this.elementFocusedBeforeDialogWasOpened;if(!t||typeof t.focus!="function")return;let n=this.bubbleContainerRef?.location.nativeElement,r=this.document.activeElement;!r||!n?.contains(r)||(t.focus(),this.elementFocusedBeforeDialogWasOpened=void 0)}cleanupBubbleContainer(){this.bubbleContainerRef&&(this.bubbleContainerRef.destroy(),this.bubbleContainerRef=void 0)}createPositionStrategy(t){return this.overlay.position().flexibleConnectedTo(this.elementRef).withPositions(t).setOrigin(this.elementRef)}createScrollStrategy(){return this.overlay.scrollStrategies.close()}createAndAttachBubbleContainer(){let t=vt.create({parent:this.injector,providers:[]}),n=new Ai(IG,null,t);return this.overlayRef==null&&(this.overlayRef=this.overlay.create(this.createOverlayConfig(Ude))),this.overlaySize&&this.overlayRef.updateSize(this.overlaySize),this.overlayPositions&&this.overlayPositions.length>0&&this.overlayRef.updatePositionStrategy(this.createPositionStrategy(this.overlayPositions)),this.overlayRef.attach(n)}static \u0275fac=function(n){return new(n||i)(M(Fe),M($t),M(Re),M(Zt),M(Document),M(Bh),M(vt))};static \u0275dir=Ve({type:i,inputs:{overlaySize:"overlaySize",overlayPositions:"overlayPositions",overlayDimensions:"overlayDimensions",panelClass:"panelClass"},outputs:{opened:"opened",closed:"closed"},standalone:!0})}return i})();var Gde=500,Hn=(()=>{class i extends vC{hoverDelayMs=Gde;activity=new pe;constructor(t,n,r,o,s,a,c){super(t,n,r,o,s,a,c),this.attachMouseEventListeners(r.nativeElement)}ngOnInit(){super.ngOnInit(),this.listenForOpenEvents(this.hoverDelayMs)}listenForOpenEvents(t){this.openStatusChange.pipe(Of(()=>this.activity.pipe(Oo(t)))).pipe(Ze(this.destroyed)).subscribe(r=>{r?this.openDialog():this.closeDialog()})}attachMouseEventListeners(t){this.ngZone.runOutsideAngular(()=>{yn(t,"mouseenter").pipe(Ze(this.destroyed)).subscribe(()=>{this.openingDialog()}),yn(t,"click").pipe(Ze(this.destroyed)).subscribe(n=>{n.target.closest("[bubbleClose]")?this.closingDialog():(this.openingDialog(),this.openDialog())}),yn(t,"mouseleave").pipe(Ze(this.destroyed)).subscribe(()=>{this.closingDialog()}),yn(t,"mousemove").pipe(Ze(this.destroyed)).subscribe(()=>{this.activity.next()})})}attachKeyboardCloseEventListeners(t){this.ngZone.runOutsideAngular(()=>{yn(t,"keydown").pipe(Ze(this.destroyed)).subscribe(n=>{switch(n.keyCode){case 27:this.overlayRef?.hasAttached()&&n.stopPropagation(),this.closeDialog();return;default:return}})})}openingDialog(){this.disabled||(this.openStatusChange.next(!0),this.activity.next())}closingDialog(){this.openStatusChange.next(!1),this.activity.next()}createOverlayConfig(t){return new fi(yt(Z({},this.overlayDimensions),{positionStrategy:super.createPositionStrategy(t),scrollStrategy:this.createScrollStrategy(),panelClass:this.panelClassInternal}))}static \u0275fac=function(n){return new(n||i)(M(Fe),M($t),M(Re),M(Zt),M(Xe),M(Bh),M(vt))};static \u0275dir=Ve({type:i,selectors:[["","bubble",""]],hostAttrs:[1,"bubble"],inputs:{dialog:[0,"bubble","dialog"],disabled:[0,"bubbleDisabled","disabled"],hoverDelayMs:"hoverDelayMs"},exportAs:["bubble"],standalone:!0,features:[sn]})}return i})();var bC=[li("transformPanel",[vi("void",Kt({opacity:0,transform:"scale(1, 0.8)"})),An("void => showing",Rn("120ms cubic-bezier(0, 0, 0.2, 1)",Kt({opacity:1,transform:"scale(1, 1)"}))),An("* => void",Rn("100ms linear",Kt({opacity:0})))])];var jde=["tree"],DG=i=>({node:i});function Wde(i,e){if(i&1&&S(0),i&2){let t=I().$implicit;XE(" ",t.boldLabel," (",t.label,") ")}}function $de(i,e){if(i&1&&S(0),i&2){let t=I().$implicit;Se(" ",t.label," ")}}function qde(i,e){i&1&&Ki(0)}function Yde(i,e){if(i&1&&$(0,qde,1,0,"ng-container",14),i&2){let t=I().$implicit;I();let n=ve(5);R("ngTemplateOutlet",n)("ngTemplateOutletContext",Ac(2,DG,t))}}function Xde(i,e){if(i&1&&(v(0,"tr")(1,"td",17)(2,"mat-icon",18),S(3,"circle"),b(),S(4),b(),v(5,"td",19),S(6),b()()),i&2){let t=e.$implicit,n=I(2).$implicit,r=I();re("search-match",r.isSearchMatched(n.metadata[t])),w(4),Se(" ",t,""),w(2),st(n.metadata[t])}}function Zde(i,e){if(i&1&&(v(0,"table",15),$(1,Xde,7,4,"tr",16),b()),i&2){let t=I().$implicit,n=I();w(),R("ngForOf",n.getSortedMetadataKeys(t))}}function Qde(i,e){if(i&1&&(v(0,"div",20)(1,"mat-icon",21),S(2,"my_location"),b()()),i&2){let t=I(2);R("matTooltip",t.locatorTooltip)("matTooltipPosition",t.tooltipPosition)}}function Kde(i,e){if(i&1&&(v(0,"div",23),S(1),b()),i&2){let t=I(3);w(),Se(" Showing at most ",t.getMaxConstValueCount()," elements ")}}function Jde(i,e){if(i&1&&(v(0,"div",22),$(1,Kde,2,1,"div",23),v(2,"div",24),S(3),b()()),i&2){let t=I().$implicit,n=I();w(),oe(n.getMaxConstValueCount()!==0?1:-1),w(2),st(n.getConstValues(t))}}function eue(i,e){if(i&1){let t=ne();v(0,"mat-tree-node",6)(1,"div",7),H("click",function(r){let o=B(t).$implicit,s=I();return V(s.handleLocateNode(o,r.altKey))}),v(2,"div",8)(3,"div",9)(4,"div",10)(5,"span",11),$(6,Wde,1,2)(7,$de,1,1),b(),$(8,Yde,1,4,"ng-container"),b()(),$(9,Zde,2,1,"table",12),b(),$(10,Qde,3,2,"div",13),b(),$(11,Jde,4,2,"ng-template",null,2,Tt),b()}if(i&2){let t=e.$implicit,n=ve(12),r=I();re("has-locator",t.showLocator)("has-values",r.showHoverForValuesLabel(t))("highlight",t.highlight)("has-metadata",r.hasMetadata(t)),R("bubble",n)("overlaySize",r.constValuesPopupSize)("overlayPositions",r.constValuesPopupPosition)("hoverDelayMs",50)("bubbleDisabled",!r.showHoverForValuesLabel(t))("matTreeNodePaddingIndent",r.treeItemPadding),Ye("data-id",t.nodeId),w(2),re("has-extra-data",t.extraData!=null),w(3),re("color-bold",r.colorBoldNodeLabel)("search-match",r.isSearchMatched(t.label,t.boldLabel)),w(),oe(t.boldLabel?6:7),w(2),oe(t.extraData?8:-1),w(),R("ngIf",r.hasMetadata(t)),w(),R("ngIf",t.showLocator&&r.showLocator)}}function tue(i,e){i&1&&Ki(0)}function nue(i,e){if(i&1&&$(0,tue,1,0,"ng-container",14),i&2){let t=I().$implicit;I();let n=ve(5);R("ngTemplateOutlet",n)("ngTemplateOutletContext",Ac(2,DG,t))}}function iue(i,e){if(i&1&&(v(0,"div",20)(1,"mat-icon",21),S(2,"my_location"),b()()),i&2){let t=I(2);R("matTooltip",t.locatorTooltip)("matTooltipPosition",t.tooltipPosition)}}function rue(i,e){if(i&1){let t=ne();v(0,"mat-tree-node",25)(1,"div",26),H("click",function(r){let o=B(t).$implicit,s=I();return V(s.handleLocateNode(o,r.altKey))}),v(2,"div",9)(3,"button",27)(4,"mat-icon",28),S(5),b()(),v(6,"div",10),S(7),$(8,nue,1,4,"ng-container"),b()(),$(9,iue,3,2,"div",13),b()()}if(i&2){let t=e.$implicit,n=I();re("has-locator",t.showLocator),R("matTreeNodePaddingIndent",n.treeItemPadding),Ye("data-id",t.nodeId),w(),re("highlight",t.highlightGroupLabel),w(),re("has-extra-data",t.extraData!=null),w(),Ye("aria-label","Toggle "+t.label),w(2),Se(" ",n.treeControl.isExpanded(t)?"keyboard_arrow_down":"chevron_right"," "),w(2),Se(" ",t.label," "),w(),oe(t.extraData?8:-1),w(),R("ngIf",t.showLocator&&n.showLocator)}}function oue(i,e){if(i&1&&(v(0,"div",30)(1,"mat-icon"),S(2),b()()),i&2){let t=e.$implicit,n=I(2);R("matTooltip",n.getExtraLabelTooltip(t)),w(2),st(t)}}function sue(i,e){if(i&1&&(v(0,"div",29),rn(1,oue,3,2,"div",30,gr),b()),i&2){let t=e.node;w(),on(t.extraData.matchTypes)}}var Sl=(()=>{class i{appService;changeDetectorRef;data;solidBackground=!1;rendererId="";tooltipPosition="left";showLocator=!0;colorBoldNodeLabel=!1;onClose=new Ie;tree;constValuesPopupSize={minWidth:100};constValuesPopupPosition=[{originX:"start",originY:"top",overlayX:"end",overlayY:"top"}];locatorTooltip=`Click: locate -Alt+click: select`;transformer=(t,n)=>({nodeId:t.nodeId,node:t.node,expandable:!!t.children&&t.children.length>0,label:t.label,boldLabel:t.boldLabel,level:n,showLocator:t.showLocator,highlight:t.highlight,metadata:t.metadata,extraData:t.extraData});curSearchMatches=[];treeItemPadding=8;treeControl=new pC(t=>t.level,t=>t.expandable);treeFlattener=new gC(this.transformer,t=>t.level,t=>t.expandable,t=>t.children);dataSource=new _C(this.treeControl,this.treeFlattener);constructor(t,n){this.appService=t,this.changeDetectorRef=n}ngOnChanges(t){this.data!=null&&(this.dataSource.data=this.data,this.treeControl.expandAll())}updateData(t){this.data=t,this.dataSource.data=this.data,this.treeControl.expandAll(),this.changeDetectorRef.markForCheck()}updateSearchResults(t){this.curSearchMatches=t,this.changeDetectorRef.markForCheck()}handleLocateNode(t,n){t.showLocator&&(this.appService.curToLocateNodeInfo.set({nodeId:t.nodeId||"",rendererId:this.rendererId,isGroupNode:t.expandable,select:n}),this.onClose.emit({}))}hasChild(t,n){return n.expandable}hasMetadata(t){return t.metadata!=null&&Object.keys(t.metadata).length>0}getSortedMetadataKeys(t){return Object.keys(t.metadata||{}).filter(n=>!n.startsWith("__")).sort()}showHoverForValuesLabel(t){let n=t.node;if(!n)return!1;if(St(n)){let r=n.attrs||{};if(r[Fa])return r[Fa]!=="DATA_ELIDED"}return!1}getMaxConstValueCount(){return this.appService.config()?.maxConstValueCount??0}getConstValues(t){let n=t.node;return n&&St(n)?(n.attrs||{})[Fa]||"":""}getExtraLabelTooltip(t){switch(t){case xt.NODE_LABEL:return"Node label matched";case xt.ATTRIBUTE:return"Node attribute(s) matched";case xt.INPUT_METADATA:return"Input(s) matched";case xt.OUTPUT_METADATA:return"Output(s) matched";default:return""}}isSearchMatched(t,n){return this.curSearchMatches?this.curSearchMatches.find(r=>r.matchedText===t||r.matchedText===n)!=null:!1}static \u0275fac=function(n){return new(n||i)(M(at),M(Ne))};static \u0275cmp=ce({type:i,selectors:[["io-tree"]],viewQuery:function(n,r){if(n&1&&Ee(jde,5),n&2){let o;be(o=ye())&&(r.tree=o.first)}},inputs:{data:"data",solidBackground:"solidBackground",rendererId:"rendererId",tooltipPosition:"tooltipPosition",showLocator:"showLocator",colorBoldNodeLabel:"colorBoldNodeLabel"},outputs:{onClose:"onClose"},standalone:!0,features:[dn,le],decls:6,vars:7,consts:[["tree",""],["matchTypes",""],["constValuesPopup",""],[1,"io-tree",3,"dataSource","treeControl"],["class","leaf","matTreeNodePadding","",3,"has-locator","has-values","highlight","has-metadata","bubble","overlaySize","overlayPositions","hoverDelayMs","bubbleDisabled","matTreeNodePaddingIndent",4,"matTreeNodeDef"],["matTreeNodePadding","",3,"has-locator","matTreeNodePaddingIndent",4,"matTreeNodeDef","matTreeNodeDefWhen"],["matTreeNodePadding","",1,"leaf",3,"bubble","overlaySize","overlayPositions","hoverDelayMs","bubbleDisabled","matTreeNodePaddingIndent"],[1,"edge-node",3,"click"],[1,"label-and-metadata"],[1,"label-container"],[1,"label"],[1,"node-label"],["class","metadata-table",4,"ngIf"],["class","locator-container","matTooltipClass","multiline-tooltip-left",3,"matTooltip","matTooltipPosition",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"metadata-table"],[3,"search-match",4,"ngFor","ngForOf"],[1,"key"],[1,"bullet"],[1,"value"],["matTooltipClass","multiline-tooltip-left",1,"locator-container",3,"matTooltip","matTooltipPosition"],[1,"locator-icon"],[1,"model-explorer-const-values-popup"],[1,"values-count-msg"],[1,"content"],["matTreeNodePadding","",3,"matTreeNodePaddingIndent"],[1,"expandable-tree-node",3,"click"],["mat-icon-button","","matTreeNodeToggle","",1,"expand-icon-button"],[1,"expander"],[1,"match-types-container"],[1,"extra-label-container",3,"matTooltip"]],template:function(n,r){n&1&&(v(0,"mat-tree",3,0),$(2,eue,13,25,"mat-tree-node",4)(3,rue,10,13,"mat-tree-node",5),b(),$(4,sue,3,0,"ng-template",null,1,Tt)),n&2&&(re("solid-background",r.solidBackground),R("dataSource",r.dataSource)("treeControl",r.treeControl)("@transformPanel","showing")("@.disabled",!r.solidBackground),w(3),R("matTreeNodeDefWhen",r.hasChild))},dependencies:[Hn,Ae,Mi,Tn,Gs,xn,Wo,tt,pt,Xt,Yn,CG,bG,yG,wG,xG,vG],styles:[`.io-tree[_ngcontent-%COMP%]{background-color:transparent;padding-top:4px}.io-tree.solid-background[_ngcontent-%COMP%]{transform-origin:top center;background-color:#fff;border:1px solid #ccc;border-radius:4px;padding-bottom:8px;min-width:270px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.io-tree[_ngcontent-%COMP%] mat-tree-node.has-locator[_ngcontent-%COMP%], .io-tree[_ngcontent-%COMP%] mat-tree-node.has-values[_ngcontent-%COMP%]{cursor:pointer}.io-tree[_ngcontent-%COMP%] mat-tree-node.has-locator[_ngcontent-%COMP%]:hover, .io-tree[_ngcontent-%COMP%] mat-tree-node.has-values[_ngcontent-%COMP%]:hover{background-color:#f3f3f3}.io-tree[_ngcontent-%COMP%] mat-tree-node.highlight[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:#00639b;font-weight:500}.io-tree[_ngcontent-%COMP%] mat-tree-node[_ngcontent-%COMP%]:not(:last-child).has-metadata.leaf{margin-bottom:6px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;width:100%;box-sizing:border-box;padding-right:12px;padding-left:27px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%]:hover .locator-container[_ngcontent-%COMP%]{opacity:.8}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata.has-extra-data[_ngcontent-%COMP%]{width:100%}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata.has-extra-data[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{width:100%;justify-content:space-between}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%], .io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%] .node-label.color-bold[_ngcontent-%COMP%]{color:#00639b;font-weight:500}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%] .node-label.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .hover-for-values-label[_ngcontent-%COMP%]{text-decoration:underline;text-decoration-style:dotted;color:#999;margin-left:8px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%]{border-spacing:0;border-collapse:collapse;padding:0;font-size:11px;margin-top:2px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{vertical-align:text-top}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] mat-icon.bullet[_ngcontent-%COMP%]{font-size:4px;width:5px;height:5px;color:#bbb;margin-right:2px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.key[_ngcontent-%COMP%]{color:#999;padding-right:4px;white-space:nowrap;line-height:12px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.value[_ngcontent-%COMP%]{line-height:12px}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%], .io-tree[_ngcontent-%COMP%] mat-tree-node[_ngcontent-%COMP%]{font-size:13px;min-height:22px;word-break:break-word}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%]{color:#999;display:flex;align-items:center;justify-content:space-between;width:100%;box-sizing:border-box;padding-right:12px;padding-left:4px}.io-tree[_ngcontent-%COMP%] .expandable-tree-node.highlight[_ngcontent-%COMP%]{color:#000000de}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%]:hover .locator-container[_ngcontent-%COMP%]{opacity:.8}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%] mat-icon.expander[_ngcontent-%COMP%]{color:#999}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%]{display:flex;align-items:center}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%] .label-container.has-extra-data[_ngcontent-%COMP%]{width:100%}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%] .label-container.has-extra-data[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{flex-grow:1;justify-content:space-between}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center}.io-tree[_ngcontent-%COMP%] .expand-icon-button[_ngcontent-%COMP%]{padding:0;width:24px;height:24px;display:flex;align-items:center;justify-content:center}.io-tree[_ngcontent-%COMP%] .expand-icon-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;margin-top:6px}.io-tree[_ngcontent-%COMP%] .locator-container[_ngcontent-%COMP%]{height:18px;opacity:.5;cursor:pointer;display:flex;align-items:center}.io-tree[_ngcontent-%COMP%] .locator-container[_ngcontent-%COMP%] mat-icon.locator-icon[_ngcontent-%COMP%]{color:#333;font-size:16px;width:16px;height:16px}.io-tree[_ngcontent-%COMP%] .locator-container[_ngcontent-%COMP%]:hover{opacity:.8}.io-tree[_ngcontent-%COMP%] .match-types-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-self:center;gap:2px;margin-left:8px}.io-tree[_ngcontent-%COMP%] .extra-label-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-self:center;padding:4px;border-radius:99px;background-color:#e8f0fe;box-sizing:border-box}.io-tree[_ngcontent-%COMP%] .extra-label-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:12px;width:12px;height:12px;color:#9da3a9}.io-tree[_ngcontent-%COMP%] .mat-mdc-button-touch-target{width:24px;height:24px}.io-tree-invisible[_ngcontent-%COMP%]{display:none}.io-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .io-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}.io-tree[_ngcontent-%COMP%] .mat-nested-tree-node[_ngcontent-%COMP%] div[role=group][_ngcontent-%COMP%]{padding-left:8px}.io-tree[_ngcontent-%COMP%] div[role=group][_ngcontent-%COMP%] > .mat-tree-node[_ngcontent-%COMP%]{padding-left:16px} bubble-container:has(.model-explorer-const-values-popup){width:100%} .model-explorer-const-values-popup{padding:8px;font-size:11px;line-height:12px;background-color:#fff} .model-explorer-const-values-popup .values-count-msg{margin-bottom:8px;color:#999} .model-explorer-const-values-popup .content{white-space:pre-wrap;font-family:monospace} - - - - - - - - - - - - - - - - - -`],data:{animation:bC},changeDetection:0})}return i})();function uc(i,e,t,n,r=[]){let o={label:"",children:[],type:t,isGroupNode:!0},s=[];for(let c=0;cf.label===l.label&&f.isGroupNode);if(p==null){let f={label:l.label,boldLabel:TG(d),nodeId:l.id,node:l,type:t,showLocator:!0,highlight:l.id===n,isGroupNode:l.nodeType===Ys.GROUP_NODE,metadata:d};u!=null&&(f.extraData=u),h.children.push(f)}else p.nodeId=l.id,p.showLocator=!0,p.extraData=u}}}o=cue(o);let a=[o];if(s.length>0){let c="weights";for(let l of s)if(!l.node.label.toLowerCase().includes("const")){c="";break}a.push({label:c,children:s.map(l=>({label:l.node.label,boldLabel:TG(l.metadata),nodeId:l.node.id,node:l.node,type:t,showLocator:!1,highlight:l.node.id===n,isGroupNode:!1,metadata:e[l.index]})),type:t,isGroupNode:!1})}return a}function TG(i){if(i)return i[Uo]}function aue(i,e){let t=i?["",...i.split("/")]:[""],n,r=[];for(let o of t)if(o!==""&&r.push(o),o==="")n=e;else{n&&!n.children&&(n.children=[]);let s=n.children.find(a=>a.label===o);if(s==null){let a={label:o,children:[],type:e.type,isGroupNode:!0};n.children.push(a),n=a}else n=s}return n}function cue(i){let e=i,t=[];for(;t.push(e.label),e?.children&&e.children.length===1&&(e.children[0].children||[]).length>0&&!e.showLocator;)e=e.children[0];return e!==i&&(e.label=t.join(" / ")),e}var lue=Ln,Sr=(()=>{class i{charsInfoRegular={};charsInfoMedium={};charsInfoBold={};charsInfoIcons={};textureRegular;textureMedium;textureBold;textureIcons;fontInfoRegular;fontInfoMedium;fontInfoBold;fontInfoIcons;depsLoadedPromise;constructor(){this.depsLoadedPromise=new Promise(t=>It(this,null,function*(){yield this.loadDeps(),t()}))}loadDeps(){return It(this,null,function*(){let t="/static_files",n=yield Promise.all([this.loadFontAtals(`${t}/GoogleSansTextRegular.png`),this.loadFontAtals(`${t}/GoogleSansTextMedium.png`),this.loadFontAtals(`${t}/GoogleSansTextBold.png`),this.loadFontAtals(`${t}/icons_20240521.png`),this.loadFontInfo(`${t}/GoogleSansTextRegular.json`),this.loadFontInfo(`${t}/GoogleSansTextMedium.json`),this.loadFontInfo(`${t}/GoogleSansTextBold.json`),this.loadFontInfo(`${t}/icons_20240521.json`)]);this.textureRegular=n[0],this.textureMedium=n[1],this.textureBold=n[2],this.textureIcons=n[3],this.charsInfoRegular=n[4].charsInfo,this.charsInfoMedium=n[5].charsInfo,this.charsInfoBold=n[6].charsInfo,this.charsInfoIcons=n[7].charsInfo,this.fontInfoRegular=n[4].fontInfo,this.fontInfoMedium=n[5].fontInfo,this.fontInfoBold=n[6].fontInfo,this.fontInfoIcons=n[7].fontInfo})}getCharsInfo(t){switch(t){case mn.REGULAR:return this.charsInfoRegular;case mn.MEDIUM:return this.charsInfoMedium;case mn.BOLD:return this.charsInfoBold;case mn.ICONS:return this.charsInfoIcons;default:return this.charsInfoRegular}}getFontInfo(t){switch(t){case mn.REGULAR:return this.fontInfoRegular;case mn.MEDIUM:return this.fontInfoMedium;case mn.BOLD:return this.fontInfoBold;case mn.ICONS:return this.fontInfoIcons;default:return this.fontInfoRegular}}loadFontAtals(t){return It(this,null,function*(){return new Promise(n=>{new lue.TextureLoader().load(t,r=>{n(r)})})})}loadFontInfo(t){return It(this,null,function*(){let r=yield(yield fetch(t)).json(),o={};for(let s of r.chars)o[s.char]=s;return{fontInfo:r,charsInfo:o}})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var dr=Ln,due=` -precision highp float; - -#define PI 3.1415926535897932384626433832795 - -uniform float edgeWidth; -uniform float animationProgress; - -attribute vec4 endPoints; -attribute vec4 targetEndPoints; -attribute vec3 color; -attribute float yOffset; - -varying vec3 vColor; - -float atan2(in float y, in float x) { - bool s = (abs(x) > abs(y)); - return mix(PI/2.0 - atan(x,y), atan(y,x), s); -} - -void main() { - vColor = color; - - vec3 pos = position; - - float curStartX = endPoints.x; - float curStartY = endPoints.y; - float curEndX = endPoints.z; - float curEndY = endPoints.w; - float targetStartX = targetEndPoints.x; - float targetStartY = targetEndPoints.y; - float targetEndX = targetEndPoints.z; - float targetEndY = targetEndPoints.w; - - float progress = animationProgress * step(0.0, animationProgress); - float startX = curStartX + (targetStartX - curStartX) * progress; - float startY = curStartY + (targetStartY - curStartY) * progress; - float endX = curEndX + (targetEndX - curEndX) * progress; - float endY = curEndY + (targetEndY - curEndY) * progress; - - float length = distance(vec2(startX, startY), vec2(endX, endY)); - pos.x = (step(0.0, pos.x) * 2.0 - 1.0) * (edgeWidth / 2.0); - pos.z = (step(0.0, pos.z) * 2.0 - 1.0) * (length / 2.0); - - float angle = PI / 2.0 - atan2(endY - startY, endX - startX); - float c = cos(angle); - float s = sin(angle); - - float posX = pos.x; - float posZ = pos.z; - pos.x = posX * c + posZ * s; - pos.z = posZ * c - posX * s; - - float centerX = (startX + endX) / 2.0; - float centerZ = (startY + endY) / 2.0; - - gl_Position = projectionMatrix * modelViewMatrix * - vec4(pos.x + centerX, yOffset, pos.z + centerZ, 1.0); -} -`,uue=` -precision highp float; - -varying vec3 vColor; - -void main() { - gl_FragColor = vec4(vColor, 1.0); -} -`,hue=` -precision highp float; - -#define PI 3.1415926535897932384626433832795 - -uniform float animationProgress; - -// End points of the last segment of the edge. -attribute vec4 endPoints; -attribute vec4 targetEndPoints; -attribute vec3 color; -attribute float yOffset; - -varying vec3 vColor; - -float atan2(in float y, in float x) { - bool s = (abs(x) > abs(y)); - return mix(PI/2.0 - atan(x,y), atan(y,x), s); -} - -void main() { - vColor = color; - - vec3 pos = position; - - float curStartX = endPoints.x; - float curStartY = endPoints.y; - float curEndX = endPoints.z; - float curEndY = endPoints.w; - float targetStartX = targetEndPoints.x; - float targetStartY = targetEndPoints.y; - float targetEndX = targetEndPoints.z; - float targetEndY = targetEndPoints.w; - - float progress = animationProgress * step(0.0, animationProgress); - float startX = curStartX + (targetStartX - curStartX) * progress; - float startY = curStartY + (targetStartY - curStartY) * progress; - float endX = curEndX + (targetEndX - curEndX) * progress; - float endY = curEndY + (targetEndY - curEndY) * progress; - - float angle = PI - atan2(endY - startY, endX - startX) + PI / 2.0; - float c = cos(angle); - float s = sin(angle); - - float posX = pos.x; - float posZ = pos.z; - pos.x = posX * c + posZ * s; - pos.z = posZ * c - posX * s; - - gl_Position = projectionMatrix * modelViewMatrix * - vec4(pos.x + endX, yOffset, pos.z + endY, 1.0); -} -`,pue=` -precision highp float; - -varying vec3 vColor; - -void main() { - gl_FragColor = vec4(vColor, 1.0); -} -`,EO=6,IO=6,fue=4,Su=class{color;edgeWidth;edgesMesh;material;arrowHeadMat;arrowHeadsMesh;planeGeo;arrowHeadGeometry;savedEdgeSegments={};savedEdges={};savedArrowHeads={};curAnimationProgrssUniform={value:-1};originalColors=[];originalYOffsets=[];originalArrowHeadYOffsets=[];lastColorUpdateEdgeSegments=[];lastColorUpdateArrowHeads=[];lastYOffsetsUpdateEdgeSegments=[];lastYOffsetsUpdateArrowHeads=[];constructor(e,t){this.color=e,this.edgeWidth=t,this.planeGeo=new dr.PlaneGeometry(1,1),this.planeGeo.rotateX(-Math.PI/2),this.material=new dr.ShaderMaterial({uniforms:{edgeWidth:{value:this.edgeWidth},animationProgress:this.curAnimationProgrssUniform},vertexShader:due,fragmentShader:uue,transparent:!0});let n=new dr.Shape;n.moveTo(-EO/2,-IO).lineTo(0,-fue).lineTo(EO/2,-IO).lineTo(0,0).lineTo(-EO/2,-IO),this.arrowHeadGeometry=new dr.ShapeGeometry(n),this.arrowHeadGeometry.rotateX(-Math.PI/2),this.arrowHeadMat=new dr.ShaderMaterial({uniforms:{animationProgress:this.curAnimationProgrssUniform},vertexShader:hue,fragmentShader:pue,transparent:!0})}generateMesh(e,t,n=!1){if(e.length===0){this.edgesMesh=void 0,this.arrowHeadsMesh=void 0;return}let r=[],o=[],s=[],a=[],c=[],l=[],d=[],u=[],h={},p={};this.savedEdges={};let f=0,m=0;for(let{edge:_,index:x}of e){let C=_.curvePoints||[],T=t.nodesById[_.fromNodeId],D=t.nodesById[_.toNodeId],E=T.globalX||0,A=T.globalY||0;for(let j=0;j0)for(let r of e)for(let o of this.savedEdges[r]||[]){let s=o.index;n.setXYZ(s,t.r,t.g,t.b),this.lastColorUpdateEdgeSegments.push(o)}n.needsUpdate=!0}if(this.arrowHeadsMesh){let n=this.arrowHeadsMesh.geometry.getAttribute("color");if(e.length>0)for(let r of e){let o=this.savedArrowHeads[r],s=o.index;n.setXYZ(s,t.r,t.g,t.b),this.lastColorUpdateArrowHeads.push(o)}n.needsUpdate=!0}}updateYOffsets(e,t){if(this.edgesMesh){let n=this.edgesMesh.geometry.getAttribute("yOffset");if(e.length>0)for(let r of e)for(let o of this.savedEdges[r]||[]){let s=o.index;n.setX(s,t),this.lastYOffsetsUpdateEdgeSegments.push(o)}n.needsUpdate=!0}if(this.arrowHeadsMesh){let n=this.arrowHeadsMesh.geometry.getAttribute("yOffset");if(e.length>0)for(let r of e){let o=this.savedArrowHeads[r],s=o.index;n.setX(s,t),this.lastYOffsetsUpdateArrowHeads.push(o)}n.needsUpdate=!0}}restoreColors(){if(this.edgesMesh){let e=this.edgesMesh.geometry.getAttribute("color");if(this.lastColorUpdateEdgeSegments.length>0){for(let t of this.lastColorUpdateEdgeSegments){let n=t.index;e.setXYZ(n,this.originalColors[n*3],this.originalColors[n*3+1],this.originalColors[n*3+2])}e.needsUpdate=!0}this.lastColorUpdateEdgeSegments=[]}if(this.arrowHeadsMesh){let e=this.arrowHeadsMesh.geometry.getAttribute("color");if(this.lastColorUpdateArrowHeads.length>0){for(let t of this.lastColorUpdateArrowHeads){let n=t.index;e.setXYZ(n,this.originalColors[n*3],this.originalColors[n*3+1],this.originalColors[n*3+2])}e.needsUpdate=!0}this.lastColorUpdateArrowHeads=[]}}restoreYOffsets(){if(this.edgesMesh){let e=this.edgesMesh.geometry.getAttribute("yOffset");if(this.lastYOffsetsUpdateEdgeSegments.length>0){for(let t of this.lastYOffsetsUpdateEdgeSegments){let n=t.index;e.setX(n,this.originalYOffsets[n])}e.needsUpdate=!0}this.lastYOffsetsUpdateEdgeSegments=[]}if(this.arrowHeadsMesh){let e=this.arrowHeadsMesh.geometry.getAttribute("yOffset");if(this.lastYOffsetsUpdateArrowHeads.length>0){for(let t of this.lastYOffsetsUpdateArrowHeads){let n=t.index;e.setX(n,this.originalArrowHeadYOffsets[n])}e.needsUpdate=!0}this.lastYOffsetsUpdateArrowHeads=[]}}clear(){this.edgesMesh&&this.edgesMesh.removeFromParent(),this.arrowHeadsMesh&&this.arrowHeadsMesh.removeFromParent()}clearSavedDataForAnimation(){this.savedEdgeSegments={},this.savedEdges={},this.savedArrowHeads={}}updateAnimationProgress(e){this.edgesMesh&&(this.curAnimationProgrssUniform.value=e)}};var $i=Ln,mue=` -precision highp float; - -uniform float borderRadius; -// Set this to <0 to disable animation. -uniform float animationProgress; -uniform vec4 bgColorWhenFar; - -attribute vec4 bound; -attribute vec4 targetBound; -attribute float yOffset; -attribute float isRounded; -attribute float borderWidth; -attribute vec3 bgColor; -attribute vec3 borderColor; -attribute float angle; -attribute float opacity; -attribute float changeColorWhenFar; - -varying vec2 vUv; -varying vec2 vSize; -varying float vIsRounded; -varying float vBorderWidth; -varying vec3 vBgColor; -varying vec3 vBorderColor; -varying float vOpacity; -varying float vChangeColorWhenFar; - -void main() { - vUv = uv; - vIsRounded = isRounded; - vBorderWidth = borderWidth; - vBgColor = bgColor; - vBorderColor = borderColor; - vOpacity = opacity; - vChangeColorWhenFar = changeColorWhenFar; - - vec3 pos = position; - float curX = bound.x; - float curY = bound.y; - float curW = bound.z; - float curH = bound.w; - - float progress = animationProgress * step(0.0, animationProgress); - float x = curX + (targetBound.x - curX) * progress; - float y = curY + (targetBound.y - curY) * progress; - float w = curW + (targetBound.z - curW) * progress; - float h = curH + (targetBound.w - curH) * progress; - vSize = vec2(w, h); - - // For each vertex, move it by delta calculated below so that the final - // rectangle's width and height match the width and height stored in "bound". - // - // pos.x < 0: the first () below returns -1. - // pos.x > 0: the first () below returns 1. - pos.x = (step(0.0, pos.x) * 2.0 - 1.0) * (w / 2.0); - pos.z = (step(0.0, pos.z) * 2.0 - 1.0) * (h / 2.0); - - // Rotate. - // - float c = cos(angle); - float s = sin(angle); - float posX = pos.x * c + pos.z * s; - float posZ = pos.z * c - pos.x * s; - - gl_Position = projectionMatrix * modelViewMatrix * - vec4(posX + x, yOffset, posZ + y, 1.0); -} -`,gue=` -precision highp float; - -uniform float borderRadius; -uniform vec4 bgColorWhenFar; - -varying vec2 vUv; -varying vec2 vSize; -varying float vIsRounded; -varying float vBorderWidth; -varying vec3 vBgColor; -varying vec3 vBorderColor; -varying float vOpacity; -varying float vChangeColorWhenFar; - -// See: -// https://www.shadertoy.com/view/4tc3DX# - -// Clamp [0..1] range -#define saturate(a) clamp(a, 0.0, 1.0) - -// This function will make a signed distance field that says how far you are -// from the edge of the line at any point U,V. -// Pass it UVs, line end points, line thickness (x is along the line and y is -// perpendicular), How rounded the end points should be (0.0 is rectangular, -// setting rounded to thick.y will be circular). -float LineDistField(vec2 uv, vec2 pA, vec2 pB, vec2 thick, float rounded, float dashOn) { - // Don't let it get more round than circular. - rounded = min(thick.y, rounded); - // midpoint - vec2 mid = (pB + pA) * 0.5; - // vector from point A to B - vec2 delta = pB - pA; - // Distance between endpoints - float lenD = length(delta); - // unit vector pointing in the line's direction - vec2 unit = delta / lenD; - // Check for when line endpoints are the same - if (lenD < 0.0001) unit = vec2(1.0, 0.0); // if pA and pB are same - // Perpendicular vector to unit - also length 1.0 - vec2 perp = unit.yx * vec2(-1.0, 1.0); - // position along line from midpoint - float dpx = dot(unit, uv - mid); - // distance away from line at a right angle - float dpy = dot(perp, uv - mid); - // Make a distance function that is 0 at the transition from black to white - float disty = abs(dpy) - thick.y + rounded; - float distx = abs(dpx) - lenD * 0.5 - thick.x + rounded; - - // Too tired to remember what this does. Something like rounded endpoints for distance function. - float dist = length(vec2(max(0.0, distx), max(0.0,disty))) - rounded; - dist = min(dist, max(distx, disty)); - - return dist; -} - -// This makes a line in UV units. A 1.0 thick line will span a whole 0..1 in -// UV space. -float FillLine(vec2 uv, vec2 pA, vec2 pB, vec2 thick, float rounded) { - float df = LineDistField(uv, pA, pB, vec2(thick), rounded, 0.0); - return saturate(df / abs(dFdy(uv).y)); -} - -void main() { - // Normalize uv. - vec2 uv = vUv; - uv -= 0.5; - float aspect = vSize.x / vSize.y; - uv.x *= aspect; - - vec4 finalColor = vec4(1.0); - - float radius = mix(1.0 / vSize.y, borderRadius / vSize.y, step(0.5, vIsRounded)); - float borderWidth = vBorderWidth / vSize.y; - - // Border. - float c = FillLine(uv, - vec2(-0.5 * aspect, 0.0), vec2(0.5 * aspect, 0.0), vec2(0.0, 0.5), radius); - finalColor = mix(vec4(vBorderColor.rgb, 1.0), vec4(1.0, 1.0, 1.0, 0.0), c); - - // Body. - float c2 = FillLine(uv, - vec2(-0.5 * aspect + borderWidth, 0.0), - vec2(0.5 * aspect - borderWidth, 0.0), vec2(0.0, 0.5 - borderWidth), - radius - 1.0 / vSize.y); - finalColor = mix(vec4(vBgColor.rgb, 1.0), finalColor, c2); - finalColor = saturate(finalColor); - finalColor.rgb = mix(finalColor.rgb, bgColorWhenFar.rgb, bgColorWhenFar.a * vChangeColorWhenFar); - - float alpha = finalColor.w * vOpacity; - if (alpha < 0.00001) { - discard; - } - gl_FragColor = vec4(finalColor.rgb, alpha); -} -`,Ni=class{radius;mesh;meshForRayCasting;material;materialForRayCasting;planeGeo;hoveredRectangelId="";curRectangles=[];savedRectangles={};curAnimationProgrssUniform={value:-1};dummy=new $i.Object3D;originalBorderColors=[];originalBgColors=[];originalBorderWidths=[];originalOpacities=[];lastBorderColorUpdateRectangles=[];lastBgColorUpdateRectangles=[];lastBorderWidthUpdateRectangles=[];lastOpacityUpdateRectangles=[];constructor(e){this.radius=e,this.planeGeo=new $i.PlaneGeometry(1,1),this.planeGeo.rotateX(-Math.PI/2),this.material=new $i.ShaderMaterial({extensions:{derivatives:!0},uniforms:{borderRadius:{value:this.radius},animationProgress:this.curAnimationProgrssUniform,bgColorWhenFar:{value:[0,0,0,0]}},vertexShader:mue,fragmentShader:gue,transparent:!0}),this.materialForRayCasting=new $i.MeshBasicMaterial({opacity:0,transparent:!0})}generateMesh(e,t=!1,n=!1,r=!1,o=!1){if(e.length===0){this.savedRectangles={},this.mesh=void 0,this.meshForRayCasting=void 0;return}this.curRectangles=e;let s=[],a=[],c=[],l=[],d=[],u=[],h=[],p=[],f=[],m=[],y=Object.keys(this.savedRectangles).length>0,g=Z({},this.savedRectangles);this.savedRectangles={};let _=0;for(let C=0;C0){let a=r[r.length-1].instanceId;a!=null&&(o=this.getRectangleId(a))}if(this.hoveredRectangelId!==o){this.hoveredRectangelId=o,n&&(document.body.style.cursor=this.hoveredRectangelId===""?"default":"pointer");let s=this.savedRectangles[this.hoveredRectangelId];t(this.hoveredRectangelId,s)}}updateBorderColor(e,t){if(!this.mesh)return;e=e.filter(r=>r!=="");let n=this.mesh.geometry.getAttribute("borderColor");if(e.length>0)for(let r of e){let o=this.savedRectangles[r];if(!o)continue;let s=o.index;n.setXYZ(s,t.r,t.g,t.b),o.borderColor.r=t.r,o.borderColor.g=t.g,o.borderColor.b=t.b,this.lastBorderColorUpdateRectangles.push(o)}n.needsUpdate=!0}restoreBorderColors(){if(!this.mesh)return;let e=this.mesh.geometry.getAttribute("borderColor");if(this.lastBorderColorUpdateRectangles.length>=0){for(let t of this.lastBorderColorUpdateRectangles){let n=t.index;e.setXYZ(n,this.originalBorderColors[n*3],this.originalBorderColors[n*3+1],this.originalBorderColors[n*3+2]),t.borderColor.r=this.originalBorderColors[n*3],t.borderColor.g=this.originalBorderColors[n*3+1],t.borderColor.b=this.originalBorderColors[n*3+2]}e.needsUpdate=!0}this.lastBorderColorUpdateRectangles=[]}updateBgColor(e,t,n=!1){if(!this.mesh)return;e=e.filter(o=>o!=="");let r=this.mesh.geometry.getAttribute("bgColor");if(e.length>0)for(let o of e){let s=this.savedRectangles[o];if(!s)continue;let a=s.index;if(n){let c=this.originalBgColors[a*3],l=this.originalBgColors[a*3+1],d=this.originalBgColors[a*3+2];if(c!==1||l!==1||d!==1)continue}r.setXYZ(a,t.r,t.g,t.b),s.bgColor.r=t.r,s.bgColor.g=t.g,s.bgColor.b=t.b,this.lastBgColorUpdateRectangles.push(s)}r.needsUpdate=!0}restoreBgColors(){if(!this.mesh)return;let e=this.mesh.geometry.getAttribute("bgColor");if(this.lastBgColorUpdateRectangles.length>=0){for(let t of this.lastBgColorUpdateRectangles){let n=t.index;e.setXYZ(n,this.originalBgColors[n*3],this.originalBgColors[n*3+1],this.originalBgColors[n*3+2]),t.bgColor.r=this.originalBgColors[n*3],t.bgColor.g=this.originalBgColors[n*3+1],t.bgColor.b=this.originalBgColors[n*3+2]}e.needsUpdate=!0}this.lastBgColorUpdateRectangles=[]}updateBorderWidth(e,t){if(!this.mesh)return;e=e.filter(r=>r!=="");let n=this.mesh.geometry.getAttribute("borderWidth");if(e.length>0)for(let r of e){let o=this.savedRectangles[r];if(!o)continue;let s=o.index;n.setX(s,t),o.borderWidth=t,this.lastBorderWidthUpdateRectangles.push(o)}n.needsUpdate=!0}restoreBorderWidths(){if(!this.mesh)return;let e=this.mesh.geometry.getAttribute("borderWidth");if(this.lastBorderWidthUpdateRectangles.length>=0){for(let t of this.lastBorderWidthUpdateRectangles){let n=t.index;e.setX(n,this.originalBorderWidths[n]),t.borderWidth=this.originalBorderWidths[n]}e.needsUpdate=!0}this.lastBorderWidthUpdateRectangles=[]}updateOpacity(e,t){if(!this.mesh)return;e=e.filter(r=>r!=="");let n=this.mesh.geometry.getAttribute("opacity");if(e.length>0)for(let r of e){let o=this.savedRectangles[r];if(!o)continue;let s=o.index;n.setX(s,t),o.opacity=t,this.lastOpacityUpdateRectangles.push(o)}n.needsUpdate=!0}restoreOpacities(){if(!this.mesh)return;let e=this.mesh.geometry.getAttribute("opacity");if(this.lastOpacityUpdateRectangles.length>=0){for(let t of this.lastOpacityUpdateRectangles){let n=t.index;e.setX(n,this.originalOpacities[n]),t.opacity=this.originalOpacities[n]}e.needsUpdate=!0}this.lastOpacityUpdateRectangles=[]}updateAngle(e,t){if(!this.mesh)return;let n=this.mesh.geometry.getAttribute("angle"),r=this.savedRectangles[e];if(!r)return;let o=t/180*Math.PI;n.setX(r.index,o),n.needsUpdate=!0}updateAnimationProgress(e){this.mesh&&(this.curAnimationProgrssUniform.value=e)}getRectangleId(e){return this.curRectangles[e].id}getNodeIndex(e){return this.savedRectangles[e]?.index??-1}setBgColorWhenFar(e,t){this.mesh&&(this.material.uniforms.bgColorWhenFar.value=[e.r,e.g,e.b,t])}clearSavedDataForAnimation(){this.savedRectangles={}}setInstancePositionAndScale(e,t,n,r,o,s,a){this.dummy.position.set(n,r,o),this.dummy.scale.set(s,1,a),this.dummy.updateMatrix(),e.setMatrixAt(t,this.dummy.matrix),e.instanceMatrix.needsUpdate=!0}};var so=Ln,_ue=` -precision highp float; - -// Set this to <0 to disable animation. -uniform float animationProgress; - -// 0: regular. 1: medium. 2: bold. -attribute float weight; -attribute vec3 color; -attribute vec4 bound; -attribute vec4 targetBound; -attribute vec4 uvBound; -attribute float yOffset; -attribute float opacity; -attribute float angle; -attribute vec3 borderColor; -attribute float weightLevel; - -varying vec2 vUv; -varying vec3 vColor; -varying float vWeight; -varying float vOpacity; -varying vec3 vBorderColor; -varying float vWeightLevel; - -void main() { - vUv = vec2(0.0, 0.0); - vec3 pos = position; - if (pos.x < 0.0 && pos.z < 0.0) { - vUv = vec2(uvBound.x, uvBound.y + uvBound.w); - } else if (pos.x > 0.0 && pos.z < 0.0) { - vUv = vec2(uvBound.x + uvBound.z, uvBound.y + uvBound.w); - } else if (pos.x > 0.0 && pos.z > 0.0) { - vUv = vec2(uvBound.x + uvBound.z, uvBound.y); - } else { - vUv = vec2(uvBound.x, uvBound.y); - } - - vColor = color; - vWeight = weight; - vOpacity = opacity; - vBorderColor = borderColor; - vWeightLevel = weightLevel; - - float curX = bound.x; - float curY = bound.y; - float curW = bound.z; - float curH = bound.w; - - float x = curX; - float y = curY; - float w = curW; - float h = curH; - - if (animationProgress >= 0.0) { - x = curX + (targetBound.x - curX) * animationProgress; - y = curY + (targetBound.y - curY) * animationProgress; - w = curW + (targetBound.z - curW) * animationProgress; - h = curH + (targetBound.w - curH) * animationProgress; - } - - // For each vertex, move it by delta calculated below so that the final - // rectangle's width and height match the width and height stored in "bound". - // - if (pos.x < 0.0) { - pos.x = - w / 2.0; - } else if (pos.x > 0.0) { - pos.x = w / 2.0; - } - - if (pos.z < 0.0) { - pos.z = - h / 2.0; - } else if (pos.z > 0.0) { - pos.z = h / 2.0; - } - - // Rotate. - // - float c = cos(angle); - float s = sin(angle); - float posX = pos.x * c + pos.z * s; - float posZ = pos.z * c - pos.x * s; - - gl_Position = projectionMatrix * modelViewMatrix * - vec4(posX + x, yOffset, posZ + y, 1.0); -} -`,vue=` -precision highp float; - -uniform sampler2D textureRegular; -uniform sampler2D textureMedium; -uniform sampler2D textureBold; -uniform sampler2D textureIcons; -uniform float distanceRange; -varying vec2 vUv; -varying float vWeight; -varying vec3 vColor; -varying float vOpacity; -varying vec3 vBorderColor; -varying float vWeightLevel; - -vec3 getSampleColor() { - if (vWeight < 0.5) { - return texture2D(textureRegular, vUv).rgb; - } - if (vWeight < 1.5) { - return texture2D(textureMedium, vUv).rgb; - } - if (vWeight < 2.5) { - return texture2D(textureBold, vUv).rgb; - } - return texture2D(textureIcons, vUv).rgb; -} - -float median(float r, float g, float b) { - return max(min(r, g), min(max(r, g), b)); -} - -float screenPxRange() { - vec2 unitRange = vec2(distanceRange) / vec2(textureSize(textureRegular, 0)); - vec2 screenTexSize = vec2(1.0) / fwidth(vUv); - return max(0.5 * dot(unitRange, screenTexSize), 1.0); -} - -void main() { - vec3 sampleColor = getSampleColor(); - - float dist = median(sampleColor.r, sampleColor.g, sampleColor.b); - vec3 color = vColor; - float threshold = step(0.0, vBorderColor.r) * 0.35; - float pxDist = screenPxRange() * (dist - 0.5 + threshold) + vWeightLevel - threshold; - - // Has border. - if (vBorderColor.r >= 0.0) { - float blur = fwidth(dist) / 2.0; - color = mix(vBorderColor, vColor, smoothstep(0.5 - blur, 0.5 + blur, dist)); - } - - float opacity = clamp(pxDist, 0.0, 1.0); - if (opacity > 0.001) { - opacity *= vOpacity; - } - gl_FragColor = vec4(color, opacity); -} -`,qi=class{threejsService;mesh;material;planeGeo;labelCharSizesCache={};fontSize;distanceRange;savedBounds={};nodeIdToOpacityIndexRanges={};nodeIdToColorIndexRanges={};lastOpacityUpdateIndexRanges=[];lastColorUpdateIndexRanges=[];originalColors=[];curAnimationProgrssUniform={value:-1};constructor(e){this.threejsService=e,this.planeGeo=new so.PlaneGeometry(1,1),this.planeGeo.rotateX(-Math.PI/2),this.fontSize=this.threejsService.fontInfoRegular.info.size,this.distanceRange=this.threejsService.fontInfoRegular.distanceField.distanceRange,this.material=new so.ShaderMaterial({uniforms:{textureRegular:{value:this.threejsService.textureRegular},textureMedium:{value:this.threejsService.textureMedium},textureBold:{value:this.threejsService.textureBold},textureIcons:{value:this.threejsService.textureIcons},distanceRange:{value:this.distanceRange},animationProgress:this.curAnimationProgrssUniform},extensions:{derivatives:!0},vertexShader:_ue,fragmentShader:vue,transparent:!0,alphaToCoverage:!0})}generateMesh(e,t=!1,n=!1,r=!1){let o=0;this.nodeIdToOpacityIndexRanges={},this.nodeIdToColorIndexRanges={};let s=[],a=[],c=[],l=[],d=[],u=[],h=[],p=[],f=[],m=[],y=Object.keys(this.savedBounds).length>0,g=Z({},this.savedBounds);this.savedBounds={};for(let x of e){let C=this.threejsService.getCharsInfo(x.weight),D=this.threejsService.getFontInfo(x.weight).common.scaleW,E=this.getLabelSizes(x.label,x.weight,x.height,x.maxWidth,x.treatLabelAsAWhole,x.angle,x.edgeTextMode).sizes,A=x.height/this.fontSize,j=x.x,q=x.z,P=(x.treatLabelAsAWhole?{rects:[{x:0,y:0,width:20,height:x.height}]}:this.getLabelSizes("a",x.weight,x.height).sizes).rects[0].height*A;switch(x.vAlign){case"top":q-=E.minZ*A;break;case"bottom":q-=E.maxZ*A;break;case"center":q-=(E.minZ+E.maxZ)/2*A+P/2;break;default:break}switch(x.hAlign){case"left":j-=E.minX*A;break;case"right":j-=E.maxX*A;break;case"center":j-=(E.minX+E.maxX)/2*A;break;default:break}let U=x.y,W=u.length;for(let Y=0;Y0){for(let r of e)if(this.nodeIdToOpacityIndexRanges[r])for(let{minIndex:o,maxIndex:s}of this.nodeIdToOpacityIndexRanges[r]){for(let a=o;a<=s;a++)n.setX(a,t);this.lastOpacityUpdateIndexRanges.push({minIndex:o,maxIndex:s})}}n.needsUpdate=!0}updateColorInNode(e,t){if(!this.mesh)return;let n=this.mesh.geometry.getAttribute("color");if(e.length>0){for(let r of e)if(this.nodeIdToColorIndexRanges[r])for(let{minIndex:o,maxIndex:s}of this.nodeIdToColorIndexRanges[r]){for(let a=o;a<=s;a++)n.setXYZ(a,t.r,t.g,t.b);this.lastColorUpdateIndexRanges.push({minIndex:o,maxIndex:s})}}n.needsUpdate=!0}restoreOpacities(){if(!this.mesh)return;let e=this.mesh.geometry.getAttribute("opacity");if(this.lastOpacityUpdateIndexRanges.length>=0){for(let{minIndex:t,maxIndex:n}of this.lastOpacityUpdateIndexRanges)for(let r=t;r<=n;r++)e.setX(r,1);e.needsUpdate=!0}this.lastOpacityUpdateIndexRanges=[]}restoreColors(){if(!this.mesh)return;let e=this.mesh.geometry.getAttribute("color");if(this.lastColorUpdateIndexRanges.length>=0){for(let{minIndex:t,maxIndex:n}of this.lastColorUpdateIndexRanges)for(let r=t;r<=n;r++)e.setXYZ(r,this.originalColors[r*3],this.originalColors[r*3+1],this.originalColors[r*3+2]);e.needsUpdate=!0}this.lastColorUpdateIndexRanges=[]}updateAnimationProgress(e){this.curAnimationProgrssUniform.value=e}getLabelSizes(e,t,n,r,o,s,a){let c=this.getLabelCharSizesKey(e,t,s),l=this.labelCharSizesCache[c],d;if(l==null){if(l=this.getLabelSizesInternal(e,t,o,s,a),r!=null){let u=n/this.fontSize,h=e;for(let p=0;pr){h=h.substring(0,p-1),h+="...";break}}d=h,l=this.getLabelSizesInternal(h,t,o),c=this.getLabelCharSizesKey(h,t)}this.labelCharSizesCache[c]=l}return{sizes:this.labelCharSizesCache[c],updatedLabel:d}}updateLabelSizesCache(e,t,n){let r=this.getLabelCharSizesKey(e,t);this.labelCharSizesCache[r]=n}getFontSize(){return this.fontSize}clearSavedDataForAnimation(){this.savedBounds={}}getLabelCharSizesKey(e,t,n){return`${e}__${t}__${n}`}getLabelSizesInternal(e,t,n,r,o){let s=this.threejsService.getCharsInfo(t),a=[],c=0,l=Number.MAX_VALUE,d=Number.MAX_VALUE,u=Number.NEGATIVE_INFINITY,h=Number.NEGATIVE_INFINITY;for(let p of n?[e]:e){let f=s[p];f||(f=s["?"]);let m=f.yoffset;o?(c+=Math.sin(r||0)*(f.yoffset+f.height/2),m=Math.cos(r||0)*(f.yoffset+f.height/2)):c+=f.xoffset;let y=f.width,g=f.height,_={x:c,y:m,width:y,height:g};a.push(_),l=Math.min(l,_.x),d=Math.min(d,_.y),u=Math.max(u,_.x+_.width),h=Math.max(h,_.y+_.height),c+=f.xadvance*.98}return{rects:a,minX:l,minZ:0,maxX:u,maxZ:this.fontSize}}};var OG=26;var bue=en*.2,RG=en*.4,AG=Ln,yC=(()=>{class i{ATTRS_TABLE_KEY_COLOR=new AG.Color("#808080");ATTRS_TABLE_VALUE_COLOR=new AG.Color("#0d0d0d");threejsService=te(Sr);attrsTableTexts=new qi(this.threejsService);webglRenderer;webglRendererThreejsService;attrsTableBgs=new Ni(4);init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService}renderAttrsTable(){if(Object.keys(this.webglRenderer.curShowOnNodeItemTypes).filter(s=>this.webglRenderer.curShowOnNodeItemTypes[s].selected).length===0)return;let t=[],r=9/this.attrsTableTexts.getFontSize(),o=[];for(let{node:s,index:a}of this.webglRenderer.nodesToRender){let c=[],l=OG+LI-4+ZI(s.label),d=0,u=0,h=[];if(St(s)){let m=UI(this.webglRenderer.curShowOnNodeItemTypes);for(let y of m){let g=ey(s,y);h.push({key:y,value:g})}this.webglRenderer.curShowOnNodeItemTypes[Nn.OP_ATTRS]?.selected&&h.push(...GI(s,this.webglRenderer.curShowOnNodeItemTypes[Nn.OP_ATTRS]?.filterRegex||"")),this.webglRenderer.curShowOnNodeItemTypes[Nn.OP_INPUTS]?.selected&&h.push(...WI(s,this.webglRenderer.curModelGraph)),this.webglRenderer.curShowOnNodeItemTypes[Nn.OP_OUTPUTS]?.selected&&h.push(...$I(s)),h.push(...qI(s,this.webglRenderer.curModelGraph.id,this.webglRenderer.curShowOnNodeItemTypes,this.webglRenderer.curNodeDataProviderRuns))}else if(wt(s)){let m=HI(this.webglRenderer.curShowOnNodeItemTypes);for(let y of m){let g=ey(s,y);h.push({key:y,value:g})}this.webglRenderer.curShowOnNodeItemTypes[Nn.LAYER_NODE_ATTRS]?.selected&&h.push(...jI(s,this.webglRenderer.curModelGraph,this.webglRenderer.curShowOnNodeItemTypes[Nn.LAYER_NODE_ATTRS]?.filterRegex||""))}for(let{key:m,value:y}of h){let{keyLabelData:g,keyLabelWidth:_,valueLabelData:x,valueLabelWidth:C}=this.createAttrsTableKeyValueLabels(s,a,m,y,l,r);t.push(g,x),d=Math.max(_,d),u=Math.max(C,u),c.push({keyLabelData:g,valueLabelData:x}),l+=Om}let p=d+u+Yb,f=(this.webglRenderer.getNodeWidth(s)-p)/2;for(let m of c)m.keyLabelData.x=this.webglRenderer.getNodeX(s)+d,m.valueLabelData.x=this.webglRenderer.getNodeX(s)+d+Yb,m.keyLabelData.x+=f,m.valueLabelData.x+=f;if(c.length>0&&St(s)){let y=this.webglRenderer.getNodeWidth(s)-16,g=c.length*Om;o.push({id:s.id,index:o.length,bound:{x:this.webglRenderer.getNodeX(s)+16/2+y/2,y:c[0].keyLabelData.z+g/2-Om/2,width:y,height:g},yOffset:en*a+bue,isRounded:!0,borderColor:{r:1,g:1,b:1},bgColor:{r:1,g:1,b:1},borderWidth:1,opacity:1})}}t.length>0&&(this.attrsTableTexts.generateMesh(t),this.webglRendererThreejsService.addToScene(this.attrsTableTexts.mesh),this.attrsTableBgs.generateMesh(o),this.webglRendererThreejsService.addToScene(this.attrsTableBgs.mesh))}updateAnimationProgress(t){this.attrsTableTexts.updateAnimationProgress(t),this.attrsTableBgs.updateAnimationProgress(t)}createAttrsTableKeyValueLabels(t,n,r,o,s,a){let c={id:`${t.id}_attrs_table_${r}_key`,nodeId:t.id,label:`${r}:`,height:9,hAlign:"right",vAlign:"center",weight:mn.MEDIUM,x:this.webglRenderer.getNodeX(t),y:n*en+RG,z:this.webglRenderer.getNodeY(t)+s,color:this.ATTRS_TABLE_KEY_COLOR},l=this.attrsTableTexts.getLabelSizes(c.label,c.weight,c.height).sizes,d=(l.maxX-l.minX)*a,u={id:`${t.id}_attrs_table_${r}_value`,nodeId:t.id,label:o,height:9,hAlign:"left",vAlign:"center",weight:mn.REGULAR,x:this.webglRenderer.getNodeX(t),y:n*en+RG,z:this.webglRenderer.getNodeY(t)+s,color:this.ATTRS_TABLE_VALUE_COLOR,maxWidth:FI},{sizes:h,updatedLabel:p}=this.attrsTableTexts.getLabelSizes(u.label,u.weight,u.height,u.maxWidth);p!=null&&(u.label=p);let f=(h.maxX-h.minX)*a;return{keyLabelData:c,keyLabelWidth:d,valueLabelData:u,valueLabelWidth:f}}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var Z_=Ln,xC=(()=>{class i{appService;EDGE_TEXT_COLOR=new Z_.Color("#041E49");threejsService=te(Sr);edgeTexts=new qi(this.threejsService);webglRenderer;webglRendererThreejsService;constructor(t){this.appService=t}init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService}renderEdgeTexts(){let t=this.genLabelsOnEdges(this.webglRenderer.edgesToRender,this.EDGE_TEXT_COLOR);this.edgeTexts.generateMesh(t),this.webglRendererThreejsService.addToScene(this.edgeTexts.mesh)}genLabelsOnEdges(t,n){let r=this.appService.config()?.edgeLabelFontSize||Kb,o=this.appService.config()?.disallowVerticalEdgeLabels||!1,s=[],a=this.threejsService.getCharsInfo(mn.MEDIUM);for(let{edge:c}of t){let l=this.webglRenderer.curModelGraph.nodesById[c.fromNodeId],d=this.webglRenderer.curModelGraph.nodesById[c.toNodeId];if(!St(l)||!St(d))continue;let u="?",h=l.outputsMetadata||{};for(let T of Object.keys(h))if((l.outgoingEdges||[]).find(E=>E.sourceNodeOutputId===T&&E.targetNodeId===c.toNodeId)!=null){u=h[T].shape||"?",u=u.split("").map(E=>(E==="x"&&(E="x"),E==="\u2217"&&(E="*"),E===""&&(E=""),a[E]==null?"?":E)).join("");break}let p=c.curvePoints||[],f=l.globalX||0,m=l.globalY||0,y=new Z_.CurvePath;for(let T=0;T1,C=()=>{let T=y.getPointAt(.5);s.push({id:`${c.id}_${u}`,nodeId:c.toNodeId,label:u,height:r,hAlign:"center",vAlign:"center",weight:mn.MEDIUM,x:T.x,y:95,z:T.y,color:n,borderColor:{r:1,g:1,b:1}})};if(x)C();else{let T=[],D=Math.max(0,Math.min(.25,1-u.length*_-5/g)),E=Math.max(.05,1-5/g-D-_*u.length),A=.05,j=!0,q=r/this.edgeTexts.getFontSize();for(let z=0;z=Math.PI/4&&de<=Math.PI*1.75){j=!1;break}if(T.push({pos:G,position:Math.min(W,1),angle:de,tan:K,char:k}),U!=null){let he=Math.abs(de-U);if(Math.min(he,Math.abs(he-Math.PI))>.15&&(j=!1,z+.05=T[T.length-1].pos.x;if(z){let P=[],U=T[0].position;for(let W=u.length-1;W>=0;W--){let Y=u[W],k=y.getPointAt(Math.min(1,U)),G=y.getTangentAt(Math.min(1,U)),K=(Math.PI*2-Math.atan(G.y/G.x))%(Math.PI*2);K<0&&(K+=Math.PI*2),P.push({pos:k,angle:K,tan:G,position:U,char:Y});let de=a[Y],De=0;W>=1&&(De=a[u[W-1]].xadvance);let Te=(de.xadvance/2+De/2)*q/g;U+=Te}T=P}for(let P=0;P{class i{EDGE_COLOR_INCOMING=new af.Color("#009e73");EDGE_TEXT_COLOR_INCOMING=new af.Color("#125341");EDGE_COLOR_OUTGOING=new af.Color("#d55e00");EDGE_TEXT_COLOR_OUTGOING=new af.Color("#994d11");inputsRenderedEdges=[];outputsRenderedEdges=[];inputsByHighlightedNode={};outputsByHighlightedNode={};webglRenderer;webglRendererThreejsService;threejsService=te(Sr);ioPickerBgs=new Ni(99);ioPickerTexts=new qi(this.threejsService);incomingHighlightedEdges=new Su(this.EDGE_COLOR_INCOMING,NG);outgoingHighlightedEdges=new Su(this.EDGE_COLOR_OUTGOING,NG);incomingHighlightedEdgeTexts=new qi(this.threejsService);outgoingHighlightedEdgeTexts=new qi(this.threejsService);init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService}updateIncomingAndOutgoingHighlights(){if(!this.webglRenderer.curModelGraph)return;if(this.clearIncomingAndOutgoingHighlights(),!this.shouldUpdateIncomingAndOutgoingEdgesHighlights()){this.incomingHighlightedEdges.clearSavedDataForAnimation(),this.outgoingHighlightedEdges.clearSavedDataForAnimation(),this.incomingHighlightedEdgeTexts.clearSavedDataForAnimation(),this.outgoingHighlightedEdgeTexts.clearSavedDataForAnimation(),this.ioPickerBgs.clearSavedDataForAnimation(),this.ioPickerTexts.clearSavedDataForAnimation();return}let t=this.webglRenderer.appService.config()?.showOpNodeOutOfLayerEdgesWithoutSelecting,n=this.getHighlightedIncomingNodesAndEdges(this.webglRenderer.curHiddenInputOpNodeIds,void 0,{reuseRenderedEdgeCurvePoints:t});if(n.overlayEdges.length>0){let a=n.overlayEdges.map(c=>t?{edge:c,index:95/en}:{edge:yt(Z({},c),{curvePoints:wh(c.points,Qh,Kh,af)}),index:95/en});if(this.incomingHighlightedEdges.generateMesh(a,this.webglRenderer.curModelGraph),this.webglRendererThreejsService.addToScene(this.incomingHighlightedEdges.edgesMesh),this.webglRendererThreejsService.addToScene(this.incomingHighlightedEdges.arrowHeadsMesh),this.webglRenderer.curShowOnEdgeItemTypes[zc.TENSOR_SHAPE]?.selected){let c=this.webglRenderer.webglRendererEdgeTextsService.genLabelsOnEdges(a,this.EDGE_TEXT_COLOR_INCOMING);this.incomingHighlightedEdgeTexts.generateMesh(c,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.incomingHighlightedEdgeTexts.mesh)}}this.inputsByHighlightedNode=n.inputsByHighlightedNode,this.inputsRenderedEdges=n.renderedEdges;let r=this.getHighlightedOutgoingNodesAndEdges(this.webglRenderer.curHiddenOutputIds,void 0,{reuseRenderedEdgeCurvePoints:t});if(r.overlayEdges.length>0){let a=r.overlayEdges.map(c=>t?{edge:c,index:95/en}:{edge:yt(Z({},c),{curvePoints:wh(c.points,Qh,Kh,af)}),index:95/en});if(this.outgoingHighlightedEdges.generateMesh(a,this.webglRenderer.curModelGraph),this.webglRendererThreejsService.addToScene(this.outgoingHighlightedEdges.edgesMesh),this.webglRendererThreejsService.addToScene(this.outgoingHighlightedEdges.arrowHeadsMesh),this.webglRenderer.curShowOnEdgeItemTypes[zc.TENSOR_SHAPE]?.selected){let c=this.webglRenderer.webglRendererEdgeTextsService.genLabelsOnEdges(a,this.EDGE_TEXT_COLOR_OUTGOING);this.outgoingHighlightedEdgeTexts.generateMesh(c,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.outgoingHighlightedEdgeTexts.mesh)}}this.outputsByHighlightedNode=r.outputsByHighlightedNode,this.outputsRenderedEdges=r.renderedEdges;let o=[],s=[];for(let a of Object.keys(Z(Z({},this.inputsByHighlightedNode),this.outputsByHighlightedNode))){let c=this.webglRenderer.curModelGraph.nodesById[a];if(wt(c)){let l=wue,d=TO,u=this.inputsByHighlightedNode[a]!=null,h=u?this.inputsByHighlightedNode[a].length:this.outputsByHighlightedNode[a].length;o.push({id:`${a}${wC}${u?"input":"output"}`,index:o.length,bound:{x:this.webglRenderer.getNodeX(c)+l/2,y:this.webglRenderer.getNodeY(c)-d/4,width:l,height:d},yOffset:95,isRounded:!0,borderColor:{r:1,g:1,b:1},bgColor:u?this.EDGE_COLOR_INCOMING:this.EDGE_COLOR_OUTGOING,borderWidth:0,opacity:1}),s.push({id:`${a}${wC}${u?"input":"output"}`,nodeId:a,label:`${h} ${u?"input":"output"}${h!==1?"s":""}`,height:8,hAlign:"center",vAlign:"center",weight:mn.MEDIUM,color:{r:1,g:1,b:1},x:this.webglRenderer.getNodeX(c)+l/2,y:96,z:this.webglRenderer.getNodeY(c)-d/4+1})}}this.ioPickerTexts.generateMesh(s,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.ioPickerTexts.mesh),this.ioPickerBgs.generateMesh(o,!0,!1,!1,!0),this.webglRendererThreejsService.addToScene(this.ioPickerBgs.mesh),this.webglRendererThreejsService.addToScene(this.ioPickerBgs.meshForRayCasting),this.webglRenderer.animateIntoPositions(a=>{this.incomingHighlightedEdges.updateAnimationProgress(a),this.outgoingHighlightedEdges.updateAnimationProgress(a),this.incomingHighlightedEdgeTexts.updateAnimationProgress(a),this.outgoingHighlightedEdgeTexts.updateAnimationProgress(a),this.ioPickerBgs.updateAnimationProgress(a),this.ioPickerTexts.updateAnimationProgress(a)})}handleClickIoPicker(t,n){t?this.inputsByHighlightedNode[n].length===1?this.webglRenderer.sendLocateNodeRequest(this.inputsByHighlightedNode[n][0].id,this.webglRenderer.rendererId):this.webglRenderer.showIoTree(this.webglRenderer.ioPicker.nativeElement,this.inputsByHighlightedNode[n],"incoming"):this.outputsByHighlightedNode[n].length===1?this.webglRenderer.sendLocateNodeRequest(this.outputsByHighlightedNode[n][0].id,this.webglRenderer.rendererId):this.webglRenderer.showIoTree(this.webglRenderer.ioPicker.nativeElement,this.outputsByHighlightedNode[n],"outgoing")}getHighlightedIncomingNodesAndEdges(t,n,r){let o=r?.ignoreEdgesWithinSameNamespace??!1,s=r?.reuseRenderedEdgeCurvePoints??!1;n||(n=this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.selectedNodeId]);let a=[],c=[],l={},d=[];for(let u of n.incomingEdges||[]){if(t[u.sourceNodeId])continue;let h=this.webglRenderer.curModelGraph.nodesById[u.sourceNodeId];if(!h||o&&h.namespace===n.namespace)continue;let p=YI(h.namespace,n.namespace),f=this.getLastCollapsedAncestorNode(h,p);c.push(f),l[f.id]==null&&(l[f.id]=[]),l[f.id].push(h);let m=this.findEdgeConnectingTwoNodesInNamespace(p,h.id,n.id),y=[],g=[];if(m){a.push(m);let _=m.curvePoints||[],x=this.webglRenderer.curModelGraph.nodesById[m.fromNodeId];if(m.fromNodeId!==f.id){let D=m.points[0].x+(x.globalX||0),E=m.points[0].y+(x.globalY||0),A=this.getBestAnchorPointOnNode(D,E,f);y.push({x:A.x-(f.globalX||0),y:A.y-(f.globalY||0)}),s&&g.push({x:A.x-(f.globalX||0),y:A.y-(f.globalY||0)},{x:_[0].x-(f.globalX||0)+(x.globalX||0),y:_[0].y-(f.globalY||0)+(x.globalY||0)})}let C=y,T=m.points;if(s&&(C=g,T=_),C.push(...T.map(D=>({x:D.x-(f.globalX||0)+(x.globalX||0),y:D.y-(f.globalY||0)+(x.globalY||0)}))),m.toNodeId!==n?.id){let D=m.points[m.points.length-1].x+(x.globalX||0),E=m.points[m.points.length-1].y+(x.globalY||0),A=this.getBestAnchorPointOnNode(D,E,n);s?g.push({x:_[_.length-1].x-(f.globalX||0)+(x.globalX||0),y:_[_.length-1].y-(f.globalY||0)+(x.globalY||0)},{x:A.x-(f.globalX||0),y:A.y-(f.globalY||0)}):y.push({x:A.x-(f.globalX||0),y:A.y-(f.globalY||0)})}}else(wt(f)||St(f)&&!f.hideInLayout)&&(s?g:y).push(...this.getDirectEdgeBetweenNodes(f,n));s?g.length>0&&d.push({id:`overlay_${f.id}___${n.id}`,fromNodeId:f.id,toNodeId:n.id,points:[],curvePoints:g,type:"incoming"}):y.length>0&&d.push({id:`overlay_${f.id}___${n.id}`,fromNodeId:f.id,toNodeId:n.id,points:y,type:"incoming"})}return{renderedEdges:a,highlightedNodes:c,inputsByHighlightedNode:l,overlayEdges:d}}getHighlightedOutgoingNodesAndEdges(t,n,r){let o=r?.ignoreEdgesWithinSameNamespace??!1,s=r?.reuseRenderedEdgeCurvePoints??!1;n||(n=this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.selectedNodeId]);let a=[],c=[],l={},d=[];for(let u of n.outgoingEdges||[]){if(t[u.sourceNodeOutputId])continue;let h=this.webglRenderer.curModelGraph.nodesById[u.targetNodeId];if(!h||o&&h.namespace===n.namespace)continue;let p=YI(h.namespace,n.namespace),f=this.getLastCollapsedAncestorNode(h,p);c.push(f),l[f.id]==null&&(l[f.id]=[]),l[f.id].push(h);let m=this.findEdgeConnectingTwoNodesInNamespace(p,n.id,h.id),y=[],g=[];if(m){a.push(m);let _=m.curvePoints||[],x=this.webglRenderer.curModelGraph.nodesById[m.fromNodeId];if(m.fromNodeId!==n?.id){let D=m.points[0].x+(x.globalX||0),E=m.points[0].y+(x.globalY||0),A=this.getBestAnchorPointOnNode(D,E,n);y.push({x:A.x-(n.globalX||0),y:A.y-(n.globalY||0)}),s&&g.push({x:A.x-(n.globalX||0),y:A.y-(n.globalY||0)},{x:_[0].x-(n.globalX||0)+(x.globalX||0),y:_[0].y-(n.globalY||0)+(x.globalY||0)})}let C=y,T=m.points;if(s&&(C=g,T=_),C.push(...T.map(D=>({x:D.x-(n.globalX||0)+(x.globalX||0),y:D.y-(n.globalY||0)+(x.globalY||0)}))),m.toNodeId!==f.id){let D=m.points[m.points.length-1].x+(x.globalX||0),E=m.points[m.points.length-1].y+(x.globalY||0),A=this.getBestAnchorPointOnNode(D,E,f);s?g.push({x:_[_.length-1].x-(n.globalX||0)+(x.globalX||0),y:_[_.length-1].y-(n.globalY||0)+(x.globalY||0)},{x:A.x-(n.globalX||0),y:A.y-(n.globalY||0)}):y.push({x:A.x-(n.globalX||0),y:A.y-(n.globalY||0)})}}else(wt(f)||St(f)&&!f.hideInLayout)&&(s?g:y).push(...this.getDirectEdgeBetweenNodes(n,f));s?g.length>0&&d.push({id:`overlay_${n.id}___${f.id}`,fromNodeId:n.id,toNodeId:f.id,points:[],curvePoints:g,type:"outgoing"}):y.length>0&&d.push({id:`overlay_${n.id}___${f.id}`,fromNodeId:n.id,toNodeId:f.id,points:y,type:"outgoing"})}return{renderedEdges:a,highlightedNodes:c,outputsByHighlightedNode:l,overlayEdges:d}}getLastCollapsedAncestorNode(t,n){let r=t,o=[];for(;r&&(wt(r)&&!r.expanded&&o.push(r),r.namespace!==n);)r=this.webglRenderer.curModelGraph.nodesById[r.nsParentId||""];return o.length>0?o[o.length-1]:t}shouldUpdateIncomingAndOutgoingEdgesHighlights(){if(!this.webglRenderer.selectedNodeId)return!1;let t=this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.selectedNodeId];if(wt(t))return!1;let n=this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.rootNodeId||""];return!(n&&wt(n)&&!(n.descendantsOpNodeIds||[]).includes(this.webglRenderer.selectedNodeId)||!this.webglRenderer.isNodeRendered(this.webglRenderer.selectedNodeId))}clearIncomingAndOutgoingHighlights(){this.incomingHighlightedEdges.clear(),this.outgoingHighlightedEdges.clear(),this.inputsByHighlightedNode={},this.outputsByHighlightedNode={},this.inputsRenderedEdges=[],this.outputsRenderedEdges=[];for(let t of[this.ioPickerBgs.mesh,this.ioPickerBgs.meshForRayCasting,this.ioPickerTexts.mesh,this.incomingHighlightedEdgeTexts.mesh,this.outgoingHighlightedEdgeTexts.mesh])t&&(t.geometry&&t.geometry.dispose(),this.webglRendererThreejsService.removeFromScene(t));this.ioPickerBgs.meshForRayCasting=void 0}findEdgeConnectingTwoNodesInNamespace(t,n,r){let o=t===""?"":`${t}___group___`;return this.webglRenderer.curModelGraph.edgesByGroupNodeIds[o].find(s=>{let a=this.webglRenderer.curModelGraph.nodesById[s.fromNodeId],c=this.webglRenderer.curModelGraph.nodesById[s.toNodeId],l=this.containNode(a,n),d=this.containNode(c,r);return l&&d})}containNode(t,n){return St(t)&&t.id===n||wt(t)&&(t.descendantsOpNodeIds||[]).includes(n)}getDirectEdgeBetweenNodes(t,n){let r=[],o=t.globalX||0,s=t.globalY||0,a=t.width||0,c=t.height||0,l=n.globalX||0,d=n.globalY||0,u=n.width||0,h=n.height||0,p=o+a/2,f=d>s?s+c:s,m=l+u/2,y=d>s?d:d+h;return r.push({x:p+(t.x||0)-o,y:f+(t.y||0)-s},{x:m+(n.x||0)-o,y:y+(n.y||0)-s}),r}getBestAnchorPointOnNode(t,n,r){let o=this.webglRenderer.getNodeX(r),s=this.webglRenderer.getNodeY(r),a=this.webglRenderer.getNodeWidth(r),c=this.webglRenderer.getNodeHeight(r),l=[{point:{x:o+a/2,y:s},distance:0,direction:"horizontal"},{point:{x:o+a,y:s+c/2},distance:0,direction:"vertical"},{point:{x:o+a/2,y:s+c},distance:0,direction:"horizontal"},{point:{x:o,y:s+c/2},distance:0,direction:"vertical"}];for(let d of l)d.distance=this.getDistanceSquared(t,n,d.point.x,d.point.y);if(l.sort((d,u)=>d.distance-u.distance),l[0].direction!==l[1].direction){let d=this.getAngle(t,n,l[0].point.x,l[0].point.y,l[0].direction),u=this.getAngle(t,n,l[1].point.x,l[1].point.y,l[1].direction);return d>=u?l[0].point:l[1].point}return l[0].point}getAngle(t,n,r,o,s){return Math.atan(s==="horizontal"?Math.abs(o-n)/Math.abs(r-t):Math.abs(r-t)/Math.abs(o-n))}getDistanceSquared(t,n,r,o){return Math.pow(t-r,2)+Math.pow(n-o,2)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var DO=TO,kG=68,PO=Ln,SC=(()=>{class i{IDENTICAL_GROUPS_BG_COLOR=new PO.Color("#e2edff");IDENTICAL_GROUPS_INDICATOR_BG_COLOR=new PO.Color("#e3e3e3");IDENTICAL_GROUPS_INDICATOR_BORDER_COLOR=new PO.Color("#ccc");webglRenderer;webglRendererThreejsService;threejsService=te(Sr);identicalLayerIndicatorBgs=new Ni(99);identicalLayerIndicatorTexts=new qi(this.threejsService);init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService}updateIdenticalLayerIndicators(){if(!this.webglRenderer.curModelGraph)return;this.clearIdenticalLayerIndicators();let t=this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.selectedNodeId],n=[],r=[];if(wt(t)&&t?.identicalGroupIndex!=null){let o=t.identicalGroupIndex,s=this.webglRenderer.nodesToRender.filter(({node:a})=>wt(a)&&a.identicalGroupIndex===o).map(({node:a})=>this.webglRenderer.curModelGraph.nodesById[a.id]);for(let a of s){if(a.id===t.id)continue;let c=this.webglRenderer.getNodeX(a)+kG/2,l=this.webglRenderer.getNodeY(a)-DO/2+DO/4;n.push({id:a.id,index:n.length,bound:{x:c,y:l,width:kG,height:DO},yOffset:95,isRounded:!0,borderColor:this.IDENTICAL_GROUPS_INDICATOR_BORDER_COLOR,bgColor:this.IDENTICAL_GROUPS_INDICATOR_BG_COLOR,borderWidth:1,opacity:1}),r.push({id:a.id,label:"Identical layer",height:8,hAlign:"center",vAlign:"center",weight:mn.MEDIUM,color:{r:0,g:0,b:0},x:c,y:96,z:l})}}this.identicalLayerIndicatorBgs.generateMesh(n,!1,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.identicalLayerIndicatorBgs.mesh),this.identicalLayerIndicatorTexts.generateMesh(r,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.identicalLayerIndicatorTexts.mesh),this.webglRenderer.animateIntoPositions(o=>{this.identicalLayerIndicatorBgs.updateAnimationProgress(o),this.identicalLayerIndicatorTexts.updateAnimationProgress(o)})}clearIdenticalLayerIndicators(){for(let t of[this.identicalLayerIndicatorBgs.mesh,this.identicalLayerIndicatorTexts.mesh])t&&(t.geometry&&t.geometry.dispose(),this.webglRendererThreejsService.removeFromScene(t))}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var MC=(()=>{class i{curIoTracingData;webglRenderer;init(t){this.webglRenderer=t}genTracingData(){if(!this.webglRenderer.selectedNodeId||!St(this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.selectedNodeId]))return;let t=new Set,n=new Set,r=[this.webglRenderer.selectedNodeId];for(;r.length>0;){let s=r.shift();if(n.has(s))continue;n.add(s);let a=this.webglRenderer.curModelGraph.nodesById[s];a.hideInLayout||t.add(s);for(let c of a.incomingEdges||[])r.push(c.sourceNodeId)}let o=new Set;for(r=[this.webglRenderer.selectedNodeId];r.length>0;){let s=r.shift();if(o.has(s))continue;o.add(s);let a=this.webglRenderer.curModelGraph.nodesById[s];a.hideInLayout||t.add(s);for(let c of a.outgoingEdges||[])r.push(c.targetNodeId)}for(let s of[...t]){let a=s;for(;;){let c=this.webglRenderer.curModelGraph.nodesById[a];if(!c.nsParentId||t.has(c.nsParentId))break;a=c.nsParentId,t.add(a)}}this.curIoTracingData={tracedNodeId:this.webglRenderer.selectedNodeId,visibleNodeIds:t}}clearTracingData(){this.curIoTracingData=void 0}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var Eue="/api/v1/read_text_file",Iue="/api/v1/load_node_data",Mr=(()=>{class i{appService;runs=ct({});remoteSourceLoading=ct(!1);leftPaneModelGraph$=qb(Bt(()=>this.appService.panes()[0].modelGraph));rightPaneModelGraph$=qb(Bt(()=>{let t=this.appService.panes();if(!(t.length<=1))return t[1].modelGraph}));constructor(t){this.appService=t,this.leftPaneModelGraph$.subscribe(n=>{n!=null&&this.handleModelGraphInPaneChanged(n,0)}),this.rightPaneModelGraph$.subscribe(n=>{n!=null&&this.handleModelGraphInPaneChanged(n,1)})}addRun(t,n,r,o,s,a=!1,c){let l=o.collectionLabel;this.runs.update(d=>{if(a){let h=[];for(let[p,f]of Object.entries(d))a&&f.collectionId===l&&h.push(p);for(let p of h)delete d[p]}d[t]={runId:t,runName:n,done:s!=null,results:s==null?void 0:{[o.id]:this.processNodeDataProviderDataForGraph(o,s)},extensionId:r,collectionId:l,remotePath:c,nodeDataProviderData:s};let u=this.appService.panes();for(let h of u)h.modelGraph?.id===o.id&&h.modelGraph?.collectionLabel===o.collectionLabel&&this.appService.setSelectedNodeDataProviderRunId(h.id,t);return Z({},d)})}updateRunResults(t,n,r,o){this.runs.update(s=>{let a=s[t];return a.done=!0,a.nodeDataProviderData=n,a.results==null&&(a.results={}),a.results[r.id]=this.processNodeDataProviderDataForGraph(r,n),o&&(a.error=o),Z({},s)})}addRunFromRemoteSource(t,n){return It(this,null,function*(){this.remoteSourceLoading.set(!0);let r=t.split("/"),o=r[r.length-1],s=`/read_file?path=${t}`;if(!0)if(t.startsWith("node_data://")){let d=t.replace("node_data://","").split("/");o=d[0];let u=Number(d[1]);s=`${Iue}?node_data_index=${u}`}else s=`${Eue}?path=${t}`;let a=Ur();this.addRun(a,o,"",n,void 0,!1,t);let c=yield fetch(s);if(!c.ok){this.updateRunResults(a,{[n.id]:{results:{}}},n,`Failed to load JSON file "${t}"`),this.remoteSourceLoading.set(!1);return}if(!0){let l=JSON.parse(yield c.text());if(l.error)this.updateRunResults(a,{[n.id]:{results:{}}},n,`Failed to process JSON file. ${l.error}`);else try{this.updateRunResults(a,this.getNodeDataProviderData(l.content,n),n),this.notifyRemoteNodeDataChanges()}catch(d){this.updateRunResults(a,{[n.id]:{results:{}}},n,`Failed to process JSON file. ${d}`)}}else{let l=JSON.parse((yield c.text()).replace(`)]}' -`,""));try{this.updateRunResults(a,this.getNodeDataProviderData(l.content,n),n),this.notifyRemoteNodeDataChanges()}catch(d){this.updateRunResults(a,{[n.id]:{results:{}}},n,`Failed to process JSON file. ${d}`)}}this.remoteSourceLoading.set(!1)})}deleteRun(t){this.runs.update(n=>(delete n[t],Z({},n))),this.notifyRemoteNodeDataChanges();for(let n of this.appService.panes())if(n.selectedNodeDataProviderRunId===t){let r=this.getRunsForModelGraph(n.modelGraph);this.appService.setSelectedNodeDataProviderRunId(n.id,r.length>0?r[0].runId:void 0)}}getSelectedRunForModelGraph(t,n){let r=this.appService.getSelectedNodeDataProviderRunId(t);return r?this.getRunsForModelGraph(n).find(s=>s.runId===r):void 0}getRunsForModelGraph(t){let n=[],r=this.runs();for(let o of Object.values(r)){if(o.collectionId!==t.collectionLabel)continue;let s=o.nodeDataProviderData;s&&s[t.id]!=null&&n.push(o)}return n}processNodeDataProviderDataForGraph(t,n){this.genOutputTensorIdToNodeIdMap(t);let r={},o=n[t.id];if(!o)return{};let s=[];for(let l of o.gradient||[]){let d={stop:l.stop};l.bgColor!=null&&(d.bgColor=this.getRgbFromColor(l.bgColor,"#ffffff")),l.textColor!=null&&(d.textColor=this.getRgbFromColor(l.textColor,"#000000")),s.push(d)}s.sort((l,d)=>l.stop-d.stop);let a=Number.POSITIVE_INFINITY,c=Number.NEGATIVE_INFINITY;if(s.length>0)for(let{value:l}of Object.values(o.results))typeof l=="number"&&(a=Math.min(a,l),c=Math.max(c,l));for(let l of Object.keys(o.results)){let d=o.results[l];if(typeof d.value=="number"&&d.bgColor==null&&(d.bgColor=this.getBgColor(d.value,o.thresholds||[],s,a,c)),typeof d.value=="number"&&d.textColor==null&&(d.textColor=this.getTextColor(d.value,o.thresholds||[],s,a,c)),(d.textColor==null||d.textColor==="")&&d.bgColor!=null){let y=this.getRgbFromColor(d.bgColor,"#ffffff");y!=null&&Math.pow(y.r/255,2.2)*.2126+Math.pow(y.g/255,2.2)*.7152+Math.pow(y.b/255,2.2)*.0722<.38&&(d.textColor="#ffffff")}let u="-",h=d.value;typeof h=="number"||typeof h=="boolean"||typeof h=="string"?u=`${h}`:u=JSON.stringify(h),u=u;let f=`${(t.outputTensorIdToNodeId||{})[l]??l}`,m=r[f];if(!m)r[f]=yt(Z({},d),{strValue:u,allValues:{[l]:d.value}});else{let y=m.allValues;y[l]=d.value,r[f]={value:d.value,bgColor:d.bgColor,textColor:d.textColor,allValues:y,strValue:`${m.strValue}, ${u}`}}}return r}getBgColor(t,n,r,o,s){if(r.length>0)return this.getColorFromGradient(t,r,o,s,!0,"transparent");for(let a of n)if(t<=a.value)return a.bgColor;return"transparent"}getTextColor(t,n,r,o,s){if(r.length>0)return this.getColorFromGradient(t,r,o,s,!1,"");for(let a of n)if(t<=a.value)return a.textColor||"";return""}getColorFromGradient(t,n,r,o,s,a){let c=(t-r)/(o-r);for(let l=0;l=d.stop&&c<=u.stop){if(h==null||p==null)return a;let f=(c-d.stop)/(u.stop-d.stop),m=Math.floor(h.r+(p.r-h.r)*f),y=Math.floor(h.g+(p.g-h.g)*f),g=Math.floor(h.b+(p.b-h.b)*f);return`#${this.numToHex(m)}${this.numToHex(y)}${this.numToHex(g)}`}}return a}genOutputTensorIdToNodeIdMap(t){if(t.outputTensorIdToNodeId==null){t.outputTensorIdToNodeId={};for(let n of t.nodes)if(St(n)){let r=n.outputsMetadata||{};for(let o of Object.keys(r)){let a=r[o].tensor_name;a!=null&&(t.outputTensorIdToNodeId[a]=n.id)}}}}handleModelGraphInPaneChanged(t,n){let r=this.getRunsForModelGraph(t);if(r.length>0){for(let o of r)o.results==null&&(o.results={}),o.results[t.id]==null&&o.nodeDataProviderData!=null&&(o.results[t.id]=this.processNodeDataProviderDataForGraph(t,o.nodeDataProviderData));this.appService.setSelectedNodeDataProviderRunId(this.appService.panes()[n].id,r[0].runId)}}getRgbFromColor(t,n){let r=t;return t.startsWith("#")||(r=Jb[t]),r||(r=n),r=r.replace("#",""),{r:this.hexStrToInt(r.substring(0,2)),g:this.hexStrToInt(r.substring(2,4)),b:this.hexStrToInt(r.substring(4,6))}}numToHex(t){let n=t.toString(16);return n.length===1?`0${n}`:n}hexStrToInt(t){return/^[a-fA-F0-9]+$/.test(t)?parseInt(t,16):255}getNodeDataProviderData(t,n){let r=JSON.parse(t),o={};return r.results!=null&&r.results.results==null?n&&(o[n.id]=r):o=r,o}notifyRemoteNodeDataChanges(){let t=Object.values(this.runs()).filter(n=>n.remotePath!=null).map(n=>n.remotePath);this.appService.remoteNodeDataPaths.set(t)}static \u0275fac=function(n){return new(n||i)(X(at))};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var Tue=en*.5,Due=Ln,EC=(()=>{class i{nodeDataProviderExtensionService;curNodeDataProviderResults=Bt(()=>this.webglRenderer?(this.nodeDataProviderExtensionService.getSelectedRunForModelGraph(this.webglRenderer.paneId,this.webglRenderer.curModelGraph)?.results||{})[this.webglRenderer.curModelGraph.id]:void 0);webglRenderer;webglRendererThreejsService;nodeDataProviderDistributionBars=new Ni(0);constructor(t){this.nodeDataProviderExtensionService=t}init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService}renderNodeDataProviderDistributionBars(){let t=this.curNodeDataProviderResults()||{};if(Object.keys(t).length===0)return;let{groupIdToDescendantsBgColorCounts:n,sortedBgColors:r}=this.genGroupIdToDescendantsBgColorCounts(),o=[];for(let{node:s,index:a}of this.webglRenderer.nodesToRender){if(!n[s.id])continue;let c=s,l=c.width||0,d=n[s.id],u=0;for(let f of Object.values(d))u+=f;let h=0,p=0;for(let f of r){if(d[f]==null||f==="transparent")continue;let y=d[f]/u*l,g=VI,_=h;o.push({id:`${s.id}_${p}`,index:o.length,bound:{x:this.webglRenderer.getNodeX(c)+_+y/2,y:this.webglRenderer.getNodeY(c)+this.webglRenderer.getNodeHeight(c)-VI+g/2,width:y,height:g},yOffset:en*a+Tue,isRounded:!1,borderColor:{r:1,g:1,b:1},bgColor:new Due.Color(f),borderWidth:0,opacity:1}),h+=y,p++}}this.nodeDataProviderDistributionBars.generateMesh(o),this.webglRendererThreejsService.addToScene(this.nodeDataProviderDistributionBars.mesh)}updateAnimationProgress(t){this.nodeDataProviderDistributionBars.updateAnimationProgress(t)}genGroupIdToDescendantsBgColorCounts(){let t=this.curNodeDataProviderResults()||{},n={},r=new Set;for(let{node:o}of this.webglRenderer.nodesToRender)if(wt(o)&&!o.expanded){let s={};for(let a of o.descendantsOpNodeIds||[]){let c=this.webglRenderer.curModelGraph.nodesById[a],l=t[c.id]?.bgColor||"";l&&(s[l]==null&&(s[l]=0),s[l]++,r.add(l))}n[o.id]=s}return{groupIdToDescendantsBgColorCounts:n,sortedBgColors:[...r].sort((o,s)=>o.localeCompare(s))}}static \u0275fac=function(n){return new(n||i)(X(Mr))};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var Oue=-en*.3,Rue=en*.3,Aue=Ln,IC=(()=>{class i{appService;SEARCH_RESULTS_HIGHLIGHT_COLOR=new Aue.Color("#f5d55a");searchResultsHighlightBorders=new Ni(8);searchResultsNodeLabelHighlightBg=new Ni(4);webglRenderer;webglRendererThreejsService;curSearchResults=void 0;constructor(t){this.appService=t}init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService,lt(()=>{let n=this.appService.getPaneById(this.webglRenderer.paneId);!n||!n.modelGraph||this.curSearchResults!==n.searchResults&&(this.curSearchResults=n.searchResults,this.renderSearchResults(),this.webglRendererThreejsService.render())})}renderSearchResults(){if(!this.curSearchResults)return;this.clearSearchResults();let t=new Set;for(let s of Object.keys(this.curSearchResults.results)){let a=this.webglRenderer.curModelGraph.nodesById[s];if(this.webglRenderer.isNodeRendered(s))t.add(s);else{let c=a;for(;c&&(c=this.webglRenderer.curModelGraph.nodesById[c.nsParentId||""],!(!c||this.webglRenderer.isNodeRendered(c.id))););t.add(c.id)}}let n=[];for(let s of t){let a=this.webglRenderer.curModelGraph.nodesById[s],c=this.webglRenderer.nodesToRenderMap[s].index,l=this.webglRenderer.getNodeX(a)-2,d=this.webglRenderer.getNodeY(a)-2,u=this.webglRenderer.getNodeWidth(a)+4,h=this.webglRenderer.getNodeHeight(a)+4;n.push({id:s,index:n.length,bound:{x:l+u/2,y:d+h/2,width:u,height:h},yOffset:en*c+Oue,isRounded:!0,borderColor:{r:1,g:1,b:1},bgColor:this.SEARCH_RESULTS_HIGHLIGHT_COLOR,borderWidth:0,opacity:1})}this.searchResultsHighlightBorders.generateMesh(n),this.webglRendererThreejsService.addToScene(this.searchResultsHighlightBorders.mesh);let r=[],o=zo/this.webglRenderer.texts.getFontSize();for(let s of Object.keys(this.curSearchResults.results)){if(!this.webglRenderer.isNodeRendered(s))continue;let a=this.curSearchResults.results[s];for(let c of a)if(c.type===xt.NODE_LABEL){let l=this.webglRenderer.curModelGraph.nodesById[s],d=this.webglRenderer.nodesToRenderMap[s].index,u=this.webglRenderer.getNodeX(l)+this.webglRenderer.getNodeWidth(l)/2,h=0,p=0,f=0,m=md(l.label);if(m.length===1){let y=this.webglRenderer.texts.getLabelSizes(l.label,wt(l)?mn.BOLD:mn.MEDIUM,zo).sizes;f=(y.maxX-y.minX)*o+4,p=(y.maxZ-y.minZ)*o+4,h=this.webglRenderer.getNodeY(l)+this.webglRenderer.getNodeLabelRelativeY(l)-2*o}else{let{minX:y,maxX:g}=this.webglRenderer.getNodeLabelSizes(l);f=(g-y)*o+4,p=m.length*xh+4,h=this.webglRenderer.getNodeY(l)+p/2+4.5-2*o}r.push({id:s,index:n.length,bound:{x:u,y:h,width:f,height:p},yOffset:en*d+Rue,isRounded:!0,borderColor:{r:1,g:1,b:1},bgColor:this.SEARCH_RESULTS_HIGHLIGHT_COLOR,borderWidth:0,opacity:1})}}this.searchResultsNodeLabelHighlightBg.generateMesh(r),this.webglRendererThreejsService.addToScene(this.searchResultsNodeLabelHighlightBg.mesh),this.webglRenderer.animateIntoPositions(s=>{this.searchResultsHighlightBorders.updateAnimationProgress(s),this.searchResultsNodeLabelHighlightBg.updateAnimationProgress(s)})}clearSearchResults(){for(let t of[this.searchResultsHighlightBorders.mesh,this.searchResultsNodeLabelHighlightBg.mesh])t&&(t.geometry&&t.geometry.dispose(),this.webglRendererThreejsService.removeFromScene(t))}static \u0275fac=function(n){return new(n||i)(X(at))};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var LG=320,TC=(()=>{class i{appService;destroyRef;webglRenderer;webglRendererThreejsService;constructor(t,n){this.appService=t,this.destroyRef=n}init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService,this.appService.addSnapshotClicked.pipe(Ei(this.destroyRef)).subscribe(n=>{n.rendererId===this.webglRenderer.rendererId&&this.addSnapshot()}),this.appService.curSnapshotToRestore.pipe(Ei(this.destroyRef)).subscribe(n=>{n.rendererId===this.webglRenderer.rendererId&&this.restoreSnapshot(n.snapshot)})}addSnapshot(){return It(this,null,function*(){this.webglRenderer.flash();let t=yield this.takeSnapshot();this.webglRenderer.appService.addSnapshot(t,this.webglRenderer.curModelGraph.id,this.webglRenderer.paneId)})}takeSnapshot(){return It(this,null,function*(){let t=this.webglRenderer.container.nativeElement,n=this.webglRendererThreejsService.convertScreenPosToScene(0,0),r=this.webglRendererThreejsService.convertScreenPosToScene(t.clientWidth,t.clientHeight),o={x:n.x,y:n.y,width:r.x-n.x,height:r.y-n.y},s=[];Nm(void 0,this.webglRenderer.curModelGraph,s);let a=this.webglRenderer.canvas.nativeElement,c=this.webglRenderer.snapshotCanvas.nativeElement,l=LG,d=LG/a.width*a.height;this.webglRendererThreejsService.renderSnapshot(l,d);let u=window.devicePixelRatio,h=new OffscreenCanvas(l*u,d*u),p=h.getContext("2d");p.imageSmoothingQuality="high",p.drawImage(c,0,0,c.width,c.height,0,0,h.width,h.height);let f=yield createImageBitmap(h),m=this.webglRenderer.appService.getFlattenLayers(this.webglRenderer.paneId);return{id:Ur(),rect:o,imageBitmap:f,selectedNodeId:this.webglRenderer.selectedNodeId,deepestExpandedGroupNodeIds:s,showOnNodeItemTypes:Z({},this.webglRenderer.curShowOnNodeItemTypes),showOnEdgeItemTypes:Z({},this.webglRenderer.curShowOnEdgeItemTypes),flattenLayers:m}})}restoreSnapshot(t){t.showOnNodeItemTypes&&(this.webglRenderer.curShowOnNodeItemTypes=Z({},t.showOnNodeItemTypes),this.webglRenderer.appService.setShowOnNode(this.webglRenderer.paneId,this.webglRenderer.rendererId,this.webglRenderer.curShowOnNodeItemTypes)),t.showOnEdgeItemTypes&&(this.webglRenderer.curShowOnEdgeItemTypes=Z({},t.showOnEdgeItemTypes),this.webglRenderer.appService.setShowOnEdge(this.webglRenderer.paneId,this.webglRenderer.rendererId,this.webglRenderer.curShowOnEdgeItemTypes));let n=this.webglRenderer.appService.getFlattenLayers(this.webglRenderer.paneId),r=t.flattenLayers===!0;n!==r?(this.webglRenderer.appService.processGraph(this.webglRenderer.paneId,r,t),this.webglRenderer.appService.setFlattenLayersInCurrentPane(r)):this.webglRenderer.sendRelayoutGraphRequest(t.selectedNodeId||"",t.deepestExpandedGroupNodeIds||[],!1,t.rect,!0,t.showOnNodeItemTypes)}static \u0275fac=function(n){return new(n||i)(X(at),X(Fi))};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var FG={r:1,g:1,b:1},DC=14,Lue=Ln,PC=(()=>{class i{appService;subgraphSelectionService;SUBGRAPH_SELECTED_NODE_MARKER_BG_COLOR=new Lue.Color("#09B83E");webglRenderer;webglRendererThreejsService;threejsService=te(Sr);curSubgraphSelectedNodeIds={};subgraphsSelectedNodeMarkerBgs=new Ni(99);subgraphSelectedNodeMarkerTexts=new qi(this.threejsService);constructor(t,n){this.appService=t,this.subgraphSelectionService=n}init(t){this.webglRenderer=t,this.webglRendererThreejsService=t.webglRendererThreejsService,lt(()=>{this.curSubgraphSelectedNodeIds=this.subgraphSelectionService.selectedNodeIds(),this.renderSubgraphSelectedNodeMarkers()})}renderSubgraphSelectedNodeMarkers(){if(!this.enableSubgraphSelection)return;let t=Object.keys(this.curSubgraphSelectedNodeIds),n=new Set(t);if(this.clearSubgraphSelectedNodeMarkers(),t.length===0){this.webglRendererThreejsService.render();return}let r=[],o=new Set;for(let a of t){let l=this.webglRenderer.curModelGraph.nodesById[a];for(;;){let d=this.webglRenderer.curModelGraph.nodesById[l.nsParentId||""];if(d)o.add(d.id),l=d;else break}}let s=[];for(let a of o){if(!this.webglRenderer.isNodeRendered(a))continue;let c=this.webglRenderer.curModelGraph.nodesById[a],l=this.webglRenderer.getNodeX(c)+this.webglRenderer.getNodeWidth(c),d=this.webglRenderer.getNodeY(c),u=(c.descendantsOpNodeIds||[]).filter(f=>{let m=this.webglRenderer.curModelGraph.nodesById[f];return n.has(m.id)}).length;s.push({id:`${a}_subgraph_count_label`,nodeId:a,label:`${u}`,height:8,hAlign:"center",vAlign:"center",weight:mn.MEDIUM,color:this.webglRenderer.NODE_LABEL_COLOR,x:l,y:96,z:d+1});let h=DC*(u>=1e3?2:1.5),p=DC;r.push({id:a,index:r.length,bound:{x:l,y:d,width:h,height:p},yOffset:95.5,isRounded:!0,borderColor:this.SUBGRAPH_SELECTED_NODE_MARKER_BG_COLOR,bgColor:FG,borderWidth:1.5,opacity:1})}for(let a of t){if(!this.webglRenderer.isNodeRendered(a))continue;let c=this.webglRenderer.curModelGraph.nodesById[a],l=this.webglRenderer.getNodeX(c)+this.webglRenderer.getNodeWidth(c),d=this.webglRenderer.getNodeY(c),u=DC,h=DC;r.push({id:a,index:r.length,bound:{x:l,y:d,width:u,height:h},yOffset:95.5,isRounded:!0,borderColor:this.SUBGRAPH_SELECTED_NODE_MARKER_BG_COLOR,bgColor:FG,borderWidth:1.5,opacity:1}),s.push({id:`${c.id}_checkmark`,nodeId:c.id,label:"0xe876",height:24,hAlign:"center",vAlign:"center",weight:mn.ICONS,color:this.SUBGRAPH_SELECTED_NODE_MARKER_BG_COLOR,x:l,y:96,z:d+14,treatLabelAsAWhole:!0,weightLevel:.9})}this.subgraphsSelectedNodeMarkerBgs.generateMesh(r,!1,!1,!1,!0),this.webglRendererThreejsService.addToScene(this.subgraphsSelectedNodeMarkerBgs.mesh),this.subgraphSelectedNodeMarkerTexts.generateMesh(s,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.subgraphSelectedNodeMarkerTexts.mesh),this.webglRenderer.animateIntoPositions(a=>{this.subgraphsSelectedNodeMarkerBgs.updateAnimationProgress(a),this.subgraphSelectedNodeMarkerTexts.updateAnimationProgress(a)})}get enableSubgraphSelection(){return this.appService.config()?.enableSubgraphSelection===!0}clearSubgraphSelectedNodeMarkers(){for(let t of[this.subgraphsSelectedNodeMarkerBgs.mesh,this.subgraphSelectedNodeMarkerTexts.mesh])t&&(t.geometry&&t.geometry.dispose(),this.webglRendererThreejsService.removeFromScene(t))}static \u0275fac=function(n){return new(n||i)(X(at),X(Ko))};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var Er=500,BG=200,is=Ln,OC=(()=>{class i{curScale=1;fps="";camera;raycaster;zoom=fD();webglRenderer;curTranslateX=0;curTranslateY=0;scene;renderer;snapshotRenderer;pngDownloaderRenderer;savedCenterX=null;savedCenterY=null;resizeTimeoutRef=-1;fpsStartTime=-1;frames=0;init(t){this.webglRenderer=t}setupZoomAndPan(t,n=.1,r=10){let o=$o(t),s=0,a=0;this.zoom.scaleExtent([n,r]).wheelDelta(()=>-ht.deltaY*(ht.deltaMode?120:1)/150).filter(()=>{if(ht.type==="mousedown"&&(s=this.curTranslateX,a=this.curTranslateY),ht.button===2||Am&&ht.ctrlKey&&ht.button===0&&ht.type==="mousedown")return!1;if(ht.type==="dblclick")return ht.stopPropagation(),this.webglRenderer.handleDoubleClickOnGraph(ht.altKey,ht.shiftKey),!1;if(ht.type==="wheel"&&!ht.ctrlKey){let c=.5/this.curScale;return this.zoom.translateBy(o,-Number(ht.deltaX)*c,-Number(ht.deltaY)*c),ht.preventDefault(),!1}return!0}).on("zoom",()=>{this.handleZoom()}).on("end",()=>{this.handleZoomEnd(s,a)}),this.zoom.interpolate(Pd),o.call(this.zoom)}setupThreeJs(){let t=this.webglRenderer.canvas.nativeElement;this.scene=new is.Scene,this.scene.background=new is.Color(16777215);let n=t.clientWidth/t.clientHeight;this.camera=new is.OrthographicCamera(0,2*Er*n,0,-2*Er,.001,1e3),this.camera.position.y=BG,this.camera.lookAt(new is.Vector3(0,0,0)),this.camera.updateMatrixWorld(),this.camera.updateProjectionMatrix(),this.renderer=new is.WebGLRenderer({canvas:t,powerPreference:"high-performance",precision:"highp",antialias:!0,alpha:!0});let r=pd();this.renderer.setPixelRatio(r),this.renderer.setSize(t.clientWidth,t.clientHeight);let o=this.webglRenderer.snapshotCanvas.nativeElement;this.snapshotRenderer=new is.WebGLRenderer({canvas:o,powerPreference:"high-performance",precision:"highp",antialias:!0,alpha:!0,preserveDrawingBuffer:!0}),this.snapshotRenderer.setPixelRatio(r),this.render(),new ResizeObserver(()=>{requestAnimationFrame(()=>{this.resizeRendererToDisplaySize()})}).observe(this.webglRenderer.container.nativeElement),this.raycaster=new is.Raycaster,this.raycaster.params.Points.threshold=5.5}clearScene(t=[]){for(let n=this.scene.children.length-1;n>=0;n--){let r=this.scene.children[n];t.includes(r)||(r.geometry&&r.geometry.dispose(),this.scene.remove(r))}}setupPngDownloaderRenderer(t,n,r,o){this.pngDownloaderRenderer||(this.pngDownloaderRenderer=new is.WebGLRenderer({canvas:t,powerPreference:"high-performance",precision:"highp",antialias:!0,alpha:!0,preserveDrawingBuffer:!0}),this.pngDownloaderRenderer.setPixelRatio(pd())),n&&(this.scene.background=null,this.pngDownloaderRenderer.setClearColor(0,0)),this.pngDownloaderRenderer.setSize(r,o,!1)}renderPngDownloader(t){this.pngDownloaderRenderer.render(this.scene,t)}renderSnapshot(t,n){this.snapshotRenderer.setSize(t,n,!1),this.snapshotRenderer.render(this.scene,this.camera)}setSceneBackground(t){this.scene.background=t}createOrthographicCamera(t,n,r,o){let s=new is.OrthographicCamera(t,n,r,o,.001,1e3);return s.position.y=BG,s.lookAt(new is.Vector3(0,0,0)),s.updateMatrixWorld(),s.updateProjectionMatrix(),s}dispose(){this.renderer&&(this.renderer.dispose(),this.renderer.forceContextLoss()),this.snapshotRenderer&&(this.snapshotRenderer.dispose(),this.snapshotRenderer.forceContextLoss()),this.pngDownloaderRenderer&&(this.pngDownloaderRenderer.dispose(),this.pngDownloaderRenderer.forceContextLoss())}render(t=!1){if(!(!this.renderer||!this.scene||!this.camera)&&(this.renderer.render(this.scene,this.camera),this.webglRenderer.benchmark&&t)){this.fpsStartTime<0&&(this.fpsStartTime=performance.now()),this.frames+=1;let n=performance.now()-this.fpsStartTime;n>1e3&&(this.fps=(this.frames/n*1e3).toFixed(1),this.fpsStartTime=-1,this.frames=0,this.webglRenderer.changeDetectorRef.markForCheck())}}zoomFitGraph(t=.9,n=200){this.zoomFit({x:this.webglRenderer.currentMinX,y:this.webglRenderer.currentMinZ,width:this.webglRenderer.currentMaxX-this.webglRenderer.currentMinX,height:this.webglRenderer.currentMaxZ-this.webglRenderer.currentMinZ},t,n)}zoomFit(t,n=.9,r=300,o=!1,s=!0,a=!1){if(!this.webglRenderer.container)return;let c=this.webglRenderer.container.nativeElement,l=c.clientWidth*n,d=c.clientHeight*n,u=t.width/t.height,h=l/d,p=o?this.curScale:Math.abs(u>h?this.convertXFromScreenToScene(l)/t.width:this.convertZFromScreenToScene(d)/t.height),f=t.x+t.width/2,m=t.y+t.height/2;if(!o&&s){let y=this.convertZFromScreenToScene(45)/30;if(p=Math.min(y,p),a){let g=this.convertZFromScreenToScene(20)/30;p{let o=n.nodesById[t];this.zoomFit({x:this.webglRenderer.getNodeX(o),y:this.webglRenderer.getNodeY(o),width:this.webglRenderer.getNodeWidth(o),height:this.webglRenderer.getNodeHeight(o)},.9,r,!1,!0,!0)},0):setTimeout(()=>{this.zoomFitGraph(.9,r)})}addToScene(t){t&&this.scene.add(t)}removeFromScene(t){t&&this.scene.remove(t)}convertXFromSceneToScreen(t){if(!this.webglRenderer.container)return 0;let n=this.webglRenderer.container.nativeElement,r=n.clientWidth,o=r/n.clientHeight;return t/(Er/1*o)/-2*r}convertZFromSceneToScreen(t){if(!this.webglRenderer.container)return 0;let r=this.webglRenderer.container.nativeElement.clientHeight;return t*1*r/Er/2}convertXFromScreenToScene(t){if(!this.webglRenderer.container)return 0;let n=this.webglRenderer.container.nativeElement,r=n.clientWidth,o=r/n.clientHeight;return t/r*-2*(Er/1*o)}convertZFromScreenToScene(t,n=1){if(!this.webglRenderer.container)return 0;let o=this.webglRenderer.container.nativeElement.clientHeight;return t*Er*2/n/o}convertScenePosToScreen(t,n){let r=this.webglRenderer.container.nativeElement,o=r.clientWidth,s=r.clientHeight,a=new is.Vector3(t,0,n);return a.project(this.camera),{x:a.x*o/2+o/2,y:-(a.y*s/2)+s/2}}convertScreenPosToScene(t,n){let r=new is.Vector3;r.set(t/this.webglRenderer.canvas.nativeElement.offsetWidth*2-1,-(n/this.webglRenderer.canvas.nativeElement.offsetHeight)*2+1,-1);let o=r.unproject(this.camera);return{x:o.x,y:o.z}}handleZoom(){this.curScale=ht.transform.k,this.curTranslateX=ht.transform.x,this.curTranslateY=ht.transform.y,requestAnimationFrame(()=>{this.camera&&(this.setCameraFrustum(),this.webglRenderer.updateNodeBgColorWhenFar(),this.render(),this.webglRenderer.handleHoveredGroupNodeIconChanged())})}handleZoomEnd(t,n){if(ht.sourceEvent&&ht.sourceEvent.type==="mouseup"){let r=Math.abs(this.curTranslateX-t),o=Math.abs(this.curTranslateY-n);r>=0&&r<=3&&o>=0&&o<=3&&this.webglRenderer.handleClickOnGraph(ht.sourceEvent.shiftKey)}}setCameraFrustum(){let t=this.webglRenderer.container.nativeElement,n=t.clientWidth,r=t.clientHeight,o=n/r,s=this.curTranslateX-n/2,a=this.curTranslateY-r/2;this.camera.left=-Er/this.curScale*o-s/n*2*Er/this.curScale*o,this.camera.right=Er/this.curScale*o-s/n*2*Er/this.curScale*o,this.camera.top=Er/this.curScale+a*Er/this.curScale/r*2,this.camera.bottom=-Er/this.curScale+a*Er/this.curScale/r*2,this.camera.updateProjectionMatrix()}resizeRendererToDisplaySize(t=!0){let n=this.webglRenderer.container.nativeElement,r=this.renderer.domElement,o=n.clientWidth,s=n.clientHeight;if(o===0||s===0)return;if(r.width!==o||r.height!==s){if(this.savedCenterX==null&&this.savedCenterY==null){let{x:c,y:l}=this.convertScreenPosToScene(o/2,s/2);this.savedCenterX=c,this.savedCenterY=l}this.renderer.setSize(o,s,!1),this.webglRenderer.canvas.nativeElement.style.width="100%",this.webglRenderer.canvas.nativeElement.style.height="100%",this.setCameraFrustum(),this.render(),this.zoomFit({x:this.savedCenterX,y:this.savedCenterY,width:1e-7,height:1e-7},.9,0,!0),this.resizeTimeoutRef>=0&&window.clearTimeout(this.resizeTimeoutRef),this.resizeTimeoutRef=window.setTimeout(()=>{this.savedCenterX=null,this.savedCenterY=null},500)}}centerViewAt(t,n,r,o=300){if(!this.webglRenderer.container)return;let s=this.webglRenderer.container.nativeElement,a=s.clientWidth,c=s.clientHeight,l=a/c,d=-2*Er*l/2/r+t,u=-n+Er/r,h=Bd.scale(r).translate(this.convertXFromSceneToScreen(d),this.convertZFromSceneToScreen(u)),p=$o(s);o===0?p.call(this.zoom.transform,h):p.transition().duration(this.webglRenderer.appService.testMode?0:o).ease(XT).call(this.zoom.transform,h)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var cf=function(i){return i.COLOR="COLOR",i.NUMBER="NUMBER",i}(cf||{}),Vue={type:cf.COLOR,label:"Bg color",id:qs.NODE_BG_COLOR,defaultValue:"#ffffff"},zue={type:cf.COLOR,label:"Border color",id:qs.NODE_BORDER_COLOR,defaultValue:"#777777"},Uue={type:cf.COLOR,label:"Text color",id:qs.NODE_TEXT_COLOR,defaultValue:"#041e49"},zG=[Vue,zue,Uue],VG="model_explorer_node_styler_rules",pa=(()=>{class i{appService;localStorageService;rules=ct([]);matchedNodes=ct({});hasNonEmptyNodeStylerRules=Bt(()=>this.rules().filter(t=>Ch(t.queries)&&Object.keys(t.styles).length>0).length>0);constructor(t,n){if(this.appService=t,this.localStorageService=n,lt(()=>{let r=this.rules();this.appService.testMode||this.localStorageService.setItem(VG,JSON.stringify(r)),this.computeMatchedNodes(r)}),this.appService.testMode){let r=new URLSearchParams(document.location.search),o=decodeURIComponent(r.get("test_node_styler_rules")||"");this.updateRules(o===""?[]:JSON.parse(o))}else{let r=this.localStorageService.getItem(VG)||"",o=r===""?[]:JSON.parse(r);this.updateRules(o)}}addNewRule(){this.rules.update(t=>{let n=[...t];return n.push({queries:[{type:Vn.NODE_TYPE,nodeType:_r.OP_NODES},{type:Vn.REGEX,queryRegex:"",matchTypes:[xt.NODE_LABEL]}],nodeType:_r.OP_NODES,styles:{},version:$b.V2}),n})}moveUpRule(t){this.rules.update(n=>{let r=[...n],o=n[t];return r.splice(t,1),r.splice(t-1,0,o),r})}moveDownRule(t){this.rules.update(n=>{let r=[...n],o=n[t];return r.splice(t,1),r.splice(t+1,0,o),r})}duplicateRule(t){this.rules.update(n=>{let r=JSON.parse(JSON.stringify(n[t]));return[...n.slice(0,t),r,...n.slice(t)]})}updateRules(t){this.rules.set(this.convertOldRulesIfNecessary(t))}updateQueries(t,n){this.rules.update(r=>{let o=r[t];return o.queries=n,[...r]})}toggleStyle(t,n,r){this.rules.update(o=>{let s=o[t];return r==null?s.styles[n.id]==null?s.styles[n.id]={id:n.id,value:n.defaultValue}:delete s.styles[n.id]:r?s.styles[n.id]={id:n.id,value:n.defaultValue}:delete s.styles[n.id],[...o]})}updateStyleValue(t,n,r){this.rules.update(o=>{let s=o[t],a=s.styles[n.id];return a&&(typeof a=="string"?s.styles[n.id]=r:a.value=r),[...o]})}deleteRule(t){this.rules.update(n=>{let r=[...n];return r.splice(t,1),r})}convertOldRulesIfNecessary(t){return t.map(n=>{if(n.version==null&&n.nodeType){let r={type:Vn.NODE_TYPE,nodeType:n.nodeType};n.queries.unshift(r),n.version=$b.V2}return n})}computeMatchedNodes(t){let n=ny(t),r={};if(t.length>0&&t.some(o=>Ch(o.queries))){let o=this.appService.panes();for(let s=0;sthis._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(e){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(e,Wue))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}},UG=new me("MatSnackBarData"),lf=class{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}},$ue=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=Ve({type:e,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"],standalone:!0});let i=e;return i})(),que=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=Ve({type:e,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"],standalone:!0});let i=e;return i})(),Yue=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=Ve({type:e,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"],standalone:!0});let i=e;return i})(),HG=(()=>{let e=class e{constructor(n,r){this.snackBarRef=n,this.data=r}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}};e.\u0275fac=function(r){return new(r||e)(M(Q_),M(UG))},e.\u0275cmp=ce({type:e,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],standalone:!0,features:[le],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions",""],["mat-button","","matSnackBarAction","",3,"click"]],template:function(r,o){r&1&&(v(0,"div",0),S(1),b(),$(2,Hue,3,1,"div",1)),r&2&&(w(),Se(" ",o.data.message,` -`),w(),oe(o.hasAction?2:-1))},dependencies:[Ti,$ue,que,Yue],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0});let i=e;return i})(),Xue={snackBarState:li("state",[vi("void, hidden",Kt({transform:"scale(0.8)",opacity:0})),vi("visible",Kt({transform:"scale(1)",opacity:1})),An("* => visible",Rn("150ms cubic-bezier(0, 0, 0.2, 1)")),An("* => void, * => hidden",Rn("75ms cubic-bezier(0.4, 0.0, 1, 1)",Kt({opacity:0})))])},Zue=0,Que=(()=>{let e=class e extends da{constructor(n,r,o,s,a){super(),this._ngZone=n,this._elementRef=r,this._changeDetectorRef=o,this._platform=s,this.snackBarConfig=a,this._document=te(Xe),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new pe,this._onExit=new pe,this._onEnter=new pe,this._animationState="void",this._liveElementId=`mat-snack-bar-container-live-${Zue++}`,this.attachDomPortal=c=>{this._assertNotAttached();let l=this._portalOutlet.attachDomPortal(c);return this._afterPortalAttached(),l},a.politeness==="assertive"&&!a.announcementMessage?this._live="assertive":a.politeness==="off"?this._live="off":this._live="polite",this._platform.FIREFOX&&(this._live==="polite"&&(this._role="status"),this._live==="assertive"&&(this._role="alert"))}attachComponentPortal(n){this._assertNotAttached();let r=this._portalOutlet.attachComponentPortal(n);return this._afterPortalAttached(),r}attachTemplatePortal(n){this._assertNotAttached();let r=this._portalOutlet.attachTemplatePortal(n);return this._afterPortalAttached(),r}onAnimationEnd(n){let{fromState:r,toState:o}=n;if((o==="void"&&r!=="void"||o==="hidden")&&this._completeExit(),o==="visible"){let s=this._onEnter;this._ngZone.run(()=>{s.next(),s.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._ngZone.run(()=>{this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId)}),this._onExit}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){queueMicrotask(()=>{this._onExit.next(),this._onExit.complete()})}_afterPortalAttached(){let n=this._elementRef.nativeElement,r=this.snackBarConfig.panelClass;r&&(Array.isArray(r)?r.forEach(a=>n.classList.add(a)):n.classList.add(r)),this._exposeToModals();let o=this._label.nativeElement,s="mdc-snackbar__label";o.classList.toggle(s,!o.querySelector(`.${s}`))}_exposeToModals(){let n=this._liveElementId,r=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let o=0;o{let r=n.getAttribute("aria-owns");if(r){let o=r.replace(this._liveElementId,"").trim();o.length>0?n.setAttribute("aria-owns",o):n.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{let n=this._elementRef.nativeElement.querySelector("[aria-hidden]"),r=this._elementRef.nativeElement.querySelector("[aria-live]");if(n&&r){let o=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&n.contains(document.activeElement)&&(o=document.activeElement),n.removeAttribute("aria-hidden"),r.appendChild(n),o?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}};e.\u0275fac=function(r){return new(r||e)(M(Fe),M(Re),M(Ne),M(gn),M(lf))},e.\u0275cmp=ce({type:e,selectors:[["mat-snack-bar-container"]],viewQuery:function(r,o){if(r&1&&(Ee(es,7),Ee(Gue,7)),r&2){let s;be(s=ye())&&(o._portalOutlet=s.first),be(s=ye())&&(o._label=s.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container"],hostVars:1,hostBindings:function(r,o){r&1&&YE("@state.done",function(a){return o.onAnimationEnd(a)}),r&2&&Jf("@state",o._animationState)},standalone:!0,features:[sn,le],decls:6,vars:3,consts:[["label",""],[1,"mdc-snackbar__surface","mat-mdc-snackbar-surface"],[1,"mat-mdc-snack-bar-label"],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(r,o){r&1&&(v(0,"div",1)(1,"div",2,0)(3,"div",3),$(4,jue,0,0,"ng-template",4),b(),ee(5,"div"),b()()),r&2&&(w(5),Ye("aria-live",o._live)("role",o._role)("id",o._liveElementId))},dependencies:[es],styles:[".mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-mdc-snackbar-surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}.cdk-high-contrast-active .mat-mdc-snackbar-surface{outline:solid 1px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mdc-snackbar-supporting-text-color);border-radius:var(--mdc-snackbar-container-shape);background-color:var(--mdc-snackbar-container-color)}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mdc-snackbar-supporting-text-font);font-size:var(--mdc-snackbar-supporting-text-size);font-weight:var(--mdc-snackbar-supporting-text-weight);line-height:var(--mdc-snackbar-supporting-text-line-height)}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){color:var(--mat-snack-bar-button-color);--mat-text-button-state-layer-color:currentColor;--mat-text-button-ripple-color:currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}"],encapsulation:2,data:{animation:[Xue.snackBarState]}});let i=e;return i})();function Kue(){return new lf}var Jue=new me("mat-snack-bar-default-options",{providedIn:"root",factory:Kue}),hc=(()=>{let e=class e{get _openedSnackBarRef(){let n=this._parentSnackBar;return n?n._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(n){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=n:this._snackBarRefAtThisLevel=n}constructor(n,r,o,s,a,c){this._overlay=n,this._live=r,this._injector=o,this._breakpointObserver=s,this._parentSnackBar=a,this._defaultConfig=c,this._snackBarRefAtThisLevel=null,this.simpleSnackBarComponent=HG,this.snackBarContainerComponent=Que,this.handsetCssClass="mat-mdc-snack-bar-handset"}openFromComponent(n,r){return this._attach(n,r)}openFromTemplate(n,r){return this._attach(n,r)}open(n,r="",o){let s=Z(Z({},this._defaultConfig),o);return s.data={message:n,action:r},s.announcementMessage===n&&(s.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,s)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(n,r){let o=r&&r.viewContainerRef&&r.viewContainerRef.injector,s=vt.create({parent:o||this._injector,providers:[{provide:lf,useValue:r}]}),a=new Ai(this.snackBarContainerComponent,r.viewContainerRef,s),c=n.attach(a);return c.instance.snackBarConfig=r,c.instance}_attach(n,r){let o=Z(Z(Z({},new lf),this._defaultConfig),r),s=this._createOverlay(o),a=this._attachSnackBarContainer(s,o),c=new Q_(a,s);if(n instanceof Wn){let l=new Zr(n,null,{$implicit:o.data,snackBarRef:c});c.instance=a.attachTemplatePortal(l)}else{let l=this._createInjector(o,c),d=new Ai(n,void 0,l),u=a.attachComponentPortal(d);c.instance=u.instance}return this._breakpointObserver.observe(yy.HandsetPortrait).pipe(Ze(s.detachments())).subscribe(l=>{s.overlayElement.classList.toggle(this.handsetCssClass,l.matches)}),o.announcementMessage&&a._onAnnounce.subscribe(()=>{this._live.announce(o.announcementMessage,o.politeness)}),this._animateSnackBar(c,o),this._openedSnackBarRef=c,this._openedSnackBarRef}_animateSnackBar(n,r){n.afterDismissed().subscribe(()=>{this._openedSnackBarRef==n&&(this._openedSnackBarRef=null),r.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{n.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):n.containerInstance.enter(),r.duration&&r.duration>0&&n.afterOpened().subscribe(()=>n._dismissAfter(r.duration))}_createOverlay(n){let r=new fi;r.direction=n.direction;let o=this._overlay.position().global(),s=n.direction==="rtl",a=n.horizontalPosition==="left"||n.horizontalPosition==="start"&&!s||n.horizontalPosition==="end"&&s,c=!a&&n.horizontalPosition!=="center";return a?o.left("0"):c?o.right("0"):o.centerHorizontally(),n.verticalPosition==="top"?o.top("0"):o.bottom("0"),r.positionStrategy=o,this._overlay.create(r)}_createInjector(n,r){let o=n&&n.viewContainerRef&&n.viewContainerRef.injector;return vt.create({parent:o||this._injector,providers:[{provide:Q_,useValue:r},{provide:UG,useValue:n.data}]})}};e.\u0275fac=function(r){return new(r||e)(X($t),X(Dy),X(vt),X(Oh),X(e,12),X(Jue))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var GG=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({providers:[hc],imports:[oo,Es,xn,Ut,HG,Ut]});let i=e;return i})();var Mn=function(i){return i.DISABLED="disabled",i.MATCH_NODE_ID="match_node_id",i.VISUALIZER_CONFIG="visualizer_config",i.UPLOAD_MAPPING_FROM_COMPUTER="from_computer",i.LOAD_MAPPING_FROM_CNS="from_cns",i}(Mn||{}),jG={[Mn.DISABLED]:"Disabled",[Mn.MATCH_NODE_ID]:"Match node id",[Mn.UPLOAD_MAPPING_FROM_COMPUTER]:"Upload mapping from computer",[Mn.LOAD_MAPPING_FROM_CNS]:"Load mapping from CNS",[Mn.VISUALIZER_CONFIG]:"From Visualizer Config"};var Ml=(()=>{class i{mode=ct(Mn.DISABLED);navigationSourceChanged$=new pe;loadingFromCns=ct(!1);syncNavigationModeChanged$=new pe;savedProcessedSyncNavigationData={};updateNavigationSource(t){this.mode()!==Mn.DISABLED&&this.navigationSourceChanged$.next(t)}updateSyncNavigationData(t,n){let r=yt(Z({},n),{inversedMapping:{}});for(let o of Object.keys(n.mapping))r.inversedMapping[n.mapping[o]]=o;this.savedProcessedSyncNavigationData[t]=r}getMappedNodeId(t,n){let r=this.mode(),o=this.savedProcessedSyncNavigationData[r];switch(r){case Mn.MATCH_NODE_ID:return n;case Mn.VISUALIZER_CONFIG:case Mn.UPLOAD_MAPPING_FROM_COMPUTER:case Mn.LOAD_MAPPING_FROM_CNS:{let s=o?.mapping??{},a=o?.inversedMapping??{};return s[n]??a[n]??n}default:return n}}loadFromCns(t){return It(this,null,function*(){this.loadingFromCns.set(!0);let n=`/read_file?path=${t}`,r=yield fetch(n);if(!r.ok)return`Failed to load JSON file "${t}"`;let o=JSON.parse((yield r.text()).replace(`)]}' -`,"")),s=this.processJsonData(o.content,Mn.LOAD_MAPPING_FROM_CNS);return this.loadingFromCns.set(!1),s})}loadSyncNavigationDataFromEvent(t){return It(this,null,function*(){this.mode.set(t.mode)})}processJsonData(t,n){try{let r=JSON.parse(t);this.updateSyncNavigationData(n,r)}catch(r){return`Failed to parse JSON file. ${r}`}return""}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var ehe=["container"],the=["canvas"],nhe=["snapshotCanvas"],ihe=["pngDownloaderCanvas"],rhe=["hoverToolbar"],ohe=["ioPicker"],she=["subgraphMenuTrigger"],ahe=["groupNodeIconMatTooltip"],che=["ioPickerMatTooltip"],lhe=["moreActionsMenuTrigger"],dhe=["rangeZoomDragArea"],uhe=["dragToSelectDragArea"];function hhe(i,e){if(i&1){let t=ne();v(0,"div",33),H("click",function(){B(t);let r=I();return V(r.handleClickCollapseAll(r.hoveredNodeIdWhenClickingMoreActions))}),v(1,"mat-icon"),S(2,"unfold_less_double"),b(),S(3," Collapse layer & all sub-layers "),b()}}function phe(i,e){if(i&1){let t=ne();v(0,"div",34),H("click",function(r){B(t);let o=I();return V(o.handleClickOpenGroupNodeInPopup(r,o.hoveredNodeIdWhenClickingMoreActions))}),v(1,"mat-icon"),S(2,"open_in_new"),b(),S(3," Open layer in popup "),b()}}function fhe(i,e){if(i&1){let t=ne();v(0,"div",35),H("click",function(){let r=B(t).$implicit,o=I();return V(o.handleClickSubgraphId(r))}),v(1,"mat-icon"),S(2,"subdirectory_arrow_right"),b(),S(3),b()}if(i&2){let t=e.$implicit;w(3),Se(" ",t," ")}}function mhe(i,e){if(i&1&&(v(0,"div",32),S(1),b()),i&2){let t=I();w(),Se("FPS: ",t.fps,"")}}var ghe=1.2,_he=2,$G=1.5,vhe=200,RO=400,bhe=1,qG=14,yhe=5e3,xhe=-en*.5,AO=en*.4,YG=en*.3,whe=en*.4,Che="______",vn=Ln,AC=function(i){return i[i.NODE=0]="NODE",i[i.EDGE=1]="EDGE",i}(AC||{}),NC=(()=>{class i{changeDetectorRef;destroyRef;ngZone;nodeDataProviderExtensionService;nodeStylerService;overlay;snackBar;splitPaneService;subgraphSelectionService;syncNavigationService;uiStateService;viewContainerRef;webglRendererAttrsTableService;webglRendererEdgeTextsService;webglRendererIdenticalLayerService;webglRendererIoHighlightService;webglRendererIoTracingService;webglRendererNdpService;webglRendererSearchResultsService;webglRendererSnapshotService;webglRendererSubgraphSelectionService;webglRendererThreejsService;workerService;modelGraph;rendererId;paneId;rootNodeId;inPopup=!1;benchmark=!1;openInPopupClicked=new Ie;container;canvas;snapshotCanvas;pngDownloaderCanvas;hoverToolbar;ioPicker;subgraphMenuTrigger;groupNodeIconMatTooltip;ioPickerMatTooltip;moreActionsMenuTrigger;rangeZoomDragArea;dragToSelectDragArea;appService=te(at);threejsService=te(Sr);SELECTED_NODE_BORDER_COLOR=new vn.Color("#1A73E8");SELECTED_NODE_BG_COLOR=new vn.Color("#C2E7FF");HOVERED_NODE_BORDER_COLOR=new vn.Color("#000");HOVERED_GROUP_NODE_BORDER_COLOR=new vn.Color("#666");IDENTICAL_GROUPS_BG_COLOR=new vn.Color("#e2edff");NODE_LABEL_COLOR=new vn.Color("#041E49");OP_NODE_BORDER_COLOR=new vn.Color("#777");GROUP_NODE_BORDER_COLOR=new vn.Color("#aaa");GROUP_NODE_LABEL_SEPARATOR_COLOR=new vn.Color("#DADCE0");GROUP_NODE_ICON_COLOR=new vn.Color("#444746");GROUP_NODE_PIN_TO_TOP_SEPARATOR_COLOR=new vn.Color("#bbb");EDGE_COLOR=new vn.Color(this.appService.config()?.edgeColor||"#aaa");EDGE_COLOR_INCOMING=new vn.Color("#009e73");EDGE_TEXT_COLOR_INCOMING=new vn.Color("#125341");EDGE_COLOR_OUTGOING=new vn.Color("#d55e00");EDGE_TEXT_COLOR_OUTGOING=new vn.Color("#994d11");ARTIFCIAL_GROUPS_BORDER_COLOR=new vn.Color("#800080");SUBGRAPH_INDICATOR_BORDER_COLOR=new vn.Color("#135cbb");SUBGRAPH_INDICATOR_BG_COLOR=new vn.Color("#d5e7ff");GROUP_NODE_BG_COLORS=(()=>{let s=[];for(let a=0;a<6;a++){let c=96+a*-2.4;s.push(new vn.Color(`hsl(212, 40%, ${Math.round(c)}%)`))}return s})();graphId="";curModelGraph;tracing=!1;showBusySpinner=!1;selectedNodeId="";flashing=!1;hoveredNodeIdWhenClickingMoreActions="";currentMinX=0;currentMaxX=0;currentMinZ=0;currentMaxZ=0;groupNodeIcon={top:-1e3,left:-1e3,width:0,height:0};ioPickerTop=-1e3;ioPickerLeft=-1e3;ioPickerWidth=0;ioPickerHeight=0;ioPickerTooltip="";subgraphIndicatorTop=-1e3;subgraphIndicatorLeft=-1e3;subgraphIndicatorWidth=0;subgraphIndicatorHeight=0;curSubgraphIdsForMenu=[];curShowOnNodeItemTypes={};curShowOnEdgeItemTypes={};nodesToRender=[];nodesToRenderMap={};edgesToRender=[];curNodeDataProviderRuns={};curHiddenInputOpNodeIds={};curHiddenOutputIds={};elementsToRender=[];updateNodesStylesSavedSelectedNodeId="";updateNodesStylesSavedIoTracingData;curSelectedRenderer;portal=null;showBusySpinnerTimeoutRef=-1;prevNodeDataProviderData=void 0;nodeBodies=new Ni(6);groupNodeIcons=new qi(this.threejsService);groupNodeIconBgs=new Ni(99);artificialGroupBorders=new Ni(6);subgraphIndicatorBgs=new Ni(3);subgraphIndicatorIcons=new qi(this.threejsService);edges=new Su(this.EDGE_COLOR,bhe);texts=new qi(this.threejsService);mousePos=new vn.Vector2;draggingArea=!1;hoveredNodeId="";hoveredGroupNodeIconId="";nodeIdForHoveredGroupNodeIcon="";hoveredIoPickerId="";hoveredSubgraphIndicatorId="";savedUpdateNodeBgWhenFarProgress=-1;curNodeStylerRules=[];curProcessedNodeStylerRules=[];renderedEdgeIdsToHide=[];selectedNodeInfo=Bt(()=>{let t=this.appService.getPaneById(this.paneId);if(t)return t.selectedNodeInfo});messageEventListener=t=>{this.hideBusySpinner();let n=t.data;switch(n.eventType){case tr.EXPAND_OR_COLLAPSE_GROUP_NODE_RESP:this.rendererId===n.rendererId&&this.handleExpandOrCollapseGroupNodeDone(n.modelGraph,n.rendererId,n.groupNodeId,n.expanded,n.deepestExpandedGroupNodeIds);break;case tr.RELAYOUT_GRAPH_RESP:this.rendererId===n.rendererId&&this.handleReLayoutGraphDone(n.rendererId,n.modelGraph,n.selectedNodeId,n.forRestoringUiState,n.rectToZoomFit,n.forRestoringSnapshotAfterTogglingFlattenLayers,n.targetDeepestGroupNodeIdsToExpand,n.triggerNavigationSync);break;case tr.LOCATE_NODE_RESP:this.rendererId===n.rendererId&&this.handleLocateNodeDone(n.rendererId,n.modelGraph,n.nodeId,n.deepestExpandedGroupNodeIds,n.noNodeShake===!0,n.select===!0);break;case tr.PREPARE_POPUP_RESP:this.paneId===n.paneId&&this.openInPopupClicked.emit({id:n.rendererId,groupNode:n.modelGraph.nodesById[n.groupNodeId],initialPosition:n.initialPosition,curModelGraph:n.modelGraph});break;default:break}};constructor(t,n,r,o,s,a,c,l,d,u,h,p,f,m,y,g,_,x,C,T,D,E,A){this.changeDetectorRef=t,this.destroyRef=n,this.ngZone=r,this.nodeDataProviderExtensionService=o,this.nodeStylerService=s,this.overlay=a,this.snackBar=c,this.splitPaneService=l,this.subgraphSelectionService=d,this.syncNavigationService=u,this.uiStateService=h,this.viewContainerRef=p,this.webglRendererAttrsTableService=f,this.webglRendererEdgeTextsService=m,this.webglRendererIdenticalLayerService=y,this.webglRendererIoHighlightService=g,this.webglRendererIoTracingService=_,this.webglRendererNdpService=x,this.webglRendererSearchResultsService=C,this.webglRendererSnapshotService=T,this.webglRendererSubgraphSelectionService=D,this.webglRendererThreejsService=E,this.workerService=A,this.webglRendererAttrsTableService.init(this),this.webglRendererEdgeTextsService.init(this),this.webglRendererIdenticalLayerService.init(this),this.webglRendererIoHighlightService.init(this),this.webglRendererIoTracingService.init(this),this.webglRendererNdpService.init(this),this.webglRendererSearchResultsService.init(this),this.webglRendererSnapshotService.init(this),this.webglRendererSubgraphSelectionService.init(this),this.webglRendererThreejsService.init(this),this.workerService.worker.addEventListener("message",this.messageEventListener),lt(()=>{this.curSelectedRenderer=this.appService.curSelectedRenderer()}),this.appService.spaceKeyToZoomFitClicked.pipe(Ei(this.destroyRef)).subscribe(j=>{this.rendererId===this.curSelectedRenderer?.id&&this.webglRendererThreejsService.zoomFitGraph()}),lt(()=>{let j=this.appService.curToLocateNodeInfo();j?.rendererId===this.rendererId&&(j&&this.sendLocateNodeRequest(j.nodeId,j.rendererId,j.noNodeShake,j.select),this.appService.curToLocateNodeInfo.set(void 0))}),lt(()=>{let j=this.appService.getPaneById(this.paneId);if(!j||!j.modelGraph)return;let q=j.nodeIdToReveal;if(!q)return;this.revealNode(q)&&this.appService.setNodeToReveal(this.paneId,void 0)}),lt(()=>{let j=this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph);this.curNodeDataProviderRuns={};for(let q of j)this.curNodeDataProviderRuns[q.runId]=q}),lt(()=>{let j=this.webglRendererNdpService.curNodeDataProviderResults();j!==this.prevNodeDataProviderData&&(this.handleCurNodeDataProviderResultsChanged(),this.prevNodeDataProviderData=j)}),lt(()=>{if(!this.appService.getPaneById(this.paneId))return;let q=this.appService.getShowOnNodeItemTypes(this.paneId,this.rendererId);JSON.stringify(q)!==JSON.stringify(this.curShowOnNodeItemTypes)&&(this.curShowOnNodeItemTypes=q,this.sendRelayoutGraphRequest(this.selectedNodeId))}),this.appService.expandOrCollapseAllGraphLayersClicked.pipe(Ei(this.destroyRef)).subscribe(j=>{j.rendererId===this.rendererId&&this.sendExpandOrCollapseGroupNodeRequest(void 0,!0,j.expandOrCollapse)}),lt(()=>{let j=this.selectedNodeInfo();if(j?.rendererId!==this.rendererId)return;let q=j?.nodeId||"",z=this.selectedNodeId!==q;this.selectedNodeId=q,this.tracing&&(this.selectedNodeId&&St(this.curModelGraph.nodesById[this.selectedNodeId])?this.webglRendererIoTracingService.genTracingData():this.webglRendererIoTracingService.clearTracingData()),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.webglRendererIdenticalLayerService.updateIdenticalLayerIndicators(),this.updateNodesStyles(),this.webglRendererThreejsService.render(),z&&j.triggerNavigationSync&&this.syncNavigationService.updateNavigationSource({paneIndex:this.appService.getPaneIndexById(this.paneId)||0,nodeId:this.selectedNodeId})}),this.appService.downloadAsPngClicked.pipe(Ei(this.destroyRef)).subscribe(j=>{j.rendererId===this.rendererId&&this.handleDownloadAsPng(j.fullGraph,j.transparentBackground)}),lt(()=>{let j=this.nodeStylerService.rules().filter(z=>Ch(z.queries)&&Object.keys(z.styles).length>0),q=JSON.stringify(j);JSON.stringify(this.curNodeStylerRules)!==q&&(this.curNodeStylerRules=JSON.parse(q),this.curProcessedNodeStylerRules=ny(this.curNodeStylerRules),this.renderGraph(),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.webglRendererIdenticalLayerService.updateIdenticalLayerIndicators(),this.updateNodesStyles(),this.webglRendererThreejsService.render())}),lt(()=>{if(!this.appService.getPaneById(this.paneId))return;let q=this.appService.getShowOnEdgeItemTypes(this.paneId,this.rendererId);JSON.stringify(q)!==JSON.stringify(this.curShowOnEdgeItemTypes)&&(this.curShowOnEdgeItemTypes=q,this.renderGraph(),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.webglRendererIdenticalLayerService.updateIdenticalLayerIndicators(),this.updateNodesStyles(),this.webglRendererThreejsService.render())}),lt(()=>{this.curHiddenInputOpNodeIds=this.splitPaneService.hiddenInputOpNodeIds(),this.curHiddenOutputIds=this.splitPaneService.hiddenOutputIds(),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.updateNodesStyles(),this.webglRendererThreejsService.render()}),this.syncNavigationService.navigationSourceChanged$.pipe(Ei(this.destroyRef)).subscribe(j=>{if(j&&j.paneIndex!==this.appService.getPaneIndexById(this.paneId)){let q=this.syncNavigationService.getMappedNodeId(j.paneIndex,j.nodeId),z=this.curModelGraph.nodesById[q],P=St(z)&&z.hideInLayout;z&&z.id!==this.selectedNodeId&&!P&&this.revealNode(q,!1)}})}ngOnInit(){this.graphId=this.modelGraph.id,this.curModelGraph=this.modelGraph,this.appService.updateCurrentModelGraph(this.paneId,this.curModelGraph),this.inPopup||(this.curShowOnNodeItemTypes=this.appService.getSavedShowOnNodeItemTypes(),this.curShowOnEdgeItemTypes=this.appService.getSavedShowOnEdgeItemTypes()),this.webglRendererThreejsService.setupZoomAndPan(this.container.nativeElement,1e-4,20),this.webglRendererThreejsService.setupThreeJs(),this.ngZone.runOutsideAngular(()=>{this.canvas.nativeElement.addEventListener("mousemove",s=>{this.handleMouseMove(s)})});let t=this.appService.curInitialUiState(),n=s=>{this.updateNodesAndEdgesToRender(),this.renderGraph(),this.webglRendererThreejsService.zoomFitGraph(.9,0);let a=this.appService.getPaneById(this.paneId);if(a?.snapshotToRestore!=null){let c=a.snapshotToRestore;this.curShowOnNodeItemTypes=a.snapshotToRestore.showOnNodeItemTypes||{},this.appService.setShowOnNode(this.paneId,this.rendererId,this.curShowOnNodeItemTypes),this.sendRelayoutGraphRequest(c.selectedNodeId||"",c.deepestExpandedGroupNodeIds||[],!1,c.rect,!0,c.showOnNodeItemTypes,!0,!1),a.snapshotToRestore=void 0}else s!=null&&s!==""&&setTimeout(()=>{this.appService.curToLocateNodeInfo.set({nodeId:s,rendererId:this.rendererId,isGroupNode:!1,noNodeShake:!0})});this.sendExpandGroupNodeRequest(this.rootNodeId||"")};if(!t||t.paneStates.length===0||this.inPopup){let s=this.inPopup?void 0:this.appService.getPaneById(this.paneId)?.selectedNodeInfo?.nodeId;n(s)}else{let s=this.appService.getPaneIndexById(this.paneId),a=t.paneStates[s];if(!a)n();else{let c=a.deepestExpandedGroupNodeIds;if(c.length===1&&c[0]==="___all___"){let l=[];Nm(void 0,this.curModelGraph,l,!0),c=l}a.selectedNodeId!==""||c.length>0?this.sendRelayoutGraphRequest(a.selectedNodeId,c,!0,void 0,!1,void 0,!1,!1):n(),this.uiStateService.setDeepestExpandedGroupNodeIds(a.deepestExpandedGroupNodeIds,s)}}let r=window;r[Xb]==null&&(r[Xb]={renderers:{}});let o=this.inPopup?-1:this.appService.getPaneIndexById(this.paneId);r[Xb].renderers[o]=this,this.benchmark&&this.startBenchmark()}ngOnDestroy(){this.workerService.worker.removeEventListener("message",this.messageEventListener),this.webglRendererThreejsService.dispose(),document.body.style.cursor="default"}getActiveSelectedNodeInfo(){if(this.selectedNodeId)return{nodeId:this.selectedNodeId,rendererId:this.rendererId,isGroupNode:wt(this.curModelGraph.nodesById[this.selectedNodeId])}}toggleIoTrace(){this.tracing=!this.tracing,this.tracing?this.webglRendererIoTracingService.genTracingData():this.webglRendererIoTracingService.clearTracingData(),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.updateNodesStyles(),this.webglRendererThreejsService.render()}setZoomFactor(t){let n=this.container.nativeElement,r=this.webglRendererThreejsService.convertScreenPosToScene(0,0),o=this.webglRendererThreejsService.convertScreenPosToScene(n.offsetWidth,n.offsetHeight),s=Math.min(r.x,o.x),a=Math.max(r.x,o.x),c=Math.min(r.y,o.y),l=Math.max(r.y,o.y),d=a-s,u=l-c,h=(s+a)/2,p=(c+l)/2,f=h-d/2/t,m=h+d/2/t,y=p-u/2/t,g=p+u/2/t;this.webglRendererThreejsService.zoomFit({x:f,y,width:m-f,height:g-y},.9,0,!1,!1)}handleMouseDownCanvas(t){Am&&(t.metaKey||t.ctrlKey)||!Am&&t.ctrlKey?(this.draggingArea=!0,this.rangeZoomDragArea.start(t,(n,r,o,s,a)=>{let c=this.webglRendererThreejsService.convertScreenPosToScene(r,o),l=this.webglRendererThreejsService.convertScreenPosToScene(s,a),d=Math.min(c.x,l.x),u=Math.max(c.x,l.x),h=Math.min(c.y,l.y),p=Math.max(c.y,l.y);this.webglRendererThreejsService.zoomFit({x:d,y:h,width:u-d,height:p-h},.9,200,!1,!1),this.draggingArea=!1})):t.shiftKey&&this.webglRendererSubgraphSelectionService.enableSubgraphSelection&&(this.draggingArea=!0,this.dragToSelectDragArea.start(t,(n,r,o,s,a)=>{if(this.draggingArea=!1,n)this.hoveredNodeId?this.curModelGraph.nodesById[this.hoveredNodeId]&&this.handleShiftSelectNode(this.hoveredNodeId):this.handleClearSubgraphSelectedNodes();else{let c=this.webglRendererThreejsService.convertScreenPosToScene(r,o),l=this.webglRendererThreejsService.convertScreenPosToScene(s,a),d=Math.min(c.x,l.x),u=Math.max(c.x,l.x),h=Math.min(c.y,l.y),p=Math.max(c.y,l.y),f=[];for(let{node:m}of this.nodesToRender){let y=this.getNodeX(m),g=this.getNodeY(m),_=this.getNodeWidth(m),x=this.getNodeHeight(m),C=y,T=g,D=y+_,E=g+x,A=uD,q=h>E,z=p1&&(this.curSubgraphIdsForMenu=n,this.subgraphMenuTrigger.openMenu())}handleClickSubgraphId(t){this.openSubgraph(t)}handleDoubleClickOnGraph(t,n){if(this.selectedNodeId!==""&&!n){let r=this.curModelGraph.nodesById[this.selectedNodeId];this.appService.updateDoubleClickedNode(this.selectedNodeId,this.curModelGraph.id,this.curModelGraph.collectionLabel||"",r),this.handleToggleExpandCollapse(r,t)}}handleClickOnGraph(t){this.hoveredNodeId?this.curModelGraph.nodesById[this.hoveredNodeId]&&(t||this.handleSelectNode(this.hoveredNodeId)):this.handleSelectNode("")}handleMouseEnterGroupNodeIcon(){this.groupNodeIconMatTooltip.show()}handleMouseLeaveGroupNodeIcon(){this.groupNodeIconMatTooltip.hide()}handleMouseEnterIoPicker(){this.ioPickerMatTooltip.show()}handleMouseLeaveIoPicker(){this.ioPickerMatTooltip.hide()}handleHoveredGroupNodeIconChanged(t){if(this.groupNodeIcon.top=-1e3,this.groupNodeIcon.left=-1e3,this.groupNodeIcon.width=0,this.groupNodeIcon.height=0,this.groupNodeIcon.tooltip=void 0,this.hoveredGroupNodeIconId!==""&&t!=null){let{x:n,y:r}=this.webglRendererThreejsService.convertScenePosToScreen(t.bound.x-t.bound.width/2,t.bound.y-t.bound.height/2),{x:o,y:s}=this.webglRendererThreejsService.convertScenePosToScreen(t.bound.x+t.bound.width/2,t.bound.y+t.bound.height/2);if(this.groupNodeIcon.top=r,this.groupNodeIcon.left=n,this.groupNodeIcon.width=o-n,this.groupNodeIcon.height=s-r,t.id.includes("_left")){let a=this.curModelGraph.nodesById[t.nodeId];this.groupNodeIcon.tooltip=a.expanded?"Collapse layer":"Expand layer"}else t.id.includes("_right")&&(this.groupNodeIcon.tooltip="More actions")}this.changeDetectorRef.detectChanges()}isNodeRendered(t){return this.nodesToRenderMap[t]!=null}sendLocateNodeRequest(t,n,r=!1,o=!1){if(this.showBusySpinnerWithDelay(),this.isNodeRendered(t))this.hideBusySpinner(),this.handleLocateNodeDone(n,this.curModelGraph,t,[],r,o,!0);else{let s={eventType:tr.LOCATE_NODE_REQ,modelGraphId:this.curModelGraph.id,showOnNodeItemTypes:this.curShowOnNodeItemTypes,nodeDataProviderRuns:this.curNodeDataProviderRuns,nodeId:t,rendererId:n,noNodeShake:r,select:o};this.workerService.worker.postMessage(s)}}sendRelayoutGraphRequest(t,n,r=!1,o,s=!1,a,c,l=!0){this.showBusySpinnerWithDelay();let d={eventType:tr.RELAYOUT_GRAPH_REQ,modelGraphId:this.curModelGraph.id,showOnNodeItemTypes:a||this.curShowOnNodeItemTypes,nodeDataProviderRuns:this.curNodeDataProviderRuns,selectedNodeId:t,targetDeepestGroupNodeIdsToExpand:n,rendererId:this.rendererId,forRestoringUiState:r,rectToZoomFit:o,clearAllExpandStates:s,forRestoringSnapshotAfterTogglingFlattenLayers:c,triggerNavigationSync:l};this.workerService.worker.postMessage(d)}animateIntoPositions(t=n=>{this.updateAnimatinProgress(n)}){let n=Date.now(),r=()=>{let o=Date.now()-n,s=this.appService.testMode?1:Math.min(1,o/vhe);if(s=Math.sin(s*Math.PI/2),t(s),this.webglRendererThreejsService.render(),s>=1){t(s),this.webglRendererThreejsService.render();return}requestAnimationFrame(r)};r()}flash(){this.flashing=!0,this.changeDetectorRef.detectChanges(),setTimeout(()=>{this.flashing=!1,this.changeDetectorRef.detectChanges()},300)}updateNodeBgColorWhenFar(){let t=this.webglRendererThreejsService.convertZFromSceneToScreen(30)*this.webglRendererThreejsService.curScale,n=7.5,o=Math.max(0,Math.min(1,(n-t)/(n-7)));Math.abs(o-this.savedUpdateNodeBgWhenFarProgress)<1e-5||(this.savedUpdateNodeBgWhenFarProgress=o,this.nodeBodies.setBgColorWhenFar(this.NODE_LABEL_COLOR,o/3))}showIoTree(t,n,r){let o=this.createOverlay(t),s=o.attach(this.portal),a=uc(n,[],r);s.instance.solidBackground=!0,s.instance.rendererId=this.rendererId,s.instance.updateData(a),s.instance.onClose.subscribe(()=>{o.dispose()})}getNodeX(t){return(t.x||0)+(t.globalX||0)}getNodeY(t){return(t.y||0)+(t.globalY||0)}getNodeWidth(t){return t.width||0}getNodeHeight(t){return t.height||0}getNodeLabelRelativeY(t){return 14}getNodeLabelSizes(t){let n=zo/this.texts.getFontSize(),r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,s=0,a=md(this.getNodeLabel(t));for(let c=0;c{this.webglRendererThreejsService.zoomFit(s,1,200,!1,!1)};a?setTimeout(()=>{d()}):d()}else r!==Che&&this.webglRendererThreejsService.zoomFitOnNode(r,n,o?0:RO);this.selectedNodeId!==r&&this.handleSelectNode(r||"",l),this.inPopup||this.uiStateService.setDeepestExpandedGroupNodeIds(c||[],this.appService.getPaneIndexById(this.paneId))}handleCurNodeDataProviderResultsChanged(){this.renderGraph(),this.updateNodesStyles(),this.webglRendererThreejsService.render()}handleLocateNodeDone(t,n,r,o,s,a,c=!1){this.updateCurModelGraph(n),this.updateNodesAndEdgesToRender(),a&&this.appService.selectNode(this.paneId,{nodeId:r,rendererId:t,isGroupNode:wt(this.curModelGraph.nodesById[r])}),this.webglRendererThreejsService.zoomFitOnNode(r,n,RO),c||(this.renderGraph(),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.webglRendererIdenticalLayerService.updateIdenticalLayerIndicators(),this.updateNodesStyles(),this.webglRendererThreejsService.render(),this.inPopup||this.uiStateService.setDeepestExpandedGroupNodeIds(o,this.appService.getPaneIndexById(this.paneId))),s||setTimeout(()=>{this.shakeNode(r)},250)}sendExpandGroupNodeRequest(t){let n=this.curModelGraph.nodesById[t];n!=null&&!n.expanded&&this.sendExpandOrCollapseGroupNodeRequest(n,!1,!0)}sendExpandOrCollapseGroupNodeRequest(t,n=!1,r){this.showBusySpinnerWithDelay();let o={eventType:tr.EXPAND_OR_COLLAPSE_GROUP_NODE_REQ,modelGraphId:this.curModelGraph.id,groupNodeId:t?.id,expand:r??!t?.expanded,showOnNodeItemTypes:this.curShowOnNodeItemTypes,nodeDataProviderRuns:this.curNodeDataProviderRuns,rendererId:this.rendererId,paneId:this.paneId,all:n,ts:Date.now()};this.workerService.worker.postMessage(o)}renderGraph(){this.clearScene(),this.renderEdges(),this.renderTexts(),this.curShowOnEdgeItemTypes[zc.TENSOR_SHAPE]?.selected&&this.webglRendererEdgeTextsService.renderEdgeTexts(),this.webglRendererAttrsTableService.renderAttrsTable(),this.renderNodes(),this.webglRendererNdpService.renderNodeDataProviderDistributionBars(),this.renderArtificialGroupBorders(),this.webglRendererSearchResultsService.renderSearchResults(),this.webglRendererSubgraphSelectionService.renderSubgraphSelectedNodeMarkers(),this.updateNodeBgColorWhenFar(),this.animateIntoPositions()}renderNodes(){this.currentMinX=Number.POSITIVE_INFINITY,this.currentMinZ=Number.POSITIVE_INFINITY,this.currentMaxX=Number.NEGATIVE_INFINITY,this.currentMaxZ=Number.NEGATIVE_INFINITY;let t=this.nodesToRender.length,n=[],r=[],o=[],s=[],a=[],c=zo/this.texts.getFontSize();for(let l=0;l0){if(this.appService.config()?.showOpNodeOutOfLayerEdgesWithoutSelecting){for(let{node:t}of this.nodesToRender)if(St(t)&&t.nsParentId){let{overlayEdges:n,renderedEdges:r}=this.webglRendererIoHighlightService.getHighlightedIncomingNodesAndEdges(this.curHiddenInputOpNodeIds,t,{ignoreEdgesWithinSameNamespace:!0,reuseRenderedEdgeCurvePoints:!0});if(n.length>0){this.renderedEdgeIdsToHide.push(...r.map(a=>a.id));for(let a of n)this.edgesToRender.push({edge:a,index:92/en})}let{overlayEdges:o,renderedEdges:s}=this.webglRendererIoHighlightService.getHighlightedOutgoingNodesAndEdges(this.curHiddenOutputIds,t,{ignoreEdgesWithinSameNamespace:!0,reuseRenderedEdgeCurvePoints:!0});if(o.length>0){this.renderedEdgeIdsToHide.push(...s.map(a=>a.id));for(let a of o)this.edgesToRender.push({edge:a,index:92/en})}}}this.edges.generateMesh(this.edgesToRender,this.curModelGraph),this.webglRendererThreejsService.addToScene(this.edges.edgesMesh),this.webglRendererThreejsService.addToScene(this.edges.arrowHeadsMesh)}}renderTexts(){let t=[];for(let{node:n,index:r}of this.nodesToRender){let o=this.NODE_LABEL_COLOR;for(let a of this.curProcessedNodeStylerRules)if(km(n,a.queries,this.curModelGraph)){let c=fd(a,qs.NODE_TEXT_COLOR);c!==""&&(o=new vn.Color(c));break}let s=md(this.getNodeLabel(n));for(let a=0;a{this.setHoveredNodeId(r),this.updateNodesStyles(),this.webglRendererThreejsService.render()}),this.groupNodeIconBgs.raycast(this.webglRendererThreejsService.raycaster,(r,o)=>{this.hoveredGroupNodeIconId=r,this.nodeIdForHoveredGroupNodeIcon=o?.nodeId||"",this.updateNodesStyles(),this.handleHoveredGroupNodeIconChanged(o),this.webglRendererThreejsService.render()},!1),this.webglRendererIoHighlightService.ioPickerBgs.raycast(this.webglRendererThreejsService.raycaster,(r,o)=>{this.hoveredIoPickerId=r,this.handleHoveredIoPickerChanged(o)}),this.subgraphIndicatorBgs.raycast(this.webglRendererThreejsService.raycaster,(r,o)=>{this.hoveredSubgraphIndicatorId=r,this.handleHoveredSubgraphIndicatorChanged(o)})}handleHoveredIoPickerChanged(t){this.ioPickerTop=-1e3,this.ioPickerLeft=-1e3,this.ioPickerTooltip="";let n=this.hoveredIoPickerId.endsWith("input");if(this.hoveredIoPickerId!==""){let{x:r,y:o}=this.webglRendererThreejsService.convertScenePosToScreen(t.bound.x-t.bound.width/2,t.bound.y-t.bound.height/2),{x:s,y:a}=this.webglRendererThreejsService.convertScenePosToScreen(t.bound.x+t.bound.width/2,t.bound.y+t.bound.height/2);this.ioPickerTop=o,this.ioPickerLeft=r,this.ioPickerWidth=s-r,this.ioPickerHeight=a-o,this.ioPickerTooltip=`Click to reveal ${n?"input":"output"} node(s)`}this.changeDetectorRef.detectChanges()}handleHoveredSubgraphIndicatorChanged(t){if(this.subgraphIndicatorTop=-1e3,this.subgraphIndicatorLeft=-1e3,this.hoveredSubgraphIndicatorId!==""){let{x:n,y:r}=this.webglRendererThreejsService.convertScenePosToScreen(t.bound.x-t.bound.width/2,t.bound.y-t.bound.height/2),{x:o,y:s}=this.webglRendererThreejsService.convertScenePosToScreen(t.bound.x+t.bound.width/2,t.bound.y+t.bound.height/2);this.subgraphIndicatorTop=r,this.subgraphIndicatorLeft=n,this.subgraphIndicatorWidth=o-n,this.subgraphIndicatorHeight=s-r}this.changeDetectorRef.detectChanges()}updateNodesStyles(){let t=!1;this.selectedNodeId!==this.updateNodesStylesSavedSelectedNodeId&&(this.updateNodesStylesSavedSelectedNodeId=this.selectedNodeId,t=!0);let n=!1;this.webglRendererIoTracingService.curIoTracingData!==this.updateNodesStylesSavedIoTracingData&&(this.updateNodesStylesSavedIoTracingData=this.webglRendererIoTracingService.curIoTracingData,n=!0),this.nodeBodies.restoreBorderColors(),this.nodeBodies.restoreBgColors(),this.nodeBodies.restoreBorderWidths(),this.nodeBodies.restoreOpacities(),this.groupNodeIconBgs.restoreOpacities(),this.texts.restoreOpacities(),this.texts.restoreColors(),this.webglRendererEdgeTextsService.edgeTexts.restoreOpacities(),this.groupNodeIcons.restoreOpacities(),this.webglRendererAttrsTableService.attrsTableTexts.restoreOpacities(),(t||n)&&this.edges.restoreColors(),this.edges.restoreYOffsets();let r=this.curModelGraph.nodesById[this.selectedNodeId];if(r!=null&&wt(r)){let u=r.identicalGroupIndex;if(u!=null){let h=this.nodesToRender.filter(({node:p})=>wt(p)&&p.identicalGroupIndex===u).map(({node:p})=>p.id);this.nodeBodies.updateBgColor(h,this.IDENTICAL_GROUPS_BG_COLOR)}}let o=this.curModelGraph.nodesById[this.hoveredNodeId],s=wt(o)?this.HOVERED_GROUP_NODE_BORDER_COLOR:this.HOVERED_NODE_BORDER_COLOR;St(o)&&o.style?.hoveredBorderColor&&(s=new vn.Color(o.style.hoveredBorderColor)),this.nodeBodies.updateBorderColor([this.hoveredNodeId],s),this.selectedNodeId&&r!=null&&(this.nodeBodies.updateBorderColor([this.selectedNodeId],this.SELECTED_NODE_BORDER_COLOR),this.nodeBodies.updateBorderWidth([this.selectedNodeId],_he),this.nodeBodies.updateBgColor([this.selectedNodeId],this.SELECTED_NODE_BG_COLOR,St(r))),this.groupNodeIconBgs.updateOpacity([this.hoveredGroupNodeIconId],.07);let a=Object.keys(this.webglRendererIoHighlightService.inputsByHighlightedNode);if(a.length>0){this.nodeBodies.updateBorderColor(a,new vn.Color(this.EDGE_COLOR_INCOMING.r,this.EDGE_COLOR_INCOMING.g,this.EDGE_COLOR_INCOMING.b));for(let u of a)this.nodeBodies.updateBorderWidth([u],$G)}let c=Object.keys(this.webglRendererIoHighlightService.outputsByHighlightedNode);if(c.length>0){this.nodeBodies.updateBorderColor(c,new vn.Color(this.EDGE_COLOR_OUTGOING.r,this.EDGE_COLOR_OUTGOING.g,this.EDGE_COLOR_OUTGOING.b));for(let u of c)this.nodeBodies.updateBorderWidth([u],$G)}let l=[...this.webglRendererIoHighlightService.inputsRenderedEdges,...this.webglRendererIoHighlightService.outputsRenderedEdges].map(u=>u.id);l.push(...this.renderedEdgeIdsToHide),this.edges.updateYOffsets(l,1e3);let d=this.webglRendererNdpService.curNodeDataProviderResults()||{};for(let u of Object.keys(d)){if(!this.isNodeRendered(u)||!St(this.curModelGraph.nodesById[u]))continue;let h=d[u].bgColor;h&&h!=="transparent"&&this.nodeBodies.updateBgColor([u],new vn.Color(h));let p=d[u].textColor;p&&this.texts.updateColorInNode([u],new vn.Color(p))}if(this.webglRendererIoTracingService.curIoTracingData!=null){let u=Object.keys(this.curModelGraph.nodesById).filter(p=>!this.webglRendererIoTracingService.curIoTracingData.visibleNodeIds.has(p)&&this.isNodeRendered(p));this.nodeBodies.updateOpacity(u,.2),this.texts.updateOpacityInNode(u,.3),this.groupNodeIcons.updateOpacityInNode(u,.3),this.webglRendererAttrsTableService.attrsTableTexts.updateOpacityInNode(u,.3),this.webglRendererEdgeTextsService.edgeTexts.updateOpacityInNode(u,.3);let h=this.edgesToRender.filter(({edge:p})=>!this.webglRendererIoTracingService.curIoTracingData.visibleNodeIds.has(p.fromNodeId)||!this.webglRendererIoTracingService.curIoTracingData.visibleNodeIds.has(p.toNodeId)).map(({edge:p})=>p.id);this.edges.updateColors(h,{r:.92,g:.92,b:.92})}}shakeNode(t){if(this.appService.testMode)return;let n=Date.now(),r=()=>{let o=Date.now()-n,s=Math.min(1,o/1100);s=-(Math.cos(Math.PI*s)-1)/2;let a=Math.sin(s*Math.PI*9)*8;if(this.nodeBodies.updateAngle(t,a),this.webglRendererSearchResultsService.searchResultsHighlightBorders.updateAngle(t,a),this.webglRendererThreejsService.render(),s>=1){this.nodeBodies.updateAngle(t,0),this.webglRendererSearchResultsService.searchResultsHighlightBorders.updateAngle(t,0),this.webglRendererThreejsService.render();return}requestAnimationFrame(r)};r()}clearScene(){let t=[this.webglRendererSearchResultsService.searchResultsHighlightBorders.mesh,this.webglRendererSearchResultsService.searchResultsNodeLabelHighlightBg.mesh];this.webglRendererThreejsService.clearScene(t),this.updateNodesStylesSavedSelectedNodeId="",this.updateNodesStylesSavedIoTracingData=void 0}handleDownloadAsPng(t,n){return It(this,null,function*(){let r=this.container.nativeElement.offsetWidth/pd(),o=this.container.nativeElement.offsetHeight/pd(),s=this.webglRendererThreejsService.camera;if(t){let d=this.currentMaxX+20,u=this.currentMinX-20,h=this.currentMaxZ+20,p=this.currentMinZ-20;r=d-u,o=h-p;let f=yhe/pd();r>f&&(o=o*f/r,r=f),o>f&&(r=r*f/o,o=f),s=this.webglRendererThreejsService.createOrthographicCamera(u,d,-p,-h)}let a=this.pngDownloaderCanvas.nativeElement;this.webglRendererThreejsService.setupPngDownloaderRenderer(a,n,r,o),this.nodeBodies.setBgColorWhenFar(this.NODE_LABEL_COLOR,0),this.webglRendererThreejsService.renderPngDownloader(s),this.nodeBodies.setBgColorWhenFar(this.NODE_LABEL_COLOR,this.savedUpdateNodeBgWhenFarProgress/3);let c=document.createElement("a");c.download="model_explorer_graph.png",dc(c,a.toDataURL()),c.click(),this.webglRendererThreejsService.setSceneBackground(new vn.Color(16777215))})}openSubgraph(t){return It(this,null,function*(){this.appService.addSubgraphBreadcrumbItem(this.paneId,this.curModelGraph.id,t,yield this.webglRendererSnapshotService.takeSnapshot());let n=this.appService.getGraphById(t);n&&(this.appService.selectNode(this.paneId,void 0),this.appService.setFlattenLayersInCurrentPane(!1),this.appService.curInitialUiState.set(void 0),this.appService.curToLocateNodeInfo.set(void 0),this.appService.selectGraphInCurrentPane(n))})}getGroupNodeLabelSeparatorId(t,n){return`${t}_${n}`}getGroupNodeBgColor(t){let r=(t.namespace||"").split("/").filter(s=>s!=="").length,o=this.GROUP_NODE_BG_COLORS[Math.min(this.GROUP_NODE_BG_COLORS.length-1,r)];return this.threeColorToRgb(o)}threeColorToRgb(t){return{r:t.r,g:t.g,b:t.b}}startBenchmark(){let t=()=>{this.webglRendererThreejsService.render(!0),requestAnimationFrame(t)};t()}handleShiftSelectNode(t){this.webglRendererSubgraphSelectionService.enableSubgraphSelection&&this.subgraphSelectionService.toggleNode(t)}handleClearSubgraphSelectedNodes(){this.webglRendererSubgraphSelectionService.enableSubgraphSelection&&this.subgraphSelectionService.clearSelection()}createOverlay(t){let n=new fi({positionStrategy:this.overlay.position().flexibleConnectedTo(t).withPositions([{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"}]).withDefaultOffsetX(t.clientWidth).withViewportMargin(20),hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",maxHeight:"400px",panelClass:"io-tree-popup-container"}),r=this.overlay.create(n);return this.portal=new Ai(Sl,this.viewContainerRef),r.backdropClick().subscribe(()=>{r.dispose()}),r}showBusySpinnerWithDelay(){this.hideBusySpinner(),this.showBusySpinnerTimeoutRef=window.setTimeout(()=>{this.showBusySpinnerTimeoutRef<0||(this.snackBar.open("Processing. Please wait..."),this.showBusySpinner=!0,this.changeDetectorRef.detectChanges())},1e3)}hideBusySpinner(){this.showBusySpinnerTimeoutRef>=0&&(clearTimeout(this.showBusySpinnerTimeoutRef),this.showBusySpinnerTimeoutRef=-1),this.snackBar.dismiss(),this.showBusySpinner=!1,this.changeDetectorRef.detectChanges()}revealNode(t,n=!0){let r=this.curModelGraph.nodesById[t];return r?(this.sendRelayoutGraphRequest(t,r.nsParentId?[r.nsParentId]:[],!1,void 0,!1,void 0,!1,n),!0):!1}updateCurModelGraph(t){let n=this.curModelGraph.edgesByGroupNodeIds;this.curModelGraph=yt(Z({},t),{edgesByGroupNodeIds:Z(Z({},n),t.edgesByGroupNodeIds)}),this.appService.updateCurrentModelGraph(this.paneId,this.curModelGraph)}updateNodesAndEdgesToRender(){if(!this.curModelGraph)return;this.elementsToRender=[],this.nodesToRender=[],this.nodesToRenderMap={},this.edgesToRender=[];let t=!0,n=!1,r=o=>{let s=this.curModelGraph.nodesById[o||""];if(t&&s){this.elementsToRender.push({type:AC.NODE,id:s.id,node:s});let c={node:s,index:this.elementsToRender.length-1};this.nodesToRender.push(c),this.nodesToRenderMap[c.node.id]=c,wt(s)&&s.sectionContainer&&(n=!0)}if(t=!1,o&&s&&s.expanded||!o)for(let c of this.curModelGraph.edgesByGroupNodeIds[o||""]||[])this.elementsToRender.push({type:AC.EDGE,id:c.id,edge:c}),this.edgesToRender.push({edge:c,index:this.elementsToRender.length-1});let a=[];o?s.expanded&&(a=(s.nsChildrenIds||[]).map(c=>this.curModelGraph.nodesById[c])):a=this.curModelGraph.rootNodes;for(let c of a){let l={type:AC.NODE,id:c.id,node:c};!n&&wt(c)&&c.sectionContainer&&(n=!0),this.elementsToRender.push(l);let d={node:c,index:this.elementsToRender.length-1};this.nodesToRender.push(d),this.nodesToRenderMap[d.node.id]=d,wt(c)&&c.expanded&&r(c.id)}};r(this.rootNodeId),this.appService.setPaneHasArtificialLayers(this.paneId,n)}getNodeLabel(t){return St(t)?t.label==="Placeholder"?t.id:t.label:wt(t)?t.label:"-"}setHoveredNodeId(t){this.hoveredNodeId=t,this.appService.updateHoveredNode(t,this.curModelGraph.id,this.curModelGraph.collectionLabel||"",this.curModelGraph.nodesById[t])}static \u0275fac=function(n){return new(n||i)(M(Ne),M(Fi),M(Fe),M(Mr),M(pa),M($t),M(hc),M(yl),M(Ko),M(Ml),M(Gc),M(Zt),M(yC),M(xC),M(SC),M(CC),M(MC),M(EC),M(IC),M(TC),M(PC),M(OC),M(jc))};static \u0275cmp=ce({type:i,selectors:[["webgl-renderer"]],viewQuery:function(n,r){if(n&1&&(Ee(ehe,7),Ee(the,7),Ee(nhe,7),Ee(ihe,7),Ee(rhe,7),Ee(ohe,7),Ee(she,7),Ee(ahe,5),Ee(che,5),Ee(lhe,7),Ee(dhe,7),Ee(uhe,7)),n&2){let o;be(o=ye())&&(r.container=o.first),be(o=ye())&&(r.canvas=o.first),be(o=ye())&&(r.snapshotCanvas=o.first),be(o=ye())&&(r.pngDownloaderCanvas=o.first),be(o=ye())&&(r.hoverToolbar=o.first),be(o=ye())&&(r.ioPicker=o.first),be(o=ye())&&(r.subgraphMenuTrigger=o.first),be(o=ye())&&(r.groupNodeIconMatTooltip=o.first),be(o=ye())&&(r.ioPickerMatTooltip=o.first),be(o=ye())&&(r.moreActionsMenuTrigger=o.first),be(o=ye())&&(r.rangeZoomDragArea=o.first),be(o=ye())&&(r.dragToSelectDragArea=o.first)}},inputs:{modelGraph:"modelGraph",rendererId:"rendererId",paneId:"paneId",rootNodeId:"rootNodeId",inPopup:"inPopup",benchmark:"benchmark"},outputs:{openInPopupClicked:"openInPopupClicked"},standalone:!0,features:[Ft([yC,xC,SC,CC,MC,EC,IC,TC,PC,OC]),le],decls:39,vars:59,consts:[["container",""],["canvas",""],["snapshotCanvas",""],["pngDownloaderCanvas",""],["groupNodeIconMatTooltip","matTooltip"],["moreActionsMenuTrigger","matMenuTrigger"],["moreActionsMenu","matMenu"],["ioPicker",""],["ioPickerMatTooltip","matTooltip"],["subgraphIndicator",""],["subgraphMenuTrigger","matMenuTrigger"],["menu","matMenu"],["rangeZoomDragArea",""],["dragToSelectDragArea",""],[1,"container",3,"mouseleave"],[1,"main",3,"mousedown","contextmenu"],[1,"snapshot"],[1,"download-png"],[1,"group-node-icon",3,"mouseenter","mouseleave","mousedown"],["matTooltipPosition","above",1,"group-node-icon-tooltip",3,"matTooltip","matTooltipShowDelay","matTooltipDisabled"],[1,"more-actions-menu-trigger",3,"matMenuTriggerFor"],[1,"model-explorer-menu-item-with-icon","expand-all",3,"click"],["class","model-explorer-menu-item-with-icon collapse-all",3,"click",4,"ngIf"],["class","model-explorer-menu-item-with-icon open-in-popup",3,"click",4,"ngIf"],[1,"io-picker",3,"mousedown","mouseenter","mouseleave"],["matTooltipPosition","above",1,"io-picker-tooltip",3,"matTooltip"],["matTooltip","Jump to subgraph","matTooltipPosition","above",1,"subgraph-indicator",3,"mousedown","click"],[1,"subgraph-indicator-menu-trigger",3,"matMenuTriggerFor"],[1,"model-explorer-menu-item-with-icon"],["bgColor","rgba(97, 175, 252, 0.2)","borderColor","#1976d2"],["bgColor","rgba(9, 184, 62, 0.2)","borderColor","#09b83e"],[1,"flash"],[1,"fps"],[1,"model-explorer-menu-item-with-icon","collapse-all",3,"click"],[1,"model-explorer-menu-item-with-icon","open-in-popup",3,"click"],[1,"model-explorer-menu-item-with-icon",3,"click"]],template:function(n,r){if(n&1){let o=ne();v(0,"div",14,0),H("mouseleave",function(a){return B(o),V(r.handleMouseLeaveRenderer(a))}),v(2,"canvas",15,1),H("mousedown",function(a){return B(o),V(r.handleMouseDownCanvas(a))})("contextmenu",function(a){return B(o),V(a.preventDefault())}),b(),ee(4,"canvas",16,2)(6,"canvas",17,3),v(8,"div",18),H("mouseenter",function(){return B(o),V(r.handleMouseEnterGroupNodeIcon())})("mouseleave",function(){return B(o),V(r.handleMouseLeaveGroupNodeIcon())})("mousedown",function(a){return B(o),V(r.handleClickGroupNodeIcon(a))}),b(),ee(9,"div",19,4)(11,"div",20,5),v(13,"mat-menu",null,6)(15,"div",21),H("click",function(){return B(o),V(r.handleClickExpandAll(r.hoveredNodeIdWhenClickingMoreActions))}),v(16,"mat-icon"),S(17,"unfold_more_double"),b(),S(18," Expand layer & all sub-layers "),b(),$(19,hhe,4,0,"div",22)(20,phe,4,0,"div",23),b(),v(21,"div",24,7),H("mousedown",function(a){return B(o),V(r.handleClickIoPicker(a))})("mouseenter",function(){return B(o),V(r.handleMouseEnterIoPicker())})("mouseleave",function(){return B(o),V(r.handleMouseLeaveIoPicker())}),b(),ee(23,"div",25,8),v(25,"div",26,9),H("mousedown",function(a){return B(o),V(a.stopPropagation())})("click",function(){return B(o),V(r.handleClickSubgraphIndicator())}),b(),ee(27,"div",27,10),v(29,"mat-menu",null,11),rn(31,fhe,4,1,"div",28,gr),b(),ee(33,"drag-area",29,12)(35,"drag-area",30,13)(37,"div",31),$(38,mhe,2,1,"div",32),b()}if(n&2){let o=ve(14),s=ve(30);w(8),Jt("top",r.groupNodeIcon.top,"px")("left",r.groupNodeIcon.left,"px")("width",r.groupNodeIcon.width,"px")("height",r.groupNodeIcon.height,"px"),w(),Jt("top",r.groupNodeIcon.top,"px")("left",r.groupNodeIcon.left,"px")("width",r.groupNodeIcon.width,"px")("height",r.groupNodeIcon.height,"px"),R("matTooltip",r.groupNodeIcon.tooltip||"")("matTooltipShowDelay",200)("matTooltipDisabled",r.groupNodeIcon.tooltip==null),w(2),Jt("top",r.groupNodeIcon.top+r.groupNodeIcon.height,"px")("left",r.groupNodeIcon.left,"px"),R("matMenuTriggerFor",o),w(8),R("ngIf",r.getShowCollapseAllButton(r.hoveredNodeIdWhenClickingMoreActions)),w(),R("ngIf",r.showOpenInPopupButton),w(),Jt("top",r.ioPickerTop,"px")("left",r.ioPickerLeft,"px")("width",r.ioPickerWidth,"px")("height",r.ioPickerHeight,"px"),w(2),Jt("top",r.ioPickerTop,"px")("left",r.ioPickerLeft,"px")("width",r.ioPickerWidth,"px")("height",r.ioPickerHeight,"px"),R("matTooltip",r.ioPickerTooltip),w(2),Jt("top",r.subgraphIndicatorTop,"px")("left",r.subgraphIndicatorLeft,"px")("width",r.subgraphIndicatorWidth,"px")("height",r.subgraphIndicatorHeight,"px"),w(2),Jt("top",r.subgraphIndicatorTop+r.subgraphIndicatorHeight,"px")("left",r.subgraphIndicatorLeft,"px"),R("matMenuTriggerFor",s),w(4),on(r.curSubgraphIdsForMenu),w(6),re("flashing",r.flashing),w(),oe(r.benchmark?38:-1)}},dependencies:[Ae,Tn,mG,tt,pt,ua,ns,xl,Xt,Yn],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;overflow:hidden;position:relative}.container[_ngcontent-%COMP%] canvas.main[_ngcontent-%COMP%]{width:100%!important;height:100%!important;box-sizing:border-box}.container[_ngcontent-%COMP%] canvas.snapshot[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] canvas.download-png[_ngcontent-%COMP%]{position:absolute;left:0;bottom:0;width:400px;height:300px;border:1px solid red;box-sizing:border-box;background-color:#fff;display:none}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%]{position:absolute;width:50px;height:40px;box-sizing:border-box;display:flex;transition:opacity .15s;opacity:1;pointer-events:none}.container[_ngcontent-%COMP%] .hover-toolbar.hide[_ngcontent-%COMP%]{transition:none;opacity:0}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .main-content-wrapper[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;justify-content:center;pointer-events:all}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%]{font-size:12px;border:1px solid #ccc;background-color:#fafafae6;border-radius:99px;padding:0 8px;box-sizing:border-box;box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;display:flex;align-items:center}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:.8;width:24px;padding:4px 0}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1;background-color:#eee}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;font-weight:700;width:16px;height:16px;line-height:16px;color:#ea8600}.container[_ngcontent-%COMP%] .io-picker[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .group-node-icon[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .subgraph-indicator[_ngcontent-%COMP%]{position:absolute;box-sizing:border-box;display:flex;background-color:transparent}.container[_ngcontent-%COMP%] .group-node-icon[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .io-picker[_ngcontent-%COMP%]{z-index:100}.container[_ngcontent-%COMP%] .group-node-icon-tooltip[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .io-picker-tooltip[_ngcontent-%COMP%]{position:absolute;z-index:50}.container[_ngcontent-%COMP%] .subgraph-indicator-menu-trigger[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .more-actions-menu-trigger[_ngcontent-%COMP%]{position:absolute;visibility:hidden}.container[_ngcontent-%COMP%] .flash[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:5000;box-sizing:border-box;border:5px solid #1976d2;pointer-events:none;opacity:0}@keyframes _ngcontent-%COMP%_flashing{5%{opacity:1}to{opacity:0}}.container[_ngcontent-%COMP%] .flashing[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_flashing .3s ease-out}.container[_ngcontent-%COMP%] .fps[_ngcontent-%COMP%]{position:absolute;top:12px;left:12px;z-index:100;font-size:32px;border:1px solid #777;padding:8px;border-radius:4px;background-color:#fff} .multiline-tooltip{white-space:pre-line} .multiline-tooltip-left{white-space:pre-line} .multiline-tooltip-left>div{text-align:left} .model-explorer-menu-item-with-icon{font-family:Google Sans Text,Arial,Helvetica,sans-serif;display:flex;align-items:center;font-size:12px;padding:5px 8px;line-height:15px;letter-spacing:normal} .model-explorer-menu-item-with-icon mat-icon{font-size:16px;width:16px;height:16px;margin-right:4px;color:#999} .model-explorer-menu-item-with-icon:hover{background-color:#0000000a} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();function She(i,e){if(i&1){let t=ne();v(0,"button",10),H("click",function(){B(t);let r=I(2);return V(r.handleClickStart())}),S(1," Start "),b()}}function Mhe(i,e){i&1&&(v(0,"div",9),S(1,"Generating graph. Please wait..."),b())}function Ehe(i,e){if(i&1&&(v(0,"div",2)(1,"div",4)(2,"div",5),S(3,"Node count"),b(),ee(4,"input",6),b(),v(5,"div",4)(6,"div",5),S(7,"Edge count"),b(),ee(8,"input",6),b(),v(9,"div",4)(10,"div",5),S(11,"Colorize"),b(),ee(12,"input",7),b(),$(13,She,2,0,"button",8)(14,Mhe,2,0,"div",9),b()),i&2){let t=I();w(4),R("formControl",t.curNodeCount),w(4),R("formControl",t.curEdgeCount),w(4),R("formControl",t.curColorize),w(),oe(t.generating?14:13)}}function Ihe(i,e){if(i&1&&ee(0,"webgl-renderer",3),i&2){let t=I();R("modelGraph",t.modelGraph)("benchmark",!0)}}var The=Ln,XG=(()=>{class i{changeDetectorRef;curNodeCount=new vr(1e4);curEdgeCount=new vr(5e3);curColorize=new vr(!1);generating=!1;modelGraph;constructor(t){this.changeDetectorRef=t}handleClickStart(){this.generating=!0,this.changeDetectorRef.detectChanges(),setTimeout(()=>{this.genModelGraph()},100)}genModelGraph(){let t=this.curNodeCount.value,n=this.curEdgeCount.value,r=Math.max(500,Math.floor(Math.sqrt(t)*300)),o=[];for(let c=0;c{class i{extensionServerAddress=Dhe;extensions={};loadExtensions(){return It(this,null,function*(){let t=(yield this.sendGetRequest("api_list_extensions"))||[];t.sort((n,r)=>n.name.localeCompare(r.name));for(let n of t)this.extensions[n.id]=n;return t})}sendCommandToExtension(t){return It(this,null,function*(){return yield this.sendGetRequest("api_cmd",t)})}updateExtensionServerAddress(t){this.extensionServerAddress=t}sendGetRequest(t,n){return It(this,null,function*(){let r=`${this.extensionServerAddress}/${t}`;n&&(r=`${r}?cmd=${encodeURIComponent(JSON.stringify(n))}`);try{let o=yield fetch(r,{credentials:"include"});return o.ok?yield o.json():void 0}catch(o){console.warn(o);return}})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var Phe=["determinateSpinner"];function Ohe(i,e){if(i&1&&(uo(),v(0,"svg",11),ee(1,"circle",12),b()),i&2){let t=I();Ye("viewBox",t._viewBox()),w(),Jt("stroke-dasharray",t._strokeCircumference(),"px")("stroke-dashoffset",t._strokeCircumference()/2,"px")("stroke-width",t._circleStrokeWidth(),"%"),Ye("r",t._circleRadius())}}var Rhe=new me("mat-progress-spinner-default-options",{providedIn:"root",factory:Ahe});function Ahe(){return{diameter:QG}}var QG=100,Nhe=10,fa=(()=>{let e=class e{get color(){return this._color||this._defaultColor}set color(n){this._color=n}constructor(n,r,o){this._elementRef=n,this._defaultColor="primary",this._value=0,this._diameter=QG,this._noopAnimations=r==="NoopAnimations"&&!!o&&!o._forceAnimations,this.mode=n.nativeElement.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",o&&(o.color&&(this.color=this._defaultColor=o.color),o.diameter&&(this.diameter=o.diameter),o.strokeWidth&&(this.strokeWidth=o.strokeWidth))}get value(){return this.mode==="determinate"?this._value:0}set value(n){this._value=Math.max(0,Math.min(100,n||0))}get diameter(){return this._diameter}set diameter(n){this._diameter=n||0}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(n){this._strokeWidth=n||0}_circleRadius(){return(this.diameter-Nhe)/2}_viewBox(){let n=this._circleRadius()*2+this.strokeWidth;return`0 0 ${n} ${n}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return this.mode==="determinate"?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(jn,8),M(Rhe))},e.\u0275cmp=ce({type:e,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(r,o){if(r&1&&Ee(Phe,5),r&2){let s;be(s=ye())&&(o._determinateCircle=s.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(r,o){r&2&&(Ye("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",o.mode==="determinate"?o.value:null)("mode",o.mode),Vr("mat-"+o.color),Jt("width",o.diameter,"px")("height",o.diameter,"px")("--mdc-circular-progress-size",o.diameter+"px")("--mdc-circular-progress-active-indicator-width",o.diameter+"px"),re("_mat-animation-noopable",o._noopAnimations)("mdc-circular-progress--indeterminate",o.mode==="indeterminate"))},inputs:{color:"color",mode:"mode",value:[2,"value","value",ni],diameter:[2,"diameter","diameter",ni],strokeWidth:[2,"strokeWidth","strokeWidth",ni]},exportAs:["matProgressSpinner"],standalone:!0,features:[nn,le],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(r,o){if(r&1&&($(0,Ohe,2,8,"ng-template",null,0,Tt),v(2,"div",2,1),uo(),v(4,"svg",3),ee(5,"circle",4),b()(),H0(),v(6,"div",5)(7,"div",6)(8,"div",7),Ki(9,8),b(),v(10,"div",9),Ki(11,8),b(),v(12,"div",10),Ki(13,8),b()()()),r&2){let s=ve(1);w(4),Ye("viewBox",o._viewBox()),w(),Jt("stroke-dasharray",o._strokeCircumference(),"px")("stroke-dashoffset",o._strokeDashOffset(),"px")("stroke-width",o._circleStrokeWidth(),"%"),Ye("r",o._circleRadius()),w(4),R("ngTemplateOutlet",s),w(2),R("ngTemplateOutlet",s),w(2),R("ngTemplateOutlet",s)}},dependencies:[Gs],styles:[".mat-mdc-progress-spinner{display:block;overflow:hidden;line-height:0;position:relative;direction:ltr;transition:opacity 250ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-progress-spinner circle{stroke-width:var(--mdc-circular-progress-active-indicator-width)}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1;animation:mdc-circular-progress-container-rotate 1568.2352941176ms linear infinite}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mdc-circular-progress-active-indicator-color)}.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.cdk-high-contrast-active .mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}"],encapsulation:2,changeDetection:0});let i=e;return i})();var ao=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({imports:[Ae,Ut]});let i=e;return i})();function khe(i,e){i&1&&(v(0,"tr")(1,"td"),ee(2,"div",9),b(),v(3,"td")(4,"div",2),S(5,"Artificial layer to reduce layout load"),b()()())}function Lhe(i,e){if(i&1&&(v(0,"tr")(1,"td"),ee(2,"div",10),b(),v(3,"td")(4,"div",2),S(5),b()()()),i&2){let t=I();w(2),re("group",t.isSelectedNodeGroup),w(3),Se(" Selected ",t.isSelectedNodeGroup?"layer":"op"," ")}}function Fhe(i,e){i&1&&(v(0,"tr")(1,"td"),ee(2,"div",11),b(),v(3,"td")(4,"div",2),S(5,"Identical layer (if any)"),b()()())}function Bhe(i,e){i&1&&(ho(0),v(1,"tr")(2,"td"),ee(3,"div",12),b(),v(4,"td")(5,"div",2),S(6,"Inputs (if any)"),b()()(),v(7,"tr")(8,"td"),ee(9,"div",13),b(),v(10,"td")(11,"div",2),S(12,"Outputs (if any)"),b()()(),po())}var KG=(()=>{class i{appService;changeDetectorRef;paneId;showSelectedNodeKey=!1;isSelectedNodeGroup=!1;hasArtificialLayers=!1;constructor(t,n){this.appService=t,this.changeDetectorRef=n,lt(()=>{let r=this.appService.getPaneById(this.paneId);if(!r)return;this.hasArtificialLayers=r.hasArtificialLayers===!0;let o=r.selectedNodeInfo;if(!o){this.showSelectedNodeKey=!1,this.changeDetectorRef.markForCheck();return}this.showSelectedNodeKey=o.nodeId!=="",this.isSelectedNodeGroup=o.isGroupNode,this.changeDetectorRef.markForCheck()})}static \u0275fac=function(n){return new(n||i)(M(at),M(Ne))};static \u0275cmp=ce({type:i,selectors:[["legends-panel"]],inputs:{paneId:"paneId"},standalone:!0,features:[le],decls:35,vars:4,consts:[[1,"container"],[1,"key","op-node-key"],[1,"label"],[1,"key","group-node-key"],[4,"ngIf"],["colspan","2"],[1,"divider"],[1,"key","shortcut"],[1,"label","shortcut"],[1,"key","artificial-layer-key"],[1,"key","selected-node-key"],[1,"key","identical-group-key"],[1,"key","input-key"],[1,"key","output-key"]],template:function(n,r){n&1&&(v(0,"div",0)(1,"table")(2,"tr")(3,"td"),ee(4,"div",1),b(),v(5,"td")(6,"div",2),S(7,"Op"),b()()(),v(8,"tr")(9,"td"),ee(10,"div",3),b(),v(11,"td")(12,"div",2),S(13,"Layer"),b()()(),$(14,khe,6,0,"tr",4)(15,Lhe,6,3,"tr",4)(16,Fhe,6,0,"tr",4)(17,Bhe,13,0,"ng-container",4),v(18,"tr")(19,"td",5),ee(20,"div",6),b()(),v(21,"tr")(22,"td")(23,"div",7),S(24,"Zoom"),b()(),v(25,"td")(26,"div",8),S(27,"Ctrl+Scroll"),b()()(),v(28,"tr")(29,"td")(30,"div",7),S(31,"Pan"),b()(),v(32,"td")(33,"div",8),S(34,"Drag or scroll"),b()()()()()),n&2&&(w(14),R("ngIf",r.hasArtificialLayers),w(),R("ngIf",r.showSelectedNodeKey),w(),R("ngIf",r.showSelectedNodeKey&&r.isSelectedNodeGroup),w(),R("ngIf",r.showSelectedNodeKey&&!r.isSelectedNodeGroup))},dependencies:[Ae,Tn,tt],styles:[`.container[_ngcontent-%COMP%]{height:fit-content;background-color:#ffffffe6;padding:8px}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border-spacing:0;border-collapse:collapse;padding:0;font-size:11px}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .key[_ngcontent-%COMP%]{margin-right:4px;box-sizing:border-box}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .op-node-key[_ngcontent-%COMP%]{width:30px;height:14px;border-radius:5px;border:1px solid #666;background-color:#fff}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .group-node-key[_ngcontent-%COMP%]{width:30px;height:14px;border:1px solid #777;border-radius:5px;background-color:#eaeaf2}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .artificial-layer-key[_ngcontent-%COMP%]{border:1px solid #800080;width:30px;height:14px;background-color:#f1f1f1}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .selected-node-key[_ngcontent-%COMP%]{width:30px;height:14px;border:2px solid #1a73e8;border-radius:5px;background-color:#c2e7ff}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .identical-group-key[_ngcontent-%COMP%]{width:30px;height:14px;border:1px solid #777;background-color:#e2edff}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .input-key[_ngcontent-%COMP%]{width:30px;height:14px;border-radius:5px;border:2px solid #009e73}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .output-key[_ngcontent-%COMP%]{width:30px;height:14px;border-radius:5px;border:2px solid #d55e00}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .shortcut[_ngcontent-%COMP%]{color:#777;font-size:10px;line-height:10px}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{height:1px;border-top:1px solid #ccc;margin:8px 0 4px} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();var JG=48,ej=48,kC=class{rootEle;constructor(e){this.rootEle=e}drag(e){let t=e.clientX,n=e.clientY,r=e.offsetX,o=Number(this.rootEle.style.top.replace("px","")),s=Number(this.rootEle.style.left.replace("px","")),a=Number(this.rootEle.style.width.replace("px","")),c=Number(this.rootEle.style.height.replace("px","")),l=yn(document,"mousemove"),d=yn(window,"mouseup"),u=e.target.dataset.position,h=this.rootEle.parentElement.offsetHeight,p=this.rootEle.parentElement.offsetWidth;eo([l]).pipe(Ze(d)).subscribe({next:([f])=>{f.preventDefault();let m=f.clientX-t,y=f.clientY-n;if(!(m===0&&y===0))if(u==null)this.rootEle.style.top=`${Math.min(h-28,Math.max(o+y,0))}px`,this.rootEle.style.left=`${Math.min(p-r,Math.max(-r,s+m))}px`;else{if(u.includes("right")&&(this.rootEle.style.width=`${Math.max(JG,a+m)}px`),u.includes("bottom")&&(this.rootEle.style.height=`${Math.max(ej,c+y)}px`),u.includes("left")){let g=Math.max(JG,a-m);this.rootEle.style.width=`${g}px`,this.rootEle.style.left=`${s+(a-g)}px`}if(u.includes("top")){let g=Math.max(ej,c-y);this.rootEle.style.height=`${g}px`,this.rootEle.style.top=`${o+(c-g)}px`}}},complete:()=>{}})}};var Is=(()=>{class i extends vC{constructor(t,n,r,o,s,a,c){super(t,n,r,o,s,a,c),this.attachMouseEventListeners(r.nativeElement)}ngOnInit(){super.ngOnInit(),this.listenForOpenEvents()}listenForOpenEvents(){this.openStatusChange.pipe(Ze(this.destroyed)).subscribe(t=>{t?this.openDialog():this.closeDialog()})}attachMouseEventListeners(t){this.ngZone.runOutsideAngular(()=>{yn(t,"click").pipe(Ze(this.destroyed)).subscribe(n=>{n.target.closest("[bubbleClose]")?this.closingDialog():this.openingDialog()}),this.overlayRef?.backdropClick().pipe(Ze(this.destroyed)).subscribe(()=>{this.closingDialog()})})}attachKeyboardCloseEventListeners(t){this.ngZone.runOutsideAngular(()=>{yn(t,"keyup").pipe(Ze(this.destroyed)).subscribe(n=>{let r=n.keyCode,o=n.target;switch(r){case 27:this.closingDialog();return;case 32:o.closest("[bubbleClose]")&&this.closingDialog();return;default:return}}),yn(t,"keydown").pipe(Ze(this.destroyed)).subscribe(n=>{let r=n.keyCode,o=n.target;switch(r){case 13:o.closest("[bubbleClose]")&&this.closingDialog();return;default:return}})})}openingDialog(){this.disabled||this.openStatusChange.next(!0)}closingDialog(){this.openStatusChange.next(!1)}createOverlayConfig(t){return new fi(yt(Z({},this.overlayDimensions),{positionStrategy:super.createPositionStrategy(t),scrollStrategy:this.createScrollStrategy(),hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",panelClass:this.panelClassInternal}))}static \u0275fac=function(n){return new(n||i)(M(Fe),M($t),M(Re),M(Zt),M(Xe),M(Bh),M(vt))};static \u0275dir=Ve({type:i,selectors:[["","bubbleClick",""]],hostAttrs:[1,"bubble-click"],inputs:{dialog:[0,"bubbleClick","dialog"],disabled:[0,"bubbleDisabled","disabled"]},exportAs:["bubbleClick"],standalone:!0,features:[sn]})}return i})();var zhe=["input"],Uhe=["label"],Hhe=["*"],Ghe=new me("mat-checkbox-default-options",{providedIn:"root",factory:nj});function nj(){return{color:"accent",clickAction:"check-indeterminate"}}var Ir=function(i){return i[i.Init=0]="Init",i[i.Checked=1]="Checked",i[i.Unchecked=2]="Unchecked",i[i.Indeterminate=3]="Indeterminate",i}(Ir||{}),jhe={provide:Ba,useExisting:kr(()=>LC),multi:!0},NO=class{},Whe=0,tj=nj(),LC=(()=>{let e=class e{focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(n){let r=new NO;return r.source=this,r.checked=n,r}_getAnimationTargetElement(){return this._inputElement?.nativeElement}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(n,r,o,s,a,c){this._elementRef=n,this._changeDetectorRef=r,this._ngZone=o,this._animationMode=a,this._options=c,this._animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"},this.ariaLabel="",this.ariaLabelledby=null,this.labelPosition="after",this.name=null,this.change=new Ie,this.indeterminateChange=new Ie,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=Ir.Init,this._controlValueAccessorChangeFn=()=>{},this._validatorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,this._options=this._options||tj,this.color=this._options.color||tj.color,this.tabIndex=parseInt(s)||0,this.id=this._uniqueId=`mat-mdc-checkbox-${++Whe}`}ngOnChanges(n){n.required&&this._validatorChangeFn()}ngAfterViewInit(){this._syncIndeterminate(this._indeterminate)}get checked(){return this._checked}set checked(n){n!=this.checked&&(this._checked=n,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(n){n!==this.disabled&&(this._disabled=n,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(n){let r=n!=this._indeterminate;this._indeterminate=n,r&&(this._indeterminate?this._transitionCheckState(Ir.Indeterminate):this._transitionCheckState(this.checked?Ir.Checked:Ir.Unchecked),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(n){this.checked=!!n}registerOnChange(n){this._controlValueAccessorChangeFn=n}registerOnTouched(n){this._onTouched=n}setDisabledState(n){this.disabled=n}validate(n){return this.required&&n.value!==!0?{required:!0}:null}registerOnValidatorChange(n){this._validatorChangeFn=n}_transitionCheckState(n){let r=this._currentCheckState,o=this._getAnimationTargetElement();if(!(r===n||!o)&&(this._currentAnimationClass&&o.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(r,n),this._currentCheckState=n,this._currentAnimationClass.length>0)){o.classList.add(this._currentAnimationClass);let s=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{o.classList.remove(s)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){let n=this._options?.clickAction;!this.disabled&&n!=="noop"?(this.indeterminate&&n!=="check"&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this._checked=!this._checked,this._transitionCheckState(this._checked?Ir.Checked:Ir.Unchecked),this._emitChangeEvent()):!this.disabled&&n==="noop"&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate)}_onInteractionEvent(n){n.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(n,r){if(this._animationMode==="NoopAnimations")return"";switch(n){case Ir.Init:if(r===Ir.Checked)return this._animationClasses.uncheckedToChecked;if(r==Ir.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case Ir.Unchecked:return r===Ir.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case Ir.Checked:return r===Ir.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case Ir.Indeterminate:return r===Ir.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(n){let r=this._inputElement;r&&(r.nativeElement.indeterminate=n)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(n){n.target&&this._labelElement.nativeElement.contains(n.target)&&n.stopPropagation()}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Ne),M(Fe),Lr("tabindex"),M(jn,8),M(Ghe,8))},e.\u0275cmp=ce({type:e,selectors:[["mat-checkbox"]],viewQuery:function(r,o){if(r&1&&(Ee(zhe,5),Ee(Uhe,5),Ee(gs,5)),r&2){let s;be(s=ye())&&(o._inputElement=s.first),be(s=ye())&&(o._labelElement=s.first),be(s=ye())&&(o.ripple=s.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:14,hostBindings:function(r,o){r&2&&(Fo("id",o.id),Ye("tabindex",null)("aria-label",null)("aria-labelledby",null),Vr(o.color?"mat-"+o.color:"mat-accent"),re("_mat-animation-noopable",o._animationMode==="NoopAnimations")("mdc-checkbox--disabled",o.disabled)("mat-mdc-checkbox-disabled",o.disabled)("mat-mdc-checkbox-checked",o.checked))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],id:"id",required:[2,"required","required",et],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[2,"disableRipple","disableRipple",et],tabIndex:[2,"tabIndex","tabIndex",n=>n==null?void 0:ni(n)],color:"color",checked:[2,"checked","checked",et],disabled:[2,"disabled","disabled",et],indeterminate:[2,"indeterminate","indeterminate",et]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],standalone:!0,features:[Ft([jhe,{provide:vd,useExisting:e,multi:!0}]),nn,dn,le],ngContentSelectors:Hhe,decls:15,vars:19,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"blur","click","change","checked","indeterminate","disabled","id","required","tabIndex"],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(r,o){if(r&1){let s=ne();In(),v(0,"div",3),H("click",function(c){return B(s),V(o._preventBubblingFromLabel(c))}),v(1,"div",4,0)(3,"div",5),H("click",function(){return B(s),V(o._onTouchTargetClick())}),b(),v(4,"input",6,1),H("blur",function(){return B(s),V(o._onBlur())})("click",function(){return B(s),V(o._onInputClick())})("change",function(c){return B(s),V(o._onInteractionEvent(c))}),b(),ee(6,"div",7),v(7,"div",8),uo(),v(8,"svg",9),ee(9,"path",10),b(),H0(),ee(10,"div",11),b(),ee(11,"div",12),b(),v(12,"label",13,2),Wt(14),b()()}if(r&2){let s=ve(2);R("labelPosition",o.labelPosition),w(4),re("mdc-checkbox--selected",o.checked),R("checked",o.checked)("indeterminate",o.indeterminate)("disabled",o.disabled)("id",o.inputId)("required",o.required)("tabIndex",o.disabled?-1:o.tabIndex),Ye("aria-label",o.ariaLabel||null)("aria-labelledby",o.ariaLabelledby)("aria-describedby",o.ariaDescribedby)("aria-checked",o.indeterminate?"mixed":null)("name",o.name)("value",o.value),w(7),R("matRippleTrigger",s)("matRippleDisabled",o.disableRipple||o.disabled)("matRippleCentered",!0),w(),R("for",o.inputId)}},dependencies:[gs,Hh],styles:['.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom;padding:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2);margin:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox:hover .mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-hover-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-hover-state-layer-color)}.mdc-checkbox:hover .mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-focus-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-focus-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-focus-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-pressed-state-layer-opacity);background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-hover-state-layer-opacity);background-color:var(--mdc-checkbox-selected-hover-state-layer-color)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-hover-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-focus-state-layer-opacity);background-color:var(--mdc-checkbox-selected-focus-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-focus-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-pressed-state-layer-opacity);background-color:var(--mdc-checkbox-selected-pressed-state-layer-color)}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-pressed-state-layer-color)}.mdc-checkbox .mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;width:var(--mdc-checkbox-state-layer-size, 40px);height:var(--mdc-checkbox-state-layer-size, 40px);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox--disabled{cursor:default;pointer-events:none}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1);border-color:var(--mdc-checkbox-unselected-icon-color);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2)}.mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color);background-color:var(--mdc-checkbox-selected-icon-color)}.mdc-checkbox--disabled .mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color)}.mdc-checkbox__native-control:disabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:disabled:indeterminate~.mdc-checkbox__background{background-color:var(--mdc-checkbox-disabled-selected-icon-color);border-color:rgba(0,0,0,0)}.mdc-checkbox:hover .mdc-checkbox__native-control:not(:checked)~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color);background-color:rgba(0,0,0,0)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color);background-color:var(--mdc-checkbox-selected-hover-icon-color)}.mdc-checkbox__native-control:focus:focus:not(:checked)~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color)}.mdc-checkbox__native-control:focus:focus:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color);background-color:var(--mdc-checkbox-selected-focus-icon-color)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.6, 1);color:var(--mdc-checkbox-selected-checkmark-color)}.mdc-checkbox--disabled .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color)}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);border-color:var(--mdc-checkbox-selected-checkmark-color)}.cdk-high-contrast-active .mdc-checkbox__mixedmark{margin:0 1px}.mdc-checkbox--disabled .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color)}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms cubic-bezier(0, 0, 0.2, 1),transform 180ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox._mat-animation-noopable .mdc-checkbox *,.mat-mdc-checkbox._mat-animation-noopable .mdc-checkbox *::before{transition:none !important;animation:none !important}.mat-mdc-checkbox .mdc-checkbox__background{-webkit-print-color-adjust:exact;color-adjust:exact}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox .mat-internal-form-field{color:var(--mat-checkbox-label-text-color);font-family:var(--mat-checkbox-label-text-font);line-height:var(--mat-checkbox-label-text-line-height);font-size:var(--mat-checkbox-label-text-size);letter-spacing:var(--mat-checkbox-label-text-tracking);font-weight:var(--mat-checkbox-label-text-weight)}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default;color:var(--mat-checkbox-disabled-label-color)}.mat-mdc-checkbox label:empty{display:none}.cdk-high-contrast-active .mat-mdc-checkbox.mat-mdc-checkbox-disabled{opacity:.5}.cdk-high-contrast-active .mat-mdc-checkbox .mdc-checkbox__checkmark{--mdc-checkbox-selected-checkmark-color: CanvasText;--mdc-checkbox-disabled-selected-checkmark-color: CanvasText}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-ripple .mat-ripple-element{opacity:.1}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-checkbox-touch-target-display)}.mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-mdc-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0});let i=e;return i})();var FC=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({imports:[LC,Ut,Ut]});let i=e;return i})();var kO=class{constructor(e){this._box=e,this._destroyed=new pe,this._resizeSubject=new pe,this._elementObservables=new Map,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(t=>this._resizeSubject.next(t)))}observe(e){return this._elementObservables.has(e)||this._elementObservables.set(e,new Et(t=>{let n=this._resizeSubject.subscribe(t);return this._resizeObserver?.observe(e,{box:this._box}),()=>{this._resizeObserver?.unobserve(e),n.unsubscribe(),this._elementObservables.delete(e)}}).pipe(qt(t=>t.some(n=>n.target===e)),$v({bufferSize:1,refCount:!0}),Ze(this._destroyed))),this._elementObservables.get(e)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},ij=(()=>{let e=class e{constructor(){this._observers=new Map,this._ngZone=te(Fe),typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,n]of this._observers)n.destroy();this._observers.clear(),typeof ResizeObserver<"u"}observe(n,r){let o=r?.box||"content-box";return this._observers.has(o)||this._observers.set(o,new kO(o)),this._observers.get(o).observe(n)}};e.\u0275fac=function(r){return new(r||e)},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();var qhe=["notch"],Yhe=["matFormFieldNotchedOutline",""],Xhe=["*"],Zhe=["textField"],Qhe=["iconPrefixContainer"],Khe=["textPrefixContainer"],Jhe=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],epe=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function tpe(i,e){i&1&&ee(0,"span",19)}function npe(i,e){if(i&1&&(v(0,"label",18),Wt(1,1),$(2,tpe,1,0,"span",19),b()),i&2){let t=I(2);R("floating",t._shouldLabelFloat())("monitorResize",t._hasOutline())("id",t._labelId),Ye("for",t._control.disableAutomaticLabeling?null:t._control.id),w(2),oe(!t.hideRequiredMarker&&t._control.required?2:-1)}}function ipe(i,e){if(i&1&&$(0,npe,3,5,"label",18),i&2){let t=I();oe(t._hasFloatingLabel()?0:-1)}}function rpe(i,e){i&1&&ee(0,"div",5)}function ope(i,e){}function spe(i,e){if(i&1&&$(0,ope,0,0,"ng-template",11),i&2){I(2);let t=ve(1);R("ngTemplateOutlet",t)}}function ape(i,e){if(i&1&&(v(0,"div",7),$(1,spe,1,1,null,11),b()),i&2){let t=I();R("matFormFieldNotchedOutlineOpen",t._shouldLabelFloat()),w(),oe(t._forceDisplayInfixLabel()?-1:1)}}function cpe(i,e){i&1&&(v(0,"div",8,2),Wt(2,2),b())}function lpe(i,e){i&1&&(v(0,"div",9,3),Wt(2,3),b())}function dpe(i,e){}function upe(i,e){if(i&1&&$(0,dpe,0,0,"ng-template",11),i&2){I();let t=ve(1);R("ngTemplateOutlet",t)}}function hpe(i,e){i&1&&(v(0,"div",12),Wt(1,4),b())}function ppe(i,e){i&1&&(v(0,"div",13),Wt(1,5),b())}function fpe(i,e){i&1&&ee(0,"div",14)}function mpe(i,e){if(i&1&&(v(0,"div",16),Wt(1,6),b()),i&2){let t=I();R("@transitionMessages",t._subscriptAnimationState)}}function gpe(i,e){if(i&1&&(v(0,"mat-hint",20),S(1),b()),i&2){let t=I(2);R("id",t._hintLabelId),w(),st(t.hintLabel)}}function _pe(i,e){if(i&1&&(v(0,"div",17),$(1,gpe,2,2,"mat-hint",20),Wt(2,7),ee(3,"div",21),Wt(4,8),b()),i&2){let t=I();R("@transitionMessages",t._subscriptAnimationState),w(),oe(t.hintLabel?1:-1)}}var VC=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=Ve({type:e,selectors:[["mat-label"]],standalone:!0});let i=e;return i})();var vpe=new me("MatError");var bpe=0,rj=(()=>{let e=class e{constructor(){this.align="start",this.id=`mat-mdc-hint-${bpe++}`}};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=Ve({type:e,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(r,o){r&2&&(Fo("id",o.id),Ye("align",null),re("mat-mdc-form-field-hint-end",o.align==="end"))},inputs:{align:"align",id:"id"},standalone:!0});let i=e;return i})(),ype=new me("MatPrefix");var xpe=new me("MatSuffix");var hj=new me("FloatingLabelParent"),oj=(()=>{let e=class e{get floating(){return this._floating}set floating(n){this._floating=n,this.monitorResize&&this._handleResize()}get monitorResize(){return this._monitorResize}set monitorResize(n){this._monitorResize=n,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}constructor(n){this._elementRef=n,this._floating=!1,this._monitorResize=!1,this._resizeObserver=te(ij),this._ngZone=te(Fe),this._parent=te(hj),this._resizeSubscription=new Ct}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return wpe(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}};e.\u0275fac=function(r){return new(r||e)(M(Re))},e.\u0275dir=Ve({type:e,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(r,o){r&2&&re("mdc-floating-label--float-above",o.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"},standalone:!0});let i=e;return i})();function wpe(i){let e=i;if(e.offsetParent!==null)return e.scrollWidth;let t=e.cloneNode(!0);t.style.setProperty("position","absolute"),t.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(t);let n=t.scrollWidth;return t.remove(),n}var sj="mdc-line-ripple--active",BC="mdc-line-ripple--deactivating",aj=(()=>{let e=class e{constructor(n,r){this._elementRef=n,this._handleTransitionEnd=o=>{let s=this._elementRef.nativeElement.classList,a=s.contains(BC);o.propertyName==="opacity"&&a&&s.remove(sj,BC)},r.runOutsideAngular(()=>{n.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){let n=this._elementRef.nativeElement.classList;n.remove(BC),n.add(sj)}deactivate(){this._elementRef.nativeElement.classList.add(BC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Fe))},e.\u0275dir=Ve({type:e,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"],standalone:!0});let i=e;return i})(),cj=(()=>{let e=class e{constructor(n,r){this._elementRef=n,this._ngZone=r,this.open=!1}ngAfterViewInit(){let n=this._elementRef.nativeElement.querySelector(".mdc-floating-label");n?(this._elementRef.nativeElement.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(n.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>n.style.transitionDuration="")}))):this._elementRef.nativeElement.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(n){!this.open||!n?this._notch.nativeElement.style.width="":this._notch.nativeElement.style.width=`calc(${n}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Fe))},e.\u0275cmp=ce({type:e,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(r,o){if(r&1&&Ee(qhe,5),r&2){let s;be(s=ye())&&(o._notch=s.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(r,o){r&2&&re("mdc-notched-outline--notched",o.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},standalone:!0,features:[le],attrs:Yhe,ngContentSelectors:Xhe,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(r,o){r&1&&(In(),ee(0,"div",1),v(1,"div",2,0),Wt(3),b(),ee(4,"div",3))},encapsulation:2,changeDetection:0});let i=e;return i})(),Cpe={transitionMessages:li("transitionMessages",[vi("enter",Kt({opacity:1,transform:"translateY(0%)"})),An("void => enter",[Kt({opacity:0,transform:"translateY(-5px)"}),Rn("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},LO=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=Ve({type:e});let i=e;return i})();var J_=new me("MatFormField"),Spe=new me("MAT_FORM_FIELD_DEFAULT_OPTIONS"),lj=0,dj="fill",Mpe="auto",uj="fixed",Epe="translateY(-50%)",pj=(()=>{let e=class e{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(n){this._hideRequiredMarker=Ph(n)}get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||Mpe}set floatLabel(n){n!==this._floatLabel&&(this._floatLabel=n,this._changeDetectorRef.markForCheck())}get appearance(){return this._appearance}set appearance(n){let r=this._appearance,o=n||this._defaults?.appearance||dj;this._appearance=o,this._appearance==="outline"&&this._appearance!==r&&(this._needsOutlineLabelOffsetUpdate=!0)}get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||uj}set subscriptSizing(n){this._subscriptSizing=n||this._defaults?.subscriptSizing||uj}get hintLabel(){return this._hintLabel}set hintLabel(n){this._hintLabel=n,this._processHints()}get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(n){this._explicitFormFieldControl=n}constructor(n,r,o,s,a,c,l,d){this._elementRef=n,this._changeDetectorRef=r,this._dir=s,this._platform=a,this._defaults=c,this._animationMode=l,this._labelChild=E2(VC),this._hideRequiredMarker=!1,this.color="primary",this._appearance=dj,this._subscriptSizing=null,this._hintLabel="",this._hasIconPrefix=!1,this._hasTextPrefix=!1,this._hasIconSuffix=!1,this._hasTextSuffix=!1,this._labelId=`mat-mdc-form-field-label-${lj++}`,this._hintLabelId=`mat-mdc-hint-${lj++}`,this._subscriptAnimationState="",this._destroyed=new pe,this._isFocused=null,this._needsOutlineLabelOffsetUpdate=!1,this._injector=te(vt),this.getLabelId=Bt(()=>this._hasFloatingLabel()?this._labelId:null),this._hasFloatingLabel=Bt(()=>!!this._labelChild()),c&&(c.appearance&&(this.appearance=c.appearance),this._hideRequiredMarker=!!c?.hideRequiredMarker,c.color&&(this.color=c.color))}ngAfterViewInit(){this._updateFocusState(),this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeControl(),this._initializeSubscript(),this._initializePrefixAndSuffix(),this._initializeOutlineLabelOffsetSubscriptions()}ngAfterContentChecked(){this._assertFormFieldControl()}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(){let n=this._control;n.controlType&&this._elementRef.nativeElement.classList.add(`mat-mdc-form-field-type-${n.controlType}`),n.stateChanges.subscribe(()=>{this._updateFocusState(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),n.ngControl&&n.ngControl.valueChanges&&n.ngControl.valueChanges.pipe(Ze(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck())}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(n=>!n._isText),this._hasTextPrefix=!!this._prefixChildren.find(n=>n._isText),this._hasIconSuffix=!!this._suffixChildren.find(n=>!n._isText),this._hasTextSuffix=!!this._suffixChildren.find(n=>n._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),Zn(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){this._control}_updateFocusState(){this._control.focused&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!this._control.focused&&(this._isFocused||this._isFocused===null)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_initializeOutlineLabelOffsetSubscriptions(){this._prefixChildren.changes.subscribe(()=>this._needsOutlineLabelOffsetUpdate=!0),Kf(()=>{this._needsOutlineLabelOffsetUpdate&&(this._needsOutlineLabelOffsetUpdate=!1,this._updateOutlineLabelOffset())},{injector:this._injector}),this._dir.change.pipe(Ze(this._destroyed)).subscribe(()=>this._needsOutlineLabelOffsetUpdate=!0)}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():!1}_shouldForward(n){let r=this._control?this._control.ngControl:null;return r&&r[n]}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){this._hintChildren}_syncDescribedByIds(){if(this._control){let n=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&n.push(...this._control.userAriaDescribedBy.split(" ")),this._getDisplayedMessages()==="hint"){let r=this._hintChildren?this._hintChildren.find(s=>s.align==="start"):null,o=this._hintChildren?this._hintChildren.find(s=>s.align==="end"):null;r?n.push(r.id):this._hintLabel&&n.push(this._hintLabelId),o&&n.push(o.id)}else this._errorChildren&&n.push(...this._errorChildren.map(r=>r.id));this._control.setDescribedByIds(n)}}_updateOutlineLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return;let n=this._floatingLabel.element;if(!(this._iconPrefixContainer||this._textPrefixContainer)){n.style.transform="";return}if(!this._isAttachedToDom()){this._needsOutlineLabelOffsetUpdate=!0;return}let r=this._iconPrefixContainer?.nativeElement,o=this._textPrefixContainer?.nativeElement,s=r?.getBoundingClientRect().width??0,a=o?.getBoundingClientRect().width??0,c=this._dir.value==="rtl"?"-1":"1",l=`${s+a}px`,u=`calc(${c} * (${l} + var(--mat-mdc-form-field-label-offset-x, 0px)))`;n.style.transform=`var( - --mat-mdc-form-field-label-transform, - ${Epe} translateX(${u}) - )`}_isAttachedToDom(){let n=this._elementRef.nativeElement;if(n.getRootNode){let r=n.getRootNode();return r&&r!==n}return document.documentElement.contains(n)}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Ne),M(Fe),M(di),M(gn),M(Spe,8),M(jn,8),M(Xe))},e.\u0275cmp=ce({type:e,selectors:[["mat-form-field"]],contentQueries:function(r,o,s){if(r&1&&(G2(s,o._labelChild,VC,5),_i(s,LO,5),_i(s,ype,5),_i(s,xpe,5),_i(s,vpe,5),_i(s,rj,5)),r&2){j2();let a;be(a=ye())&&(o._formFieldControl=a.first),be(a=ye())&&(o._prefixChildren=a),be(a=ye())&&(o._suffixChildren=a),be(a=ye())&&(o._errorChildren=a),be(a=ye())&&(o._hintChildren=a)}},viewQuery:function(r,o){if(r&1&&(Ee(Zhe,5),Ee(Qhe,5),Ee(Khe,5),Ee(oj,5),Ee(cj,5),Ee(aj,5)),r&2){let s;be(s=ye())&&(o._textField=s.first),be(s=ye())&&(o._iconPrefixContainer=s.first),be(s=ye())&&(o._textPrefixContainer=s.first),be(s=ye())&&(o._floatingLabel=s.first),be(s=ye())&&(o._notchedOutline=s.first),be(s=ye())&&(o._lineRipple=s.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(r,o){r&2&&re("mat-mdc-form-field-label-always-float",o._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",o._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",o._hasIconSuffix)("mat-form-field-invalid",o._control.errorState)("mat-form-field-disabled",o._control.disabled)("mat-form-field-autofilled",o._control.autofilled)("mat-form-field-no-animations",o._animationMode==="NoopAnimations")("mat-form-field-appearance-fill",o.appearance=="fill")("mat-form-field-appearance-outline",o.appearance=="outline")("mat-form-field-hide-placeholder",o._hasFloatingLabel()&&!o._shouldLabelFloat())("mat-focused",o._control.focused)("mat-primary",o.color!=="accent"&&o.color!=="warn")("mat-accent",o.color==="accent")("mat-warn",o.color==="warn")("ng-untouched",o._shouldForward("untouched"))("ng-touched",o._shouldForward("touched"))("ng-pristine",o._shouldForward("pristine"))("ng-dirty",o._shouldForward("dirty"))("ng-valid",o._shouldForward("valid"))("ng-invalid",o._shouldForward("invalid"))("ng-pending",o._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],standalone:!0,features:[Ft([{provide:J_,useExisting:e},{provide:hj,useExisting:e}]),le],ngContentSelectors:epe,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(r,o){if(r&1){let s=ne();In(Jhe),$(0,ipe,1,1,"ng-template",null,0,Tt),v(2,"div",4,1),H("click",function(c){return B(s),V(o._control.onContainerClick(c))}),$(4,rpe,1,0,"div",5),v(5,"div",6),$(6,ape,2,2,"div",7)(7,cpe,3,0,"div",8)(8,lpe,3,0,"div",9),v(9,"div",10),$(10,upe,1,1,null,11),Wt(11),b(),$(12,hpe,2,0,"div",12)(13,ppe,2,0,"div",13),b(),$(14,fpe,1,0,"div",14),b(),v(15,"div",15),$(16,mpe,2,1,"div",16)(17,_pe,5,2,"div",17),b()}if(r&2){let s;w(2),re("mdc-text-field--filled",!o._hasOutline())("mdc-text-field--outlined",o._hasOutline())("mdc-text-field--no-label",!o._hasFloatingLabel())("mdc-text-field--disabled",o._control.disabled)("mdc-text-field--invalid",o._control.errorState),w(2),oe(!o._hasOutline()&&!o._control.disabled?4:-1),w(2),oe(o._hasOutline()?6:-1),w(),oe(o._hasIconPrefix?7:-1),w(),oe(o._hasTextPrefix?8:-1),w(2),oe(!o._hasOutline()||o._forceDisplayInfixLabel()?10:-1),w(2),oe(o._hasTextSuffix?12:-1),w(),oe(o._hasIconSuffix?13:-1),w(),oe(o._hasOutline()?-1:14),w(),re("mat-mdc-form-field-subscript-dynamic-size",o.subscriptSizing==="dynamic"),w(),oe((s=o._getDisplayedMessages())==="error"?16:s==="hint"?17:-1)}},dependencies:[oj,cj,Gs,aj,rj],styles:['.mdc-text-field{display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field__input{width:100%;min-width:0;border:none;border-radius:0;background:none;padding:0;-moz-appearance:none;-webkit-appearance:none;height:28px}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}.mdc-text-field__input::placeholder{opacity:0}.mdc-text-field__input::-moz-placeholder{opacity:0}.mdc-text-field__input::-webkit-input-placeholder{opacity:0}.mdc-text-field__input:-ms-input-placeholder{opacity:0}.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}.mdc-text-field--outlined .mdc-text-field__input,.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-filled-text-field-input-text-color);caret-color:var(--mdc-filled-text-field-caret-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-filled-text-field-error-caret-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-filled-text-field-disabled-input-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-outlined-text-field-input-text-color);caret-color:var(--mdc-outlined-text-field-caret-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color)}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-outlined-text-field-error-caret-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-outlined-text-field-disabled-input-text-color)}.mdc-text-field--disabled .cdk-high-contrast-active .mdc-text-field__input{background-color:Window}.mdc-text-field--filled{height:56px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:var(--mdc-filled-text-field-container-shape);border-top-right-radius:var(--mdc-filled-text-field-container-shape)}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mdc-filled-text-field-container-color)}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mdc-filled-text-field-disabled-container-color)}.mdc-text-field--outlined{height:56px;overflow:visible;padding-left:16px;padding-right:16px}@supports(top: max(0%)){.mdc-text-field--outlined{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape));padding-left:max(16px,var(--mdc-outlined-text-field-container-shape) + 4px)}[dir=rtl] .mdc-text-field--outlined{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape) + 4px);padding-left:max(16px,var(--mdc-outlined-text-field-container-shape))}}.mdc-floating-label{position:absolute;left:0;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label{right:0;left:auto;transform-origin:right top;text-align:right}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:auto}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:auto;right:4px}.mdc-text-field--filled .mdc-floating-label{left:16px;right:auto}[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:auto;right:16px}.mdc-text-field--disabled .mdc-floating-label{cursor:default}.cdk-high-contrast-active .mdc-text-field--disabled .mdc-floating-label{z-index:1}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-filled-text-field-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-focus-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-filled-text-field-hover-label-text-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-filled-text-field-disabled-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-filled-text-field-error-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-error-focus-label-text-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-filled-text-field-error-hover-label-text-color)}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mdc-filled-text-field-label-text-font);font-size:var(--mdc-filled-text-field-label-text-size);font-weight:var(--mdc-filled-text-field-label-text-weight);letter-spacing:var(--mdc-filled-text-field-label-text-tracking)}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-outlined-text-field-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-focus-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-hover-label-text-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-outlined-text-field-disabled-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-outlined-text-field-error-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-error-focus-label-text-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-error-hover-label-text-color)}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mdc-outlined-text-field-label-text-font);font-size:var(--mdc-outlined-text-field-label-text-size);font-weight:var(--mdc-outlined-text-field-label-text-weight);letter-spacing:var(--mdc-outlined-text-field-label-text-tracking)}.mdc-floating-label--float-above{cursor:auto;transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1);font-size:.75rem}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mat-mdc-notch-piece{box-sizing:border-box;height:100%;pointer-events:none;border-top:1px solid;border-bottom:1px solid}.mdc-text-field--focused .mat-mdc-notch-piece{border-width:2px}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-outline-color);border-width:var(--mdc-outlined-text-field-outline-width)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-hover-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-focus-outline-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-disabled-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-notched-outline .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-hover-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-focus-outline-color)}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mat-mdc-notch-piece{border-width:var(--mdc-outlined-text-field-focus-outline-width)}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;width:12px;border-top-left-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape)}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-outlined-text-field-container-shape))}}[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid;border-bottom-left-radius:0;border-top-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape)}.mdc-notched-outline__trailing{flex-grow:1;border-left:none;border-right:1px solid;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape)}[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mdc-outlined-text-field-container-shape);border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape)}.mdc-notched-outline__notch{flex:0 0 auto;width:auto;max-width:calc(100% - 24px)}@supports(top: max(0%)){.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:calc(100% - max(12px,var(--mdc-outlined-text-field-container-shape))*2)}}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{z-index:1;border-bottom-width:var(--mdc-filled-text-field-active-indicator-height)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-active-indicator-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-hover-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-disabled-active-indicator-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-active-indicator-color)}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-hover-active-indicator-color)}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mdc-filled-text-field-focus-active-indicator-height)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-focus-active-indicator-color)}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-error-focus-active-indicator-color)}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-text-field--disabled{pointer-events:none}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all;will-change:auto}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto;will-change:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color)}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height);padding-top:var(--mat-form-field-filled-with-label-container-padding-top);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding);padding-bottom:var(--mat-form-field-container-vertical-padding)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color)}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font);line-height:var(--mat-form-field-subscript-text-line-height);font-size:var(--mat-form-field-subscript-text-size);letter-spacing:var(--mat-form-field-subscript-text-tracking);font-weight:var(--mat-form-field-subscript-text-weight)}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color)}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity)}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color)}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color)}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color)}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color)}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color)}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}.cdk-high-contrast-active .mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}.cdk-high-contrast-active .mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}.cdk-high-contrast-active .mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font);line-height:var(--mat-form-field-container-text-line-height);font-size:var(--mat-form-field-container-text-size);letter-spacing:var(--mat-form-field-container-text-tracking);font-weight:var(--mat-form-field-container-text-weight)}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%;z-index:0}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color)}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color)}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color)}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color)}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color)}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color)}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color)}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input{transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::-moz-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::-webkit-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)}'],encapsulation:2,data:{animation:[Cpe.transitionMessages]},changeDetection:0});let i=e;return i})(),ma=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({imports:[Ut,Ae,by,Ut]});let i=e;return i})();var Tpe=["trigger"],Dpe=["panel"],Ppe=[[["mat-select-trigger"]],"*"],Ope=["mat-select-trigger","*"];function Rpe(i,e){if(i&1&&(v(0,"span",4),S(1),b()),i&2){let t=I();w(),st(t.placeholder)}}function Ape(i,e){i&1&&Wt(0)}function Npe(i,e){if(i&1&&(v(0,"span",11),S(1),b()),i&2){let t=I(2);w(),st(t.triggerValue)}}function kpe(i,e){if(i&1&&(v(0,"span",5),$(1,Ape,1,0)(2,Npe,2,1,"span",11),b()),i&2){let t=I();w(),oe(t.customTrigger?1:2)}}function Lpe(i,e){if(i&1){let t=ne();v(0,"div",12,1),H("@transformPanel.done",function(r){B(t);let o=I();return V(o._panelDoneAnimatingStream.next(r.toState))})("keydown",function(r){B(t);let o=I();return V(o._handleKeydown(r))}),Wt(2,1),b()}if(i&2){let t=I();U2("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",t._getPanelTheme(),""),R("ngClass",t.panelClass)("@transformPanel","showing"),Ye("id",t.id+"-panel")("aria-multiselectable",t.multiple)("aria-label",t.ariaLabel||null)("aria-labelledby",t._getPanelAriaLabelledby())}}var Fpe={transformPanelWrap:li("transformPanelWrap",[An("* => void",vF("@transformPanel",[_F()],{optional:!0}))]),transformPanel:li("transformPanel",[vi("void",Kt({opacity:0,transform:"scale(1, 0.8)"})),An("void => showing",Rn("120ms cubic-bezier(0, 0, 0.2, 1)",Kt({opacity:1,transform:"scale(1, 1)"}))),An("* => void",Rn("100ms linear",Kt({opacity:0})))])};var fj=0,mj=new me("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let i=te($t);return()=>i.scrollStrategies.reposition()}});function Bpe(i){return()=>i.scrollStrategies.reposition()}var Vpe=new me("MAT_SELECT_CONFIG"),zpe={provide:mj,deps:[$t],useFactory:Bpe},Upe=new me("MatSelectTrigger"),FO=class{constructor(e,t){this.source=e,this.value=t}},zC=(()=>{let e=class e{_scrollOptionIntoView(n){let r=this.options.toArray()[n];if(r){let o=this.panel.nativeElement,s=Ay(n,this.options,this.optionGroups),a=r._getHostElement();n===0&&s===1?o.scrollTop=0:o.scrollTop=Ny(a.offsetTop,a.offsetHeight,o.scrollTop,o.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(n){return new FO(this,n)}get focused(){return this._focused||this._panelOpen}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(n){this._hideSingleSelectionIndicator=n,this._syncParentProperties()}get placeholder(){return this._placeholder}set placeholder(n){this._placeholder=n,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(oy.required)??!1}set required(n){this._required=n,this.stateChanges.next()}get multiple(){return this._multiple}set multiple(n){this._selectionModel,this._multiple=n}get compareWith(){return this._compareWith}set compareWith(n){this._compareWith=n,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(n){this._assignValue(n)&&this._onChange(n)}get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(n){this._errorStateTracker.matcher=n}get id(){return this._id}set id(n){this._id=n||this._uid,this.stateChanges.next()}get errorState(){return this._errorStateTracker.errorState}set errorState(n){this._errorStateTracker.errorState=n}constructor(n,r,o,s,a,c,l,d,u,h,p,f,m,y){this._viewportRuler=n,this._changeDetectorRef=r,this._elementRef=a,this._dir=c,this._parentFormField=u,this.ngControl=h,this._liveAnnouncer=m,this._defaultOptions=y,this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._panelOpen=!1,this._compareWith=(g,_)=>g===_,this._uid=`mat-select-${fj++}`,this._triggerAriaLabelledBy=null,this._destroy=new pe,this.stateChanges=new pe,this.disableAutomaticLabeling=!0,this._onChange=()=>{},this._onTouched=()=>{},this._valueId=`mat-select-value-${fj++}`,this._panelDoneAnimatingStream=new pe,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this._multiple=!1,this.disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto",this._initialized=new pe,this.optionSelectionChanges=Po(()=>{let g=this.options;return g?g.changes.pipe(gi(g),Qn(()=>Zn(...g.map(_=>_.onSelectionChange)))):this._initialized.pipe(Qn(()=>this.optionSelectionChanges))}),this.openedChange=new Ie,this._openedStream=this.openedChange.pipe(qt(g=>g),Je(()=>{})),this._closedStream=this.openedChange.pipe(qt(g=>!g),Je(()=>{})),this.selectionChange=new Ie,this.valueChange=new Ie,this._trackedModal=null,this._skipPredicate=g=>this.panelOpen?!1:g.disabled,this.ngControl&&(this.ngControl.valueAccessor=this),y?.typeaheadDebounceInterval!=null&&(this.typeaheadDebounceInterval=y.typeaheadDebounceInterval),this._errorStateTracker=new Ry(s,h,d,l,this.stateChanges),this._scrollStrategyFactory=f,this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=parseInt(p)||0,this.id=this.id}ngOnInit(){this._selectionModel=new of(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(xc(),Ze(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen)),this._viewportRuler.change().pipe(Ze(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initialized.next(),this._initialized.complete(),this._initKeyManager(),this._selectionModel.changed.pipe(Ze(this._destroy)).subscribe(n=>{n.added.forEach(r=>r.select()),n.removed.forEach(r=>r.deselect())}),this.options.changes.pipe(gi(null),Ze(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let n=this._getTriggerAriaLabelledby(),r=this.ngControl;if(n!==this._triggerAriaLabelledBy){let o=this._elementRef.nativeElement;this._triggerAriaLabelledBy=n,n?o.setAttribute("aria-labelledby",n):o.removeAttribute("aria-labelledby")}r&&(this._previousControl!==r.control&&(this._previousControl!==void 0&&r.disabled!==null&&r.disabled!==this.disabled&&(this.disabled=r.disabled),this._previousControl=r.control),this.updateErrorState())}ngOnChanges(n){(n.disabled||n.userAriaDescribedBy)&&this.stateChanges.next(),n.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._applyModalPanelOwnership(),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_applyModalPanelOwnership(){let n=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!n)return;let r=`${this.id}-panel`;this._trackedModal&&Yc(this._trackedModal,"aria-owns",r),Lh(n,"aria-owns",r),this._trackedModal=n}_clearFromModal(){if(!this._trackedModal)return;let n=`${this.id}-panel`;Yc(this._trackedModal,"aria-owns",n),this._trackedModal=null}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next())}writeValue(n){this._assignValue(n)}registerOnChange(n){this._onChange=n}registerOnTouched(n){this._onTouched=n}setDisabledState(n){this.disabled=n,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let n=this._selectionModel.selected.map(r=>r.viewValue);return this._isRtl()&&n.reverse(),n.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(n){this.disabled||(this.panelOpen?this._handleOpenKeydown(n):this._handleClosedKeydown(n))}_handleClosedKeydown(n){let r=n.keyCode,o=r===40||r===38||r===37||r===39,s=r===13||r===32,a=this._keyManager;if(!a.isTyping()&&s&&!bi(n)||(this.multiple||n.altKey)&&o)n.preventDefault(),this.open();else if(!this.multiple){let c=this.selected;a.onKeydown(n);let l=this.selected;l&&c!==l&&this._liveAnnouncer.announce(l.viewValue,1e4)}}_handleOpenKeydown(n){let r=this._keyManager,o=n.keyCode,s=o===40||o===38,a=r.isTyping();if(s&&n.altKey)n.preventDefault(),this.close();else if(!a&&(o===13||o===32)&&r.activeItem&&!bi(n))n.preventDefault(),r.activeItem._selectViaInteraction();else if(!a&&this._multiple&&o===65&&n.ctrlKey){n.preventDefault();let c=this.options.some(l=>!l.disabled&&!l.selected);this.options.forEach(l=>{l.disabled||(c?l.select():l.deselect())})}else{let c=r.activeItemIndex;r.onKeydown(n),this._multiple&&s&&n.shiftKey&&r.activeItem&&r.activeItemIndex!==c&&r.activeItem._selectViaInteraction()}}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(_n(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(n){if(this.options.forEach(r=>r.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&n)Array.isArray(n),n.forEach(r=>this._selectOptionByValue(r)),this._sortValues();else{let r=this._selectOptionByValue(n);r?this._keyManager.updateActiveItem(r):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(n){let r=this.options.find(o=>{if(this._selectionModel.isSelected(o))return!1;try{return o.value!=null&&this._compareWith(o.value,n)}catch{return!1}});return r&&this._selectionModel.select(r),r}_assignValue(n){return n!==this._value||this._multiple&&Array.isArray(n)?(this.options&&this._setSelectionByValue(n),this._value=n,!0):!1}_getOverlayWidth(n){return this.panelWidth==="auto"?(n instanceof $_?n.elementRef:n||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let n of this.options)n._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new Ah(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let n=Zn(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Ze(n)).subscribe(r=>{this._onSelect(r.source,r.isUserInput),r.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Zn(...this.options.map(r=>r._stateChanges)).pipe(Ze(n)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(n,r){let o=this._selectionModel.isSelected(n);n.value==null&&!this._multiple?(n.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(n.value)):(o!==n.selected&&(n.selected?this._selectionModel.select(n):this._selectionModel.deselect(n)),r&&this._keyManager.setActiveItem(n),this.multiple&&(this._sortValues(),r&&this.focus())),o!==this._selectionModel.isSelected(n)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let n=this.options.toArray();this._selectionModel.sort((r,o)=>this.sortComparator?this.sortComparator(r,o,n):n.indexOf(r)-n.indexOf(o)),this.stateChanges.next()}}_propagateChanges(n){let r;this.multiple?r=this.selected.map(o=>o.value):r=this.selected?this.selected.value:n,this._value=r,this.valueChange.emit(r),this._onChange(r),this.selectionChange.emit(this._getChangeEvent(r)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let n=-1;for(let r=0;r0}focus(n){this._elementRef.nativeElement.focus(n)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let n=this._parentFormField?.getLabelId(),r=n?n+" ":"";return this.ariaLabelledby?r+this.ariaLabelledby:n}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let n=this._parentFormField?.getLabelId(),r=(n?n+" ":"")+this._valueId;return this.ariaLabelledby&&(r+=" "+this.ariaLabelledby),r}_panelDoneAnimating(n){this.openedChange.emit(n)}setDescribedByIds(n){n.length?this._elementRef.nativeElement.setAttribute("aria-describedby",n.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}};e.\u0275fac=function(r){return new(r||e)(M(la),M(Ne),M(Fe),M(j3),M(Re),M(di,8),M(cT,8),M(lT,8),M(J_,8),M(_d,10),Lr("tabindex"),M(mj),M(Dy),M(Vpe,8))},e.\u0275cmp=ce({type:e,selectors:[["mat-select"]],contentQueries:function(r,o,s){if(r&1&&(_i(s,Upe,5),_i(s,Zc,5),_i(s,zh,5)),r&2){let a;be(a=ye())&&(o.customTrigger=a.first),be(a=ye())&&(o.options=a),be(a=ye())&&(o.optionGroups=a)}},viewQuery:function(r,o){if(r&1&&(Ee(Tpe,5),Ee(Dpe,5),Ee(_O,5)),r&2){let s;be(s=ye())&&(o.trigger=s.first),be(s=ye())&&(o.panel=s.first),be(s=ye())&&(o._overlayDir=s.first)}},hostAttrs:["role","combobox","aria-autocomplete","none","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(r,o){r&1&&H("keydown",function(a){return o._handleKeydown(a)})("focus",function(){return o._onFocus()})("blur",function(){return o._onBlur()}),r&2&&(Ye("id",o.id)("tabindex",o.disabled?-1:o.tabIndex)("aria-controls",o.panelOpen?o.id+"-panel":null)("aria-expanded",o.panelOpen)("aria-label",o.ariaLabel||null)("aria-required",o.required.toString())("aria-disabled",o.disabled.toString())("aria-invalid",o.errorState)("aria-activedescendant",o._getAriaActiveDescendant()),re("mat-mdc-select-disabled",o.disabled)("mat-mdc-select-invalid",o.errorState)("mat-mdc-select-required",o.required)("mat-mdc-select-empty",o.empty)("mat-mdc-select-multiple",o.multiple))},inputs:{userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[2,"disabled","disabled",et],disableRipple:[2,"disableRipple","disableRipple",et],tabIndex:[2,"tabIndex","tabIndex",n=>n==null?0:ni(n)],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",et],placeholder:"placeholder",required:[2,"required","required",et],multiple:[2,"multiple","multiple",et],disableOptionCentering:[2,"disableOptionCentering","disableOptionCentering",et],compareWith:"compareWith",value:"value",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[2,"typeaheadDebounceInterval","typeaheadDebounceInterval",ni],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],standalone:!0,features:[Ft([{provide:LO,useExisting:e},{provide:Vh,useExisting:e}]),nn,dn,le],ngContentSelectors:Ope,decls:11,vars:8,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"backdropClick","attach","detach","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"keydown","ngClass"]],template:function(r,o){if(r&1){let s=ne();In(Ppe),v(0,"div",2,0),H("click",function(){return B(s),V(o.open())}),v(3,"div",3),$(4,Rpe,2,1,"span",4)(5,kpe,3,1,"span",5),b(),v(6,"div",6)(7,"div",7),uo(),v(8,"svg",8),ee(9,"path",9),b()()()(),$(10,Lpe,3,9,"ng-template",10),H("backdropClick",function(){return B(s),V(o.close())})("attach",function(){return B(s),V(o._onAttached())})("detach",function(){return B(s),V(o.close())})}if(r&2){let s=ve(1);w(3),Ye("id",o._valueId),w(),oe(o.empty?4:5),w(6),R("cdkConnectedOverlayPanelClass",o._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",o._scrollStrategy)("cdkConnectedOverlayOrigin",o._preferredOverlayOrigin||s)("cdkConnectedOverlayOpen",o.panelOpen)("cdkConnectedOverlayPositions",o._positions)("cdkConnectedOverlayWidth",o._overlayWidth)}},dependencies:[$_,_O,cb],styles:['.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color);font-family:var(--mat-select-trigger-text-font);line-height:var(--mat-select-trigger-text-line-height);font-size:var(--mat-select-trigger-text-size);font-weight:var(--mat-select-trigger-text-weight);letter-spacing:var(--mat-select-trigger-text-tracking)}div.mat-mdc-select-panel{box-shadow:var(--mat-select-container-elevation-shadow)}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color)}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow,.mat-form-field-invalid:not(.mat-form-field-disabled) .mat-mdc-form-field-infix::after{color:var(--mat-select-invalid-arrow-color)}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color)}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color)}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color)}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}.cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .cdk-high-contrast-active .mat-mdc-select-arrow svg{fill:GrayText}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color)}.cdk-high-contrast-active div.mat-mdc-select-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}div.mat-mdc-select-panel .mat-mdc-option{--mdc-list-list-item-container-color: var(--mat-select-panel-background-color)}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color)}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:var(--mat-select-arrow-transform)}'],encapsulation:2,data:{animation:[Fpe.transformPanel]},changeDetection:0});let i=e;return i})();var ga=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({providers:[zpe],imports:[Ae,oo,Uh,Ut,Jo,ma,Uh,Ut]});let i=e;return i})();var df=(()=>{class i{changeDetectorRef;pageSize;itemsCount;change=new Ie;curPageIndex=0;constructor(t){this.changeDetectorRef=t}reset(){this.curPageIndex=0,this.changeDetectorRef.markForCheck()}handleClickGoToPrevPage(){this.curPageIndex--,this.curPageIndex=Math.max(0,this.curPageIndex),this.change.emit(this.curPageIndex)}handleClickGoToNextPage(){this.curPageIndex++,this.curPageIndex=Math.min(Math.ceil(this.itemsCount/this.pageSize)-1,this.curPageIndex),this.change.emit(this.curPageIndex)}get disablePrevButton(){return this.curPageIndex===0}get disableNextButton(){return this.curPageIndex===Math.ceil(this.itemsCount/this.pageSize)-1}get curRangeText(){let t=Math.min(this.itemsCount,this.curPageIndex*this.pageSize+1),n=Math.min((this.curPageIndex+1)*this.pageSize,this.itemsCount);return t===n?`${t}`:`${t} - ${n}`}static \u0275fac=function(n){return new(n||i)(M(Ne))};static \u0275cmp=ce({type:i,selectors:[["paginator"]],inputs:{pageSize:"pageSize",itemsCount:"itemsCount"},outputs:{change:"change"},standalone:!0,features:[le],decls:9,vars:5,consts:[[1,"container"],[1,"icon-container","prev-page",3,"click"],[1,"range-text"],[1,"icon-container","next-page",3,"click"]],template:function(n,r){n&1&&(v(0,"div",0)(1,"div",1),H("click",function(){return r.handleClickGoToPrevPage()}),v(2,"mat-icon"),S(3,"chevron_left"),b()(),v(4,"div",2),S(5),b(),v(6,"div",3),H("click",function(){return r.handleClickGoToNextPage()}),v(7,"mat-icon"),S(8,"chevron_right"),b()()()),n&2&&(w(),re("disabled",r.disablePrevButton),w(4),Se(" ",r.curRangeText," "),w(),re("disabled",r.disableNextButton))},dependencies:[Ae,tt,pt],styles:[`.container[_ngcontent-%COMP%]{display:flex;align-items:center;-webkit-user-select:none;user-select:none}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:99px;cursor:pointer}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{background-color:#ddd}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{opacity:1}.container[_ngcontent-%COMP%] .icon-container.disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.3}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{opacity:.7;color:#333;font-size:20px;width:20px;height:20px}.container[_ngcontent-%COMP%] .range-text[_ngcontent-%COMP%]{color:#333;font-size:12px;display:flex;align-items:center;justify-content:center} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();var Gpe=["searchInput"],jpe=["content"];function Wpe(i,e){if(i&1){let t=ne();v(0,"div",11),H("click",function(){B(t);let r=I();return V(r.handleClickClearSearchText())}),v(1,"mat-icon",12),S(2,"close"),b()()}}function $pe(i,e){if(i&1){let t=ne();v(0,"paginator",25),H("change",function(r){B(t);let o=I(2);return V(o.handlePaginatorChanged(r))}),b()}if(i&2){let t=I(2);R("pageSize",t.pageSize)("itemsCount",t.resultsCount)}}function qpe(i,e){if(i&1){let t=ne();v(0,"div",26),H("click",function(){let r=B(t).$implicit,o=I(2);return V(o.updateSelectedResultTypes(r))}),v(1,"div",27)(2,"mat-icon"),S(3),b()(),v(4,"div",28),S(5),b()()}if(i&2){let t=e.$implicit;re("selected",t.selected),w(3),st(t.matchType),w(2),Se(" ",t.label," ")}}function Ype(i,e){if(i&1&&ee(0,"io-tree",22),i&2){let t=I(2);R("data",t.curSearchResultsData)("rendererId",t.rendererId)("tooltipPosition","right")("showLocator",!1)}}function Xpe(i,e){i&1&&(v(0,"div",23),S(1," No matching results "),b())}function Zpe(i,e){if(i&1&&(v(0,"div",13)(1,"div",14)(2,"div",15)(3,"div",16),S(4),b(),$(5,$pe,1,2,"paginator",17),b(),v(6,"div",18)(7,"div",19),rn(8,qpe,6,4,"div",20,gr),b()()(),v(10,"div",21,2),$(12,Ype,1,4,"io-tree",22)(13,Xpe,2,0,"div",23),b(),v(14,"div",24)(15,"mat-icon"),S(16,"tips_and_updates"),b(),S(17," Click to locate node. Alt+Click to locate and select node. "),b()()),i&2){let t=I();Jt("max-height",t.searchResultsContainerMaxHeight,"px"),w(4),Se(" ",t.searchResultsTitle," "),w(),oe(t.showPaginator?5:-1),w(3),on(t.searchResultTypes),w(4),oe(t.resultsCount>0?12:13)}}function Qpe(i,e){i&1&&(v(0,"div",29),S(1," No matching results "),b())}function Kpe(i,e){i&1&&(v(0,"div",30),S(1," Use regex to match nodes by label, attributes, input/output node label, and input/output metadata. "),ee(2,"br")(3,"br"),S(4," For attributes and I/O metadata, regex will try to match "),v(5,"span",31),S(6),b(),S(7," or "),v(8,"span",31),S(9),b(),S(10,". "),ee(11,"br")(12,"br"),S(13," Examples:"),ee(14,"br"),v(15,"ul")(16,"li")(17,"span",32),S(18,"axis:"),b(),S(19," will match attributes whose key is "),v(20,"span",31),S(21,"axis"),b(),S(22,". "),b(),v(23,"li")(24,"span",32),S(25,"padding=[SAME|VALID]"),b(),S(26," will match attributes whose key is "),v(27,"span",31),S(28,"padding"),b(),S(29," and value is either "),v(30,"span",31),S(31,"SAME"),b(),S(32," or "),v(33,"span",31),S(34,"VALID"),b(),S(35,". "),b()()()),i&2&&(w(6),Jl("","{","key","}",":","{","value","}",""),w(3),Jl("","{","key","}","=","{","value","}",""))}var gj=(()=>{class i{appService;changeDetectorRef;destroyRef;curModelGraph;rendererId;searchInput;content;curSearchText=new vr("");searchResultTypes=[{matchType:xt.NODE_LABEL,label:"Label",selected:!0},{matchType:xt.ATTRIBUTE,label:"Attrs",selected:!0},{matchType:xt.INPUT_METADATA,label:"Inputs",selected:!0},{matchType:xt.OUTPUT_METADATA,label:"Outputs",selected:!0}];searchResultTypeSelectorOverlaySize={minWidth:0,minHeight:0};searchResultTypeSelectorOverlayPositions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"}];pageSize;curSearchMatchedNodes=[];curSearchMatchData=[];curSearchResultsData;searching=!1;curPageIndex=0;constructor(t,n,r){this.appService=t,this.changeDetectorRef=n,this.destroyRef=r,this.pageSize=this.appService.testMode?12:50,this.curSearchText.valueChanges.pipe(En(()=>{this.searching=!0,this.changeDetectorRef.markForCheck()}),Oo(300),Ei(this.destroyRef)).subscribe(o=>{this.handleSearch((o?.toLowerCase()||"").trim())}),this.appService.searchKeyClicked.pipe(Ei(this.destroyRef)).subscribe(()=>{this.rendererId===this.appService.curSelectedRenderer()?.id&&this.searchInput.nativeElement.focus()})}handleClickClearSearchText(){this.curSearchText.setValue(""),this.handleSearch("")}updateSelectedResultTypes(t){t.selected=!t.selected,this.changeDetectorRef.markForCheck(),this.handleSearch(this.curSearchText.value||""),setTimeout(()=>{this.content.nativeElement.scrollTop=0})}handlePaginatorChanged(t){this.curPageIndex=t,this.updatePagedResults()}getDisableSearchResultTypeOption(t){return this.searchResultTypes.filter(n=>n.selected).length===1&&t.selected}get searchResultsTitle(){let t=this.curSearchMatchedNodes?.length||0;return`${t} result${t===1?"":"s"}`}get showClearButton(){return(this.curSearchText.value||"").trim()!==""}get showResultsPanel(){return!this.searching&&(this.curSearchText.value||"").trim()!==""&&!this.showNoMatches}get showNoMatches(){return!this.searching&&(this.curSearchText.value||"").trim()!==""&&this.curSearchMatchedNodes.length===0&&this.searchResultTypes.every(t=>t.selected)}get resultsCount(){return this.curSearchMatchedNodes.length}get searchResultsContainerMaxHeight(){return document.body.offsetHeight-300}get showPaginator(){return this.resultsCount>this.pageSize}handleSearch(t){if(!t){this.curPageIndex=0,this.curSearchResultsData=void 0,this.curSearchMatchedNodes=[],this.changeDetectorRef.markForCheck(),this.searching=!1,this.appService.clearSearchResults(this.rendererId);return}let n=[],r=[],o={results:{}},s=new Set(this.searchResultTypes.filter(a=>a.selected).map(a=>a.matchType));try{let a=new RegExp(t,"i");for(let c of this.curModelGraph.nodes){if(St(c)&&c.hideInLayout)continue;let{matches:l,matchTypes:d}=XI(s,a,c,this.curModelGraph);l.length>0&&(n.push(c),r.push({matches:l,matchTypes:d}),o.results[c.id]=l)}this.appService.setSearchResults(this.rendererId,o)}catch(a){console.warn("Failed to search",a)}this.curPageIndex=0,this.curSearchMatchedNodes=[...n],this.curSearchMatchData=r,this.updatePagedResults(),this.searching=!1,this.changeDetectorRef.markForCheck()}updatePagedResults(){this.curSearchResultsData=uc(this.curSearchMatchedNodes.slice(this.curPageIndex*this.pageSize,(this.curPageIndex+1)*this.pageSize),[],"incoming",void 0,this.curSearchMatchData.slice(this.curPageIndex*this.pageSize,(this.curPageIndex+1)*this.pageSize))}static \u0275fac=function(n){return new(n||i)(M(at),M(Ne),M(Fi))};static \u0275cmp=ce({type:i,selectors:[["search-bar"]],viewQuery:function(n,r){if(n&1&&(Ee(Gpe,5),Ee(jpe,5)),n&2){let o;be(o=ye())&&(r.searchInput=o.first),be(o=ye())&&(r.content=o.first)}},inputs:{curModelGraph:"curModelGraph",rendererId:"rendererId"},standalone:!0,features:[le],decls:14,vars:6,consts:[["searchInput",""],["helpPopup",""],["content",""],[1,"container"],[1,"input-container"],[1,"search"],["placeholder","Search nodes/layers by regex",3,"formControl"],["class","btn-clear-container",3,"click",4,"ngIf"],[1,"icon-container",3,"bubble","hoverDelayMs"],["class","search-results-container",3,"max-height",4,"ngIf"],["class","no-matches",4,"ngIf"],[1,"btn-clear-container",3,"click"],[1,"clear"],[1,"search-results-container"],[1,"title-container"],[1,"title"],[1,"title-label"],[3,"pageSize","itemsCount"],[1,"search-result-type-selector-container"],[1,"options-container"],[1,"option-container",3,"selected"],[1,"content"],[3,"data","rendererId","tooltipPosition","showLocator"],[1,"empty-results"],[1,"footer"],[3,"change","pageSize","itemsCount"],[1,"option-container",3,"click"],[1,"icon-container"],[1,"option-label"],[1,"no-matches"],[1,"model-explorer-search-help-popup"],[1,"code"],[1,"code","regex"]],template:function(n,r){if(n&1&&(v(0,"div",3)(1,"div",4)(2,"mat-icon",5),S(3,"search"),b(),ee(4,"input",6,0),$(6,Wpe,3,0,"div",7),v(7,"div",8)(8,"mat-icon"),S(9,"help_outline"),b()()(),$(10,Zpe,18,5,"div",9)(11,Qpe,2,0,"div",10),b(),$(12,Kpe,36,8,"ng-template",null,1,Tt)),n&2){let o=ve(13);w(4),R("formControl",r.curSearchText),w(2),R("ngIf",r.showClearButton),w(),R("bubble",o)("hoverDelayMs",100),w(3),R("ngIf",r.showResultsPanel),w(),R("ngIf",r.showNoMatches)}},dependencies:[Hn,Ae,Tn,Sl,FC,tt,pt,ga,df,br,Xs,Ho,vo],styles:[`.container[_ngcontent-%COMP%]{position:relative;overflow:visible;background-color:#fff;border-radius:99px;height:30px;display:flex;align-items:center;padding:0 8px}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{display:flex;align-items:center;width:250px}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] mat-icon.search[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] mat-icon.clear[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] mat-icon.clear[_ngcontent-%COMP%]{opacity:.6;cursor:pointer}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] mat-icon.clear[_ngcontent-%COMP%]:hover{opacity:.9}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:24px;border:none;outline:none;box-sizing:border-box;padding:0 4px;font-size:12px;flex-grow:1}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .btn-clear-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;color:#999;opacity:.8}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]:has(input:focus) mat-icon.search[_ngcontent-%COMP%]{color:#1a73e8}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%]{overflow:hidden;position:absolute;top:calc(100% + 12px);left:-4px;border:1px solid #ccc;border-radius:4px;width:380px;display:flex;flex-direction:column;background-color:#fff;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%]{background-color:#f6f6f6;border-bottom:1px solid #ddd;box-sizing:border-box;padding:0 10px 10px}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{height:28px;min-height:28px;font-size:12px;display:flex;align-items:center;justify-content:space-between}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .title-label[_ngcontent-%COMP%]{white-space:nowrap}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{flex-grow:1;min-height:0;overflow-y:auto;padding-bottom:6px}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .empty-results[_ngcontent-%COMP%]{padding:12px 8px 6px;display:flex;align-items:center;font-size:12px;color:#ccc}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:12px;margin-top:2px}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .options-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none;border:1px solid #ccc;padding:4px 14px;border-radius:6px;background-color:#fff;color:#474747}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container.selected[_ngcontent-%COMP%]{border-color:#a3c9ff;background-color:#a3c9ff;color:#001d35}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container.selected[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#001d35}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{width:18px;height:18px;display:flex;align-items:center;justify-content:center;box-sizing:border-box;margin-right:4px}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:#474747}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{font-size:12px;font-family:Google Sans Text,Arial,Helvetica,sans-serif;letter-spacing:normal}.container[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{height:32px;min-height:32px;background-color:#f6f6f6;border-top:1px solid #ddd;box-sizing:border-box;padding:0 10px;font-size:12px;display:flex;align-items:center;color:#777}.container[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;height:16px;width:16px;color:#777;margin-right:4px}.container[_ngcontent-%COMP%] .no-matches[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 12px);left:-4px;color:#999;padding:8px;border:1px solid #ccc;border-radius:4px;background-color:#fff;font-size:12px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a} .model-explorer-search-help-popup{padding:12px;font-size:12px;background-color:#fff} .model-explorer-search-help-popup ul{margin-block-end:0} .model-explorer-search-help-popup .code{display:inline-block;background-color:#fffdd0;font-family:monospace} .model-explorer-search-help-popup .code.regex{background-color:#e6d0ff} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();var Jpe=["dialog"],efe=["trigger"];function tfe(i,e){i&1&&S(0," Maximum state count reached ")}function nfe(i,e){i&1&&S(0," Save the current graph state ")}function ife(i,e){if(i&1&&(v(0,"div",7),$(1,tfe,1,0)(2,nfe,1,0),v(3,"div",8),S(4," The saved state can be restored by clicking the corresponding state number. You can save up to 9 states. "),b()()),i&2){let t=I();w(),oe(t.disableAddSnapshotButton?1:2)}}function rfe(i,e){if(i&1){let t=ne();v(0,"div",12)(1,"div",13)(2,"div"),S(3),b(),v(4,"div",14),H("click",function(){B(t);let r=I().index,o=I(2);return V(o.handleClickDeleteSnapshot(r))}),v(5,"mat-icon"),S(6,"delete"),b(),S(7," Delete "),b()(),ee(8,"canvas"),b()}if(i&2){let t=I(),n=t.$implicit,r=t.index,o=I(2);w(3),Se("Shortcut key: ",r+1,""),w(5),Jt("width",o.getSnapshotCanvasWidth(n,!0),"px")("height",o.getSnapshotCanvasHeight(n,!0),"px")}}function ofe(i,e){if(i&1){let t=ne();v(0,"div",11,1),H("opened",function(){let r=B(t).$implicit,o=I(2);return V(o.handleSnapshotPopupOpened(r))})("click",function(){let r=B(t).index,o=I(2);return V(o.handleClickSnapshot(r))}),S(3),$(4,rfe,9,5,"ng-template",null,2,Tt),b()}if(i&2){let t=e.index,n=ve(5),r=I(2);R("bubble",n)("overlaySize",r.snapshotPopupSize)("overlayPositions",r.snapshotPopupPosition)("hoverDelayMs",150),w(3),Se(" ",t+1," ")}}function sfe(i,e){if(i&1&&(v(0,"div",9),$(1,ofe,6,5,"div",10),b()),i&2){let t=I();w(),R("ngForOf",t.curSnapshots)("ngForTrackBy",t.trackBySnapshotId)}}var afe=new Set(["1","2","3","4","5","6","7","8","9"]),_j=(()=>{class i{appService;changeDetectorRef;paneId;rendererId;snapshotPopups=new Zi;snapshotTriggers=new Zi;helpPopupSize={minWidth:0,minHeight:0,maxWidth:340};snapshotPopupSize={maxWidth:1e3,maxHeight:1e3};snapshotPopupPosition=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top",offsetY:12}];curSnapshots=[];curModelGraph;constructor(t,n){this.appService=t,this.changeDetectorRef=n,lt(()=>{let r=this.appService.getPaneById(this.paneId);this.curModelGraph=r?.modelGraph,r?.modelGraph!=null&&(this.curSnapshots=(r?.snapshots||{})[r.modelGraph.id]||[],this.changeDetectorRef.markForCheck())})}handleKeyboardEvent(t){if(afe.has(t.key)&&this.appService.curSelectedRenderer()?.id===this.rendererId&&!ty()){let n=Number(t.key)-1;if(n<=this.curSnapshots.length-1){this.handleClickSnapshot(n);let r=this.snapshotTriggers.get(n)?.nativeElement;r&&(r.classList.add("clicked"),setTimeout(()=>{r.classList.remove("clicked")},50))}}}handleClickAddSnapshot(){this.disableAddSnapshotButton||this.appService.addSnapshotClicked.next({rendererId:this.rendererId})}handleClickSnapshot(t){let n=this.curSnapshots[t];this.snapshotPopups.get(t)?.closeDialog(),this.appService.curSnapshotToRestore.next({snapshot:n,rendererId:this.rendererId})}handleClickDeleteSnapshot(t){this.curModelGraph&&this.appService.deleteSnapshot(t,this.curModelGraph.id,this.paneId)}handleSnapshotPopupOpened(t){let n=document.querySelector(".model-explorer-snapshot-popup canvas"),r=this.getSnapshotCanvasWidth(t),o=this.getSnapshotCanvasHeight(t);n.width=r,n.height=o;let s=n.getContext("2d");s.imageSmoothingQuality="high",s.drawImage(t.imageBitmap,0,0,r,o),n.classList.add("show")}getSnapshotCanvasWidth(t,n=!1){return t.imageBitmap.width/(n?window.devicePixelRatio:1)}getSnapshotCanvasHeight(t,n=!1){return t.imageBitmap.height/(n?window.devicePixelRatio:1)}trackBySnapshotId(t,n){return n.id}get addSnapshotTooltip(){return this.disableAddSnapshotButton?"Maximum bookmark count reached":"Bookmark the current graph states to restore later"}get disableAddSnapshotButton(){return this.curSnapshots.length>=9}get hasSnapshots(){return this.curSnapshots.length>0}static \u0275fac=function(n){return new(n||i)(M(at),M(Ne))};static \u0275cmp=ce({type:i,selectors:[["snapshot-manager"]],viewQuery:function(n,r){if(n&1&&(Ee(Jpe,5),Ee(efe,5)),n&2){let o;be(o=ye())&&(r.snapshotPopups=o),be(o=ye())&&(r.snapshotTriggers=o)}},hostBindings:function(n,r){n&1&&H("keypress",function(s){return r.handleKeyboardEvent(s)},!1,Y0)},inputs:{paneId:"paneId",rendererId:"rendererId"},standalone:!0,features:[le],decls:7,vars:6,consts:[["help",""],["dialog","bubble","trigger",""],["snapshotPopup",""],[1,"container"],[1,"mat-icon-container","take-snapshot",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon"],["class","snapshots-container",4,"ngIf"],[1,"model-explorer-help-popup"],[1,"description"],[1,"snapshots-container"],["class","snapshot",3,"bubble","overlaySize","overlayPositions","hoverDelayMs","opened","click",4,"ngFor","ngForOf","ngForTrackBy"],[1,"snapshot",3,"opened","click","bubble","overlaySize","overlayPositions","hoverDelayMs"],[1,"model-explorer-snapshot-popup"],[1,"info-row"],[1,"icon-container","delete",3,"click"]],template:function(n,r){if(n&1){let o=ne();v(0,"div",3)(1,"div",4),H("click",function(){return B(o),V(r.handleClickAddSnapshot())}),v(2,"mat-icon",5),S(3,"bookmark_add"),b()(),$(4,ife,5,1,"ng-template",null,0,Tt)(6,sfe,2,2,"div",6),b()}if(n&2){let o=ve(5);w(),re("disabled",r.disableAddSnapshotButton),R("bubble",o)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(5),R("ngIf",r.hasSnapshots)}},dependencies:[Hn,Ae,Mi,Tn,tt,pt,Xt],styles:[`.container[_ngcontent-%COMP%]{display:flex;align-items:center;margin-right:3px}.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]{width:24px;height:24px;display:flex;align-items:center;justify-content:center;cursor:pointer}.container[_ngcontent-%COMP%] .mat-icon-container.disabled[_ngcontent-%COMP%]{cursor:default;opacity:.5}.container[_ngcontent-%COMP%] .mat-icon-container.disabled[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]:hover{opacity:.6}.container[_ngcontent-%COMP%] mat-icon.toolbar-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;opacity:.6}.container[_ngcontent-%COMP%] mat-icon.toolbar-icon[_ngcontent-%COMP%]:hover{opacity:.9}.container[_ngcontent-%COMP%] .snapshots-container[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:11px;margin-left:6px;margin-right:6px;gap:2px}.container[_ngcontent-%COMP%] .snapshots-container[_ngcontent-%COMP%] .snapshot[_ngcontent-%COMP%]{width:16px;height:16px;border-radius:8px;background-color:#7cacf8;color:#fff;box-sizing:border-box;display:flex;align-items:center;justify-content:center;font-weight:500;cursor:pointer}.container[_ngcontent-%COMP%] .snapshots-container[_ngcontent-%COMP%] .snapshot[_ngcontent-%COMP%]:hover, .container[_ngcontent-%COMP%] .snapshots-container[_ngcontent-%COMP%] .snapshot.clicked[_ngcontent-%COMP%]{background-color:#0b57d0;color:#fff} .model-explorer-snapshot-popup{font-size:11px;line-height:12px;background-color:#fff} .model-explorer-snapshot-popup .info-row{color:#333;display:flex;align-items:center;justify-content:space-between;background-color:#f6f6f6;padding:4px 8px;border-bottom:1px solid #ddd} .model-explorer-snapshot-popup .info-row .icon-container{display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:.8} .model-explorer-snapshot-popup .info-row .icon-container:hover{opacity:1} .model-explorer-snapshot-popup .info-row .icon-container mat-icon{font-size:18px;width:18px;height:19px} .model-explorer-snapshot-popup canvas{opacity:0;transition:opacity .2s ease-out} .model-explorer-snapshot-popup canvas.show{opacity:1} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();function cfe(i,e){i&1&&(v(0,"mat-icon",2),S(1,"chevron_right"),b())}function lfe(i,e){if(i&1){let t=ne();v(0,"div",1),H("click",function(){let r=B(t).$index,o=I();return V(o.handleClickItem(r))}),S(1),b(),$(2,cfe,2,0,"mat-icon",2)}if(i&2){let t=e.$implicit,n=e.$index,r=I();re("current",n===r.curSubgraphBreadcrumbs.length-1),w(),Se(" ",t.graphId," "),w(),oe(n!==r.curSubgraphBreadcrumbs.length-1?2:-1)}}var vj=(()=>{class i{appService;changeDetectorRef;paneId;curSubgraphBreadcrumbs=[];savedSubgraphBreadcrumbs;constructor(t,n){this.appService=t,this.changeDetectorRef=n,lt(()=>{let o=this.appService.getPaneById(this.paneId)?.subgraphBreadcrumbs;o!==this.savedSubgraphBreadcrumbs&&(this.savedSubgraphBreadcrumbs=o,this.curSubgraphBreadcrumbs=o||[],this.changeDetectorRef.markForCheck())})}handleClickItem(t){if(t===this.curSubgraphBreadcrumbs.length-1)return;this.appService.setCurrentSubgraphBreadcrumb(this.paneId,t);let n=this.curSubgraphBreadcrumbs[t],r=n.snapshot;if(r)if(n.graphId===this.appService.getPaneById(this.paneId)?.modelGraph?.id)this.appService.curSnapshotToRestore.next({rendererId:this.paneId,snapshot:r});else{let o=this.appService.getGraphById(n.graphId);o&&this.appService.selectGraphInCurrentPane(o,r.flattenLayers,r)}}static \u0275fac=function(n){return new(n||i)(M(at),M(Ne))};static \u0275cmp=ce({type:i,selectors:[["subgraph-breadcrumbs"]],inputs:{paneId:"paneId"},standalone:!0,features:[le],decls:3,vars:0,consts:[[1,"container"],[1,"item",3,"click"],[1,"separator"]],template:function(n,r){n&1&&(v(0,"div",0),rn(1,lfe,3,4,null,null,gr),b()),n&2&&(w(),on(r.curSubgraphBreadcrumbs))},dependencies:[Ae,tt,pt,Xt],styles:[`.container[_ngcontent-%COMP%]{border:1px solid #3876c7;background-color:#d5e7ff;border-radius:4px;box-sizing:border-box;padding:4px 8px;display:flex;align-items:center;font-size:13px}.container[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{display:flex;align-items:center;color:#777}.container[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]:hover:not(.current){cursor:pointer;text-decoration:underline}.container[_ngcontent-%COMP%] .item.current[_ngcontent-%COMP%]{color:#000}.container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{color:#999;font-size:16px;width:16px;height:16px;margin:0 3px} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();var bj=(i,e)=>e.type;function dfe(i,e){i&1&&(v(0,"div",7),S(1," Select data to view on nodes / edges "),b())}function ufe(i,e){if(i&1){let t=ne();v(0,"div",14)(1,"input",15,3),H("keydown.enter",function(){B(t);let r=ve(2);return V(r.blur())})("input",function(){B(t);let r=ve(2),o=I().$implicit,s=I(2);return V(s.setAttrsFilterText(o,r.value))})("change",function(){B(t);let r=I().$implicit,o=I(2);return V(o.handleAttrsFilterChanged(r))}),b(),v(3,"div",16)(4,"mat-icon"),S(5,"help_outline"),b()(),v(6,"div",17),H("click",function(){B(t);let r=ve(2);return V(r.blur())}),v(7,"mat-icon"),S(8,"done"),b()()()}if(i&2){let t=I().$implicit,n=I(2),r=ve(9);w(),R("disabled",!t.selected)("value",n.getAttrsFilterText(t)),w(2),R("bubble",r)("hoverDelayMs",100)}}function hfe(i,e){if(i&1){let t=ne();v(0,"div",12),H("click",function(){let r=B(t).$implicit,o=I(2);return V(o.handleToggleShowOnNode(r))}),ee(1,"input",13),S(2),b(),$(3,ufe,9,4,"div",14)}if(i&2){let t=e.$implicit,n=I(2);w(),R("checked",t.selected),w(),Se(" ",t.type," "),w(),oe(n.getIsAttrs(t)?3:-1)}}function pfe(i,e){if(i&1){let t=ne();v(0,"div",12),H("click",function(){let r=B(t).$implicit,o=I(2);return V(o.handleToggleShowOnEdge(r))}),ee(1,"input",13),S(2),b()}if(i&2){let t=e.$implicit;w(),R("checked",t.selected),w(),Se(" ",t.type," ")}}function ffe(i,e){if(i&1&&(v(0,"div",8)(1,"div",9)(2,"div"),S(3,"View on nodes"),b(),v(4,"div",10)(5,"mat-icon"),S(6,"close"),b()()(),rn(7,hfe,4,3,null,null,bj),v(9,"div",9)(10,"div"),S(11,"View on edges"),b()(),rn(12,pfe,3,2,"div",11,bj),b()),i&2){let t=I();w(7),on(t.showOnNodeItems),w(5),on(t.showOnEdgeItems)}}function mfe(i,e){i&1&&(v(0,"div",18),S(1," Use regex to match "),v(2,"span",19),S(3),b(),S(4," or "),v(5,"span",19),S(6),b(),S(7,". "),ee(8,"br")(9,"br"),S(10," Examples:"),ee(11,"br"),v(12,"ul")(13,"li")(14,"span",20),S(15,"axis:"),b(),S(16," will match attributes whose key is "),v(17,"span",19),S(18,"axis"),b(),S(19,". "),b(),v(20,"li")(21,"span",20),S(22,"padding=[SAME|VALID]"),b(),S(23," will match attributes whose key is "),v(24,"span",19),S(25,"padding"),b(),S(26," and value is either "),v(27,"span",19),S(28,"SAME"),b(),S(29," or "),v(30,"span",19),S(31,"VALID"),b(),S(32,". "),b()()()),i&2&&(w(3),Jl("","{","key","}",":","{","value","}",""),w(3),Jl("","{","key","}","=","{","value","}",""))}var gfe=[Nn.OP_NODE_ID,Nn.OP_ATTRS,Nn.OP_INPUTS,Nn.OP_OUTPUTS,Nn.LAYER_NODE_CHILDREN_COUNT,Nn.LAYER_NODE_DESCENDANTS_COUNT,Nn.LAYER_NODE_ATTRS],_fe=[zc.TENSOR_SHAPE],yj=(()=>{class i{appService;changeDetectorRef;localStorageService;nodeDataProviderExtensionService;rendererId;paneId;inPopup=!1;popup;savedShowOnNodeItemTypes;nodeDataProviderRunNames=Bt(()=>{let t=this.appService.getModelGraphFromPane(this.paneId);return(t?Object.values(this.nodeDataProviderExtensionService.getRunsForModelGraph(t)):[]).map(r=>r.runName)});savedNodeDataProviderRunNames=[];savedShowOnEdgeItemTypes;helpPopupSize={minWidth:0,minHeight:0};viewPopupSize={minWidth:280,minHeight:0};showOnNodeItems=[];showOnEdgeItems=[];curOpAttrsFilterText="";curGroupAttrsFilterText="";opened=!1;constructor(t,n,r,o){this.appService=t,this.changeDetectorRef=n,this.localStorageService=r,this.nodeDataProviderExtensionService=o,lt(()=>{let a=this.appService.getPaneById(this.paneId)?.showOnNodeItemTypes||{},c=this.nodeDataProviderRunNames();if(a===this.savedShowOnNodeItemTypes&&JSON.stringify(c)===JSON.stringify(this.savedNodeDataProviderRunNames))return;this.savedNodeDataProviderRunNames=c,this.savedShowOnNodeItemTypes=a;let l=[];for(let d of gfe){let u={type:d,selected:(a[this.rendererId]||{})[d]?.selected};l.push(u),d===Nn.OP_ATTRS?(u.filterRegex=(a[this.rendererId]||{})[d]?.filterRegex||"",this.curOpAttrsFilterText=u.filterRegex):d===Nn.LAYER_NODE_ATTRS&&(u.filterRegex=(a[this.rendererId]||{})[d]?.filterRegex||"",this.curGroupAttrsFilterText=u.filterRegex)}for(let d of this.savedNodeDataProviderRunNames){let u=`${La}${d}`;l.push({type:u,selected:(a[this.rendererId]||{})[u]?.selected})}this.showOnNodeItems=l,this.changeDetectorRef.markForCheck()}),lt(()=>{let a=this.appService.getPaneById(this.paneId)?.showOnEdgeItemTypes||{};if(a===this.savedShowOnEdgeItemTypes)return;this.savedShowOnEdgeItemTypes=a;let c=[];for(let l of _fe){let d={type:l,selected:(a[this.rendererId]||{})[l]?.selected};c.push(d)}this.showOnEdgeItems=c,this.changeDetectorRef.markForCheck()})}handleClickOnViewOnNode(t){this.opened&&this.popup.closeDialog()}handleToggleShowOnNode(t){this.appService.toggleShowOnNode(this.paneId,this.rendererId,t.type),this.saveShowOnNodeItemsToLocalStorage()}handleToggleShowOnEdge(t){this.appService.toggleShowOnEdge(this.paneId,this.rendererId,t.type),this.saveShowOnEdgeItemsToLocalStorage()}handleAttrsFilterChanged(t){this.appService.setShowOnNodeFilter(this.paneId,this.rendererId,t.type,this.getAttrsFilterText(t)),this.saveShowOnNodeItemsToLocalStorage()}getAttrsFilterText(t){switch(t.type){case Nn.OP_ATTRS:return this.curOpAttrsFilterText;case Nn.LAYER_NODE_ATTRS:return this.curGroupAttrsFilterText;default:return""}}setAttrsFilterText(t,n){switch(t.type){case Nn.OP_ATTRS:this.curOpAttrsFilterText=n;break;case Nn.LAYER_NODE_ATTRS:this.curGroupAttrsFilterText=n;break;default:break}}getIsAttrs(t){return t.type===Nn.OP_ATTRS||t.type===Nn.LAYER_NODE_ATTRS}saveShowOnNodeItemsToLocalStorage(){if(!this.inPopup&&!this.appService.testMode){let t=this.appService.getShowOnNodeItemTypes(this.paneId,this.rendererId),n=Object.keys(t).filter(r=>r.startsWith(La));for(let r of n)delete t[r];this.localStorageService.setItem(Zb,JSON.stringify(t))}}saveShowOnEdgeItemsToLocalStorage(){if(!this.inPopup&&!this.appService.testMode){let t=this.appService.getShowOnEdgeItemTypes(this.paneId,this.rendererId);this.localStorageService.setItem(Qb,JSON.stringify(t))}}static \u0275fac=function(n){return new(n||i)(M(at),M(Ne),M(no),M(Mr))};static \u0275cmp=ce({type:i,selectors:[["view-on-node"]],viewQuery:function(n,r){if(n&1&&Ee(Is,5),n&2){let o;be(o=ye())&&(r.popup=o.first)}},inputs:{rendererId:"rendererId",paneId:"paneId",inPopup:"inPopup"},standalone:!0,features:[le],decls:10,vars:5,consts:[["help",""],["viewPopup",""],["helpPopup",""],["input",""],[1,"container",3,"bubble","overlaySize","hoverDelayMs"],[1,"mat-icon-container","view",3,"opened","closed","click","bubbleClick","overlaySize"],[1,"toolbar-icon"],[1,"model-explorer-help-popup"],[1,"model-explorer-view-popup"],[1,"label"],["bubbleClose","",1,"icon-container","close"],[1,"show-on-node-item"],[1,"show-on-node-item",3,"click"],["type","checkbox",3,"checked"],[1,"show-on-node-filter"],["placeholder","Filter by regex",1,"input-attrs-filter",3,"keydown.enter","input","change","disabled","value"],[1,"icon-container",3,"bubble","hoverDelayMs"],[1,"icon-container","ok",3,"click"],[1,"model-explorer-view-on-node-help-popup"],[1,"code"],[1,"code","regex"]],template:function(n,r){if(n&1){let o=ne();v(0,"div",4)(1,"div",5),H("opened",function(){return B(o),V(r.opened=!0)})("closed",function(){return B(o),V(r.opened=!1)})("click",function(a){return B(o),V(r.handleClickOnViewOnNode(a))}),v(2,"mat-icon",6),S(3,"visibility"),b()()(),$(4,dfe,2,0,"ng-template",null,0,Tt)(6,ffe,14,0,"ng-template",null,1,Tt)(8,mfe,33,8,"ng-template",null,2,Tt)}if(n&2){let o=ve(5),s=ve(7);R("bubble",o)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(),R("bubbleClick",s)("overlaySize",r.viewPopupSize)}},dependencies:[Hn,Is,Ae,tt,pt,Xt],styles:[`.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]{width:20px;height:20px;display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:.6}.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]:hover{opacity:.9}.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px} .model-explorer-view-popup{padding:10px 12px 12px;font-size:12px;background-color:#fff;display:flex;flex-direction:column} .model-explorer-view-popup .label{font-weight:500;font-size:11px;text-transform:uppercase;letter-spacing:.0727em;margin-bottom:6px;display:flex;align-items:center;justify-content:space-between} .model-explorer-view-popup .label:not(:first-child){margin-top:12px} .model-explorer-view-popup .label .icon-container{cursor:pointer;opacity:.7;display:flex;align-items:center;justify-content:center} .model-explorer-view-popup .label .icon-container:hover{opacity:1} .model-explorer-view-popup .label mat-icon{font-size:20px;width:20px;height:20px;color:#999} .model-explorer-view-popup .show-on-node-item{display:flex;align-items:center;gap:4px;cursor:pointer;color:#555;-webkit-user-select:none;user-select:none} .model-explorer-view-popup .show-on-node-item input{cursor:pointer} .model-explorer-view-popup .show-on-node-filter{margin:1px 0 4px 25px;display:flex;align-items:center;position:relative} .model-explorer-view-popup .show-on-node-filter:focus-within .icon-container.ok{visibility:visible} .model-explorer-view-popup .show-on-node-filter input{flex-grow:1;box-sizing:border-box;border:1px solid #aaa;border-radius:3px;padding:3px 26px 3px 4px;min-width:200px} .model-explorer-view-popup .show-on-node-filter input::placeholder{color:#aaa} .model-explorer-view-popup .show-on-node-filter .icon-container{display:flex;align-items:center;justify-content:center;opacity:.8;cursor:pointer;margin-left:4px} .model-explorer-view-popup .show-on-node-filter .icon-container:hover{opacity:1} .model-explorer-view-popup .show-on-node-filter .icon-container.ok{position:absolute;right:26px;visibility:hidden} .model-explorer-view-popup .show-on-node-filter .icon-container mat-icon{font-size:16px;width:16px;height:16px;color:#999} .model-explorer-view-on-node-help-popup{padding:12px;font-size:12px;background-color:#fff} .model-explorer-view-on-node-help-popup ul{margin-block-end:0} .model-explorer-view-on-node-help-popup .code{display:inline-block;background-color:#fffdd0;font-family:monospace} .model-explorer-view-on-node-help-popup .code.regex{background-color:#e6d0ff} .cdk-overlay-container:has(.model-explorer-view-popup) .cdk-overlay-backdrop{pointer-events:none} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();var vfe=["webglRenderer"];function bfe(i,e){if(i&1&&(ho(0),ee(1,"search-bar",20)(2,"div",15),po()),i&2){let t=I(2);w(),R("curModelGraph",t.modelGraph)("rendererId",t.rendererId)}}function yfe(i,e){i&1&&(v(0,"div",21),S(1," Zoom to fit "),v(2,"div",22)(3,"mat-icon"),S(4,"keyboard"),b(),S(5," Shortcut: SPACE "),b()())}function xfe(i,e){i&1&&(v(0,"div",21),S(1," Expand all layers in the graph "),b())}function wfe(i,e){i&1&&(v(0,"div",21),S(1," Collapse all layers in the graph "),b())}function Cfe(i,e){if(i&1){let t=ne();v(0,"div",23),H("click",function(){B(t);let r=I(2);return V(r.handleClickExpandAllLayers())}),v(1,"mat-icon",24),S(2,"unfold_more_double"),b()(),$(3,xfe,2,0,"ng-template",null,3,Tt),v(5,"div",25),H("click",function(){B(t);let r=I(2);return V(r.handleClickCollapseAllLayers())}),v(6,"mat-icon",26),S(7,"unfold_less_double"),b()(),$(8,wfe,2,0,"ng-template",null,4,Tt),ee(10,"div",15)}if(i&2){let t=ve(4),n=ve(9),r=I(2);re("disable",r.disableExpandCollapseAllButton),R("bubble",t)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(5),re("disable",r.disableExpandCollapseAllButton),R("bubble",n)("overlaySize",r.helpPopupSize)("hoverDelayMs",10)}}function Sfe(i,e){i&1&&(v(0,"div",21),S(1," Flatten all layers in the graph "),v(2,"div",29),S(3," Nodes will be laid out without any layers data "),b()())}function Mfe(i,e){if(i&1){let t=ne();v(0,"div",27),H("click",function(){B(t);let r=I(2);return V(r.handleClickFlattenAllLayers())}),v(1,"mat-icon",28),S(2,"layers_clear"),b()(),ee(3,"div",15),$(4,Sfe,4,0,"ng-template",null,5,Tt)}if(i&2){let t=ve(5),n=I(2);re("enabled",n.flattenAllLayers()),R("bubble",t)("overlaySize",n.helpPopupSize)("hoverDelayMs",10)}}function Efe(i,e){i&1&&(v(0,"span"),S(1,"Disable inputs/outputs tracing"),b())}function Ife(i,e){i&1&&(v(0,"span"),S(1,"Enable inputs/outputs tracing"),b())}function Tfe(i,e){if(i&1&&(v(0,"div",21),$(1,Efe,2,0,"span")(2,Ife,2,0,"span"),v(3,"div",29),S(4," Highlight selected op node's ancestors and descendants and dim the rest "),b()()),i&2){let t=I(2);w(),oe(t.tracing?1:2)}}function Dfe(i,e){i&1&&(v(0,"div",21),S(1," Download graph as PNG "),v(2,"div",29),S(3," The maximum PNG size is limited to 5000 x 5000 "),b()())}function Pfe(i,e){if(i&1){let t=ne();ee(0,"div",15),v(1,"div",30),H("menuOpened",function(){B(t);let r=I(2);return V(r.disableDownloadPngHelpPopup=!0)})("menuClosed",function(){B(t);let r=I(2);return V(r.disableDownloadPngHelpPopup=!1)}),v(2,"mat-icon",31),S(3," image "),b()(),$(4,Dfe,4,0,"ng-template",null,6,Tt),v(6,"mat-menu",32,7)(8,"div",33),H("click",function(){B(t);let r=I(2);return V(r.handleClickDownloadAsPng(!1))}),S(9," Graph in current viewport "),b(),v(10,"div",33),H("click",function(){B(t);let r=I(2);return V(r.handleClickDownloadAsPng(!0))}),S(11," Full graph "),b(),v(12,"div",34),H("click",function(r){B(t);let o=I(2);return V(o.handleClickToggleTransparentPngBackground(r))}),ee(13,"input",35),S(14," Transparent background "),b()()}if(i&2){let t=ve(5),n=ve(7),r=I(2);w(),R("bubble",t)("overlaySize",r.helpPopupSize)("hoverDelayMs",10)("bubbleDisabled",r.disableDownloadPngHelpPopup)("matMenuTriggerFor",n),w(12),R("formControl",r.transparentPngBackground)}}function Ofe(i,e){if(i&1&&(ho(0),ee(1,"div",15)(2,"snapshot-manager",36),po()),i&2){let t=I(2);w(2),R("rendererId",t.rendererId)("paneId",t.paneId)}}function Rfe(i,e){if(i&1){let t=ne();v(0,"div",12),$(1,bfe,3,2,"ng-container",13),ee(2,"view-on-node",14)(3,"div",15),v(4,"div",16),H("click",function(){B(t);let r=I();return V(r.handleClickZoomFitIcon())}),v(5,"mat-icon",17),S(6,"fit_screen"),b()(),ee(7,"div",15),$(8,yfe,6,0,"ng-template",null,1,Tt)(10,Cfe,11,10)(11,Mfe,6,5),v(12,"div",18),H("click",function(){B(t);let r=I();return V(r.handleClickTrace())}),v(13,"mat-icon",19),S(14," multiple_stop "),b()(),$(15,Tfe,5,1,"ng-template",null,2,Tt)(17,Pfe,15,6)(18,Ofe,3,2,"ng-container",13),b()}if(i&2){let t=ve(9),n=ve(16),r=I();re("in-popup",r.inPopup)("pushed-down",r.showSubgraphBreadcrumbs),w(),R("ngIf",r.showSearchBar),w(),R("rendererId",r.rendererId)("paneId",r.paneId)("inPopup",r.inPopup),w(2),R("bubble",t)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(6),oe(r.showExpandCollapseAllLayers?10:-1),w(),oe(r.showFlattenLayers?11:-1),w(),re("enabled",r.tracing),R("bubble",n)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(5),oe(r.showDownloadPng?17:-1),w(),R("ngIf",r.showSnapshotManager)}}function Afe(i,e){if(i&1&&ee(0,"subgraph-breadcrumbs",37),i&2){let t=I();R("paneId",t.paneId)}}var UC=(()=>{class i{appService;changeDetectorRef;modelGraph;rendererId;paneId;rootNodeId;inPopup=!1;openInPopupClicked=new Ie;webglRenderer;helpPopupSize={minWidth:0,minHeight:0,maxWidth:340};flattenAllLayers=Bt(()=>this.appService.getFlattenLayers(this.paneId));disableDownloadPngHelpPopup=!1;transparentPngBackground=new vr(!1);curSubgraphBreadcrumbs=[];constructor(t,n){this.appService=t,this.changeDetectorRef=n,lt(()=>{let r=this.appService.getPaneById(this.paneId);this.curSubgraphBreadcrumbs=r?.subgraphBreadcrumbs||[],this.changeDetectorRef.markForCheck()})}handleOpenOnPopupClicked(t){this.openInPopupClicked.emit(t)}handleClickZoomFitIcon(){this.appService.spaceKeyToZoomFitClicked.next({})}handleClickExpandAllLayers(){this.appService.expandOrCollapseAllGraphLayersClicked.next({expandOrCollapse:!0,rendererId:this.rendererId})}handleClickCollapseAllLayers(){this.appService.expandOrCollapseAllGraphLayersClicked.next({expandOrCollapse:!1,rendererId:this.rendererId})}handleClickFlattenAllLayers(){let t=this.appService.getPaneById(this.paneId)?.selectedNodeInfo?.nodeId;t!=null&&wt(this.modelGraph.nodesById[t])&&this.appService.selectNode(this.paneId,void 0),this.appService.toggleFlattenLayers(this.paneId),this.appService.processGraph(this.paneId,this.appService.getFlattenLayers(this.paneId)),this.appService.curInitialUiState.set(void 0)}handleClickDownloadAsPng(t){this.appService.downloadAsPngClicked.next({rendererId:this.rendererId,fullGraph:t,transparentBackground:this.transparentPngBackground.value===!0})}handleClickTrace(){this.webglRenderer?.toggleIoTrace()}handleClickToggleTransparentPngBackground(t){t.stopPropagation(),this.transparentPngBackground.setValue(!this.transparentPngBackground.value)}getActiveSelectedNodeInfo(){return this.webglRenderer?.getActiveSelectedNodeInfo()}get showSearchBar(){return!this.inPopup}get showExpandCollapseAllLayers(){return!this.inPopup}get showFlattenLayers(){return!this.inPopup}get showDownloadPng(){return!this.inPopup}get showSnapshotManager(){return!this.inPopup}get showSubgraphBreadcrumbs(){return!this.inPopup&&this.curSubgraphBreadcrumbs.length>1}get disableExpandCollapseAllButton(){return this.appService.getFlattenLayers(this.paneId)}get tracing(){return this.webglRenderer?.tracing===!0}get showToolBar(){return!this.appService.config()?.hideToolBar}get isTestMode(){return this.appService.testMode}static \u0275fac=function(n){return new(n||i)(M(at),M(Ne))};static \u0275cmp=ce({type:i,selectors:[["renderer-wrapper"]],viewQuery:function(n,r){if(n&1&&Ee(vfe,5),n&2){let o;be(o=ye())&&(r.webglRenderer=o.first)}},inputs:{modelGraph:"modelGraph",rendererId:"rendererId",paneId:"paneId",rootNodeId:"rootNodeId",inPopup:"inPopup"},outputs:{openInPopupClicked:"openInPopupClicked"},standalone:!0,features:[le],decls:5,vars:7,consts:[["webglRenderer",""],["helpZoomToFit",""],["helpTraceIO",""],["helpExpandAll",""],["helpCollapseAll",""],["helpFlattenLayers",""],["helpDownloadPng",""],["menu","matMenu"],[1,"container"],[3,"openInPopupClicked","modelGraph","rendererId","paneId","rootNodeId","inPopup"],[1,"toolbar",3,"in-popup","pushed-down"],[3,"paneId",4,"ngIf"],[1,"toolbar"],[4,"ngIf"],[3,"rendererId","paneId","inPopup"],[1,"vertical-divider"],[1,"mat-icon-container","zoom-fit",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon"],[1,"mat-icon-container","trace-io",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon","trace"],[3,"curModelGraph","rendererId"],[1,"model-explorer-help-popup"],[1,"shortcut"],[1,"mat-icon-container","expand-all",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon","expand-all"],[1,"mat-icon-container","collapse-all",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon","collapse-all"],[1,"mat-icon-container","flatten-layers",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon","flatten-layers"],[1,"description"],[1,"mat-icon-container","download-png",3,"menuOpened","menuClosed","bubble","overlaySize","hoverDelayMs","bubbleDisabled","matMenuTriggerFor"],[1,"toolbar-icon","download-png"],[1,"model-explorer-download-png-menu"],[1,"menu-item",3,"click"],[1,"transparent-background-toggle",3,"click"],["type","checkbox",3,"formControl"],[3,"rendererId","paneId"],[3,"paneId"]],template:function(n,r){if(n&1){let o=ne();v(0,"div",8)(1,"webgl-renderer",9,0),H("openInPopupClicked",function(a){return B(o),V(r.handleOpenOnPopupClicked(a))}),b(),$(3,Rfe,19,20,"div",10)(4,Afe,1,1,"subgraph-breadcrumbs",11),b()}n&2&&(w(),R("modelGraph",r.modelGraph)("rendererId",r.rendererId)("paneId",r.paneId)("rootNodeId",r.rootNodeId)("inPopup",r.inPopup),w(2),oe(r.showToolBar?3:-1),w(),R("ngIf",r.showSubgraphBreadcrumbs))},dependencies:[Hn,Ae,Tn,xn,tt,pt,ua,ns,xl,Xt,br,Um,Ho,vo,gj,_j,vj,yj,NC],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;overflow:hidden;position:relative}.container[_ngcontent-%COMP%] svg-rednerer[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] webgl-rednerer[_ngcontent-%COMP%]{width:100%;height:100%}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%]{position:absolute;top:8px;left:12px;padding:0 8px 0 6px;box-sizing:border-box;height:40px;display:flex;background-color:#edf2fa;border-radius:99px;align-items:center;outline:2px solid white}.container[_ngcontent-%COMP%] .toolbar.in-popup[_ngcontent-%COMP%]{padding-left:10px}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%]:has(search-bar input:focus){border-color:#1a73e8}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] search-bar[_ngcontent-%COMP%]{margin-right:4px}.container[_ngcontent-%COMP%] .toolbar.pushed-down[_ngcontent-%COMP%]{top:44px}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]{width:24px;height:24px;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] .mat-icon-container.enabled[_ngcontent-%COMP%]{background-color:#ffdeb1;outline:1px solid #ea8600;border-radius:4px}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] .mat-icon-container.disable[_ngcontent-%COMP%]{opacity:.2;pointer-events:none}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;cursor:pointer;opacity:.6}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon[_ngcontent-%COMP%]:hover{opacity:.9}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon.expand-all[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon.collapse-all[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon.flatten-layers[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;border:1px solid transparent}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon.trace[_ngcontent-%COMP%]{transform:rotate(90deg);border:1px solid transparent}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] .vertical-divider[_ngcontent-%COMP%]{width:1px;border-left:1px solid #d0d0d0;margin:2px 5px;height:20px}.container[_ngcontent-%COMP%] subgraph-breadcrumbs[_ngcontent-%COMP%]{position:absolute;top:8px;left:12px} bubble-container:has(.model-explorer-view-popup){border-top-left-radius:0;border-top-right-radius:0} .model-explorer-download-png-menu .menu-item{letter-spacing:normal!important;font-family:Google Sans Text,Arial,Helvetica,sans-serif!important;font-size:12px;padding:0 8px;cursor:pointer;display:flex;align-items:center} .model-explorer-download-png-menu .menu-item:hover{background-color:#eee} .model-explorer-download-png-menu .transparent-background-toggle{display:flex;align-items:center;font-size:12px;letter-spacing:normal;padding:6px 8px 0 4px;border-top:1px solid #ddd;margin-top:8px;cursor:pointer} .model-explorer-download-png-menu .transparent-background-toggle input{cursor:inherit} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();var Nfe=["rendererWrapper"],kfe=400,Lfe=400,Ffe=26,xj=(()=>{class i{appService;root;id;paneId;groupNode;initialPosition;curModelGraph;closeClicked=new Ie;rendererWrapper;selected=Bt(()=>this.appService.curSelectedRenderer()?.id===this.rendererWrapper?.rendererId&&this.appService.selectedPaneId()===this.paneId);minimized=!1;savedHeight="";mouseDownListener=t=>{this.rendererWrapper&&(this.appService.curSelectedRenderer.set({id:this.rendererWrapper.rendererId,ownerType:Vc.POPUP}),this.appService.selectNode(this.paneId,this.rendererWrapper.getActiveSelectedNodeInfo()),this.appService.selectPane(this.paneId))};constructor(t,n){this.appService=t,this.root=n}ngOnInit(){this.root.nativeElement.addEventListener("mousedown",this.mouseDownListener,!0);let t=this.root.nativeElement;t.style.left=`${this.initialPosition.x}px`,t.style.top=`${this.initialPosition.y}px`,t.style.width=`${kfe}px`,t.style.height=`${Lfe}px`}ngOnDestroy(){this.root.nativeElement.removeEventListener("mousedown",this.mouseDownListener,!0)}toggleMinimize(){this.minimized=!this.minimized,this.minimized?(this.savedHeight=this.root.nativeElement.style.height,this.root.nativeElement.style.height=`${Ffe}px`):this.root.nativeElement.style.height=this.savedHeight}handleMouseDown(t){t.stopPropagation(),t.button!==2&&new kC(this.root.nativeElement).drag(t)}handleMouseUp(t){}get title(){return this.groupNode.label}static \u0275fac=function(n){return new(n||i)(M(at),M(Re))};static \u0275cmp=ce({type:i,selectors:[["popup-panel"]],viewQuery:function(n,r){if(n&1&&Ee(Nfe,5),n&2){let o;be(o=ye())&&(r.rendererWrapper=o.first)}},inputs:{id:"id",paneId:"paneId",groupNode:"groupNode",initialPosition:"initialPosition",curModelGraph:"curModelGraph"},outputs:{closeClicked:"closeClicked"},standalone:!0,features:[le],decls:22,vars:13,consts:[["rendererWrapper",""],[1,"container",3,"mousedown","mouseup"],[1,"title",3,"dblclick"],[1,"label"],[1,"icons-container"],[1,"mat-icon-container","minimize",3,"click"],[1,"mat-icon-container","close",3,"click"],[3,"modelGraph","rendererId","paneId","rootNodeId","inPopup"],[1,"resize-box",3,"mousedown","mouseup"],["data-position","top"],["data-position","bottom"],["data-position","left"],["data-position","right"],["data-position","top-right"],["data-position","top-left"],["data-position","bottom-right"],["data-position","bottom-left"]],template:function(n,r){if(n&1){let o=ne();v(0,"div",1),H("mousedown",function(a){return B(o),V(r.handleMouseDown(a))})("mouseup",function(a){return B(o),V(r.handleMouseUp(a))}),v(1,"div",2),H("dblclick",function(){return B(o),V(r.toggleMinimize())}),v(2,"div",3),S(3),b(),v(4,"div",4)(5,"div",5),H("click",function(){return B(o),V(r.toggleMinimize())}),v(6,"mat-icon"),S(7),b()(),v(8,"div",6),H("click",function(){return B(o),V(r.closeClicked.emit(r.id))}),v(9,"mat-icon"),S(10,"close"),b()()()(),ee(11,"renderer-wrapper",7,0),b(),v(13,"div",8),H("mousedown",function(a){return B(o),V(r.handleMouseDown(a))})("mouseup",function(a){return B(o),V(r.handleMouseUp(a))}),ee(14,"div",9)(15,"div",10)(16,"div",11)(17,"div",12)(18,"div",13)(19,"div",14)(20,"div",15)(21,"div",16),b()}n&2&&(re("selected",r.selected())("minimized",r.minimized),w(3),st(r.title),w(4),st(r.minimized?"unfold_more":"unfold_less"),w(4),R("modelGraph",r.curModelGraph)("rendererId",r.id)("paneId",r.paneId)("rootNodeId",r.groupNode.id)("inPopup",!0),w(2),re("disabled",r.minimized))},dependencies:[tt,pt,UC],styles:[`[_nghost-%COMP%]{position:absolute;-webkit-user-select:none;user-select:none}.container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column;font-size:13px;outline:2px solid transparent;position:relative;background-color:#fff;border-radius:4px;overflow:hidden;border:2px solid #aaa;cursor:pointer}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{height:27px;border-bottom:1px solid #ccc;box-sizing:border-box;background-color:#e7f3ff;display:flex;align-items:center;justify-content:space-between;flex-shrink:0;overflow:hidden;border-top-left-radius:2px;border-top-right-radius:2px;white-space:nowrap}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{flex-grow:1;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;padding-left:8px;padding-right:4px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]{width:24px;display:flex;align-items:center;justify-content:center;opacity:.6;cursor:pointer}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;font-weight:700;width:16px;height:16px}.container[_ngcontent-%COMP%] renderer-wrapper[_ngcontent-%COMP%]{flex-grow:1;min-height:0}.container.selected[_ngcontent-%COMP%]{box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.container.selected[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{background-color:#ea8600;color:#fff}.container.minimized[_ngcontent-%COMP%] svg-renderer[_ngcontent-%COMP%]{display:none}.resize-box[_ngcontent-%COMP%]{position:absolute;inset:-4px;pointer-events:none;z-index:100}.resize-box.disabled[_ngcontent-%COMP%] [data-position][_ngcontent-%COMP%]{pointer-events:none}.resize-box[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{position:absolute;pointer-events:all;background-color:transparent}.resize-box[_ngcontent-%COMP%] [data-position=top][_ngcontent-%COMP%]{top:0;width:100%;height:8px;cursor:ns-resize}.resize-box[_ngcontent-%COMP%] [data-position=bottom][_ngcontent-%COMP%]{bottom:0;width:100%;height:8px;cursor:ns-resize}.resize-box[_ngcontent-%COMP%] [data-position=left][_ngcontent-%COMP%]{left:0;height:100%;width:8px;cursor:ew-resize}.resize-box[_ngcontent-%COMP%] [data-position=right][_ngcontent-%COMP%]{right:0;height:100%;width:8px;cursor:ew-resize}.resize-box[_ngcontent-%COMP%] [data-position=top-right][_ngcontent-%COMP%]{top:0;right:0;height:8px;width:8px;cursor:nesw-resize}.resize-box[_ngcontent-%COMP%] [data-position=top-left][_ngcontent-%COMP%]{top:0;left:0;height:8px;width:8px;cursor:nwse-resize}.resize-box[_ngcontent-%COMP%] [data-position=bottom-left][_ngcontent-%COMP%]{bottom:0;left:0;height:8px;width:8px;cursor:nesw-resize}.resize-box[_ngcontent-%COMP%] [data-position=bottom-right][_ngcontent-%COMP%]{bottom:0;right:0;height:8px;width:8px;cursor:nwse-resize} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();function Bfe(i,e){if(i&1){let t=ne();v(0,"button",5),H("click",function(){B(t);let r=I(2);return V(r.handleClickExportToResource())}),v(1,"mat-icon"),S(2,"drive_folder_upload"),b(),S(3," Export to resource "),b()}}function Vfe(i,e){if(i&1){let t=ne();v(0,"div",0)(1,"div",1),S(2," Selection "),b(),v(3,"div",2),S(4),v(5,"div",3),H("click",function(){B(t);let r=I();return V(r.handleClickClear())}),S(6," Clear "),b()(),v(7,"div",4)(8,"button",5),H("click",function(){B(t);let r=I();return V(r.handleClickDownloadSubgraph())}),S(9," Download subgraph "),b(),$(10,Bfe,4,0,"button",6),b()()}if(i&2){let t=I();w(4),Se(" ",t.selectedNodeCountLabel()," "),w(6),oe(t.enableExportToResource?10:-1)}}var wj=(()=>{class i{appService;subgraphSelectionService;paneId;hasSelectedNodes;selectedNodeCountLabel=Bt(()=>{let t=this.subgraphSelectionService.selectedNodeCount();return`${t} node${t===1?"":"s"}`});constructor(t,n){this.appService=t,this.subgraphSelectionService=n,this.hasSelectedNodes=this.subgraphSelectionService.hasSelectedNodes}handleClickClear(){this.subgraphSelectionService.clearSelection()}handleClickDownloadSubgraph(){let t=this.subgraphSelectionService.getSelectedSubgraph();if(!t)return;let n=document.createElement("a");n.download=`${t.collectionLabel}_subgraph.json`;let r=`data:text/json;charset=utf-8, ${encodeURIComponent(JSON.stringify([t],null,2))}`;dc(n,r),n.click()}handleClickExportToResource(){let t=this.subgraphSelectionService.getSelectedSubgraph();t&&iy(`${t.collectionLabel??""}_subgraph.json`,[t])}get enableExportToResource(){return this.appService.config()?.enableExportToResource===!0}static \u0275fac=function(n){return new(n||i)(M(at),M(Ko))};static \u0275cmp=ce({type:i,selectors:[["selection-panel"]],inputs:{paneId:"paneId"},standalone:!0,features:[le],decls:1,vars:1,consts:[[1,"container"],[1,"title"],[1,"content"],[1,"link-clear",3,"click"],[1,"btns-container"],["mat-flat-button","","color","primary",3,"click"],["mat-flat-button","","color","primary"]],template:function(n,r){n&1&&$(0,Vfe,11,2,"div",0),n&2&&oe(r.hasSelectedNodes()?0:-1)},dependencies:[Ae,xn,Ti,tt,pt],styles:[`.container[_ngcontent-%COMP%]{font-size:12px;border:2px solid #09b83e;overflow:hidden;border-radius:6px;background-color:#fff}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{padding:6px 8px;background-color:#09b83e;color:#fff;font-weight:500}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:16px 8px 12px;display:flex;align-items:center;justify-content:space-between}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .link-clear[_ngcontent-%COMP%]{text-decoration:underline;color:#00639b;cursor:pointer;opacity:.8;-webkit-user-select:none;user-select:none}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .link-clear[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .btns-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:8px;gap:8px}.container[_ngcontent-%COMP%] .btns-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{letter-spacing:normal;width:100%} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();var zfe=["popupPanel"];function Ufe(i,e){if(i&1){let t=ne();v(0,"renderer-wrapper",5),H("openInPopupClicked",function(r){B(t);let o=I();return V(o.handleOpenOnPopupClicked(r))}),b()}if(i&2){let t=I();R("modelGraph",t.modelGraph)("rendererId",t.rendererId)("paneId",t.paneId)}}function Hfe(i,e){if(i&1){let t=ne();v(0,"popup-panel",6,0),H("closeClicked",function(r){B(t);let o=I();return V(o.handleClickClosePanel(r))}),b()}if(i&2){let t=e.$implicit,n=I();R("id",t.id)("paneId",n.paneId)("groupNode",t.groupNode)("initialPosition",t.initialPosition)("curModelGraph",t.curModelGraph)}}function Gfe(i,e){if(i&1&&ee(0,"legends-panel",4),i&2){let t=I();R("paneId",t.paneId)}}var Cj=(()=>{class i{root;appService;changeDetectorRef;subgraphSelectionService;modelGraph;rendererId;paneId;popupPanelComponents=new Zi;popupPanels=[];showRenderer=!0;mouseDownListener=t=>{t.target.closest("popup-panel")==null&&this.appService.curSelectedRenderer.set({id:this.rendererId,ownerType:Vc.GRAPH_PANEL})};resizeObserver;constructor(t,n,r,o){this.root=t,this.appService=n,this.changeDetectorRef=r,this.subgraphSelectionService=o,lt(()=>{let s=this.appService.curSelectedRenderer(),a=this.root.nativeElement.querySelector("popup-panel.top");a&&a.classList.remove("top");let c=this.popupPanelComponents.find(l=>l.rendererWrapper?.rendererId===s?.id);c&&c.root.nativeElement.classList.add("top")})}ngOnInit(){this.root.nativeElement.addEventListener("mousedown",this.mouseDownListener,!0),this.subgraphSelectionService.paneId=this.paneId}ngOnChanges(t){t.modelGraph&&this.modelGraph&&(this.subgraphSelectionService.clearSelection(),this.showRenderer=!1,this.changeDetectorRef.detectChanges(),this.showRenderer=!0,this.changeDetectorRef.detectChanges())}ngAfterViewInit(){let t=this.root.nativeElement;this.resizeObserver=new ResizeObserver(n=>{this.handleResize()}),this.resizeObserver.observe(t)}ngOnDestroy(){this.root.nativeElement.removeEventListener("mousedown",this.mouseDownListener,!0),this.resizeObserver&&this.resizeObserver.unobserve(this.root.nativeElement)}trackByPopupPanelId(t,n){return n.id}handleOpenOnPopupClicked(t){this.popupPanels.push(t)}handleClickClosePanel(t){let n=this.popupPanels.findIndex(r=>r.id===t);n>=0&&this.popupPanels.splice(n,1)}get showLegends(){return!this.appService.config()?.hideLegends}handleResize(){let t=this.root.nativeElement;for(let n of this.popupPanelComponents){let r=n.root.nativeElement;if(!r)continue;let o=Number(r.style.width.replace("px","")),s=Number(r.style.height.replace("px","")),a=Number(r.style.left.replace("px",""))+o,c=Number(r.style.top.replace("px",""))+s;a>t.offsetWidth&&(r.style.left=`${t.offsetWidth-o}px`),c>t.offsetHeight&&(r.style.top=`${t.offsetHeight-s}px`)}}static \u0275fac=function(n){return new(n||i)(M(Re),M(at),M(Ne),M(Ko))};static \u0275cmp=ce({type:i,selectors:[["graph-panel"]],viewQuery:function(n,r){if(n&1&&Ee(zfe,5),n&2){let o;be(o=ye())&&(r.popupPanelComponents=o)}},inputs:{modelGraph:"modelGraph",rendererId:"rendererId",paneId:"paneId"},standalone:!0,features:[dn,le],decls:5,vars:5,consts:[["popupPanel",""],[1,"container"],[3,"modelGraph","rendererId","paneId","openInPopupClicked",4,"ngIf"],[3,"id","paneId","groupNode","initialPosition","curModelGraph","closeClicked",4,"ngFor","ngForOf","ngForTrackBy"],[3,"paneId"],[3,"openInPopupClicked","modelGraph","rendererId","paneId"],[3,"closeClicked","id","paneId","groupNode","initialPosition","curModelGraph"]],template:function(n,r){n&1&&(v(0,"div",1),$(1,Ufe,1,3,"renderer-wrapper",2)(2,Hfe,2,5,"popup-panel",3)(3,Gfe,1,1,"legends-panel",4),ee(4,"selection-panel",4),b()),n&2&&(w(),R("ngIf",r.showRenderer),w(),R("ngForOf",r.popupPanels)("ngForTrackBy",r.trackByPopupPanelId),w(),oe(r.showLegends?3:-1),w(),R("paneId",r.paneId))},dependencies:[Ae,Mi,Tn,KG,xj,UC,wj],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;position:relative;overflow:hidden}.container[_ngcontent-%COMP%] renderer-wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.container[_ngcontent-%COMP%] popup-panel.top[_ngcontent-%COMP%]{z-index:100}.container[_ngcontent-%COMP%] legends-panel[_ngcontent-%COMP%]{position:absolute;left:8px;bottom:8px;border-radius:6px;border:1px solid #ddd;overflow:hidden}.container[_ngcontent-%COMP%] selection-panel[_ngcontent-%COMP%]{position:absolute;right:8px;top:8px;overflow:hidden} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();var jfe=["switch"],Wfe=["*"];function $fe(i,e){i&1&&(v(0,"div",10),uo(),v(1,"svg",12),ee(2,"path",13),b(),v(3,"svg",14),ee(4,"path",15),b()())}var qfe=new me("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1,hideIcon:!1})}),Yfe={provide:Ba,useExisting:kr(()=>GC),multi:!0},HC=class{constructor(e,t){this.source=e,this.checked=t}},Xfe=0,GC=(()=>{let e=class e{_createChangeEvent(n){return new HC(this,n)}get buttonId(){return`${this.id||this._uniqueId}-button`}focus(){this._switchElement.nativeElement.focus()}get checked(){return this._checked}set checked(n){this._checked=n,this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(n,r,o,s,a,c){this._elementRef=n,this._focusMonitor=r,this._changeDetectorRef=o,this.defaults=a,this._onChange=l=>{},this._onTouched=()=>{},this._validatorOnChange=()=>{},this._checked=!1,this.name=null,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this.change=new Ie,this.toggleChange=new Ie,this.tabIndex=parseInt(s)||0,this.color=a.color||"accent",this._noopAnimations=c==="NoopAnimations",this.id=this._uniqueId=`mat-mdc-slide-toggle-${++Xfe}`,this.hideIcon=a.hideIcon??!1,this._labelId=this._uniqueId+"-label"}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(n=>{n==="keyboard"||n==="program"?(this._focused=!0,this._changeDetectorRef.markForCheck()):n||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnChanges(n){n.required&&this._validatorOnChange()}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(n){this.checked=!!n}registerOnChange(n){this._onChange=n}registerOnTouched(n){this._onTouched=n}validate(n){return this.required&&n.value!==!0?{required:!0}:null}registerOnValidatorChange(n){this._validatorOnChange=n}setDisabledState(n){this.disabled=n,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}_handleClick(){this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new HC(this,this.checked)))}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Gr),M(Ne),Lr("tabindex"),M(qfe),M(jn,8))},e.\u0275cmp=ce({type:e,selectors:[["mat-slide-toggle"]],viewQuery:function(r,o){if(r&1&&Ee(jfe,5),r&2){let s;be(s=ye())&&(o._switchElement=s.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(r,o){r&2&&(Fo("id",o.id),Ye("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),Vr(o.color?"mat-"+o.color:""),re("mat-mdc-slide-toggle-focused",o._focused)("mat-mdc-slide-toggle-checked",o.checked)("_mat-animation-noopable",o._noopAnimations))},inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],required:[2,"required","required",et],color:"color",disabled:[2,"disabled","disabled",et],disableRipple:[2,"disableRipple","disableRipple",et],tabIndex:[2,"tabIndex","tabIndex",n=>n==null?0:ni(n)],checked:[2,"checked","checked",et],hideIcon:[2,"hideIcon","hideIcon",et]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],standalone:!0,features:[Ft([Yfe,{provide:vd,useExisting:e,multi:!0}]),nn,dn,le],ngContentSelectors:Wfe,decls:13,vars:24,consts:[["switch",""],["mat-internal-form-field","",3,"labelPosition"],["role","switch","type","button",1,"mdc-switch",3,"click","tabIndex","disabled"],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-switch__icons"],[1,"mdc-label",3,"click","for"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"]],template:function(r,o){if(r&1){let s=ne();In(),v(0,"div",1)(1,"button",2,0),H("click",function(){return B(s),V(o._handleClick())}),ee(3,"div",3),v(4,"div",4)(5,"div",5)(6,"div",6),ee(7,"div",7),b(),v(8,"div",8),ee(9,"div",9),b(),$(10,$fe,5,0,"div",10),b()()(),v(11,"label",11),H("click",function(c){return B(s),V(c.stopPropagation())}),Wt(12),b()()}if(r&2){let s=ve(2);R("labelPosition",o.labelPosition),w(),re("mdc-switch--selected",o.checked)("mdc-switch--unselected",!o.checked)("mdc-switch--checked",o.checked)("mdc-switch--disabled",o.disabled),R("tabIndex",o.disabled?-1:o.tabIndex)("disabled",o.disabled),Ye("id",o.buttonId)("name",o.name)("aria-label",o.ariaLabel)("aria-labelledby",o._getAriaLabelledBy())("aria-describedby",o.ariaDescribedby)("aria-required",o.required||null)("aria-checked",o.checked),w(8),R("matRippleTrigger",s)("matRippleDisabled",o.disableRipple||o.disabled)("matRippleCentered",!0),w(),oe(o.hideIcon?-1:10),w(),R("for",o.buttonId),Ye("id",o._labelId)}},dependencies:[gs,Hh],styles:['.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative;width:var(--mdc-switch-track-width)}.mdc-switch:disabled{cursor:default;pointer-events:none}.mdc-switch__track{overflow:hidden;position:relative;width:100%;height:var(--mdc-switch-track-height);border-radius:var(--mdc-switch-track-shape)}.mdc-switch:disabled .mdc-switch__track{opacity:var(--mdc-switch-disabled-track-opacity)}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%;border-width:var(--mat-switch-track-outline-width);border-color:var(--mat-switch-track-outline-color)}.cdk-high-contrast-active .mdc-switch__track::before,.cdk-high-contrast-active .mdc-switch__track::after{border-color:currentColor}.mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track::after{border-width:var(--mat-switch-selected-track-outline-width);border-color:var(--mat-switch-selected-track-outline-color)}.mdc-switch--disabled .mdc-switch__track::before,.mdc-switch--disabled .mdc-switch__track::after{border-width:var(--mat-switch-disabled-unselected-track-outline-width);border-color:var(--mat-switch-disabled-unselected-track-outline-color)}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0);background:var(--mdc-switch-unselected-track-color)}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch--selected .mdc-switch__track::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::before{opacity:var(--mat-switch-hidden-track-opacity);transition:var(--mat-switch-hidden-track-transition)}.mdc-switch--unselected .mdc-switch__track::before{opacity:var(--mat-switch-visible-track-opacity);transition:var(--mat-switch-visible-track-transition)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-hover-track-color)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-focus-track-color)}.mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mdc-switch-unselected-pressed-track-color)}.mdc-switch:disabled .mdc-switch__track::before{background:var(--mdc-switch-disabled-unselected-track-color)}.mdc-switch__track::after{transform:translateX(-100%);background:var(--mdc-switch-selected-track-color)}[dir=rtl] .mdc-switch__track::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::after{transform:translateX(0)}.mdc-switch--selected .mdc-switch__track::after{opacity:var(--mat-switch-visible-track-opacity);transition:var(--mat-switch-visible-track-transition)}.mdc-switch--unselected .mdc-switch__track::after{opacity:var(--mat-switch-hidden-track-opacity);transition:var(--mat-switch-hidden-track-transition)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-hover-track-color)}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-focus-track-color)}.mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mdc-switch-selected-pressed-track-color)}.mdc-switch:disabled .mdc-switch__track::after{background:var(--mdc-switch-disabled-selected-track-color)}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0);width:calc(100% - var(--mdc-switch-handle-width))}[dir=rtl] .mdc-switch__handle-track{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto;transition:width 75ms cubic-bezier(0.4, 0, 0.2, 1),height 75ms cubic-bezier(0.4, 0, 0.2, 1),margin 75ms cubic-bezier(0.4, 0, 0.2, 1);width:var(--mdc-switch-handle-width);height:var(--mdc-switch-handle-height);border-radius:var(--mdc-switch-handle-shape)}[dir=rtl] .mdc-switch__handle{left:auto;right:0}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle{width:var(--mat-switch-unselected-handle-size);height:var(--mat-switch-unselected-handle-size);margin:var(--mat-switch-unselected-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-unselected-with-icon-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle{width:var(--mat-switch-selected-handle-size);height:var(--mat-switch-selected-handle-size);margin:var(--mat-switch-selected-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-selected-with-icon-handle-horizontal-margin)}.mat-mdc-slide-toggle .mdc-switch__handle:has(.mdc-switch__icons){width:var(--mat-switch-with-icon-handle-size);height:var(--mat-switch-with-icon-handle-size)}.mat-mdc-slide-toggle:active .mdc-switch:not(.mdc-switch--disabled) .mdc-switch__handle{width:var(--mat-switch-pressed-handle-size);height:var(--mat-switch-pressed-handle-size)}.mat-mdc-slide-toggle:active .mdc-switch--selected:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-selected-pressed-handle-horizontal-margin)}.mat-mdc-slide-toggle:active .mdc-switch--unselected:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-unselected-pressed-handle-horizontal-margin)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-selected-handle-opacity)}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-unselected-handle-opacity)}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}.cdk-high-contrast-active .mdc-switch__handle::before,.cdk-high-contrast-active .mdc-switch__handle::after{border-color:currentColor}.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-selected-handle-color)}.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-hover-handle-color)}.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-focus-handle-color)}.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-selected-pressed-handle-color)}.mdc-switch--selected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-selected-handle-color)}.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-unselected-handle-color)}.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-hover-handle-color)}.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-focus-handle-color)}.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-unselected-pressed-handle-color)}.mdc-switch--unselected:disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-unselected-handle-color)}.mdc-switch__handle::before{background:var(--mdc-switch-handle-surface-color)}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation-shadow)}.mdc-switch:disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation-shadow)}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1;width:var(--mdc-switch-state-layer-size);height:var(--mdc-switch-state-layer-size)}.mdc-switch__ripple::after{content:"";opacity:0}.mdc-switch:disabled .mdc-switch__ripple::after{display:none}.mdc-switch:hover .mdc-switch__ripple::after{opacity:.04;transition:75ms opacity cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mdc-switch .mdc-switch__ripple::after{opacity:.12}.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-hover-state-layer-color)}.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-focus-state-layer-color)}.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-pressed-state-layer-color);opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity);transition:opacity 75ms linear}.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mdc-switch-selected-hover-state-layer-color)}.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background:var(--mdc-switch-selected-focus-state-layer-color)}.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background:var(--mdc-switch-selected-pressed-state-layer-color);opacity:var(--mdc-switch-selected-pressed-state-layer-opacity);transition:opacity 75ms linear}.mdc-switch__icons{position:relative;height:100%;width:100%;z-index:1}.mdc-switch--unselected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-unselected-icon-opacity)}.mdc-switch--selected:disabled .mdc-switch__icons{opacity:var(--mdc-switch-disabled-selected-icon-opacity)}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--unselected .mdc-switch__icon{width:var(--mdc-switch-unselected-icon-size);height:var(--mdc-switch-unselected-icon-size);fill:var(--mdc-switch-unselected-icon-color)}.mdc-switch--unselected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-unselected-icon-color)}.mdc-switch--selected .mdc-switch__icon{width:var(--mdc-switch-selected-icon-size);height:var(--mdc-switch-selected-icon-size);fill:var(--mdc-switch-selected-icon-color)}.mdc-switch--selected:disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-selected-icon-color)}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle{display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-slide-toggle .mat-internal-form-field{color:var(--mat-switch-label-text-color);font-family:var(--mat-switch-label-text-font);line-height:var(--mat-switch-label-text-line-height);font-size:var(--mat-switch-label-text-size);letter-spacing:var(--mat-switch-label-text-tracking);font-weight:var(--mat-switch-label-text-weight)}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-mdc-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}.mat-mdc-slide-toggle .mdc-switch:enabled+.mdc-label{cursor:pointer}.mat-mdc-slide-toggle .mdc-switch--disabled+label{color:var(--mdc-switch-disabled-label-text-color)}'],encapsulation:2,changeDetection:0});let i=e;return i})();var jC=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({imports:[GC,Ut,Ut]});let i=e;return i})();var Qfe=["container"],Kfe=["oneLineText"];function Jfe(i,e){if(i&1&&(v(0,"div",8),S(1," Showing at most "),v(2,"span",9),S(3),b()()),i&2){let t=I(2);w(2),R("matTooltipShowDelay",300),w(),Se(" ",t.getMaxConstValueCount()," elements ")}}function eme(i,e){i&1&&(v(0,"div",8),S(1," Showing "),v(2,"span",9),S(3," all elements "),b()()),i&2&&(w(2),R("matTooltipShowDelay",300))}function tme(i,e){if(i&1&&($(0,Jfe,4,2,"div",8)(1,eme,4,1,"div",8),v(2,"div",4),S(3),b()),i&2){let t=I();oe(t.getMaxConstValueCount()>0?0:t.getMaxConstValueCount()<0?1:-1),w(3),st(t.text)}}function nme(i,e){if(i&1&&(v(0,"div",11)(1,"div",12),S(2),b(),v(3,"div",13),S(4),b()()),i&2){let t=e.$implicit,n=e.$index;w(2),st(n),w(2),st(t)}}function ime(i,e){if(i&1&&(v(0,"div",8),S(1," Namespace hierarchy "),b(),v(2,"div",10),rn(3,nme,5,2,"div",11,tb),b()),i&2){let t=I();w(3),on(t.namespaceComponents)}}function rme(i,e){if(i&1&&(v(0,"div",4),S(1),b()),i&2){let t=I();w(),st(t.formatQuantization)}}function ome(i,e){if(i&1&&(v(0,"div",5),S(1),b()),i&2){let t=I();w(),st(t.text)}}var Sj=(()=>{class i{appService;changeDetectorRef;text="";type="";bgColor="transparent";textColor="inherit";container;oneLineText;expanded=!1;hasOverflowInternal=!1;resizeObserver;constructor(t,n){this.appService=t,this.changeDetectorRef=n}get hostExpanded(){return this.expanded}ngAfterViewInit(){setTimeout(()=>{this.updateHasOverflow(),this.changeDetectorRef.markForCheck()}),this.container&&(this.resizeObserver=new ResizeObserver(()=>{this.updateHasOverflow(),this.changeDetectorRef.markForCheck()}),this.resizeObserver.observe(this.container.nativeElement))}ngOnChanges(){setTimeout(()=>{this.updateHasOverflow(),this.changeDetectorRef.markForCheck()})}ngOnDestroy(){this.resizeObserver&&this.resizeObserver.disconnect()}handleToggleExpand(t,n=!1){!this.hasOverflow&&!this.hasMultipleLines||(t.stopPropagation(),!(n&&this.expanded)&&(this.expanded=!this.expanded))}getMaxConstValueCount(){return this.appService.config()?.maxConstValueCount??0}get hasOverflow(){return this.updateHasOverflow(),this.hasOverflowInternal}get hasMultipleLines(){return this.type!=="namespace"&&this.text.includes(` -`)}get iconName(){return this.expanded?"unfold_less":"unfold_more"}get hasBgColor(){return this.bgColor!=="transparent"}get namespaceComponents(){let t=this.text.split("/");return this.text!==""&&t.unshift(""),t}get formatQuantization(){return this.text.replace("[","").replace("]","").split(",").map(n=>n.trim()).join(` -`)}updateHasOverflow(){if(!this.oneLineText){this.hasOverflowInternal=!1;return}this.hasOverflowInternal=this.oneLineText.nativeElement.scrollWidth>this.oneLineText.nativeElement.offsetWidth,this.expanded&&(this.type==="namespace"||this.type==="values")&&(this.hasOverflowInternal=!0)}static \u0275fac=function(n){return new(n||i)(M(at),M(Ne))};static \u0275cmp=ce({type:i,selectors:[["expandable-info-text"]],viewQuery:function(n,r){if(n&1&&(Ee(Qfe,5),Ee(Kfe,5)),n&2){let o;be(o=ye())&&(r.container=o.first),be(o=ye())&&(r.oneLineText=o.first)}},hostVars:2,hostBindings:function(n,r){n&2&&re("expanded",r.hostExpanded)},inputs:{text:"text",type:"type",bgColor:"bgColor",textColor:"textColor"},standalone:!0,features:[dn,le],decls:13,vars:15,consts:[["container",""],["oneLineText",""],[1,"container",3,"click"],[1,"expanded-text"],[1,"monospace-content"],[1,"text-content"],[1,"one-line-text"],[1,"icon-container","toggle",3,"click"],[1,"info-msg"],["matTooltip","configurable in Settings in homepage","matTooltipPosition","above",1,"underline",3,"matTooltipShowDelay"],[1,"namespace-content"],[1,"namespace-row"],[1,"index"],[1,"namespace"]],template:function(n,r){if(n&1){let o=ne();v(0,"div",2,0),H("click",function(a){return B(o),V(r.handleToggleExpand(a,!0))}),v(2,"div",3),$(3,tme,4,2,"div",4)(4,ime,5,0)(5,rme,2,1,"div",4)(6,ome,2,1,"div",5),b(),v(7,"div",6,1),S(9),b(),v(10,"div",7),H("click",function(a){return B(o),V(r.handleToggleExpand(a))}),v(11,"mat-icon"),S(12),b()()()}n&2&&(Jt("background-color",r.bgColor)("color",r.textColor),re("has-bg-color",r.hasBgColor)("has-overflow",r.hasOverflow)("has-multiple-lines",r.hasMultipleLines)("expanded",r.expanded),w(3),oe(r.type==="values"?3:r.type==="namespace"?4:r.type==="quantization"?5:6),w(6),Se(" ",r.text," "),w(3),st(r.iconName))},dependencies:[Ae,tt,pt,Xt,Yn],styles:[`[_nghost-%COMP%]{overflow:hidden}.container[_ngcontent-%COMP%]{overflow:hidden;display:flex;align-items:flex-start;position:relative}.container.has-overflow[_ngcontent-%COMP%], .container.has-multiple-lines[_ngcontent-%COMP%]{cursor:pointer}.container.has-overflow[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%], .container.has-multiple-lines[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex}.container.has-overflow[_ngcontent-%COMP%]:hover .icon-container[_ngcontent-%COMP%], .container.has-multiple-lines[_ngcontent-%COMP%]:hover .icon-container[_ngcontent-%COMP%]{opacity:1}.container.has-bg-color[_ngcontent-%COMP%]{border-radius:4px;padding-left:4px}.container.expanded[_ngcontent-%COMP%] .one-line-text[_ngcontent-%COMP%]{position:absolute;inset:0;visibility:hidden}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%]{display:block;flex-grow:1;cursor:text}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .info-msg[_ngcontent-%COMP%]{margin-bottom:2px;color:#999;font-size:12px}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .info-msg[_ngcontent-%COMP%] .underline[_ngcontent-%COMP%]{text-decoration:underline dashed}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .monospace-content[_ngcontent-%COMP%]{font-size:11px;white-space:pre-wrap;font-family:monospace;max-height:500px;overflow:auto}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .text-content[_ngcontent-%COMP%]{white-space:pre-wrap;max-height:500px;overflow:auto}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .namespace-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .namespace-row[_ngcontent-%COMP%]{font-size:12px;line-height:14px;display:flex;align-items:flex-start}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .namespace-row[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{width:16px;color:#999;flex-shrink:0;line-height:14px}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .namespace-row[_ngcontent-%COMP%] .namespace[_ngcontent-%COMP%]{line-height:14px}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .namespace-row[_ngcontent-%COMP%] .namespace.hidden[_ngcontent-%COMP%]{color:#999}.container.expanded[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{background-color:#eee;border:1px solid #999}.container.expanded[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#999}.container[_ngcontent-%COMP%] .one-line-text[_ngcontent-%COMP%]{flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.container[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%]{display:none}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{width:12px;height:12px;flex-shrink:0;display:none;background-color:#d7f1ff;border-radius:2px;margin-left:2px;cursor:pointer;align-items:center;justify-content:center;border:1px solid #4e90b5;opacity:.75}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#00639b;font-size:11px;width:11px;height:11px;font-weight:700} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();var sme=["container"];function ame(i,e){if(i&1&&(v(0,"div",3),S(1),b()),i&2){let t=I();w(),Se(" ",t.label," ")}}var Mj=(()=>{class i{changeDetectorRef;label="";container;showPopup=!1;popupSize={minWidth:0,minHeight:0};popupPosition=[{originX:"end",originY:"top",overlayX:"end",overlayY:"top",offsetY:-1}];constructor(t){this.changeDetectorRef=t}ngAfterViewInit(){setTimeout(()=>{let t=this.container.nativeElement;this.showPopup=t.scrollWidth>t.offsetWidth,this.changeDetectorRef.markForCheck()})}static \u0275fac=function(n){return new(n||i)(M(Ne))};static \u0275cmp=ce({type:i,selectors:[["hoverable-label"]],viewQuery:function(n,r){if(n&1&&Ee(sme,5),n&2){let o;be(o=ye())&&(r.container=o.first)}},inputs:{label:"label"},standalone:!0,features:[le],decls:5,vars:6,consts:[["container",""],["popup",""],[1,"container",3,"bubble","overlaySize","overlayPositions","hoverDelayMs","bubbleDisabled"],[1,"model-explorer-hoverable-label-popup"]],template:function(n,r){if(n&1&&(v(0,"div",2,0),S(2),b(),$(3,ame,2,1,"ng-template",null,1,Tt)),n&2){let o=ve(4);R("bubble",o)("overlaySize",r.popupSize)("overlayPositions",r.popupPosition)("hoverDelayMs",10)("bubbleDisabled",!r.showPopup),w(2),Se(" ",r.label,` -`)}},dependencies:[Hn],styles:["[_nghost-%COMP%]{overflow:hidden}.container[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis} bubble-container:has(.model-explorer-hoverable-label-popup){width:100%;box-shadow:none;border:1px solid #ccc;border-radius:4px} .model-explorer-hoverable-label-popup{padding:2px;font-size:12px;line-height:12px;background-color:#fff;color:#999;font-family:Google Sans Text,Arial,Helvetica,sans-serif}"],changeDetection:0})}return i})();var uf=(()=>{class i{curSortingRunIndex=-2;curSortingDirection="asc";curChildrenStatSortingColIndex=-2;curChildrenStatSortingDirection="asc";statsTableCollapsed=!1;childrenStatsTableCollapsed=!1;nodeDataTableCollapsed=!1;collapsedSectionNames=new Set;static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var cme=["paginator"],lme=["childrenStatsPaginator"],Ij=i=>({$implicit:i});function dme(i,e){if(i&1&&(v(0,"div",28),S(1),b()),i&2){let t=I().index;w(),st(t+1)}}function ume(i,e){i&1&&ee(0,"mat-spinner",29)}function hme(i,e){if(i&1&&(v(0,"div",30)(1,"mat-icon"),S(2,"error"),b()()),i&2){let t=I().$implicit;R("matTooltip",t.error)("matTooltipDisabled",!t.error)}}function pme(i,e){if(i&1){let t=ne();v(0,"div",31),H("click",function(r){B(t);let o=I().$implicit,s=I();return V(s.handleClickToggleVisibility(o,r))}),v(1,"mat-icon"),S(2),b()()}if(i&2){let t=I().$implicit,n=I();re("selected",n.isRunItemSelected(t))("hide",!t.done),R("matTooltip",n.getVisibleToggleTooltip(t)),w(2),st(n.getIconName(t))}}function fme(i,e){if(i&1){let t=ne();v(0,"div",32),H("click",function(){B(t);let r=I().$implicit,o=I();return V(o.handleClickDelete(r))}),v(1,"mat-icon"),S(2,"delete"),b()()}i&2&&R("matTooltip","Delete")}function mme(i,e){if(i&1&&(v(0,"div",19)(1,"div",20),$(2,dme,2,1,"div",21)(3,ume,1,0,"mat-spinner",22),b(),v(4,"div",23),S(5),b(),v(6,"div",24),$(7,hme,3,2,"div",25)(8,pme,3,6,"div",26)(9,fme,3,1,"div",27),b()()),i&2){let t=e.$implicit,n=I();re("selected",n.isRunItemSelected(t)),w(2),R("ngIf",t.done),w(),R("ngIf",!t.done),w(2),st(t.runName),w(2),R("ngIf",t.error),w(),R("ngIf",!t.error),w(),R("ngIf",t.done)}}function gme(i,e){if(i&1&&(v(0,"th",37)(1,"div",38)(2,"div",28),S(3),b(),v(4,"div",39),S(5),b()()()),i&2){let t=e.$implicit,n=e.index;w(3),st(n+1),w(2),st(t.runName)}}function _me(i,e){if(i&1&&(v(0,"td",37),S(1),b()),i&2){let t=e.$implicit,n=I(3);w(),Se(" ",n.getStatValue(t)," ")}}function vme(i,e){if(i&1&&(v(0,"tr")(1,"td"),S(2),b(),$(3,_me,2,1,"td",35),b()),i&2){let t=e.$implicit;w(2),st(t.stat),w(),R("ngForOf",t.values)}}function bme(i,e){if(i&1&&(v(0,"table",33)(1,"thead")(2,"tr")(3,"th",34),S(4," Stat "),b(),$(5,gme,6,2,"th",35),b()(),v(6,"tbody"),$(7,vme,4,2,"tr",36),b()()),i&2){let t=I();w(5),R("ngForOf",t.runItems),w(2),R("ngForOf",t.curStatRows)("ngForTrackBy",t.trackByStat)}}function yme(i,e){if(i&1){let t=ne();v(0,"paginator",40,4),H("change",function(r){B(t);let o=I();return V(o.handleChildrenStatsTablePaginatorChanged(r))}),b()}if(i&2){let t=I();R("pageSize",t.tablePageSize)("itemsCount",t.childrenStatRowsCount)}}function xme(i,e){i&1&&Ki(0)}function wme(i,e){if(i&1&&(v(0,"mat-icon",46),S(1),b()),i&2){let t=I(2);w(),Se(" ",t.curChildrenStatSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function Cme(i,e){if(i&1&&(v(0,"mat-icon",46),S(1),b()),i&2){let t=I(2);w(),Se(" ",t.curChildrenStatSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function Sme(i,e){if(i&1&&(v(0,"mat-icon",46),S(1),b()),i&2){let t=I(3);w(),Se(" ",t.curChildrenStatSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function Mme(i,e){if(i&1){let t=ne();v(0,"th",47),H("click",function(){let r=B(t).$implicit,o=I(2);return V(o.handleClickChildrenStatsHeader(r.colIndex))}),v(1,"div",38)(2,"div",28),S(3),b(),v(4,"div",39),S(5),b(),$(6,Sme,2,1,"mat-icon",43),b()()}if(i&2){let t=e.$implicit,n=I(2);w(3),st(t.runIndex+1),w(2),st(t.label),w(),R("ngIf",t.colIndex===n.curChildrenStatSortingColIndex)}}function Eme(i,e){if(i&1&&(v(0,"td",37),S(1),b()),i&2){let t=e.$implicit;w(),Se(" ",t," ")}}function Ime(i,e){if(i&1){let t=ne();v(0,"tr")(1,"td"),S(2),b(),v(3,"td",48),H("click",function(){let r=B(t).$implicit,o=I(2);return V(o.handleClickNodeLabel(r.id))}),S(4),b(),$(5,Eme,2,1,"td",35),b()}if(i&2){let t=e.$implicit;w(2),st(t.index),w(2),Se(" ",t.label," "),w(),R("ngForOf",t.colStrs)}}function Tme(i,e){if(i&1){let t=ne();v(0,"table",41)(1,"thead")(2,"tr")(3,"th",42),H("click",function(){B(t);let r=I();return V(r.handleClickChildrenStatsHeader(-2))}),v(4,"div",38),S(5," # "),$(6,wme,2,1,"mat-icon",43),b()(),v(7,"th",44),H("click",function(){B(t);let r=I();return V(r.handleClickChildrenStatsHeader(-1))}),v(8,"div",38),S(9," Node "),$(10,Cme,2,1,"mat-icon",43),b()(),$(11,Mme,7,3,"th",45),b()(),v(12,"tbody"),$(13,Ime,6,3,"tr",36),b()()}if(i&2){let t=I();w(6),R("ngIf",t.curChildrenStatSortingColIndex===-2),w(4),R("ngIf",t.curChildrenStatSortingColIndex===-1),w(),R("ngForOf",t.childrenStatsCols),w(2),R("ngForOf",t.curPageChildrenStatRows)("ngForTrackBy",t.trackByNodeId)}}function Dme(i,e){if(i&1){let t=ne();v(0,"paginator",40,5),H("change",function(r){B(t);let o=I();return V(o.handleTablePaginatorChanged(r))}),b()}if(i&2){let t=I();R("pageSize",t.tablePageSize)("itemsCount",t.rowsCount)}}function Pme(i,e){i&1&&Ki(0)}function Ome(i,e){if(i&1&&(v(0,"mat-icon",46),S(1),b()),i&2){let t=I(2);w(),Se(" ",t.curSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function Rme(i,e){if(i&1&&(v(0,"mat-icon",46),S(1),b()),i&2){let t=I(2);w(),Se(" ",t.curSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function Ame(i,e){if(i&1){let t=ne();v(0,"div",51),H("click",function(r){B(t);let o=I().$implicit,s=I(2);return V(s.handleClickToggleVisibility(o,r))}),v(1,"mat-icon"),S(2),b()()}if(i&2){let t=I().$implicit,n=I(2);re("selected",n.isRunItemSelected(t))("hide",!t.done),R("matTooltip",n.getVisibleToggleTooltip(t)),w(2),st(n.getIconName(t))}}function Nme(i,e){if(i&1&&(v(0,"mat-icon",46),S(1),b()),i&2){let t=I(3);w(),Se(" ",t.curSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function kme(i,e){if(i&1){let t=ne();v(0,"th",47),H("click",function(){let r=B(t).index,o=I(2);return V(o.handleClickHeader(r))}),v(1,"div",38)(2,"div",28),S(3),b(),v(4,"div",39),S(5),b(),$(6,Ame,3,6,"div",50)(7,Nme,2,1,"mat-icon",43),b()()}if(i&2){let t=e.$implicit,n=e.index,r=I(2);w(3),st(n+1),w(2),st(t.runName),w(),R("ngIf",!t.error),w(),R("ngIf",n===r.curSortingRunIndex)}}function Lme(i,e){if(i&1&&(v(0,"td",37),S(1),b()),i&2){let t=e.$implicit;Jt("background-color",t.bgColor)("color",t.textColor),w(),Se(" ",t.strValue," ")}}function Fme(i,e){if(i&1){let t=ne();v(0,"tr")(1,"td"),S(2),b(),v(3,"td",48),H("click",function(){let r=B(t).$implicit,o=I(2);return V(o.handleClickNodeLabel(r.id))}),S(4),b(),$(5,Lme,2,5,"td",52),b()}if(i&2){let t=e.$implicit;w(2),st(t.index),w(),re("input",t.isInput)("output",t.isOutput),w(),Se(" ",t.label," "),w(),R("ngForOf",t.cols)}}function Bme(i,e){if(i&1){let t=ne();v(0,"table",49)(1,"thead")(2,"tr")(3,"th",42),H("click",function(){B(t);let r=I();return V(r.handleClickHeader(-2))}),v(4,"div",38),S(5," # "),$(6,Ome,2,1,"mat-icon",43),b()(),v(7,"th",44),H("click",function(){B(t);let r=I();return V(r.handleClickHeader(-1))}),v(8,"div",38),S(9," Node "),$(10,Rme,2,1,"mat-icon",43),b()(),$(11,kme,8,4,"th",45),b()(),v(12,"tbody"),$(13,Fme,6,7,"tr",36),b()()}if(i&2){let t=I();w(6),R("ngIf",t.curSortingRunIndex===-2),w(4),R("ngIf",t.curSortingRunIndex===-1),w(),R("ngForOf",t.runItems),w(2),R("ngForOf",t.curPageRows)("ngForTrackBy",t.trackByNodeId)}}function Vme(i,e){if(i&1){let t=ne();v(0,"div",57),H("click",function(){B(t);let r=I().$implicit,o=I();return V(o.handleClearStatsTableFilter(r))}),v(1,"mat-icon",58),S(2,"close"),b()()}}function zme(i,e){if(i&1&&(v(0,"div",53),ee(1,"input",54),v(2,"mat-icon",55),S(3,"filter_alt"),b(),$(4,Vme,3,0,"div",56),b()),i&2){let t=e.$implicit;w(),R("formControl",t),w(3),oe(t.value?4:-1)}}var Ume=["Sum %"],Tj=(()=>{class i{appService;destroyRef;infoPanelService;nodeDataProviderExtensionService;changeDetectorRef;paneId;rootGroupNodeId;paginator;childrenStatsPaginator;childrenStatsTableNodeFilter=new vr("");resultsTableNodeFilter=new vr("");curRows;curPageRows=[];savedCurRows;curStatRows=[];curChildrenStatRows=[];curPageChildrenStatRows=[];savedChildrenStatRows=[];runItems=[];curSelectedRunId="";orderedNodes=[];childrenStatsCols=[];tablePageSize=50;curModelGraph;prevModelGraph;prevRunsKey="";orderedNodesCache={};constructor(t,n,r,o,s){this.appService=t,this.destroyRef=n,this.infoPanelService=r,this.nodeDataProviderExtensionService=o,this.changeDetectorRef=s;let a=new URLSearchParams(document.location.search);a.has("nodeDataProviderDataSummaryTablePageSize")&&(this.tablePageSize=Number(a.get("nodeDataProviderDataSummaryTablePageSize"))),lt(()=>{let c=this.appService.getPaneById(this.paneId)?.modelGraph;if(!c)return;let l=this.nodeDataProviderExtensionService.getSelectedRunForModelGraph(this.paneId,c);this.curSelectedRunId=l?.runId||"",this.changeDetectorRef.markForCheck()}),lt(()=>{this.curModelGraph=this.appService.getPaneById(this.paneId)?.modelGraph;let c=this.curModelGraph?this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph):[],l=!1,d=!1;this.prevModelGraph!==this.curModelGraph&&(this.prevModelGraph=this.curModelGraph,l=!0);let u=this.getRunsKey(c);if(this.prevRunsKey!==u&&(this.prevRunsKey=u,d=!0),this.curModelGraph&&(l||d)){this.runItems=[];let h=this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph);for(let p of h)this.runItems.push({runId:p.runId,runName:p.runName,done:p.done,error:p.error});this.changeDetectorRef.markForCheck(),this.infoPanelService.curSortingRunIndex=Math.min(this.infoPanelService.curSortingRunIndex,h.length-1),this.paginator?.reset(),this.genOrderedNodes(),this.populateResultsTable(),this.infoPanelService.curChildrenStatSortingColIndex=Math.min(this.infoPanelService.curChildrenStatSortingColIndex,this.childrenStatsCols.length-1),this.childrenStatsPaginator?.reset()}}),this.childrenStatsTableNodeFilter.valueChanges.pipe(Oo(150),Ei(this.destroyRef)).subscribe(c=>{this.handleChildrenStatsTableFilterChanged()}),this.resultsTableNodeFilter.valueChanges.pipe(Oo(150),Ei(this.destroyRef)).subscribe(c=>{this.handleResultsTableFilterChanged()})}ngOnChanges(t){t.rootGroupNodeId&&(this.paginator?.reset(),this.childrenStatsPaginator?.reset(),this.genOrderedNodes(),this.populateResultsTable())}getIconName(t){return this.isRunItemSelected(t)?"visibility":"visibility_off"}getVisibleToggleTooltip(t){return this.isRunItemSelected(t)?"Visualizing in graph":"Click to visualize in graph"}isRunItemSelected(t){return t.runId===this.curSelectedRunId}handleChildrenStatsTablePaginatorChanged(t){this.curPageChildrenStatRows=this.curChildrenStatRows.slice(t*this.tablePageSize,(t+1)*this.tablePageSize),this.changeDetectorRef.markForCheck()}handleTablePaginatorChanged(t){this.curRows==null?this.curPageRows=[]:this.curPageRows=this.curRows.slice(t*this.tablePageSize,(t+1)*this.tablePageSize),this.changeDetectorRef.markForCheck()}handleClickHeader(t){this.infoPanelService.curSortingRunIndex===t?this.infoPanelService.curSortingDirection=this.nextSortingDirection(this.curSortingDirection):this.infoPanelService.curSortingDirection=t<0?"asc":"desc",this.infoPanelService.curSortingRunIndex=t,this.sortAndFiltertRows(),this.paginator?.reset(),this.handleTablePaginatorChanged(0)}handleClickChildrenStatsHeader(t){this.infoPanelService.curChildrenStatSortingColIndex===t?this.infoPanelService.curChildrenStatSortingDirection=this.nextSortingDirection(this.infoPanelService.curChildrenStatSortingDirection):this.infoPanelService.curChildrenStatSortingDirection=t<0?"asc":"desc",this.infoPanelService.curChildrenStatSortingColIndex=t,this.sortAndFilterChildrenStatsRows(),this.childrenStatsPaginator?.reset(),this.handleChildrenStatsTablePaginatorChanged(0)}handleClickToggleVisibility(t,n){n.stopPropagation(),!this.isRunItemSelected(t)&&this.appService.setSelectedNodeDataProviderRunId(this.paneId,t.runId)}handleClickDelete(t){this.curModelGraph&&(this.nodeDataProviderExtensionService.deleteRun(t.runId),this.appService.deleteShowOnNodeItemType([`${La}${t.runName}`]))}handleClickNodeLabel(t){this.appService.curToLocateNodeInfo.set({nodeId:t,rendererId:this.paneId,isGroupNode:!1})}handleToggleExpandCollapseStatsTable(t){this.infoPanelService.statsTableCollapsed?t.style.maxHeight=`${t.scrollHeight}px`:t.style.maxHeight=`${t.offsetHeight}px`,this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.infoPanelService.statsTableCollapsed=!this.infoPanelService.statsTableCollapsed,this.changeDetectorRef.markForCheck(),this.infoPanelService.statsTableCollapsed||setTimeout(()=>{t.style.maxHeight="fit-content"},150)})}handleToggleExpandCollapseChildrenStatsTable(t){this.infoPanelService.childrenStatsTableCollapsed?t.style.maxHeight=`${t.scrollHeight}px`:t.style.maxHeight=`${t.offsetHeight}px`,this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.infoPanelService.childrenStatsTableCollapsed=!this.infoPanelService.childrenStatsTableCollapsed,this.changeDetectorRef.markForCheck(),this.infoPanelService.childrenStatsTableCollapsed||setTimeout(()=>{t.style.maxHeight="fit-content"},150)})}handleToggleExpandCollapseNodeDataTable(t){this.infoPanelService.nodeDataTableCollapsed?t.style.maxHeight=`${t.scrollHeight}px`:t.style.maxHeight=`${t.offsetHeight}px`,this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.infoPanelService.nodeDataTableCollapsed=!this.infoPanelService.nodeDataTableCollapsed,this.changeDetectorRef.markForCheck(),this.infoPanelService.nodeDataTableCollapsed||setTimeout(()=>{t.style.maxHeight="fit-content"},150)})}handleChildrenStatsTableFilterChanged(){this.childrenStatsPaginator?.reset(),this.sortAndFilterChildrenStatsRows(),this.handleChildrenStatsTablePaginatorChanged(0)}handleResultsTableFilterChanged(){this.paginator?.reset(),this.sortAndFiltertRows(),this.handleTablePaginatorChanged(0)}handleClearStatsTableFilter(t){t===this.childrenStatsTableNodeFilter?this.childrenStatsPaginator?.reset():t===this.resultsTableNodeFilter&&this.paginator?.reset(),t.reset()}getStatValue(t){return t===Number.POSITIVE_INFINITY||t===Number.NEGATIVE_INFINITY||isNaN(t)?"-":`${t}`}trackByRunId(t,n){return n.runId}trackByNodeId(t,n){return n.id}trackByStat(t,n){return n.stat}get showResults(){return this.runItems.some(t=>t.done)}get rowsCount(){return this.curRows==null?0:this.curRows.length}get childrenStatRowsCount(){return this.curChildrenStatRows.length}get statsTableTitleIcon(){return this.statsTableCollapsed?"arrow_right":"arrow_drop_down"}get statsTableTitle(){return this.rootGroupNodeId==null?"Aggregated stats":"Aggregated stats in selected layer"}get statsTableCollapsed(){return this.infoPanelService.statsTableCollapsed}get childrenStatsTableTitleIcon(){return this.childrenStatsTableCollapsed?"arrow_right":"arrow_drop_down"}get childrenStatsTableTitle(){return this.rootGroupNodeId==null?"Root-level nodes stats":"Child nodes stats in selected layer"}get childrenStatsTableCollapsed(){return this.infoPanelService.childrenStatsTableCollapsed}get nodeDataTableTitleIcon(){return this.nodeDataTableCollapsed?"arrow_right":"arrow_drop_down"}get nodeDataTableTitle(){return this.rootGroupNodeId==null?"Node data":"Node data in selected layer"}get nodeDataTableCollapsed(){return this.infoPanelService.nodeDataTableCollapsed}get curSortingDirection(){return this.infoPanelService.curSortingDirection}get curSortingRunIndex(){return this.infoPanelService.curSortingRunIndex}get curChildrenStatSortingDirection(){return this.infoPanelService.curChildrenStatSortingDirection}get curChildrenStatSortingColIndex(){return this.infoPanelService.curChildrenStatSortingColIndex}genOrderedNodes(){if(!this.curModelGraph)return;let t=this.getOrderedNodesCacheKey(),n=this.orderedNodesCache[t];if(n!=null)this.orderedNodes=n;else{let r=this.rootGroupNodeId==null?void 0:this.curModelGraph.nodesById[this.rootGroupNodeId],o=new Set;r!=null&&(o=new Set(r.descendantsOpNodeIds||[])),this.orderedNodes=this.curModelGraph.nodes.filter(s=>St(s)&&!s.hideInLayout&&s.id!=="GraphInputs"&&s.id!=="GraphOutputs"&&(r==null||o.has(s.id))),this.orderedNodesCache[t]=this.orderedNodes}}populateResultsTable(){if(!this.curModelGraph||this.orderedNodes.length===0)return;let t=this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph);this.curStatRows=[{stat:"Min",values:[]},{stat:"Max",values:[]},{stat:"Sum",values:[]},{stat:"Avg",values:[]}];let n=[];for(let s=0;sf.sourceNodeId==="GraphInputs"),h=a.outgoingEdges||[],p=h.length===0||h.some(f=>f.targetNodeId==="GraphOutputs");this.curRows.push({id:c,index:s,isInput:u,isOutput:p,label:this.curModelGraph.nodesById[c].label||"?",cols:l})}this.savedCurRows=[...this.curRows],this.sortAndFiltertRows(),this.handleTablePaginatorChanged(0),this.curStatRows[0].values=n.map(s=>s.min),this.curStatRows[1].values=n.map(s=>s.max),this.curStatRows[2].values=n.map(s=>s.sum),this.curStatRows[3].values=n.map(s=>s.sum/s.count),this.childrenStatsCols=[];let r=0;for(let s=0;ss.id);for(let s=0;sn.test(r.label))}catch{return}this.curRows.sort((n,r)=>{let o=this.getCellValue(n,this.infoPanelService.curSortingRunIndex),s=this.getCellValue(r,this.infoPanelService.curSortingRunIndex);return this.compareValue(o,s,this.infoPanelService.curSortingDirection)})}sortAndFilterChildrenStatsRows(){this.curChildrenStatRows=[...this.savedChildrenStatRows||[]];let t=(this.childrenStatsTableNodeFilter.value||"").trim();if(t!=="")try{let n=new RegExp(t,"i");this.curChildrenStatRows=this.curChildrenStatRows.filter(r=>n.test(r.label))}catch{return}this.curChildrenStatRows.sort((n,r)=>{let o=this.getChildrenStatsColValue(n,this.infoPanelService.curChildrenStatSortingColIndex),s=this.getChildrenStatsColValue(r,this.infoPanelService.curChildrenStatSortingColIndex);return this.compareValue(o,s,this.infoPanelService.curChildrenStatSortingDirection)})}compareValue(t,n,r){if(t==null&&n==null)return 0;if(t==null&&n!=null)return r==="asc"?-1:1;if(t!=null&&n==null)return r==="asc"?1:-1;if(typeof t=="number"&&typeof n=="number")return r==="asc"?t-n:n-t;{let o=JSON.stringify(t),s=JSON.stringify(n);return r==="asc"?o.localeCompare(s):s.localeCompare(o)}}getCellValue(t,n){switch(n){case-2:return t.index;case-1:return t.label;default:return t.cols[n].value}}getChildrenStatsColValue(t,n){switch(n){case-2:return t.index;case-1:return t.label;default:return t.colValues[n]}}getOrderedNodesCacheKey(){return`${this.curModelGraph?.collectionLabel}___${this.curModelGraph?.id}___${this.rootGroupNodeId}`}getRunsKey(t){return t.map(n=>{let r=[];r.push(n.runId),r.push(String(n.done));let o=n.results||{};return r.push(String(Object.keys(o).length)),r.join("__")}).join(",")}static \u0275fac=function(n){return new(n||i)(M(at),M(Fi),M(uf),M(Mr),M(Ne))};static \u0275cmp=ce({type:i,selectors:[["node-data-provider-summary-panel"]],viewQuery:function(n,r){if(n&1&&(Ee(cme,5),Ee(lme,5)),n&2){let o;be(o=ye())&&(r.paginator=o.first),be(o=ye())&&(r.childrenStatsPaginator=o.first)}},inputs:{paneId:"paneId",rootGroupNodeId:"rootGroupNodeId"},standalone:!0,features:[dn,le],decls:33,vars:27,consts:[["statsTableContainer",""],["childrenStatsTableContainer",""],["nodeDataTableContainer",""],["nodeFilter",""],["childrenStatsPaginator",""],["paginator",""],[1,"container"],[1,"index-container"],["class","index-row",3,"selected",4,"ngFor","ngForOf","ngForTrackBy"],[1,"table-container"],[1,"table-title-container"],[1,"title-label-container",3,"click"],["border","0","cellspacing","0","cellpadding","0",4,"ngIf"],[1,"table-container","children-stats"],[3,"pageSize","itemsCount"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","children-stats-results","border","0","cellspacing","0","cellpadding","0",4,"ngIf"],[1,"table-container","results"],["class","results","border","0","cellspacing","0","cellpadding","0",4,"ngIf"],[1,"index-row"],[1,"index-number-container"],["class","index-number",4,"ngIf"],["color","primary","diameter","16",4,"ngIf"],[1,"run-name"],[1,"action-icons-container"],["class","error",3,"matTooltip","matTooltipDisabled",4,"ngIf"],["class","icon-container visibility",3,"selected","hide","matTooltip","click",4,"ngIf"],["class","icon-container action",3,"matTooltip","click",4,"ngIf"],[1,"index-number"],["color","primary","diameter","16"],[1,"error",3,"matTooltip","matTooltipDisabled"],[1,"icon-container","visibility",3,"click","matTooltip"],[1,"icon-container","action",3,"click","matTooltip"],["border","0","cellspacing","0","cellpadding","0"],[1,"stats"],["class","value-col",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"value-col"],[1,"header-content"],[1,"stat-label"],[3,"change","pageSize","itemsCount"],["border","0","cellspacing","0","cellpadding","0",1,"children-stats-results"],[1,"index",3,"click"],["class","sort",4,"ngIf"],[1,"header","node-label",3,"click"],["class","value-col",3,"click",4,"ngFor","ngForOf"],[1,"sort"],[1,"value-col",3,"click"],[1,"node-label",3,"click"],["border","0","cellspacing","0","cellpadding","0",1,"results"],["class","icon-container visibility","matTooltipPosition","above",3,"selected","hide","matTooltip","click",4,"ngIf"],["matTooltipPosition","above",1,"icon-container","visibility",3,"click","matTooltip"],["class","value-col",3,"background-color","color",4,"ngFor","ngForOf"],[1,"node-filter"],["placeholder","regex to filter nodes",3,"formControl"],[1,"filter"],[1,"clear-container"],[1,"clear-container",3,"click"],[1,"clear"]],template:function(n,r){if(n&1){let o=ne();v(0,"div",6)(1,"div",7),$(2,mme,10,8,"div",8),b(),v(3,"div",9,0)(5,"div",10)(6,"div",11),H("click",function(){B(o);let a=ve(4);return V(r.handleToggleExpandCollapseStatsTable(a))}),v(7,"mat-icon"),S(8),b(),S(9),b()(),$(10,bme,8,3,"table",12),b(),v(11,"div",13,1)(13,"div",10)(14,"div",11),H("click",function(){B(o);let a=ve(12);return V(r.handleToggleExpandCollapseChildrenStatsTable(a))}),v(15,"mat-icon"),S(16),b(),S(17),b(),$(18,yme,2,2,"paginator",14),b(),$(19,xme,1,0,"ng-container",15)(20,Tme,14,5,"table",16),b(),v(21,"div",17,2)(23,"div",10)(24,"div",11),H("click",function(){B(o);let a=ve(22);return V(r.handleToggleExpandCollapseNodeDataTable(a))}),v(25,"mat-icon"),S(26),b(),S(27),b(),$(28,Dme,2,2,"paginator",14),b(),$(29,Pme,1,0,"ng-container",15)(30,Bme,14,5,"table",18),b()(),$(31,zme,5,2,"ng-template",null,3,Tt)}if(n&2){let o=ve(32);w(2),R("ngForOf",r.runItems)("ngForTrackBy",r.trackByRunId),w(),re("collapsed",r.statsTableCollapsed),w(5),st(r.statsTableTitleIcon),w(),Se(" ",r.statsTableTitle," "),w(),R("ngIf",r.showResults),w(),re("collapsed",r.childrenStatsTableCollapsed),w(5),st(r.childrenStatsTableTitleIcon),w(),Se(" ",r.childrenStatsTableTitle," "),w(),oe(r.childrenStatRowsCount>r.tablePageSize&&!r.childrenStatsTableCollapsed?18:-1),w(),R("ngTemplateOutlet",o)("ngTemplateOutletContext",Ac(23,Ij,r.childrenStatsTableNodeFilter)),w(),R("ngIf",r.showResults),w(),re("collapsed",r.nodeDataTableCollapsed),w(5),st(r.nodeDataTableTitleIcon),w(),Se(" ",r.nodeDataTableTitle," "),w(),oe(r.rowsCount>r.tablePageSize&&!r.nodeDataTableCollapsed?28:-1),w(),R("ngTemplateOutlet",o)("ngTemplateOutletContext",Ac(25,Ij,r.resultsTableNodeFilter)),w(),R("ngIf",r.showResults)}},dependencies:[Ae,Mi,Tn,Gs,tt,pt,ao,fa,Xt,Yn,df,br,Xs,Ho,vo],styles:[`.container[_ngcontent-%COMP%]{padding-top:12px;box-sizing:border-box;display:flex;flex-direction:column;height:100%}.container[_ngcontent-%COMP%] .index-number[_ngcontent-%COMP%]{font-size:10px;width:16px;height:16px;border-radius:8px;box-sizing:border-box;border:1px solid #999;background-color:#eee;display:flex;align-items:center;justify-content:center;flex-shrink:0}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%]{margin-bottom:4px;position:relative}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%;border:1px solid #ccc;padding:3px 4px 3px 19px;border-radius:4px;box-sizing:border-box}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:12px;width:12px;height:12px;color:#999}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%] mat-icon.filter[_ngcontent-%COMP%]{position:absolute;top:6px;left:3px}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%] .clear-container[_ngcontent-%COMP%]{position:absolute;top:6px;right:3px;cursor:pointer;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%] .clear-container[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{color:#555}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:16px;height:16px;opacity:.3;cursor:pointer}.container[_ngcontent-%COMP%] .icon-container.selected[_ngcontent-%COMP%]{opacity:1;cursor:default}.container[_ngcontent-%COMP%] .icon-container.selected[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#e1a011}.container[_ngcontent-%COMP%] .icon-container.hide[_ngcontent-%COMP%]{visibility:hidden}.container[_ngcontent-%COMP%] .icon-container.action[_ngcontent-%COMP%]{opacity:.7;margin-left:4px}.container[_ngcontent-%COMP%] .icon-container.action[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .icon-container.visibility[_ngcontent-%COMP%]{margin-left:4px}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;line-height:16px;color:#000}.container[_ngcontent-%COMP%] .index-container[_ngcontent-%COMP%] .index-row[_ngcontent-%COMP%]{display:flex;align-items:center;overflow:hidden;padding:2px 8px}.container[_ngcontent-%COMP%] .index-container[_ngcontent-%COMP%] .index-row.selected[_ngcontent-%COMP%]{background-color:#fff2d5}.container[_ngcontent-%COMP%] .index-container[_ngcontent-%COMP%] .index-row[_ngcontent-%COMP%] .index-number-container[_ngcontent-%COMP%]{width:16px;height:16px;flex-shrink:0;display:flex;align-items:center;justify-content:center;margin-right:6px}.container[_ngcontent-%COMP%] .index-container[_ngcontent-%COMP%] .index-row[_ngcontent-%COMP%] .run-name[_ngcontent-%COMP%]{flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.container[_ngcontent-%COMP%] .index-container[_ngcontent-%COMP%] .index-row[_ngcontent-%COMP%] .action-icons-container[_ngcontent-%COMP%]{display:flex;align-items:center;flex-shrink:0}.container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%] .running[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:16px}.container[_ngcontent-%COMP%] .running[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{margin-right:4px}.container[_ngcontent-%COMP%] .running[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:#777}.container[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{width:16px;height:16px}.container[_ngcontent-%COMP%] .error[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;height:16px;width:16px;color:#a00}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:8px;margin-top:2px;display:flex;flex-direction:column;transition:max-height .15s ease-out;overflow:hidden}.container[_ngcontent-%COMP%] .table-container.collapsed[_ngcontent-%COMP%]{max-height:30px!important}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .table-title-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;line-height:22px}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .table-title-container[_ngcontent-%COMP%] .title-label-container[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;line-height:15px}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .table-title-container[_ngcontent-%COMP%] .title-label-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-left:-4px}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] paginator[_ngcontent-%COMP%]{align-self:flex-end}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid #ccc;border-radius:4px;width:100%;box-sizing:border-box;-webkit-user-select:none;user-select:none;background-color:#fdfdfd;overflow:hidden}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{height:24px;background-color:#f2f2f2;font-size:11px}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{font-size:11px;font-family:Arial,Helvetica,sans-serif}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{outline:1px solid #999}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:1px 4px;text-align:left}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.node-label[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th.node-label[_ngcontent-%COMP%]{border-left:1px solid #ddd}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.value-col[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th.value-col[_ngcontent-%COMP%]{border-left:1px solid #ddd;max-width:80px;text-overflow:ellipsis;overflow:hidden}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;font-size:11px}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%] mat-icon.sort[_ngcontent-%COMP%]{font-size:12px;width:12px;height:12px;color:#999;margin-left:4px;flex-shrink:0}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%] .stat-label[_ngcontent-%COMP%]{margin-left:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.node-label[_ngcontent-%COMP%]{cursor:pointer}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.node-label[_ngcontent-%COMP%]:hover{text-decoration:underline dotted #0085f2}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.input[_ngcontent-%COMP%]{color:#009e73;font-weight:500}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.output[_ngcontent-%COMP%]{color:#d55e00;font-weight:500} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();var Hme=["inputValueContent"],Gme=(i,e)=>e.id||e.label,jme=(i,e)=>e.opNode.id,Pj=(i,e)=>e.key,Wme=(i,e)=>e.outputId,$me=(i,e)=>e.id,qme=i=>({value:i});function Yme(i,e){if(i&1&&(v(0,"tr")(1,"td",21),ee(2,"hoverable-label",22),b(),v(3,"td",23),ee(4,"expandable-info-text",24),b()()),i&2){let t=e.$implicit,n=I(2);re("search-match",n.isSearchMatchedAttrId(t.label)),w(2),R("label",t.label),w(2),R("text",t.value)("type",t.label)("bgColor",t.bgColor||"transparent")("textColor",t.textColor||"black")}}function Xme(i,e){if(i&1){let t=ne();v(0,"div",15,1)(2,"div",16)(3,"button",17),H("click",function(){let r=B(t).$implicit,o=ve(1),s=I();return V(s.handleToggleSection(r.label,o))}),v(4,"mat-icon"),S(5),b()(),S(6),b(),v(7,"div",18)(8,"table",19),rn(9,Yme,5,7,"tr",20,Gme),b()()()}if(i&2){let t=e.$implicit,n=I();re("collapsed",n.isSectionCollapsed(t.label)),w(5),st(n.getSectionToggleIcon(t.label)),w(),Se(" ",t.label," "),w(3),on(t.items)}}function Zme(i,e){if(i&1){let t=ne();v(0,"div",15,2)(2,"div",16)(3,"button",17),H("click",function(){B(t);let r=ve(1),o=I();return V(o.handleToggleSection(o.SectionLabel.NODE_DATA_PROVIDERS,r))}),v(4,"mat-icon"),S(5),b()(),S(6," Node data providers "),b(),ee(7,"node-data-provider-summary-panel",25),b()}if(i&2){let t=I();re("collapsed",t.isSectionCollapsed(t.SectionLabel.NODE_DATA_PROVIDERS)),w(5),st(t.getSectionToggleIcon(t.SectionLabel.NODE_DATA_PROVIDERS)),w(2),R("paneId",t.paneId)("rootGroupNodeId",t.curSelectedNodeId)}}function Qme(i,e){if(i&1){let t=ne();v(0,"paginator",32),H("change",function(r){B(t);let o=I(2);return V(o.handleInputPaginatorChanged(r))}),b()}if(i&2){let t=I(2);R("pageSize",t.ioPageSize)("itemsCount",t.curInputsCount)}}function Kme(i,e){if(i&1&&(v(0,"div",35),S(1),b()),i&2){let t=I().$implicit,n=I(2);w(),st(n.getInputName(t))}}function Jme(i,e){if(i&1){let t=ne();v(0,"div",43),H("click",function(r){B(t);let o=I(2).$implicit,s=I(2);return V(s.handleToggleInputOpNodeVisibility(o.opNode.id,s.flatInputItems,r))}),v(1,"mat-icon"),S(2),b()()}if(i&2){let t=I(2).$implicit,n=I(2);re("visible",n.getInputOpNodeToggleVisible(t.opNode.id)),R("matTooltip",n.getInputOpNodeToggleVisibilityTooltip(t.opNode.id)),w(2),Se(" ",n.getInputOpNodeToggleVisibilityIcon(t.opNode.id)," ")}}function ege(i,e){if(i&1){let t=ne();v(0,"div",38),H("click",function(r){B(t);let o=I().$implicit,s=I(2);return V(s.handleLocateNode(o.opNode.id,r))}),S(1),v(2,"div",39)(3,"mat-icon",40),S(4,"my_location"),b()(),ee(5,"div",41),$(6,Jme,3,4,"div",42),b()}if(i&2){let t=I().$implicit,n=I(2);Ye("data-id",t.opNode.id),w(),Se(" ",n.getInputName(t)," "),w(),R("matTooltip",n.locatorTooltip),w(4),oe(t.opNode.hideInLayout?-1:6)}}function tge(i,e){if(i&1&&(v(0,"tr",null,4)(2,"td",21)(3,"div",44)(4,"mat-icon",45),S(5,"circle"),b(),ee(6,"hoverable-label",22),b()(),v(7,"td",23),ee(8,"expandable-info-text",46),b()()),i&2){let t=I().$implicit,n=I(3);re("search-match",n.isSearchMatchedInputValue(t.value)),w(6),R("label",t.key),w(2),R("text",t.value)("type",t.key)}}function nge(i,e){if(i&1&&$(0,tge,9,5,"tr",20),i&2){let t=e.$implicit,n=I(3);oe(n.getShowMetadata(t)?0:-1)}}function ige(i,e){if(i&1&&(v(0,"div",31)(1,"div",33)(2,"div",34),S(3),b(),$(4,Kme,2,1,"div",35)(5,ege,7,4,"div",36),b(),v(6,"table",37),rn(7,nge,1,1,null,null,Pj),b()()),i&2){let t=e.$implicit,n=I(2);w(),re("search-match",n.isSearchMatchedInputValue(n.getInputTensorTag(t))||n.isSearchMatchedInputValue(t.opNode.label)),w(2),st(t.index),w(),oe(t.opNode.hideInLayout?4:5),w(3),on(t.metadataList)}}function rge(i,e){if(i&1){let t=ne();v(0,"div",26,3)(2,"div",27)(3,"div",28)(4,"button",17),H("click",function(){B(t);let r=ve(1),o=I();return V(o.handleToggleSection(o.SectionLabel.INPUTS,r))}),v(5,"mat-icon"),S(6),b()(),S(7),b(),$(8,Qme,1,2,"paginator",29),b(),v(9,"div",30),rn(10,ige,9,4,"div",31,jme),b()()}if(i&2){let t=I();re("collapsed",t.isSectionCollapsed(t.SectionLabel.INPUTS)),w(6),st(t.getSectionToggleIcon(t.SectionLabel.INPUTS)),w(),Se(" inputs (",t.curInputsCount,") "),w(),oe(t.showInputPaginator?8:-1),w(2),on(t.flatInputItems)}}function oge(i,e){if(i&1){let t=ne();v(0,"paginator",32),H("change",function(r){B(t);let o=I(2);return V(o.handleOutputPaginatorChanged(r))}),b()}if(i&2){let t=I(2);R("pageSize",t.ioPageSize)("itemsCount",t.outputItems.length)}}function sge(i,e){if(i&1){let t=ne();v(0,"div",50),H("click",function(r){B(t);let o=I().$implicit,s=I(2);return V(s.handleToggleOutputVisibility(o.outputId,s.outputItemsForCurPage,r))}),v(1,"mat-icon"),S(2),b()()}if(i&2){let t=I().$implicit,n=I(2);re("visible",n.getOutputToggleVisible(t.outputId)),R("matTooltip",n.getOutputToggleVisibilityTooltip(t.outputId)),w(2),Se(" ",n.getOutputToggleVisibilityIcon(t.outputId)," ")}}function age(i,e){i&1&&Ki(0)}function cge(i,e){if(i&1&&(v(0,"div",53),$(1,age,1,0,"ng-container",54),b()),i&2){let t=I().$implicit,n=I(6),r=ve(11);w(),R("ngTemplateOutlet",r)("ngTemplateOutletContext",Ac(2,qme,n.getNamespaceLabel(t)))}}function lge(i,e){if(i&1){let t=ne();v(0,"div",52),H("click",function(r){let o=B(t).$implicit,s=I(6);return V(s.handleLocateNode(o.id,r))}),S(1),v(2,"div",39)(3,"mat-icon",40),S(4,"my_location"),b()()(),$(5,cge,2,4,"ng-template",null,6,Tt)}if(i&2){let t=e.$implicit,n=ve(6),r=I(6);re("search-match",r.isSearchMatchedOutputValue(t.label)),R("bubble",n)("overlaySize",r.constValuesPopupSize)("overlayPositions",r.outputConnectsToNamespacePopupPosition)("hoverDelayMs",50),Ye("data-id",t.id),w(),Se(" ",t.label," "),w(),R("matTooltip",r.locatorTooltip)}}function dge(i,e){if(i&1&&rn(0,lge,7,9,null,null,$me),i&2){let t=I().$implicit;on(t.connectedNodes)}}function uge(i,e){if(i&1&&ee(0,"expandable-info-text",51),i&2){let t=I().$implicit;R("text",t.value)}}function hge(i,e){if(i&1&&(v(0,"tr")(1,"td",21)(2,"div",44)(3,"mat-icon",45),S(4,"circle"),b(),ee(5,"hoverable-label",22),b()(),v(6,"td",23),$(7,dge,2,0)(8,uge,1,1,"expandable-info-text",51),b()()),i&2){let t=e.$implicit,n=I(4);re("search-match",n.isSearchMatchedOutputValue(t.value)),w(5),R("label",t.key),w(2),oe(t.key===n.outputMetadataConnectedTo?7:8)}}function pge(i,e){if(i&1&&(v(0,"table",37),rn(1,hge,9,4,"tr",20,Pj),b()),i&2){let t=I().$implicit;w(),on(t.metadataList)}}function fge(i,e){if(i&1&&(v(0,"div",31)(1,"div",33)(2,"div",34),S(3),b(),v(4,"div",35),S(5),b(),ee(6,"div",41),$(7,sge,3,4,"div",49),b(),$(8,pge,3,0,"table",37),b()),i&2){let t=e.$implicit,n=I(2);w(),re("search-match",n.isSearchMatchedOutputValue(t.tensorTag)),w(2),st(t.index),w(2),st(n.getOutputName(t)),w(2),oe(n.getHasConnectedToNodes(t)?7:-1),w(),oe(t.metadataList.length>0?8:-1)}}function mge(i,e){if(i&1){let t=ne();v(0,"div",47,5)(2,"div",48)(3,"div",28)(4,"button",17),H("click",function(){B(t);let r=ve(1),o=I();return V(o.handleToggleSection(o.SectionLabel.OUTPUTS,r))}),v(5,"mat-icon"),S(6),b()(),S(7),b(),$(8,oge,1,2,"paginator",29),b(),v(9,"div",30),rn(10,fge,9,6,"div",31,Wme),b()()}if(i&2){let t=I();re("collapsed",t.isSectionCollapsed(t.SectionLabel.OUTPUTS)),w(6),st(t.getSectionToggleIcon(t.SectionLabel.OUTPUTS)),w(),Se(" outputs (",t.curOutputsCount,") "),w(),oe(t.showOutputPaginator?8:-1),w(2),on(t.outputItemsForCurPage)}}function gge(i,e){if(i&1){let t=ne();v(0,"paginator",32),H("change",function(r){B(t);let o=I(2);return V(o.handleIdenticalGroupsPaginatorChanged(r))}),b()}if(i&2){let t=I(2);R("pageSize",t.ioPageSize)("itemsCount",t.identicalGroupNodes.length)}}function _ge(i,e){if(i&1){let t=ne();v(0,"div",15,7)(2,"div",55)(3,"div",28)(4,"button",17),H("click",function(){B(t);let r=ve(1),o=I();return V(o.handleToggleSection(o.SectionLabel.IDENTICAL_GROUPS,r))}),v(5,"mat-icon"),S(6),b()(),S(7),b(),$(8,gge,1,2,"paginator",29),b(),ee(9,"io-tree",56),b()}if(i&2){let t=I();re("collapsed",t.isSectionCollapsed(t.SectionLabel.IDENTICAL_GROUPS)),w(6),st(t.getSectionToggleIcon(t.SectionLabel.IDENTICAL_GROUPS)),w(),Se(" Identical layers (",t.identicalGroupNodes.length,") "),w(),oe(t.showIdenticalGroupsPaginator?8:-1),w(),R("data",t.identicalGroupsData)("rendererId",t.curRendererId)}}function vge(i,e){if(i&1&&(v(0,"div",59),S(1),b()),i&2){let t=e.$implicit;w(),Se(" ",t," ")}}function bge(i,e){if(i&1&&(v(0,"div",57),S(1," Namespace hierarchy "),b(),v(2,"div",58),rn(3,vge,2,1,"div",59,tb),b()),i&2){let t=e.value;w(3),on(t.split("/"))}}var Ts=function(i){return i.GRAPH_INFO="Graph info",i.NODE_INFO="Node info",i.LAYER_INFO="Layer info",i.LAYER_ATTRS="Layer attributes",i.ATTRIBUTES="Attributes",i.NODE_DATA_PROVIDERS="Node data providers",i.IDENTICAL_GROUPS="Identical groups",i.INPUTS="inputs",i.OUTPUTS="outputs",i}(Ts||{}),yge=64,xge=150,Dj=370,Oj=(()=>{class i{appService;nodeDataProviderExtensionService;changeDetectorRef;infoPanelService;splitPaneService;paneId;inputValueContents=new Zi;curModelGraph;curSelectedNode;curShowOnOpNodeInfoIds=new Set;curShowOnOpNodeAttrIds=new Set;curShowOnGroupNodeInfoIds=new Set;curShowOnNodeDataProviderRuns={};curSearchResults=void 0;width=Dj;minWidth=Dj;sections=[];flatInputItems=[];outputItems=[];outputItemsForCurPage=[];identicalGroupNodes=[];identicalGroupsData;curRendererId="";curInputsCount=0;curOutputsCount=0;resizing=!1;hide=!1;ioPageSize;SectionLabel=Ts;outputMetadataConnectedTo="connects to";inputMetadataValuesKey="values";inputMetadataNamespaceKey="namespace";locatorTooltip=`Click: locate -Alt+click: select`;getNamespaceLabel=hd;constValuesPopupSize={minWidth:100,minHeight:0,maxWidth:600};constValuesPopupPosition=[{originX:"start",originY:"top",overlayX:"end",overlayY:"top",offsetX:-32}];outputConnectsToNamespacePopupPosition=[{originX:"start",originY:"top",overlayX:"end",overlayY:"top",offsetX:-4}];curSearchAttrMatches=[];curSearchInputMatches=[];curSearchOutputMatches=[];inputSourceNodes=[];inputMetadataList=[];savedWidth=0;constructor(t,n,r,o,s){this.appService=t,this.nodeDataProviderExtensionService=n,this.changeDetectorRef=r,this.infoPanelService=o,this.splitPaneService=s,this.ioPageSize=this.appService.testMode?5:25,lt(()=>{let a=this.appService.getPaneById(this.paneId);if(!a||!a.modelGraph)return;this.curModelGraph=a.modelGraph,this.curRendererId=a.selectedNodeInfo?.rendererId||"";let c=a.selectedNodeInfo?.nodeId||"";this.curSelectedNodeId!==c&&(this.handleNodeSelected(c),setTimeout(()=>{this.splitPaneService.resetInputOutputHiddenIds(),this.handleSearchResultsChanged()}))}),lt(()=>{let a=this.appService.getPaneById(this.paneId);!a||!a.modelGraph||this.curSearchResults!==a.searchResults&&(this.curSearchResults=a.searchResults,this.handleSearchResultsChanged())}),lt(()=>{this.nodeDataProviderExtensionService.runs(),this.genInfoData(),this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.updateInputValueContentsExpandable()})})}isSearchMatchedAttrId(t){return this.curSearchAttrMatches.find(n=>n.matchedAttrId===t)!=null}isSearchMatchedInputValue(t){return this.curSearchInputMatches?this.curSearchInputMatches.find(n=>n.matchedText===t)!=null:!1}isSearchMatchedOutputValue(t){return this.curSearchOutputMatches?this.curSearchOutputMatches.find(n=>n.matchedText===t)!=null:!1}handleMouseDownResizer(t){t.preventDefault(),document.body.style.cursor="ew-resize";let n=yn(document,"mousemove"),r=yn(window,"mouseup"),o=this.width,s=t.clientX;this.resizing=!0,this.changeDetectorRef.markForCheck(),eo([n]).pipe(Ze(r)).subscribe({next:([a])=>{let c=a.clientX-s;this.width=Math.max(yge,o-c),this.minWidth=this.width,this.changeDetectorRef.markForCheck()},complete:()=>{document.body.style.cursor="default",this.resizing=!1,this.changeDetectorRef.markForCheck()}})}handleInputPaginatorChanged(t){let n=this.inputSourceNodes.slice(t*this.ioPageSize,(t+1)*this.ioPageSize),r=this.inputMetadataList.slice(t*this.ioPageSize,(t+1)*this.ioPageSize);this.flatInputItems=this.genInputFlatItems(t*this.ioPageSize,n,r),this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.updateInputValueContentsExpandable()})}handleOutputPaginatorChanged(t){this.outputItemsForCurPage=this.outputItems.slice(t*this.ioPageSize,(t+1)*this.ioPageSize),this.changeDetectorRef.markForCheck()}handleIdenticalGroupsPaginatorChanged(t){this.identicalGroupsData=uc(this.identicalGroupNodes.slice(t*this.ioPageSize,(t+1)*this.ioPageSize),[],"incoming",this.curSelectedNode?.id||"")}toggleHideInfoPanel(){this.hide=!this.hide;let t=0;this.hide?this.savedWidth=this.width:t=this.savedWidth,this.animateSidePanelWidth(t)}handleToggleSection(t,n){if(!n)return;this.isSectionCollapsed(t)?n.style.maxHeight=`${n.scrollHeight}px`:(n.style.maxHeight=`${n.offsetHeight}px`,n.style.overflow="hidden"),this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.infoPanelService.collapsedSectionNames.has(t)?this.infoPanelService.collapsedSectionNames.delete(t):this.infoPanelService.collapsedSectionNames.add(t),this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.isSectionCollapsed(t)?n.style.overflow="hidden":(n.style.overflow="visible",n.style.maxHeight="fit-content")},150)})}isSectionCollapsed(t){return this.infoPanelService.collapsedSectionNames.has(t)}getSectionToggleIcon(t){return this.isSectionCollapsed(t)?"chevron_right":"expand_more"}handleLocateNode(t,n){this.appService.curToLocateNodeInfo.set({nodeId:t,rendererId:this.curRendererId,isGroupNode:!1,select:n.altKey})}handleToggleInputOpNodeVisibility(t,n,r){r.stopPropagation(),r.altKey?this.splitPaneService.setInputOpNodeVisible(t,n.map(o=>o.opNode.id)):this.splitPaneService.toggleInputOpNodeVisibility(t)}getInputOpNodeToggleVisible(t){return this.splitPaneService.getInputOpNodeVisible(t)}getInputOpNodeToggleVisibilityIcon(t){return this.getInputOpNodeToggleVisible(t)?"visibility":"visibility_off"}getInputOpNodeToggleVisibilityTooltip(t){return this.getInputOpNodeToggleVisible(t)?"Click to hide highlight":"Click to show highlight"}handleToggleOutputVisibility(t,n,r){r.stopPropagation(),r.altKey?this.splitPaneService.setOutputVisible(t,n.map(o=>o.outputId)):this.splitPaneService.toggleOutputVisibility(t)}getOutputToggleVisible(t){return this.splitPaneService.getOutputVisible(t)}getOutputToggleVisibilityIcon(t){return this.getOutputToggleVisible(t)?"visibility":"visibility_off"}getOutputToggleVisibilityTooltip(t){return this.getOutputToggleVisible(t)?"Click to hide highlight":"Click to show highlight"}getInputName(t){let n=t.metadataList.find(r=>r.key===Uo);return n?`${n.value} (${t.opNode.label})`:t.opNode.label}getInputTensorTag(t){return t.metadataList.find(r=>r.key===Uo)?.value??""}getOutputName(t){return t.tensorTag===""?"output":t.tensorTag}getShowMetadata(t){return!t.key.startsWith("__")}getHasConnectedToNodes(t){return(t.metadataList.find(r=>r.key===this.outputMetadataConnectedTo)?.connectedNodes||[]).length>0}trackBySectionLabel(t,n){return n.label}trackByItemIdOrLabel(t,n){return n.id||n.label}get canShowGraphInfo(){return this.curModelGraph!=null&&this.curSelectedNode==null}get showNodeDataProviderSummary(){return this.curModelGraph?(this.curSelectedNode==null||wt(this.curSelectedNode))&&this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph).length>0:!1}get curSelectedNodeId(){return this.curSelectedNode?this.curSelectedNode.id:void 0}get showInputPaginator(){return this.inputSourceNodes.length>this.ioPageSize&&!this.isSectionCollapsed(Ts.INPUTS)}get showOutputPaginator(){return this.outputItems.length>this.ioPageSize&&!this.isSectionCollapsed(Ts.OUTPUTS)}get showIdenticalGroupsPaginator(){return this.identicalGroupNodes.length>this.ioPageSize&&!this.isSectionCollapsed(Ts.IDENTICAL_GROUPS)}get hideToggleTooltip(){return this.hide?"Show info panel":"Hide info panel"}get hideToggleIconName(){return this.hide?"chevron_left":"chevron_right"}handleNodeSelected(t){!this.curModelGraph||!t?this.curSelectedNode=void 0:this.curSelectedNode=this.curModelGraph.nodesById[t],this.genInfoData(),this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.updateInputValueContentsExpandable()})}genInfoData(){this.sections=[],this.flatInputItems=[],this.inputSourceNodes=[],this.inputMetadataList=[],this.outputItems=[],this.identicalGroupNodes=[],this.identicalGroupsData=void 0,this.canShowGraphInfo?this.genInfoDataForGraph():this.curSelectedNode&&(St(this.curSelectedNode)?(this.genInfoDataForSelectedOpNode(),this.genInputsOutputsData()):wt(this.curSelectedNode)&&this.genInfoDataForSelectedGroupNode())}genInfoDataForGraph(){if(!this.curModelGraph)return;let t={label:Ts.GRAPH_INFO,sectionType:"graph",items:[]};this.sections.push(t);let n=this.curModelGraph.groupNodeAttributes?.[""];if(n)for(let s of Object.keys(n))t.items.push({section:t,label:s,value:n[s]});let r=0,o=0;for(let s of this.curModelGraph.nodes)St(s)&&!s.hideInLayout?r++:wt(s)&&o++;t.items.push({section:t,label:"op node count",value:String(r)},{section:t,label:"layer count",value:String(o)})}genInfoDataForSelectedOpNode(){if(!this.curModelGraph||!this.curSelectedNode)return;let t=this.curSelectedNode,n={label:Ts.NODE_INFO,sectionType:"op",items:[]};this.sections.push(n),n.items.push({section:n,label:"op name",value:`${t.label}`});let r="id";if(n.items.push({section:n,label:r,value:t.id,canShowOnNode:!0,showOnNode:this.curShowOnOpNodeInfoIds.has(r)}),r="namespace",n.items.push({section:n,label:r,value:hd(t),canShowOnNode:!0,showOnNode:this.curShowOnOpNodeInfoIds.has(r)}),Object.keys(t.attrs||{}).length>0){let s={label:Ts.ATTRIBUTES,sectionType:"op",items:[]},a=t.attrs||{};for(let c of Object.keys(a))c.startsWith("__")||s.items.push({section:s,label:c,value:a[c],canShowOnNode:!0,showOnNode:this.curShowOnOpNodeAttrIds.has(c)});s.items.length>0&&this.sections.push(s)}let o=this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph);if(o.length>0){let s={label:Ts.NODE_DATA_PROVIDERS,sectionType:"op",items:[]};this.sections.push(s);for(let a of o){let c=((a.results||{})[this.curModelGraph.id]||{})[t.id],l=c?.strValue||"-",d=c?.bgColor||"transparent",u=c?.textColor||"black";s.items.push({id:a.runId,section:s,label:a.runName,value:l,canShowOnNode:a.done,showOnNode:this.curShowOnNodeDataProviderRuns[a.runId]!=null,bgColor:d,textColor:u,loading:!a.done})}}}genInputsOutputsData(){if(!this.curModelGraph||!this.curSelectedNode)return;let t=this.curSelectedNode,n=t.incomingEdges||[];this.inputMetadataList=[],this.inputSourceNodes=[],this.flatInputItems=[];for(let a of n){let c=this.curModelGraph?.nodesById[a.sourceNodeId];this.inputSourceNodes.push(c);let l=(t.inputsMetadata||{})[a.targetNodeInputId]||{},d=Z({},(c.outputsMetadata||{})[a.sourceNodeOutputId]||{});for(let u of Object.keys(d))l[u]==null&&u!==Uo&&(l[u]=d[u]);this.inputMetadataList.push(l)}if(this.curInputsCount=this.inputSourceNodes.length,n.length>0){let a=this.inputSourceNodes.slice(0,this.ioPageSize),c=this.inputMetadataList.slice(0,this.ioPageSize);this.flatInputItems=this.genInputFlatItems(0,a,c)}this.outputItems=[];let r=t.outputsMetadata||{},o=t.outgoingEdges||[],s=0;for(let a of Object.keys(r)){let c=[],l="";for(let u of Object.keys(r[a])){let h=r[a][u];u===Uo&&(l=h),!u.startsWith("__")&&c.push({key:u,value:h})}c.sort((u,h)=>u.key.localeCompare(h.key));let d=o.filter(u=>u.sourceNodeOutputId===a).map(u=>this.curModelGraph.nodesById[u.targetNodeId]);c.push({key:this.outputMetadataConnectedTo,value:"",connectedNodes:d}),this.outputItems.push({index:s,tensorTag:l,outputId:a,metadataList:c}),s++}this.curOutputsCount=this.outputItems.length,this.outputItemsForCurPage=this.outputItems.slice(0,this.ioPageSize)}genInfoDataForSelectedGroupNode(){if(!this.curModelGraph||!this.curSelectedNode)return;let t=this.curSelectedNode,n={label:Ts.LAYER_INFO,sectionType:"group",items:[]};this.sections.push(n),n.items.push({section:n,label:"name",value:t.label});let r="namespace";n.items.push({section:n,label:r,value:hd(t),canShowOnNode:!0,showOnNode:this.curShowOnGroupNodeInfoIds.has(r)}),r="#children",n.items.push({section:n,label:r,value:String((t.nsChildrenIds||[]).length),canShowOnNode:!0,showOnNode:this.curShowOnGroupNodeInfoIds.has(r)}),r="#descendants",n.items.push({section:n,label:r,value:String((t.descendantsNodeIds||[]).length),canShowOnNode:!0,showOnNode:this.curShowOnGroupNodeInfoIds.has(r)});let o=this.curModelGraph.groupNodeAttributes?.[t.id.replace("___group___","")];if(o){let s={label:Ts.LAYER_ATTRS,sectionType:"group",items:[]};this.sections.push(s);for(let a of Object.keys(o))s.items.push({section:n,label:a,value:o[a]})}t.identicalGroupIndex!=null&&(this.identicalGroupNodes=this.curModelGraph.nodes.filter(s=>wt(s)&&s.identicalGroupIndex===t.identicalGroupIndex),this.identicalGroupsData=uc(this.identicalGroupNodes.slice(0,this.ioPageSize),[],"incoming",t.id))}handleSearchResultsChanged(){if(!this.curSelectedNode||!this.curSearchResults)return;let t=this.curSelectedNode.id,n=this.curSearchResults.results[t]||[],r=[],o=[],s=[];for(let a of n)switch(a.type){case xt.INPUT_METADATA:r.push(a);break;case xt.OUTPUT_METADATA:o.push(a);break;case xt.ATTRIBUTE:s.push(a);break;default:break}this.curSearchAttrMatches=s,this.curSearchOutputMatches=o,this.curSearchInputMatches=r,this.changeDetectorRef.markForCheck()}animateSidePanelWidth(t){let n=Date.now(),r=this.width,o=()=>{let s=Date.now()-n,a=this.appService.testMode?1:Math.min(1,s/xge);a=Math.sin(a*Math.PI/2);let c=r+(t-r)*a;if(this.width=c,this.minWidth=c,this.changeDetectorRef.markForCheck(),a>=1){this.width=t,this.minWidth=t,this.changeDetectorRef.markForCheck();return}requestAnimationFrame(o)};o()}genInputFlatItems(t,n,r){let o=[];for(let s=0;s{c.push({key:d,value:u})}),c.sort((d,u)=>d.key.localeCompare(u.key)),c.push({key:this.inputMetadataNamespaceKey,value:hd(n[s])});let l=a.attrs||{};l[Fa]&&c.push({key:this.inputMetadataValuesKey,value:l[Fa]}),o.push({index:s+t,opNode:a,metadataList:c})}return o}updateInputValueContentsExpandable(){for(let t=0;tn.offsetHeight&&n.classList.add("expandable")}}static \u0275fac=function(n){return new(n||i)(M(at),M(Mr),M(Ne),M(uf),M(yl))};static \u0275cmp=ce({type:i,selectors:[["info-panel"]],viewQuery:function(n,r){if(n&1&&Ee(Hme,5),n&2){let o;be(o=ye())&&(r.inputValueContents=o)}},hostVars:4,hostBindings:function(n,r){n&2&&Jt("width",r.width,"px")("min-width",r.minWidth,"px")},inputs:{paneId:"paneId"},standalone:!0,features:[Ft([uf]),le],decls:12,vars:12,consts:[["namespaceHierarchy",""],["sectionEle",""],["ndpSectionEle",""],["inputsSectionEle",""],["rowEle",""],["outputsSectionEle",""],["namespacePopup",""],["identicalGroupsSectionEle",""],[1,"container"],["class","section",3,"collapsed",4,"ngFor","ngForOf","ngForTrackBy"],["class","section",3,"collapsed",4,"ngIf"],["class","section inputs",3,"collapsed",4,"ngIf"],["class","section outputs",3,"collapsed",4,"ngIf"],[1,"resizer",3,"mousedown"],[1,"hide-toggle",3,"click","matTooltip"],[1,"section"],[1,"header"],["mat-icon-button","",1,"toggle",3,"click"],[1,"items-container"],[1,"metadata-table","info-attrs"],[3,"search-match"],[1,"key"],[3,"label"],[1,"value"],[3,"text","type","bgColor","textColor"],[3,"paneId","rootGroupNodeId"],[1,"section","inputs"],[1,"header","input"],[1,"header-label-container"],[3,"pageSize","itemsCount"],[1,"flat-items-container"],[1,"flat-item"],[3,"change","pageSize","itemsCount"],[1,"name-row"],[1,"index"],[1,"name"],[1,"name","locator"],[1,"metadata-table"],[1,"name","locator",3,"click"],["matTooltipClass","multiline-tooltip-left","matTooltipPosition","right",1,"locator-icon-container",3,"matTooltip"],[1,"locator-icon"],[1,"filler"],["matTooltipPosition","left",1,"visibility-icon-container","input",3,"matTooltip","visible"],["matTooltipPosition","left",1,"visibility-icon-container","input",3,"click","matTooltip"],[1,"key-container"],[1,"bullet"],[3,"text","type"],[1,"section","outputs"],[1,"header","output"],["matTooltipPosition","left",1,"visibility-icon-container","output",3,"visible","matTooltip"],["matTooltipPosition","left",1,"visibility-icon-container","output",3,"click","matTooltip"],[3,"text"],[1,"target-node-container",3,"click","bubble","overlaySize","overlayPositions","hoverDelayMs"],[1,"model-explorer-const-values-popup"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"header","identical-groups"],[3,"data","rendererId"],[1,"values-count-msg"],[1,"namespace-content"],[1,"namespace-row"]],template:function(n,r){if(n&1){let o=ne();v(0,"div",8),$(1,Xme,11,4,"div",9)(2,Zme,8,5,"div",10)(3,rge,12,5,"div",11)(4,mge,12,5,"div",12)(5,_ge,10,7,"div",10),b(),v(6,"div",13),H("mousedown",function(a){return B(o),V(r.handleMouseDownResizer(a))}),b(),v(7,"div",14),H("click",function(){return B(o),V(r.toggleHideInfoPanel())}),v(8,"mat-icon"),S(9),b()(),$(10,bge,5,0,"ng-template",null,0,Tt)}n&2&&(re("graph-info",r.showNodeDataProviderSummary),w(),R("ngForOf",r.sections)("ngForTrackBy",r.trackBySectionLabel),w(),R("ngIf",r.showNodeDataProviderSummary),w(),R("ngIf",r.flatInputItems.length>0),w(),R("ngIf",r.outputItems.length>0),w(),R("ngIf",r.identicalGroupsData),w(),re("resizing",r.resizing),w(),R("matTooltip",r.hideToggleTooltip),w(2),st(r.hideToggleIconName))},dependencies:[Hn,Ae,Mi,Tn,Gs,Sj,Mj,xn,Wo,tt,pt,ao,jC,Xt,Yn,df,Sl,Tj],styles:[`[_nghost-%COMP%]{position:relative;width:370px;min-width:370px}.container[_ngcontent-%COMP%]{width:100%;height:100%;box-sizing:border-box;border-left:1px solid #e1e3e1;background-color:#fff;font-size:12px;overflow-y:auto;position:relative}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]{transition:max-height .15s ease-out;padding-bottom:8px;box-sizing:border-box}.container[_ngcontent-%COMP%] .section.collapsed[_ngcontent-%COMP%]{max-height:32px!important;overflow:hidden}.container[_ngcontent-%COMP%] .section.inputs[_ngcontent-%COMP%]{padding-bottom:16px}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-items-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:10px;gap:8px}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2px 0 12px;font-size:12px}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{color:#999;min-width:14px;margin-right:2px}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{color:#00639b;font-weight:500;display:flex;align-items:center}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%] .name.locator[_ngcontent-%COMP%]{flex-grow:1;display:flex;align-items:center;cursor:pointer}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%] .name.locator[_ngcontent-%COMP%]:hover{background-color:#f6f6f6}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%] .name.locator[_ngcontent-%COMP%]:hover .locator-icon-container[_ngcontent-%COMP%]{opacity:.8}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%]{margin-top:3px;margin-left:18px;margin-right:0}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]:not(:first-child){border-top:1px solid #dadce0}.container[_ngcontent-%COMP%] .filler[_ngcontent-%COMP%]{flex-grow:1}.container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:11px;font-weight:700;padding:4px 12px 0;text-transform:uppercase;letter-spacing:.0327em;position:sticky;top:0;z-index:100;flex-shrink:0;box-sizing:border-box;background-color:#fff;-webkit-user-select:none;user-select:none;color:#000000de}.container[_ngcontent-%COMP%] .header.input[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .header.output[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .header.identical-groups[_ngcontent-%COMP%]{justify-content:space-between}.container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-label-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] button.toggle[_ngcontent-%COMP%]{padding:0;width:24px;height:24px;margin-left:-8px;margin-right:2px;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] button.toggle[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:inherit;font-size:20px;width:20px;height:20px}.container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] button.toggle[_ngcontent-%COMP%] .mat-mdc-button-touch-target{display:none}.container[_ngcontent-%COMP%] .output-item-container[_ngcontent-%COMP%]{font-family:Roboto,sans-serif}.container[_ngcontent-%COMP%] .output-item-container[_ngcontent-%COMP%]:not(.last){margin-top:8px}.container[_ngcontent-%COMP%] .output-item-label[_ngcontent-%COMP%]{font-size:13px;padding:4px 12px;color:#00639b;font-weight:500}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%]{border-spacing:0;border-collapse:collapse;font-size:12px;margin:0 12px;word-break:break-all;max-width:calc(100% - 28px)}.container[_ngcontent-%COMP%] .metadata-table.info-attrs[_ngcontent-%COMP%]{margin-left:30px}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{vertical-align:text-top}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover.has-hover-values{cursor:pointer;background-color:#f6f6f6}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] mat-icon.bullet[_ngcontent-%COMP%]{flex-shrink:0;font-size:4px;width:5px;height:5px;color:#bbb;margin-right:4px;margin-top:6px}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.key[_ngcontent-%COMP%]{color:#999;padding-right:6px;white-space:nowrap;min-width:100px;width:100px;max-width:100px;overflow:hidden;text-overflow:ellipsis;position:relative}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.key[_ngcontent-%COMP%] .key-container[_ngcontent-%COMP%]{display:flex;align-items:flex-start;overflow:hidden;position:absolute;inset:0}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.value[_ngcontent-%COMP%]{max-width:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.value[_ngcontent-%COMP%]:has(expandable-info-text.expanded){white-space:normal;max-width:inherit}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] .target-node-container[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] .target-node-container[_ngcontent-%COMP%]:hover .locator-icon-container[_ngcontent-%COMP%]{opacity:.8}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] .target-node-container.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] .values-hover-trigger[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:99px;display:flex;align-items:center;background-color:#d7f1ff;color:#00639b;width:fit-content;height:16px;padding:0 6px;font-size:10px}.container[_ngcontent-%COMP%] .items-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;margin-top:10px;margin-bottom:6px}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 12px}.container[_ngcontent-%COMP%] .item-container.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .label-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-weight:500;color:#aaa;font-size:12px;margin-bottom:1px}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .show-on-node-toggle[_ngcontent-%COMP%]{height:16px;display:flex;font-size:11px;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;-webkit-user-select:none;user-select:none;transform:scale(.7);margin-right:-6px;margin-top:-1px}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:13px;word-break:break-word}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .value.big-text[_ngcontent-%COMP%]{font-size:14px;font-weight:500}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .value.has-bg-color[_ngcontent-%COMP%]{padding:2px 4px;border-radius:4px;margin-top:2px}.container[_ngcontent-%COMP%] .locator-icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;opacity:.5;margin-left:4px}.container[_ngcontent-%COMP%] .locator-icon-container.left[_ngcontent-%COMP%]{margin-right:4px;margin-left:0;display:inline-block}.container[_ngcontent-%COMP%] .locator-icon-container.left[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-bottom:-2px}.container[_ngcontent-%COMP%] .locator-icon-container[_ngcontent-%COMP%]:hover{opacity:.8}.container[_ngcontent-%COMP%] .locator-icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#333;font-size:12px;width:12px;height:12px}.container[_ngcontent-%COMP%] .visibility-icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;opacity:.5;padding:0 11px 0 20px;cursor:pointer}.container[_ngcontent-%COMP%] .visibility-icon-container[_ngcontent-%COMP%]:hover{opacity:.8}.container[_ngcontent-%COMP%] .visibility-icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#333;font-size:14px;width:14px;height:14px}.container[_ngcontent-%COMP%] .visibility-icon-container.input.visible[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#009e73}.container[_ngcontent-%COMP%] .visibility-icon-container.output.visible[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#d55e00}.resizer[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;left:0;width:6px;cursor:ew-resize;background-color:transparent;z-index:200}.resizer[_ngcontent-%COMP%]:hover, .resizer.resizing[_ngcontent-%COMP%]{background-color:#0000000a}.hide-toggle[_ngcontent-%COMP%]{position:absolute;right:100%;bottom:2px;width:16px;height:20px;border:1px solid #ccc;border-right:none;box-sizing:border-box;border-radius:99px 0 0 99px;cursor:pointer;background-color:#fff}.hide-toggle[_ngcontent-%COMP%]:hover{background-color:#eee}.hide-toggle[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:18px;height:18px;font-size:18px;color:#999} bubble-container:has(.model-explorer-const-values-popup){width:100%} .model-explorer-const-values-popup{padding:8px;line-height:12px;background-color:#fff} .model-explorer-const-values-popup .values-count-msg{margin-bottom:8px;color:#999;font-size:12px} .model-explorer-const-values-popup .content{font-size:11px;white-space:pre-wrap;font-family:monospace} .model-explorer-const-values-popup .namespace-row{font-size:12px;padding:3px 0} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();function wge(i,e){if(i&1&&ee(0,"graph-panel",3),i&2){let t=I();R("@showModelGraph",void 0)("@.disabled",t.disableAnimation)("modelGraph",t.pane.modelGraph)("paneId",t.pane.id)("rendererId",t.pane.id)}}function Cge(i,e){if(i&1&&ee(0,"info-panel",2),i&2){let t=I();R("paneId",t.pane.id)}}var Rj=(()=>{class i{appService;changeDetectorRef;pane;constructor(t,n){this.appService=t,this.changeDetectorRef=n}refresh(){this.changeDetectorRef.markForCheck()}get disableAnimation(){return this.appService.testMode}get showInfoPanel(){return!this.appService.config()?.hideInfoPanel}static \u0275fac=function(n){return new(n||i)(M(at),M(Ne))};static \u0275cmp=ce({type:i,selectors:[["split-pane"]],inputs:{pane:"pane"},standalone:!0,features:[Ft([Ko,yl]),le],decls:3,vars:2,consts:[[1,"container"],[3,"modelGraph","paneId","rendererId",4,"ngIf"],[3,"paneId"],[3,"modelGraph","paneId","rendererId"]],template:function(n,r){n&1&&(v(0,"div",0),$(1,wge,1,5,"graph-panel",1)(2,Cge,1,1,"info-panel",2),b()),n&2&&(w(),R("ngIf",r.pane.modelGraph),w(),oe(r.showInfoPanel?2:-1))},dependencies:[Ae,Tn,Cj,Oj],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;overflow:hidden}.container[_ngcontent-%COMP%] graph-panel[_ngcontent-%COMP%]{flex-grow:1} - - - - - - - - - - - - - - - - - -`],data:{animation:[li("showModelGraph",[vi("void",Kt({opacity:0,transform:"scale(1.03, 1.03)"})),An("void => *",Rn("150ms 100ms ease-out",Kt({opacity:1,transform:"scale(1, 1)"})))])]},changeDetection:0})}return i})();var Sge=["input"],Mge=["formField"],Ege=["*"],Ige=0,BO=class{constructor(e,t){this.source=e,this.value=t}};var Tge=new me("MatRadioGroup"),Dge=new me("mat-radio-default-options",{providedIn:"root",factory:Pge});function Pge(){return{color:"accent"}}var VO=(()=>{let e=class e{get checked(){return this._checked}set checked(n){this._checked!==n&&(this._checked=n,n&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!n&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),n&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(n){this._value!==n&&(this._value=n,this.radioGroup!==null&&(this.checked||(this.checked=this.radioGroup.value===n),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(n){this._labelPosition=n}get disabled(){return this._disabled||this.radioGroup!==null&&this.radioGroup.disabled}set disabled(n){this._setDisabled(n)}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(n){this._required=n}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._providerOverride&&this._providerOverride.color||"accent"}set color(n){this._color=n}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(n,r,o,s,a,c,l,d){this._elementRef=r,this._changeDetector=o,this._focusMonitor=s,this._radioDispatcher=a,this._providerOverride=l,this._uniqueId=`mat-radio-${++Ige}`,this.id=this._uniqueId,this.disableRipple=!1,this.tabIndex=0,this.change=new Ie,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this._injector=te(vt),this.radioGroup=n,this._noopAnimations=c==="NoopAnimations",d&&(this.tabIndex=ni(d,0))}focus(n,r){r?this._focusMonitor.focusVia(this._inputElement,r,n):this._inputElement.nativeElement.focus(n)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((n,r)=>{n!==this.id&&r===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(n=>{!n&&this.radioGroup&&this.radioGroup._touch()})}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new BO(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputClick(n){n.stopPropagation()}_onInputInteraction(n){if(n.stopPropagation(),!this.checked&&!this.disabled){let r=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),r&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(n){this._onInputInteraction(n),this.disabled||this._inputElement.nativeElement.focus()}_setDisabled(n){this._disabled!==n&&(this._disabled=n,this._changeDetector.markForCheck())}_updateTabIndex(){let n=this.radioGroup,r;if(!n||!n.selected||this.disabled?r=this.tabIndex:r=n.selected===this?this.tabIndex:-1,r!==this._previousTabIndex){let o=this._inputElement?.nativeElement;o&&(o.setAttribute("tabindex",r+""),this._previousTabIndex=r,Hi(()=>{queueMicrotask(()=>{n&&n.selected&&n.selected!==this&&document.activeElement===o&&(n.selected?._inputElement.nativeElement.focus(),document.activeElement===o&&this._inputElement.nativeElement.blur())})},{injector:this._injector}))}}};e.\u0275fac=function(r){return new(r||e)(M(Tge,8),M(Re),M(Ne),M(Gr),M($H),M(jn,8),M(Dge,8),Lr("tabindex"))},e.\u0275cmp=ce({type:e,selectors:[["mat-radio-button"]],viewQuery:function(r,o){if(r&1&&(Ee(Sge,5),Ee(Mge,7,Re)),r&2){let s;be(s=ye())&&(o._inputElement=s.first),be(s=ye())&&(o._rippleTrigger=s.first)}},hostAttrs:[1,"mat-mdc-radio-button"],hostVars:15,hostBindings:function(r,o){r&1&&H("focus",function(){return o._inputElement.nativeElement.focus()}),r&2&&(Ye("id",o.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),re("mat-primary",o.color==="primary")("mat-accent",o.color==="accent")("mat-warn",o.color==="warn")("mat-mdc-radio-checked",o.checked)("_mat-animation-noopable",o._noopAnimations))},inputs:{id:"id",name:"name",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],disableRipple:[2,"disableRipple","disableRipple",et],tabIndex:[2,"tabIndex","tabIndex",n=>n==null?0:ni(n)],checked:[2,"checked","checked",et],value:"value",labelPosition:"labelPosition",disabled:[2,"disabled","disabled",et],required:[2,"required","required",et],color:"color"},outputs:{change:"change"},exportAs:["matRadioButton"],standalone:!0,features:[nn,le],ngContentSelectors:Ege,decls:13,vars:16,consts:[["formField",""],["input",""],["mat-internal-form-field","",3,"labelPosition"],[1,"mdc-radio"],[1,"mat-mdc-radio-touch-target",3,"click"],["type","radio",1,"mdc-radio__native-control",3,"change","id","checked","disabled","required"],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","",1,"mat-radio-ripple","mat-mdc-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mdc-label",3,"for"]],template:function(r,o){if(r&1){let s=ne();In(),v(0,"div",2,0)(2,"div",3)(3,"div",4),H("click",function(c){return B(s),V(o._onTouchTargetClick(c))}),b(),v(4,"input",5,1),H("change",function(c){return B(s),V(o._onInputInteraction(c))}),b(),v(6,"div",6),ee(7,"div",7)(8,"div",8),b(),v(9,"div",9),ee(10,"div",10),b()(),v(11,"label",11),Wt(12),b()()}r&2&&(R("labelPosition",o.labelPosition),w(2),re("mdc-radio--disabled",o.disabled),w(2),R("id",o.inputId)("checked",o.checked)("disabled",o.disabled)("required",o.required),Ye("name",o.name)("value",o.value)("aria-label",o.ariaLabel)("aria-labelledby",o.ariaLabelledby)("aria-describedby",o.ariaDescribedby),w(5),R("matRippleTrigger",o._rippleTrigger.nativeElement)("matRippleDisabled",o._isRippleDisabled())("matRippleCentered",!0),w(2),R("for",o.inputId))},dependencies:[gs,Hh],styles:['.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color;padding:calc((var(--mdc-radio-state-layer-size) - 20px)/2)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled])~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-hover-icon-color)}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color)}.mat-mdc-radio-button .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-radio-button .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size);top:calc(-1*(var(--mdc-radio-state-layer-size) - 20px)/2);left:calc(-1*(var(--mdc-radio-state-layer-size) - 20px)/2)}.mat-mdc-radio-button .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;top:0;right:0;left:0;cursor:inherit;z-index:1;width:var(--mdc-radio-state-layer-size);height:var(--mdc-radio-state-layer-size)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color);opacity:var(--mdc-radio-disabled-unselected-icon-opacity)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{cursor:default}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color);opacity:var(--mdc-radio-disabled-selected-icon-opacity)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-icon-color)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio--disabled{cursor:default;pointer-events:none}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color)}.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color)}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element{background-color:var(--mat-radio-checked-ripple-color)}.mat-mdc-radio-button .mat-internal-form-field{color:var(--mat-radio-label-text-color);font-family:var(--mat-radio-label-text-font);line-height:var(--mat-radio-label-text-line-height);font-size:var(--mat-radio-label-text-size);letter-spacing:var(--mat-radio-label-text-tracking);font-weight:var(--mat-radio-label-text-weight)}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color)}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, black)}.mat-mdc-radio-button.cdk-focused .mat-mdc-focus-indicator::before{content:""}.mat-mdc-radio-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-radio-touch-target-display)}[dir=rtl] .mat-mdc-radio-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}'],encapsulation:2,changeDetection:0});let i=e;return i})(),Aj=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({imports:[Ut,Ae,Id,VO,Ut]});let i=e;return i})();function Rge(i,e){i&1&&(v(0,"div",5),S(1," Synchronize the node selection across two panes by the given node id mapping. "),b())}function Age(i,e){if(i&1){let t=ne();v(0,"button",15),H("click",function(){B(t);let r=ve(3),o=I(3);return V(o.handleClickUpload(r))}),S(1," Upload "),b(),v(2,"input",16,2),H("change",function(){B(t);let r=ve(3),o=I(3);return V(o.handleUploadedFileChanged(r))}),b(),v(4,"div",17),S(5),b()}if(i&2){let t=I(3);w(5),Se(" ",t.uploadedFileName," ")}}function Nge(i,e){if(i&1){let t=ne();v(0,"div",12)(1,"div",13)(2,"mat-radio-button",14),H("change",function(){let r=B(t).$implicit,o=I(2);return V(o.setSyncMode(r))}),S(3),b(),$(4,Age,6,1),b()()}if(i&2){let t,n=e.$implicit,r=I(2);w(2),re("cns",n===r.SyncNavigationMode.LOAD_MAPPING_FROM_CNS),R("disableRipple",!0)("checked",r.syncMode()===n),w(),Se(" ",r.getModeLabel(n)," "),w(),oe((t=n)===r.SyncNavigationMode.UPLOAD_MAPPING_FROM_COMPUTER?4:-1)}}function kge(i,e){if(i&1&&(v(0,"div",6)(1,"div",7)(2,"div"),S(3,"Select a sync mode"),b(),v(4,"div",8)(5,"a",9),S(6," Guide "),b(),v(7,"div",10)(8,"mat-icon",11),S(9,"close"),b()()()(),rn(10,Nge,5,6,"div",12,gr),b()),i&2){let t=I();w(10),on(t.allSyncModes)}}var Nj=(()=>{class i{dropdown;appService=te(at);changeDetectorRef=te(Ne);localStorageService=te(no);syncNavigationService=te(Ml);snackBar=te(hc);SyncNavigationMode=Mn;allSyncModes;syncMode=this.syncNavigationService.mode;syncEnabled=Bt(()=>this.syncMode()!==Mn.DISABLED);syncIcon=Bt(()=>this.syncMode()===Mn.DISABLED&&!this.syncNavigationService.loadingFromCns()?"sync_disabled":"sync");loadingFromCns=this.syncNavigationService.loadingFromCns;helpPopupSize={minWidth:0,minHeight:0};dropdownSize={minWidth:0,minHeight:0,maxHeight:500};uploadedFileName="";constructor(){let t=this.appService.config()?.syncNavigationData;this.allSyncModes=t?[Mn.DISABLED,Mn.MATCH_NODE_ID,Mn.VISUALIZER_CONFIG,Mn.UPLOAD_MAPPING_FROM_COMPUTER]:[Mn.DISABLED,Mn.MATCH_NODE_ID,Mn.UPLOAD_MAPPING_FROM_COMPUTER],t&&(this.syncNavigationService.mode.set(Mn.VISUALIZER_CONFIG),this.syncNavigationService.updateSyncNavigationData(Mn.VISUALIZER_CONFIG,t))}setSyncMode(t){switch(this.syncNavigationService.mode.set(t),t){case Mn.DISABLED:case Mn.MATCH_NODE_ID:this.syncNavigationService.syncNavigationModeChanged$.next({mode:t});break;default:break}}getModeLabel(t){return jG[t]}handleClickUpload(t){this.syncNavigationService.mode.set(Mn.UPLOAD_MAPPING_FROM_COMPUTER),t.click()}handleUploadedFileChanged(t){let n=t.files;if(!n||n.length===0)return;let r=n[0];this.uploadedFileName="";let o=new FileReader;o.onload=s=>{this.syncNavigationService.processJsonData(s.target?.result,Mn.UPLOAD_MAPPING_FROM_COMPUTER)||(this.uploadedFileName=r.name,this.changeDetectorRef.markForCheck())},o.readAsText(r)}showError(t){console.error(t),this.snackBar.open(t,"Dismiss",{duration:5e3})}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=ce({type:i,selectors:[["sync-navigation-button"]],viewQuery:function(n,r){if(n&1&&Ee(Is,5),n&2){let o;be(o=ye())&&(r.dropdown=o.first)}},standalone:!0,features:[le],decls:10,vars:10,consts:[["help",""],["dropdown",""],["input",""],[1,"container",3,"bubble","overlaySize","hoverDelayMs"],[1,"content",3,"bubbleClick","overlaySize"],[1,"model-explorer-help-popup"],[1,"model-explorer-sync-navigation-dropdown"],[1,"section-label"],[1,"right"],["href","https://github.com/google-ai-edge/model-explorer/wiki/2.-User-Guide#synchronize-navigation","target","_blank"],["bubbleClose","",1,"icon-container"],[1,"close"],[1,"section"],[1,"select-container"],["color","primary",3,"change","disableRipple","checked"],["mat-flat-button","","color","primary",1,"upload-mapping-button",3,"click"],["type","file","accept",".json",1,"upload-mapping-input",3,"change"],[1,"uploaded-file-name"]],template:function(n,r){if(n&1&&(v(0,"div",3)(1,"div",4)(2,"mat-icon"),S(3),b(),v(4,"div"),S(5,"Sync"),b()()(),$(6,Rge,2,0,"ng-template",null,0,Tt)(8,kge,12,0,"ng-template",null,1,Tt)),n&2){let o=ve(7),s=ve(9);re("enabled",r.syncEnabled()),R("bubble",o)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(),R("bubbleClick",s)("overlaySize",r.dropdownSize),w(),re("loading",r.loadingFromCns()),w(),Se(" ",r.syncIcon()," ")}},dependencies:[Hn,Is,Ae,xn,Ti,tt,pt,ao,Aj,VO,Xt],styles:[`@keyframes _ngcontent-%COMP%_rotating{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.container[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;font-size:11px;cursor:pointer;color:#777;padding:0 5px;background-color:#fff;border-radius:99px;border:1px solid #ccc;box-sizing:border-box}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;opacity:.8}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]:hover{opacity:1}.container.enabled[_ngcontent-%COMP%]{background-color:#004fb8;color:#fff}.container.enabled[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff}.container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;height:18px;width:18px}.container[_ngcontent-%COMP%] mat-icon.loading[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_rotating 2s linear infinite} .model-explorer-sync-navigation-dropdown{font-size:12px;background-color:#fff;display:flex;flex-direction:column;padding-bottom:12px} .model-explorer-sync-navigation-dropdown .section-label{padding:8px 12px;margin-bottom:8px;font-size:11px;background:#f1f1f1;font-weight:500;text-transform:uppercase;display:flex;align-items:center;justify-content:space-between} .model-explorer-sync-navigation-dropdown .section-label .right{display:flex;align-items:center;gap:4px} .model-explorer-sync-navigation-dropdown .section-label .right .icon-container{display:flex;cursor:pointer;opacity:.8} .model-explorer-sync-navigation-dropdown .section-label .right .icon-container:hover{opacity:1} .model-explorer-sync-navigation-dropdown .section-label .right mat-icon{font-size:18px;height:18px;width:18px;color:#999} .model-explorer-sync-navigation-dropdown .section{padding-right:16px} .model-explorer-sync-navigation-dropdown mat-radio-button{cursor:pointer} .model-explorer-sync-navigation-dropdown mat-radio-button.cns{margin-top:8px} .model-explorer-sync-navigation-dropdown mat-radio-button>div[mat-internal-form-field]{height:24px} .model-explorer-sync-navigation-dropdown mat-radio-button div:has(>input[type=radio]){transform:scale(.7);margin-right:-8px} .model-explorer-sync-navigation-dropdown mat-radio-button label{letter-spacing:normal;cursor:pointer;font-size:12px;font-family:Google Sans Text,Google Sans,Arial,Helvetica,sans-serif} .model-explorer-sync-navigation-dropdown .select-container{display:flex;flex-direction:column} .model-explorer-sync-navigation-dropdown .upload-mapping-button{margin:2px 0 0 36px;width:90px;height:30px;font-size:12px!important;letter-spacing:normal!important} .model-explorer-sync-navigation-dropdown .upload-mapping-button.cns{margin-top:4px} .model-explorer-sync-navigation-dropdown .upload-mapping-button .mat-mdc-button-touch-target{display:none} .model-explorer-sync-navigation-dropdown .upload-mapping-input{display:none} .model-explorer-sync-navigation-dropdown .uploaded-file-name{margin-left:36px;color:#999;line-break:anywhere;line-height:14px} .model-explorer-sync-navigation-dropdown textarea{height:48px;box-sizing:border-box;margin:4px 0 0 36px;resize:none;border-radius:3px;font-family:Google Sans Text,Google Sans,Arial,Helvetica,sans-serif;font-size:11px;padding:2px;line-break:anywhere} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();var Lge=["panesContainer"],Fge=["splitPane"],Bge=(i,e)=>e.label;function Vge(i,e){i&1&&(v(0,"div",11),S(1),b()),i&2&&(w(),Se(" ",e," "))}function zge(i,e){i&1&&(v(0,"mat-icon"),S(1,"error"),b())}function Uge(i,e){i&1&&ee(0,"mat-spinner",13)}function Hge(i,e){i&1&&ee(0,"mat-spinner",21)}function Gge(i,e){i&1&&(v(0,"mat-icon"),S(1,"check_circle"),b())}function jge(i,e){if(i&1&&(v(0,"div",20),$(1,Hge,1,0,"mat-spinner",21)(2,Gge,2,0,"mat-icon"),v(3,"div",22),S(4),b()()),i&2){let t=e.$implicit;w(),oe(t.processing?1:2),w(3),Se(" ",t.label," ")}}function Wge(i,e){if(i&1&&(v(0,"div",19),rn(1,jge,5,2,"div",20,Bge),b()),i&2){let t=I(3).$implicit,n=I();w(),on(n.getProcessingTasksForPane(t.id))}}function $ge(i,e){if(i&1&&(v(0,"div",12),$(1,zge,2,0,"mat-icon")(2,Uge,1,0,"mat-spinner",13),S(3," Processing graph... "),b(),v(4,"div",14),S(5," Please remain on this page while the model is being processed "),b(),v(6,"div",15)(7,"div",16),ee(8,"div",17),b(),v(9,"div",18)(10,"mat-icon"),S(11,"info"),b()(),$(12,Wge,3,0,"ng-template",null,2,Tt),b()),i&2){let t=ve(13),n=I(2).$implicit,r=I();w(),oe(r.getProcessingError(n)?1:2),w(7),Jt("width",r.getProgressPct(n.id),"%"),w(),R("bubble",t)("hoverDelayMs",100)}}function qge(i,e){if(i&1&&(v(0,"div",8),$(1,Vge,2,1,"div",11)(2,$ge,14,5),b()),i&2){let t,n=I().$implicit,r=I();R("@hideProcessingPanel",void 0)("@.disabled",r.disableAnimation),w(),oe((t=r.getProcessingError(n))?1:2,t)}}function Yge(i,e){if(i&1){let t=ne();v(0,"div",23)(1,"div",24),S(2),b(),v(3,"div",25)(4,"div",26),H("click",function(){B(t);let r=I(2);return V(r.handleClickSwapPane())})("mousedown",function(r){return B(t),V(r.stopPropagation())}),v(5,"mat-icon"),S(6,"swap_horiz"),b()(),v(7,"div",27),H("click",function(){B(t);let r=I().$implicit,o=I();return V(o.handleClickClosePane(r))})("mousedown",function(r){return B(t),V(r.stopPropagation())}),v(8,"mat-icon"),S(9,"close"),b()()()()}if(i&2){let t=I(),n=t.$implicit,r=t.index,o=I();re("extra-left-padding",r===1)("extra-right-padding",r===0),w(2),Se(" ",o.getPaneTitle(n)," ")}}function Xge(i,e){if(i&1&&(v(0,"div",7),$(1,qge,3,3,"div",8)(2,Yge,10,5,"div",9),ee(3,"split-pane",10,1),b()),i&2){let t=e.$implicit,n=e.index,r=I();Jt("width",r.getPaneWidthPct(n),"%"),re("selected",r.isPaneSelected(t)),Ye("data-pane-id",t.id),w(),oe(r.getShowLoading(t)?1:-1),w(),R("ngIf",r.hasSplitPane),w(),R("pane",t)}}function Zge(i,e){if(i&1){let t=ne();v(0,"div",28),H("mousedown",function(r){B(t);let o=I(),s=ve(1);return V(o.handleMouseDownResizer(r,s))}),ee(1,"div",29),b()}if(i&2){let t=I();Jt("left",t.resizerLeft)}}function Qge(i,e){if(i&1&&(v(0,"div",30),ee(1,"sync-navigation-button"),b()),i&2){let t=I();Jt("left",t.resizerLeft)}}var kj=(()=>{class i{changeDetectorRef;appService;workerService;panesContainer;splitPanes=new Zi;processingTasks={};allPanesLoaded;resizingSplitPane=!1;curLeftWidthFraction=1;panes;curUpdateProcessingProgressReq;constructor(t,n,r){this.changeDetectorRef=t,this.appService=n,this.workerService=r,this.panes=this.appService.panes,this.allPanesLoaded=Bt(()=>this.panes().every(o=>o.modelGraph!=null)),lt(()=>{let o=this.panes();o.length>=1&&(this.curLeftWidthFraction=o[0].widthFraction);for(let s of o)s.modelGraph||(this.processingTasks[s.id]=e3.map(a=>({label:a,processing:!0})));this.changeDetectorRef.detectChanges();for(let s=0;s{switch(o.data.eventType){case tr.UPDATE_PROCESSING_PROGRESS:this.handleUpdateProcessingProgressRequest(o.data);break;default:break}})}ngAfterViewInit(){this.panesContainer.nativeElement.addEventListener("mousedown",t=>{let n=t.target.closest(".pane-container");if(!n)return;let r=n.dataset.paneId||"";this.appService.selectPane(r)},!0)}handleClickSwapPane(){this.appService.swapPane()}handleClickClosePane(t){this.appService.closePane(t.id)}getPaneTitle(t){let n=t.modelGraph;return n?`${n.collectionLabel} | ${n.id}`:"-"}handleMouseDownResizer(t,n){t.preventDefault(),document.body.style.cursor="ew-resize";let r=yn(document,"mousemove"),o=yn(window,"mouseup"),a=this.appService.panes()[0].widthFraction,c=n.offsetWidth,l=c*a,d=t.clientX;this.resizingSplitPane=!0,this.changeDetectorRef.markForCheck(),eo([r]).pipe(Ze(o)).subscribe({next:([u])=>{let h=u.clientX-d,p=Math.min(c-200,Math.max(200,l+h));this.curLeftWidthFraction=p/c,this.changeDetectorRef.markForCheck()},complete:()=>{document.body.style.cursor="default",this.resizingSplitPane=!1,this.appService.setPaneWidthFraction(this.curLeftWidthFraction),this.changeDetectorRef.markForCheck()}})}isPaneSelected(t){return t.id===this.appService.selectedPaneId()}getPaneWidthPct(t){return(t===0?this.curLeftWidthFraction:1-this.curLeftWidthFraction)*100}trackByPaneId(t,n){return n.id}getProcessingTasksForPane(t){return this.processingTasks[t]||[]}getProgressPct(t){let n=this.processingTasks[t];return n?n.filter(o=>!o.processing).length/n.length*100:0}getShowLoading(t){return t.modelGraph==null||this.getProcessingTasksForPane(t.id).some(n=>n.error!=null&&n.error!=="")}getProcessingError(t){return this.getProcessingTasksForPane(t.id).find(n=>n.error!=null&&n.error!=="")?.error??""}get hasSplitPane(){return this.appService.panes().length>1}get resizerLeft(){return`calc(${this.curLeftWidthFraction*100}% - 5px)`}get disableAnimation(){return this.appService.testMode}handleUpdateProcessingProgressRequest(t){let n=t.paneId;if(!this.appService.getPaneById(n))return;let s=this.processingTasks[n].find(a=>a.label===t.label);s!=null&&(s.processing=!1,s.error=t.error,this.changeDetectorRef.detectChanges())}static \u0275fac=function(n){return new(n||i)(M(Ne),M(at),M(jc))};static \u0275cmp=ce({type:i,selectors:[["split-panes-container"]],viewQuery:function(n,r){if(n&1&&(Ee(Lge,5),Ee(Fge,5)),n&2){let o;be(o=ye())&&(r.panesContainer=o.first),be(o=ye())&&(r.splitPanes=o)}},standalone:!0,features:[le],decls:5,vars:4,consts:[["panesContainer",""],["splitPane",""],["progressPopup",""],[1,"container"],["class","pane-container",3,"selected","width",4,"ngFor","ngForOf","ngForTrackBy"],["class","resizer split-pane",3,"left","mousedown",4,"ngIf"],[1,"sync-navigation-container",3,"left"],[1,"pane-container"],[1,"loading"],["class","pane-title-container",3,"extra-left-padding","extra-right-padding",4,"ngIf"],[3,"pane"],[1,"error-msg"],[1,"processing-msg-container"],["color","primary","diameter","18"],[1,"stay-on-page-info"],[1,"progress-bar-wrapper"],[1,"progress-bar-container"],[1,"progress-bar-body"],[1,"icon-container",3,"bubble","hoverDelayMs"],[1,"model-explorer-processing-tasks-container"],[1,"processing-task-container"],["color","primary","diameter","16"],[1,"task-label"],[1,"pane-title-container"],[1,"pane-title"],[1,"buttons-container"],["matTooltip","Swap pane",1,"icon-container","swap",3,"click","mousedown"],["matTooltip","Close pane",1,"icon-container","close",3,"click","mousedown"],[1,"resizer","split-pane",3,"mousedown"],[1,"resizer-line"],[1,"sync-navigation-container"]],template:function(n,r){n&1&&(v(0,"div",3,0),$(2,Xge,5,8,"div",4)(3,Zge,2,2,"div",5)(4,Qge,2,2,"div",6),b()),n&2&&(w(2),R("ngForOf",r.panes())("ngForTrackBy",r.trackByPaneId),w(),R("ngIf",r.hasSplitPane),w(),oe(r.hasSplitPane&&r.allPanesLoaded()?4:-1))},dependencies:[Hn,Ae,Mi,Tn,tt,pt,ao,fa,Xt,Yn,Rj,Nj],styles:[`.container[_ngcontent-%COMP%]{flex-grow:1;display:flex;position:relative;width:100%;height:100%}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%]{height:24px;box-sizing:border-box;background-color:#eee;padding:0 12px;display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#999;cursor:pointer;flex-shrink:0}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container.extra-left-padding[_ngcontent-%COMP%]{padding-left:36px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container.extra-right-padding[_ngcontent-%COMP%]{padding-right:36px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%] .buttons-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;color:#999;opacity:.8;margin-left:6px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;height:18px;width:18px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{width:1px;height:12px;background-color:#999;margin:0 4px 0 12px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] split-pane[_ngcontent-%COMP%]{width:100%;flex-grow:1;display:flex;overflow:hidden}.container[_ngcontent-%COMP%] .pane-container.selected[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff}.container[_ngcontent-%COMP%] .pane-container.selected[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%]{background-color:#ea8600;color:#fff}.container[_ngcontent-%COMP%] .pane-container.selected[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{background-color:#fff}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:150;color:#999;background-color:#fff;display:flex;align-items:center;justify-content:center;flex-direction:column}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .processing-msg-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .processing-msg-container[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{margin-right:8px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:18px;margin-right:-30px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-wrapper[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{cursor:pointer;opacity:.8;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-wrapper[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-wrapper[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#ccc;font-size:18px;width:18px;height:18px;margin-left:6px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-container[_ngcontent-%COMP%]{height:7px;width:280px;border:1px solid #ccc;border-radius:99px;box-sizing:border-box;overflow:hidden}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-container[_ngcontent-%COMP%] .progress-bar-body[_ngcontent-%COMP%]{height:100%;transition:width .1s;background-color:#ccc}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .stay-on-page-info[_ngcontent-%COMP%]{font-size:12px;width:100%;display:flex;justify-content:center;margin-top:4px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .error-msg[_ngcontent-%COMP%]{font-size:13px;padding:16px;color:#a00}.container[_ngcontent-%COMP%] .resizer[_ngcontent-%COMP%]{height:100%;width:10px;top:0;left:50%;display:flex;align-items:center;justify-content:center;position:absolute;padding-left:1px;cursor:ew-resize;z-index:200}.container[_ngcontent-%COMP%] .resizer[_ngcontent-%COMP%]:hover{background-color:#0000000a}.container[_ngcontent-%COMP%] .resizer[_ngcontent-%COMP%]:hover .resizer-line[_ngcontent-%COMP%]{border-color:#fcc986}.container[_ngcontent-%COMP%] .resizer[_ngcontent-%COMP%] .resizer-line[_ngcontent-%COMP%]{height:100%;width:1px;border-left:1px solid #999}.container[_ngcontent-%COMP%] .sync-navigation-container[_ngcontent-%COMP%]{position:absolute;transform:translate(-22px);top:0;height:24px;z-index:250} .model-explorer-processing-tasks-container{display:flex;flex-direction:column;padding:12px} .model-explorer-processing-tasks-container .processing-task-container{display:flex;align-items:center;font-size:13px;margin:2px 0} .model-explorer-processing-tasks-container .processing-task-container mat-spinner{margin-right:8px;width:16px} .model-explorer-processing-tasks-container .processing-task-container mat-icon{color:#0a0;font-size:16px;width:16px;height:16px;margin-right:8px} - - - - - - - - - - - - - - - - - -`],data:{animation:[li("hideProcessingPanel",[An("* => void",Rn("150ms 100ms ease-out",Kt({opacity:0,transform:"scale(0.95, 0.95)"})))])]},changeDetection:0})}return i})();function Kge(i,e){if(i&1){let t=ne();v(0,"button",1),H("click",function(){B(t);let r=I();return V(r.handleClickOpenInNewTab())}),v(1,"mat-icon"),S(2,"open_in_new"),b(),S(3," Open in new tab "),b()}}var WC=(()=>{class i{showOpenInNewTab;isChrome=/Chrome/.test(navigator.userAgent);constructor(){let t=new URLSearchParams(window.location.search);this.showOpenInNewTab=t.get("show_open_in_new_tab")==="1"&&this.isChrome}handleClickOpenInNewTab(){let t=new URL(window.location.href),n=new URLSearchParams(t.search);n.delete("show_open_in_new_tab"),t.search=n.toString(),window.open(t.toString(),"_blank")}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=ce({type:i,selectors:[["open-in-new-tab-button"]],standalone:!0,features:[le],decls:1,vars:1,consts:[["mat-flat-button","","color","primary",1,"btn-open-in-tab"],["mat-flat-button","","color","primary",1,"btn-open-in-tab",3,"click"]],template:function(n,r){n&1&&$(0,Kge,4,0,"button",0),n&2&&oe(r.showOpenInNewTab?0:-1)},dependencies:[Ae,xn,Ti,tt,pt]})}return i})();function Jge(i,e){i&1&&(v(0,"mat-icon",15),S(1," turn_left "),b())}function e_e(i,e){if(i&1){let t=ne();v(0,"div",16),H("click",function(r){B(t);let o=I().$implicit,s=I(2);return V(s.handleClickOpenInSplitPane(r,o))}),v(1,"div",17),ee(2,"div",18),b()()}}function t_e(i,e){if(i&1){let t=ne();v(0,"div",7)(1,"div",8)(2,"div",9),H("click",function(){let r=B(t).$implicit,o=I(2);return V(o.handleSelectGraph(r))}),v(3,"div",10),$(4,Jge,2,0,"mat-icon",11),v(5,"div",12),S(6),b()(),v(7,"div",13),S(8),b()(),$(9,e_e,3,0,"div",14),b()()}if(i&2){let t=e.$implicit,n=I(2);Ye("data-id",t.id),w(),Jt("padding-left",n.getGraphItemPaddingLeft(t),"px"),re("selected",t.id===n.selectedGraphId()),w(3),R("ngIf",n.showIndentSymbol(t)),w(2),Se(" ",t.id," "),w(2),Se(" ",n.getGraphNonHiddenNodeCountLabel(t.nonHiddenNodeCount)," "),w(),R("ngIf",n.showOpenInSplitPane)}}function n_e(i,e){if(i&1&&(v(0,"div",4)(1,"div",5),S(2),b(),$(3,t_e,10,9,"div",6),b()),i&2){let t=e.$implicit,n=I();w(2),Se(" ",t.label," "),w(),R("ngForOf",t.graphs)("ngForTrackBy",n.trackByGraph)}}var Lj=24,Fj=(()=>{class i{appService;graphCollectionItems=[];onClose=new Ie;hasFilteredOutGraphs=!1;selectedGraphId=Bt(()=>{let t=this.appService.getSelectedPane();return!t||!t.modelGraph?"":t.modelGraph.id});curFilterText="";constructor(t){this.appService=t}getGraphNonHiddenNodeCountLabel(t){return`${t} node${t===1?"":"s"}`}handleSelectGraph(t){this.onClose.next({}),this.resetFilter(),this.appService.selectGraphInCurrentPane(t.graph),this.appService.curInitialUiState.set(void 0),this.appService.selectNode(this.appService.selectedPaneId(),void 0),this.appService.curToLocateNodeInfo.set(void 0),this.appService.setFlattenLayersInCurrentPane(!1)}handleFilterTextChanged(t){this.curFilterText=t.toLowerCase()}handleClickOpenInSplitPane(t,n){t.stopPropagation(),this.onClose.next({}),this.resetFilter(),this.appService.openGraphInSplitPane(n.graph)}showIndentSymbol(t){return!this.hasFilteredOutGraphs&&(t.graph.level??0)>0}getGraphItemPaddingLeft(t){return this.hasFilteredOutGraphs?Lj:Lj+(t.graph.level??0)*12}trackByCollection(t,n){return`${t}`}trackByGraph(t,n){return`${n.graph.collectionLabel}___${n.graph.id}`}get curGraphCollectionItems(){let t=[];this.hasFilteredOutGraphs=!1;for(let{label:n,collection:r,graphs:o}of this.graphCollectionItems){let s={label:n,collection:r,graphs:[]};for(let a of o){if(this.curFilterText!==""&&!a.id.toLowerCase().includes(this.curFilterText)){this.hasFilteredOutGraphs=!0;continue}s.graphs.push(a)}s.graphs.length>0&&t.push(s)}return t}get showOpenInSplitPane(){return this.appService.panes().length===1}resetFilter(){this.curFilterText="",this.hasFilteredOutGraphs=!1}static \u0275fac=function(n){return new(n||i)(M(at))};static \u0275cmp=ce({type:i,selectors:[["graph-selector-panel"]],inputs:{graphCollectionItems:"graphCollectionItems"},outputs:{onClose:"onClose"},standalone:!0,features:[le],decls:4,vars:3,consts:[["input",""],[1,"container"],["placeholder","Filter graphs",3,"input"],["class","collection-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"collection-container"],[1,"collection-label"],["class","graph-item-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"graph-item-container"],[1,"graph-item"],[1,"graph-info-wrapper",3,"click"],[1,"graph-label-wrapper"],["class","indent-symbol",4,"ngIf"],[1,"graph-label"],[1,"node-count-label"],["class","action-button","matTooltip","Open in split pane","matTooltipPosition","right",3,"click",4,"ngIf"],[1,"indent-symbol"],["matTooltip","Open in split pane","matTooltipPosition","right",1,"action-button",3,"click"],[1,"block-container"],[1,"right-block"]],template:function(n,r){if(n&1){let o=ne();v(0,"div",1)(1,"input",2,0),H("input",function(){B(o);let a=ve(2);return V(r.handleFilterTextChanged(a.value))}),b(),$(3,n_e,4,3,"div",3),b()}n&2&&(R("@transformPanel","showing"),w(3),R("ngForOf",r.curGraphCollectionItems)("ngForTrackBy",r.trackByCollection))},dependencies:[Ae,Mi,Tn,ma,tt,pt,ga,Xt,Yn,br],styles:[`.container[_ngcontent-%COMP%]{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;transform-origin:top center;font-size:12px;padding:8px 0;border-radius:0 0 4px 4px;max-height:100%;overflow-y:auto}.container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:12px;margin:4px 10px;width:calc(100% - 20px);box-sizing:border-box;pointer-events:all;border:1px solid #ccc;height:20px;border-radius:4px;padding:0 2px}.container[_ngcontent-%COMP%] .collection-container[_ngcontent-%COMP%] .collection-label[_ngcontent-%COMP%]{font-weight:700;padding:4px 12px}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:4px 12px 4px 24px;cursor:pointer}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%]:hover{background-color:#0000000a}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item.selected[_ngcontent-%COMP%]{background-color:#c2e7ff}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .graph-info-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-grow:1}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .graph-label-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .indent-symbol[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:#999;margin-right:4px;transform:rotate(-180deg)}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .graph-label[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .node-count-label[_ngcontent-%COMP%]{color:#999;margin-left:12px}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{flex-shrink:0;width:16px;height:16px;display:flex;align-items:center;margin-left:6px;opacity:.8;cursor:pointer}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] .block-container[_ngcontent-%COMP%]{border-radius:3px;border:1px solid #999;height:100%;width:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:flex-end;padding:1px}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] .block-container[_ngcontent-%COMP%] .right-block[_ngcontent-%COMP%]{height:100%;width:50%;background-color:#999;border-top-right-radius:2px;border-bottom-right-radius:2px} - - - - - - - - - - - - - - - - - -`],data:{animation:bC},changeDetection:0})}return i})();var i_e=["input"];function r_e(i,e){if(i&1&&(v(0,"div",16),S(1),b()),i&2){let t=I();w(),Se(" ",t.selectedGraphNodeCount," nodes ")}}function o_e(i,e){if(i&1){let t=ne();v(0,"div",17),H("click",function(){B(t);let r=I();return V(r.handleClickExportGraphJsonToResource())}),v(1,"mat-icon"),S(2,"drive_folder_upload"),b()()}}function s_e(i,e){if(i&1){let t=ne();v(0,"mat-optgroup",18)(1,"mat-option")(2,"input",19,1),H("click",function(r){return B(t),V(r.stopPropagation())})("keydown.space",function(r){return B(t),V(r.stopPropagation())})("input",function(){B(t);let r=ve(3),o=I();return V(o.handleFilterTextChanged(r.value))}),b()()()}}function a_e(i,e){if(i&1){let t=ne();v(0,"div",26),H("click",function(r){B(t);let o=I().$implicit,s=I(2);return V(s.handleClickOpenInSplitPane(r,o))}),v(1,"div",27),ee(2,"div",28),b()()}}function c_e(i,e){if(i&1&&(v(0,"mat-option",22)(1,"div",23)(2,"div",24)(3,"div",7),S(4),b(),v(5,"div",16),S(6),b()(),$(7,a_e,3,0,"div",25),b()()),i&2){let t=e.$implicit,n=I(2);re("selected",t.graph===n.selectedGraph.value),R("value",t.graph),Ye("data-id",t.id),w(4),st(t.id),w(2),Se(" ",t.nonHiddenNodeCount," nodes "),w(),R("ngIf",n.showOpenInSplitPane)}}function l_e(i,e){if(i&1&&(v(0,"mat-optgroup",20),$(1,c_e,8,7,"mat-option",21),b()),i&2){let t=e.$implicit;R("label",t.label),w(),R("ngForOf",t.graphs)}}var d_e=new OffscreenCanvas(500,300),Bj={},Vj=(()=>{class i{appService;overlay;viewContainerRef;mySelector;filterInput;selectedGraph=new vr(void 0);selectedGraphNodeCount=0;selectedGraphCollectionLabel="";selectedCollection;maxGraphItemIdWidth=0;graphCollectionItems=Bt(()=>{let t=this.appService.config();if(!t)return[];let n=this.appService.curGraphCollections();this.nodeLabelsToHide=new Set((t.nodeLabelsToHide||[]).map(s=>s.toLowerCase()));let r=[],o=this.curFilterText().toLowerCase();for(let s of n){let a={label:s.label,collection:s,graphs:[]};for(let c of s.graphs){if(o!==""&&!c.id.toLowerCase().includes(o))continue;let l=c.nodes.filter(u=>!this.nodeLabelsToHide.has(u.label.toLowerCase())).length,d=this.getLabelWidth(` ${c.id} ${l} nodes`)+30;a.graphs.push({id:c.id,graph:c,nonHiddenNodeCount:l,width:d}),this.maxGraphItemIdWidth=Math.max(d+30,this.maxGraphItemIdWidth)}if(a.graphs.length>0){r.push(a);let c=this.getLabelWidth(s.label,12,!0)+30;this.maxGraphItemIdWidth=Math.max(c,this.maxGraphItemIdWidth)}}return r});graphsCount=Bt(()=>{let t=0,n=this.appService.curGraphCollections();for(let r of n)t+=r.graphs.length;return t});nodeLabelsToHide=new Set;curFilterText=ct("");portal=null;selectedGraphId=Bt(()=>{let t=this.appService.getSelectedPane();return!t||!t.modelGraph?"":t.modelGraph.id});constructor(t,n,r){this.appService=t,this.overlay=n,this.viewContainerRef=r,lt(()=>{let o=this.selectedGraphId();o&&this.updateSelectedGraphInfo(o)})}handleFilterTextChanged(t){this.curFilterText.set(t)}handleClickOpenGraphDropdown(t){let n=this.createOverlay(t),r=n.attach(this.portal);r.instance.graphCollectionItems=this.graphCollectionItems(),r.instance.onClose.subscribe(()=>{n.dispose()})}handleGraphSelectorOpenedChanged(t){t||(this.filterInput.nativeElement.value="",this.curFilterText.set(""))}handleGraphSelected(){this.selectedGraph.value&&(this.updateSelectedGraphInfo(this.selectedGraph.value.id),this.appService.selectGraphInCurrentPane(this.selectedGraph.value),this.appService.curInitialUiState.set(void 0),this.appService.selectNode(this.appService.selectedPaneId(),void 0),this.appService.curToLocateNodeInfo.set(void 0),this.appService.setFlattenLayersInCurrentPane(!1))}handleClickOpenInSplitPane(t,n){t.stopPropagation(),this.mySelector.close(),this.appService.openGraphInSplitPane(n.graph)}handleClickDownloadGraphJson(){if(this.selectedCollection==null)return;let t=document.createElement("a");t.download=`${this.selectedGraphCollectionLabel}.json`;let n=`data:text/json;charset=utf-8, ${encodeURIComponent(JSON.stringify(this.selectedCollection,null,2))}`;dc(t,n),t.click()}handleClickExportGraphJsonToResource(){!this.selectedCollection!=null&&iy(`${this.selectedGraphCollectionLabel}.json`,this.selectedCollection)}getGraphLabel(t){return`${t.id} (${t.nodes.length} nodes)`}get graphSelectorDropdownWidth(){return this.maxGraphItemIdWidth}get showOpenInSplitPane(){return this.appService.panes().length===1}get enableExportToResource(){return this.appService.config()?.enableExportToResource===!0}getLabelWidth(t,n=12,r=!1){let o=t,s=Bj[o];if(s==null){let a=d_e.getContext("2d");a.font=`${n}px "Google Sans Text", Arial, Helvetica, sans-serif`,r&&(a.font=`bold ${a.font}`);let l=a.measureText(t).width;Bj[o]=l,s=l}return s}updateSelectedGraphInfo(t){let n=!1;for(let r of this.graphCollectionItems()){for(let o of r.graphs)if(o.graph.id===t){this.selectedGraphNodeCount=o.nonHiddenNodeCount,this.selectedGraphCollectionLabel=r.label,this.selectedCollection=r.collection,this.selectedGraph.setValue(o.graph),n=!0;break}if(n)break}}createOverlay(t){let n=new fi({positionStrategy:this.overlay.position().flexibleConnectedTo(t).withPositions([{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}]),maxHeight:"calc(100% - 70px)",hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",scrollStrategy:this.overlay.scrollStrategies.reposition(),panelClass:"graph-selector-panel"}),r=this.overlay.create(n);return this.portal=new Ai(Fj,this.viewContainerRef),r.backdropClick().subscribe(()=>{r.dispose()}),r}static \u0275fac=function(n){return new(n||i)(M(at),M($t),M(Zt))};static \u0275cmp=ce({type:i,selectors:[["graph-selector"]],viewQuery:function(n,r){if(n&1&&(Ee(zC,5),Ee(i_e,5)),n&2){let o;be(o=ye())&&(r.mySelector=o.first),be(o=ye())&&(r.filterInput=o.first)}},standalone:!0,features:[le],decls:22,vars:7,consts:[["selector",""],["input",""],[1,"container"],[1,"collection-label"],[1,"graph-selector-label",3,"click"],[1,"selector-label-container"],[1,"selector-label-content"],[1,"option-label"],["class","node-count-label",4,"ngIf"],[1,"triangle"],["matTooltip","Download processed graphs json",1,"mat-icon-container",3,"click"],["matTooltip","Export to resource",1,"mat-icon-container"],[1,"select-form"],["color","primary","panelClass","graph-selector-panel",3,"selectionChange","openedChange","formControl"],["class","graph-search-optgroup",4,"ngIf"],[3,"label",4,"ngFor","ngForOf"],[1,"node-count-label"],["matTooltip","Export to resource",1,"mat-icon-container",3,"click"],[1,"graph-search-optgroup"],["placeholder","Filter graphs",3,"click","keydown.space","input"],[3,"label"],[3,"selected","value",4,"ngFor","ngForOf"],[3,"value"],[1,"option-wrapper"],[1,"option-container"],["class","action-button","matTooltip","Open in split pane","matTooltipPosition","right",3,"click",4,"ngIf"],["matTooltip","Open in split pane","matTooltipPosition","right",1,"action-button",3,"click"],[1,"block-container"],[1,"right-block"]],template:function(n,r){if(n&1){let o=ne();v(0,"div",2)(1,"div",3),S(2),b(),v(3,"div",4,0),H("click",function(){B(o);let a=ve(4);return V(r.handleClickOpenGraphDropdown(a))}),v(5,"div",5)(6,"div",6)(7,"div",7),S(8),b(),$(9,r_e,2,1,"div",8),b(),v(10,"div",9),S(11,"\u25BC"),b()()(),v(12,"div",10),H("click",function(){return B(o),V(r.handleClickDownloadGraphJson())}),v(13,"mat-icon"),S(14,"download"),b()(),$(15,o_e,3,0,"div",11),v(16,"mat-form-field",12)(17,"mat-label"),S(18,"Select an option"),b(),v(19,"mat-select",13),H("selectionChange",function(){return B(o),V(r.handleGraphSelected())})("openedChange",function(a){return B(o),V(r.handleGraphSelectorOpenedChanged(a))}),$(20,s_e,4,0,"mat-optgroup",14)(21,l_e,2,2,"mat-optgroup",15),b()()()}n&2&&(w(2),Se(" ",r.selectedGraphCollectionLabel," "),w(6),st((r.selectedGraph.value==null?null:r.selectedGraph.value.id)||"-"),w(),R("ngIf",r.selectedGraph.value),w(6),oe(r.enableExportToResource?15:-1),w(4),R("formControl",r.selectedGraph),w(),R("ngIf",r.graphsCount()>1),w(),R("ngForOf",r.graphCollectionItems()))},dependencies:[Ae,Mi,Tn,ma,pj,VC,tt,pt,ga,zC,Zc,$3,Xt,Yn,br,Ho,vo],styles:[`.container[_ngcontent-%COMP%]{font-size:12px;display:flex;align-items:center;line-height:14px;position:relative}.container[_ngcontent-%COMP%] .collection-label[_ngcontent-%COMP%]{font-weight:700;margin-right:6px}.container[_ngcontent-%COMP%] .select-form[_ngcontent-%COMP%]{height:0;max-height:0;position:absolute;top:26px;right:28px}.container[_ngcontent-%COMP%] .select-form[_ngcontent-%COMP%] >*{height:0}.container[_ngcontent-%COMP%] .selector-label-content[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-grow:1}.container[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:2px}.container[_ngcontent-%COMP%] .node-count-label[_ngcontent-%COMP%]{color:#999;margin-left:12px}.container[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{font-size:10px;margin-left:8px}.container[_ngcontent-%COMP%] .graph-selector-label[_ngcontent-%COMP%]{font-size:12px;border:1px solid #aaa;border-radius:3px;padding:2px 4px;cursor:pointer;flex-grow:1;height:24px;display:flex;box-sizing:border-box}.container[_ngcontent-%COMP%] .graph-selector-label[_ngcontent-%COMP%] .selector-label-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-grow:1}.container[_ngcontent-%COMP%] .graph-selector-label[_ngcontent-%COMP%]:hover{border-color:#ea8600}.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;margin-left:4px;cursor:pointer;opacity:.6}.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]:hover{opacity:1} .graph-selector-panel{background-color:#fff} .graph-selector-panel mat-option{height:24px;font-size:12px;min-height:unset;padding:1px 0;padding-left:20px!important;background-color:none!important} .graph-selector-panel mat-option .option-wrapper{display:flex;align-items:center} .graph-selector-panel mat-option .option-container{display:flex;align-items:center;justify-content:space-between;letter-spacing:normal;font-family:Google Sans Text,Arial,Helvetica,sans-serif;flex-grow:1} .graph-selector-panel mat-option .option-container .option-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#000!important} .graph-selector-panel mat-option .option-container .node-count-label{color:#999} .graph-selector-panel mat-option .action-button{flex-shrink:0;width:16px;height:16px;display:flex;align-items:center;margin-left:4px;opacity:.8;cursor:pointer} .graph-selector-panel mat-option .action-button:hover{opacity:1} .graph-selector-panel mat-option .action-button .block-container{border-radius:3px;border:1px solid #999;height:100%;width:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:flex-end;padding:1px} .graph-selector-panel mat-option .action-button .block-container .right-block{height:100%;width:50%;background-color:#999;border-top-right-radius:2px;border-bottom-right-radius:2px} .graph-selector-panel mat-option span{white-space:break-spaces!important;word-break:break-all;line-height:14px!important;width:100%;box-sizing:border-box;padding-right:10px} .graph-selector-panel mat-option mat-pseudo-checkbox{display:none} .graph-selector-panel mat-option.selected{background-color:#fff1de!important} .graph-selector-panel mat-optgroup span{min-height:unset;font-size:12px;font-weight:700;padding-left:8px} .graph-selector-panel mat-optgroup.graph-search-optgroup{pointer-events:none} .graph-selector-panel mat-optgroup.graph-search-optgroup span{padding:0} .graph-selector-panel mat-optgroup.graph-search-optgroup mat-option{padding-left:16px!important;padding-right:12px!important;height:28px} .graph-selector-panel mat-optgroup.graph-search-optgroup input{font-size:12px;width:100%;box-sizing:border-box;pointer-events:all;border:1px solid #ccc;height:20px;border-radius:4px;padding:0 2px} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();var ei=function(i){return i[i.DT_INVALID=0]="DT_INVALID",i[i.DT_FLOAT=1]="DT_FLOAT",i[i.DT_DOUBLE=2]="DT_DOUBLE",i[i.DT_INT32=3]="DT_INT32",i[i.DT_UINT8=4]="DT_UINT8",i[i.DT_INT16=5]="DT_INT16",i[i.DT_INT8=6]="DT_INT8",i[i.DT_STRING=7]="DT_STRING",i[i.DT_COMPLEX64=8]="DT_COMPLEX64",i[i.DT_INT64=9]="DT_INT64",i[i.DT_BOOL=10]="DT_BOOL",i[i.DT_QINT8=11]="DT_QINT8",i[i.DT_QUINT8=12]="DT_QUINT8",i[i.DT_QINT32=13]="DT_QINT32",i[i.DT_BFLOAT16=14]="DT_BFLOAT16",i[i.DT_QINT16=15]="DT_QINT16",i[i.DT_QUINT16=16]="DT_QUINT16",i[i.DT_UINT16=17]="DT_UINT16",i[i.DT_COMPLEX128=18]="DT_COMPLEX128",i[i.DT_HALF=19]="DT_HALF",i[i.DT_RESOURCE=20]="DT_RESOURCE",i[i.DT_VARIANT=21]="DT_VARIANT",i[i.DT_UINT32=22]="DT_UINT32",i[i.DT_UINT64=23]="DT_UINT64",i}(ei||{}),u_e=new Map([[ei.DT_FLOAT,"float"],[ei.DT_DOUBLE,"double"],[ei.DT_INT32,"int32"],[ei.DT_UINT8,"uint8"],[ei.DT_INT16,"int16"],[ei.DT_INT8,"int8"],[ei.DT_STRING,"string"],[ei.DT_COMPLEX64,"complex64"],[ei.DT_INT64,"int64"],[ei.DT_BOOL,"bool"],[ei.DT_QINT8,"qint8"],[ei.DT_QUINT8,"qint8"],[ei.DT_QINT32,"qint32"],[ei.DT_BFLOAT16,"bfloat16"],[ei.DT_QINT16,"qint16"],[ei.DT_QUINT16,"qint16"],[ei.DT_UINT16,"uint16"],[ei.DT_COMPLEX128,"complex128"],[ei.DT_HALF,"half"],[ei.DT_RESOURCE,"resource"],[ei.DT_VARIANT,"variant"],[ei.DT_UINT32,"uint32"],[ei.DT_UINT64,"uint64"]]);function zj(i,e){let t={};if(e.weightsManifest!=null)for(let s of e.weightsManifest)for(let a of s.weights)t[a.name]=a;let n={},r=e.modelTopology.node.map(s=>{let a={id:s.name,label:s.op,namespace:s.name,incomingEdges:h_e(s),attrs:p_e(s)};return n[a.id]=a,a});for(let s of e.modelTopology.node){if(!n[s.name])continue;let c=s.input||[];for(let l=0;l{let n=e.split(":");return{sourceNodeId:n.length===2?n[0]:e,sourceNodeOutputId:n.length===2?n[1]:"0",targetNodeInputId:`${t}`}})}function p_e(i){let e=i.attr||{},t=[];for(let n of Object.keys(e)){let r=e[n],o="";r.list!=null?(r.list.s||[]).length>0?o=(r.list.s||[]).map(s=>ev({s})).join(", "):(r.list.b||[]).length>0?o=(r.list.b||[]).map(s=>ev({b:s})).join(", "):(r.list.f||[]).length>0?o=(r.list.f||[]).map(s=>ev({f:s})).join(", "):(r.list.i||[]).length>0?o=(r.list.i||[]).map(s=>ev({i:s})).join(", "):o="[]":o=ev(r),t.push({key:n,value:o})}return t}function ev(i){let e="";return i.s!=null?Array.isArray(i.s)?e=`${i.s.map(t=>typeof t=="number"?String.fromCharCode(t):`${t}`).join("")}`:e=atob(i.s):i.i!=null?e=`${i.i}`:i.f!=null?e=`${i.f}`:i.b!=null?e=i?"true":"false":i.type!=null&&(e=u_e.get(i.type)||"unknown"),e}var hf=new URLSearchParams(window.location.search).get("internal_colab")==="1";function $C(i){return!1}function Uj(i){return It(this,null,function*(){return new Promise((e,t)=>{let n=new FileReader;n.onload=r=>{let o=JSON.parse(n.result),{graphCollections:s,error:a}=zO(i.name,o);a?t(a):s&&e(s)},n.readAsText(i)})})}function zO(i,e){return e.modelTopology==null?f_e(e,i):{graphCollections:[zj(i,e)]}}function f_e(i,e){return i.label!=null&&i.graphs!=null?{graphCollections:[i]}:Array.isArray(i)&&i[0].subgraphs!=null?{graphCollections:m_e(i,e)}:Array.isArray(i)&&(i.length===0||i.length>0&&i[0].id!=null&&i[0].nodes!=null)?{graphCollections:[{label:e,graphs:i}]}:{error:"Unsupported JSON format"}}function m_e(i,e){return i.map(t=>({label:t.label===""?e:`${e} (${t.label})`,graphs:t.subgraphs}))}function qC(){return window.meElectronApi}function g_e(i,e){i&1&&(v(0,"div",4),S(1," Run the following command in your console to upgrade: "),v(2,"div",10),S(3," pip install -U ai-edge-model-explorer "),b()())}function __e(i,e){if(i&1&&(v(0,"div",9)(1,"mat-icon",7),S(2,"get_app"),b(),v(3,"a",8),S(4," Download desktop app "),b()()),i&2){let t=I(3);w(3),R("href",t.info().desktopAppUrl,ME)}}function v_e(i,e){if(i&1&&(v(0,"div",2),S(1," Model Explorer "),v(2,"span",3),S(3),b(),S(4," is available. You are running "),v(5,"span",3),S(6),b(),S(7,". "),$(8,g_e,4,0,"div",4),v(9,"div",5)(10,"div",6)(11,"mat-icon",7),S(12,"description"),b(),v(13,"a",8),S(14," Release notes "),b()(),$(15,__e,5,1,"div",9),b()()),i&2){let t=I(2);w(3),Se("v",t.info().version,""),w(3),Se("v",t.info().runningVersion,""),w(2),oe(t.isElectron?-1:8),w(5),R("href",t.info().releaseUrl,ME),w(2),oe(t.isElectron&&t.info().desktopAppUrl?15:-1)}}function b_e(i,e){if(i&1&&(v(0,"div",1)(1,"mat-icon"),S(2,"upgrade"),b(),S(3," New version available "),b(),$(4,v_e,16,5,"ng-template",null,0,Tt)),i&2){let t=ve(5);R("bubble",t)("hoverDelayMs",100)}}var y_e="/api/v1/check_new_version",UO=(()=>{class i{info=ct({version:"",runningVersion:"",releaseUrl:"",desktopAppUrl:""});constructor(){this.checkNewVersion()}checkNewVersion(){return It(this,null,function*(){try{let t=yield fetch(y_e);if(t.ok){let n=yield t.json();this.info.set(n)}}catch{}})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),YC=(()=>{class i{newVersionService;info;isElectron=qC()!=null;constructor(t){this.newVersionService=t,this.info=this.newVersionService.info}static \u0275fac=function(n){return new(n||i)(M(UO))};static \u0275cmp=ce({type:i,selectors:[["new-version-chip"]],standalone:!0,features:[le],decls:1,vars:1,consts:[["upgrade",""],[1,"container",3,"bubble","hoverDelayMs"],[1,"model-explorer-upgrade-popup"],[1,"bold"],[1,"upgrade-command"],[1,"items"],[1,"release-notes"],[1,"item-icon"],["target","_blank",3,"href"],[1,"download-desktop-app"],[1,"code"]],template:function(n,r){n&1&&$(0,b_e,6,2),n&2&&oe(r.info().version!==""?0:-1)},dependencies:[Hn,Ae,tt,pt],styles:[".container[_ngcontent-%COMP%]{font-size:12px;display:flex;align-items:center;color:#ab6c17;background-color:#ffefd9;line-height:18px;border-radius:99px;font-weight:500;padding:2px 10px 2px 4px;cursor:pointer}.container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px} .model-explorer-upgrade-popup{padding:8px;font-size:12px;background-color:#fff;line-height:normal} .model-explorer-upgrade-popup .bold{font-weight:500} .model-explorer-upgrade-popup .upgrade-command{margin-top:12px} .model-explorer-upgrade-popup .code{background-color:#f1f1f1;font-family:monospace;margin-top:4px;padding:4px;font-size:11px} .model-explorer-upgrade-popup .items{display:flex;flex-direction:column;gap:4px;margin-top:12px} .model-explorer-upgrade-popup .release-notes, .model-explorer-upgrade-popup .download-desktop-app{display:flex;align-items:center} .model-explorer-upgrade-popup .item-icon{font-size:16px;width:16px;height:16px;margin-right:4px;color:#777}"]})}return i})();function w_e(i,e){i&1&&ee(0,"mat-spinner",5)}function C_e(i,e){i&1&&(v(0,"mat-icon"),S(1,"add_circle_outline"),b())}function S_e(i,e){i&1&&(v(0,"div",7),S(1," Add custom data and styles to the nodes in the current model "),b())}function M_e(i,e){if(i&1){let t=ne();v(0,"div",8)(1,"div",9)(2,"div"),S(3,"Load json data file"),b(),v(4,"a",10),S(5," Guide "),b()(),v(6,"div",11)(7,"div",12),S(8,"From computer"),b(),v(9,"button",13),H("click",function(){B(t);let r=ve(12);return V(r.click())}),S(10," Upload "),b()(),v(11,"input",14,2),H("change",function(){B(t);let r=ve(12),o=I();return V(o.handleClickUpload(r))}),b()()}}var Hj=(()=>{class i{appService;changeDetectorRef;localStorageService;nodeDataProviderExtensionService;dropdown;extensions=[];loadingExtensions=!0;helpPopupSize={minWidth:0,minHeight:0};dropdownSize={minWidth:0,minHeight:0,maxHeight:500};remoteSourceLoading;constructor(t,n,r,o){this.appService=t,this.changeDetectorRef=n,this.localStorageService=r,this.nodeDataProviderExtensionService=o,this.remoteSourceLoading=this.nodeDataProviderExtensionService.remoteSourceLoading}handleClickUpload(t){let n=t.files;if(!n)return;let r=this.appService.getModelGraphFromSelectedPane();if(r){for(let o of Array.from(n)){let s=new FileReader;s.onload=a=>{let c=Ur();try{let l=this.getNodeDataProviderData(a.target?.result,r);this.nodeDataProviderExtensionService.addRun(c,o.name,"",r,l)}catch(l){this.nodeDataProviderExtensionService.addRun(c,o.name,"",r),this.nodeDataProviderExtensionService.updateRunResults(c,{[r.id]:{results:{}}},r,`Failed to process JSON file. ${l}`)}finally{this.dropdown?.closeDialog()}},s.readAsText(o)}t.value=""}}getNodeDataProviderData(t,n){let r=JSON.parse(t),o={};return r.results!=null&&r.results.results==null?n&&(o[n.id]=r):o=r,o}static \u0275fac=function(n){return new(n||i)(M(at),M(Ne),M(no),M(Mr))};static \u0275cmp=ce({type:i,selectors:[["node-data-provider-dropdown"]],viewQuery:function(n,r){if(n&1&&Ee(Is,5),n&2){let o;be(o=ye())&&(r.dropdown=o.first)}},standalone:!0,features:[le],decls:10,vars:6,consts:[["help",""],["dropdown",""],["input",""],[1,"container",3,"bubble","overlaySize","hoverDelayMs"],[1,"icon-container",3,"bubbleClick","overlaySize"],["color","primary","diameter","18"],[1,"label"],[1,"model-explorer-help-popup"],[1,"model-explorer-node-data-provider-dropdown"],[1,"section-label","upload"],["href","https://github.com/google-ai-edge/model-explorer/wiki/2.-User-Guide#custom-node-data","target","_blank"],[1,"upload-container"],[1,"description"],["mat-flat-button","","color","primary",1,"upload-json-file-button","upload",3,"click"],["type","file","multiple","","accept",".json",1,"upload-per-node-data-input",3,"change"]],template:function(n,r){if(n&1&&(v(0,"div",3)(1,"div",4),$(2,w_e,1,0,"mat-spinner",5)(3,C_e,2,0,"mat-icon"),v(4,"span",6),S(5,"Add per-node data"),b()()(),$(6,S_e,2,0,"ng-template",null,0,Tt)(8,M_e,13,0,"ng-template",null,1,Tt)),n&2){let o=ve(7),s=ve(9);R("bubble",o)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(),R("bubbleClick",s)("overlaySize",r.dropdownSize),w(),oe(r.remoteSourceLoading()?2:3)}},dependencies:[Hn,Is,Ae,xn,Ti,tt,pt,ao,fa,Xt],styles:[`.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;color:#666;padding-bottom:12px;margin-bottom:-12px}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:4px}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{margin-right:6px}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:13px}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{color:#444} .model-explorer-node-data-provider-dropdown{font-size:12px;background-color:#fff;display:flex;flex-direction:column;padding-bottom:8px} .model-explorer-node-data-provider-dropdown .section-label{padding:8px 12px;font-size:11px;background:#f1f1f1;font-weight:500;text-transform:uppercase} .model-explorer-node-data-provider-dropdown .section-label .address-container{text-transform:none;font-weight:400;letter-spacing:normal;color:#777;line-height:12px;padding-bottom:5px;display:flex;align-items:flex-start;margin-top:-4px;margin-left:-2px} .model-explorer-node-data-provider-dropdown .section-label .address-container .address-label{overflow:hidden;line-break:anywhere;line-height:12px;flex-grow:1;padding-top:3px} .model-explorer-node-data-provider-dropdown .section-label .address-container .settings-icon-container{display:flex;align-items:center;justify-content:center;margin-right:4px;pointer-events:all;cursor:pointer;opacity:.7} .model-explorer-node-data-provider-dropdown .section-label .address-container .settings-icon-container:hover{opacity:1} .model-explorer-node-data-provider-dropdown .section-label .address-container .settings-icon-container mat-icon{font-size:16px;width:16px;height:16px} .model-explorer-node-data-provider-dropdown .section-label.upload{display:flex;align-items:center;justify-content:space-between;min-width:180px} .model-explorer-node-data-provider-dropdown .section-label.upload a{font-size:11px;letter-spacing:normal;text-transform:none;pointer-events:all} .model-explorer-node-data-provider-dropdown .description{font-size:12px;color:#777;line-height:18px;letter-spacing:normal} .model-explorer-node-data-provider-dropdown .upload-container{display:flex;flex-direction:column;align-items:flex-start;padding:0 16px;margin-top:12px} .model-explorer-node-data-provider-dropdown .upload-json-file-button{margin:4px 0;width:90px;height:30px;font-size:12px!important;letter-spacing:normal!important} .model-explorer-node-data-provider-dropdown .upload-json-file-button.upload{margin-top:2px} .model-explorer-node-data-provider-dropdown .upload-json-file-button .mat-mdc-button-touch-target{display:none} .model-explorer-node-data-provider-dropdown .or-divider{height:1px;border-top:1px solid #eee;position:relative;margin-top:12px} .model-explorer-node-data-provider-dropdown .or-divider .or-label{font-size:10px;top:-9px;color:#aaa;position:absolute;padding:2px;background-color:#fff;display:flex;align-items:center;justify-content:center;width:16px;left:calc(50% - 8px)} .model-explorer-node-data-provider-dropdown .upload-per-node-data-input{display:none} .model-explorer-node-data-provider-dropdown .no-extension, .model-explorer-node-data-provider-dropdown .loading-extension{padding:12px 0 4px 16px;color:#999;font-size:13px;letter-spacing:normal} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();function E_e(i,e){}var Eu=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0,this.closeOnOverlayDetachments=!0}};var GO=(()=>{let e=class e extends da{constructor(n,r,o,s,a,c,l,d){super(),this._elementRef=n,this._focusTrapFactory=r,this._config=s,this._interactivityChecker=a,this._ngZone=c,this._overlayRef=l,this._focusMonitor=d,this._platform=te(gn),this._focusTrap=null,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this._ariaLabelledByQueue=[],this._changeDetectorRef=te(Ne),this._injector=te(vt),this._isDestroyed=!1,this.attachDomPortal=u=>{this._portalOutlet.hasAttached();let h=this._portalOutlet.attachDomPortal(u);return this._contentAttached(),h},this._document=o,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(n){this._ariaLabelledByQueue.push(n),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(n){let r=this._ariaLabelledByQueue.indexOf(n);r>-1&&(this._ariaLabelledByQueue.splice(r,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachComponentPortal(n);return this._contentAttached(),r}attachTemplatePortal(n){this._portalOutlet.hasAttached();let r=this._portalOutlet.attachTemplatePortal(n);return this._contentAttached(),r}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(n,r){this._interactivityChecker.isFocusable(n)||(n.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let o=()=>{n.removeEventListener("blur",o),n.removeEventListener("mousedown",o),n.removeAttribute("tabindex")};n.addEventListener("blur",o),n.addEventListener("mousedown",o)})),n.focus(r)}_focusByCssSelector(n,r){let o=this._elementRef.nativeElement.querySelector(n);o&&this._forceFocus(o,r)}_trapFocus(){this._isDestroyed||Hi(()=>{let n=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||n.focus();break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement()||this._focusDialogContainer();break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus);break}},{injector:this._injector})}_restoreFocus(){let n=this._config.restoreFocus,r=null;if(typeof n=="string"?r=this._document.querySelector(n):typeof n=="boolean"?r=n?this._elementFocusedBeforeDialogWasOpened:null:n&&(r=n),this._config.restoreFocus&&r&&typeof r.focus=="function"){let o=Gm(),s=this._elementRef.nativeElement;(!o||o===this._document.body||o===s||s.contains(o))&&(this._focusMonitor?(this._focusMonitor.focusVia(r,this._closeInteractionType),this._closeInteractionType=null):r.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){let n=this._elementRef.nativeElement,r=Gm();return n===r||n.contains(r)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=Gm()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Ty),M(Xe,8),M(Eu),M(Fh),M(Fe),M(cc),M(Gr))},e.\u0275cmp=ce({type:e,selectors:[["cdk-dialog-container"]],viewQuery:function(r,o){if(r&1&&Ee(es,7),r&2){let s;be(s=ye())&&(o._portalOutlet=s.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(r,o){r&2&&Ye("id",o._config.id||null)("role",o._config.role)("aria-modal",o._config.ariaModal)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null)},standalone:!0,features:[sn,le],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(r,o){r&1&&$(0,E_e,0,0,"ng-template",0)},dependencies:[es],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2});let i=e;return i})(),tv=class{constructor(e,t){this.overlayRef=e,this.config=t,this.closed=new pe,this.disableClose=t.disableClose,this.backdropClick=e.backdropClick(),this.keydownEvents=e.keydownEvents(),this.outsidePointerEvents=e.outsidePointerEvents(),this.id=t.id,this.keydownEvents.subscribe(n=>{n.keyCode===27&&!this.disableClose&&!bi(n)&&(n.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=e.detachments().subscribe(()=>{t.closeOnOverlayDetachments!==!1&&this.close()})}close(e,t){if(this.containerInstance){let n=this.closed;this.containerInstance._closeInteractionType=t?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),n.next(e),n.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(e="",t=""){return this.overlayRef.updateSize({width:e,height:t}),this}addPanelClass(e){return this.overlayRef.addPanelClass(e),this}removePanelClass(e){return this.overlayRef.removePanelClass(e),this}},I_e=new me("DialogScrollStrategy",{providedIn:"root",factory:()=>{let i=te($t);return()=>i.scrollStrategies.block()}}),T_e=new me("DialogData"),D_e=new me("DefaultDialogConfig");var P_e=0,jO=(()=>{let e=class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(n,r,o,s,a,c){this._overlay=n,this._injector=r,this._defaultOptions=o,this._parentDialog=s,this._overlayContainer=a,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new pe,this._afterOpenedAtThisLevel=new pe,this._ariaHiddenElements=new Map,this.afterAllClosed=Po(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(gi(void 0))),this._scrollStrategy=c}open(n,r){let o=this._defaultOptions||new Eu;r=Z(Z({},o),r),r.id=r.id||`cdk-dialog-${P_e++}`,r.id&&this.getDialogById(r.id);let s=this._getOverlayConfig(r),a=this._overlay.create(s),c=new tv(a,r),l=this._attachContainer(a,c,r);return c.containerInstance=l,this._attachDialogContent(n,c,l,r),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(c),c.closed.subscribe(()=>this._removeOpenDialog(c,!0)),this.afterOpened.next(c),c}closeAll(){HO(this.openDialogs,n=>n.close())}getDialogById(n){return this.openDialogs.find(r=>r.id===n)}ngOnDestroy(){HO(this._openDialogsAtThisLevel,n=>{n.config.closeOnDestroy===!1&&this._removeOpenDialog(n,!1)}),HO(this._openDialogsAtThisLevel,n=>n.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(n){let r=new fi({positionStrategy:n.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:n.scrollStrategy||this._scrollStrategy(),panelClass:n.panelClass,hasBackdrop:n.hasBackdrop,direction:n.direction,minWidth:n.minWidth,minHeight:n.minHeight,maxWidth:n.maxWidth,maxHeight:n.maxHeight,width:n.width,height:n.height,disposeOnNavigation:n.closeOnNavigation});return n.backdropClass&&(r.backdropClass=n.backdropClass),r}_attachContainer(n,r,o){let s=o.injector||o.viewContainerRef?.injector,a=[{provide:Eu,useValue:o},{provide:tv,useValue:r},{provide:cc,useValue:n}],c;o.container?typeof o.container=="function"?c=o.container:(c=o.container.type,a.push(...o.container.providers(o))):c=GO;let l=new Ai(c,o.viewContainerRef,vt.create({parent:s||this._injector,providers:a}),o.componentFactoryResolver);return n.attach(l).instance}_attachDialogContent(n,r,o,s){if(n instanceof Wn){let a=this._createInjector(s,r,o,void 0),c={$implicit:s.data,dialogRef:r};s.templateContext&&(c=Z(Z({},c),typeof s.templateContext=="function"?s.templateContext():s.templateContext)),o.attachTemplatePortal(new Zr(n,null,c,a))}else{let a=this._createInjector(s,r,o,this._injector),c=o.attachComponentPortal(new Ai(n,s.viewContainerRef,a,s.componentFactoryResolver));r.componentRef=c,r.componentInstance=c.instance}}_createInjector(n,r,o,s){let a=n.injector||n.viewContainerRef?.injector,c=[{provide:T_e,useValue:n.data},{provide:tv,useValue:r}];return n.providers&&(typeof n.providers=="function"?c.push(...n.providers(r,n,o)):c.push(...n.providers)),n.direction&&(!a||!a.get(di,null,{optional:!0}))&&c.push({provide:di,useValue:{value:n.direction,change:Ke()}}),vt.create({parent:a||s,providers:c})}_removeOpenDialog(n,r){let o=this.openDialogs.indexOf(n);o>-1&&(this.openDialogs.splice(o,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((s,a)=>{s?a.setAttribute("aria-hidden",s):a.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),r&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let n=this._overlayContainer.getContainerElement();if(n.parentElement){let r=n.parentElement.children;for(let o=r.length-1;o>-1;o--){let s=r[o];s!==n&&s.nodeName!=="SCRIPT"&&s.nodeName!=="STYLE"&&!s.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(s,s.getAttribute("aria-hidden")),s.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let n=this._parentDialog;return n?n._getAfterAllClosed():this._afterAllClosedAtThisLevel}};e.\u0275fac=function(r){return new(r||e)(X($t),X(vt),X(D_e,8),X(e,12),X(sf),X(I_e))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})();function HO(i,e){let t=i.length;for(;t--;)e(i[t])}var Gj=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({providers:[jO],imports:[oo,Es,Py,Es]});let i=e;return i})();function O_e(i,e){}var nv=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0}},WO="mdc-dialog--open",jj="mdc-dialog--opening",Wj="mdc-dialog--closing",R_e=150,A_e=75,N_e=(()=>{let e=class e extends GO{constructor(n,r,o,s,a,c,l,d,u){super(n,r,o,s,a,c,l,u),this._animationMode=d,this._animationStateChanged=new Ie,this._animationsEnabled=this._animationMode!=="NoopAnimations",this._actionSectionCount=0,this._hostElement=this._elementRef.nativeElement,this._enterAnimationDuration=this._animationsEnabled?qj(this._config.enterAnimationDuration)??R_e:0,this._exitAnimationDuration=this._animationsEnabled?qj(this._config.exitAnimationDuration)??A_e:0,this._animationTimer=null,this._finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)},this._finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})}}_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty($j,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(jj,WO)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(WO),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(WO),this._animationsEnabled?(this._hostElement.style.setProperty($j,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(Wj)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(n){this._actionSectionCount+=n,this._changeDetectorRef.markForCheck()}_clearAnimationClasses(){this._hostElement.classList.remove(jj,Wj)}_waitForAnimationToComplete(n,r){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(r,n)}_requestAnimationFrame(n){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(n):n()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(n){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:n})}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer)}attachComponentPortal(n){let r=super.attachComponentPortal(n);return r.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),r}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(Ty),M(Xe,8),M(nv),M(Fh),M(Fe),M(cc),M(jn,8),M(Gr))},e.\u0275cmp=ce({type:e,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(r,o){r&2&&(Fo("id",o._config.id),Ye("aria-modal",o._config.ariaModal)("role",o._config.role)("aria-labelledby",o._config.ariaLabel?null:o._ariaLabelledByQueue[0])("aria-label",o._config.ariaLabel)("aria-describedby",o._config.ariaDescribedBy||null),re("_mat-animation-noopable",!o._animationsEnabled)("mat-mdc-dialog-container-with-actions",o._actionSectionCount>0))},standalone:!0,features:[sn,le],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(r,o){r&1&&(v(0,"div",0)(1,"div",1),$(2,O_e,0,0,"ng-template",2),b()())},dependencies:[es],styles:['.mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 80vw);min-width:var(--mat-dialog-container-min-width, 0)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, 80vw)}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, 0px 11px 15px -7px rgba(0, 0, 0, 0.2), 0px 24px 38px 3px rgba(0, 0, 0, 0.14), 0px 9px 46px 8px rgba(0, 0, 0, 0.12));border-radius:var(--mdc-dialog-container-shape, 4px);background-color:var(--mdc-dialog-container-color, white)}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 0 24px 9px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mdc-dialog-subhead-color, rgba(0, 0, 0, 0.87));font-family:var(--mdc-dialog-subhead-font, Roboto, sans-serif);line-height:var(--mdc-dialog-subhead-line-height, 1.5rem);font-size:var(--mdc-dialog-subhead-size, 1rem);font-weight:var(--mdc-dialog-subhead-weight, 400);letter-spacing:var(--mdc-dialog-subhead-tracking, 0.03125em)}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mdc-dialog-supporting-text-color, rgba(0, 0, 0, 0.6));font-family:var(--mdc-dialog-supporting-text-font, Roboto, sans-serif);line-height:var(--mdc-dialog-supporting-text-line-height, 1.5rem);font-size:var(--mdc-dialog-supporting-text-size, 1rem);font-weight:var(--mdc-dialog-supporting-text-weight, 400);letter-spacing:var(--mdc-dialog-supporting-text-tracking, 0.03125em)}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 8px);justify-content:var(--mat-dialog-actions-alignment, start)}.cdk-high-contrast-active .mat-mdc-dialog-actions{border-top-color:CanvasText}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}'],encapsulation:2});let i=e;return i})(),$j="--mat-dialog-transition-duration";function qj(i){return i==null?null:typeof i=="number"?i:i.endsWith("ms")?Qs(i.substring(0,i.length-2)):i.endsWith("s")?Qs(i.substring(0,i.length-1))*1e3:i==="0"?0:null}var XC=function(i){return i[i.OPEN=0]="OPEN",i[i.CLOSING=1]="CLOSING",i[i.CLOSED=2]="CLOSED",i}(XC||{}),iv=class{constructor(e,t,n){this._ref=e,this._containerInstance=n,this._afterOpened=new pe,this._beforeClosed=new pe,this._state=XC.OPEN,this.disableClose=t.disableClose,this.id=e.id,e.addPanelClass("mat-mdc-dialog-panel"),n._animationStateChanged.pipe(qt(r=>r.state==="opened"),_n(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(qt(r=>r.state==="closed"),_n(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),e.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Zn(this.backdropClick(),this.keydownEvents().pipe(qt(r=>r.keyCode===27&&!this.disableClose&&!bi(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),Yj(this,r.type==="keydown"?"keyboard":"mouse"))})}close(e){this._result=e,this._containerInstance._animationStateChanged.pipe(qt(t=>t.state==="closing"),_n(1)).subscribe(t=>{this._beforeClosed.next(e),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),t.totalTime+100)}),this._state=XC.CLOSING,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(e){let t=this._ref.config.positionStrategy;return e&&(e.left||e.right)?e.left?t.left(e.left):t.right(e.right):t.centerHorizontally(),e&&(e.top||e.bottom)?e.top?t.top(e.top):t.bottom(e.bottom):t.centerVertically(),this._ref.updatePosition(),this}updateSize(e="",t=""){return this._ref.updateSize(e,t),this}addPanelClass(e){return this._ref.addPanelClass(e),this}removePanelClass(e){return this._ref.removePanelClass(e),this}getState(){return this._state}_finishDialogClose(){this._state=XC.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function Yj(i,e,t){return i._closeInteractionType=e,i.close(t)}var k_e=new me("MatMdcDialogData"),L_e=new me("mat-mdc-dialog-default-options"),F_e=new me("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let i=te($t);return()=>i.scrollStrategies.block()}});var B_e=0,Iu=(()=>{let e=class e{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let n=this._parentDialog;return n?n._getAfterAllClosed():this._afterAllClosedAtThisLevel}constructor(n,r,o,s,a,c,l,d){this._overlay=n,this._defaultOptions=s,this._scrollStrategy=a,this._parentDialog=c,this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new pe,this._afterOpenedAtThisLevel=new pe,this.dialogConfigClass=nv,this.afterAllClosed=Po(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(gi(void 0))),this._dialog=r.get(jO),this._dialogRefConstructor=iv,this._dialogContainerType=N_e,this._dialogDataToken=k_e}open(n,r){let o;r=Z(Z({},this._defaultOptions||new nv),r),r.id=r.id||`mat-mdc-dialog-${B_e++}`,r.scrollStrategy=r.scrollStrategy||this._scrollStrategy();let s=this._dialog.open(n,yt(Z({},r),{positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:r},{provide:Eu,useValue:r}]},templateContext:()=>({dialogRef:o}),providers:(a,c,l)=>(o=new this._dialogRefConstructor(a,r,l),o.updatePosition(r?.position),[{provide:this._dialogContainerType,useValue:l},{provide:this._dialogDataToken,useValue:c.data},{provide:this._dialogRefConstructor,useValue:o}])}));return o.componentRef=s.componentRef,o.componentInstance=s.componentInstance,this.openDialogs.push(o),this.afterOpened.next(o),o.afterClosed().subscribe(()=>{let a=this.openDialogs.indexOf(o);a>-1&&(this.openDialogs.splice(a,1),this.openDialogs.length||this._getAfterAllClosed().next())}),o}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(n){return this.openDialogs.find(r=>r.id===n)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(n){let r=n.length;for(;r--;)n[r].close()}};e.\u0275fac=function(r){return new(r||e)(X($t),X(vt),X(Ra,8),X(L_e,8),X(F_e),X(e,12),X(sf),X(jn,8))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),V_e=0,pf=(()=>{let e=class e{constructor(n,r,o){this.dialogRef=n,this._elementRef=r,this._dialog=o,this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=Zj(this._elementRef,this._dialog.openDialogs))}ngOnChanges(n){let r=n._matDialogClose||n._matDialogCloseResult;r&&(this.dialogResult=r.currentValue)}_onButtonClick(n){Yj(this.dialogRef,n.screenX===0&&n.screenY===0?"keyboard":"mouse",this.dialogResult)}};e.\u0275fac=function(r){return new(r||e)(M(iv,8),M(Re),M(Iu))},e.\u0275dir=Ve({type:e,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(r,o){r&1&&H("click",function(a){return o._onButtonClick(a)}),r&2&&Ye("aria-label",o.ariaLabel||null)("type",o.type)},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],type:"type",dialogResult:[0,"mat-dialog-close","dialogResult"],_matDialogClose:[0,"matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],standalone:!0,features:[dn]});let i=e;return i})(),Xj=(()=>{let e=class e{constructor(n,r,o){this._dialogRef=n,this._elementRef=r,this._dialog=o}ngOnInit(){this._dialogRef||(this._dialogRef=Zj(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}};e.\u0275fac=function(r){return new(r||e)(M(iv,8),M(Re),M(Iu))},e.\u0275dir=Ve({type:e,standalone:!0});let i=e;return i})(),ff=(()=>{let e=class e extends Xj{constructor(){super(...arguments),this.id=`mat-mdc-dialog-title-${V_e++}`}_onAdd(){this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)}_onRemove(){this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id)}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Li(e)))(o||e)}})(),e.\u0275dir=Ve({type:e,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(r,o){r&2&&Fo("id",o.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],standalone:!0,features:[sn]});let i=e;return i})(),mf=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275dir=Ve({type:e,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],standalone:!0,features:[I2([aO])]});let i=e;return i})(),gf=(()=>{let e=class e extends Xj{_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}};e.\u0275fac=(()=>{let n;return function(o){return(n||(n=Li(e)))(o||e)}})(),e.\u0275dir=Ve({type:e,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(r,o){r&2&&re("mat-mdc-dialog-actions-align-start",o.align==="start")("mat-mdc-dialog-actions-align-center",o.align==="center")("mat-mdc-dialog-actions-align-end",o.align==="end")},inputs:{align:"align"},standalone:!0,features:[sn]});let i=e;return i})();function Zj(i,e){let t=i.nativeElement.parentElement;for(;t&&!t.classList.contains("mat-mdc-dialog-container");)t=t.parentElement;return t?e.find(n=>n.id===t.id):null}var _a=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({providers:[Iu],imports:[Gj,oo,Es,Ut,Ut]});let i=e;return i})();function u5(i){let e=i.cloneNode(!0),t=e.querySelectorAll("[id]"),n=i.nodeName.toLowerCase();e.removeAttribute("id");for(let r=0;r=n&&t<=r&&e>=o&&e<=s}function sv(i,e,t){i.top+=e,i.bottom=i.top+i.height,i.left+=t,i.right=i.left+i.width}function e5(i,e,t,n){let{top:r,right:o,bottom:s,left:a,width:c,height:l}=i,d=c*e,u=l*e;return n>r-u&&na-d&&t{this.positions.set(t,{scrollPosition:{top:t.scrollTop,left:t.scrollLeft},clientRect:JO(t)})})}handleScroll(e){let t=Ii(e),n=this.positions.get(t);if(!n)return null;let r=n.scrollPosition,o,s;if(t===this._document){let l=this.getViewportScrollPosition();o=l.top,s=l.left}else o=t.scrollTop,s=t.scrollLeft;let a=r.top-o,c=r.left-s;return this.positions.forEach((l,d)=>{l.clientRect&&t!==d&&t.contains(d)&&sv(l.clientRect,a,c)}),r.top=o,r.left=s,{top:a,left:c}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function h5(i,e){let t=i.rootNodes;if(t.length===1&&t[0].nodeType===e.ELEMENT_NODE)return t[0];let n=e.createElement("div");return t.forEach(r=>n.appendChild(r)),n}function eR(i,e,t){for(let n in e)if(e.hasOwnProperty(n)){let r=e[n];r?i.setProperty(n,r,t?.has(n)?"important":""):i.removeProperty(n)}return i}function _f(i,e){let t=e?"":"none";eR(i.style,{"touch-action":e?"":"none","-webkit-user-drag":e?"":"none","-webkit-tap-highlight-color":e?"":"transparent","user-select":t,"-ms-user-select":t,"-webkit-user-select":t,"-moz-user-select":t})}function t5(i,e,t){eR(i.style,{position:e?"":"fixed",top:e?"":"0",opacity:e?"":"0",left:e?"":"-999em"},t)}function eS(i,e){return e&&e!="none"?i+" "+e:i}function n5(i,e){i.style.width=`${e.width}px`,i.style.height=`${e.height}px`,i.style.transform=tS(e.left,e.top)}function tS(i,e){return`translate3d(${Math.round(i)}px, ${Math.round(e)}px, 0)`}function i5(i){let e=i.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(i)*e}function U_e(i){let e=getComputedStyle(i),t=$O(e,"transition-property"),n=t.find(a=>a==="transform"||a==="all");if(!n)return 0;let r=t.indexOf(n),o=$O(e,"transition-duration"),s=$O(e,"transition-delay");return i5(o[r])+i5(s[r])}function $O(i,e){return i.getPropertyValue(e).split(",").map(n=>n.trim())}var H_e=new Set(["position"]),YO=class{get element(){return this._preview}constructor(e,t,n,r,o,s,a,c,l){this._document=e,this._rootElement=t,this._direction=n,this._initialDomRect=r,this._previewTemplate=o,this._previewClass=s,this._pickupPositionOnPage=a,this._initialTransform=c,this._zIndex=l}attach(e){this._preview=this._createPreview(),e.appendChild(this._preview),"showPopover"in this._preview&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(e){this._preview.style.transform=e}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(e){this._preview.classList.add(e)}getTransitionDuration(){return U_e(this._preview)}addEventListener(e,t){this._preview.addEventListener(e,t)}removeEventListener(e,t){this._preview.removeEventListener(e,t)}_createPreview(){let e=this._previewTemplate,t=this._previewClass,n=e?e.template:null,r;if(n&&e){let o=e.matchSize?this._initialDomRect:null,s=e.viewContainer.createEmbeddedView(n,e.context);s.detectChanges(),r=h5(s,this._document),this._previewEmbeddedView=s,e.matchSize?n5(r,o):r.style.transform=tS(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=u5(this._rootElement),n5(r,this._initialDomRect),this._initialTransform&&(r.style.transform=this._initialTransform);return eR(r.style,{"pointer-events":"none",margin:"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},H_e),_f(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("popover","manual"),r.setAttribute("dir",this._direction),t&&(Array.isArray(t)?t.forEach(o=>r.classList.add(o)):r.classList.add(t)),r}},r5=Hr({passive:!0}),ZC=Hr({passive:!1}),o5=Hr({passive:!1,capture:!0}),G_e=800,s5=new Set(["position"]),XO=class{get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(e){e!==this._disabled&&(this._disabled=e,this._toggleNativeDragInteractions(),this._handles.forEach(t=>_f(t,e)))}constructor(e,t,n,r,o,s){this._config=t,this._document=n,this._ngZone=r,this._viewportRuler=o,this._dragDropRegistry=s,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=ct(!1),this._moveEvents=new pe,this._pointerMoveSubscription=Ct.EMPTY,this._pointerUpSubscription=Ct.EMPTY,this._scrollSubscription=Ct.EMPTY,this._resizeSubscription=Ct.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this._disabled=!1,this.beforeStarted=new pe,this.started=new pe,this.released=new pe,this.ended=new pe,this.entered=new pe,this.exited=new pe,this.dropped=new pe,this.moved=this._moveEvents,this._pointerDown=a=>{if(this.beforeStarted.next(),this._handles.length){let c=this._getTargetHandle(a);c&&!this._disabledHandles.has(c)&&!this.disabled&&this._initializeDragSequence(c,a)}else this.disabled||this._initializeDragSequence(this._rootElement,a)},this._pointerMove=a=>{let c=this._getPointerPositionOnPage(a);if(!this._hasStartedDragging()){let d=Math.abs(c.x-this._pickupPositionOnPage.x),u=Math.abs(c.y-this._pickupPositionOnPage.y);if(d+u>=this._config.dragStartThreshold){let p=Date.now()>=this._dragStartTime+this._getDragStartDelay(a),f=this._dropContainer;if(!p){this._endDragSequence(a);return}(!f||!f.isDragging()&&!f.isReceiving())&&(a.cancelable&&a.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(a)))}return}a.cancelable&&a.preventDefault();let l=this._getConstrainedPointerPosition(c);if(this._hasMoved=!0,this._lastKnownPointerPosition=c,this._updatePointerDirectionDelta(l),this._dropContainer)this._updateActiveDropContainer(l,c);else{let d=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,u=this._activeTransform;u.x=l.x-d.x+this._passiveTransform.x,u.y=l.y-d.y+this._passiveTransform.y,this._applyRootElementTransform(u.x,u.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:l,event:a,distance:this._getDragDistance(l),delta:this._pointerDirectionDelta})})},this._pointerUp=a=>{this._endDragSequence(a)},this._nativeDragStart=a=>{if(this._handles.length){let c=this._getTargetHandle(a);c&&!this._disabledHandles.has(c)&&!this.disabled&&a.preventDefault()}else this.disabled||a.preventDefault()},this.withRootElement(e).withParent(t.parentDragRef||null),this._parentPositions=new JC(n),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(e){this._handles=e.map(n=>nr(n)),this._handles.forEach(n=>_f(n,this.disabled)),this._toggleNativeDragInteractions();let t=new Set;return this._disabledHandles.forEach(n=>{this._handles.indexOf(n)>-1&&t.add(n)}),this._disabledHandles=t,this}withPreviewTemplate(e){return this._previewTemplate=e,this}withPlaceholderTemplate(e){return this._placeholderTemplate=e,this}withRootElement(e){let t=nr(e);return t!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{t.addEventListener("mousedown",this._pointerDown,ZC),t.addEventListener("touchstart",this._pointerDown,r5),t.addEventListener("dragstart",this._nativeDragStart,ZC)}),this._initialTransform=void 0,this._rootElement=t),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(e){return this._boundaryElement=e?nr(e):null,this._resizeSubscription.unsubscribe(),e&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(e){return this._parentDragRef=e,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(e){!this._disabledHandles.has(e)&&this._handles.indexOf(e)>-1&&(this._disabledHandles.add(e),_f(e,!0))}enableHandle(e){this._disabledHandles.has(e)&&(this._disabledHandles.delete(e),_f(e,this.disabled))}withDirection(e){return this._direction=e,this}_withDropContainer(e){this._dropContainer=e}getFreeDragPosition(){let e=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:e.x,y:e.y}}setFreeDragPosition(e){return this._activeTransform={x:0,y:0},this._passiveTransform.x=e.x,this._passiveTransform.y=e.y,this._dropContainer||this._applyRootElementTransform(e.x,e.y),this}withPreviewContainer(e){return this._previewContainer=e,this}_sortFromLastPointerPosition(){let e=this._lastKnownPointerPosition;e&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(e),e)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._getShadowRoot()?.removeEventListener("selectstart",c5,o5)}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(e){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:e}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(e),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let t=this._getPointerPositionOnPage(e);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(t),dropPoint:t,event:e})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(e){ov(e)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let t=this._getShadowRoot(),n=this._dropContainer;if(t&&this._ngZone.runOutsideAngular(()=>{t.addEventListener("selectstart",c5,o5)}),n){let r=this._rootElement,o=r.parentNode,s=this._placeholder=this._createPlaceholderElement(),a=this._anchor=this._anchor||this._document.createComment("");o.insertBefore(a,r),this._initialTransform=r.style.transform||"",this._preview=new YO(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3),this._preview.attach(this._getPreviewInsertionPoint(o,t)),t5(r,!1,s5),this._document.body.appendChild(o.replaceChild(s,r)),this.started.next({source:this,event:e}),n.start(),this._initialContainer=n,this._initialIndex=n.getItemIndex(this)}else this.started.next({source:this,event:e}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(n?n.getScrollableParents():[])}_initializeDragSequence(e,t){this._parentDragRef&&t.stopPropagation();let n=this.isDragging(),r=ov(t),o=!r&&t.button!==0,s=this._rootElement,a=Ii(t),c=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+G_e>Date.now(),l=r?Md(t):Sd(t);if(a&&a.draggable&&t.type==="mousedown"&&t.preventDefault(),n||o||c||l)return;if(this._handles.length){let h=s.style;this._rootElementTapHighlight=h.webkitTapHighlightColor||"",h.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(h=>this._updateOnScroll(h)),this._boundaryElement&&(this._boundaryRect=JO(this._boundaryElement));let d=this._previewTemplate;this._pickupPositionInElement=d&&d.template&&!d.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,e,t);let u=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(t);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:u.x,y:u.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,t)}_cleanupDragArtifacts(e){t5(this._rootElement,!0,s5),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let t=this._dropContainer,n=t.getItemIndex(this),r=this._getPointerPositionOnPage(e),o=this._getDragDistance(r),s=t._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:o,dropPoint:r,event:e}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:t,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:o,dropPoint:r,event:e}),t.drop(this,n,this._initialIndex,this._initialContainer,s,o,r,e),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:e,y:t},{x:n,y:r}){let o=this._initialContainer._getSiblingContainerFromPosition(this,e,t);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(e,t)&&(o=this._initialContainer),o&&o!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=o,this._dropContainer.enter(this,e,t,o===this._initialContainer&&o.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:o,currentIndex:o.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(n,r),this._dropContainer._sortItem(this,e,t,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(e,t):this._applyPreviewTransform(e-this._pickupPositionInElement.x,t-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let e=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(e.left,e.top);let t=this._preview.getTransitionDuration();return t===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(n=>{let r=s=>{(!s||this._preview&&Ii(s)===this._preview.element&&s.propertyName==="transform")&&(this._preview?.removeEventListener("transitionend",r),n(),clearTimeout(o))},o=setTimeout(r,t*1.5);this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){let e=this._placeholderTemplate,t=e?e.template:null,n;return t?(this._placeholderRef=e.viewContainer.createEmbeddedView(t,e.context),this._placeholderRef.detectChanges(),n=h5(this._placeholderRef,this._document)):n=u5(this._rootElement),n.style.pointerEvents="none",n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(e,t,n){let r=t===this._rootElement?null:t,o=r?r.getBoundingClientRect():e,s=ov(n)?n.targetTouches[0]:n,a=this._getViewportScrollPosition(),c=s.pageX-o.left-a.left,l=s.pageY-o.top-a.top;return{x:o.left-e.left+c,y:o.top-e.top+l}}_getPointerPositionOnPage(e){let t=this._getViewportScrollPosition(),n=ov(e)?e.touches[0]||e.changedTouches[0]||{pageX:0,pageY:0}:e,r=n.pageX-t.left,o=n.pageY-t.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let a=this._ownerSVGElement.createSVGPoint();return a.x=r,a.y=o,a.matrixTransform(s.inverse())}}return{x:r,y:o}}_getConstrainedPointerPosition(e){let t=this._dropContainer?this._dropContainer.lockAxis:null,{x:n,y:r}=this.constrainPosition?this.constrainPosition(e,this,this._initialDomRect,this._pickupPositionInElement):e;if(this.lockAxis==="x"||t==="x"?r=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||t==="y")&&(n=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:o,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:c,height:l}=this._getPreviewRect(),d=a.top+s,u=a.bottom-(l-s),h=a.left+o,p=a.right-(c-o);n=a5(n,h,p),r=a5(r,d,u)}return{x:n,y:r}}_updatePointerDirectionDelta(e){let{x:t,y:n}=e,r=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,s=Math.abs(t-o.x),a=Math.abs(n-o.y);return s>this._config.pointerDirectionChangeThreshold&&(r.x=t>o.x?1:-1,o.x=t),a>this._config.pointerDirectionChangeThreshold&&(r.y=n>o.y?1:-1,o.y=n),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let e=this._handles.length>0||!this.isDragging();e!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=e,_f(this._rootElement,e))}_removeRootElementListeners(e){e.removeEventListener("mousedown",this._pointerDown,ZC),e.removeEventListener("touchstart",this._pointerDown,r5),e.removeEventListener("dragstart",this._nativeDragStart,ZC)}_applyRootElementTransform(e,t){let n=tS(e,t),r=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=r.transform&&r.transform!="none"?r.transform:""),r.transform=eS(n,this._initialTransform)}_applyPreviewTransform(e,t){let n=this._previewTemplate?.template?void 0:this._initialTransform,r=tS(e,t);this._preview.setTransform(eS(r,n))}_getDragDistance(e){let t=this._pickupPositionOnPage;return t?{x:e.x-t.x,y:e.y-t.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:e,y:t}=this._passiveTransform;if(e===0&&t===0||this.isDragging()||!this._boundaryElement)return;let n=this._rootElement.getBoundingClientRect(),r=this._boundaryElement.getBoundingClientRect();if(r.width===0&&r.height===0||n.width===0&&n.height===0)return;let o=r.left-n.left,s=n.right-r.right,a=r.top-n.top,c=n.bottom-r.bottom;r.width>n.width?(o>0&&(e+=o),s>0&&(e-=s)):e=0,r.height>n.height?(a>0&&(t+=a),c>0&&(t-=c)):t=0,(e!==this._passiveTransform.x||t!==this._passiveTransform.y)&&this.setFreeDragPosition({y:t,x:e})}_getDragStartDelay(e){let t=this.dragStartDelay;return typeof t=="number"?t:ov(e)?t.touch:t?t.mouse:0}_updateOnScroll(e){let t=this._parentPositions.handleScroll(e);if(t){let n=Ii(e);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&sv(this._boundaryRect,t.top,t.left),this._pickupPositionOnPage.x+=t.left,this._pickupPositionOnPage.y+=t.top,this._dropContainer||(this._activeTransform.x-=t.left,this._activeTransform.y-=t.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=Dh(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(e,t){let n=this._previewContainer||"global";if(n==="parent")return e;if(n==="global"){let r=this._document;return t||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return nr(n)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_getTargetHandle(e){return this._handles.find(t=>e.target&&(e.target===t||t.contains(e.target)))}};function a5(i,e,t){return Math.max(e,Math.min(t,i))}function ov(i){return i.type[0]==="t"}function c5(i){i.preventDefault()}function p5(i,e,t){let n=l5(e,i.length-1),r=l5(t,i.length-1);if(n===r)return;let o=i[n],s=r0)return null;let a=this.orientation==="horizontal",c=o.findIndex(y=>y.drag===e),l=o[s],d=o[c].clientRect,u=l.clientRect,h=c>s?1:-1,p=this._getItemOffsetPx(d,u,h),f=this._getSiblingOffsetPx(c,o,h),m=o.slice();return p5(o,c,s),o.forEach((y,g)=>{if(m[g]===y)return;let _=y.drag===e,x=_?p:f,C=_?e.getPlaceholderElement():y.drag.getRootElement();y.offset+=x,a?(C.style.transform=eS(`translate3d(${Math.round(y.offset)}px, 0, 0)`,y.initialTransform),sv(y.clientRect,0,x)):(C.style.transform=eS(`translate3d(0, ${Math.round(y.offset)}px, 0)`,y.initialTransform),sv(y.clientRect,x,0))}),this._previousSwap.overlaps=qO(u,t,n),this._previousSwap.drag=l.drag,this._previousSwap.delta=a?r.x:r.y,{previousIndex:c,currentIndex:s}}enter(e,t,n,r){let o=r==null||r<0?this._getItemIndexFromPointerPosition(e,t,n):r,s=this._activeDraggables,a=s.indexOf(e),c=e.getPlaceholderElement(),l=s[o];if(l===e&&(l=s[o+1]),!l&&(o==null||o===-1||o-1&&s.splice(a,1),l&&!this._dragDropRegistry.isDragging(l)){let d=l.getRootElement();d.parentElement.insertBefore(c,d),s.splice(o,0,e)}else this._element.appendChild(c),s.push(e);c.style.transform="",this._cacheItemPositions()}withItems(e){this._activeDraggables=e.slice(),this._cacheItemPositions()}withSortPredicate(e){this._sortPredicate=e}reset(){this._activeDraggables?.forEach(e=>{let t=e.getRootElement();if(t){let n=this._itemPositions.find(r=>r.drag===e)?.initialTransform;t.style.transform=n||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(e){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(n=>n.drag===e)}updateOnScroll(e,t){this._itemPositions.forEach(({clientRect:n})=>{sv(n,e,t)}),this._itemPositions.forEach(({drag:n})=>{this._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})}withElementContainer(e){this._element=e}_cacheItemPositions(){let e=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(t=>{let n=t.getVisibleElement();return{drag:t,offset:0,initialTransform:n.style.transform||"",clientRect:JO(n)}}).sort((t,n)=>e?t.clientRect.left-n.clientRect.left:t.clientRect.top-n.clientRect.top)}_getItemOffsetPx(e,t,n){let r=this.orientation==="horizontal",o=r?t.left-e.left:t.top-e.top;return n===-1&&(o+=r?t.width-e.width:t.height-e.height),o}_getSiblingOffsetPx(e,t,n){let r=this.orientation==="horizontal",o=t[e].clientRect,s=t[e+n*-1],a=o[r?"width":"height"]*n;if(s){let c=r?"left":"top",l=r?"right":"bottom";n===-1?a-=s.clientRect[c]-o[l]:a+=o[c]-s.clientRect[l]}return a}_shouldEnterAsFirstChild(e,t){if(!this._activeDraggables.length)return!1;let n=this._itemPositions,r=this.orientation==="horizontal";if(n[0].drag!==this._activeDraggables[0]){let s=n[n.length-1].clientRect;return r?e>=s.right:t>=s.bottom}else{let s=n[0].clientRect;return r?e<=s.left:t<=s.top}}_getItemIndexFromPointerPosition(e,t,n,r){let o=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:a,clientRect:c})=>{if(a===e)return!1;if(r){let l=o?r.x:r.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&l===this._previousSwap.delta)return!1}return o?t>=Math.floor(c.left)&&t=Math.floor(c.top)&&nc?d.after(l):d.before(l),p5(this._activeItems,c,o);let u=this._getRootNode().elementFromPoint(t,n);return s.deltaX=r.x,s.deltaY=r.y,s.drag=a,s.overlaps=d===u||d.contains(u),{previousIndex:c,currentIndex:o}}enter(e,t,n,r){let o=r==null||r<0?this._getItemIndexFromPointerPosition(e,t,n):r;o===-1&&(o=this._getClosestItemIndexToPointer(e,t,n));let s=this._activeItems[o],a=this._activeItems.indexOf(e);a>-1&&this._activeItems.splice(a,1),s&&!this._dragDropRegistry.isDragging(s)?(this._activeItems.splice(o,0,e),s.getRootElement().before(e.getPlaceholderElement())):(this._activeItems.push(e),this._element.appendChild(e.getPlaceholderElement()))}withItems(e){this._activeItems=e.slice()}withSortPredicate(e){this._sortPredicate=e}reset(){let e=this._element,t=this._previousSwap;for(let n=this._relatedNodes.length-1;n>-1;n--){let[r,o]=this._relatedNodes[n];r.parentNode===e&&r.nextSibling!==o&&(o===null?e.appendChild(r):o.parentNode===e&&e.insertBefore(r,o))}this._relatedNodes=[],this._activeItems=[],t.drag=null,t.deltaX=t.deltaY=0,t.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(e){return this._activeItems.indexOf(e)}updateOnScroll(){this._activeItems.forEach(e=>{this._dragDropRegistry.isDragging(e)&&e._sortFromLastPointerPosition()})}withElementContainer(e){e!==this._element&&(this._element=e,this._rootNode=void 0)}_getItemIndexFromPointerPosition(e,t,n){let r=this._getRootNode().elementFromPoint(Math.floor(t),Math.floor(n)),o=r?this._activeItems.findIndex(s=>{let a=s.getRootElement();return r===a||a.contains(r)}):-1;return o===-1||!this._sortPredicate(o,e)?-1:o}_getRootNode(){return this._rootNode||(this._rootNode=Dh(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(e,t,n){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let r=1/0,o=-1;for(let s=0;s!0,this.sortPredicate=()=>!0,this.beforeStarted=new pe,this.entered=new pe,this.exited=new pe,this.dropped=new pe,this.sorted=new pe,this.receivingStarted=new pe,this.receivingStopped=new pe,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=Ct.EMPTY,this._verticalScrollDirection=rs.NONE,this._horizontalScrollDirection=Qr.NONE,this._stopScrollTimers=new pe,this._cachedShadowRoot=null,this._scrollableElements=[],this._direction="ltr",this._startScrollInterval=()=>{this._stopScrolling(),DS(0,Tv).pipe(Ze(this._stopScrollTimers)).subscribe(()=>{let a=this._scrollNode,c=this.autoScrollStep;this._verticalScrollDirection===rs.UP?a.scrollBy(0,-c):this._verticalScrollDirection===rs.DOWN&&a.scrollBy(0,c),this._horizontalScrollDirection===Qr.LEFT?a.scrollBy(-c,0):this._horizontalScrollDirection===Qr.RIGHT&&a.scrollBy(c,0)})};let s=this.element=nr(e);this._document=n,this.withOrientation("vertical").withElementContainer(s),t.registerDropContainer(this),this._parentPositions=new JC(n)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(e,t,n,r){this._draggingStarted(),r==null&&this.sortingDisabled&&(r=this._draggables.indexOf(e)),this._sortStrategy.enter(e,t,n,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:e,container:this,currentIndex:this.getItemIndex(e)})}exit(e){this._reset(),this.exited.next({item:e,container:this})}drop(e,t,n,r,o,s,a,c={}){this._reset(),this.dropped.next({item:e,currentIndex:t,previousIndex:n,container:this,previousContainer:r,isPointerOverContainer:o,distance:s,dropPoint:a,event:c})}withItems(e){let t=this._draggables;return this._draggables=e,e.forEach(n=>n._withDropContainer(this)),this.isDragging()&&(t.filter(r=>r.isDragging()).every(r=>e.indexOf(r)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(e){return this._direction=e,this._sortStrategy instanceof nS&&(this._sortStrategy.direction=e),this}connectedTo(e){return this._siblings=e.slice(),this}withOrientation(e){if(e==="mixed")this._sortStrategy=new ZO(this._document,this._dragDropRegistry);else{let t=new nS(this._dragDropRegistry);t.direction=this._direction,t.orientation=e,this._sortStrategy=t}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((t,n)=>this.sortPredicate(t,n,this)),this}withScrollableParents(e){let t=this._container;return this._scrollableElements=e.indexOf(t)===-1?[t,...e]:e.slice(),this}withElementContainer(e){if(e===this._container)return this;let t=nr(this.element),n=this._scrollableElements.indexOf(this._container),r=this._scrollableElements.indexOf(e);return n>-1&&this._scrollableElements.splice(n,1),r>-1&&this._scrollableElements.splice(r,1),this._sortStrategy&&this._sortStrategy.withElementContainer(e),this._cachedShadowRoot=null,this._scrollableElements.unshift(e),this._container=e,this}getScrollableParents(){return this._scrollableElements}getItemIndex(e){return this._isDragging?this._sortStrategy.getItemIndex(e):this._draggables.indexOf(e)}isReceiving(){return this._activeSiblings.size>0}_sortItem(e,t,n,r){if(this.sortingDisabled||!this._domRect||!e5(this._domRect,d5,t,n))return;let o=this._sortStrategy.sort(e,t,n,r);o&&this.sorted.next({previousIndex:o.previousIndex,currentIndex:o.currentIndex,container:this,item:e})}_startScrollingIfNecessary(e,t){if(this.autoScrollDisabled)return;let n,r=rs.NONE,o=Qr.NONE;if(this._parentPositions.positions.forEach((s,a)=>{a===this._document||!s.clientRect||n||e5(s.clientRect,d5,e,t)&&([r,o]=j_e(a,s.clientRect,this._direction,e,t),(r||o)&&(n=a))}),!r&&!o){let{width:s,height:a}=this._viewportRuler.getViewportSize(),c={width:s,height:a,top:0,right:s,bottom:a,left:0};r=m5(c,t),o=g5(c,e),n=window}n&&(r!==this._verticalScrollDirection||o!==this._horizontalScrollDirection||n!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=o,this._scrollNode=n,(r||o)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let e=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=e.msScrollSnapType||e.scrollSnapType||"",e.scrollSnapType=e.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let e=this._container.style;e.scrollSnapType=e.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(t=>t._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(e,t){return this._domRect!=null&&qO(this._domRect,e,t)}_getSiblingContainerFromPosition(e,t,n){return this._siblings.find(r=>r._canReceive(e,t,n))}_canReceive(e,t,n){if(!this._domRect||!qO(this._domRect,t,n)||!this.enterPredicate(e,this))return!1;let r=this._getShadowRoot().elementFromPoint(t,n);return r?r===this._container||this._container.contains(r):!1}_startReceiving(e,t){let n=this._activeSiblings;!n.has(e)&&t.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(n.add(e),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:e,receiver:this,items:t}))}_stopReceiving(e){this._activeSiblings.delete(e),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:e,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(e=>{if(this.isDragging()){let t=this._parentPositions.handleScroll(e);t&&this._sortStrategy.updateOnScroll(t.top,t.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let e=Dh(this._container);this._cachedShadowRoot=e||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let e=this._sortStrategy.getActiveItemsSnapshot().filter(t=>t.isDragging());this._siblings.forEach(t=>t._startReceiving(this,e))}};function m5(i,e){let{top:t,bottom:n,height:r}=i,o=r*f5;return e>=t-o&&e<=t+o?rs.UP:e>=n-o&&e<=n+o?rs.DOWN:rs.NONE}function g5(i,e){let{left:t,right:n,width:r}=i,o=r*f5;return e>=t-o&&e<=t+o?Qr.LEFT:e>=n-o&&e<=n+o?Qr.RIGHT:Qr.NONE}function j_e(i,e,t,n,r){let o=m5(e,r),s=g5(e,n),a=rs.NONE,c=Qr.NONE;if(o){let l=i.scrollTop;o===rs.UP?l>0&&(a=rs.UP):i.scrollHeight-l>i.clientHeight&&(a=rs.DOWN)}if(s){let l=i.scrollLeft;t==="rtl"?s===Qr.RIGHT?l<0&&(c=Qr.RIGHT):i.scrollWidth+l>i.clientWidth&&(c=Qr.LEFT):s===Qr.LEFT?l>0&&(c=Qr.LEFT):i.scrollWidth-l>i.clientWidth&&(c=Qr.RIGHT)}return[a,c]}var QC=Hr({passive:!1,capture:!0}),KC=new Set,W_e=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275cmp=ce({type:e,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],standalone:!0,features:[le],decls:0,vars:0,template:function(r,o){},styles:["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}"],encapsulation:2,changeDetection:0});let i=e;return i})(),$_e=(()=>{let e=class e{constructor(n,r){this._ngZone=n,this._appRef=te(hs),this._environmentInjector=te(Xi),this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=ct([]),this._globalListeners=new Map,this._draggingPredicate=o=>o.isDragging(),this.pointerMove=new pe,this.pointerUp=new pe,this.scroll=new pe,this._preventDefaultWhileDragging=o=>{this._activeDragInstances().length>0&&o.preventDefault()},this._persistentTouchmoveListener=o=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&o.preventDefault(),this.pointerMove.next(o))},this._document=r}registerDropContainer(n){this._dropInstances.has(n)||this._dropInstances.add(n)}registerDragItem(n){this._dragInstances.add(n),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,QC)})}removeDropContainer(n){this._dropInstances.delete(n)}removeDragItem(n){this._dragInstances.delete(n),this.stopDragging(n),this._dragInstances.size===0&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,QC)}startDragging(n,r){if(!(this._activeDragInstances().indexOf(n)>-1)&&(this._loadResets(),this._activeDragInstances.update(o=>[...o,n]),this._activeDragInstances().length===1)){let o=r.type.startsWith("touch");this._globalListeners.set(o?"touchend":"mouseup",{handler:s=>this.pointerUp.next(s),options:!0}).set("scroll",{handler:s=>this.scroll.next(s),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:QC}),o||this._globalListeners.set("mousemove",{handler:s=>this.pointerMove.next(s),options:QC}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((s,a)=>{this._document.addEventListener(a,s.handler,s.options)})})}}stopDragging(n){this._activeDragInstances.update(r=>{let o=r.indexOf(n);return o>-1?(r.splice(o,1),[...r]):r}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(n){return this._activeDragInstances().indexOf(n)>-1}scrolled(n){let r=[this.scroll];return n&&n!==this._document&&r.push(new Et(o=>this._ngZone.runOutsideAngular(()=>{let a=c=>{this._activeDragInstances().length&&o.next(c)};return n.addEventListener("scroll",a,!0),()=>{n.removeEventListener("scroll",a,!0)}}))),Zn(...r)}ngOnDestroy(){this._dragInstances.forEach(n=>this.removeDragItem(n)),this._dropInstances.forEach(n=>this.removeDropContainer(n)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((n,r)=>{this._document.removeEventListener(r,n.handler,n.options)}),this._globalListeners.clear()}_loadResets(){if(!KC.has(this._appRef)){KC.add(this._appRef);let n=iL(W_e,{environmentInjector:this._environmentInjector});this._appRef.onDestroy(()=>{KC.delete(this._appRef),KC.size===0&&n.destroy()})}}};e.\u0275fac=function(r){return new(r||e)(X(Fe),X(Xe))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),q_e={dragStartThreshold:5,pointerDirectionChangeThreshold:5},_5=(()=>{let e=class e{constructor(n,r,o,s){this._document=n,this._ngZone=r,this._viewportRuler=o,this._dragDropRegistry=s}createDrag(n,r=q_e){return new XO(n,r,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(n){return new QO(n,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}};e.\u0275fac=function(r){return new(r||e)(X(Xe),X(Fe),X(la),X($_e))},e.\u0275prov=J({token:e,factory:e.\u0275fac,providedIn:"root"});let i=e;return i})(),KO=new me("CDK_DRAG_PARENT");var v5=new me("CdkDragHandle"),b5=(()=>{let e=class e{get disabled(){return this._disabled}set disabled(n){this._disabled=n,this._stateChanges.next(this)}constructor(n,r){this.element=n,this._parentDrag=r,this._stateChanges=new pe,this._disabled=!1,r?._addHandle(this)}ngOnDestroy(){this._parentDrag?._removeHandle(this),this._stateChanges.complete()}};e.\u0275fac=function(r){return new(r||e)(M(Re),M(KO,12))},e.\u0275dir=Ve({type:e,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:[2,"cdkDragHandleDisabled","disabled",et]},standalone:!0,features:[Ft([{provide:v5,useExisting:e}]),nn]});let i=e;return i})(),Y_e=new me("CDK_DRAG_CONFIG"),X_e="cdk-drag",Z_e=new me("CdkDropList"),y5=(()=>{let e=class e{get disabled(){return this._disabled||this.dropContainer&&this.dropContainer.disabled}set disabled(n){this._disabled=n,this._dragRef.disabled=this._disabled}constructor(n,r,o,s,a,c,l,d,u,h,p){this.element=n,this.dropContainer=r,this._ngZone=s,this._viewContainerRef=a,this._dir=l,this._changeDetectorRef=u,this._selfHandle=h,this._parentDrag=p,this._destroyed=new pe,this._handles=new On([]),this.started=new Ie,this.released=new Ie,this.ended=new Ie,this.entered=new Ie,this.exited=new Ie,this.dropped=new Ie,this.moved=new Et(f=>{let m=this._dragRef.moved.pipe(Je(y=>({source:this,pointerPosition:y.pointerPosition,event:y.event,delta:y.delta,distance:y.distance}))).subscribe(f);return()=>{m.unsubscribe()}}),this._injector=te(vt),this._dragRef=d.createDrag(n,{dragStartThreshold:c&&c.dragStartThreshold!=null?c.dragStartThreshold:5,pointerDirectionChangeThreshold:c&&c.pointerDirectionChangeThreshold!=null?c.pointerDirectionChangeThreshold:5,zIndex:c?.zIndex}),this._dragRef.data=this,e._dragInstances.push(this),c&&this._assignDefaults(c),r&&(this._dragRef._withDropContainer(r._dropListRef),r.addItem(this)),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(n){this._dragRef.setFreeDragPosition(n)}ngAfterViewInit(){Hi(()=>{this._updateRootElement(),this._setupHandlesListener(),this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(n){let r=n.rootElementSelector,o=n.freeDragPosition;r&&!r.firstChange&&this._updateRootElement(),o&&!o.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);let n=e._dragInstances.indexOf(this);n>-1&&e._dragInstances.splice(n,1),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(n){let r=this._handles.getValue();r.push(n),this._handles.next(r)}_removeHandle(n){let r=this._handles.getValue(),o=r.indexOf(n);o>-1&&(r.splice(o,1),this._handles.next(r))}_setPreviewTemplate(n){this._previewTemplate=n}_resetPreviewTemplate(n){n===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(n){this._placeholderTemplate=n}_resetPlaceholderTemplate(n){n===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let n=this.element.nativeElement,r=n;this.rootElementSelector&&(r=n.closest!==void 0?n.closest(this.rootElementSelector):n.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(r||n)}_getBoundaryElement(){let n=this.boundaryElement;return n?typeof n=="string"?this.element.nativeElement.closest(n):nr(n):null}_syncInputs(n){n.beforeStarted.subscribe(()=>{if(!n.isDragging()){let r=this._dir,o=this.dragStartDelay,s=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,a=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;n.disabled=this.disabled,n.lockAxis=this.lockAxis,n.dragStartDelay=typeof o=="object"&&o?o:Qs(o),n.constrainPosition=this.constrainPosition,n.previewClass=this.previewClass,n.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(s).withPreviewTemplate(a).withPreviewContainer(this.previewContainer||"global"),r&&n.withDirection(r.value)}}),n.beforeStarted.pipe(_n(1)).subscribe(()=>{if(this._parentDrag){n.withParent(this._parentDrag._dragRef);return}let r=this.element.nativeElement.parentElement;for(;r;){if(r.classList.contains(X_e)){n.withParent(e._dragInstances.find(o=>o.element.nativeElement===r)?._dragRef||null);break}r=r.parentElement}})}_handleEvents(n){n.started.subscribe(r=>{this.started.emit({source:this,event:r.event}),this._changeDetectorRef.markForCheck()}),n.released.subscribe(r=>{this.released.emit({source:this,event:r.event})}),n.ended.subscribe(r=>{this.ended.emit({source:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event}),this._changeDetectorRef.markForCheck()}),n.entered.subscribe(r=>{this.entered.emit({container:r.container.data,item:this,currentIndex:r.currentIndex})}),n.exited.subscribe(r=>{this.exited.emit({container:r.container.data,item:this})}),n.dropped.subscribe(r=>{this.dropped.emit({previousIndex:r.previousIndex,currentIndex:r.currentIndex,previousContainer:r.previousContainer.data,container:r.container.data,isPointerOverContainer:r.isPointerOverContainer,item:this,distance:r.distance,dropPoint:r.dropPoint,event:r.event})})}_assignDefaults(n){let{lockAxis:r,dragStartDelay:o,constrainPosition:s,previewClass:a,boundaryElement:c,draggingDisabled:l,rootElementSelector:d,previewContainer:u}=n;this.disabled=l??!1,this.dragStartDelay=o||0,r&&(this.lockAxis=r),s&&(this.constrainPosition=s),a&&(this.previewClass=a),c&&(this.boundaryElement=c),d&&(this.rootElementSelector=d),u&&(this.previewContainer=u)}_setupHandlesListener(){this._handles.pipe(En(n=>{let r=n.map(o=>o.element);this._selfHandle&&this.rootElementSelector&&r.push(this.element),this._dragRef.withHandles(r)}),Qn(n=>Zn(...n.map(r=>r._stateChanges.pipe(gi(r))))),Ze(this._destroyed)).subscribe(n=>{let r=this._dragRef,o=n.element.nativeElement;n.disabled?r.disableHandle(o):r.enableHandle(o)})}};e._dragInstances=[],e.\u0275fac=function(r){return new(r||e)(M(Re),M(Z_e,12),M(Xe),M(Fe),M(Zt),M(Y_e,8),M(di,8),M(_5),M(Ne),M(v5,10),M(KO,12))},e.\u0275dir=Ve({type:e,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(r,o){r&2&&re("cdk-drag-disabled",o.disabled)("cdk-drag-dragging",o._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",et],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],standalone:!0,features:[Ft([{provide:KO,useExisting:e}]),nn,dn]});let i=e;return i})();var x5=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({providers:[_5],imports:[Jo]});let i=e;return i})();var tR=(i,e)=>e.type;function K_e(i,e){if(i&1){let t=ne();v(0,"div",18),H("click",function(){let r=B(t).$implicit,o=I(2).$index,s=I();return V(s.handleToggleMatchType(o,r.type))}),v(1,"mat-icon"),S(2),b()()}if(i&2){let t=e.$implicit,n=I(2).$implicit,r=I();re("selected",r.getIsMatchTypeSelected(n,t.type))("disabled",r.getDisableMatchType(n,t.type)),R("matTooltip",t.tooltip),w(2),st(t.type)}}function J_e(i,e){if(i&1){let t=ne();v(0,"div",12)(1,"div",13),S(2,"R"),b(),v(3,"div",14),S(4,"E"),b()(),v(5,"input",15,1),H("change",function(){B(t);let r=ve(6),o=I().$index,s=I();return V(s.handleRegexQueryChanged(o,r.value))}),b(),v(7,"div",16),rn(8,K_e,3,6,"div",17,tR),b()}if(i&2){let t=I().$implicit,n=I();w(5),R("value",t.queryRegex),w(3),on(n.allSearchMatchTypeOptions)}}function eve(i,e){if(i&1){let t=ne();v(0,"div",19),S(1," [\xB7\xB7] "),b(),v(2,"div",20)(3,"input",21,2),H("change",function(){B(t);let r=ve(4),o=ve(8),s=ve(12),a=I().$index,c=I();return V(c.handleAttrValueRangeQueryChanged(a,r.value.trim(),o.value.trim(),s.value.trim()))}),b(),v(5,"div",22),S(6,":"),b(),v(7,"input",23,3),H("change",function(){B(t);let r=ve(4),o=ve(8),s=ve(12),a=I().$index,c=I();return V(c.handleAttrValueRangeQueryChanged(a,r.value.trim(),o.value.trim(),s.value.trim()))}),b(),v(9,"div",24),S(10,","),b(),v(11,"input",25,4),H("change",function(){B(t);let r=ve(4),o=ve(8),s=ve(12),a=I().$index,c=I();return V(c.handleAttrValueRangeQueryChanged(a,r.value.trim(),o.value.trim(),s.value.trim()))}),b()()}if(i&2){let t=I().$implicit,n=I();w(3),R("value",t.attrName),w(4),R("value",n.getAttrValueRangeString(t.min)),w(4),R("value",n.getAttrValueRangeString(t.max))}}function tve(i,e){if(i&1&&(v(0,"option",28),S(1),b()),i&2){let t=e.$implicit,n=I(2).$implicit;R("value",t.type)("selected",t.type===n.nodeType),w(),Se(" ",t.label," ")}}function nve(i,e){if(i&1){let t=ne();v(0,"div",26)(1,"mat-icon"),S(2,"device_hub"),b()(),v(3,"select",27,5),H("change",function(){B(t);let r=ve(4),o=I().$index,s=I();return V(s.handleNodeTypeChanged(o,r.value))}),rn(5,tve,2,3,"option",28,tR),b()}if(i&2){let t=I(2);w(5),on(t.allSearchNodeTypes)}}function ive(i,e){if(i&1){let t=ne();v(0,"div",29),H("click",function(){B(t);let r=I().$index,o=I();return V(o.handleDeleteQuery(r))}),v(1,"mat-icon"),S(2,"delete"),b()()}}function rve(i,e){if(i&1&&(v(0,"div",7),$(1,J_e,10,1)(2,eve,13,3)(3,nve,7,0)(4,ive,3,0,"div",11),b()),i&2){let t,n=e.$implicit,r=I();w(),oe((t=n.type)===r.NodeQueryType.REGEX?1:t===r.NodeQueryType.ATTR_VALUE_RANGE?2:t===r.NodeQueryType.NODE_TYPE?3:-1),w(3),oe(r.getShowDeleteQueryButton(n)?4:-1)}}function ove(i,e){i&1&&(v(0,"div",31)(1,"div",13),S(2,"R"),b(),v(3,"div",14),S(4,"E"),b()())}function sve(i,e){i&1&&(v(0,"div",32),S(1," [\xB7\xB7] "),b())}function ave(i,e){if(i&1){let t=ne();v(0,"div",30),H("click",function(){let r=B(t).$implicit,o=I();return V(o.handleAddQuery(r.type))}),$(1,ove,5,0,"div",31)(2,sve,2,0,"div",32),v(3,"div",33),S(4),b()()}if(i&2){let t,n=e.$implicit,r=I();w(),oe((t=n.type)===r.NodeQueryType.REGEX?1:t===r.NodeQueryType.ATTR_VALUE_RANGE?2:-1),w(3),st(n.label)}}var w5=(()=>{class i{changeDetectorRef;queries=[];queriesUpdated=new Ie;NodeQueryType=Vn;allSearchMatchTypeOptions=[{type:xt.NODE_LABEL,tooltip:"Match label"},{type:xt.ATTRIBUTE,tooltip:"Match attributes"},{type:xt.INPUT_METADATA,tooltip:"Match inputs (op node only)"},{type:xt.OUTPUT_METADATA,tooltip:"Match outputs (op node only)"}];allSearchNodeTypes=[{type:_r.OP_NODES,label:"Op nodes only"},{type:_r.LAYER_NODES,label:"Layer nodes only"},{type:_r.OP_AND_LAYER_NODES,label:"Op and layer nodes"}];allQueryTypes=[{type:Vn.REGEX,label:"Regex"},{type:Vn.ATTR_VALUE_RANGE,label:"Attribute value range"}];curQueries=[];curMatchedNodes={};constructor(t){this.changeDetectorRef=t}ngOnInit(){this.curQueries=JSON.parse(JSON.stringify(this.queries))}setMatchedNodes(t){this.curMatchedNodes=t,this.changeDetectorRef.markForCheck()}handleRegexQueryChanged(t,n){let r=this.curQueries[t];r.queryRegex=n.trim(),this.queriesUpdated.emit([...this.curQueries])}handleAttrValueRangeQueryChanged(t,n,r,o){let s=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;r!==""&&!isNaN(Number(r))&&(s=Number(r)),o!==""&&!isNaN(Number(o))&&(a=Number(o));let c=this.curQueries[t];c.attrName=n,c.min=s,c.max=a,this.queriesUpdated.emit([...this.curQueries])}handleNodeTypeChanged(t,n){let r=this.curQueries[t];r.nodeType=n,this.queriesUpdated.emit([...this.curQueries])}handleToggleMatchType(t,n){if(this.getDisableMatchType(this.curQueries[t],n))return;let r=this.curQueries[t],o=r.matchTypes.indexOf(n);o>=0?r.matchTypes.splice(o,1):r.matchTypes.push(n),this.queriesUpdated.emit([...this.curQueries])}handleDeleteQuery(t){this.curQueries.splice(t,1),this.queriesUpdated.emit([...this.curQueries])}handleAddQuery(t){switch(t){case Vn.REGEX:this.curQueries.push({type:t,queryRegex:"",matchTypes:[xt.NODE_LABEL]});break;case Vn.ATTR_VALUE_RANGE:this.curQueries.push({type:t,attrName:"",min:Number.NEGATIVE_INFINITY,max:Number.POSITIVE_INFINITY});break;case Vn.NODE_TYPE:this.curQueries.push({type:t,nodeType:_r.OP_NODES});break;default:break}this.queriesUpdated.emit([...this.curQueries])}getIsMatchTypeSelected(t,n){return t.matchTypes.includes(n)}getDisableMatchType(t,n){return t.matchTypes.length===1&&t.matchTypes[0]===n}getAttrValueRangeString(t){return t==null||t===Number.NEGATIVE_INFINITY||t===Number.POSITIVE_INFINITY?"":`${t}`}getShowDeleteQueryButton(t){return t.type!==Vn.NODE_TYPE}static \u0275fac=function(n){return new(n||i)(M(Ne))};static \u0275cmp=ce({type:i,selectors:[["complex-queries"]],inputs:{queries:"queries"},outputs:{queriesUpdated:"queriesUpdated"},standalone:!0,features:[le],decls:11,vars:1,consts:[["menu","matMenu"],["queryInput",""],["inputAttrName",""],["inputMin",""],["inputMax",""],["select",""],[1,"container"],[1,"query-container"],[1,"btn-add-query",3,"matMenuTriggerFor"],[1,"model-explorer-add-query-menu"],[1,"menu-item"],["matTooltip","Delete query","matTooltipPosition","right",1,"icon-container","delete"],["matTooltip","Regex","n","","matTooltipPosition","left",1,"model-explorer-regex-icon"],[1,"r"],[1,"e"],["placeholder","Regex",1,"regex","common-input",3,"change","value"],[1,"targets-container"],[1,"icon-container","match-type",3,"matTooltip","selected","disabled"],[1,"icon-container","match-type",3,"click","matTooltip"],["matTooltip","Attribute value range","matTooltipPosition","left",1,"model-explorer-attr-value-range-icon"],[1,"attrs-value-range-container"],["placeholder","Attr name",1,"common-input","attr-name",3,"change","value"],[1,"colon"],["placeholder","min",1,"common-input","min",3,"change","value"],[1,"to"],["placeholder","max",1,"common-input","max",3,"change","value"],["matTooltip","Node type","matTooltipPosition","left",1,"model-explorer-node-type-icon"],[1,"node-type-selector",3,"change"],[3,"value","selected"],["matTooltip","Delete query","matTooltipPosition","right",1,"icon-container","delete",3,"click"],[1,"menu-item",3,"click"],[1,"model-explorer-regex-icon"],[1,"model-explorer-attr-value-range-icon"],[1,"label"]],template:function(n,r){if(n&1&&(v(0,"div",6),rn(1,rve,5,2,"div",7,gr),v(3,"div",8)(4,"mat-icon"),S(5,"add"),b(),S(6," Add query "),b(),v(7,"mat-menu",9,0),rn(9,ave,5,2,"div",10,tR),b()()),n&2){let o=ve(8);w(),on(r.curQueries),w(2),R("matMenuTriggerFor",o),w(6),on(r.allQueryTypes)}},dependencies:[Ae,tt,pt,ua,ns,xl,Xt,Yn],styles:[`.query-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;margin-bottom:4px;position:relative;padding-right:36px}.query-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:22px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;padding:0 4px;outline:none}.query-container[_ngcontent-%COMP%] input.regex[_ngcontent-%COMP%]{flex-grow:1}.query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%]{display:flex;align-items:center;width:240px}.query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] .colon[_ngcontent-%COMP%], .query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] .to[_ngcontent-%COMP%]{font-weight:700;margin:0 2px;height:22px}.query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{min-width:0}.query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] input.attr-name[_ngcontent-%COMP%]{flex-grow:1}.query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] input.min[_ngcontent-%COMP%], .query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] input.max[_ngcontent-%COMP%]{width:50px}.query-container[_ngcontent-%COMP%] .node-type-selector[_ngcontent-%COMP%]{border:1px solid #ccc;border-radius:4px;outline:none;height:23px;cursor:pointer;box-sizing:border-box;width:160px}.query-container[_ngcontent-%COMP%] .icon-container.delete[_ngcontent-%COMP%]{display:flex;position:absolute;right:0;top:4px;cursor:pointer;opacity:.6}.query-container[_ngcontent-%COMP%] .icon-container.delete[_ngcontent-%COMP%]:hover{opacity:1}.query-container[_ngcontent-%COMP%] .icon-container.delete[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.targets-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:2px}.targets-container[_ngcontent-%COMP%] .icon-container.match-type[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;background-color:#ddd;border-radius:4px;cursor:pointer;padding:4px}.targets-container[_ngcontent-%COMP%] .icon-container.match-type.selected[_ngcontent-%COMP%]{background-color:#a3c9ff}.targets-container[_ngcontent-%COMP%] .icon-container.match-type.disabled[_ngcontent-%COMP%]{cursor:default}.targets-container[_ngcontent-%COMP%] .icon-container.match-type[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px;color:#333}.btn-add-query[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;width:fit-content;line-height:16px;opacity:.6;white-space:nowrap;margin-top:2px;-webkit-user-select:none;user-select:none;margin-left:19px}.btn-add-query[_ngcontent-%COMP%]:hover{opacity:1}.btn-add-query[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;margin-right:2px} .model-explorer-add-query-menu .menu-item{letter-spacing:normal!important;font-family:Google Sans Text,Arial,Helvetica,sans-serif!important;font-size:12px;padding:0 8px;cursor:pointer;display:flex;align-items:center} .model-explorer-add-query-menu .menu-item .label{margin-left:6px} .model-explorer-add-query-menu .menu-item:hover{background-color:#eee} .model-explorer-regex-icon{display:flex;width:16px;height:16px;align-items:center;justify-content:center;font-weight:700;-webkit-user-select:none;user-select:none;color:#aaa} .model-explorer-regex-icon .r{font-size:12px} .model-explorer-regex-icon .e{font-size:8px;margin-top:2px} .model-explorer-attr-value-range-icon{display:flex;width:16px;height:16px;align-items:center;justify-content:center;font-size:10px;font-weight:700;-webkit-user-select:none;user-select:none;color:#aaa} .model-explorer-node-type-icon{width:16px;height:16px} .model-explorer-node-type-icon mat-icon{font-size:16px;width:16px;height:16px;color:#aaa} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();function cve(i,e){if(i&1&&(v(0,"div",3),ee(1,"io-tree",4),b()),i&2){let t=I();w(),R("data",t.curIoTreeData)("rendererId",t.rendererId)("tooltipPosition","right")}}var C5=(()=>{class i{nodes=[];rendererId="";labelSuffix="node";popupSize={minWidth:320,maxWidth:640,minHeight:0};curIoTreeData=[];ngOnChanges(t){t.nodes&&(this.curIoTreeData=uc(this.nodes,[],"incoming"))}get label(){let t=this.nodes.length;return`${t} ${this.labelSuffix}${t===1?"":"s"}`}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=ce({type:i,selectors:[["node-list-viewer"]],inputs:{nodes:"nodes",rendererId:"rendererId",labelSuffix:"labelSuffix"},standalone:!0,features:[dn,le],decls:5,vars:5,consts:[["nodeList",""],[1,"container"],["panelClass","model-explorer-node-list-panel",1,"label-container",3,"bubbleClick","overlaySize"],[1,"model-explorer-node-list"],[3,"data","rendererId","tooltipPosition"]],template:function(n,r){if(n&1&&(v(0,"div",1)(1,"div",2),S(2),b(),$(3,cve,2,3,"ng-template",null,0,Tt),b()),n&2){let o=ve(4);w(),re("disabled",r.nodes.length===0),R("bubbleClick",o)("overlaySize",r.popupSize),w(),Se(" ",r.label," ")}},dependencies:[Is,Ae,Sl,tt],styles:[`.container[_ngcontent-%COMP%]{display:flex;position:relative}.label-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:4px 6px;border-radius:4px;background-color:#a3c9ff;line-height:14px;cursor:pointer;-webkit-user-select:none;user-select:none;opacity:.8}.label-container[_ngcontent-%COMP%]:hover{opacity:1}.label-container.disabled[_ngcontent-%COMP%]{pointer-events:none;background-color:#ddd} .model-explorer-node-list{font-size:12px;background-color:#fff;line-height:normal} .model-explorer-node-list-panel bubble-container{width:100%} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();var lve=(i,e)=>e.id;function dve(i,e){i&1&&(v(0,"div",24),S(1," Rules use your defined queries to match nodes for styling. All queries within a rule are connected with "),v(2,"span",25),S(3,"AND"),b(),S(4," logic. "),b())}function uve(i,e){if(i&1&&(v(0,"div",28),ee(1,"node-list-viewer",36),b()),i&2){let t=I().$index,n=I(2);w(),R("nodes",n.getMatchedNodes(t,0))("rendererId",n.leftPaneRendererId)}}function hve(i,e){if(i&1&&(v(0,"div",28)(1,"div",37),S(2,"Left pane"),b(),ee(3,"node-list-viewer",36),b(),v(4,"div",28)(5,"div",37),S(6,"Right pane"),b(),ee(7,"node-list-viewer",36),b()),i&2){let t=I().$index,n=I(2);w(3),R("nodes",n.getMatchedNodes(t,0))("rendererId",n.leftPaneRendererId),w(4),R("nodes",n.getMatchedNodes(t,1))("rendererId",n.rightPaneRendererId)}}function pve(i,e){if(i&1){let t=ne();v(0,"div",41)(1,"label")(2,"input",42,3),H("change",function(){B(t);let r=ve(3),o=I(2).$implicit,s=I().$index,a=I(2);return V(a.handleStyleColorChanged(s,o,r.value))}),b()(),v(4,"input",43,4),H("change",function(){B(t);let r=ve(5),o=I(2).$implicit,s=I().$index,a=I(2);return V(a.handleStyleColorChanged(s,o,r.value))}),b()()}if(i&2){let t=I(2).$implicit,n=I().$implicit,r=I(2);w(),Jt("background-color",r.getSerializedStyleValue(n,t)),w(),R("value",r.getSerializedStyleValue(n,t)),w(2),R("value",r.getSerializedStyleValue(n,t))}}function fve(i,e){if(i&1&&$(0,pve,6,4,"div",41),i&2){let t=I().$implicit,n=I().$implicit,r=I(2);oe(r.getIsStyleEnabled(n,t)?0:-1)}}function mve(i,e){if(i&1){let t=ne();v(0,"div",44)(1,"input",45,5),H("change",function(){B(t);let r=ve(2),o=I(2).$implicit,s=I().$index,a=I(2);return V(a.handleStyleColorChanged(s,o,r.value))}),b()()}if(i&2){let t=I(2).$implicit,n=I().$implicit,r=I(2);w(),R("value",r.getSerializedStyleValue(n,t))}}function gve(i,e){if(i&1&&$(0,mve,3,1,"div",44),i&2){let t=I().$implicit,n=I().$implicit,r=I(2);oe(r.getIsStyleEnabled(n,t)?0:-1)}}function _ve(i,e){if(i&1){let t=ne();v(0,"div",30)(1,"div",38)(2,"input",39,2),H("change",function(){let r=B(t).$implicit,o=ve(3),s=I().$index,a=I(2);return V(a.handleToggleStyle(s,r,o.checked))}),b(),v(4,"div",40),H("click",function(){let r=B(t).$implicit,o=I().$index,s=I(2);return V(s.handleToggleStyle(o,r))}),S(5),b()(),$(6,fve,1,1)(7,gve,1,1),b()}if(i&2){let t,n=e.$implicit,r=I().$implicit,o=I(2);w(2),R("checked",o.getIsStyleEnabled(r,n)),w(3),Se(" ",n.label," "),w(),oe((t=n.type)===o.StyleType.COLOR?6:t===o.StyleType.NUMBER?7:-1)}}function vve(i,e){if(i&1){let t=ne();v(0,"div",46),H("click",function(){B(t);let r=I().$index,o=I(2);return V(o.handleMoveUpRule(r))}),v(1,"mat-icon"),S(2,"arrow_upward_alt"),b()()}}function bve(i,e){if(i&1){let t=ne();v(0,"div",47),H("click",function(){B(t);let r=I().$index,o=I(2);return V(o.handleMoveDownRule(r))}),v(1,"mat-icon"),S(2,"arrow_downward_alt"),b()()}}function yve(i,e){if(i&1){let t=ne();v(0,"tr")(1,"td",19)(2,"complex-queries",26),H("queriesUpdated",function(r){let o=B(t).$index,s=I(2);return V(s.handleQueriesUpdated(o,r))}),b(),v(3,"div",27),$(4,uve,2,2,"div",28)(5,hve,8,4),b()(),v(6,"td",22)(7,"div",29),rn(8,_ve,8,3,"div",30,lve),b()(),v(10,"td",23)(11,"div",31),$(12,vve,3,0,"div",32)(13,bve,3,0,"div",33),v(14,"div",34),H("click",function(){let r=B(t).$index,o=I(2);return V(o.handleDuplicateRule(r))}),v(15,"mat-icon"),S(16,"content_copy"),b()(),v(17,"div",35),H("click",function(){let r=B(t).$index,o=I(2);return V(o.handleDeleteRule(r))}),v(18,"mat-icon"),S(19,"delete"),b()()()()()}if(i&2){let t=e.$implicit,n=e.$index,r=e.$count,o=I(2);w(2),R("queries",t.queries),w(2),oe(o.panesCount===1?4:o.panesCount===2?5:-1),w(4),on(o.allStyles),w(4),oe(n!==0?12:-1),w(),oe(n!==r-1?13:-1)}}function xve(i,e){if(i&1&&(v(0,"table",10)(1,"thead")(2,"th",19)(3,"div",20),S(4," Queries to match nodes "),v(5,"div",21)(6,"mat-icon"),S(7,"help_outline"),b()(),$(8,dve,5,0,"ng-template",null,1,Tt),b()(),v(10,"th",22),S(11,"Styles to apply"),b(),ee(12,"th",23),b(),v(13,"tbody"),rn(14,yve,20,4,"tr",null,gr),b()()),i&2){let t=ve(9),n=I();w(5),R("bubble",t)("overlaySize",n.helpPopupSize)("hoverDelayMs",10),w(9),on(n.rules())}}function wve(i,e){i&1&&(v(0,"div",11),S(1,' No rules configured. Click the "Add rule" button below to get started. '),b())}var S5=(()=>{class i{appService;changeDetectorRef;nodeStylerService;rules;hasNonEmptyNodeStylerRules;hasRules=Bt(()=>this.rules().length>0);StyleType=cf;NodeStylerQueryType=Vn;allStyles=zG;allSearchMatchTypeOptions=[{type:xt.NODE_LABEL,tooltip:"Match label"},{type:xt.ATTRIBUTE,tooltip:"Match attributes"},{type:xt.INPUT_METADATA,tooltip:"Match inputs (op node only)"},{type:xt.OUTPUT_METADATA,tooltip:"Match outputs (op node only)"}];allSearchNodeTypes=[{type:_r.OP_NODES,label:"Ops only"},{type:_r.LAYER_NODES,label:"Layers only"},{type:_r.OP_AND_LAYER_NODES,label:"Ops & layers"}];allQueryTypes=[{type:Vn.REGEX,label:"Regex"},{type:Vn.ATTR_VALUE_RANGE,label:"Attribute value range"}];helpPopupSize={minWidth:0,minHeight:0,maxWidth:340};curMatchedNodes={};constructor(t,n,r){this.appService=t,this.changeDetectorRef=n,this.nodeStylerService=r,this.rules=this.nodeStylerService.rules,this.hasNonEmptyNodeStylerRules=this.nodeStylerService.hasNonEmptyNodeStylerRules,lt(()=>{this.curMatchedNodes=this.nodeStylerService.matchedNodes(),this.changeDetectorRef.markForCheck()})}handleClickAddRule(){this.nodeStylerService.addNewRule()}handleClickExportRules(){let t=document.createElement("a");t.download="node_styler_rules.json";let n=`data:text/json;charset=utf-8, ${encodeURIComponent(JSON.stringify(this.rules(),null,2))}`;dc(t,n),t.click()}handleClickImportRules(t){if(!t.files||t.files.length===0)return;let n=new FileReader;n.onload=r=>{let o=JSON.parse(r.target?.result);this.nodeStylerService.updateRules(o)},n.readAsText(t.files[0])}handleQueriesUpdated(t,n){this.nodeStylerService.updateQueries(t,n)}handleToggleStyle(t,n,r){this.nodeStylerService.toggleStyle(t,n,r)}handleStyleColorChanged(t,n,r){let o=r;r.startsWith("rgb")?o=this.rgbToHex(r):r.startsWith("#")||(o=Jb[r]||r),this.nodeStylerService.updateStyleValue(t,n,o)}handleNumberChanged(t,n,r){let o=Number(r);isNaN(o)||(o=Math.min(10,Math.max(.001,o)),this.nodeStylerService.updateStyleValue(t,n,`${o}`))}handleMoveUpRule(t){this.nodeStylerService.moveUpRule(t)}handleMoveDownRule(t){this.nodeStylerService.moveDownRule(t)}handleDuplicateRule(t){this.nodeStylerService.duplicateRule(t)}handleDeleteRule(t){this.nodeStylerService.deleteRule(t)}getIsStyleEnabled(t,n){return t.styles[n.id]!=null}getSerializedStyleValue(t,n){return fd(t,n.id)}getMatchedNodes(t,n){return(this.curMatchedNodes[t]||{})[n]||[]}get panesCount(){return this.appService.panes().length}get leftPaneRendererId(){return this.appService.panes()[0].id}get rightPaneRendererId(){return this.appService.panes()[1].id}rgbToHex(t){let n=t.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+\.{0,1}\d*))?\)$/);if(n){let r=n.slice(1,4).map(o=>Number(o).toString(16).padStart(2,"0")).join("");return r[0]===r[1]&&r[2]===r[3]&&r[4]===r[5]?`#${r[0]}${r[2]}${r[4]}`:`#${r}`}return"unknown"}static \u0275fac=function(n){return new(n||i)(M(at),M(Ne),M(pa))};static \u0275cmp=ce({type:i,selectors:[["node-styler-dialog"]],standalone:!0,features:[le],decls:26,vars:1,consts:[["input",""],["helpQuery",""],["cb",""],["colorPicker",""],["colorInput",""],["numberInput",""],["mat-dialog-title","","cdkDrag","","cdkDragRootElement",".cdk-overlay-pane","cdkDragHandle","",1,"title-container"],[1,"title"],[1,"description"],["mat-dialog-content","",1,"dialog-content"],["border","0","cellspacing","0","cellpadding","0",1,"rules-table"],[1,"no-rules-message"],["mat-dialog-actions","",1,"btns-container"],[1,"left-btns"],["mat-flat-button","","color","primary",1,"action-button","add-rule",3,"click"],["mat-flat-button","","color","primary",1,"action-button","load-rules",3,"click"],["mat-flat-button","","color","primary",1,"action-button","save-rules",3,"click"],["type","file","accept","application/JSON",1,"import-rules-input",3,"change"],["mat-button","","mat-dialog-close","",1,"close"],[1,"query"],[1,"query-header-container"],[1,"icon-container",3,"bubble","overlaySize","hoverDelayMs"],[1,"styles"],[1,"action-btns"],[1,"model-explorer-help-popup"],[1,"bold"],[3,"queriesUpdated","queries"],[1,"node-list-viewers-container"],[1,"node-list-viewer-container"],[1,"styles-container"],[1,"color-style-container"],[1,"action-buttons-container"],["matTooltip","Move up",1,"icon-container","move-up"],["matTooltip","Move down",1,"icon-container","move-down"],["matTooltip","Duplicate rule",1,"icon-container","duplicate-rule",3,"click"],["matTooltip","Delete rule",1,"icon-container","delete-rule",3,"click"],["labelSuffix","matched node",3,"nodes","rendererId"],[1,"label"],[1,"style-name-container"],["type","checkbox",3,"change","checked"],[3,"click"],[1,"color-picker-container"],["type","color",3,"change","value"],["type","text",3,"change","value"],[1,"number-editor-container"],[3,"change","value"],["matTooltip","Move up",1,"icon-container","move-up",3,"click"],["matTooltip","Move down",1,"icon-container","move-down",3,"click"]],template:function(n,r){if(n&1){let o=ne();v(0,"div",6)(1,"div",7),S(2,"Node styler"),b(),v(3,"div",8),S(4," Use the buttons below to apply styling rules to this graph "),b()(),v(5,"div",9),$(6,xve,16,3,"table",10)(7,wve,2,0,"div",11),b(),v(8,"div",12)(9,"div",13)(10,"button",14),H("click",function(){return B(o),V(r.handleClickAddRule())}),v(11,"mat-icon"),S(12,"add"),b(),S(13," Add rule "),b(),v(14,"button",15),H("click",function(){B(o);let a=ve(23);return V(a.click())}),v(15,"mat-icon"),S(16,"file_upload"),b(),S(17," Import rules "),b(),v(18,"button",16),H("click",function(){return B(o),V(r.handleClickExportRules())}),v(19,"mat-icon"),S(20,"file_download"),b(),S(21," Export rules "),b(),v(22,"input",17,0),H("change",function(){B(o);let a=ve(23);return V(r.handleClickImportRules(a))}),b()(),v(24,"button",18),S(25,"Done"),b()()}n&2&&(w(6),oe(r.hasRules()?6:7))},dependencies:[Hn,Ae,w5,x5,y5,b5,xn,Ti,_a,pf,ff,gf,mf,tt,pt,ua,Xt,Yn,C5],styles:[`*[_ngcontent-%COMP%]:not(mat-icon){font-family:Google Sans Text,Arial,Helvetica,sans-serif!important;letter-spacing:normal!important}.title-container[_ngcontent-%COMP%]{position:relative}.title[_ngcontent-%COMP%]{font-size:24px;font-weight:500;margin-top:-30px}.description[_ngcontent-%COMP%]{line-height:14px;font-size:12px;color:#777;margin-top:6px;margin-bottom:4px;font-weight:400}.btns-container[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:space-between;padding:0 24px}.action-button[_ngcontent-%COMP%]{height:30px;padding:0 10px;font-size:13px}.action-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:2px}.import-rules-input[_ngcontent-%COMP%]{display:none}.dialog-content[_ngcontent-%COMP%]{padding:0;box-sizing:border-box;border-top:1px solid #e6e6e6;border-bottom:1px solid #e6e6e6;background-color:#f9f9f9;overflow:hidden auto}.dialog-content[_ngcontent-%COMP%] .no-rules-message[_ngcontent-%COMP%]{padding:12px 24px;font-size:12px;color:#777}.common-input[_ngcontent-%COMP%]{padding:0 4px;border:1px solid #ccc;border-radius:4px;height:22px;box-sizing:border-box;outline:none}.common-input[_ngcontent-%COMP%]:focus{border-color:#1a73e8;outline:1px solid #1a73e8}.rules-table[_ngcontent-%COMP%]{width:100%;font-size:12px}.rules-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:not(.action-btns), .rules-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:not(.action-btns){border-right:1px solid #e6e6e6}.rules-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom:1px solid #e6e6e6}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{text-align:left;height:32px;position:sticky;top:0;background-color:#f1f1f1;z-index:100}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:500;border-bottom:1px solid #e6e6e6}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.query[_ngcontent-%COMP%]{padding-left:24px;width:410px}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.query[_ngcontent-%COMP%] .query-header-container[_ngcontent-%COMP%]{display:flex;align-items:center}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.query[_ngcontent-%COMP%] .query-header-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{width:16px;height:16px;opacity:.6;cursor:pointer;margin-left:4px}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.query[_ngcontent-%COMP%] .query-header-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.query[_ngcontent-%COMP%] .query-header-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.target[_ngcontent-%COMP%]{padding-left:12px}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.styles[_ngcontent-%COMP%]{padding-left:12px;min-width:254px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-top:8px;padding-bottom:8px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.query[_ngcontent-%COMP%]{padding-left:24px;padding-right:12px;vertical-align:top}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.query[_ngcontent-%COMP%] .node-list-viewers-container[_ngcontent-%COMP%]{display:flex;gap:12px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.query[_ngcontent-%COMP%] .node-list-viewer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:fit-content;margin-top:12px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.query[_ngcontent-%COMP%] .node-list-viewer-container[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{line-height:18px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.target[_ngcontent-%COMP%]{vertical-align:top;padding-left:12px;padding-right:12px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.styles[_ngcontent-%COMP%]{padding-left:12px;padding-right:18px;vertical-align:top}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.styles[_ngcontent-%COMP%] .styles-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.action-btns[_ngcontent-%COMP%]{vertical-align:top;padding-right:12px;width:80px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.action-btns[_ngcontent-%COMP%] .action-buttons-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:2px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.action-btns[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;opacity:.6;cursor:pointer;margin-top:2px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.action-btns[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.action-btns[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%]{display:flex;align-items:center}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .style-name-container[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;width:100px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .style-name-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{cursor:pointer}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .color-picker-container[_ngcontent-%COMP%]{display:flex;align-items:center;overflow:hidden;border-radius:4px;border:1px solid #ccc;margin-left:4px;width:fit-content;background-color:#fff;box-sizing:border-box;height:24px;position:relative}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .color-picker-container[_ngcontent-%COMP%]:focus-within{border-color:#1a73e8;outline:1px solid #1a73e8}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .color-picker-container[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:inline-block;width:16px;height:16px;margin:2px;background-color:red;border-radius:4px;cursor:pointer;border:1px solid #ddd}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .color-picker-container[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{visibility:hidden}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .color-picker-container[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]{width:100px;border:none;height:100%;background-color:transparent;outline:none}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .number-editor-container[_ngcontent-%COMP%]{display:flex;align-items:center;overflow:hidden;margin-left:4px;width:fit-content}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .number-editor-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:80px;height:28px;border:1px solid #ccc;border-radius:4px;background-color:transparent;box-sizing:border-box;padding:0 4px;outline:none} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();var M5=(()=>{class i{dialog;nodeStylerService;viewContainerRef;hasNonEmptyNodeStylerRules;constructor(t,n,r){this.dialog=t,this.nodeStylerService=n,this.viewContainerRef=r,this.hasNonEmptyNodeStylerRules=this.nodeStylerService.hasNonEmptyNodeStylerRules}handleClickOpenDialog(){this.dialog.open(S5,{width:"800px",height:"600px",viewContainerRef:this.viewContainerRef,hasBackdrop:!1,autoFocus:!1})}static \u0275fac=function(n){return new(n||i)(M(Iu),M(pa),M(Zt))};static \u0275cmp=ce({type:i,selectors:[["node-styler"]],standalone:!0,features:[le],decls:3,vars:2,consts:[["mat-icon-button","","aria-label","node-styler","matTooltip","Style nodes with custom rules",3,"click"]],template:function(n,r){n&1&&(v(0,"button",0),H("click",function(){return r.handleClickOpenDialog()}),v(1,"mat-icon"),S(2,"palette"),b()()),n&2&&(w(),re("highlight",r.hasNonEmptyNodeStylerRules()))},dependencies:[Ae,xn,Wo,_a,tt,pt,Xt,Yn],styles:[`button[_ngcontent-%COMP%] mat-icon.highlight[_ngcontent-%COMP%]{background:linear-gradient(45deg,#0089ff 0 30%,#f1af00 70% 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();var Cve=["*"],E5=(()=>{class i{appService;titleClicked=new Ie;constructor(t){this.appService=t}get disableTitleTooltip(){return this.appService.testMode}static \u0275fac=function(n){return new(n||i)(M(at))};static \u0275cmp=ce({type:i,selectors:[["title-bar"]],outputs:{titleClicked:"titleClicked"},standalone:!0,features:[le],ngContentSelectors:Cve,decls:22,vars:1,consts:[[1,"container"],["matTooltip","Back home",1,"title",3,"click","matTooltipDisabled"],[1,"right-container"],[1,"divider"],[1,"divider","tighter-right"],[1,"icons-container"],["href","https://github.com/google-ai-edge/model-explorer","target","_blank"],["mat-icon-button","","aria-label","doc","matTooltip","GitHub"],["href","https://github.com/google-ai-edge/model-explorer/issues","target","_blank"],["mat-icon-button","","aria-label","bug","matTooltip","File issue or feature request"]],template:function(n,r){n&1&&(In(),v(0,"div",0)(1,"div",1),H("click",function(){return r.titleClicked.emit()}),ee(2,"me-logo"),S(3," Model Explorer "),ee(4,"new-version-chip"),b(),v(5,"div",2),ee(6,"node-data-provider-dropdown")(7,"div",3)(8,"graph-selector")(9,"div",4)(10,"node-styler"),v(11,"div",5)(12,"a",6)(13,"button",7)(14,"mat-icon"),S(15,"article"),b()()(),v(16,"a",8)(17,"button",9)(18,"mat-icon"),S(19,"bug_report"),b()()()(),ee(20,"open-in-new-tab-button"),Wt(21),b()()),n&2&&(w(),R("matTooltipDisabled",r.disableTitleTooltip))},dependencies:[Ae,Vj,rf,xn,Wo,tt,pt,Xt,Yn,YC,Hj,M5,WC],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;padding:8px 8px 8px 12px;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ddd}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:400;cursor:pointer;color:#444746;font-size:20px;display:flex;align-items:center}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] me-logo[_ngcontent-%COMP%]{margin-right:6px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] new-version-chip[_ngcontent-%COMP%]{margin-left:16px}.container[_ngcontent-%COMP%] .right-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{width:1px;height:28px;border-left:1px solid #ccc;margin:0 16px}.container[_ngcontent-%COMP%] .divider.tighter-right[_ngcontent-%COMP%]{margin-right:4px}.container[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;color:#000}.container[_ngcontent-%COMP%] open-in-new-tab-button[_ngcontent-%COMP%]{margin-left:8px} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();var Sve=["*"];function Mve(i,e){i&1&&ee(0,"benchmark-runner")}function Eve(i,e){if(i&1){let t=ne();v(0,"title-bar",4),H("titleClicked",function(){B(t);let r=I(3);return V(r.titleClicked.emit())}),Wt(1),b()}}function Ive(i,e){i&1&&(v(0,"div",3),S(1,"No graphs"),b())}function Tve(i,e){i&1&&ee(0,"split-panes-container")}function Dve(i,e){if(i&1&&($(0,Eve,2,0,"title-bar"),v(1,"div",2),$(2,Ive,2,0,"div",3)(3,Tve,1,0,"split-panes-container"),b()),i&2){let t=I(2);oe(t.showTitleBar?0:-1),w(2),oe(t.hasNoGraphs?2:3)}}function Pve(i,e){if(i&1){let t=ne();v(0,"div",1),H("dragover",function(r){B(t);let o=I();return V(o.handleDragOver(r))})("drop",function(r){B(t);let o=I();return V(o.handleDrop(r))}),$(1,Mve,1,0,"benchmark-runner")(2,Dve,4,2,"div",2),b()}if(i&2){let t=I();w(),oe(t.benchmark?1:2)}}var iS=(()=>{class i{appService;changeDetectorRef;destroyRef;el;snackBar;threejsService;uiStateService;nodeDataProviderExtensionService;nodeStylerService;syncNavigationService;graphCollections;config;initialUiState;benchmark=!1;nodeDataSources=[];titleClicked=new Ie;uiStateChanged=new Ie;modelGraphProcessed=new Ie;remoteNodeDataPathsChanged=new Ie;syncNavigationModeChanged=new Ie;selectedNodeChanged=new Ie;hoveredNodeChanged=new Ie;doubleClickedNodeChanged=new Ie;curProcessedModelGraph;ready=!1;mouseDownHandler=t=>{window.parent.postMessage({cmd:"model-explorer-mousedown"},"*")};constructor(t,n,r,o,s,a,c,l,d,u){this.appService=t,this.changeDetectorRef=n,this.destroyRef=r,this.el=o,this.snackBar=s,this.threejsService=a,this.uiStateService=c,this.nodeDataProviderExtensionService=l,this.nodeStylerService=d,this.syncNavigationService=u,lt(()=>{let h=this.uiStateService.curUiState();h&&this.uiStateChanged.emit(h)}),lt(()=>{this.remoteNodeDataPathsChanged.emit(this.appService.remoteNodeDataPaths())}),lt(()=>{this.selectedNodeChanged.emit(this.appService.selectedNode())}),lt(()=>{this.hoveredNodeChanged.emit(this.appService.hoveredNode())}),lt(()=>{this.doubleClickedNodeChanged.emit(this.appService.doubleClickedNode())}),window.addEventListener("message",h=>{let p=h.data;switch(p.cmd){case"model-explorer-load-node-data-file":let f=p.path;f&&this.handleGetNodeDataPathFromPostMessage(f);break;case"model-explorer-select-node-by-output-tensor-name":let m=p.tensorName;m&&this.handleSelectNodeByOutputTensorNameFromPostMessage(m);break;case"model-explorer-select-node-by-node-id":let y=p.nodeId;y&&this.handleSelectNodeByNodeIdFromPostMessage(y);break;default:break}}),this.appService.modelGraphProcessed$.pipe(Ei(this.destroyRef)).subscribe(h=>{this.modelGraphProcessed.next(h)}),this.syncNavigationService.syncNavigationModeChanged$.pipe(Ei(this.destroyRef)).subscribe(h=>{this.syncNavigationModeChanged.next(h)}),this.initThreejs()}ngOnInit(){if(this.appService.config.set(this.config||{}),this.appService.addGraphCollections(this.graphCollections),this.appService.curInitialUiState.set(this.initialUiState),this.config?.nodeStylerRules&&this.nodeStylerService.rules.set(this.config.nodeStylerRules),!this.initialUiState||this.initialUiState.paneStates.length===0){if(this.graphCollections.length>0&&this.graphCollections[0].graphs.length>0){let n=[...this.graphCollections[0].graphs].sort((r,o)=>o.nodes.length-r.nodes.length)[0];this.appService.selectGraphInCurrentPane(n)}}else if(this.initialUiState.paneStates.length===1){let t=this.initialUiState.paneStates[0],n=t.selectedNodeId===""&&t.deepestExpandedGroupNodeIds.length===0,r=this.findGraphFromCollections(t.selectedCollectionLabel,t.selectedGraphId),o=t.flattenLayers===!0;if(r)this.appService.selectGraphInCurrentPane(r,o,void 0,n);else{let s=this.graphCollections[0].graphs[0];this.appService.selectGraphInCurrentPane(s,o,void 0,n)}this.appService.setFlattenLayersInCurrentPane(o)}else if(this.initialUiState.paneStates.length===2){let t=this.initialUiState.paneStates[0],n=this.findGraphFromCollections(t.selectedCollectionLabel,t.selectedGraphId),r=t.flattenLayers===!0;if(n)this.appService.selectGraphInCurrentPane(n,r);else{let c=this.graphCollections[0].graphs[0];this.appService.selectGraphInCurrentPane(c,r)}this.appService.setFlattenLayersInCurrentPane(r);let o=this.initialUiState.paneStates[1],s=o.flattenLayers===!0,a=this.findGraphFromCollections(o.selectedCollectionLabel,o.selectedGraphId);if(a)this.appService.openGraphInSplitPane(a,s);else{let c=this.graphCollections[0].graphs[0];this.appService.openGraphInSplitPane(c,s)}t.selected?this.appService.selectPaneByIndex(0):o.selected&&this.appService.selectPaneByIndex(1),this.appService.setPaneWidthFraction(t.widthFraction)}this.el.nativeElement.addEventListener("mousedown",this.mouseDownHandler,!0)}ngOnChanges(t){t.graphCollections&&(t.graphCollections.isFirstChange()||(this.appService.reset(),this.uiStateService.reset(),this.cleanUp(),this.ngOnInit()))}ngOnDestroy(){this.cleanUp()}handleKeyboardEvent(t){t.key===" "?ty()||this.appService.spaceKeyToZoomFitClicked.next({}):t.key==="f"&&(t.ctrlKey||t.metaKey)&&(this.config?.hideTitleBar||t.preventDefault(),this.appService.searchKeyClicked.next({}))}handleDragOver(t){t.preventDefault()}handleDrop(t){return It(this,null,function*(){if(!t.dataTransfer)return;t.stopPropagation(),t.preventDefault();let n=[];t.dataTransfer?.items?Array.from(t.dataTransfer.items).forEach((o,s)=>{if(o.kind==="file"){let a=o.getAsFile();a&&n.push(a)}}):n.push(...Array.from(t.dataTransfer?.files||[]));let r=!1;if(n.length!==0)for(let o of n){if(!o.name.endsWith(".json"))continue;let s=new FileReader,a=yield new Promise(c=>{s.onload=l=>{let d=JSON.parse(l.target?.result);c(d)},s.readAsText(o)});a.results!=null&&a.results.results==null?(this.addNodeDataProviderData(o.name,a),r=!0):Object.values(a).some(c=>c.results!=null)&&(this.addNodeDataProviderDataWithGraphIndex(o.name,a),r=!0)}r||this.snackBar.open("File(s) not supported","Dismiss")})}selectNode(t,n,r,o=0){let s=this.graphCollections;if(r){let l=this.appService.curGraphCollections().find(d=>d.label.toLowerCase()===r.toLowerCase());if(!l){console.warn(`Failed to locate collection with label "${r}"`);return}s=[l]}let a;for(let l of s){let d=l.graphs.find(u=>u.id===n);if(d){a=d;break}}if(!a){console.warn(`Failed to locate graph with id "${n}"`);return}this.appService.selectGraphInPane(a,o);let c=this.appService.panes()[o].id;this.appService.curInitialUiState.set(void 0),this.appService.selectNode(c,void 0),this.appService.curToLocateNodeInfo.set(void 0),this.appService.setNodeToReveal(c,t)}addNodeDataProviderData(t,n,r=0,o=!1){let s=this.appService.getModelGraphFromPaneIndex(r);if(!s){console.warn(`Model graph in pane with index ${r} doesn't exist`);return}this.nodeDataProviderExtensionService.addRun(Ur(),t,"",s,{[s.id]:n},o)}addNodeDataProviderDataWithGraphIndex(t,n,r=0,o=!1){let s=this.appService.getModelGraphFromPaneIndex(r);if(!s){console.warn(`Model graph in pane with index ${r} doesn't exist`);return}this.nodeDataProviderExtensionService.addRun(Ur(),t,"",s,n,o)}loadRemoteNodeDataPaths(t,n){return It(this,null,function*(){yield Promise.all(t.map(r=>this.nodeDataProviderExtensionService.addRunFromRemoteSource(r,n)))})}get hasNoGraphs(){return this.graphCollections.reduce((t,n)=>t+n.graphs.length,0)===0}get showTitleBar(){return!this.config?.hideTitleBar}findGraphFromCollections(t,n){for(let r of this.graphCollections)for(let o of r.graphs)if(o.id===n&&(t===""||o.collectionLabel===t))return o}handleGetNodeDataPathFromPostMessage(t){let n=this.appService.getModelGraphFromPaneIndex(0);if(!n){console.warn("Model graph in pane with index 0 doesn't exist");return}this.loadRemoteNodeDataPaths([t],n)}handleSelectNodeByOutputTensorNameFromPostMessage(t){let n=this.appService.getModelGraphFromSelectedPane();if(!n)return;let r;for(let o of n.nodes)if(St(o)){let s=o.outputsMetadata||{};for(let a of Object.keys(s)){let c=s[a];if(t===c.tensor_name){r=o;break}}if(r)break}r&&this.selectNode(r.id,n.id)}handleSelectNodeByNodeIdFromPostMessage(t){let n=this.appService.getModelGraphFromSelectedPane();if(!n)return;let r=n.nodesById[t];r&&this.selectNode(r.id,n.id)}initThreejs(){return It(this,null,function*(){yield this.threejsService.depsLoadedPromise,this.ready=!0,this.changeDetectorRef.markForCheck()})}cleanUp(){this.el.nativeElement.removeEventListener("mousedown",this.mouseDownHandler,!0)}static \u0275fac=function(n){return new(n||i)(M(at),M(Ne),M(Fi),M(Re),M(hc),M(Sr),M(Gc),M(Mr),M(pa),M(Ml))};static \u0275cmp=ce({type:i,selectors:[["model-graph-visualizer"]],hostBindings:function(n,r){n&1&&H("keydown",function(s){return r.handleKeyboardEvent(s)},!1,Y0)},inputs:{graphCollections:"graphCollections",config:"config",initialUiState:"initialUiState",benchmark:"benchmark",nodeDataSources:"nodeDataSources"},outputs:{titleClicked:"titleClicked",uiStateChanged:"uiStateChanged",modelGraphProcessed:"modelGraphProcessed",remoteNodeDataPathsChanged:"remoteNodeDataPathsChanged",syncNavigationModeChanged:"syncNavigationModeChanged",selectedNodeChanged:"selectedNodeChanged",hoveredNodeChanged:"hoveredNodeChanged",doubleClickedNodeChanged:"doubleClickedNodeChanged"},standalone:!0,features:[Ft([at,ZG,Mr,pa,Ml,Gc,jc]),dn,le],ngContentSelectors:Sve,decls:1,vars:1,consts:[["class","container",3,"dragover","drop",4,"ngIf"],[1,"container",3,"dragover","drop"],[1,"main"],[1,"no-graphs-message"],[3,"titleClicked"]],template:function(n,r){n&1&&(In(),$(0,Pve,3,1,"div",0)),n&2&&R("ngIf",r.ready)},dependencies:[XG,Ae,Tn,E5,kj],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column;position:relative}.container[_ngcontent-%COMP%] benchmark-runner[_ngcontent-%COMP%]{flex-grow:1}.container[_ngcontent-%COMP%] title-bar[_ngcontent-%COMP%]{height:48px;min-height:48px}.container[_ngcontent-%COMP%] .main[_ngcontent-%COMP%]{flex-grow:1;display:flex;position:relative;overflow:hidden}.container[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .no-graphs-message[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:200;display:flex;align-items:center;justify-content:center;color:#999}.container[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] split-panes-container[_ngcontent-%COMP%]{flex-grow:1}.container[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] graph-selector[_ngcontent-%COMP%]{position:absolute;top:12px;left:12px;z-index:100} .model-explorer-help-popup{font-size:12px;padding:8px;background-color:#fff;line-height:normal} .model-explorer-help-popup .bold{font-weight:700} .model-explorer-help-popup .shortcut{display:flex;align-items:center;color:#777;margin-top:8px} .model-explorer-help-popup .shortcut mat-icon{font-size:20px;width:20px;height:20px;margin-right:2px;color:#777} .model-explorer-help-popup .description{color:#777;margin-top:8px} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();function Ove(i,e){if(i&1&&ee(0,"model-graph-visualizer",1),i&2){let t=I();R("graphCollections",t.graphCollections)("config",t.config)}}var Rve="https://storage.googleapis.com/tfweb/model-graph-vis-v2-test-models/coco-ssd.tflite%20(10).json",Ave="https://storage.googleapis.com/tfweb/model-graph-vis-v2-test-models/coco-ssd-tf.json",I5=(()=>{class i{graphCollections=[];config={nodeLabelsToHide:["Const","pseudo_const","ReadVariableOp"],defaultRenderer:kI.WEBGL,maxConstValueCount:16,enableSubgraphSelection:!0,enableExportToResource:!0};ngOnInit(){Promise.all([this.fetch(Rve),this.fetch(Ave)]).then(t=>{this.graphCollections=t})}fetch(t){return new Promise(n=>{fetch(t).then(r=>{r.json().then(o=>{o.label==null&&o.graphs==null?n({label:"unnamed collection",graphs:o}):n(o)})})})}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=ce({type:i,selectors:[["demo-page"]],standalone:!0,features:[le],decls:2,vars:1,consts:[[1,"container"],[3,"graphCollections","config"]],template:function(n,r){n&1&&(v(0,"div",0),$(1,Ove,1,2,"model-graph-visualizer",1),b()),n&2&&(w(),oe(r.graphCollections.length>0?1:-1))},dependencies:[Ae,iS],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;overflow:hidden;display:flex}.container[_ngcontent-%COMP%] model-graph-visualizer[_ngcontent-%COMP%]{width:100%;height:100%} - - - - - - - - - - - - - - - - - -`]})}return i})();var To=function(i){return i.CONST_ELEMENT_COUNT_LIMIT="const_element_count_limit",i.SHOW_WELCOME_CARD="show_welcome_card",i.HIDE_OP_NODES_WITH_LABELS="hide_op_nodes_with_labels",i.ARTIFICIAL_LAYER_NODE_COUNT_THRESHOLD="artificial_layer_node_count_threshold",i.EDGE_LABEL_FONT_SIZE="edge_label_font_size",i.EDGE_COLOR="edge_color",i.DISALLOW_VERTICAL_EDGE_LABELS="disallow_vertical_edge_labels",i.KEEP_LAYERS_WITH_A_SINGLE_CHILD="keep_layers_with_a_single_child",i.SHOW_OP_NODE_OUT_OF_LAYER_EDGES_WITHOUT_SELECTING="show_op_node_out_of_layer_edges_without_selecting",i}(To||{}),co=function(i){return i[i.BOOLEAN=0]="BOOLEAN",i[i.NUMBER=1]="NUMBER",i[i.TEXT_MULTILINE=2]="TEXT_MULTILINE",i[i.COLOR=3]="COLOR",i}(co||{}),nR={label:"Maximum element count for constant tensor values",key:To.CONST_ELEMENT_COUNT_LIMIT,type:co.NUMBER,defaultValue:16,help:"Controls the number of values extracted from the constant tensors during model processing. Increasing this number may impact performance due to larger payload sizes."},Nve={label:"Show welcome card",key:To.SHOW_WELCOME_CARD,type:co.BOOLEAN,defaultValue:!0},iR={label:"Hide op nodes with labels below (comma separated)",key:To.HIDE_OP_NODES_WITH_LABELS,type:co.TEXT_MULTILINE,defaultValue:"Const,pseudo_const,pseudo_qconst,ReadVariableOp",help:"Removes op nodes from model graphs if their label matches any of the labels entered below."},rR={label:"Maximum number of nodes in an artificial layer",key:To.ARTIFICIAL_LAYER_NODE_COUNT_THRESHOLD,type:co.NUMBER,defaultValue:Rm,help:"Controls the maximum number of immediate child nodes displayed under a layer. When the number of child nodes exceeds this limit, Model Explorer automatically groups them into smaller, more manageable artificial layers to improve layout performance and readability."},oR={label:"Edge label font size",key:To.EDGE_LABEL_FONT_SIZE,type:co.NUMBER,defaultValue:Kb},sR={label:"Edge color",key:To.EDGE_COLOR,type:co.COLOR,defaultValue:"#aaaaaa"},aR={label:"Disallow vertical edge labels",key:To.DISALLOW_VERTICAL_EDGE_LABELS,type:co.BOOLEAN,defaultValue:!1,help:"-"},cR={label:"Keep layers with a single op node child",key:To.KEEP_LAYERS_WITH_A_SINGLE_CHILD,type:co.BOOLEAN,defaultValue:!1,help:"By default, layers with a single op node as its child are automatically removed to improve graph readability. Turn this toggle on to keep those layers."},lR={label:"Show op node out-of-layer edges without selecting",key:To.SHOW_OP_NODE_OUT_OF_LAYER_EDGES_WITHOUT_SELECTING,type:co.BOOLEAN,defaultValue:!1,help:"By default, an op node's edges that go out of the layer is only visible when the op node is selected. Turn this toggle on to see those edges without needing to select the node. \u26A0\uFE0F This feature will make the model graph look more noisy and harder to read especially for larger models."},rS="model_explorer_settings",oS=[nR,iR,rR,oR,sR,cR,Nve,aR,lR],vf=(()=>{class i{localStorageService;savedSettings;constructor(t){this.localStorageService=t;let n=this.localStorageService.getItem(rS)||"";this.savedSettings=n===""?{}:JSON.parse(n)}getBooleanValue(t){return this.savedSettings[t.key]==null?t.defaultValue===!0:this.savedSettings[t.key]===!0}getNumberValue(t){let n=this.savedSettings[t.key];return n!=null?Number(n):t.defaultValue||0}getStringValue(t){let n=this.savedSettings[t.key];return n??(t.defaultValue||"")}saveBooleanValue(t,n){this.savedSettings[n]=t,this.localStorageService.setItem(rS,JSON.stringify(this.savedSettings))}saveNumberValue(t,n){isNaN(t)||(this.savedSettings[n]=t,this.localStorageService.setItem(rS,JSON.stringify(this.savedSettings)))}saveStringValue(t,n){this.savedSettings[n]=t,this.localStorageService.setItem(rS,JSON.stringify(this.savedSettings))}getAllSettingsValues(){let t={};for(let n of oS)switch(n.type){case co.BOOLEAN:t[n.key]=this.getBooleanValue(n);break;case co.NUMBER:t[n.key]=this.getNumberValue(n);break;default:break}return t}getSettingByKey(t){return oS.find(n=>n.key===t)}static \u0275fac=function(n){return new(n||i)(X(no))};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var kve=["panel"],Lve=["*"];function Fve(i,e){if(i&1){let t=ne();v(0,"div",1,0),H("@panelAnimation.done",function(r){B(t);let o=I();return V(o._animationDone.next(r))}),Wt(2),b()}if(i&2){let t=e.id,n=I();Vr(n._classList),re("mat-mdc-autocomplete-visible",n.showPanel)("mat-mdc-autocomplete-hidden",!n.showPanel)("mat-primary",n._color==="primary")("mat-accent",n._color==="accent")("mat-warn",n._color==="warn"),R("id",n.id)("@panelAnimation",n.isOpen?"visible":"hidden"),Ye("aria-label",n.ariaLabel||null)("aria-labelledby",n._getPanelAriaLabelledby(t))}}var Bve=li("panelAnimation",[vi("void, hidden",Kt({opacity:0,transform:"scaleY(0.8)"})),An(":enter, hidden => visible",[mF([Rn("0.03s linear",Kt({opacity:1})),Rn("0.12s cubic-bezier(0, 0, 0.2, 1)",Kt({transform:"scaleY(1)"}))])]),An(":leave, visible => hidden",[Rn("0.075s linear",Kt({opacity:0}))])]),Vve=0,uR=class{constructor(e,t){this.source=e,this.option=t}},T5=new me("mat-autocomplete-default-options",{providedIn:"root",factory:zve});function zve(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1}}var D5=(()=>{let e=class e{get isOpen(){return this._isOpen&&this.showPanel}_setColor(n){this._color=n,this._changeDetectorRef.markForCheck()}set classList(n){this._classList=n,this._elementRef.nativeElement.className=""}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(n){this._hideSingleSelectionIndicator=n,this._syncParentProperties()}_syncParentProperties(){if(this.options)for(let n of this.options)n._changeDetectorRef.markForCheck()}constructor(n,r,o,s){this._changeDetectorRef=n,this._elementRef=r,this._defaults=o,this._activeOptionChanges=Ct.EMPTY,this._animationDone=new Ie,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this.optionSelected=new Ie,this.opened=new Ie,this.closed=new Ie,this.optionActivated=new Ie,this.id=`mat-autocomplete-${Vve++}`,this.inertGroups=s?.SAFARI||!1,this.autoActiveFirstOption=!!o.autoActiveFirstOption,this.autoSelectActiveOption=!!o.autoSelectActiveOption,this.requireSelection=!!o.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new Ah(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(n=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[n]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe(),this._animationDone.complete()}_setScrollTop(n){this.panel&&(this.panel.nativeElement.scrollTop=n)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(n){let r=new uR(this,n);this.optionSelected.emit(r)}_getPanelAriaLabelledby(n){if(this.ariaLabel)return null;let r=n?n+" ":"";return this.ariaLabelledby?r+this.ariaLabelledby:n}_skipPredicate(){return!1}};e.\u0275fac=function(r){return new(r||e)(M(Ne),M(Re),M(T5),M(gn))},e.\u0275cmp=ce({type:e,selectors:[["mat-autocomplete"]],contentQueries:function(r,o,s){if(r&1&&(_i(s,Zc,5),_i(s,zh,5)),r&2){let a;be(a=ye())&&(o.options=a),be(a=ye())&&(o.optionGroups=a)}},viewQuery:function(r,o){if(r&1&&(Ee(Wn,7),Ee(kve,5)),r&2){let s;be(s=ye())&&(o.template=s.first),be(s=ye())&&(o.panel=s.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",et],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",et],requireSelection:[2,"requireSelection","requireSelection",et],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",et],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",et]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],standalone:!0,features:[Ft([{provide:Vh,useExisting:e}]),nn,le],ngContentSelectors:Lve,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(r,o){r&1&&(In(),$(0,Fve,3,16,"ng-template"))},styles:["div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape);box-shadow:var(--mat-autocomplete-container-elevation-shadow);background-color:var(--mat-autocomplete-background-color)}.cdk-high-contrast-active div.mat-mdc-autocomplete-panel{outline:solid 1px}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}mat-autocomplete{display:none}"],encapsulation:2,data:{animation:[Bve]},changeDetection:0});let i=e;return i})();var Uve={provide:Ba,useExisting:kr(()=>av),multi:!0};var P5=new me("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let i=te($t);return()=>i.scrollStrategies.reposition()}});function Hve(i){return()=>i.scrollStrategies.reposition()}var Gve={provide:P5,deps:[$t],useFactory:Hve},av=(()=>{let e=class e{constructor(n,r,o,s,a,c,l,d,u,h,p){this._element=n,this._overlay=r,this._viewContainerRef=o,this._zone=s,this._changeDetectorRef=a,this._dir=l,this._formField=d,this._document=u,this._viewportRuler=h,this._defaults=p,this._componentDestroyed=!1,this._manuallyFloatingLabel=!1,this._viewportSubscription=Ct.EMPTY,this._breakpointObserver=te(Oh),this._handsetLandscapeSubscription=Ct.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new pe,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._initialized=new pe,this._injector=te(vt),this._aboveClass="mat-mdc-autocomplete-panel-above",this._overlayAttached=!1,this.optionSelections=Po(()=>{let f=this.autocomplete?this.autocomplete.options:null;return f?f.changes.pipe(gi(f),Qn(()=>Zn(...f.map(m=>m.onSelectionChange)))):this._initialized.pipe(Qn(()=>this.optionSelections))}),this._handlePanelKeydown=f=>{(f.keyCode===27&&!bi(f)||f.keyCode===38&&bi(f,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),f.stopPropagation(),f.preventDefault())},this._trackedModal=null,this._scrollStrategy=c}ngAfterViewInit(){this._initialized.next(),this._initialized.complete();let n=this._getWindow();typeof n<"u"&&this._zone.runOutsideAngular(()=>n.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(n){n.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){let n=this._getWindow();typeof n<"u"&&n.removeEventListener("blur",this._windowBlurHandler),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal&&Yc(this._trackedModal,"aria-owns",this.autocomplete.id))}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return Zn(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(qt(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(qt(()=>this._overlayAttached)):Ke()).pipe(Je(n=>n instanceof $m?n:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return Zn(yn(this._document,"click"),yn(this._document,"auxclick"),yn(this._document,"touchend")).pipe(qt(n=>{let r=Ii(n),o=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,s=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&r!==this._element.nativeElement&&this._document.activeElement!==this._element.nativeElement&&(!o||!o.contains(r))&&(!s||!s.contains(r))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(r)}))}writeValue(n){Promise.resolve(null).then(()=>this._assignOptionValue(n))}registerOnChange(n){this._onChange=n}registerOnTouched(n){this._onTouched=n}setDisabledState(n){this._element.nativeElement.disabled=n}_handleKeydown(n){let r=n.keyCode,o=bi(n);if(r===27&&!o&&n.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&r===13&&this.panelOpen&&!o)this.activeOption._selectViaInteraction(),this._resetActiveItem(),n.preventDefault();else if(this.autocomplete){let s=this.autocomplete._keyManager.activeItem,a=r===38||r===40;r===9||a&&!o&&this.panelOpen?this.autocomplete._keyManager.onKeydown(n):a&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(a||this.autocomplete._keyManager.activeItem!==s)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(n){let r=n.target,o=r.value;if(r.type==="number"&&(o=o==""?null:parseFloat(o)),this._previousValue!==o){if(this._previousValue=o,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(o),!o)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let s=this.autocomplete.options?.find(a=>a.selected);if(s){let a=this._getDisplayValue(s.value);o!==a&&s.deselect(!1)}}if(this._canOpen()&&this._document.activeElement===n.target){let s=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(s)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_floatLabel(n=!1){this._formField&&this._formField.floatLabel==="auto"&&(n?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){let n=new Et(o=>{Hi(()=>{o.next()},{injector:this._injector})}),r=this.autocomplete.options.changes.pipe(En(()=>this._positionStrategy.reapplyLastPosition()),Vu(0));return Zn(n,r).pipe(Qn(()=>this._zone.run(()=>{let o=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),o!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),_n(1)).subscribe(o=>this._setValueAndClose(o))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(n){let r=this.autocomplete;return r&&r.displayWith?r.displayWith(n):n}_assignOptionValue(n){let r=this._getDisplayValue(n);n==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(r??"")}_updateNativeInputValue(n){this._formField?this._formField._control.value=n:this._element.nativeElement.value=n,this._previousValue=n}_setValueAndClose(n){let r=this.autocomplete,o=n?n.source:this._pendingAutoselectedOption;o?(this._clearPreviousSelectedOption(o),this._assignOptionValue(o.value),this._onChange(o.value),r._emitSelectEvent(o),this._element.nativeElement.focus()):r.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),r._animationDone?r._animationDone.pipe(_n(1)).subscribe(()=>this._onChange(null)):this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(n,r){this.autocomplete?.options?.forEach(o=>{o!==n&&o.selected&&o.deselect(r)})}_openPanelInternal(n=this._element.nativeElement.value){if(this._attachOverlay(n),this._floatLabel(),this._trackedModal){let r=this.autocomplete.id;Lh(this._trackedModal,"aria-owns",r)}}_attachOverlay(n){this.autocomplete;let r=this._overlayRef;r?(this._positionStrategy.setOrigin(this._getConnectedElement()),r.updateSize({width:this._getPanelWidth()})):(this._portal=new Zr(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),r=this._overlay.create(this._getOverlayConfig()),this._overlayRef=r,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&r&&r.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(yy.HandsetLandscape).subscribe(s=>{s.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),r&&!r.hasAttached()&&(r.attach(this._portal),this._valueOnAttach=n,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let o=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&o!==this.panelOpen&&this._emitOpened()}_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let n=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=n.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=n.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=null}_getOverlayConfig(){return new fi({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){let n=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(n),this._positionStrategy=n,n}_setStrategyPositions(n){let r=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],o=this._aboveClass,s=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:o},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:o}],a;this.position==="above"?a=s:this.position==="below"?a=r:a=[...r,...s],n.withPositions(a)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let n=this.autocomplete;if(n.autoActiveFirstOption){let r=-1;for(let o=0;o .cdk-overlay-container [aria-modal="true"]');if(!n)return;let r=this.autocomplete.id;this._trackedModal&&Yc(this._trackedModal,"aria-owns",r),Lh(n,"aria-owns",r),this._trackedModal=n}_clearFromModal(){if(this._trackedModal){let n=this.autocomplete.id;Yc(this._trackedModal,"aria-owns",n),this._trackedModal=null}}};e.\u0275fac=function(r){return new(r||e)(M(Re),M($t),M(Zt),M(Fe),M(Ne),M(P5),M(di,8),M(J_,9),M(Xe,8),M(la),M(T5,8))},e.\u0275dir=Ve({type:e,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(r,o){r&1&&H("focusin",function(){return o._handleFocus()})("blur",function(){return o._onTouched()})("input",function(a){return o._handleInput(a)})("keydown",function(a){return o._handleKeydown(a)})("click",function(){return o._handleClick()}),r&2&&Ye("autocomplete",o.autocompleteAttribute)("role",o.autocompleteDisabled?null:"combobox")("aria-autocomplete",o.autocompleteDisabled?null:"list")("aria-activedescendant",o.panelOpen&&o.activeOption?o.activeOption.id:null)("aria-expanded",o.autocompleteDisabled?null:o.panelOpen.toString())("aria-controls",o.autocompleteDisabled||!o.panelOpen||o.autocomplete==null?null:o.autocomplete.id)("aria-haspopup",o.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",et]},exportAs:["matAutocompleteTrigger"],standalone:!0,features:[Ft([Uve]),nn,dn]});let i=e;return i})(),O5=(()=>{let e=class e{};e.\u0275fac=function(r){return new(r||e)},e.\u0275mod=rt({type:e}),e.\u0275inj=it({providers:[Gve],imports:[oo,Uh,Ut,Ae,Jo,Uh,Ut]});let i=e;return i})();var sS="graphs://",R5="data-nexus://";var El=function(i){return i.TFLITE_MLIR="builtin_tflite_mlir",i.TFLITE_FLATBUFFER="builtin_tflite_flatbuffer",i.TF_MLIR="builtin_tf_mlir",i.TF_DIRECT="builtin_tf_direct",i.GRAPHDEF="builtin_graphdef",i.MLIR="builtin_mlir",i.JSON_LOADER="builtin_json",i.DATA_NEXUS="builtin_data_nexus",i}(El||{}),hR=function(i){return i.ADAPTER="adapter",i.NODE_DATA_PROVIDER="node_data_provider",i}(hR||{}),ri=function(i){return i.LOCAL="local",i.REMOTE="remote",i.DATA_NEXUS="data_nexus",i.GRAPH_JSONS_FROM_SERVER="graphs_json_from_server",i.FILE_PATH="file_path",i}(ri||{}),Bn=function(i){return i.NOT_STARTED="Not started",i.PROCESSING="Converting",i.UPLOADING="Uploading",i.DONE="Done",i.ERROR="Error",i}(Bn||{});var Wve=(i,e)=>e.id;function $ve(i,e){i&1&&(v(0,"span",4),S(1,"Default"),b())}function qve(i,e){if(i&1){let t=ne();v(0,"div",2),H("click",function(){let r=B(t).$implicit,o=I();return V(o.handleSelectCandidate(r))}),v(1,"div",3),S(2),$(3,$ve,2,0,"span",4),b(),v(4,"div",5),S(5),b()()}if(i&2){let t=e.$implicit,n=e.$index,r=I();re("selected",(r.selectedAdapter==null?null:r.selectedAdapter.id)===t.id),w(2),Se(" ",t.name||t.id," "),w(),oe(n===0?3:-1),w(2),Se(" ",t.description||"-"," ")}}var A5=(()=>{class i{candidates=[];selectedAdapter;onClose=new Ie;handleSelectCandidate(t){this.onClose.next(t)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=ce({type:i,selectors:[["adapter-selector-panel"]],inputs:{candidates:"candidates",selectedAdapter:"selectedAdapter"},outputs:{onClose:"onClose"},standalone:!0,features:[le],decls:3,vars:1,consts:[[1,"container"],[1,"candidate-container",3,"selected"],[1,"candidate-container",3,"click"],[1,"name"],[1,"default-label"],[1,"description"]],template:function(n,r){n&1&&(v(0,"div",0),rn(1,qve,6,5,"div",1,Wve),b()),n&2&&(R("@transformPanel","showing"),w(),on(r.candidates))},dependencies:[Ae,ma,tt,ga,Xt,br],styles:[`.container[_ngcontent-%COMP%]{box-shadow:0 2px 6px 2px #00000026,0 1px 2px #0000004d;transform-origin:top center;font-size:13px;padding:8px 0;border-radius:8px;background-color:#fff}.container[_ngcontent-%COMP%] .candidate-container[_ngcontent-%COMP%]{padding:8px 16px}.container[_ngcontent-%COMP%] .candidate-container.selected[_ngcontent-%COMP%]{background-color:#c2e7ff}.container[_ngcontent-%COMP%] .candidate-container[_ngcontent-%COMP%]:hover:not(.selected){background-color:#f2f2f2;cursor:pointer}.container[_ngcontent-%COMP%] .candidate-container[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-size:14px;color:#1f1f1f;line-height:20px;margin-bottom:2px;display:flex;align-items:center}.container[_ngcontent-%COMP%] .candidate-container[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .default-label[_ngcontent-%COMP%]{display:inline-block;padding:0 10px;box-sizing:border-box;background-color:#f3e0b4;color:#70571e;border:1px solid #dbac41;font-size:11px;line-height:14px;border-radius:99px;margin-left:8px}.container[_ngcontent-%COMP%] .candidate-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{font-size:12px;color:#444746} - - - - - - - - - - - - - - - - - -`],data:{animation:[li("transformPanel",[vi("void",Kt({opacity:0,transform:"scale(1, 0.8)"})),An("void => showing",Rn("120ms cubic-bezier(0, 0, 0.2, 1)",Kt({opacity:1,transform:"scale(1, 1)"}))),An("* => void",Rn("100ms linear",Kt({opacity:0})))])]},changeDetection:0})}return i})();function cv(i,e,t){let n=i.split("/").filter(s=>s!==""),o=n[n.length-1].split(".");if(!t&&i.startsWith("http"))return e.getExtensionsForHttpUrls();if(o.length>1){let s=o[o.length-1];return e.getExtensionsByFileExt(s)}return!t&&$C(i)?e.getExtensionsForGoogleStorageDir():[]}var Yve="/api/v1/get_extensions",Xve="/api/v1/send_command",Zve="/apipost/v1/send_command",bf=(()=>{class i{loading=ct(!0);internalColab=hf;extensions=[];constructor(){this.loadExtensions()}sendCommandToExtension(t){return It(this,null,function*(){try{let n;if(this.internalColab){let r=`${Xve}?json=${JSON.stringify(t)}`;n=yield fetch(r)}else{let r={method:"POST",headers:{"Content-Type":"application/json"}};r.body=JSON.stringify(t),n=yield fetch(Zve,r)}return n.ok?{cmdResp:yield n.json()}:{otherError:`Failed to convert model. ${n.status}`}}catch(n){return{otherError:n}}})}loadExtensions(){return It(this,null,function*(){let t=[];t=yield this.getExtensionsForExternal(),this.extensions=t,this.loading.set(!1)})}getExtensionsForExternal(){return It(this,null,function*(){try{let t=yield fetch(Yve,{credentials:"include"});return t.ok?yield t.json():(console.error(`Failed to get extensions: ${t.status}`),[])}catch(t){return console.error("Failed to get extensions.",t),[]}})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var fR=class{registry={};getExtensionsByFileExt(e){return this.registry[e]||[]}getExtensionById(e){for(let t of Object.values(this.registry))for(let n of t)if(n.id===e)return n}getExtensionsForGoogleStorageDir(){let e=[];for(let t of Object.values(this.registry))for(let n of t)n.matchGoogleStorageDir&&!e.includes(n)&&e.push(n);return e}getExtensionsForHttpUrls(){let e=[];for(let t of Object.values(this.registry))for(let n of t)n.matchHttpUrl&&e.push(n);return e}register(e){for(let t of e.fileExts){this.registry[t]==null&&(this.registry[t]=[]);let n=this.registry[t];if(n.find(r=>r.id===e.id)!=null){console.warn("Adapter extension exists",e);continue}n.push(e)}}},N5=(()=>{class i extends fR{extensionService;constructor(t){super(),this.extensionService=t,lt(()=>{if(!this.extensionService.loading())for(let n of this.extensionService.extensions)n.type===hR.ADAPTER&&this.register(n)})}static \u0275fac=function(n){return new(n||i)(X(bf))};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Kr=function(i){return i.DATA="data",i.RENDERER="renderer",i.SHOW_OPEN_IN_NEW_TAB="show_open_in_new_tab",i.BENCHMARK="benchmark",i.ENABLE_SUBGRAPH_SELECTION="ess",i.ENABLE_EXPORT_TO_RESOURCE="eetr",i.INTERNAL_COLAB="internal_colab",i}(Kr||{}),aS=(()=>{class i{router;models=[];nodeData=[];syncNavigation;nodeDataTargets=[];uiState;prevQueryParamStr="";renderer="webgl";showOpenInNewTab=!1;internalColab=!1;benchmark=!1;enableSubgraphSelection=!1;enableExportToResource=!1;constructor(t){this.router=t,this.decodeUrl()}setModels(t){this.models=t,this.updateUrl()}getModels(){return this.models}setUiState(t){this.uiState=t,this.updateUrl()}getUiState(){return this.uiState}getNodeDataSources(){return this.nodeData||[]}setNodeDataSources(t){this.nodeData=t,this.updateUrl()}getSyncNavigation(){return this.syncNavigation}setSyncNavigation(t){this.syncNavigation=t,this.updateUrl()}getNodeDataTargets(){return this.nodeDataTargets||[]}setNodeDataTargets(t){this.nodeDataTargets=t,this.updateUrl()}updateUrl(){let t={};if(this.benchmark)t[Kr.BENCHMARK]="1";else{let r={models:this.models,nodeData:this.nodeData,nodeDataTargets:this.nodeDataTargets,uiState:this.uiState,sync:this.syncNavigation};t[Kr.DATA]=JSON.stringify(r),t[Kr.RENDERER]=this.renderer,t[Kr.SHOW_OPEN_IN_NEW_TAB]=this.showOpenInNewTab?"1":"0",t[Kr.INTERNAL_COLAB]=this.internalColab?"1":"0",t[Kr.ENABLE_SUBGRAPH_SELECTION]=this.enableSubgraphSelection?"1":"0",t[Kr.ENABLE_EXPORT_TO_RESOURCE]=this.enableExportToResource?"1":"0"}let n=JSON.stringify(t);n!==this.prevQueryParamStr&&(this.prevQueryParamStr=n,this.router.navigate([],{queryParams:t,queryParamsHandling:"",replaceUrl:!1}))}decodeUrl(){let t=new URLSearchParams(document.location.search),n=t.get(Kr.DATA);if(n){let o=JSON.parse(n),s=o,a=o;a.modelUrl!=null&&(s={models:[{url:a.modelUrl}],uiState:{paneStates:[{deepestExpandedGroupNodeIds:a.deepestExpandedGroupNodeIds||[],selectedNodeId:a.selectedNodeId||"",selectedGraphId:a.selectedGraphId||"",selectedCollectionLabel:"",widthFraction:1}]}}),this.models=s.models,this.uiState=s.uiState,this.nodeData=s.nodeData,this.syncNavigation=s.sync,this.nodeDataTargets=s.nodeDataTargets}let r=t.get(Kr.RENDERER);this.renderer=r||"webgl",this.showOpenInNewTab=t.get(Kr.SHOW_OPEN_IN_NEW_TAB)==="1",this.internalColab=t.get(Kr.INTERNAL_COLAB)==="1",this.enableSubgraphSelection=t.get(Kr.ENABLE_SUBGRAPH_SELECTION)==="1",this.enableExportToResource=t.get(Kr.ENABLE_EXPORT_TO_RESOURCE)==="1",this.benchmark=t.get(Kr.BENCHMARK)==="1"}static \u0275fac=function(n){return new(n||i)(X(_h))};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Kve=["modelPathInput"];function Jve(i,e){if(i&1){let t=ne();v(0,"mat-option",22)(1,"div",31),S(2),v(3,"div",32)(4,"div",33),H("click",function(r){let o=B(t).$index,s=I();return V(s.handleEditAutocompleteModelPath(r,o))}),v(5,"mat-icon"),S(6,"edit"),b()(),v(7,"div",33),H("click",function(r){let o=B(t).$index,s=I();return V(s.handleClickDeleteAutocompleteModelPath(r,o))}),v(8,"mat-icon"),S(9,"delete"),b()()()()()}if(i&2){let t=e.$implicit;R("value",t),w(2),Se(" ",t," ")}}function e0e(i,e){i&1&&(v(0,"div",25),S(1,"or"),b())}function t0e(i,e){if(i&1){let t=ne();v(0,"button",34),H("click",function(){B(t),I();let r=ve(40);return V(r.click())}),S(1," Select from your computer "),b()}if(i&2){let t=I();R("disabled",t.hasReachedMaxModelsCount||t.loading())}}function n0e(i,e){i&1&&(v(0,"div",28),S(1," You have selected maximum number of models "),b())}function i0e(i,e){i&1&&ee(0,"mat-spinner",44)}function r0e(i,e){if(i&1&&(v(0,"div",50),S(1),b()),i&2){let t=I(2).$implicit;w(),Se(" ",t.errorMessage," ")}}function o0e(i,e){if(i&1&&(v(0,"div",49)(1,"mat-icon"),S(2,"info"),b()(),$(3,r0e,2,1,"ng-template",null,6,Tt)),i&2){let t=ve(4),n=I(3);R("bubble",t)("overlaySize",n.errorInfoPopupSize)("hoverDelayMs",50)}}function s0e(i,e){if(i&1){let t=ne();v(0,"div",51,7),H("click",function(){B(t);let r=ve(1),o=I().$implicit,s=I(2);return V(s.handleClickOpenAdapterDropdown(o,r))}),v(2,"div",52),S(3),b(),v(4,"mat-icon"),S(5,"arrow_drop_down"),b()()}if(i&2){let t=I().$implicit,n=I(2);re("disabled",n.loading()),w(3),Se(" ",n.getSelectedAdapterName(t)," ")}}function a0e(i,e){i&1&&(v(0,"div",47),S(1," No supported adapter "),b())}function c0e(i,e){if(i&1){let t=ne();v(0,"tr")(1,"td")(2,"div",40)(3,"mat-checkbox",41,5),H("change",function(r){let o=B(t).$implicit,s=I(2);return V(s.handleModelSelectionChanged(o,r.checked))}),b(),v(5,"div",42),H("click",function(){let r=B(t).$implicit,o=ve(4),s=I(2);return V(s.handleModelSelectionChanged(r,!o.checked))}),S(6),b()()(),v(7,"td")(8,"div",43),$(9,i0e,1,0,"mat-spinner",44),v(10,"div",45),S(11),b(),$(12,o0e,5,3),b()(),v(13,"td"),$(14,s0e,6,3,"div",46)(15,a0e,2,0,"div",47),b(),v(16,"td")(17,"button",48),H("click",function(){let r=B(t).index,o=I(2);return V(o.handleDeleteModel(r))}),v(18,"mat-icon"),S(19,"delete"),b()()()()}if(i&2){let t=e.$implicit,n=I(2);w(2),re("disabled",!n.hasSupportedAdapter(t)),w(),R("checked",t.selected)("disabled",!n.hasSupportedAdapter(t)||n.loading()),w(2),re("disabled",!n.hasSupportedAdapter(t)||n.loading()),w(),Se(" ",t.path," "),w(3),oe(n.showSpinner(t)?9:-1),w(),re("done",t.status()===n.ModelItemStatus.DONE)("error",n.hasError(t)),w(),Se(" ",n.getModelItemStatusString(t)," "),w(),oe(n.hasError(t)?12:-1),w(2),oe(n.hasSupportedAdapter(t)?14:15),w(3),R("disabled",n.loading())}}function l0e(i,e){if(i&1&&(v(0,"div",29)(1,"table")(2,"thead")(3,"tr")(4,"th",35),S(5,"Model name"),b(),v(6,"th"),S(7,"Status"),b(),v(8,"th")(9,"div",36),S(10," Adapter "),v(11,"div",37)(12,"mat-icon",38),S(13,"help_outline"),b()()()(),v(14,"th"),S(15,"Delete"),b()()(),v(16,"tbody"),$(17,c0e,20,16,"tr",39),b()()()),i&2){let t=I(),n=ve(47);w(11),R("bubble",n)("overlayPositions",t.adapterHelpPopupPosition)("hoverDelayMs",100),w(6),R("ngForOf",t.modelItems)("ngForTrackBy",t.trackByModelData)}}function d0e(i,e){if(i&1){let t=ne();v(0,"div",30)(1,"div",53)(2,"button",54),H("click",function(){B(t);let r=I();return V(r.handleDeselectAllModels())}),v(3,"mat-icon"),S(4,"close"),b()(),S(5),b(),v(6,"button",55),H("click",function(){B(t);let r=I();return V(r.handleClickViewSelectedModels())}),S(7," View selected models "),b()()}if(i&2){let t=I();w(),re("hide",t.selectedModelsCount===0),w(),R("disabled",t.loading()),w(3),Se(" ",t.selectedModelsCount," selected "),w(),R("disabled",t.selectedModelsCount===0||t.loading())}}function u0e(i,e){i&1&&(v(0,"div",56)(1,"div"),S(2," Support TF, TFL and StableHLO dialect. "),b()())}function h0e(i,e){i&1&&(v(0,"div",57)(1,"span",58),S(2,"Adapters"),b(),S(3,' transform model files into an intermediate format that Model Explorer can understand and visualize. For certain model types, multiple adapters may exist, offering different transformation approaches. The "default" adapter should cover the majority of common scenarios. '),ee(4,"br")(5,"br"),S(6," You can also create your own "),v(7,"span",58),S(8,"adapter extensions"),b(),S(9," to add support for more model formats. See "),v(10,"a",59),S(11,"this guide"),b(),S(12," for instructions. "),b())}var mR=10,gR="model_explorer_model_paths",L5=50,F5=(()=>{class i{changeDetectorRef;adapterExtensionService;destroyRef;localStorageService;modelLoaderService;overlay;urlService;viewContainerRef;modelPathInput;matAutocompleteTrigger;curFilePath=new vr("");modelItems=[];modelInputAutocompleteOptions=[];filteredModelInputAutocompleteOptions=[];ModelItemStatus=Bn;modelFormatHelpPopupSize={maxWidth:400,minHeight:0};errorInfoPopupSize={minHeight:0};adapterHelpPopupPosition=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",offsetY:-4}];loading=ct(!1);hasUploadedModels=ct(!1);internalColab=hf;portal=null;constructor(t,n,r,o,s,a,c,l){this.changeDetectorRef=t,this.adapterExtensionService=n,this.destroyRef=r,this.localStorageService=o,this.modelLoaderService=s,this.overlay=a,this.urlService=c,this.viewContainerRef=l,this.curFilePath.valueChanges.pipe(Ei(this.destroyRef)).subscribe(d=>{this.updateFilteredAutocompleteOptions()}),this.modelInputAutocompleteOptions=this.loadSavedModelPathsForAutocomplete(),this.updateFilteredAutocompleteOptions()}startProcessingModelSource(t){this.modelItems=t.map(n=>{if(n.url.startsWith(sS)){let r=this.adapterExtensionService.getExtensionById(El.JSON_LOADER),o=r==null?[]:[r];return{path:n.url,type:ri.GRAPH_JSONS_FROM_SERVER,status:ct(Bn.NOT_STARTED),selected:o.length>0,adapterCandidates:o,selectedAdapter:r}}else if(n.url.startsWith(R5)){let r=this.adapterExtensionService.getExtensionById(El.DATA_NEXUS),o=r==null?[]:[r];return{path:n.url,type:ri.DATA_NEXUS,status:ct(Bn.NOT_STARTED),selected:!0,adapterCandidates:o,selectedAdapter:r}}else{let r=cv(n.url,this.adapterExtensionService,!0),o=this.adapterExtensionService.getExtensionById(n.converterId||n.adapterId||"");return o||(o=r.length>0?r[0]:void 0),{path:n.url,type:ri.FILE_PATH,status:ct(Bn.NOT_STARTED),selected:r.length>0,adapterCandidates:r,selectedAdapter:o}}}),this.changeDetectorRef.detectChanges(),this.modelItems.some(n=>n.selected)&&this.handleClickViewSelectedModels()}startWithUrlEncodedData(t,n){if(t){let r=this.adapterExtensionService.getExtensionById(El.JSON_LOADER);if(!r)return;this.addModelItems([{path:"",type:ri.GRAPH_JSONS_FROM_SERVER,status:ct(Bn.NOT_STARTED),selected:!0,adapterCandidates:[r],selectedAdapter:r}])}if(n.length>0){let r=n.map(o=>{let s=cv(o,this.adapterExtensionService,!0);return{path:o,type:ri.FILE_PATH,status:ct(Bn.NOT_STARTED),selected:s.length>0,adapterCandidates:s,selectedAdapter:s.length>0?s[0]:void 0}});this.addModelItems(r),this.addPathsToAutocompleteHistory(n),this.updateFilteredAutocompleteOptions()}this.changeDetectorRef.detectChanges(),t&&n.length===0&&this.handleClickViewSelectedModels()}handleClickAddEnteredModelPath(){return It(this,null,function*(){yield new Promise(r=>{setTimeout(r)});let t=this.curFilePath.value;if(t==null)return;let n=t.trim().split(",").filter(r=>r.trim()!=="").map(r=>{let o=cv(r,this.adapterExtensionService,!0);return{path:r,type:this.isInternal?ri.REMOTE:ri.FILE_PATH,status:ct(Bn.NOT_STARTED),selected:o.length>0,adapterCandidates:o,selectedAdapter:o.length>0?o[0]:void 0}});this.addModelItems(n),this.addPathsToAutocompleteHistory(n.map(r=>r.path)),this.curFilePath.setValue(""),setTimeout(()=>{this.matAutocompleteTrigger?.closePanel(),this.modelPathInput.nativeElement.blur()})})}handleAutocompleteOptionSelected(t){this.disableAddEnteredModelPathButton||(t.option.deselect(),this.handleClickAddEnteredModelPath())}handleModelSelectionChanged(t,n){t.selected=n}handleDeleteModel(t){this.modelItems.splice(t,1),this.changeDetectorRef.markForCheck()}handleDeselectAllModels(){for(let t of this.modelItems)t.selected=!1}handleEditAutocompleteModelPath(t,n){t.stopPropagation(),this.curFilePath.setValue(this.modelInputAutocompleteOptions[n].path),this.modelPathInput.nativeElement.focus()}handleClickDeleteAutocompleteModelPath(t,n){t.stopPropagation(),this.modelInputAutocompleteOptions.splice(n,1),this.updateFilteredAutocompleteOptions(),this.localStorageService.setItem(gR,JSON.stringify(this.modelInputAutocompleteOptions))}handleClickUpload(t){let n=t.files;if(!n)return;let r=[];for(let o=0;o0,adapterCandidates:c,selectedAdapter:c.length>0?c[0]:void 0}):n.push({path:o.name,type:ri.LOCAL,status:ct(Bn.NOT_STARTED),selected:c.length>0,file:o,adapterCandidates:c,selectedAdapter:c.length>0?c[0]:void 0})}this.addModelItems(n)}handleClickOpenAdapterDropdown(t,n){let r=t.selectedAdapter?.id,o=this.createOverlay(n),s=o.attach(this.portal);s.instance.selectedAdapter=t.selectedAdapter,s.instance.candidates=t.adapterCandidates||[],s.instance.onClose.subscribe(a=>{o.dispose(),a?.id!==r&&t.errorMessage!=null&&(t.status.set(Bn.NOT_STARTED),t.errorMessage=void 0,t.selected=!0),t.selectedAdapter=a,this.changeDetectorRef.markForCheck()})}handleClickViewSelectedModels(){this.loading.set(!0);let t=this.modelItems.filter(n=>n.selected);this.modelLoaderService.loadModels(t).then(()=>{this.loading.set(!1)}),this.urlService.setUiState(void 0),this.urlService.setModels(t.filter(n=>n.type===ri.REMOTE||n.type===ri.GRAPH_JSONS_FROM_SERVER||n.type===ri.FILE_PATH).map(n=>({url:n.path,adapterId:n.selectedAdapter?.id}))),this.hasUploadedModels.set(t.some(n=>n.type===ri.LOCAL))}trackByModelData(t,n){return`${n.path}_${n.file?.size}_${n.file?.lastModified}`}isNotStarted(t){return t.status()===Bn.NOT_STARTED}getSelectedAdapterName(t){return t.selectedAdapter==null?"?":(t.adapterCandidates||[]).indexOf(t.selectedAdapter)===0?"Default":t.selectedAdapter?.name||"?"}hasSupportedAdapter(t){return(t.adapterCandidates||[]).length>0}hasMultipleSupportedAdapters(t){return(t.adapterCandidates||[]).length>1}showSpinner(t){return t.status()===Bn.PROCESSING||t.status()===Bn.UPLOADING}hasError(t){return t.status()===Bn.ERROR}getModelItemStatusString(t){let n=t.status();return n===Bn.UPLOADING?"Processing":n}get disableAddEnteredModelPathButton(){if(this.hasReachedMaxModelsCount)return!0;if(this.isInternal){let t=(this.curFilePath.value||"").toLowerCase().trim();return t!==""&&!$C(t)&&!t.startsWith("http")||t===""}else{let t=(this.curFilePath.value||"").trim();return t===""||t!==""&&!t.startsWith("/")&&!t.startsWith("~")}}get isInternal(){return!!0}get isExternal(){return!0}get selectedModelsCount(){return this.modelItems.filter(t=>t.selected).length}get hasReachedMaxModelsCount(){return this.modelItems.length===mR}get modelPathInputPlaceholder(){return"Absolute file paths (recommended for large models)"}updateFilteredAutocompleteOptions(){let n=(this.curFilePath.value||"").toLowerCase();this.filteredModelInputAutocompleteOptions=this.modelInputAutocompleteOptions.filter(r=>r.path.toLowerCase().includes(n)).map(r=>r.path),this.changeDetectorRef.markForCheck()}addPathsToAutocompleteHistory(t){let n=this.loadSavedModelPathsForAutocomplete();for(let r of t){let o=n.findIndex(s=>s.path===r);if(o>=0){let s=n.splice(o,1);s&&s.length>0&&(s[0].ts=Date.now(),n.unshift(s[0]))}else n.unshift({path:r,ts:Date.now()})}n.length>L5&&n.splice(L5),this.localStorageService.setItem(gR,JSON.stringify(n)),this.modelInputAutocompleteOptions=n}addModelItems(t){let n=t.filter(r=>this.modelItems.find(o=>o.path===r.path&&o.file?.size===r.file?.size&&o.file?.lastModified===r.file?.lastModified)==null);this.modelItems.push(...n),this.modelItems.length>mR&&this.modelItems.splice(mR),this.changeDetectorRef.markForCheck()}loadSavedModelPathsForAutocomplete(){return JSON.parse(this.localStorageService.getItem(gR)||"[]")}createOverlay(t){let n=new fi({positionStrategy:this.overlay.position().flexibleConnectedTo(t).withPositions([{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"}]),hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",scrollStrategy:this.overlay.scrollStrategies.reposition(),maxWidth:"380px",panelClass:"graph-selector-panel"}),r=this.overlay.create(n);return this.portal=new Ai(A5,this.viewContainerRef),r.backdropClick().subscribe(()=>{r.dispose()}),r}static \u0275fac=function(n){return new(n||i)(M(Ne),M(N5),M(Fi),M(no),M("ModelLoaderService"),M($t),M(aS),M(Zt))};static \u0275cmp=ce({type:i,selectors:[["model-source-input"]],viewQuery:function(n,r){if(n&1&&(Ee(Kve,5),Ee(av,5)),n&2){let o;be(o=ye())&&(r.modelPathInput=o.first),be(o=ye())&&(r.matAutocompleteTrigger=o.first)}},standalone:!0,features:[le],decls:48,vars:16,consts:[["auto","matAutocomplete"],["modelPathInput",""],["uploadInput",""],["externalMlirHelp",""],["adapterHelp",""],["checkbox",""],["errorInfo",""],["selector",""],[1,"container"],[1,"content"],[1,"title"],[1,"description-container"],[1,"description"],["href","https://www.tensorflow.org/","target","_blank"],["href","https://www.tensorflow.org/lite","target","_blank"],["href","https://www.tensorflow.org/js","target","_blank"],["href","https://www.tensorflow.org/guide/jax2tf","target","_blank"],["href","https://github.com/google-ai-edge/model-explorer/wiki/2.-User-Guide#how-to-select-pytorch-models","target","_blank"],[1,"help-trigger","external",3,"bubble","overlaySize","hoverDelayMs"],[1,"source-input-container"],[1,"input-container"],[1,"model-path-autocomplete",3,"optionSelected"],[3,"value"],[3,"keydown.enter","placeholder","formControl","matAutocomplete"],["mat-raised-button","",1,"btn-add-model-path",3,"click","disabled"],[1,"or-label"],["mat-flat-button","",1,"btn-upload",3,"disabled"],["type","file","multiple","",1,"upload-input",3,"change"],[1,"model-count-warning"],[1,"models-table"],[1,"table-action-bar"],[1,"option-container"],[1,"icons-container"],[1,"mat-icon-container",3,"click"],["mat-flat-button","",1,"btn-upload",3,"click","disabled"],[1,"model-name-col"],[1,"adapter-header"],[1,"icon-container",3,"bubble","overlayPositions","hoverDelayMs"],["fontSet","google-material-icons"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"model-name-container"],[3,"change","checked","disabled"],[1,"model-path",3,"click"],[1,"model-status-container"],["color","primary","diameter","16"],[1,"model-status-label-container"],[1,"selected-adapter-container",3,"disabled"],[1,"no-supported-adapter-msg"],["mat-icon-button","",1,"btn-delete-model-item",3,"click","disabled"],[1,"error-info-container",3,"bubble","overlaySize","hoverDelayMs"],[1,"model-explorer-error-info-popup"],[1,"selected-adapter-container",3,"click"],[1,"selected-adapter-label"],[1,"selection-status"],["mat-icon-button","",1,"btn-deselect-all",3,"click","disabled"],["mat-flat-button","","color","primary",1,"btn-view-models",3,"click","disabled"],[1,"model-explorer-model-format-help-popup"],[1,"model-explorer-adapter-help-popup"],[1,"bold"],["href","https://github.com/google-ai-edge/model-explorer/wiki/6.-Develop-Adapter-Extension","target","_blank"]],template:function(n,r){if(n&1){let o=ne();v(0,"div",8)(1,"div",9)(2,"div",10),S(3," Select Models "),b(),v(4,"div",11)(5,"div",12),S(6," Select models from your comupter or enter the file paths directly (up to 10 in total)."),ee(7,"br"),S(8," Supported model formats: "),v(9,"a",13),S(10,"TF"),b(),S(11," (.pb, .pbtxt, .graphdef), "),v(12,"a",14),S(13,"TFLite"),b(),S(14," (.tflite), "),v(15,"a",15),S(16,"TFJS"),b(),S(17," (.json), "),v(18,"a",16),S(19,"JAX"),b(),S(20," (.pb), "),v(21,"a",17),S(22,"PyTorch ExportedProgram"),b(),S(23," (.pt2), "),v(24,"span",18),S(25," MLIR "),b(),S(26," (.mlir, .mlirbc). "),b()(),v(27,"div",19)(28,"div",20)(29,"mat-autocomplete",21,0),H("optionSelected",function(a){return B(o),V(r.handleAutocompleteOptionSelected(a))}),rn(31,Jve,10,2,"mat-option",22,gr),b(),v(33,"input",23,1),H("keydown.enter",function(){return B(o),V(!r.disableAddEnteredModelPathButton&&r.handleClickAddEnteredModelPath())}),b(),v(35,"button",24),H("click",function(){return B(o),V(r.handleClickAddEnteredModelPath())}),S(36," Add "),b()(),$(37,e0e,2,0,"div",25)(38,t0e,2,1,"button",26),v(39,"input",27,2),H("change",function(){B(o);let a=ve(40);return V(r.handleClickUpload(a))}),b()(),$(41,n0e,2,0,"div",28)(42,l0e,18,5,"div",29),b(),$(43,d0e,8,5,"div",30),b(),$(44,u0e,3,0,"ng-template",null,3,Tt)(46,h0e,13,0,"ng-template",null,4,Tt)}if(n&2){let o=ve(30),s=ve(45);w(),re("no-models",r.modelItems.length===0),w(23),R("bubble",s)("overlaySize",r.modelFormatHelpPopupSize)("hoverDelayMs",50),w(3),re("reverse",r.isExternal),w(4),on(r.filteredModelInputAutocompleteOptions),w(2),R("placeholder",r.modelPathInputPlaceholder)("formControl",r.curFilePath)("matAutocomplete",o),w(2),R("disabled",r.disableAddEnteredModelPathButton||r.loading()),w(2),oe(r.internalColab?-1:37),w(),oe(r.internalColab?-1:38),w(3),oe(r.hasReachedMaxModelsCount?41:-1),w(),oe(r.modelItems.length>0?42:-1),w(),oe(r.modelItems.length>0?43:-1)}},dependencies:[Hn,Ae,Mi,O5,D5,Zc,av,xn,Ti,Wo,FC,LC,ma,ao,fa,ga,Xt,tt,pt,br,Xs,Ho,vo],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;box-sizing:border-box;display:flex;align-items:flex-start;flex-direction:column;border:1px solid #dadce0;border-radius:8px;overflow:hidden}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:24px 24px 0;overflow:hidden;display:flex;flex-direction:column}.container[_ngcontent-%COMP%] .content.no-models[_ngcontent-%COMP%]{padding-bottom:24px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#1f1f1f;font-size:24px}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%]{color:#444746;font-size:14px;margin-top:8px}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{line-height:20px}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .tfhub[_ngcontent-%COMP%]{display:inline-block;text-decoration:underline;text-decoration-color:#aaa;cursor:help}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .help-trigger[_ngcontent-%COMP%]{display:inline-block;margin-right:6px;text-decoration:underline;text-decoration-color:#aaa;cursor:help}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .help-trigger.external[_ngcontent-%COMP%]{margin-right:0}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:inherit}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%]{display:flex;height:56px;box-sizing:border-box;width:100%;margin-top:8px;padding:8px 0;align-items:center;flex-shrink:0}.container[_ngcontent-%COMP%] .source-input-container.reverse[_ngcontent-%COMP%]{flex-direction:row-reverse}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{height:100%;box-sizing:border-box;background-color:#f0f4f9;border-radius:99px;flex-grow:1;display:flex;align-items:center;padding-left:18px}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:100%;flex-grow:1;border:none;outline:none;background-color:transparent;color:#444746;font-size:14px;margin-right:16px}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .btn-add-model-path[_ngcontent-%COMP%]{background-color:#fff;border-radius:99px;color:#0b57d0;height:40px}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .btn-add-model-path[disabled][_ngcontent-%COMP%]{background-color:#1f1f1f1f;color:#1f1f1f61}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .or-label[_ngcontent-%COMP%]{font-size:14px;margin:0 20px;color:#5f6368}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .btn-upload[_ngcontent-%COMP%]{height:100%;background-color:#c2e7ff;border-radius:99px;color:#001d35}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .btn-upload[disabled][_ngcontent-%COMP%]{background-color:#1f1f1f1f;color:#1f1f1f61}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .upload-input[_ngcontent-%COMP%]{display:none}.container[_ngcontent-%COMP%] .model-count-warning[_ngcontent-%COMP%]{color:#ab6c17;background-color:#ffefd9;margin:4px 0;width:fit-content;padding:2px 9px;border-radius:4px;font-size:13px;font-weight:500}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%]{width:100%;color:#1f1f1f;font-size:14px;margin-top:18px;overflow:hidden auto}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;border-spacing:0;border-collapse:collapse;padding:0}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:sticky;top:0;z-index:100;box-shadow:inset 0 -1px #c4c7c5;background-color:#fff}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] .model-name-col[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] .adapter-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] .adapter-header[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;opacity:.8}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] .adapter-header[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] .adapter-header[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:#777}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{height:49px;text-align:left;padding:0;font-weight:500}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{height:49px;text-align:left;padding:0}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid #c4c7c5}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:0}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-name-container[_ngcontent-%COMP%]{display:flex;align-items:center;padding-left:12px;margin-right:12px;word-break:break-all}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-name-container.disabled[_ngcontent-%COMP%]{pointer-events:none}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-name-container[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{margin-right:2px}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-name-container[_ngcontent-%COMP%] .model-path[_ngcontent-%COMP%]{cursor:pointer;line-height:16px;padding:8px 0}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-name-container[_ngcontent-%COMP%] .model-path.disabled[_ngcontent-%COMP%]{pointer-events:none}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .selected-adapter-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;cursor:pointer;height:48px;margin-right:24px;white-space:nowrap}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .selected-adapter-container.disabled[_ngcontent-%COMP%]{opacity:.5;pointer-events:none}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .selected-adapter-container[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{opacity:1}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .selected-adapter-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{opacity:.7}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .no-supported-adapter-msg[_ngcontent-%COMP%]{color:#ab6c17;background-color:#ffefd9;padding:2px 8px;width:fit-content;border-radius:4px;font-size:12px;margin-right:24px;white-space:nowrap;font-weight:500}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%]{display:flex;align-items:center;margin-right:32px}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{margin-right:4px}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] .model-status-label-container[_ngcontent-%COMP%]{font-size:12px;padding:2px 8px;background-color:#f1f3f4;display:flex;align-items:center;justify-content:center;color:#3c4043;width:fit-content;border-radius:4px;white-space:nowrap;font-weight:500}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] .model-status-label-container.done[_ngcontent-%COMP%]{color:#0d652d;background-color:#e6f4ea}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] .model-status-label-container.error[_ngcontent-%COMP%]{color:#a50e0e;background-color:#fce8e6}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] .error-info-container[_ngcontent-%COMP%]{width:20px;display:flex;align-items:center;justify-content:center;margin-left:4px;cursor:pointer}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] .error-info-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:20px;height:20px;font-size:20px}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .btn-delete-model-item[_ngcontent-%COMP%]{width:36px;height:36px;padding:0;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .btn-delete-model-item[disabled][_ngcontent-%COMP%]{opacity:.5}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .btn-delete-model-item[_ngcontent-%COMP%] mat-icon{font-size:20px;width:20px;height:20px;color:#444746}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%]{flex-shrink:0;height:60px;width:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;background-color:#f0f4f9;padding:0 24px 0 38px}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%] .selection-status[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:14px;color:#444746}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%] .selection-status.hide[_ngcontent-%COMP%]{visibility:hidden}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%] .btn-deselect-all[_ngcontent-%COMP%]{width:36px;height:36px;padding:0;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%] .btn-deselect-all[_ngcontent-%COMP%] mat-icon{font-size:20px;width:20px;height:20px;color:#444746}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%] .btn-view-models[_ngcontent-%COMP%]{height:40px;border-radius:99px}.container[_ngcontent-%COMP%] .instructions-container[_ngcontent-%COMP%]{font-size:13px;color:#555;margin-top:24px;display:none}.container[_ngcontent-%COMP%] .instructions-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;margin-right:4px}.container[_ngcontent-%COMP%] .instructions-container[_ngcontent-%COMP%] .instruction-title[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .instructions-container[_ngcontent-%COMP%] .instruction-title[_ngcontent-%COMP%] .model-format[_ngcontent-%COMP%]{color:#333;margin-right:4px;margin-left:4px;border:1px solid #ccc;border-radius:4px;padding:2px 4px;cursor:pointer}.container[_ngcontent-%COMP%] .instructions-container[_ngcontent-%COMP%] .instruction-title[_ngcontent-%COMP%] .model-format[_ngcontent-%COMP%]:hover{background-color:#eee} .model-explorer-upload-help-popup{padding:12px;font-weight:400;color:#555;line-height:14px;font-size:12px;font-family:Google Sans Text,Arial,Helvetica,sans-serif} .model-explorer-adapter-help-popup{padding:12px;font-weight:400;color:#555;line-height:15px;font-size:12px;font-family:Google Sans Text,Arial,Helvetica,sans-serif} .model-explorer-adapter-help-popup .bold{font-weight:700} .model-explorer-model-format-help-popup{padding:12px;font-weight:400;color:#555;line-height:15px;font-size:12px;font-family:Google Sans Text,Arial,Helvetica,sans-serif;letter-spacing:normal} .model-explorer-model-format-help-popup a{color:inherit} .model-explorer-model-format-help-popup .example{margin-top:8px;color:#aaa} .model-explorer-model-format-help-popup .example ul{margin:4px 0;padding-inline-start:28px} .model-explorer-model-format-help-popup .example li{margin-top:4px} .model-explorer-model-format-help-popup .info{display:inline-block;background-color:#ffd1a8} .model-explorer-error-info-popup{padding:12px;font-weight:400;background-color:#f0f4f9;line-height:14px;font-size:12px;font-family:Google Sans Text,Arial,Helvetica,sans-serif} .model-path-autocomplete mat-option{min-height:13px;font-size:13px;line-height:13px;padding-top:5px;padding-bottom:5px} .model-path-autocomplete mat-option:hover .option-container .mat-icon-container{visibility:visible} .model-path-autocomplete mat-option>span{width:100%} .model-path-autocomplete mat-option .option-container{width:100%;display:flex;align-items:center;justify-content:space-between;word-break:break-all} .model-path-autocomplete mat-option .option-container .icons-container{display:flex;align-items:center;gap:4px;min-width:50px;justify-content:flex-end} .model-path-autocomplete mat-option .option-container .mat-icon-container{visibility:hidden;display:flex;align-items:center;justify-content:center;opacity:.6;width:18px} .model-path-autocomplete mat-option .option-container .mat-icon-container:hover{opacity:1} .model-path-autocomplete mat-option .option-container .mat-icon-container mat-icon{font-size:18px;width:18px;height:18px} - - - - - - - - - - - - - - - - - -`],changeDetection:0})}return i})();var p0e=(i,e)=>e.name;function f0e(i,e){if(i&1){let t=ne();v(0,"div",11),H("click",function(){B(t);let r=I().$implicit;return V(r.expanded=!r.expanded)}),v(1,"mat-icon"),S(2,"unfold_more"),b()()}}function m0e(i,e){if(i&1&&(v(0,"div",3)(1,"div",6),S(2),b(),v(3,"div",7),S(4),b(),v(5,"div",8)(6,"div",9),S(7),b(),$(8,f0e,3,0,"div",10),b()()),i&2){let t=e.$implicit;w(2),st(t.name),w(2),st(t.copyright),w(),re("expanded",t.expanded),w(2),st(t.license),w(),oe(t.expanded?-1:8)}}var B5=(()=>{class i{libs=[{name:"Angular",copyright:"Copyright (c) 2010-2024 Google LLC.",license:`The MIT License - -Copyright (c) 2010-2024 Google LLC. https://angular.io/license - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE.`},{name:"d3 (v5.7.0)",copyright:"Copyright 2010-2017 Mike Bostock",license:`Copyright 2010-2017 Mike Bostock -All rights reserved. - -Redistribution and use in source and binary forms, with or without modification, -are permitted provided that the following conditions are met: - -* Redistributions of source code must retain the above copyright notice, this - list of conditions and the following disclaimer. - -* Redistributions in binary form must reproduce the above copyright notice, - this list of conditions and the following disclaimer in the documentation - and/or other materials provided with the distribution. - -* Neither the name of the author nor the names of contributors may be used to - endorse or promote products derived from this software without specific prior - written permission. - -THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND -ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED -WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR -ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES -(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; -LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON -ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT -(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS -SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.`},{name:"dagre (v0.8.5)",copyright:"Copyright (c) 2012-2014 Chris Pettitt",license:`Copyright (c) 2012-2014 Chris Pettitt - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE.`},{name:"three.js (r134)",copyright:"Copyright \xA9 2010-2021 three.js authors",license:`The MIT License - -Copyright \xA9 2010-2021 three.js authors - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE.`}];static \u0275fac=function(n){return new(n||i)};static \u0275cmp=ce({type:i,selectors:[["open-source-libs-dialog"]],standalone:!0,features:[le],decls:9,vars:0,consts:[["mat-dialog-title",""],[1,"title"],["mat-dialog-content","",1,"dialog-content"],[1,"lib-container"],["mat-dialog-actions","","align","end"],["mat-button","","mat-dialog-close",""],[1,"name"],[1,"copyright"],[1,"license-container"],[1,"license-content"],[1,"icon-container"],[1,"icon-container",3,"click"]],template:function(n,r){n&1&&(v(0,"div",0)(1,"div",1),S(2,"Open source libraries"),b()(),v(3,"div",2),rn(4,m0e,9,6,"div",3,p0e),b(),v(6,"div",4)(7,"button",5),S(8,"Close"),b()()),n&2&&(w(4),on(r.libs))},dependencies:[Ae,xn,Ti,_a,pf,ff,gf,mf,tt,pt],styles:[`*[_ngcontent-%COMP%]:not(mat-icon){font-family:Google Sans Text,Arial,Helvetica,sans-serif!important;letter-spacing:normal!important}.title[_ngcontent-%COMP%]{font-size:24px;font-weight:500;margin-top:-16px}.dialog-content[_ngcontent-%COMP%]{padding-bottom:0}.lib-container[_ngcontent-%COMP%]{margin:18px 0}.lib-container[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:#333}.lib-container[_ngcontent-%COMP%] .copyright[_ngcontent-%COMP%]{font-size:12px;color:#777}.lib-container[_ngcontent-%COMP%] .license-container[_ngcontent-%COMP%]{width:520px;font-size:11px;border:1px solid #ccc;margin-top:8px;background-color:#f9f9f9;height:100px;overflow:hidden;position:relative}.lib-container[_ngcontent-%COMP%] .license-container.expanded[_ngcontent-%COMP%]{height:fit-content}.lib-container[_ngcontent-%COMP%] .license-container[_ngcontent-%COMP%] .license-content[_ngcontent-%COMP%]{white-space:pre-wrap;line-height:14px;padding:8px;overflow:hidden;height:100%;box-sizing:border-box}.lib-container[_ngcontent-%COMP%] .license-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{position:absolute;right:8px;top:8px;cursor:pointer;opacity:.8}.lib-container[_ngcontent-%COMP%] .license-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1} - - - - - - - - - - - - - - - - - -`]})}return i})();function g0e(i,e){i&1&&(S(0," When "),v(1,"a",19),S(2,"View tensor shape on edge"),b(),S(3," is turned on, Model Explorer will try to position the shape along the edge curve. When the edge is close to vertical, the shape may be hard to read. Enabling this option will force the shapes to be rendered horizontally in such situations to improve readbility. "))}function _0e(i,e){if(i&1&&S(0),i&2){let t=I(3).$implicit;Se(" ",t.help," ")}}function v0e(i,e){if(i&1&&(v(0,"div",18),$(1,g0e,4,0)(2,_0e,1,1),b()),i&2){let t=I(2).$implicit;w(),oe(t.key==="disallow_vertical_edge_labels"?1:2)}}function b0e(i,e){if(i&1&&(v(0,"div",16)(1,"mat-icon",17),S(2,"help_outline"),b()(),$(3,v0e,3,1,"ng-template",null,0,Tt)),i&2){let t=ve(4),n=I(2);R("bubble",t)("overlaySize",n.helpPopupSize)("overlayPositions",n.helpPopupPosition)("hoverDelayMs",100)}}function y0e(i,e){if(i&1){let t=ne();ho(0),v(1,"mat-slide-toggle",20),H("change",function(r){B(t);let o=I().$implicit,s=I();return V(s.settingsService.saveBooleanValue(r.checked,o.key))}),b(),po()}if(i&2){let t=I().$implicit,n=I();w(),R("checked",n.settingsService.getBooleanValue(t))}}function x0e(i,e){if(i&1){let t=ne();ho(0),v(1,"input",21,1),H("focus",function(){B(t);let r=ve(2);return V(r.select())})("change",function(){B(t);let r=ve(2),o=I().$implicit,s=I();return V(s.settingsService.saveNumberValue(r.valueAsNumber,o.key))}),b(),v(3,"div",22),H("click",function(){B(t);let r=I().$implicit,o=I();return V(o.handleClickResetToDefaultNumber(r))}),S(4,"Reset to default"),b(),po()}if(i&2){let t=I().$implicit,n=I();w(),R("value",n.settingsService.getNumberValue(t))}}function w0e(i,e){if(i&1){let t=ne();ho(0),v(1,"textarea",21,1),H("focus",function(){B(t);let r=ve(2);return V(r.select())})("change",function(){B(t);let r=ve(2),o=I().$implicit,s=I();return V(s.settingsService.saveStringValue(r.value,o.key))}),b(),v(3,"div",22),H("click",function(){B(t);let r=I().$implicit,o=I();return V(o.handleClickResetToDefaultText(r))}),S(4,"Reset to default"),b(),po()}if(i&2){let t=I().$implicit,n=I();w(),R("value",n.settingsService.getStringValue(t))}}function C0e(i,e){if(i&1){let t=ne();ho(0),v(1,"div",23)(2,"label")(3,"input",24,2),H("change",function(){B(t);let r=ve(4),o=I().$implicit,s=I();return V(s.settingsService.saveStringValue(r.value,o.key))}),b()(),v(5,"input",25,3),H("change",function(){B(t);let r=ve(4),o=I().$implicit,s=I();return V(s.settingsService.saveStringValue(r.value,o.key))}),b()(),v(7,"div",22),H("click",function(){B(t);let r=I().$implicit,o=I();return V(o.handleClickResetToDefaultText(r))}),S(8,"Reset to default"),b(),po()}if(i&2){let t=I().$implicit,n=I();w(2),Jt("background-color",n.settingsService.getStringValue(t)),w(),R("value",n.settingsService.getStringValue(t)),w(2),R("value",n.settingsService.getStringValue(t))}}function S0e(i,e){if(i&1&&(v(0,"div",12),ho(1,13),v(2,"div",14),S(3),$(4,b0e,5,4),b(),$(5,y0e,2,1,"ng-container",15)(6,x0e,5,1,"ng-container",15)(7,w0e,5,1,"ng-container",15)(8,C0e,9,4,"ng-container",15),po(),b()),i&2){let t=e.$implicit,n=I();w(),R("ngSwitch",t.type),w(2),Se(" ",t.label," "),w(),oe(t.help?4:-1),w(),R("ngSwitchCase",n.SettingType.BOOLEAN),w(),R("ngSwitchCase",n.SettingType.NUMBER),w(),R("ngSwitchCase",n.SettingType.TEXT_MULTILINE),w(),R("ngSwitchCase",n.SettingType.COLOR)}}var V5=(()=>{class i{settingsService;SettingType=co;helpPopupSize={minWidth:0,minHeight:0,maxWidth:340};helpPopupPosition=[{originX:"end",originY:"top",overlayX:"start",overlayY:"top",offsetX:4}];constructor(t){this.settingsService=t}allSettings=oS;handleClickResetToDefaultText(t){this.settingsService.saveStringValue(t.defaultValue,t.key)}handleClickResetToDefaultNumber(t){this.settingsService.saveNumberValue(t.defaultValue,t.key)}static \u0275fac=function(n){return new(n||i)(M(vf))};static \u0275cmp=ce({type:i,selectors:[["settings-dialog"]],standalone:!0,features:[le],decls:11,vars:1,consts:[["helpPopup",""],["input",""],["colorPicker",""],["colorInput",""],["mat-dialog-title","",1,"title-container"],[1,"title"],[1,"local-storage-info"],["mat-dialog-content","",1,"dialog-content"],[1,"settings-container"],["class","setting-item",4,"ngFor","ngForOf"],["mat-dialog-actions","","align","end",1,"buttons-container"],["mat-button","","mat-dialog-close",""],[1,"setting-item"],[3,"ngSwitch"],[1,"setting-label"],[4,"ngSwitchCase"],[1,"icon-container",3,"bubble","overlaySize","overlayPositions","hoverDelayMs"],["fontSet","google-material-icons"],[1,"model-explorer-settings-help-popup"],["href","https://github.com/google-ai-edge/model-explorer/wiki/2.-User-Guide#overlay-data-on-nodesedges","target","_blank"],[3,"change","checked"],["type","number",3,"focus","change","value"],[1,"reset",3,"click"],[1,"color-picker-container"],["type","color",3,"change","value"],["type","text",3,"change","value"]],template:function(n,r){n&1&&(v(0,"div",4)(1,"div",5),S(2,"Advanced settings"),b(),v(3,"div",6),S(4," Settings are stored in current browser's local storage "),b()(),v(5,"div",7)(6,"div",8),$(7,S0e,9,7,"div",9),b()(),v(8,"div",10)(9,"button",11),S(10,"Close"),b()()),n&2&&(w(7),R("ngForOf",r.allSettings))},dependencies:[Hn,Ae,Mi,i1,mL,xn,Ti,_a,pf,ff,gf,mf,tt,pt,jC,GC],styles:[`*[_ngcontent-%COMP%]:not(mat-icon){font-family:Google Sans Text,Arial,Helvetica,sans-serif}.title-container[_ngcontent-%COMP%]{border-bottom:1px solid #ddd}.title[_ngcontent-%COMP%]{font-size:24px;font-weight:500;margin-top:-16px}.local-storage-info[_ngcontent-%COMP%]{font-size:12px;color:#777;margin-top:6px}.dialog-content[_ngcontent-%COMP%]{padding-bottom:0}.settings-container[_ngcontent-%COMP%]{font-size:13px;color:#000;margin-top:20px;margin-bottom:10px}.setting-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;margin-bottom:24px}.setting-item[_ngcontent-%COMP%] .setting-label[_ngcontent-%COMP%]{line-height:16px;margin-bottom:4px;width:100%;display:flex;align-items:center;justify-content:space-between}.setting-item[_ngcontent-%COMP%] .setting-label[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{width:16px;height:16px;margin-left:12px;opacity:.4;cursor:pointer}.setting-item[_ngcontent-%COMP%] .setting-label[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:.6}.setting-item[_ngcontent-%COMP%] .setting-label[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.setting-item[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .setting-item[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{box-sizing:border-box;width:100%}.setting-item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-outer-spin-button, .setting-item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.setting-item[_ngcontent-%COMP%] .reset[_ngcontent-%COMP%]{color:#999;cursor:pointer;margin-top:2px;text-decoration:underline;-webkit-user-select:none;user-select:none}.setting-item[_ngcontent-%COMP%] .reset[_ngcontent-%COMP%]:hover{color:#777}.color-picker-container[_ngcontent-%COMP%]{display:flex;align-items:center;overflow:hidden;border-radius:2px;border:1px solid rgb(118,118,118);width:100%;background-color:#fff;box-sizing:border-box;height:24px;position:relative}.color-picker-container[_ngcontent-%COMP%]:focus-within{border-color:#1a73e8;outline:1px solid #1a73e8}.color-picker-container[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:inline-block;width:16px;height:16px;margin:2px;background-color:red;border-radius:4px;cursor:pointer;border:1px solid #ddd}.color-picker-container[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{visibility:hidden}.color-picker-container[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]{border:none;height:100%;background-color:transparent;outline:none}.buttons-container[_ngcontent-%COMP%]{border-top:1px solid #ddd} .model-explorer-settings-help-popup{font-size:12px;padding:8px;background-color:#fff;line-height:normal} .model-explorer-settings-help-popup .bold{font-weight:700} - - - - - - - - - - - - - - - - - -`]})}return i})();var z5=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275cmp=ce({type:i,selectors:[["welcome-card"]],standalone:!0,features:[le],decls:13,vars:0,consts:[[1,"container"],[1,"left"],[1,"title"],[1,"description"],[1,"doc-links-container"],[1,"doc-link"],["href","https://github.com/google-ai-edge/model-explorer","target","_blank"],[1,"doc-text"]],template:function(n,r){n&1&&(v(0,"div",0)(1,"div",1)(2,"div",2),S(3," Welcome to Model Explorer "),b(),v(4,"div",3),S(5," A modern model graph visualizer and debugger "),b(),v(6,"div",4)(7,"div",5)(8,"a",6)(9,"mat-icon"),S(10,"open_in_new"),b(),v(11,"span",7),S(12,"Learn more from GitHub"),b()()()()()())},dependencies:[Ae,tt,pt],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;box-sizing:border-box;border:1px solid #dadce0;border-radius:8px;padding:24px;display:flex;justify-content:space-between}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#1f1f1f;font-size:24px}.container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{color:#3c4043;margin-top:8px;font-size:14px}.container[_ngcontent-%COMP%] .doc-links-container[_ngcontent-%COMP%]{margin-top:24px}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%]{font-size:14px;color:#0b57d0;cursor:pointer;opacity:.8;margin-bottom:8px}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%] .doc-text[_ngcontent-%COMP%]{color:#0b57d0}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;align-items:center;text-decoration:none}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%] [_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%] [_ngcontent-%COMP%]:hover .doc-text[_ngcontent-%COMP%]{text-decoration:underline}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;margin-right:8px;color:#0b57d0}.container[_ngcontent-%COMP%] .video-container[_ngcontent-%COMP%]{width:430px;height:100%;border-radius:8px;background-color:#f1f1f1;display:flex;align-items:center;justify-content:center;color:#999;font-size:13px} - - - - - - - - - - - - - - - - - -`]})}return i})();var cS=new me("Inject:Window");var U5=(()=>{class i{window;gtag;constructor(t){this.window=t,this.gtag=this.window.gtag}trackEvent(t,n="",r,o,s){let a=this.getPath(this.window.location.href);r=r??a,o=o??t,s=s??1;let c={event_category:n,event_label:r,description:o,value:s,page_path:a};this.trackEventInternal(t,c)}trackNumeric(t,n){this.trackEvent(t,"",void 0,void 0,n)}getPath(t){return"/"+t.split("/").slice(3).join("/")}trackEventInternal(t,n){this.gtag&&this.gtag("event",t,Z({},n))}static \u0275fac=function(n){return new(n||i)(X(cS))};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var H5=function(i){return i.RefreshPage="refreshPage",i}(H5||{}),G5=(()=>{class i{init(){!hf&&new EventSource("/apistream/server_director").addEventListener("message",n=>{if(!n.data)return;let r=JSON.parse(n.data);switch(r.name){case H5.RefreshPage:yO(window.location,r.url);break;default:break}})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var I0e=["modelSourceInput"],T0e=["modelGraphVisualizer"],D0e=()=>[];function P0e(i,e){if(i&1){let t=ne();v(0,"div",16),ee(1,"welcome-card"),v(2,"div",24),H("click",function(){B(t);let r=I();return V(r.handleClickDismissWelcomeCard())}),v(3,"mat-icon"),S(4,"close"),b()()()}}function O0e(i,e){i&1&&(v(0,"div",17),ee(1,"mat-spinner",25),b())}function R0e(i,e){i&1&&(v(0,"div",18),ee(1,"model-source-input",null,1),b())}function A0e(i,e){i&1&&(v(0,"div",20),S(1,"The "),v(2,"a",26),S(3," Google Terms of Service "),b(),S(4," apply to your use of this offering "),b())}function N0e(i,e){if(i&1){let t=ne();v(0,"model-graph-visualizer",27,2),H("titleClicked",function(){B(t);let r=I();return V(r.handleClickTitle())})("modelGraphProcessed",function(r){B(t);let o=I();return V(o.handleModelGraphProcessed(r))})("uiStateChanged",function(r){B(t);let o=I();return V(o.handleUiStateChanged(r))})("remoteNodeDataPathsChanged",function(r){B(t);let o=I();return V(o.handleRemoteNodeDataPathsChanged(r))})("syncNavigationModeChanged",function(r){B(t);let o=I();return V(o.handleSyncNavigationModeChanged(r))}),b()}if(i&2){let t=I();R("graphCollections",t.benchmark?$2(5,D0e):t.loadedGraphCollections())("benchmark",t.benchmark)("config",t.curConfig)("initialUiState",t.initialUiState)("nodeDataSources",t.remoteNodeDataPaths)}}var j5=(()=>{class i{dialog;extensionService;gaService;modelLoaderService;newVersionService;route;router;serverDirectorService;settingsService;snackBar;threejsService;urlService;modelSourceInput;modelGraphVisualizer;loadingExtensions;loadedGraphCollections;runningVersion=Bt(()=>this.newVersionService.info().runningVersion);initialUiState;dismissWelcomeCard=!1;dragOver=!1;benchmark=!1;remoteNodeDataPaths=[];remoteNodeDataTargetModels=[];syncNavigation;hasUploadedModels=ct(!1);shareButtonTooltip=ct("");remoteProcessedNodeDataTargetModels=new Set;constructor(t,n,r,o,s,a,c,l,d,u,h,p){this.dialog=t,this.extensionService=n,this.gaService=r,this.modelLoaderService=o,this.newVersionService=s,this.route=a,this.router=c,this.serverDirectorService=l,this.settingsService=d,this.snackBar=u,this.threejsService=h,this.urlService=p,this.serverDirectorService.init(),this.loadingExtensions=this.extensionService.loading,this.loadedGraphCollections=this.modelLoaderService.loadedGraphCollections,this.initialUiState=this.urlService.getUiState(),lt(()=>{this.extensionService.loading()||setTimeout(()=>{this.handleExtensionLoaded()})}),lt(()=>{this.loadedGraphCollections()!=null&&window.history.pushState({ts:Date.now()},"")});let f=new URLSearchParams(document.location.search);this.benchmark=f.get("benchmark")==="1",this.remoteNodeDataPaths=this.urlService.getNodeDataSources(),this.remoteNodeDataTargetModels=this.urlService.getNodeDataTargets(),this.syncNavigation=this.urlService.getSyncNavigation()}ngAfterViewInit(){this.modelSourceInput&&(this.hasUploadedModels=this.modelSourceInput.hasUploadedModels,this.shareButtonTooltip=Bt(()=>this.hasUploadedModels()?"Share is not available for uploaded models":"Share"))}handlePopState(t){this.loadedGraphCollections.set(void 0),this.initialUiState=void 0,setTimeout(()=>{this.router.navigate([],{queryParams:{},queryParamsHandling:"",replaceUrl:!0})})}handleDragOver(t){this.loadedGraphCollections()==null&&(this.dragOver=!0),t.preventDefault()}handleDragLeave(){this.dragOver=!1}handleDrop(t){t.preventDefault(),this.dragOver=!1;let n=[];t.dataTransfer?.items?Array.from(t.dataTransfer.items).forEach((r,o)=>{if(r.kind==="file"){let s=r.getAsFile();s&&n.push(s)}}):n.push(...Array.from(t.dataTransfer?.files||[])),this.modelSourceInput.addFiles(n)}handleClickTitle(t=!1){t?this.router.navigate(["/"]).then(()=>{window.location.reload()}):window.history.back()}handleClickSettings(){this.dialog.open(V5,{})}handleClickDismissWelcomeCard(){this.settingsService.saveBooleanValue(!1,To.SHOW_WELCOME_CARD)}handleUiStateChanged(t){this.urlService.setUiState(t)}handleModelGraphProcessed(t){let n=t.modelGraph.collectionLabel,r=this.remoteProcessedNodeDataTargetModels.has(n);if(this.remoteNodeDataPaths&&this.remoteNodeDataPaths.length>0&&!r){let o=[];for(let s=0;sn.trim()).filter(n=>n!==""&&(!t||t&&n!=="pseudo_const"&&n!=="pseudo_qconst")),artificialLayerNodeCountThreshold:this.settingsService.getNumberValue(rR),edgeLabelFontSize:this.settingsService.getNumberValue(oR),edgeColor:this.settingsService.getStringValue(sR),maxConstValueCount:this.settingsService.getNumberValue(nR),disallowVerticalEdgeLabels:this.settingsService.getBooleanValue(aR),enableSubgraphSelection:this.urlService.enableSubgraphSelection,enableExportToResource:this.urlService.enableExportToResource,keepLayersWithASingleChild:this.settingsService.getBooleanValue(cR),showOpNodeOutOfLayerEdgesWithoutSelecting:this.settingsService.getBooleanValue(lR)}}handleExtensionLoaded(){let t=this.urlService.getModels();t!=null&&t.length>0?this.modelSourceInput.startProcessingModelSource(t):this.initialUiState=void 0}static \u0275fac=function(n){return new(n||i)(M(Iu),M(bf),M(U5),M("ModelLoaderService"),M(UO),M(kc),M(_h),M(G5),M(vf),M(hc),M(Sr),M(aS))};static \u0275cmp=ce({type:i,selectors:[["home-page"]],viewQuery:function(n,r){if(n&1&&(Ee(I0e,5),Ee(T0e,5)),n&2){let o;be(o=ye())&&(r.modelSourceInput=o.first),be(o=ye())&&(r.modelGraphVisualizer=o.first)}},hostBindings:function(n,r){n&1&&H("popstate",function(s){return r.handlePopState(s)},!1,Ak)},standalone:!0,features:[le],decls:38,vars:12,consts:[["menu","matMenu"],["modelSourceInput",""],["modelGraphVisualizer",""],[1,"container",3,"dragover","dragleave","dragend","drop"],[1,"title"],[1,"name",3,"click"],[1,"icons-container"],["mat-icon-button","","aria-label","settings","matTooltip","Advanced settings",3,"click"],["href","https://github.com/google-ai-edge/model-explorer","target","_blank"],["mat-icon-button","","aria-label","doc","matTooltip","GitHub"],["href","https://github.com/google-ai-edge/model-explorer/issues","target","_blank"],["mat-icon-button","","aria-label","bug","matTooltip","File issue or feature request"],["mat-icon-button","","aria-label","about","matTooltip","About",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],[1,"model-explorer-version"],[1,"content"],[1,"welcome-card-container"],[1,"loading-adapter-extension-container"],[1,"model-source-input-container"],[1,"padding"],[1,"utos"],[3,"graphCollections","benchmark","config","initialUiState","nodeDataSources","titleClicked","modelGraphProcessed","uiStateChanged","remoteNodeDataPathsChanged","syncNavigationModeChanged",4,"ngIf"],[1,"dragover-overlay"],[1,"msg"],["matTooltip","Dismiss",1,"icon-container",3,"click"],["color","primary","diameter","24"],["href","https://policies.google.com/terms?hl=en-US#toc-intro","target","_blank"],[3,"titleClicked","modelGraphProcessed","uiStateChanged","remoteNodeDataPathsChanged","syncNavigationModeChanged","graphCollections","benchmark","config","initialUiState","nodeDataSources"]],template:function(n,r){if(n&1){let o=ne();v(0,"div",3),H("dragover",function(a){return B(o),V(r.handleDragOver(a))})("dragleave",function(){return B(o),V(r.handleDragLeave())})("dragend",function(){return B(o),V(r.handleDragLeave())})("drop",function(a){return B(o),V(r.handleDrop(a))}),v(1,"div",4)(2,"div",5),H("click",function(){return B(o),V(r.handleClickTitle(!0))}),ee(3,"me-logo"),S(4," Model Explorer "),ee(5,"new-version-chip"),b(),v(6,"div",6)(7,"button",7),H("click",function(){return B(o),V(r.handleClickSettings())}),v(8,"mat-icon"),S(9,"settings"),b()(),v(10,"a",8)(11,"button",9)(12,"mat-icon"),S(13,"article"),b()()(),v(14,"a",10)(15,"button",11)(16,"mat-icon"),S(17,"bug_report"),b()()(),v(18,"button",12)(19,"mat-icon"),S(20,"info_outline"),b()(),v(21,"mat-menu",null,0)(23,"button",13),H("click",function(){return B(o),V(r.handleClickShowThirdPartyLibraries())}),S(24," Open source libraries "),b(),v(25,"div",14),S(26),b()(),ee(27,"open-in-new-tab-button"),b()(),v(28,"div",15),$(29,P0e,5,0,"div",16)(30,O0e,2,0,"div",17)(31,R0e,3,0,"div",18),ee(32,"div",19),b(),$(33,A0e,5,0,"div",20)(34,N0e,2,6,"model-graph-visualizer",21),v(35,"div",22)(36,"div",23),S(37,"Drop to add model files"),b()()()}if(n&2){let o=ve(22);re("dragover",r.dragOver),w(),re("hide",r.loadedGraphCollections()!=null||r.benchmark),w(17),R("matMenuTriggerFor",o),w(8),Se("v",r.runningVersion(),""),w(2),re("hide",r.loadedGraphCollections()!=null||r.benchmark),w(),oe(r.showWelcomeCard?29:-1),w(),oe(r.loadingExtensions()?30:31),w(3),oe(r.loadedGraphCollections()==null&&!r.benchmark?33:-1),w(),R("ngIf",r.loadedGraphCollections()!=null||r.benchmark)}},dependencies:[Ae,Tn,rf,xn,Wo,_a,tt,pt,ua,ns,Y_,xl,ao,fa,GG,Xt,Yn,iS,F5,YC,WC,z5],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;overflow:hidden;display:flex;flex-direction:column;position:relative}.container.dragover[_ngcontent-%COMP%] .dragover-overlay[_ngcontent-%COMP%]{display:flex}.container[_ngcontent-%COMP%] .dragover-overlay[_ngcontent-%COMP%]{display:none;position:absolute;left:0;top:0;width:100%;height:100%;background-color:#0000001a;pointer-events:none;flex-direction:column;align-items:center;justify-content:flex-end;z-index:500}.container[_ngcontent-%COMP%] .dragover-overlay[_ngcontent-%COMP%] .msg[_ngcontent-%COMP%]{margin-bottom:16px;color:#fff;padding:4px 12px;border-radius:99px;background-color:#4285f4}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}30%{transform:rotate(180deg)}60%{transform:rotate(360deg)}to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_goUp{0%{transform:translateY(10%);opacity:0}30%{transform:translate(0);opacity:1}to{transform:translateY(-25%);opacity:0}}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{padding:8px 12px;box-sizing:border-box;height:48px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;color:#444746;border-bottom:1px solid transparent}.container[_ngcontent-%COMP%] .title.hide[_ngcontent-%COMP%]{display:none}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:20px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] me-logo[_ngcontent-%COMP%]{margin-right:6px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] new-version-chip[_ngcontent-%COMP%]{margin-left:16px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;color:#000}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%] open-in-new-tab-button[_ngcontent-%COMP%]{margin-left:8px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{flex-grow:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;position:relative;margin-top:16px;overflow:hidden}.container[_ngcontent-%COMP%] .content.hide[_ngcontent-%COMP%]{display:none}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .welcome-card-container[_ngcontent-%COMP%]{width:1016px;flex-shrink:0;position:relative}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .welcome-card-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{position:absolute;top:6px;right:6px;cursor:pointer;opacity:.5}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .welcome-card-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:.8}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .welcome-card-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .loading-adapter-extension-container[_ngcontent-%COMP%]{margin-top:20px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .model-source-input-container[_ngcontent-%COMP%]{width:1016px;margin-top:20px;overflow:hidden;z-index:100;background-color:#fff}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .padding[_ngcontent-%COMP%]{width:100%;flex-grow:1;min-height:12px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .cover[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:5000;color:#333;background-color:#ffffffe6;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);display:flex;flex-direction:column;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .cover[_ngcontent-%COMP%] .loading-subtitle[_ngcontent-%COMP%]{font-size:14px;color:#999;margin-top:20px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .wait-icon[_ngcontent-%COMP%]{display:inline-block;margin:0 8px;animation:_ngcontent-%COMP%_rotate 2s ease-in-out 0s infinite}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .uploading[_ngcontent-%COMP%] .upload-icon[_ngcontent-%COMP%]{display:inline-block;margin:0 8px;animation:_ngcontent-%COMP%_goUp 1s ease-in-out 0s infinite}.container[_ngcontent-%COMP%] .utos[_ngcontent-%COMP%]{position:absolute;right:12px;bottom:12px;font-size:12px;color:#999}.container[_ngcontent-%COMP%] .utos[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#999}.container[_ngcontent-%COMP%] model-graph-visualizer[_ngcontent-%COMP%]{width:100%;height:100%}.container[_ngcontent-%COMP%] .bug-report[_ngcontent-%COMP%]{position:absolute;bottom:8px;left:8px;display:inline-block;display:flex;align-items:center;justify-content:center;color:#000;opacity:.5}.container[_ngcontent-%COMP%] .bug-report[_ngcontent-%COMP%]:hover{opacity:.8}.container[_ngcontent-%COMP%] .btns-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .btns-container[_ngcontent-%COMP%] .share-button-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .btns-container[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{border-left:1px solid #ccc;height:28px;box-sizing:border-box;margin-left:8px;margin-right:8px} .model-explorer-version{font-size:12px;text-align:right;padding:8px 16px 0;color:#999} - - - - - - - - - - - - - - - - - -`]})}return i})();var k0e="/apipost/v1/upload",L0e="/api/v1/load_graphs_json",F0e="/api/v1/read_text_file",W5=(()=>{class i{settingsService;extensionService;loadedGraphCollections=ct(void 0);constructor(t,n){this.settingsService=t,this.extensionService=n}loadModels(t){return It(this,null,function*(){let n=[];for(let o of t)(o.type===ri.LOCAL||o.type===ri.GRAPH_JSONS_FROM_SERVER||o.type===ri.FILE_PATH)&&n.push(this.loadModel(o));let r=yield Promise.all(n);for(let o of t)o.errorMessage!=null&&(o.errorMessage=KF(o.errorMessage));r.find(o=>o.length===0)==null&&this.loadedGraphCollections.set(r.flat())})}loadModel(t){return It(this,null,function*(){t.status.set(Bn.PROCESSING);let n=[];if(t.type===ri.FILE_PATH)switch(t.selectedAdapter?.id){case El.JSON_LOADER:try{let s=yield this.readTextFile(t.path),a=t.path.split("/").pop()||"untitled",c=JSON.parse(s),l=zO(a,c);if(l.error)throw new Error(`Failed to process file: ${l.error})`);l.graphCollections&&(n=l.graphCollections),t.status.set(Bn.DONE)}catch(s){t.selected=!1,t.status.set(Bn.ERROR),t.errorMessage=s}break;default:let r=t.path,o=r.split("/").pop()||"untitled";n=yield this.sendConvertRequest(t,r,o,!1);break}else{let r=t.file;switch(t.selectedAdapter?.id){case El.JSON_LOADER:try{t.type===ri.GRAPH_JSONS_FROM_SERVER?(n=yield this.loadGraphsFromBackendGraphsJson(t.path),t.status.set(Bn.DONE)):(n=yield Uj(r),t.status.set(Bn.DONE))}catch(a){t.selected=!1,t.status.set(Bn.ERROR),t.errorMessage=a}break;default:t.status.set(Bn.UPLOADING);let{path:o,error:s}=yield this.uploadModelFile(r);if(s)return t.selected=!1,t.status.set(Bn.ERROR),t.errorMessage=s,[];n=yield this.sendConvertRequest(t,o,r.name,!0);break}}return n})}readTextFile(t){return It(this,null,function*(){let r=yield(yield fetch(`${F0e}?path=${t}`)).json();if(r.error)throw new Error(`Failed to read file: ${r.error}`);return r.content})}loadGraphsFromBackendGraphsJson(t){return It(this,null,function*(){let n=t.replace(sS,""),r=n.lastIndexOf("/"),o=n.substring(0,r),s=Number(n.substring(r+1)),c=yield(yield fetch(`${L0e}?graph_index=${s}`)).json();return this.processAdapterConvertResponse(c,o)})}uploadModelFile(t){return It(this,null,function*(){let n=new FormData;n.append("file",t,t.name);let r=yield fetch(k0e,{method:"POST",body:n});return r.ok?{path:JSON.parse(yield r.text()).path}:(console.error(yield r.text()),{path:"",error:"Failed to upload model. Check console for details"})})}sendConvertRequest(t,n,r,o){return It(this,null,function*(){let s=[];t.status.set(Bn.PROCESSING);let a={cmdId:"convert",extensionId:t.selectedAdapter?.id||"",modelPath:n,settings:this.settingsService.getAllSettingsValues(),deleteAfterConversion:o},{cmdResp:c,otherError:l}=yield this.extensionService.sendCommandToExtension(a),d=c?.error||l;return d?(t.selected=!1,t.status.set(Bn.ERROR),t.errorMessage=d,[]):(c&&(s=this.processAdapterConvertResponse(c,r)),t.status.set(Bn.DONE),s)})}processAdapterConvertResponse(t,n){return t.graphs?[{label:n,graphs:t.graphs}]:t.graphCollections?t.graphCollections.map(r=>({label:r.label===""?n:`${n} (${r.label})`,graphs:r.graphs})):[]}static \u0275fac=function(n){return new(n||i)(X(vf),X(bf))};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var B0e=[{path:"",component:j5},{path:"demo",component:I5}],$5={providers:[K2({eventCoalescing:!0}),hF(B0e),qF(),{provide:"ModelLoaderService",useClass:W5},{provide:cS,useValue:window}]};DL(fF,$5).catch(i=>console.error(i)); diff --git a/src/server/package/src/model_explorer/web_app/main-MXYLYF2Q.js b/src/server/package/src/model_explorer/web_app/main-MXYLYF2Q.js new file mode 100644 index 00000000..c4f50d8c --- /dev/null +++ b/src/server/package/src/model_explorer/web_app/main-MXYLYF2Q.js @@ -0,0 +1,4377 @@ +var BR=Object.defineProperty,D8=Object.defineProperties;var O8=Object.getOwnPropertyDescriptors;var hv=Object.getOwnPropertySymbols;var VR=Object.prototype.hasOwnProperty,zR=Object.prototype.propertyIsEnumerable;var FR=(i,t,e)=>t in i?BR(i,t,{enumerable:!0,configurable:!0,writable:!0,value:e}):i[t]=e,X=(i,t)=>{for(var e in t||={})VR.call(t,e)&&FR(i,e,t[e]);if(hv)for(var e of hv(t))zR.call(t,e)&&FR(i,e,t[e]);return i},at=(i,t)=>D8(i,O8(t));var SS=(i,t)=>{var e={};for(var n in i)VR.call(i,n)&&t.indexOf(n)<0&&(e[n]=i[n]);if(i!=null&&hv)for(var n of hv(i))t.indexOf(n)<0&&zR.call(i,n)&&(e[n]=i[n]);return e};var P8=(i,t)=>{for(var e in t)BR(i,e,{get:t[e],enumerable:!0})};var Ct=(i,t,e)=>new Promise((n,r)=>{var o=l=>{try{a(e.next(l))}catch(c){r(c)}},s=l=>{try{a(e.throw(l))}catch(c){r(c)}},a=l=>l.done?n(l.value):Promise.resolve(l.value).then(o,s);a((e=e.apply(i,t)).next())});function DS(i,t){return Object.is(i,t)}var Vi=null,wf=!1,OS=1,kr=Symbol("SIGNAL");function dn(i){let t=Vi;return Vi=i,t}function UR(){return Vi}function R8(){return wf}var Oc={version:0,lastCleanEpoch:0,dirty:!1,producerNode:void 0,producerLastReadVersion:void 0,producerIndexOfThis:void 0,nextProducerIndex:0,liveConsumerNode:void 0,liveConsumerIndexOfThis:void 0,consumerAllowSignalWrites:!1,consumerIsAlwaysLive:!1,producerMustRecompute:()=>!1,producerRecomputeValue:()=>{},consumerMarkedDirty:()=>{},consumerOnSignalRead:()=>{}};function fv(i){if(wf)throw new Error("");if(Vi===null)return;Vi.consumerOnSignalRead(i);let t=Vi.nextProducerIndex++;if(gv(Vi),ti.nextProducerIndex;)i.producerNode.pop(),i.producerLastReadVersion.pop(),i.producerIndexOfThis.pop()}}function Mf(i){gv(i);for(let t=0;t0}function gv(i){i.producerNode??=[],i.producerIndexOfThis??=[],i.producerLastReadVersion??=[]}function $R(i){i.liveConsumerNode??=[],i.liveConsumerIndexOfThis??=[]}function qR(i){return i.producerNode!==void 0}function RS(i){let t=Object.create(N8);t.computation=i;let e=()=>{if(PS(t),fv(t),t.value===pv)throw t.error;return t.value};return e[kr]=t,e}var MS=Symbol("UNSET"),ES=Symbol("COMPUTING"),pv=Symbol("ERRORED"),N8=at(X({},Oc),{value:MS,dirty:!0,error:null,equal:DS,producerMustRecompute(i){return i.value===MS||i.value===ES},producerRecomputeValue(i){if(i.value===ES)throw new Error("Detected cycle in computations.");let t=i.value;i.value=ES;let e=Iu(i),n;try{n=i.computation()}catch(r){n=pv,i.error=r}finally{Sf(i,e)}if(t!==MS&&t!==pv&&n!==pv&&i.equal(t,n)){i.value=t;return}i.value=n,i.version++}});function k8(){throw new Error}var YR=k8;function XR(){YR()}function QR(i){YR=i}var L8=null;function ZR(i){let t=Object.create(AS);t.value=i;let e=()=>(fv(t),t.value);return e[kr]=t,e}function _v(i,t){GR()||XR(),i.equal(i.value,t)||(i.value=t,F8(i))}function KR(i,t){GR()||XR(),_v(i,t(i.value))}var AS=at(X({},Oc),{equal:DS,value:void 0});function F8(i){i.version++,A8(),HR(i),L8?.()}function JR(i,t,e){let n=Object.create(B8);e&&(n.consumerAllowSignalWrites=!0),n.fn=i,n.schedule=t;let r=l=>{n.cleanupFn=l};function o(l){return l.fn===null&&l.schedule===null}function s(l){o(l)||(Tu(l),l.cleanupFn(),l.fn=null,l.schedule=null,l.cleanupFn=TS)}let a=()=>{if(n.fn===null)return;if(R8())throw new Error("Schedulers cannot synchronously execute watches while scheduling.");if(n.dirty=!1,n.hasRun&&!Mf(n))return;n.hasRun=!0;let l=Iu(n);try{n.cleanupFn(),n.cleanupFn=TS,n.fn(r)}finally{Sf(n,l)}};return n.ref={notify:()=>jR(n),run:a,cleanup:()=>n.cleanupFn(),destroy:()=>s(n),[kr]:n},n.ref}var TS=()=>{},B8=at(X({},Oc),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!1,consumerMarkedDirty:i=>{i.schedule!==null&&i.schedule(i.ref)},hasRun:!1,cleanupFn:TS});function It(i){return typeof i=="function"}function Du(i){let e=i(n=>{Error.call(n),n.stack=new Error().stack});return e.prototype=Object.create(Error.prototype),e.prototype.constructor=e,e}var vv=Du(i=>function(e){i(this),this.message=e?`${e.length} errors occurred during unsubscription: +${e.map((n,r)=>`${r+1}) ${n.toString()}`).join(` + `)}`:"",this.name="UnsubscriptionError",this.errors=e});function Pc(i,t){if(i){let e=i.indexOf(t);0<=e&&i.splice(e,1)}}var St=class i{constructor(t){this.initialTeardown=t,this.closed=!1,this._parentage=null,this._finalizers=null}unsubscribe(){let t;if(!this.closed){this.closed=!0;let{_parentage:e}=this;if(e)if(this._parentage=null,Array.isArray(e))for(let o of e)o.remove(this);else e.remove(this);let{initialTeardown:n}=this;if(It(n))try{n()}catch(o){t=o instanceof vv?o.errors:[o]}let{_finalizers:r}=this;if(r){this._finalizers=null;for(let o of r)try{eA(o)}catch(s){t=t??[],s instanceof vv?t=[...t,...s.errors]:t.push(s)}}if(t)throw new vv(t)}}add(t){var e;if(t&&t!==this)if(this.closed)eA(t);else{if(t instanceof i){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=(e=this._finalizers)!==null&&e!==void 0?e:[]).push(t)}}_hasParent(t){let{_parentage:e}=this;return e===t||Array.isArray(e)&&e.includes(t)}_addParent(t){let{_parentage:e}=this;this._parentage=Array.isArray(e)?(e.push(t),e):e?[e,t]:t}_removeParent(t){let{_parentage:e}=this;e===t?this._parentage=null:Array.isArray(e)&&Pc(e,t)}remove(t){let{_finalizers:e}=this;e&&Pc(e,t),t instanceof i&&t._removeParent(this)}};St.EMPTY=(()=>{let i=new St;return i.closed=!0,i})();var NS=St.EMPTY;function yv(i){return i instanceof St||i&&"closed"in i&&It(i.remove)&&It(i.add)&&It(i.unsubscribe)}function eA(i){It(i)?i():i.unsubscribe()}var ls={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1};var Ou={setTimeout(i,t,...e){let{delegate:n}=Ou;return n?.setTimeout?n.setTimeout(i,t,...e):setTimeout(i,t,...e)},clearTimeout(i){let{delegate:t}=Ou;return(t?.clearTimeout||clearTimeout)(i)},delegate:void 0};function bv(i){Ou.setTimeout(()=>{let{onUnhandledError:t}=ls;if(t)t(i);else throw i})}function Rc(){}var tA=kS("C",void 0,void 0);function nA(i){return kS("E",void 0,i)}function iA(i){return kS("N",i,void 0)}function kS(i,t,e){return{kind:i,value:t,error:e}}var Ac=null;function Pu(i){if(ls.useDeprecatedSynchronousErrorHandling){let t=!Ac;if(t&&(Ac={errorThrown:!1,error:null}),i(),t){let{errorThrown:e,error:n}=Ac;if(Ac=null,e)throw n}}else i()}function rA(i){ls.useDeprecatedSynchronousErrorHandling&&Ac&&(Ac.errorThrown=!0,Ac.error=i)}var Nc=class extends St{constructor(t){super(),this.isStopped=!1,t?(this.destination=t,yv(t)&&t.add(this)):this.destination=U8}static create(t,e,n){return new va(t,e,n)}next(t){this.isStopped?FS(iA(t),this):this._next(t)}error(t){this.isStopped?FS(nA(t),this):(this.isStopped=!0,this._error(t))}complete(){this.isStopped?FS(tA,this):(this.isStopped=!0,this._complete())}unsubscribe(){this.closed||(this.isStopped=!0,super.unsubscribe(),this.destination=null)}_next(t){this.destination.next(t)}_error(t){try{this.destination.error(t)}finally{this.unsubscribe()}}_complete(){try{this.destination.complete()}finally{this.unsubscribe()}}},V8=Function.prototype.bind;function LS(i,t){return V8.call(i,t)}var BS=class{constructor(t){this.partialObserver=t}next(t){let{partialObserver:e}=this;if(e.next)try{e.next(t)}catch(n){xv(n)}}error(t){let{partialObserver:e}=this;if(e.error)try{e.error(t)}catch(n){xv(n)}else xv(t)}complete(){let{partialObserver:t}=this;if(t.complete)try{t.complete()}catch(e){xv(e)}}},va=class extends Nc{constructor(t,e,n){super();let r;if(It(t)||!t)r={next:t??void 0,error:e??void 0,complete:n??void 0};else{let o;this&&ls.useDeprecatedNextContext?(o=Object.create(t),o.unsubscribe=()=>this.unsubscribe(),r={next:t.next&&LS(t.next,o),error:t.error&&LS(t.error,o),complete:t.complete&&LS(t.complete,o)}):r=t}this.destination=new BS(r)}};function xv(i){ls.useDeprecatedSynchronousErrorHandling?rA(i):bv(i)}function z8(i){throw i}function FS(i,t){let{onStoppedNotification:e}=ls;e&&Ou.setTimeout(()=>e(i,t))}var U8={closed:!0,next:Rc,error:z8,complete:Rc};var Ru=typeof Symbol=="function"&&Symbol.observable||"@@observable";function Lr(i){return i}function VS(...i){return zS(i)}function zS(i){return i.length===0?Lr:i.length===1?i[0]:function(e){return i.reduce((n,r)=>r(n),e)}}var Dt=(()=>{class i{constructor(e){e&&(this._subscribe=e)}lift(e){let n=new i;return n.source=this,n.operator=e,n}subscribe(e,n,r){let o=G8(e)?e:new va(e,n,r);return Pu(()=>{let{operator:s,source:a}=this;o.add(s?s.call(o,a):a?this._subscribe(o):this._trySubscribe(o))}),o}_trySubscribe(e){try{return this._subscribe(e)}catch(n){e.error(n)}}forEach(e,n){return n=oA(n),new n((r,o)=>{let s=new va({next:a=>{try{e(a)}catch(l){o(l),s.unsubscribe()}},error:o,complete:r});this.subscribe(s)})}_subscribe(e){var n;return(n=this.source)===null||n===void 0?void 0:n.subscribe(e)}[Ru](){return this}pipe(...e){return zS(e)(this)}toPromise(e){return e=oA(e),new e((n,r)=>{let o;this.subscribe(s=>o=s,s=>r(s),()=>n(o))})}}return i.create=t=>new i(t),i})();function oA(i){var t;return(t=i??ls.Promise)!==null&&t!==void 0?t:Promise}function H8(i){return i&&It(i.next)&&It(i.error)&&It(i.complete)}function G8(i){return i&&i instanceof Nc||H8(i)&&yv(i)}function US(i){return It(i?.lift)}function Nt(i){return t=>{if(US(t))return t.lift(function(e){try{return i(e,this)}catch(n){this.error(n)}});throw new TypeError("Unable to lift unknown Observable type")}}function Ft(i,t,e,n,r){return new HS(i,t,e,n,r)}var HS=class extends Nc{constructor(t,e,n,r,o,s){super(t),this.onFinalize=o,this.shouldUnsubscribe=s,this._next=e?function(a){try{e(a)}catch(l){t.error(l)}}:super._next,this._error=r?function(a){try{r(a)}catch(l){t.error(l)}finally{this.unsubscribe()}}:super._error,this._complete=n?function(){try{n()}catch(a){t.error(a)}finally{this.unsubscribe()}}:super._complete}unsubscribe(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){let{closed:e}=this;super.unsubscribe(),!e&&((t=this.onFinalize)===null||t===void 0||t.call(this))}}};function Au(){return Nt((i,t)=>{let e=null;i._refCount++;let n=Ft(t,void 0,void 0,void 0,()=>{if(!i||i._refCount<=0||0<--i._refCount){e=null;return}let r=i._connection,o=e;e=null,r&&(!o||r===o)&&r.unsubscribe(),t.unsubscribe()});i.subscribe(n),n.closed||(e=i.connect())})}var ml=class extends Dt{constructor(t,e){super(),this.source=t,this.subjectFactory=e,this._subject=null,this._refCount=0,this._connection=null,US(t)&&(this.lift=t.lift)}_subscribe(t){return this.getSubject().subscribe(t)}getSubject(){let t=this._subject;return(!t||t.isStopped)&&(this._subject=this.subjectFactory()),this._subject}_teardown(){this._refCount=0;let{_connection:t}=this;this._subject=this._connection=null,t?.unsubscribe()}connect(){let t=this._connection;if(!t){t=this._connection=new St;let e=this.getSubject();t.add(this.source.subscribe(Ft(e,void 0,()=>{this._teardown(),e.complete()},n=>{this._teardown(),e.error(n)},()=>this._teardown()))),t.closed&&(this._connection=null,t=St.EMPTY)}return t}refCount(){return Au()(this)}};var Nu={schedule(i){let t=requestAnimationFrame,e=cancelAnimationFrame,{delegate:n}=Nu;n&&(t=n.requestAnimationFrame,e=n.cancelAnimationFrame);let r=t(o=>{e=void 0,i(o)});return new St(()=>e?.(r))},requestAnimationFrame(...i){let{delegate:t}=Nu;return(t?.requestAnimationFrame||requestAnimationFrame)(...i)},cancelAnimationFrame(...i){let{delegate:t}=Nu;return(t?.cancelAnimationFrame||cancelAnimationFrame)(...i)},delegate:void 0};var sA=Du(i=>function(){i(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"});var ce=(()=>{class i extends Dt{constructor(){super(),this.closed=!1,this.currentObservers=null,this.observers=[],this.isStopped=!1,this.hasError=!1,this.thrownError=null}lift(e){let n=new wv(this,this);return n.operator=e,n}_throwIfClosed(){if(this.closed)throw new sA}next(e){Pu(()=>{if(this._throwIfClosed(),!this.isStopped){this.currentObservers||(this.currentObservers=Array.from(this.observers));for(let n of this.currentObservers)n.next(e)}})}error(e){Pu(()=>{if(this._throwIfClosed(),!this.isStopped){this.hasError=this.isStopped=!0,this.thrownError=e;let{observers:n}=this;for(;n.length;)n.shift().error(e)}})}complete(){Pu(()=>{if(this._throwIfClosed(),!this.isStopped){this.isStopped=!0;let{observers:e}=this;for(;e.length;)e.shift().complete()}})}unsubscribe(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null}get observed(){var e;return((e=this.observers)===null||e===void 0?void 0:e.length)>0}_trySubscribe(e){return this._throwIfClosed(),super._trySubscribe(e)}_subscribe(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)}_innerSubscribe(e){let{hasError:n,isStopped:r,observers:o}=this;return n||r?NS:(this.currentObservers=null,o.push(e),new St(()=>{this.currentObservers=null,Pc(o,e)}))}_checkFinalizedStatuses(e){let{hasError:n,thrownError:r,isStopped:o}=this;n?e.error(r):o&&e.complete()}asObservable(){let e=new Dt;return e.source=this,e}}return i.create=(t,e)=>new wv(t,e),i})(),wv=class extends ce{constructor(t,e){super(),this.destination=t,this.source=e}next(t){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.next)===null||n===void 0||n.call(e,t)}error(t){var e,n;(n=(e=this.destination)===null||e===void 0?void 0:e.error)===null||n===void 0||n.call(e,t)}complete(){var t,e;(e=(t=this.destination)===null||t===void 0?void 0:t.complete)===null||e===void 0||e.call(t)}_subscribe(t){var e,n;return(n=(e=this.source)===null||e===void 0?void 0:e.subscribe(t))!==null&&n!==void 0?n:NS}};var yn=class extends ce{constructor(t){super(),this._value=t}get value(){return this.getValue()}_subscribe(t){let e=super._subscribe(t);return!e.closed&&t.next(this._value),e}getValue(){let{hasError:t,thrownError:e,_value:n}=this;if(t)throw e;return this._throwIfClosed(),n}next(t){super.next(this._value=t)}};var Ef={now(){return(Ef.delegate||Date).now()},delegate:void 0};var ya=class extends ce{constructor(t=1/0,e=1/0,n=Ef){super(),this._bufferSize=t,this._windowTime=e,this._timestampProvider=n,this._buffer=[],this._infiniteTimeWindow=!0,this._infiniteTimeWindow=e===1/0,this._bufferSize=Math.max(1,t),this._windowTime=Math.max(1,e)}next(t){let{isStopped:e,_buffer:n,_infiniteTimeWindow:r,_timestampProvider:o,_windowTime:s}=this;e||(n.push(t),!r&&n.push(o.now()+s)),this._trimBuffer(),super.next(t)}_subscribe(t){this._throwIfClosed(),this._trimBuffer();let e=this._innerSubscribe(t),{_infiniteTimeWindow:n,_buffer:r}=this,o=r.slice();for(let s=0;saA(t)&&i()),t},clearImmediate(i){aA(i)}};var{setImmediate:W8,clearImmediate:$8}=lA,Tf={setImmediate(...i){let{delegate:t}=Tf;return(t?.setImmediate||W8)(...i)},clearImmediate(i){let{delegate:t}=Tf;return(t?.clearImmediate||$8)(i)},delegate:void 0};var Sv=class extends gl{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,n=0){return n!==null&&n>0?super.requestAsyncId(t,e,n):(t.actions.push(this),t._scheduled||(t._scheduled=Tf.setImmediate(t.flush.bind(t,void 0))))}recycleAsyncId(t,e,n=0){var r;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(t,e,n);let{actions:o}=t;e!=null&&((r=o[o.length-1])===null||r===void 0?void 0:r.id)!==e&&(Tf.clearImmediate(e),t._scheduled===e&&(t._scheduled=void 0))}};var ku=class i{constructor(t,e=i.now){this.schedulerActionCtor=t,this.now=e}schedule(t,e=0,n){return new this.schedulerActionCtor(this,t).schedule(n,e)}};ku.now=Ef.now;var _l=class extends ku{constructor(t,e=ku.now){super(t,e),this.actions=[],this._active=!1}flush(t){let{actions:e}=this;if(this._active){e.push(t);return}let n;this._active=!0;do if(n=t.execute(t.state,t.delay))break;while(t=e.shift());if(this._active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}};var Mv=class extends _l{flush(t){this._active=!0;let e=this._scheduled;this._scheduled=void 0;let{actions:n}=this,r;t=t||n.shift();do if(r=t.execute(t.state,t.delay))break;while((t=n[0])&&t.id===e&&n.shift());if(this._active=!1,r){for(;(t=n[0])&&t.id===e&&n.shift();)t.unsubscribe();throw r}}};var Df=new Mv(Sv);var ba=new _l(gl),cA=ba;var Ev=class extends gl{constructor(t,e){super(t,e),this.scheduler=t,this.work=e}requestAsyncId(t,e,n=0){return n!==null&&n>0?super.requestAsyncId(t,e,n):(t.actions.push(this),t._scheduled||(t._scheduled=Nu.requestAnimationFrame(()=>t.flush(void 0))))}recycleAsyncId(t,e,n=0){var r;if(n!=null?n>0:this.delay>0)return super.recycleAsyncId(t,e,n);let{actions:o}=t;e!=null&&((r=o[o.length-1])===null||r===void 0?void 0:r.id)!==e&&(Nu.cancelAnimationFrame(e),t._scheduled=void 0)}};var Iv=class extends _l{flush(t){this._active=!0;let e=this._scheduled;this._scheduled=void 0;let{actions:n}=this,r;t=t||n.shift();do if(r=t.execute(t.state,t.delay))break;while((t=n[0])&&t.id===e&&n.shift());if(this._active=!1,r){for(;(t=n[0])&&t.id===e&&n.shift();)t.unsubscribe();throw r}}};var Tv=new Iv(Ev);var Ji=new Dt(i=>i.complete());function Dv(i){return i&&It(i.schedule)}function WS(i){return i[i.length-1]}function Ov(i){return It(WS(i))?i.pop():void 0}function Rs(i){return Dv(WS(i))?i.pop():void 0}function dA(i,t){return typeof WS(i)=="number"?i.pop():t}function hA(i,t,e,n){function r(o){return o instanceof e?o:new e(function(s){s(o)})}return new(e||(e=Promise))(function(o,s){function a(d){try{c(n.next(d))}catch(u){s(u)}}function l(d){try{c(n.throw(d))}catch(u){s(u)}}function c(d){d.done?o(d.value):r(d.value).then(a,l)}c((n=n.apply(i,t||[])).next())})}function uA(i){var t=typeof Symbol=="function"&&Symbol.iterator,e=t&&i[t],n=0;if(e)return e.call(i);if(i&&typeof i.length=="number")return{next:function(){return i&&n>=i.length&&(i=void 0),{value:i&&i[n++],done:!i}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function kc(i){return this instanceof kc?(this.v=i,this):new kc(i)}function pA(i,t,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var n=e.apply(i,t||[]),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(p){return function(f){return Promise.resolve(f).then(p,u)}}function a(p,f){n[p]&&(r[p]=function(m){return new Promise(function(b,g){o.push([p,m,b,g])>1||l(p,m)})},f&&(r[p]=f(r[p])))}function l(p,f){try{c(n[p](f))}catch(m){h(o[0][3],m)}}function c(p){p.value instanceof kc?Promise.resolve(p.value.v).then(d,u):h(o[0][2],p)}function d(p){l("next",p)}function u(p){l("throw",p)}function h(p,f){p(f),o.shift(),o.length&&l(o[0][0],o[0][1])}}function fA(i){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t=i[Symbol.asyncIterator],e;return t?t.call(i):(i=typeof uA=="function"?uA(i):i[Symbol.iterator](),e={},n("next"),n("throw"),n("return"),e[Symbol.asyncIterator]=function(){return this},e);function n(o){e[o]=i[o]&&function(s){return new Promise(function(a,l){s=i[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 Lu=i=>i&&typeof i.length=="number"&&typeof i!="function";function Pv(i){return It(i?.then)}function Rv(i){return It(i[Ru])}function Av(i){return Symbol.asyncIterator&&It(i?.[Symbol.asyncIterator])}function Nv(i){return new TypeError(`You provided ${i!==null&&typeof i=="object"?"an invalid object":`'${i}'`} where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.`)}function q8(){return typeof Symbol!="function"||!Symbol.iterator?"@@iterator":Symbol.iterator}var kv=q8();function Lv(i){return It(i?.[kv])}function Fv(i){return pA(this,arguments,function*(){let e=i.getReader();try{for(;;){let{value:n,done:r}=yield kc(e.read());if(r)return yield kc(void 0);yield yield kc(n)}}finally{e.releaseLock()}})}function Bv(i){return It(i?.getReader)}function Sn(i){if(i instanceof Dt)return i;if(i!=null){if(Rv(i))return Y8(i);if(Lu(i))return X8(i);if(Pv(i))return Q8(i);if(Av(i))return mA(i);if(Lv(i))return Z8(i);if(Bv(i))return K8(i)}throw Nv(i)}function Y8(i){return new Dt(t=>{let e=i[Ru]();if(It(e.subscribe))return e.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")})}function X8(i){return new Dt(t=>{for(let e=0;e{i.then(e=>{t.closed||(t.next(e),t.complete())},e=>t.error(e)).then(null,bv)})}function Z8(i){return new Dt(t=>{for(let e of i)if(t.next(e),t.closed)return;t.complete()})}function mA(i){return new Dt(t=>{J8(i,t).catch(e=>t.error(e))})}function K8(i){return mA(Fv(i))}function J8(i,t){var e,n,r,o;return hA(this,void 0,void 0,function*(){try{for(e=fA(i);n=yield e.next(),!n.done;){let s=n.value;if(t.next(s),t.closed)return}}catch(s){r={error:s}}finally{try{n&&!n.done&&(o=e.return)&&(yield o.call(e))}finally{if(r)throw r.error}}t.complete()})}function no(i,t,e,n=0,r=!1){let o=t.schedule(function(){e(),r?i.add(this.schedule(null,n)):this.unsubscribe()},n);if(i.add(o),!r)return o}function Vv(i,t=0){return Nt((e,n)=>{e.subscribe(Ft(n,r=>no(n,i,()=>n.next(r),t),()=>no(n,i,()=>n.complete(),t),r=>no(n,i,()=>n.error(r),t)))})}function zv(i,t=0){return Nt((e,n)=>{n.add(i.schedule(()=>e.subscribe(n),t))})}function gA(i,t){return Sn(i).pipe(zv(t),Vv(t))}function _A(i,t){return Sn(i).pipe(zv(t),Vv(t))}function vA(i,t){return new Dt(e=>{let n=0;return t.schedule(function(){n===i.length?e.complete():(e.next(i[n++]),e.closed||this.schedule())})})}function yA(i,t){return new Dt(e=>{let n;return no(e,t,()=>{n=i[kv](),no(e,t,()=>{let r,o;try{({value:r,done:o}=n.next())}catch(s){e.error(s);return}o?e.complete():e.next(r)},0,!0)}),()=>It(n?.return)&&n.return()})}function Uv(i,t){if(!i)throw new Error("Iterable cannot be null");return new Dt(e=>{no(e,t,()=>{let n=i[Symbol.asyncIterator]();no(e,t,()=>{n.next().then(r=>{r.done?e.complete():e.next(r.value)})},0,!0)})})}function bA(i,t){return Uv(Fv(i),t)}function xA(i,t){if(i!=null){if(Rv(i))return gA(i,t);if(Lu(i))return vA(i,t);if(Pv(i))return _A(i,t);if(Av(i))return Uv(i,t);if(Lv(i))return yA(i,t);if(Bv(i))return bA(i,t)}throw Nv(i)}function ti(i,t){return t?xA(i,t):Sn(i)}function ke(...i){let t=Rs(i);return ti(i,t)}function vl(i,t){let e=It(i)?i:()=>i,n=r=>r.error(e());return new Dt(t?r=>t.schedule(n,0,r):n)}function cs(i){return!!i&&(i instanceof Dt||It(i.lift)&&It(i.subscribe))}var xa=Du(i=>function(){i(this),this.name="EmptyError",this.message="no elements in sequence"});function wA(i){return i instanceof Date&&!isNaN(i)}function We(i,t){return Nt((e,n)=>{let r=0;e.subscribe(Ft(n,o=>{n.next(i.call(t,o,r++))}))})}var{isArray:eW}=Array;function tW(i,t){return eW(t)?i(...t):i(t)}function Fu(i){return We(t=>tW(i,t))}var{isArray:nW}=Array,{getPrototypeOf:iW,prototype:rW,keys:oW}=Object;function Hv(i){if(i.length===1){let t=i[0];if(nW(t))return{args:t,keys:null};if(sW(t)){let e=oW(t);return{args:e.map(n=>t[n]),keys:e}}}return{args:i,keys:null}}function sW(i){return i&&typeof i=="object"&&iW(i)===rW}function Gv(i,t){return i.reduce((e,n,r)=>(e[n]=t[r],e),{})}function ji(...i){let t=Rs(i),e=Ov(i),{args:n,keys:r}=Hv(i);if(n.length===0)return ti([],t);let o=new Dt(aW(n,t,r?s=>Gv(r,s):Lr));return e?o.pipe(Fu(e)):o}function aW(i,t,e=Lr){return n=>{CA(t,()=>{let{length:r}=i,o=new Array(r),s=r,a=r;for(let l=0;l{let c=ti(i[l],t),d=!1;c.subscribe(Ft(n,u=>{o[l]=u,d||(d=!0,a--),a||n.next(e(o.slice()))},()=>{--s||n.complete()}))},n)},n)}}function CA(i,t,e){i?no(e,i,t):t()}function SA(i,t,e,n,r,o,s,a){let l=[],c=0,d=0,u=!1,h=()=>{u&&!l.length&&!c&&t.complete()},p=m=>c{o&&t.next(m),c++;let b=!1;Sn(e(m,d++)).subscribe(Ft(t,g=>{r?.(g),o?p(g):t.next(g)},()=>{b=!0},void 0,()=>{if(b)try{for(c--;l.length&&cf(g)):f(g)}h()}catch(g){t.error(g)}}))};return i.subscribe(Ft(t,p,()=>{u=!0,h()})),()=>{a?.()}}function ri(i,t,e=1/0){return It(t)?ri((n,r)=>We((o,s)=>t(n,o,r,s))(Sn(i(n,r))),e):(typeof t=="number"&&(e=t),Nt((n,r)=>SA(n,r,i,e)))}function Of(i=1/0){return ri(Lr,i)}function MA(){return Of(1)}function ho(...i){return MA()(ti(i,Rs(i)))}function ko(i){return new Dt(t=>{Sn(i()).subscribe(t)})}function Pf(...i){let t=Ov(i),{args:e,keys:n}=Hv(i),r=new Dt(o=>{let{length:s}=e;if(!s){o.complete();return}let a=new Array(s),l=s,c=s;for(let d=0;d{u||(u=!0,c--),a[d]=h},()=>l--,void 0,()=>{(!l||!u)&&(c||o.next(n?Gv(n,a):a),o.complete())}))}});return t?r.pipe(Fu(t)):r}var lW=["addListener","removeListener"],cW=["addEventListener","removeEventListener"],dW=["on","off"];function wn(i,t,e,n){if(It(e)&&(n=e,e=void 0),n)return wn(i,t,e).pipe(Fu(n));let[r,o]=pW(i)?cW.map(s=>a=>i[s](t,a,e)):uW(i)?lW.map(EA(i,t)):hW(i)?dW.map(EA(i,t)):[];if(!r&&Lu(i))return ri(s=>wn(s,t,e))(Sn(i));if(!r)throw new TypeError("Invalid event target");return new Dt(s=>{let a=(...l)=>s.next(1o(a)})}function EA(i,t){return e=>n=>i[e](t,n)}function uW(i){return It(i.addListener)&&It(i.removeListener)}function hW(i){return It(i.on)&&It(i.off)}function pW(i){return It(i.addEventListener)&&It(i.removeEventListener)}function Bu(i=0,t,e=cA){let n=-1;return t!=null&&(Dv(t)?e=t:n=t),new Dt(r=>{let o=wA(i)?+i-e.now():i;o<0&&(o=0);let s=0;return e.schedule(function(){r.closed||(r.next(s++),0<=n?this.schedule(void 0,n):r.complete())},o)})}function $S(i=0,t=ba){return i<0&&(i=0),Bu(i,i,t)}function Xn(...i){let t=Rs(i),e=dA(i,1/0),n=i;return n.length?n.length===1?Sn(n[0]):Of(e)(ti(n,t)):Ji}function qt(i,t){return Nt((e,n)=>{let r=0;e.subscribe(Ft(n,o=>i.call(t,o,r++)&&n.next(o)))})}function Rf(i){return Nt((t,e)=>{let n=!1,r=null,o=null,s=!1,a=()=>{if(o?.unsubscribe(),o=null,n){n=!1;let c=r;r=null,e.next(c)}s&&e.complete()},l=()=>{o=null,s&&e.complete()};t.subscribe(Ft(e,c=>{n=!0,r=c,o||Sn(i(c)).subscribe(o=Ft(e,a,l))},()=>{s=!0,(!n||!o||o.closed)&&e.complete()}))})}function jv(i,t=ba){return Rf(()=>Bu(i,t))}function As(i){return Nt((t,e)=>{let n=null,r=!1,o;n=t.subscribe(Ft(e,void 0,void 0,s=>{o=Sn(i(s,As(i)(t))),n?(n.unsubscribe(),n=null,o.subscribe(e)):r=!0})),r&&(n.unsubscribe(),n=null,o.subscribe(e))})}function Wv(i,t,e,n,r){return(o,s)=>{let a=e,l=t,c=0;o.subscribe(Ft(s,d=>{let u=c++;l=a?i(l,d,u):(a=!0,d),n&&s.next(l)},r&&(()=>{a&&s.next(l),s.complete()})))}}function $v(i,t){return Nt(Wv(i,t,arguments.length>=2,!1,!0))}function ds(i,t){return It(t)?ri(i,t,1):ri(i,1)}function Lo(i,t=ba){return Nt((e,n)=>{let r=null,o=null,s=null,a=()=>{if(r){r.unsubscribe(),r=null;let c=o;o=null,n.next(c)}};function l(){let c=s+i,d=t.now();if(d{o=c,s=t.now(),r||(r=t.schedule(l,i),n.add(r))},()=>{a(),n.complete()},void 0,()=>{o=r=null}))})}function yl(i){return Nt((t,e)=>{let n=!1;t.subscribe(Ft(e,r=>{n=!0,e.next(r)},()=>{n||e.next(i),e.complete()}))})}function tn(i){return i<=0?()=>Ji:Nt((t,e)=>{let n=0;t.subscribe(Ft(e,r=>{++n<=i&&(e.next(r),i<=n&&e.complete())}))})}function IA(){return Nt((i,t)=>{i.subscribe(Ft(t,Rc))})}function Af(i){return We(()=>i)}function qS(i,t){return t?e=>ho(t.pipe(tn(1),IA()),e.pipe(qS(i))):ri((e,n)=>Sn(i(e,n)).pipe(tn(1),Af(e)))}function Vu(i,t=ba){let e=Bu(i,t);return qS(()=>e)}function bl(i,t=Lr){return i=i??fW,Nt((e,n)=>{let r,o=!0;e.subscribe(Ft(n,s=>{let a=t(s);(o||!i(r,a))&&(o=!1,r=a,n.next(s))}))})}function fW(i,t){return i===t}function qv(i=mW){return Nt((t,e)=>{let n=!1;t.subscribe(Ft(e,r=>{n=!0,e.next(r)},()=>n?e.complete():e.error(i())))})}function mW(){return new xa}function xl(i){return Nt((t,e)=>{try{t.subscribe(e)}finally{e.add(i)}})}function Ns(i,t){let e=arguments.length>=2;return n=>n.pipe(i?qt((r,o)=>i(r,o,n)):Lr,tn(1),e?yl(t):qv(()=>new xa))}function zu(i){return i<=0?()=>Ji:Nt((t,e)=>{let n=[];t.subscribe(Ft(e,r=>{n.push(r),i{for(let r of n)e.next(r);e.complete()},void 0,()=>{n=null}))})}function YS(i,t){let e=arguments.length>=2;return n=>n.pipe(i?qt((r,o)=>i(r,o,n)):Lr,zu(1),e?yl(t):qv(()=>new xa))}function XS(i,t){return Nt(Wv(i,t,arguments.length>=2,!0))}function Nf(i={}){let{connector:t=()=>new ce,resetOnError:e=!0,resetOnComplete:n=!0,resetOnRefCountZero:r=!0}=i;return o=>{let s,a,l,c=0,d=!1,u=!1,h=()=>{a?.unsubscribe(),a=void 0},p=()=>{h(),s=l=void 0,d=u=!1},f=()=>{let m=s;p(),m?.unsubscribe()};return Nt((m,b)=>{c++,!u&&!d&&h();let g=l=l??t();b.add(()=>{c--,c===0&&!u&&!d&&(a=QS(f,r))}),g.subscribe(b),!s&&c>0&&(s=new va({next:_=>g.next(_),error:_=>{u=!0,h(),a=QS(p,e,_),g.error(_)},complete:()=>{d=!0,h(),a=QS(p,n),g.complete()}}),Sn(m).subscribe(s))})(o)}}function QS(i,t,...e){if(t===!0){i();return}if(t===!1)return;let n=new va({next:()=>{n.unsubscribe(),i()}});return Sn(t(...e)).subscribe(n)}function Yv(i,t,e){let n,r=!1;return i&&typeof i=="object"?{bufferSize:n=1/0,windowTime:t=1/0,refCount:r=!1,scheduler:e}=i:n=i??1/0,Nf({connector:()=>new ya(n,t,e),resetOnError:!0,resetOnComplete:!1,resetOnRefCountZero:r})}function kf(i){return qt((t,e)=>i<=e)}function ni(...i){let t=Rs(i);return Nt((e,n)=>{(t?ho(i,e,t):ho(i,e)).subscribe(n)})}function Tn(i,t){return Nt((e,n)=>{let r=null,o=0,s=!1,a=()=>s&&!r&&n.complete();e.subscribe(Ft(n,l=>{r?.unsubscribe();let c=0,d=o++;Sn(i(l,d)).subscribe(r=Ft(n,u=>n.next(t?t(l,u,d,c++):u),()=>{r=null,a()}))},()=>{s=!0,a()}))})}function Ke(i){return Nt((t,e)=>{Sn(i).subscribe(Ft(e,()=>e.complete(),Rc)),!e.closed&&t.subscribe(e)})}function ZS(i,t=!1){return Nt((e,n)=>{let r=0;e.subscribe(Ft(n,o=>{let s=i(o,r++);(s||t)&&n.next(o),!s&&n.complete()}))})}function gn(i,t,e){let n=It(i)||t||e?{next:i,error:t,complete:e}:i;return n?Nt((r,o)=>{var s;(s=n.subscribe)===null||s===void 0||s.call(n);let a=!0;r.subscribe(Ft(o,l=>{var c;(c=n.next)===null||c===void 0||c.call(n,l),o.next(l)},()=>{var l;a=!1,(l=n.complete)===null||l===void 0||l.call(n),o.complete()},l=>{var c;a=!1,(c=n.error)===null||c===void 0||c.call(n,l),o.error(l)},()=>{var l,c;a&&((l=n.unsubscribe)===null||l===void 0||l.call(n)),(c=n.finalize)===null||c===void 0||c.call(n)}))}):Lr}var gN="https://g.co/ng/security#xss",De=class extends Error{constructor(t,e){super(CE(t,e)),this.code=t}};function CE(i,t){return`${`NG0${Math.abs(i)}`}${t?": "+t:""}`}var _N=Symbol("InputSignalNode#UNSET"),gW=at(X({},AS),{transformFn:void 0,applyValueToInputSignal(i,t){_v(i,t)}});function vN(i,t){let e=Object.create(gW);e.value=i,e.transformFn=t?.transform;function n(){if(fv(e),e.value===_N)throw new De(-950,!1);return e.value}return n[kr]=e,n}function qf(i){return{toString:i}.toString()}var Xv="__parameters__";function _W(i){return function(...e){if(i){let n=i(...e);for(let r in n)this[r]=n[r]}}}function yN(i,t,e){return qf(()=>{let n=_W(t);function r(...o){if(this instanceof r)return n.apply(this,o),this;let s=new r(...o);return a.annotation=s,a;function a(l,c,d){let u=l.hasOwnProperty(Xv)?l[Xv]:Object.defineProperty(l,Xv,{value:[]})[Xv];for(;u.length<=d;)u.push(null);return(u[d]=u[d]||[]).push(s),l}}return e&&(r.prototype=Object.create(e.prototype)),r.prototype.ngMetadataName=i,r.annotationCls=r,r})}var dM=globalThis;function jn(i){for(let t in i)if(i[t]===jn)return t;throw Error("Could not find renamed property on target object.")}function vW(i,t){for(let e in t)t.hasOwnProperty(e)&&!i.hasOwnProperty(e)&&(i[e]=t[e])}function Br(i){if(typeof i=="string")return i;if(Array.isArray(i))return"["+i.map(Br).join(", ")+"]";if(i==null)return""+i;if(i.overriddenName)return`${i.overriddenName}`;if(i.name)return`${i.name}`;let t=i.toString();if(t==null)return""+t;let e=t.indexOf(` +`);return e===-1?t:t.substring(0,e)}function uM(i,t){return i==null||i===""?t===null?"":t:t==null||t===""?i:i+" "+t}var yW=jn({__forward_ref__:jn});function xr(i){return i.__forward_ref__=xr,i.toString=function(){return Br(this())},i}function er(i){return bN(i)?i():i}function bN(i){return typeof i=="function"&&i.hasOwnProperty(yW)&&i.__forward_ref__===xr}function J(i){return{token:i.token,providedIn:i.providedIn||null,factory:i.factory,value:void 0}}function rt(i){return{providers:i.providers||[],imports:i.imports||[]}}function ky(i){return TA(i,wN)||TA(i,CN)}function xN(i){return ky(i)!==null}function TA(i,t){return i.hasOwnProperty(t)?i[t]:null}function bW(i){let t=i&&(i[wN]||i[CN]);return t||null}function DA(i){return i&&(i.hasOwnProperty(OA)||i.hasOwnProperty(xW))?i[OA]:null}var wN=jn({\u0275prov:jn}),OA=jn({\u0275inj:jn}),CN=jn({ngInjectableDef:jn}),xW=jn({ngInjectorDef:jn}),pe=class{constructor(t,e){this._desc=t,this.ngMetadataName="InjectionToken",this.\u0275prov=void 0,typeof e=="number"?this.__NG_ELEMENT_ID__=e:e!==void 0&&(this.\u0275prov=J({token:this,providedIn:e.providedIn||"root",factory:e.factory}))}get multi(){return this}toString(){return`InjectionToken ${this._desc}`}};function SN(i){return i&&!!i.\u0275providers}var wW=jn({\u0275cmp:jn}),CW=jn({\u0275dir:jn}),SW=jn({\u0275pipe:jn}),MW=jn({\u0275mod:jn}),ly=jn({\u0275fac:jn}),Bf=jn({__NG_ELEMENT_ID__:jn}),PA=jn({__NG_ENV_ID__:jn});function ks(i){return typeof i=="string"?i:i==null?"":String(i)}function EW(i){return typeof i=="function"?i.name||i.toString():typeof i=="object"&&i!=null&&typeof i.type=="function"?i.type.name||i.type.toString():ks(i)}function IW(i,t){let e=t?`. Dependency path: ${t.join(" > ")} > ${i}`:"";throw new De(-200,i)}function SE(i,t){throw new De(-201,!1)}var rn=function(i){return i[i.Default=0]="Default",i[i.Host=1]="Host",i[i.Self=2]="Self",i[i.SkipSelf=4]="SkipSelf",i[i.Optional=8]="Optional",i}(rn||{}),hM;function MN(){return hM}function Fo(i){let t=hM;return hM=i,t}function EN(i,t,e){let n=ky(i);if(n&&n.providedIn=="root")return n.value===void 0?n.value=n.factory():n.value;if(e&rn.Optional)return null;if(t!==void 0)return t;SE(i,"Injector")}var TW={},Vf=TW,pM="__NG_DI_FLAG__",cy="ngTempTokenPath",DW="ngTokenPath",OW=/\n/gm,PW="\u0275",RA="__source",Wu;function RW(){return Wu}function wl(i){let t=Wu;return Wu=i,t}function AW(i,t=rn.Default){if(Wu===void 0)throw new De(-203,!1);return Wu===null?EN(i,void 0,t):Wu.get(i,t&rn.Optional?null:void 0,t)}function Le(i,t=rn.Default){return(MN()||AW)(er(i),t)}function S(i,t=rn.Default){return Le(i,Ly(t))}function Ly(i){return typeof i>"u"||typeof i=="number"?i:0|(i.optional&&8)|(i.host&&1)|(i.self&&2)|(i.skipSelf&&4)}function fM(i){let t=[];for(let e=0;e ");else if(typeof t=="object"){let o=[];for(let s in t)if(t.hasOwnProperty(s)){let a=t[s];o.push(s+":"+(typeof a=="string"?JSON.stringify(a):Br(a)))}r=`{${o.join(", ")}}`}return`${e}${n?"("+n+")":""}[${r}]: ${i.replace(OW,` + `)}`}var Yf=IN(yN("Optional"),8);var ME=IN(yN("SkipSelf"),4);function qu(i,t){let e=i.hasOwnProperty(ly);return e?i[ly]:null}function FW(i,t,e){if(i.length!==t.length)return!1;for(let n=0;nArray.isArray(e)?EE(e,t):t(e))}function TN(i,t,e){t>=i.length?i.push(e):i.splice(t,0,e)}function dy(i,t){return t>=i.length-1?i.pop():i.splice(t,1)[0]}function VW(i,t){let e=[];for(let n=0;nt;){let o=r-2;i[r]=i[o],r--}i[t]=e,i[t+1]=n}}function Fy(i,t,e){let n=Xf(i,t);return n>=0?i[n|1]=e:(n=~n,zW(i,n,t,e)),n}function KS(i,t){let e=Xf(i,t);if(e>=0)return i[e|1]}function Xf(i,t){return UW(i,t,1)}function UW(i,t,e){let n=0,r=i.length>>e;for(;r!==n;){let o=n+(r-n>>1),s=i[o<t?r=o:n=o+1}return~(r<t){s=o-1;break}}}for(;o-1){let o;for(;++ro?u="":u=r[d+1].toLowerCase(),n&2&&c!==u){if(us(n))return!1;s=!0}}}}return us(n)||s}function us(i){return(i&1)===0}function qW(i,t,e,n){if(t===null)return-1;let r=0;if(n||!e){let o=!1;for(;r-1)for(e++;e0?'="'+a+'"':"")+"]"}else n&8?r+="."+s:n&4&&(r+=" "+s);else r!==""&&!us(s)&&(t+=NA(o,r),r=""),n=s,o=o||!us(n);e++}return r!==""&&(t+=NA(o,r)),t}function JW(i){return i.map(KW).join(",")}function e6(i){let t=[],e=[],n=1,r=2;for(;n{let t=BN(i),e=at(X({},t),{decls:i.decls,vars:i.vars,template:i.template,consts:i.consts||null,ngContentSelectors:i.ngContentSelectors,onPush:i.changeDetection===PN.OnPush,directiveDefs:null,pipeDefs:null,dependencies:t.standalone&&i.dependencies||null,getStandaloneInjector:null,getExternalStyles:null,signals:i.signals??!1,data:i.data||{},encapsulation:i.encapsulation||Bs.Emulated,styles:i.styles||Fr,_:null,schemas:i.schemas||null,tView:null,id:""});VN(e);let n=i.dependencies;return e.directiveDefs=LA(n,!1),e.pipeDefs=LA(n,!0),e.id=i6(e),e})}function t6(i){return El(i)||TE(i)}function n6(i){return i!==null}function ot(i){return qf(()=>({type:i.type,bootstrap:i.bootstrap||Fr,declarations:i.declarations||Fr,imports:i.imports||Fr,exports:i.exports||Fr,transitiveCompileScopes:null,schemas:i.schemas||null,id:i.id||null}))}function kA(i,t){if(i==null)return wa;let e={};for(let n in i)if(i.hasOwnProperty(n)){let r=i[n],o,s,a=Ml.None;Array.isArray(r)?(a=r[0],o=r[1],s=r[2]??o):(o=r,s=r),t?(e[o]=a!==Ml.None?[n,a]:n,t[o]=s):e[o]=n}return e}function Ve(i){return qf(()=>{let t=BN(i);return VN(t),t})}function El(i){return i[wW]||null}function TE(i){return i[CW]||null}function kN(i){return i[SW]||null}function LN(i){let t=El(i)||TE(i)||kN(i);return t!==null?t.standalone:!1}function FN(i,t){let e=i[MW]||null;if(!e&&t===!0)throw new Error(`Type ${Br(i)} does not have '\u0275mod' property.`);return e}function BN(i){let t={};return{type:i.type,providersResolver:null,factory:null,hostBindings:i.hostBindings||null,hostVars:i.hostVars||0,hostAttrs:i.hostAttrs||null,contentQueries:i.contentQueries||null,declaredInputs:t,inputTransforms:null,inputConfig:i.inputs||wa,exportAs:i.exportAs||null,standalone:i.standalone===!0,signals:i.signals===!0,selectors:i.selectors||Fr,viewQuery:i.viewQuery||null,features:i.features||null,setInput:null,findHostDirectiveDefs:null,hostDirectives:null,inputs:kA(i.inputs,t),outputs:kA(i.outputs),debugInfo:null}}function VN(i){i.features?.forEach(t=>t(i))}function LA(i,t){if(!i)return null;let e=t?kN:t6;return()=>(typeof i=="function"?i():i).map(n=>e(n)).filter(n6)}function i6(i){let t=0,e=[i.selectors,i.ngContentSelectors,i.hostVars,i.hostAttrs,i.consts,i.vars,i.decls,i.encapsulation,i.standalone,i.signals,i.exportAs,JSON.stringify(i.inputs),JSON.stringify(i.outputs),Object.getOwnPropertyNames(i.type.prototype),!!i.contentQueries,!!i.viewQuery].join("|");for(let r of e)t=Math.imul(31,t)+r.charCodeAt(0)<<0;return t+=2147483648,"c"+t}function By(i){return{\u0275providers:i}}function r6(...i){return{\u0275providers:zN(!0,i),\u0275fromNgModule:!0}}function zN(i,...t){let e=[],n=new Set,r,o=s=>{e.push(s)};return EE(t,s=>{let a=s;gM(a,o,[],n)&&(r||=[],r.push(a))}),r!==void 0&&UN(r,o),e}function UN(i,t){for(let e=0;e{t(o,n)})}}function gM(i,t,e,n){if(i=er(i),!i)return!1;let r=null,o=DA(i),s=!o&&El(i);if(!o&&!s){let l=i.ngModule;if(o=DA(l),o)r=l;else return!1}else{if(s&&!s.standalone)return!1;r=i}let a=n.has(r);if(s){if(a)return!1;if(n.add(r),s.dependencies){let l=typeof s.dependencies=="function"?s.dependencies():s.dependencies;for(let c of l)gM(c,t,e,n)}}else if(o){if(o.imports!=null&&!a){n.add(r);let c;try{EE(o.imports,d=>{gM(d,t,e,n)&&(c||=[],c.push(d))})}finally{}c!==void 0&&UN(c,t)}if(!a){let c=qu(r)||(()=>new r);t({provide:r,useFactory:c,deps:Fr},r),t({provide:ON,useValue:r,multi:!0},r),t({provide:Yu,useValue:()=>Le(r),multi:!0},r)}let l=o.providers;if(l!=null&&!a){let c=i;DE(l,d=>{t(d,c)})}}else return!1;return r!==i&&i.providers!==void 0}function DE(i,t){for(let e of i)SN(e)&&(e=e.\u0275providers),Array.isArray(e)?DE(e,t):t(e)}var o6=jn({provide:String,useValue:jn});function HN(i){return i!==null&&typeof i=="object"&&o6 in i}function s6(i){return!!(i&&i.useExisting)}function a6(i){return!!(i&&i.useFactory)}function Xu(i){return typeof i=="function"}function l6(i){return!!i.useClass}var Vy=new pe(""),ty={},c6={},JS;function zy(){return JS===void 0&&(JS=new uy),JS}var tr=class{},Uf=class extends tr{get destroyed(){return this._destroyed}constructor(t,e,n,r){super(),this.parent=e,this.source=n,this.scopes=r,this.records=new Map,this._ngOnDestroyHooks=new Set,this._onDestroyHooks=[],this._destroyed=!1,vM(t,s=>this.processProvider(s)),this.records.set(DN,Uu(void 0,this)),r.has("environment")&&this.records.set(tr,Uu(void 0,this));let o=this.records.get(Vy);o!=null&&typeof o.value=="string"&&this.scopes.add(o.value),this.injectorDefTypes=new Set(this.get(ON,Fr,rn.Self))}destroy(){Lf(this),this._destroyed=!0;let t=dn(null);try{for(let n of this._ngOnDestroyHooks)n.ngOnDestroy();let e=this._onDestroyHooks;this._onDestroyHooks=[];for(let n of e)n()}finally{this.records.clear(),this._ngOnDestroyHooks.clear(),this.injectorDefTypes.clear(),dn(t)}}onDestroy(t){return Lf(this),this._onDestroyHooks.push(t),()=>this.removeOnDestroy(t)}runInContext(t){Lf(this);let e=wl(this),n=Fo(void 0),r;try{return t()}finally{wl(e),Fo(n)}}get(t,e=Vf,n=rn.Default){if(Lf(this),t.hasOwnProperty(PA))return t[PA](this);n=Ly(n);let r,o=wl(this),s=Fo(void 0);try{if(!(n&rn.SkipSelf)){let l=this.records.get(t);if(l===void 0){let c=f6(t)&&ky(t);c&&this.injectableDefInScope(c)?l=Uu(_M(t),ty):l=null,this.records.set(t,l)}if(l!=null)return this.hydrate(t,l)}let a=n&rn.Self?zy():this.parent;return e=n&rn.Optional&&e===Vf?null:e,a.get(t,e)}catch(a){if(a.name==="NullInjectorError"){if((a[cy]=a[cy]||[]).unshift(Br(t)),o)throw a;return kW(a,t,"R3InjectorError",this.source)}else throw a}finally{Fo(s),wl(o)}}resolveInjectorInitializers(){let t=dn(null),e=wl(this),n=Fo(void 0),r;try{let o=this.get(Yu,Fr,rn.Self);for(let s of o)s()}finally{wl(e),Fo(n),dn(t)}}toString(){let t=[],e=this.records;for(let n of e.keys())t.push(Br(n));return`R3Injector[${t.join(", ")}]`}processProvider(t){t=er(t);let e=Xu(t)?t:er(t&&t.provide),n=u6(t);if(!Xu(t)&&t.multi===!0){let r=this.records.get(e);r||(r=Uu(void 0,ty,!0),r.factory=()=>fM(r.multi),this.records.set(e,r)),e=t,r.multi.push(t)}this.records.set(e,n)}hydrate(t,e){let n=dn(null);try{return e.value===ty&&(e.value=c6,e.value=e.factory()),typeof e.value=="object"&&e.value&&p6(e.value)&&this._ngOnDestroyHooks.add(e.value),e.value}finally{dn(n)}}injectableDefInScope(t){if(!t.providedIn)return!1;let e=er(t.providedIn);return typeof e=="string"?e==="any"||this.scopes.has(e):this.injectorDefTypes.has(e)}removeOnDestroy(t){let e=this._onDestroyHooks.indexOf(t);e!==-1&&this._onDestroyHooks.splice(e,1)}};function _M(i){let t=ky(i),e=t!==null?t.factory:qu(i);if(e!==null)return e;if(i instanceof pe)throw new De(204,!1);if(i instanceof Function)return d6(i);throw new De(204,!1)}function d6(i){if(i.length>0)throw new De(204,!1);let e=bW(i);return e!==null?()=>e.factory(i):()=>new i}function u6(i){if(HN(i))return Uu(void 0,i.useValue);{let t=GN(i);return Uu(t,ty)}}function GN(i,t,e){let n;if(Xu(i)){let r=er(i);return qu(r)||_M(r)}else if(HN(i))n=()=>er(i.useValue);else if(a6(i))n=()=>i.useFactory(...fM(i.deps||[]));else if(s6(i))n=()=>Le(er(i.useExisting));else{let r=er(i&&(i.useClass||i.provide));if(h6(i))n=()=>new r(...fM(i.deps));else return qu(r)||_M(r)}return n}function Lf(i){if(i.destroyed)throw new De(205,!1)}function Uu(i,t,e=!1){return{factory:i,value:t,multi:e?[]:void 0}}function h6(i){return!!i.deps}function p6(i){return i!==null&&typeof i=="object"&&typeof i.ngOnDestroy=="function"}function f6(i){return typeof i=="function"||typeof i=="object"&&i instanceof pe}function vM(i,t){for(let e of i)Array.isArray(e)?vM(e,t):e&&SN(e)?vM(e.\u0275providers,t):t(e)}function ms(i,t){i instanceof Uf&&Lf(i);let e,n=wl(i),r=Fo(void 0);try{return t()}finally{wl(n),Fo(r)}}function jN(){return MN()!==void 0||RW()!=null}function qc(i){if(!jN())throw new De(-203,!1)}function m6(i){return typeof i=="function"}var zs=0,jt=1,Tt=2,br=3,ps=4,ro=5,Qu=6,hy=7,vr=8,Zu=9,Ca=10,di=11,Hf=12,FA=13,rh=14,fo=15,Fc=16,Hu=17,Sa=18,Uy=19,WN=20,Cl=21,ny=22,Bc=23,po=24,Vr=25,OE=1;var Vc=7,py=8,Ku=9,yr=10,fy=function(i){return i[i.None=0]="None",i[i.HasTransplantedViews=2]="HasTransplantedViews",i}(fy||{});function Sl(i){return Array.isArray(i)&&typeof i[OE]=="object"}function Ta(i){return Array.isArray(i)&&i[OE]===!0}function PE(i){return(i.flags&4)!==0}function Hy(i){return i.componentOffset>-1}function Gy(i){return(i.flags&1)===1}function Ma(i){return!!i.template}function yM(i){return(i[Tt]&512)!==0}var bM=class{constructor(t,e,n){this.previousValue=t,this.currentValue=e,this.firstChange=n}isFirstChange(){return this.firstChange}};function $N(i,t,e,n){t!==null?t.applyValueToInputSignal(t,n):i[e]=n}function un(){return qN}function qN(i){return i.type.prototype.ngOnChanges&&(i.setInput=_6),g6}un.ngInherit=!0;function g6(){let i=XN(this),t=i?.current;if(t){let e=i.previous;if(e===wa)i.previous=t;else for(let n in t)e[n]=t[n];i.current=null,this.ngOnChanges(t)}}function _6(i,t,e,n,r){let o=this.declaredInputs[n],s=XN(i)||v6(i,{previous:wa,current:null}),a=s.current||(s.current={}),l=s.previous,c=l[o];a[o]=new bM(c&&c.currentValue,e,l===wa),$N(i,t,r,e)}var YN="__ngSimpleChanges__";function XN(i){return i[YN]||null}function v6(i,t){return i[YN]=t}var BA=null;var Ls=function(i,t,e){BA?.(i,t,e)},QN="svg",y6="math";function Vs(i){for(;Array.isArray(i);)i=i[zs];return i}function b6(i){for(;Array.isArray(i);){if(typeof i[OE]=="object")return i;i=i[zs]}return null}function ZN(i,t){return Vs(t[i])}function Vo(i,t){return Vs(t[i.index])}function RE(i,t){return i.data[t]}function x6(i,t){return i[t]}function Ol(i,t){let e=t[i];return Sl(e)?e:e[zs]}function w6(i){return(i[Tt]&4)===4}function AE(i){return(i[Tt]&128)===128}function C6(i){return Ta(i[br])}function Il(i,t){return t==null?null:i[t]}function KN(i){i[Hu]=0}function NE(i){i[Tt]&1024||(i[Tt]|=1024,AE(i)&&Qf(i))}function S6(i,t){for(;i>0;)t=t[rh],i--;return t}function jy(i){return!!(i[Tt]&9216||i[po]?.dirty)}function xM(i){i[Ca].changeDetectionScheduler?.notify(9),i[Tt]&64&&(i[Tt]|=1024),jy(i)&&Qf(i)}function Qf(i){i[Ca].changeDetectionScheduler?.notify(0);let t=zc(i);for(;t!==null&&!(t[Tt]&8192||(t[Tt]|=8192,!AE(t)));)t=zc(t)}function JN(i,t){if((i[Tt]&256)===256)throw new De(911,!1);i[Cl]===null&&(i[Cl]=[]),i[Cl].push(t)}function M6(i,t){if(i[Cl]===null)return;let e=i[Cl].indexOf(t);e!==-1&&i[Cl].splice(e,1)}function zc(i){let t=i[br];return Ta(t)?t[br]:t}var Yt={lFrame:lk(null),bindingsEnabled:!0,skipHydrationRootTNode:null};var wM=!1;function E6(){return Yt.lFrame.elementDepthCount}function I6(){Yt.lFrame.elementDepthCount++}function T6(){Yt.lFrame.elementDepthCount--}function ek(){return Yt.bindingsEnabled}function tk(){return Yt.skipHydrationRootTNode!==null}function D6(i){return Yt.skipHydrationRootTNode===i}function O6(){Yt.skipHydrationRootTNode=null}function zt(){return Yt.lFrame.lView}function ui(){return Yt.lFrame.tView}function B(i){return Yt.lFrame.contextLView=i,i[vr]}function V(i){return Yt.lFrame.contextLView=null,i}function $i(){let i=nk();for(;i!==null&&i.type===64;)i=i.parent;return i}function nk(){return Yt.lFrame.currentTNode}function P6(){let i=Yt.lFrame,t=i.currentTNode;return i.isParent?t:t.parent}function Yc(i,t){let e=Yt.lFrame;e.currentTNode=i,e.isParent=t}function kE(){return Yt.lFrame.isParent}function LE(){Yt.lFrame.isParent=!1}function R6(){return Yt.lFrame.contextLView}function ik(){return wM}function my(i){let t=wM;return wM=i,t}function rk(){let i=Yt.lFrame,t=i.bindingRootIndex;return t===-1&&(t=i.bindingRootIndex=i.tView.bindingStartIndex),t}function ok(){return Yt.lFrame.bindingIndex}function A6(i){return Yt.lFrame.bindingIndex=i}function Xc(){return Yt.lFrame.bindingIndex++}function Wy(i){let t=Yt.lFrame,e=t.bindingIndex;return t.bindingIndex=t.bindingIndex+i,e}function N6(){return Yt.lFrame.inI18n}function k6(i,t){let e=Yt.lFrame;e.bindingIndex=e.bindingRootIndex=i,CM(t)}function L6(){return Yt.lFrame.currentDirectiveIndex}function CM(i){Yt.lFrame.currentDirectiveIndex=i}function FE(i){let t=Yt.lFrame.currentDirectiveIndex;return t===-1?null:i[t]}function BE(){return Yt.lFrame.currentQueryIndex}function $y(i){Yt.lFrame.currentQueryIndex=i}function F6(i){let t=i[jt];return t.type===2?t.declTNode:t.type===1?i[ro]:null}function sk(i,t,e){if(e&rn.SkipSelf){let r=t,o=i;for(;r=r.parent,r===null&&!(e&rn.Host);)if(r=F6(o),r===null||(o=o[rh],r.type&10))break;if(r===null)return!1;t=r,i=o}let n=Yt.lFrame=ak();return n.currentTNode=t,n.lView=i,!0}function VE(i){let t=ak(),e=i[jt];Yt.lFrame=t,t.currentTNode=e.firstChild,t.lView=i,t.tView=e,t.contextLView=i,t.bindingIndex=e.bindingStartIndex,t.inI18n=!1}function ak(){let i=Yt.lFrame,t=i===null?null:i.child;return t===null?lk(i):t}function lk(i){let t={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:i,child:null,inI18n:!1};return i!==null&&(i.child=t),t}function ck(){let i=Yt.lFrame;return Yt.lFrame=i.parent,i.currentTNode=null,i.lView=null,i}var dk=ck;function zE(){let i=ck();i.isParent=!0,i.tView=null,i.selectedIndex=-1,i.contextLView=null,i.elementDepthCount=0,i.currentDirectiveIndex=-1,i.currentNamespace=null,i.bindingRootIndex=-1,i.bindingIndex=-1,i.currentQueryIndex=0}function B6(i){return(Yt.lFrame.contextLView=S6(i,Yt.lFrame.contextLView))[vr]}function Us(){return Yt.lFrame.selectedIndex}function Uc(i){Yt.lFrame.selectedIndex=i}function qy(){let i=Yt.lFrame;return RE(i.tView,i.selectedIndex)}function mo(){Yt.lFrame.currentNamespace=QN}function Yy(){V6()}function V6(){Yt.lFrame.currentNamespace=null}function z6(){return Yt.lFrame.currentNamespace}var uk=!0;function Xy(){return uk}function Qy(i){uk=i}function U6(i,t,e){let{ngOnChanges:n,ngOnInit:r,ngDoCheck:o}=t.type.prototype;if(n){let s=qN(t);(e.preOrderHooks??=[]).push(i,s),(e.preOrderCheckHooks??=[]).push(i,s)}r&&(e.preOrderHooks??=[]).push(0-i,r),o&&((e.preOrderHooks??=[]).push(i,o),(e.preOrderCheckHooks??=[]).push(i,o))}function Zy(i,t){for(let e=t.directiveStart,n=t.directiveEnd;e=n)break}else t[l]<0&&(i[Hu]+=65536),(a>14>16&&(i[Tt]&3)===t&&(i[Tt]+=16384,VA(a,o)):VA(a,o)}var $u=-1,Hc=class{constructor(t,e,n){this.factory=t,this.resolving=!1,this.canSeeViewProviders=e,this.injectImpl=n}};function G6(i){return i instanceof Hc}function j6(i){return(i.flags&8)!==0}function W6(i){return(i.flags&16)!==0}var tM={},SM=class{constructor(t,e){this.injector=t,this.parentInjector=e}get(t,e,n){n=Ly(n);let r=this.injector.get(t,tM,n);return r!==tM||e===tM?r:this.parentInjector.get(t,e,n)}};function pk(i){return i!==$u}function gy(i){return i&32767}function $6(i){return i>>16}function _y(i,t){let e=$6(i),n=t;for(;e>0;)n=n[rh],e--;return n}var MM=!0;function zA(i){let t=MM;return MM=i,t}var q6=256,fk=q6-1,mk=5,Y6=0,Fs={};function X6(i,t,e){let n;typeof e=="string"?n=e.charCodeAt(0)||0:e.hasOwnProperty(Bf)&&(n=e[Bf]),n==null&&(n=e[Bf]=Y6++);let r=n&fk,o=1<>mk)]|=o}function vy(i,t){let e=gk(i,t);if(e!==-1)return e;let n=t[jt];n.firstCreatePass&&(i.injectorIndex=t.length,nM(n.data,i),nM(t,null),nM(n.blueprint,null));let r=UE(i,t),o=i.injectorIndex;if(pk(r)){let s=gy(r),a=_y(r,t),l=a[jt].data;for(let c=0;c<8;c++)t[o+c]=a[s+c]|l[s+c]}return t[o+8]=r,o}function nM(i,t){i.push(0,0,0,0,0,0,0,0,t)}function gk(i,t){return i.injectorIndex===-1||i.parent&&i.parent.injectorIndex===i.injectorIndex||t[i.injectorIndex+8]===null?-1:i.injectorIndex}function UE(i,t){if(i.parent&&i.parent.injectorIndex!==-1)return i.parent.injectorIndex;let e=0,n=null,r=t;for(;r!==null;){if(n=xk(r),n===null)return $u;if(e++,r=r[rh],n.injectorIndex!==-1)return n.injectorIndex|e<<16}return $u}function EM(i,t,e){X6(i,t,e)}function Q6(i,t){if(t==="class")return i.classes;if(t==="style")return i.styles;let e=i.attrs;if(e){let n=e.length,r=0;for(;r>20,u=n?a:a+d,h=r?a+d:c;for(let p=u;p=l&&f.type===e)return p}if(r){let p=s[l];if(p&&Ma(p)&&p.type===e)return l}return null}function Gc(i,t,e,n){let r=i[e],o=t.data;if(G6(r)){let s=r;s.resolving&&IW(EW(o[e]));let a=zA(s.canSeeViewProviders);s.resolving=!0;let l,c=s.injectImpl?Fo(s.injectImpl):null,d=sk(i,n,rn.Default);try{r=i[e]=s.factory(void 0,o,i,n),t.firstCreatePass&&e>=n.directiveStart&&U6(e,o[e],t)}finally{c!==null&&Fo(c),zA(a),s.resolving=!1,dk()}}return r}function K6(i){if(typeof i=="string")return i.charCodeAt(0)||0;let t=i.hasOwnProperty(Bf)?i[Bf]:void 0;return typeof t=="number"?t>=0?t&fk:J6:t}function UA(i,t,e){let n=1<>mk)]&n)}function HA(i,t){return!(i&rn.Self)&&!(i&rn.Host&&t)}var Lc=class{constructor(t,e){this._tNode=t,this._lView=e}get(t,e,n){return yk(this._tNode,this._lView,t,Ly(n),e)}};function J6(){return new Lc($i(),zt())}function Zn(i){return qf(()=>{let t=i.prototype.constructor,e=t[ly]||IM(t),n=Object.prototype,r=Object.getPrototypeOf(i.prototype).constructor;for(;r&&r!==n;){let o=r[ly]||IM(r);if(o&&o!==e)return o;r=Object.getPrototypeOf(r)}return o=>new o})}function IM(i){return bN(i)?()=>{let t=IM(er(i));return t&&t()}:qu(i)}function e$(i,t,e,n,r){let o=i,s=t;for(;o!==null&&s!==null&&s[Tt]&2048&&!(s[Tt]&512);){let a=bk(o,s,e,n|rn.Self,Fs);if(a!==Fs)return a;let l=o.parent;if(!l){let c=s[WN];if(c){let d=c.get(e,Fs,n);if(d!==Fs)return d}l=xk(s),s=s[rh]}o=l}return r}function xk(i){let t=i[jt],e=t.type;return e===2?t.declTNode:e===1?i[ro]:null}function HE(i){return Q6($i(),i)}function GA(i,t=null,e=null,n){let r=wk(i,t,e,n);return r.resolveInjectorInitializers(),r}function wk(i,t=null,e=null,n,r=new Set){let o=[e||Fr,r6(i)];return n=n||(typeof i=="object"?void 0:Br(i)),new Uf(o,t||zy(),n||null,r)}var pt=class i{static{this.THROW_IF_NOT_FOUND=Vf}static{this.NULL=new uy}static create(t,e){if(Array.isArray(t))return GA({name:""},e,t,"");{let n=t.name??"";return GA({name:n},t.parent,t.providers,n)}}static{this.\u0275prov=J({token:i,providedIn:"any",factory:()=>Le(DN)})}static{this.__NG_ELEMENT_ID__=-1}};var zr=class{constructor(t){this.attributeName=t,this.__NG_ELEMENT_ID__=()=>HE(this.attributeName)}toString(){return`HostAttributeToken ${this.attributeName}`}},t$=new pe("");t$.__NG_ELEMENT_ID__=i=>{let t=$i();if(t===null)throw new De(204,!1);if(t.type&2)return t.value;if(i&rn.Optional)return null;throw new De(204,!1)};var Ck=!1,hi=(()=>{class i{static{this.__NG_ELEMENT_ID__=n$}static{this.__NG_ENV_ID__=e=>e}}return i})(),yy=class extends hi{constructor(t){super(),this._lView=t}onDestroy(t){return JN(this._lView,t),()=>M6(this._lView,t)}};function n$(){return new yy(zt())}var jc=class{},Ky=new pe("",{providedIn:"root",factory:()=>!1});var Sk=new pe(""),Mk=new pe(""),Qc=(()=>{class i{constructor(){this.taskId=0,this.pendingTasks=new Set,this.hasPendingTasks=new yn(!1)}get _hasPendingTasks(){return this.hasPendingTasks.value}add(){this._hasPendingTasks||this.hasPendingTasks.next(!0);let e=this.taskId++;return this.pendingTasks.add(e),e}has(e){return this.pendingTasks.has(e)}remove(e){this.pendingTasks.delete(e),this.pendingTasks.size===0&&this._hasPendingTasks&&this.hasPendingTasks.next(!1)}ngOnDestroy(){this.pendingTasks.clear(),this._hasPendingTasks&&this.hasPendingTasks.next(!1)}static{this.\u0275prov=J({token:i,providedIn:"root",factory:()=>new i})}}return i})();var TM=class extends ce{constructor(t=!1){super(),this.destroyRef=void 0,this.pendingTasks=void 0,this.__isAsync=t,jN()&&(this.destroyRef=S(hi,{optional:!0})??void 0,this.pendingTasks=S(Qc,{optional:!0})??void 0)}emit(t){let e=dn(null);try{super.next(t)}finally{dn(e)}}subscribe(t,e,n){let r=t,o=e||(()=>null),s=n;if(t&&typeof t=="object"){let l=t;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 t instanceof St&&t.add(a),a}wrapInTimeout(t){return e=>{let n=this.pendingTasks?.add();setTimeout(()=>{t(e),n!==void 0&&this.pendingTasks?.remove(n)})}}},Ie=TM;function Gf(...i){}function Ek(i){let t,e;function n(){i=Gf;try{e!==void 0&&typeof cancelAnimationFrame=="function"&&cancelAnimationFrame(e),t!==void 0&&clearTimeout(t)}catch{}}return t=setTimeout(()=>{i(),n()}),typeof requestAnimationFrame=="function"&&(e=requestAnimationFrame(()=>{i(),n()})),()=>n()}function jA(i){return queueMicrotask(()=>i()),()=>{i=Gf}}var GE="isAngularZone",by=GE+"_ID",i$=0,Ue=class i{constructor(t){this.hasPendingMacrotasks=!1,this.hasPendingMicrotasks=!1,this.isStable=!0,this.onUnstable=new Ie(!1),this.onMicrotaskEmpty=new Ie(!1),this.onStable=new Ie(!1),this.onError=new Ie(!1);let{enableLongStackTrace:e=!1,shouldCoalesceEventChangeDetection:n=!1,shouldCoalesceRunChangeDetection:r=!1,scheduleInRootZone:o=Ck}=t;if(typeof Zone>"u")throw new De(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)),e&&Zone.longStackTraceZoneSpec&&(s._inner=s._inner.fork(Zone.longStackTraceZoneSpec)),s.shouldCoalesceEventChangeDetection=!r&&n,s.shouldCoalesceRunChangeDetection=r,s.callbackScheduled=!1,s.scheduleInRootZone=o,s$(s)}static isInAngularZone(){return typeof Zone<"u"&&Zone.current.get(GE)===!0}static assertInAngularZone(){if(!i.isInAngularZone())throw new De(909,!1)}static assertNotInAngularZone(){if(i.isInAngularZone())throw new De(909,!1)}run(t,e,n){return this._inner.run(t,e,n)}runTask(t,e,n,r){let o=this._inner,s=o.scheduleEventTask("NgZoneEvent: "+r,t,r$,Gf,Gf);try{return o.runTask(s,e,n)}finally{o.cancelTask(s)}}runGuarded(t,e,n){return this._inner.runGuarded(t,e,n)}runOutsideAngular(t){return this._outer.run(t)}},r$={};function jE(i){if(i._nesting==0&&!i.hasPendingMicrotasks&&!i.isStable)try{i._nesting++,i.onMicrotaskEmpty.emit(null)}finally{if(i._nesting--,!i.hasPendingMicrotasks)try{i.runOutsideAngular(()=>i.onStable.emit(null))}finally{i.isStable=!0}}}function o$(i){if(i.isCheckStableRunning||i.callbackScheduled)return;i.callbackScheduled=!0;function t(){Ek(()=>{i.callbackScheduled=!1,DM(i),i.isCheckStableRunning=!0,jE(i),i.isCheckStableRunning=!1})}i.scheduleInRootZone?Zone.root.run(()=>{t()}):i._outer.run(()=>{t()}),DM(i)}function s$(i){let t=()=>{o$(i)},e=i$++;i._inner=i._inner.fork({name:"angular",properties:{[GE]:!0,[by]:e,[by+e]:!0},onInvokeTask:(n,r,o,s,a,l)=>{if(a$(l))return n.invokeTask(o,s,a,l);try{return WA(i),n.invokeTask(o,s,a,l)}finally{(i.shouldCoalesceEventChangeDetection&&s.type==="eventTask"||i.shouldCoalesceRunChangeDetection)&&t(),$A(i)}},onInvoke:(n,r,o,s,a,l,c)=>{try{return WA(i),n.invoke(o,s,a,l,c)}finally{i.shouldCoalesceRunChangeDetection&&!i.callbackScheduled&&!l$(l)&&t(),$A(i)}},onHasTask:(n,r,o,s)=>{n.hasTask(o,s),r===o&&(s.change=="microTask"?(i._hasPendingMicrotasks=s.microTask,DM(i),jE(i)):s.change=="macroTask"&&(i.hasPendingMacrotasks=s.macroTask))},onHandleError:(n,r,o,s)=>(n.handleError(o,s),i.runOutsideAngular(()=>i.onError.emit(s)),!1)})}function DM(i){i._hasPendingMicrotasks||(i.shouldCoalesceEventChangeDetection||i.shouldCoalesceRunChangeDetection)&&i.callbackScheduled===!0?i.hasPendingMicrotasks=!0:i.hasPendingMicrotasks=!1}function WA(i){i._nesting++,i.isStable&&(i.isStable=!1,i.onUnstable.emit(null))}function $A(i){i._nesting--,jE(i)}var OM=class{constructor(){this.hasPendingMicrotasks=!1,this.hasPendingMacrotasks=!1,this.isStable=!0,this.onUnstable=new Ie,this.onMicrotaskEmpty=new Ie,this.onStable=new Ie,this.onError=new Ie}run(t,e,n){return t.apply(e,n)}runGuarded(t,e,n){return t.apply(e,n)}runOutsideAngular(t){return t()}runTask(t,e,n,r){return t.apply(e,n)}};function a$(i){return Ik(i,"__ignore_ng_zone__")}function l$(i){return Ik(i,"__scheduler_tick__")}function Ik(i,t){return!Array.isArray(i)||i.length!==1?!1:i[0]?.data?.[t]===!0}var io=class{constructor(){this._console=console}handleError(t){this._console.error("ERROR",t)}},c$=new pe("",{providedIn:"root",factory:()=>{let i=S(Ue),t=S(io);return e=>i.runOutsideAngular(()=>t.handleError(e))}});function qA(i,t){return vN(i,t)}function d$(i){return vN(_N,i)}var Tk=(qA.required=d$,qA);function u$(){return oh($i(),zt())}function oh(i,t){return new Fe(Vo(i,t))}var Fe=(()=>{class i{constructor(e){this.nativeElement=e}static{this.__NG_ELEMENT_ID__=u$}}return i})();function Dk(i){return i instanceof Fe?i.nativeElement:i}function h$(){return this._results[Symbol.iterator]()}var Wi=class i{get changes(){return this._changes??=new ce}constructor(t=!1){this._emitDistinctChangesOnly=t,this.dirty=!0,this._onDirty=void 0,this._results=[],this._changesDetected=!1,this._changes=void 0,this.length=0,this.first=void 0,this.last=void 0;let e=i.prototype;e[Symbol.iterator]||(e[Symbol.iterator]=h$)}get(t){return this._results[t]}map(t){return this._results.map(t)}filter(t){return this._results.filter(t)}find(t){return this._results.find(t)}reduce(t,e){return this._results.reduce(t,e)}forEach(t){this._results.forEach(t)}some(t){return this._results.some(t)}toArray(){return this._results.slice()}toString(){return this._results.toString()}reset(t,e){this.dirty=!1;let n=BW(t);(this._changesDetected=!FW(this._results,n,e))&&(this._results=n,this.length=n.length,this.last=n[this.length-1],this.first=n[0])}notifyOnChanges(){this._changes!==void 0&&(this._changesDetected||!this._emitDistinctChangesOnly)&&this._changes.next(this)}onDirty(t){this._onDirty=t}setDirty(){this.dirty=!0,this._onDirty?.()}destroy(){this._changes!==void 0&&(this._changes.complete(),this._changes.unsubscribe())}};function Ok(i){return(i.flags&128)===128}var Pk=new Map,p$=0;function f$(){return p$++}function m$(i){Pk.set(i[Uy],i)}function PM(i){Pk.delete(i[Uy])}var YA="__ngContext__";function Tl(i,t){Sl(t)?(i[YA]=t[Uy],m$(t)):i[YA]=t}function Rk(i){return Nk(i[Hf])}function Ak(i){return Nk(i[ps])}function Nk(i){for(;i!==null&&!Ta(i);)i=i[ps];return i}var RM;function kk(i){RM=i}function g$(){if(RM!==void 0)return RM;if(typeof document<"u")return document;throw new De(210,!1)}var Zf=new pe("",{providedIn:"root",factory:()=>_$}),_$="ng",WE=new pe(""),Da=new pe("",{providedIn:"platform",factory:()=>"unknown"});var Kn=new pe(""),Kf=new pe("",{providedIn:"root",factory:()=>g$().body?.querySelector("[ngCspNonce]")?.getAttribute("ngCspNonce")||null});var v$="h",y$="b";var Lk=!1,b$=new pe("",{providedIn:"root",factory:()=>Lk});var x$=()=>null;function $E(i,t,e=!1){return x$(i,t,e)}var Qv;function w$(){if(Qv===void 0&&(Qv=null,dM.trustedTypes))try{Qv=dM.trustedTypes.createPolicy("angular",{createHTML:i=>i,createScript:i=>i,createScriptURL:i=>i})}catch{}return Qv}function Jy(i){return w$()?.createHTML(i)||i}var Ea=class{constructor(t){this.changingThisBreaksApplicationSecurity=t}toString(){return`SafeValue must use [property]=binding: ${this.changingThisBreaksApplicationSecurity} (see ${gN})`}},AM=class extends Ea{getTypeName(){return"HTML"}},NM=class extends Ea{getTypeName(){return"Style"}},kM=class extends Ea{getTypeName(){return"Script"}},LM=class extends Ea{getTypeName(){return"URL"}},FM=class extends Ea{getTypeName(){return"ResourceURL"}};function Hs(i){return i instanceof Ea?i.changingThisBreaksApplicationSecurity:i}function Zc(i,t){let e=C$(i);if(e!=null&&e!==t){if(e==="ResourceURL"&&t==="URL")return!0;throw new Error(`Required a safe ${t}, got a ${e} (see ${gN})`)}return e===t}function C$(i){return i instanceof Ea&&i.getTypeName()||null}function Fk(i){return new AM(i)}function Bk(i){return new NM(i)}function Vk(i){return new kM(i)}function zk(i){return new LM(i)}function Uk(i){return new FM(i)}function S$(i){let t=new VM(i);return M$()?new BM(t):t}var BM=class{constructor(t){this.inertDocumentHelper=t}getInertBodyElement(t){t=""+t;try{let e=new window.DOMParser().parseFromString(Jy(t),"text/html").body;return e===null?this.inertDocumentHelper.getInertBodyElement(t):(e.firstChild?.remove(),e)}catch{return null}}},VM=class{constructor(t){this.defaultDoc=t,this.inertDocument=this.defaultDoc.implementation.createHTMLDocument("sanitization-inert")}getInertBodyElement(t){let e=this.inertDocument.createElement("template");return e.innerHTML=Jy(t),e}};function M$(){try{return!!new window.DOMParser().parseFromString(Jy(""),"text/html")}catch{return!1}}var E$=/^(?!javascript:)(?:[a-z0-9+.-]+:|[^&:\/?#]*(?:[\/?#]|$))/i;function e0(i){return i=String(i),i.match(E$)?i:"unsafe:"+i}function Oa(i){let t={};for(let e of i.split(","))t[e]=!0;return t}function Jf(...i){let t={};for(let e of i)for(let n in e)e.hasOwnProperty(n)&&(t[n]=!0);return t}var Hk=Oa("area,br,col,hr,img,wbr"),Gk=Oa("colgroup,dd,dt,li,p,tbody,td,tfoot,th,thead,tr"),jk=Oa("rp,rt"),I$=Jf(jk,Gk),T$=Jf(Gk,Oa("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")),D$=Jf(jk,Oa("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")),XA=Jf(Hk,T$,D$,I$),Wk=Oa("background,cite,href,itemtype,longdesc,poster,src,xlink:href"),O$=Oa("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"),P$=Oa("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"),R$=Jf(Wk,O$,P$),A$=Oa("script,style,template"),zM=class{constructor(){this.sanitizedSomething=!1,this.buf=[]}sanitizeChildren(t){let e=t.firstChild,n=!0,r=[];for(;e;){if(e.nodeType===Node.ELEMENT_NODE?n=this.startElement(e):e.nodeType===Node.TEXT_NODE?this.chars(e.nodeValue):this.sanitizedSomething=!0,n&&e.firstChild){r.push(e),e=L$(e);continue}for(;e;){e.nodeType===Node.ELEMENT_NODE&&this.endElement(e);let o=k$(e);if(o){e=o;break}e=r.pop()}}return this.buf.join("")}startElement(t){let e=QA(t).toLowerCase();if(!XA.hasOwnProperty(e))return this.sanitizedSomething=!0,!A$.hasOwnProperty(e);this.buf.push("<"),this.buf.push(e);let n=t.attributes;for(let r=0;r"),!0}endElement(t){let e=QA(t).toLowerCase();XA.hasOwnProperty(e)&&!Hk.hasOwnProperty(e)&&(this.buf.push(""))}chars(t){this.buf.push(ZA(t))}};function N$(i,t){return(i.compareDocumentPosition(t)&Node.DOCUMENT_POSITION_CONTAINED_BY)!==Node.DOCUMENT_POSITION_CONTAINED_BY}function k$(i){let t=i.nextSibling;if(t&&i!==t.previousSibling)throw $k(t);return t}function L$(i){let t=i.firstChild;if(t&&N$(i,t))throw $k(t);return t}function QA(i){let t=i.nodeName;return typeof t=="string"?t:"FORM"}function $k(i){return new Error(`Failed to sanitize html because the element is clobbered: ${i.outerHTML}`)}var F$=/[\uD800-\uDBFF][\uDC00-\uDFFF]/g,B$=/([^\#-~ |!])/g;function ZA(i){return i.replace(/&/g,"&").replace(F$,function(t){let e=t.charCodeAt(0),n=t.charCodeAt(1);return"&#"+((e-55296)*1024+(n-56320)+65536)+";"}).replace(B$,function(t){return"&#"+t.charCodeAt(0)+";"}).replace(//g,">")}var Zv;function qk(i,t){let e=null;try{Zv=Zv||S$(i);let n=t?String(t):"";e=Zv.getInertBodyElement(n);let r=5,o=n;do{if(r===0)throw new Error("Failed to sanitize html because the input is unstable");r--,n=o,o=e.innerHTML,e=Zv.getInertBodyElement(n)}while(n!==o);let a=new zM().sanitizeChildren(KA(e)||e);return Jy(a)}finally{if(e){let n=KA(e)||e;for(;n.firstChild;)n.firstChild.remove()}}}function KA(i){return"content"in i&&V$(i)?i.content:null}function V$(i){return i.nodeType===Node.ELEMENT_NODE&&i.nodeName==="TEMPLATE"}var Ur=function(i){return i[i.NONE=0]="NONE",i[i.HTML=1]="HTML",i[i.STYLE=2]="STYLE",i[i.SCRIPT=3]="SCRIPT",i[i.URL=4]="URL",i[i.RESOURCE_URL=5]="RESOURCE_URL",i}(Ur||{});function qE(i){let t=z$();return t?t.sanitize(Ur.URL,i)||"":Zc(i,"URL")?Hs(i):e0(ks(i))}function z$(){let i=zt();return i&&i[Ca].sanitizer}var U$=/^>|^->||--!>|)/g,G$="\u200B$1\u200B";function j$(i){return i.replace(U$,t=>t.replace(H$,G$))}function Yk(i){return i.ownerDocument.defaultView}function t0(i){return i.ownerDocument}function Xk(i){return i instanceof Function?i():i}function Qk(i){return(i??S(pt)).get(Da)==="browser"}var Ia=function(i){return i[i.Important=1]="Important",i[i.DashCase=2]="DashCase",i}(Ia||{}),W$;function YE(i,t){return W$(i,t)}function Gu(i,t,e,n,r){if(n!=null){let o,s=!1;Ta(n)?o=n:Sl(n)&&(s=!0,n=n[zs]);let a=Vs(n);i===0&&e!==null?r==null?t2(t,e,a):xy(t,e,a,r||null,!0):i===1&&e!==null?xy(t,e,a,r||null,!0):i===2?o9(t,a,s):i===3&&t.destroyNode(a),o!=null&&a9(t,i,o,e,r)}}function $$(i,t){return i.createText(t)}function q$(i,t,e){i.setValue(t,e)}function Y$(i,t){return i.createComment(j$(t))}function Zk(i,t,e){return i.createElement(t,e)}function X$(i,t){Kk(i,t),t[zs]=null,t[ro]=null}function Q$(i,t,e,n,r,o){n[zs]=r,n[ro]=t,r0(i,n,e,1,r,o)}function Kk(i,t){t[Ca].changeDetectionScheduler?.notify(10),r0(i,t,t[di],2,null,null)}function Z$(i){let t=i[Hf];if(!t)return iM(i[jt],i);for(;t;){let e=null;if(Sl(t))e=t[Hf];else{let n=t[yr];n&&(e=n)}if(!e){for(;t&&!t[ps]&&t!==i;)Sl(t)&&iM(t[jt],t),t=t[br];t===null&&(t=i),Sl(t)&&iM(t[jt],t),e=t&&t[ps]}t=e}}function K$(i,t,e,n){let r=yr+n,o=e.length;n>0&&(e[r-1][ps]=t),n0&&(i[e-1][ps]=n[ps]);let o=dy(i,yr+t);X$(n[jt],n);let s=o[Sa];s!==null&&s.detachView(o[jt]),n[br]=null,n[ps]=null,n[Tt]&=-129}return n}function n0(i,t){if(!(t[Tt]&256)){let e=t[di];e.destroyNode&&r0(i,t,e,3,null,null),Z$(t)}}function iM(i,t){if(t[Tt]&256)return;let e=dn(null);try{t[Tt]&=-129,t[Tt]|=256,t[po]&&Tu(t[po]),e9(i,t),J$(i,t),t[jt].type===1&&t[di].destroy();let n=t[Fc];if(n!==null&&Ta(t[br])){n!==t[br]&&XE(n,t);let r=t[Sa];r!==null&&r.detachView(i)}PM(t)}finally{dn(e)}}function J$(i,t){let e=i.cleanup,n=t[hy];if(e!==null)for(let s=0;s=0?n[a]():n[-a].unsubscribe(),s+=2}else{let a=n[e[s+1]];e[s].call(a)}n!==null&&(t[hy]=null);let r=t[Cl];if(r!==null){t[Cl]=null;for(let s=0;s-1){let{encapsulation:o}=i.data[n.directiveStart+r];if(o===Bs.None||o===Bs.Emulated)return null}return Vo(n,e)}}function xy(i,t,e,n,r){i.insertBefore(t,e,n,r)}function t2(i,t,e){i.appendChild(t,e)}function JA(i,t,e,n,r){n!==null?xy(i,t,e,n,r):t2(i,t,e)}function n2(i,t){return i.parentNode(t)}function n9(i,t){return i.nextSibling(t)}function i2(i,t,e){return r9(i,t,e)}function i9(i,t,e){return i.type&40?Vo(i,e):null}var r9=i9,eN;function i0(i,t,e,n){let r=e2(i,n,t),o=t[di],s=n.parent||t[ro],a=i2(s,n,t);if(r!=null)if(Array.isArray(e))for(let l=0;lVr&&l2(i,t,Vr,!1),Ls(s?2:0,r),e(n,r)}finally{Uc(o),Ls(s?3:1,r)}}function ZE(i,t,e){if(PE(t)){let n=dn(null);try{let r=t.directiveStart,o=t.directiveEnd;for(let s=r;snull;function g9(i,t,e,n){let r=v2(t);r.push(e),i.firstCreatePass&&y2(i).push(n,r.length-1)}function _9(i,t,e,n,r,o){let s=t?t.injectorIndex:-1,a=0;return tk()&&(a|=128),{type:e,index:n,insertBeforeIndex:null,injectorIndex:s,directiveStart:-1,directiveEnd:-1,directiveStylingLast:-1,componentOffset:-1,propertyBindings:null,flags:a,providerIndexes:0,value:r,attrs:o,mergedAttrs:null,localNames:null,initialInputs:void 0,inputs:null,outputs:null,tView:null,next:null,prev:null,projectionNext:null,child:null,parent:t,projection:null,styles:null,stylesWithoutHost:null,residualStyles:void 0,classes:null,classesWithoutHost:null,residualClasses:void 0,classBindings:0,styleBindings:0}}function tN(i,t,e,n,r){for(let o in t){if(!t.hasOwnProperty(o))continue;let s=t[o];if(s===void 0)continue;n??={};let a,l=Ml.None;Array.isArray(s)?(a=s[0],l=s[1]):a=s;let c=o;if(r!==null){if(!r.hasOwnProperty(o))continue;c=r[o]}i===0?nN(n,e,c,a,l):nN(n,e,c,a)}return n}function nN(i,t,e,n,r){let o;i.hasOwnProperty(e)?(o=i[e]).push(t,n):o=i[e]=[t,n],r!==void 0&&o.push(r)}function v9(i,t,e){let n=t.directiveStart,r=t.directiveEnd,o=i.data,s=t.attrs,a=[],l=null,c=null;for(let d=n;d0;){let e=i[--t];if(typeof e=="number"&&e<0)return e}return 0}function C9(i,t,e,n){let r=e.directiveStart,o=e.directiveEnd;Hy(e)&&O9(t,e,i.data[r+e.componentOffset]),i.firstCreatePass||vy(e,t),Tl(n,t);let s=e.initialInputs;for(let a=r;a{Qf(i.lView)},consumerOnSignalRead(){this.lView[po]=this}});function G9(i){let t=i[po]??Object.create(j9);return t.lView=i,t}var j9=at(X({},Oc),{consumerIsAlwaysLive:!0,consumerMarkedDirty:i=>{let t=zc(i.lView);for(;t&&!M2(t[jt]);)t=zc(t);t&&NE(t)},consumerOnSignalRead(){this.lView[po]=this}});function M2(i){return i.type!==2}function E2(i){if(i[Bc]===null)return;let t=!0;for(;t;){let e=!1;for(let n of i[Bc])n.dirty&&(e=!0,n.zone===null||Zone.current===n.zone?n.run():n.zone.run(()=>n.run()));t=e&&!!(i[Tt]&8192)}}var W9=100;function I2(i,t=!0,e=0){let r=i[Ca].rendererFactory,o=!1;o||r.begin?.();try{$9(i,e)}catch(s){throw t&&x2(i,s),s}finally{o||r.end?.()}}function $9(i,t){let e=ik();try{my(!0),jM(i,t);let n=0;for(;jy(i);){if(n===W9)throw new De(103,!1);n++,jM(i,1)}}finally{my(e)}}function q9(i,t,e,n){let r=t[Tt];if((r&256)===256)return;let o=!1,s=!1;VE(t);let a=!0,l=null,c=null;o||(M2(i)?(c=V9(t),l=Iu(c)):UR()===null?(a=!1,c=G9(t),l=Iu(c)):t[po]&&(Tu(t[po]),t[po]=null));try{KN(t),A6(i.bindingStartIndex),e!==null&&u2(i,t,e,2,n);let d=(r&3)===3;if(!o)if(d){let p=i.preOrderCheckHooks;p!==null&&iy(t,p,null)}else{let p=i.preOrderHooks;p!==null&&ry(t,p,0,null),eM(t,0)}if(s||Y9(t),E2(t),T2(t,0),i.contentQueries!==null&&_2(i,t),!o)if(d){let p=i.contentCheckHooks;p!==null&&iy(t,p)}else{let p=i.contentHooks;p!==null&&ry(t,p,1),eM(t,1)}d9(i,t);let u=i.components;u!==null&&O2(t,u,0);let h=i.viewQuery;if(h!==null&&GM(2,h,n),!o)if(d){let p=i.viewCheckHooks;p!==null&&iy(t,p)}else{let p=i.viewHooks;p!==null&&ry(t,p,2),eM(t,2)}if(i.firstUpdatePass===!0&&(i.firstUpdatePass=!1),t[ny]){for(let p of t[ny])p();t[ny]=null}o||(t[Tt]&=-73)}catch(d){throw o||Qf(t),d}finally{c!==null&&(Sf(c,l),a&&U9(c)),zE()}}function T2(i,t){for(let e=Rk(i);e!==null;e=Ak(e))for(let n=yr;n-1&&(jf(t,n),dy(e,n))}this._attachedToViewContainer=!1}n0(this._lView[jt],this._lView)}onDestroy(t){JN(this._lView,t)}markForCheck(){sI(this._cdRefInjectingView||this._lView,4)}markForRefresh(){NE(this._cdRefInjectingView||this._lView)}detach(){this._lView[Tt]&=-129}reattach(){xM(this._lView),this._lView[Tt]|=128}detectChanges(){this._lView[Tt]|=1024,I2(this._lView,this.notifyErrorHandler)}checkNoChanges(){}attachToViewContainerRef(){if(this._appRef)throw new De(902,!1);this._attachedToViewContainer=!0}detachFromAppRef(){this._appRef=null;let t=yM(this._lView),e=this._lView[Fc];e!==null&&!t&&XE(e,this._lView),Kk(this._lView[jt],this._lView)}attachToAppRef(t){if(this._attachedToViewContainer)throw new De(902,!1);this._appRef=t;let e=yM(this._lView),n=this._lView[Fc];n!==null&&!e&&Jk(n,this._lView),xM(this._lView)}},Qn=(()=>{class i{static{this.__NG_ELEMENT_ID__=K9}}return i})(),Q9=Qn,Z9=class extends Q9{constructor(t,e,n){super(),this._declarationLView=t,this._declarationTContainer=e,this.elementRef=n}get ssrId(){return this._declarationTContainer.tView?.ssrId||null}createEmbeddedView(t,e){return this.createEmbeddedViewImpl(t,e)}createEmbeddedViewImpl(t,e,n){let r=em(this._declarationLView,this._declarationTContainer,t,{embeddedViewInjector:e,dehydratedView:n});return new Wc(r)}};function K9(){return a0($i(),zt())}function a0(i,t){return i.type&4?new Z9(t,i,oh(i,t)):null}var WIe=new RegExp(`^(\\d+)*(${y$}|${v$})*(.*)`);var J9=()=>null;function eh(i,t){return J9(i,t)}var WM=class{},Cy=class{},$M=class{resolveComponentFactory(t){throw Error(`No component factory found for ${Br(t)}.`)}},th=class{static{this.NULL=new $M}},Dl=class{},Kc=(()=>{class i{constructor(){this.destroyNode=null}static{this.__NG_ELEMENT_ID__=()=>e7()}}return i})();function e7(){let i=zt(),t=$i(),e=Ol(t.index,i);return(Sl(e)?e:i)[di]}var t7=(()=>{class i{static{this.\u0275prov=J({token:i,providedIn:"root",factory:()=>null})}}return i})();function Sy(i,t,e){let n=e?i.styles:null,r=e?i.classes:null,o=0;if(t!==null)for(let s=0;s0&&s2(i,e,o.join(" "))}}function l7(i,t,e){let n=i.projection=[];for(let r=0;r{class i{static{this.__NG_ELEMENT_ID__=d7}}return i})();function d7(){let i=$i();return R2(i,zt())}var u7=Kt,P2=class extends u7{constructor(t,e,n){super(),this._lContainer=t,this._hostTNode=e,this._hostLView=n}get element(){return oh(this._hostTNode,this._hostLView)}get injector(){return new Lc(this._hostTNode,this._hostLView)}get parentInjector(){let t=UE(this._hostTNode,this._hostLView);if(pk(t)){let e=_y(t,this._hostLView),n=gy(t),r=e[jt].data[n+8];return new Lc(r,e)}else return new Lc(null,this._hostLView)}clear(){for(;this.length>0;)this.remove(this.length-1)}get(t){let e=rN(this._lContainer);return e!==null&&e[t]||null}get length(){return this._lContainer.length-yr}createEmbeddedView(t,e,n){let r,o;typeof n=="number"?r=n:n!=null&&(r=n.index,o=n.injector);let s=eh(this._lContainer,t.ssrId),a=t.createEmbeddedViewImpl(e||{},o,s);return this.insertImpl(a,r,Ju(this._hostTNode,s)),a}createComponent(t,e,n,r,o){let s=t&&!m6(t),a;if(s)a=e;else{let f=e||{};a=f.index,n=f.injector,r=f.projectableNodes,o=f.environmentInjector||f.ngModuleRef}let l=s?t:new nh(El(t)),c=n||this.parentInjector;if(!o&&l.ngModule==null){let m=(s?c:this.parentInjector).get(tr,null);m&&(o=m)}let d=El(l.componentType??{}),u=eh(this._lContainer,d?.id??null),h=u?.firstChild??null,p=l.create(c,r,h,o);return this.insertImpl(p.hostView,a,Ju(this._hostTNode,u)),p}insert(t,e){return this.insertImpl(t,e,!0)}insertImpl(t,e,n){let r=t._lView;if(C6(r)){let a=this.indexOf(t);if(a!==-1)this.detach(a);else{let l=r[br],c=new P2(l,l[ro],l[br]);c.detach(c.indexOf(t))}}let o=this._adjustIndex(e),s=this._lContainer;return tm(s,r,o,n),t.attachToViewContainerRef(),TN(rM(s),o,t),t}move(t,e){return this.insert(t,e)}indexOf(t){let e=rN(this._lContainer);return e!==null?e.indexOf(t):-1}remove(t){let e=this._adjustIndex(t,-1),n=jf(this._lContainer,e);n&&(dy(rM(this._lContainer),e),n0(n[jt],n))}detach(t){let e=this._adjustIndex(t,-1),n=jf(this._lContainer,e);return n&&dy(rM(this._lContainer),e)!=null?new Wc(n):null}_adjustIndex(t,e=0){return t??this.length+e}};function rN(i){return i[py]}function rM(i){return i[py]||(i[py]=[])}function R2(i,t){let e,n=t[i.index];return Ta(n)?e=n:(e=g2(n,t,null,i),t[i.index]=e,s0(t,e)),p7(e,t,i,n),new P2(e,i,t)}function h7(i,t){let e=i[di],n=e.createComment(""),r=Vo(t,i),o=n2(e,r);return xy(e,o,n,n9(e,r),!1),n}var p7=g7,f7=()=>!1;function m7(i,t,e){return f7(i,t,e)}function g7(i,t,e,n){if(i[Vc])return;let r;e.type&8?r=Vs(n):r=h7(t,e),i[Vc]=r}var YM=class i{constructor(t){this.queryList=t,this.matches=null}clone(){return new i(this.queryList)}setDirty(){this.queryList.setDirty()}},XM=class i{constructor(t=[]){this.queries=t}createEmbeddedView(t){let e=t.queries;if(e!==null){let n=t.contentQueries!==null?t.contentQueries[0]:e.length,r=[];for(let o=0;o0)n.push(s[a/2]);else{let c=o[a+1],d=t[-l];for(let u=yr;ut.trim())}function L2(i,t,e){i.queries===null&&(i.queries=new QM),i.queries.track(new ZM(t,e))}function C7(i,t){let e=i.contentQueries||(i.contentQueries=[]),n=e.length?e[e.length-1]:-1;t!==n&&e.push(i.queries.length-1,t)}function lI(i,t){return i.queries.getByIndex(t)}function F2(i,t){let e=i[jt],n=lI(e,t);return n.crossesNgTemplate?KM(e,i,t,[]):A2(e,i,n,t)}var oN=new Set;function go(i){oN.has(i)||(oN.add(i),performance?.mark?.("mark_feature_usage",{detail:{feature:i}}))}function nm(i){return typeof i=="function"&&i[kr]!==void 0}function et(i,t){go("NgSignals");let e=ZR(i),n=e[kr];return t?.equal&&(n.equal=t.equal),e.set=r=>_v(n,r),e.update=r=>KR(n,r),e.asReadonly=S7.bind(e),e}function S7(){let i=this[kr];if(i.readonlyFn===void 0){let t=()=>this();t[kr]=i,i.readonlyFn=t}return i.readonlyFn}function B2(i,t,e){let n,r=RS(()=>{n._dirtyCounter();let o=T7(n,i);if(t&&o===void 0)throw new De(-951,!1);return o});return n=r[kr],n._dirtyCounter=et(0),n._flatValue=void 0,r}function M7(i){return B2(!0,!1,i)}function E7(i){return B2(!0,!0,i)}function I7(i,t){let e=i[kr];e._lView=zt(),e._queryIndex=t,e._queryList=aI(e._lView,t),e._queryList.onDirty(()=>e._dirtyCounter.update(n=>n+1))}function T7(i,t){let e=i._lView,n=i._queryIndex;if(e===void 0||n===void 0||e[Tt]&4)return t?void 0:Fr;let r=aI(e,n),o=F2(e,n);return r.reset(o,Dk),t?r.first:r._changesDetected||i._flatValue===void 0?i._flatValue=r.toArray():i._flatValue}function sN(i,t){return M7(t)}function D7(i,t){return E7(t)}var V2=(sN.required=D7,sN);function O7(i){return Object.getPrototypeOf(i.prototype).constructor}function sn(i){let t=O7(i.type),e=!0,n=[i];for(;t;){let r;if(Ma(i))r=t.\u0275cmp||t.\u0275dir;else{if(t.\u0275cmp)throw new De(903,!1);r=t.\u0275dir}if(r){if(e){n.push(r);let s=i;s.inputs=Kv(i.inputs),s.inputTransforms=Kv(i.inputTransforms),s.declaredInputs=Kv(i.declaredInputs),s.outputs=Kv(i.outputs);let a=r.hostBindings;a&&k7(i,a);let l=r.viewQuery,c=r.contentQueries;if(l&&A7(i,l),c&&N7(i,c),P7(i,r),vW(i.outputs,r.outputs),Ma(r)&&r.data.animation){let d=i.data;d.animation=(d.animation||[]).concat(r.data.animation)}}let o=r.features;if(o)for(let s=0;s=0;n--){let r=i[n];r.hostVars=t+=r.hostVars,r.hostAttrs=zf(r.hostAttrs,e=zf(e,r.hostAttrs))}}function Kv(i){return i===wa?{}:i===Fr?[]:i}function A7(i,t){let e=i.viewQuery;e?i.viewQuery=(n,r)=>{t(n,r),e(n,r)}:i.viewQuery=t}function N7(i,t){let e=i.contentQueries;e?i.contentQueries=(n,r,o)=>{t(n,r,o),e(n,r,o)}:i.contentQueries=t}function k7(i,t){let e=i.hostBindings;e?i.hostBindings=(n,r)=>{t(n,r),e(n,r)}:i.hostBindings=t}function z2(i){let t=e=>{let n=(Array.isArray(i)?i:i()).map(r=>typeof r=="function"?{directive:er(r),inputs:wa,outputs:wa}:{directive:er(r.directive),inputs:aN(r.inputs),outputs:aN(r.outputs)});e.hostDirectives===null?(e.findHostDirectiveDefs=U2,e.hostDirectives=n):e.hostDirectives.unshift(...n)};return t.ngInherit=!0,t}function U2(i,t,e){if(i.hostDirectives!==null)for(let n of i.hostDirectives){let r=TE(n.directive);L7(r.declaredInputs,n.inputs),U2(r,t,e),e.set(r,n),t.push(r)}}function aN(i){if(i===void 0||i.length===0)return wa;let t={};for(let e=0;ee()),this.destroyCbs=null}onDestroy(t){this.destroyCbs.push(t)}},eE=class extends Wf{constructor(t){super(),this.moduleType=t}create(t){return new JM(this.moduleType,t,[])}};var Iy=class extends fs{constructor(t){super(),this.componentFactoryResolver=new My(this),this.instance=null;let e=new Uf([...t.providers,{provide:fs,useValue:this},{provide:th,useValue:this.componentFactoryResolver}],t.parent||zy(),t.debugName,new Set(["environment"]));this.injector=e,t.runEnvironmentInitializers&&e.resolveInjectorInitializers()}destroy(){this.injector.destroy()}onDestroy(t){this.injector.onDestroy(t)}};function cI(i,t,e=null){return new Iy({providers:i,parent:t,debugName:e,runEnvironmentInitializers:!0}).injector}function H2(i){return B7(i)?Array.isArray(i)||!(i instanceof Map)&&Symbol.iterator in i:!1}function F7(i,t){if(Array.isArray(i))for(let e=0;e{class i{constructor(){this.impl=null}execute(){this.impl?.execute()}static{this.\u0275prov=J({token:i,providedIn:"root",factory:()=>new i})}}return i})(),nE=class i{constructor(){this.ngZone=S(Ue),this.scheduler=S(jc),this.errorHandler=S(io,{optional:!0}),this.sequences=new Set,this.deferredRegistrations=new Set,this.executing=!1}static{this.PHASES=[ju.EarlyRead,ju.Write,ju.MixedReadWrite,ju.Read]}execute(){this.executing=!0;for(let t of i.PHASES)for(let e of this.sequences)if(!(e.erroredOrDestroyed||!e.hooks[t]))try{e.pipelinedValue=this.ngZone.runOutsideAngular(()=>e.hooks[t](e.pipelinedValue))}catch(n){e.erroredOrDestroyed=!0,this.errorHandler?.handleError(n)}this.executing=!1;for(let t of this.sequences)t.afterRun(),t.once&&(this.sequences.delete(t),t.destroy());for(let t of this.deferredRegistrations)this.sequences.add(t);this.deferredRegistrations.size>0&&this.scheduler.notify(8),this.deferredRegistrations.clear()}register(t){this.executing?this.deferredRegistrations.add(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))}static{this.\u0275prov=J({token:i,providedIn:"root",factory:()=>new i})}},iE=class{constructor(t,e,n,r){this.impl=t,this.hooks=e,this.once=n,this.erroredOrDestroyed=!1,this.pipelinedValue=void 0,this.unregisterOnDestroy=r?.onDestroy(()=>this.destroy())}afterRun(){this.erroredOrDestroyed=!1,this.pipelinedValue=void 0}destroy(){this.impl.unregister(this),this.unregisterOnDestroy?.()}};function im(i,t){!t?.injector&&qc(im);let e=t?.injector??S(pt);return Qk(e)?(go("NgAfterRender"),W2(i,e,t,!1)):$2}function zi(i,t){!t?.injector&&qc(zi);let e=t?.injector??S(pt);return Qk(e)?(go("NgAfterNextRender"),W2(i,e,t,!0)):$2}function W7(i,t){if(i instanceof Function){let e=[void 0,void 0,void 0,void 0];return e[t]=i,e}else return[i.earlyRead,i.write,i.mixedReadWrite,i.read]}function W2(i,t,e,n){let r=t.get(j2);r.impl??=t.get(nE);let o=e?.phase??ju.MixedReadWrite,s=e?.manualCleanup!==!0?t.get(hi):null,a=new iE(r.impl,W7(i,o),n,s);return r.impl.register(a),a}var $2={destroy(){}};var l0=(()=>{class i{log(e){console.log(e)}warn(e){console.warn(e)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"platform"})}}return i})();var q2=new pe("");function Jc(i){return!!i&&typeof i.then=="function"}function Y2(i){return!!i&&typeof i.subscribe=="function"}var X2=new pe("");var Q2=(()=>{class i{constructor(){this.initialized=!1,this.done=!1,this.donePromise=new Promise((e,n)=>{this.resolve=e,this.reject=n}),this.appInits=S(X2,{optional:!0})??[],this.injector=S(pt)}runInitializers(){if(this.initialized)return;let e=[];for(let r of this.appInits){let o=ms(this.injector,r);if(Jc(o))e.push(o);else if(Y2(o)){let s=new Promise((a,l)=>{o.subscribe({complete:a,error:l})});e.push(s)}}let n=()=>{this.done=!0,this.resolve()};Promise.all(e).then(()=>{n()}).catch(r=>{this.reject(r)}),e.length===0&&n(),this.initialized=!0}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),Z2=(()=>{class i{static{this.\u0275prov=J({token:i,providedIn:"root",factory:()=>new Dy})}}return i})(),Dy=class{constructor(){this.queuedEffectCount=0,this.queues=new Map}schedule(t){this.enqueue(t)}enqueue(t){let e=t.zone;this.queues.has(e)||this.queues.set(e,new Set);let n=this.queues.get(e);n.has(t)||(this.queuedEffectCount++,n.add(t))}flush(){for(;this.queuedEffectCount>0;)for(let[t,e]of this.queues)t===null?this.flushQueue(e):t.run(()=>this.flushQueue(e))}flushQueue(t){for(let e of t)t.delete(e),this.queuedEffectCount--,e.run()}},dI=new pe("");function $7(){QR(()=>{throw new De(600,!1)})}function q7(i){return i.isBoundToModule}var Y7=10;function X7(i,t,e){try{let n=e();return Jc(n)?n.catch(r=>{throw t.runOutsideAngular(()=>i.handleError(r)),r}):n}catch(n){throw t.runOutsideAngular(()=>i.handleError(n)),n}}var zo=(()=>{class i{constructor(){this._bootstrapListeners=[],this._runningTick=!1,this._destroyed=!1,this._destroyListeners=[],this._views=[],this.internalErrorHandler=S(c$),this.afterRenderManager=S(j2),this.zonelessEnabled=S(Ky),this.rootEffectScheduler=S(Z2),this.dirtyFlags=0,this.deferredDirtyFlags=0,this.externalTestViews=new Set,this.afterTick=new ce,this.componentTypes=[],this.components=[],this.isStable=S(Qc).hasPendingTasks.pipe(We(e=>!e)),this._injector=S(tr)}get allViews(){return[...this.externalTestViews.keys(),...this._views]}get destroyed(){return this._destroyed}whenStable(){let e;return new Promise(n=>{e=this.isStable.subscribe({next:r=>{r&&n()}})}).finally(()=>{e.unsubscribe()})}get injector(){return this._injector}bootstrap(e,n){let r=e instanceof Cy;if(!this._injector.get(Q2).done){let h=!r&&LN(e),p=!1;throw new De(405,p)}let s;r?s=e:s=this._injector.get(th).resolveComponentFactory(e),this.componentTypes.push(s.componentType);let a=q7(s)?void 0:this._injector.get(fs),l=n||s.selector,c=s.create(pt.NULL,[],l,a),d=c.location.nativeElement,u=c.injector.get(q2,null);return u?.registerApplication(d),c.onDestroy(()=>{this.detachView(c.hostView),sy(this.components,c),u?.unregisterApplication(d)}),this._loadComponent(c),c}tick(){this.zonelessEnabled||(this.dirtyFlags|=1),this._tick()}_tick(){if(this._runningTick)throw new De(101,!1);let e=dn(null);try{this._runningTick=!0,this.synchronize()}catch(n){this.internalErrorHandler(n)}finally{this._runningTick=!1,dn(e),this.afterTick.next()}}synchronize(){let e=null;this._injector.destroyed||(e=this._injector.get(Dl,null,{optional:!0})),this.dirtyFlags|=this.deferredDirtyFlags,this.deferredDirtyFlags=0;let n=0;for(;this.dirtyFlags!==0&&n++jy(e))){this.dirtyFlags|=2;return}else this.dirtyFlags&=-8}attachView(e){let n=e;this._views.push(n),n.attachToAppRef(this)}detachView(e){let n=e;sy(this._views,n),n.detachFromAppRef()}_loadComponent(e){this.attachView(e.hostView),this.tick(),this.components.push(e);let n=this._injector.get(dI,[]);[...this._bootstrapListeners,...n].forEach(r=>r(e))}ngOnDestroy(){if(!this._destroyed)try{this._destroyListeners.forEach(e=>e()),this._views.slice().forEach(e=>e.destroy())}finally{this._destroyed=!0,this._views=[],this._bootstrapListeners=[],this._destroyListeners=[]}}onDestroy(e){return this._destroyListeners.push(e),()=>sy(this._destroyListeners,e)}destroy(){if(this._destroyed)throw new De(406,!1);let e=this._injector;e.destroy&&!e.destroyed&&e.destroy()}get viewCount(){return this._views.length}warnIfDestroyed(){}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function sy(i,t){let e=i.indexOf(t);e>-1&&i.splice(e,1)}function Q7(i,t,e,n){if(!e&&!jy(i))return;I2(i,t,e&&!n?0:1)}function qe(i,t,e,n){let r=zt(),o=Xc();if(Bo(r,o,t)){let s=ui(),a=qy();P9(a,r,i,t,e,n)}return qe}function K2(i,t,e,n){return Bo(i,Xc(),e)?t+ks(e)+n:Hr}function Z7(i,t,e,n,r,o){let s=ok(),a=tE(i,s,e,r);return Wy(2),a?t+ks(e)+n+ks(r)+o:Hr}function K7(i,t,e,n,r,o,s,a,l,c){let d=ok(),u=z7(i,d,e,r,s,l);return Wy(4),u?t+ks(e)+n+ks(r)+o+ks(s)+a+ks(l)+c:Hr}function Jv(i,t){return i<<17|t<<2}function $c(i){return i>>17&32767}function J7(i){return(i&2)==2}function eq(i,t){return i&131071|t<<17}function rE(i){return i|2}function ih(i){return(i&131068)>>2}function oM(i,t){return i&-131069|t<<2}function tq(i){return(i&1)===1}function oE(i){return i|1}function nq(i,t,e,n,r,o){let s=o?t.classBindings:t.styleBindings,a=$c(s),l=ih(s);i[n]=e;let c=!1,d;if(Array.isArray(e)){let u=e;d=u[1],(d===null||Xf(u,d)>0)&&(c=!0)}else d=e;if(r)if(l!==0){let h=$c(i[a+1]);i[n+1]=Jv(h,a),h!==0&&(i[h+1]=oM(i[h+1],n)),i[a+1]=eq(i[a+1],n)}else i[n+1]=Jv(a,0),a!==0&&(i[a+1]=oM(i[a+1],n)),a=n;else i[n+1]=Jv(l,0),a===0?a=n:i[l+1]=oM(i[l+1],n),l=n;c&&(i[n+1]=rE(i[n+1])),lN(i,d,n,!0),lN(i,d,n,!1),iq(t,d,i,n,o),s=Jv(a,l),o?t.classBindings=s:t.styleBindings=s}function iq(i,t,e,n,r){let o=r?i.residualClasses:i.residualStyles;o!=null&&typeof t=="string"&&Xf(o,t)>=0&&(e[n+1]=oE(e[n+1]))}function lN(i,t,e,n){let r=i[e+1],o=t===null,s=n?$c(r):ih(r),a=!1;for(;s!==0&&(a===!1||o);){let l=i[s],c=i[s+1];rq(l,t)&&(a=!0,i[s+1]=n?oE(c):rE(c)),s=n?$c(c):ih(c)}a&&(i[e+1]=n?rE(r):oE(r))}function rq(i,t){return i===null||t==null||(Array.isArray(i)?i[1]:i)===t?!0:Array.isArray(i)&&typeof t=="string"?Xf(i,t)>=0:!1}var hs={textEnd:0,key:0,keyEnd:0,value:0,valueEnd:0};function oq(i){return i.substring(hs.key,hs.keyEnd)}function sq(i){return aq(i),J2(i,eL(i,0,hs.textEnd))}function J2(i,t){let e=hs.textEnd;return e===t?-1:(t=hs.keyEnd=lq(i,hs.key=t,e),eL(i,t,e))}function aq(i){hs.key=0,hs.keyEnd=0,hs.value=0,hs.valueEnd=0,hs.textEnd=i.length}function eL(i,t,e){for(;t32;)t++;return t}function R(i,t,e){let n=zt(),r=Xc();if(Bo(n,r,t)){let o=ui(),s=qy();tI(o,s,n,i,t,n[di],e,!1)}return R}function sE(i,t,e,n,r){let o=t.inputs,s=r?"class":"style";iI(i,e,o[s],s,n)}function an(i,t,e){return nL(i,t,e,!1),an}function ne(i,t){return nL(i,t,null,!0),ne}function Gr(i){iL(fq,tL,i,!0)}function tL(i,t){for(let e=sq(t);e>=0;e=J2(t,e))Fy(i,oq(t),!0)}function nL(i,t,e,n){let r=zt(),o=ui(),s=Wy(2);if(o.firstUpdatePass&&oL(o,i,s,n),t!==Hr&&Bo(r,s,t)){let a=o.data[Us()];sL(o,a,r,r[di],i,r[s+1]=gq(t,e),n,s)}}function iL(i,t,e,n){let r=ui(),o=Wy(2);r.firstUpdatePass&&oL(r,null,o,n);let s=zt();if(e!==Hr&&Bo(s,o,e)){let a=r.data[Us()];if(aL(a,n)&&!rL(r,o)){let l=n?a.classesWithoutHost:a.stylesWithoutHost;l!==null&&(e=uM(l,e||"")),sE(r,a,s,e,n)}else mq(r,a,s,s[di],s[o+1],s[o+1]=pq(i,t,e),n,o)}}function rL(i,t){return t>=i.expandoStartIndex}function oL(i,t,e,n){let r=i.data;if(r[e+1]===null){let o=r[Us()],s=rL(i,e);aL(o,n)&&t===null&&!s&&(t=!1),t=cq(r,o,t,n),nq(r,o,t,e,s,n)}}function cq(i,t,e,n){let r=FE(i),o=n?t.residualClasses:t.residualStyles;if(r===null)(n?t.classBindings:t.styleBindings)===0&&(e=sM(null,i,t,e,n),e=$f(e,t.attrs,n),o=null);else{let s=t.directiveStylingLast;if(s===-1||i[s]!==r)if(e=sM(r,i,t,e,n),o===null){let l=dq(i,t,n);l!==void 0&&Array.isArray(l)&&(l=sM(null,i,t,l[1],n),l=$f(l,t.attrs,n),uq(i,t,n,l))}else o=hq(i,t,n)}return o!==void 0&&(n?t.residualClasses=o:t.residualStyles=o),e}function dq(i,t,e){let n=e?t.classBindings:t.styleBindings;if(ih(n)!==0)return i[$c(n)]}function uq(i,t,e,n){let r=e?t.classBindings:t.styleBindings;i[$c(r)]=n}function hq(i,t,e){let n,r=t.directiveEnd;for(let o=1+t.directiveStylingLast;o0;){let l=i[r],c=Array.isArray(l),d=c?l[1]:l,u=d===null,h=e[r+1];h===Hr&&(h=u?Fr:void 0);let p=u?KS(h,n):d===n?h:void 0;if(c&&!Oy(p)&&(p=KS(l,n)),Oy(p)&&(a=p,s))return a;let f=i[r+1];r=s?$c(f):ih(f)}if(t!==null){let l=o?t.residualClasses:t.residualStyles;l!=null&&(a=KS(l,n))}return a}function Oy(i){return i!==void 0}function gq(i,t){return i==null||i===""||(typeof t=="string"?i=i+t:typeof i=="object"&&(i=Br(Hs(i)))),i}function aL(i,t){return(i.flags&(t?8:16))!==0}function lL(i,t,e){let n=zt(),r=K2(n,i,t,e);iL(Fy,tL,r,!0)}var aE=class{destroy(t){}updateValue(t,e){}swap(t,e){let n=Math.min(t,e),r=Math.max(t,e),o=this.detach(r);if(r-n>1){let s=this.detach(n);this.attach(n,o),this.attach(r,s)}else this.attach(n,o)}move(t,e){this.attach(e,this.detach(t))}};function aM(i,t,e,n,r){return i===e&&Object.is(t,n)?1:Object.is(r(i,t),r(e,n))?-1:0}function _q(i,t,e){let n,r,o=0,s=i.length-1,a=void 0;if(Array.isArray(t)){let l=t.length-1;for(;o<=s&&o<=l;){let c=i.at(o),d=t[o],u=aM(o,c,o,d,e);if(u!==0){u<0&&i.updateValue(o,d),o++;continue}let h=i.at(s),p=t[l],f=aM(s,h,l,p,e);if(f!==0){f<0&&i.updateValue(s,p),s--,l--;continue}let m=e(o,c),b=e(s,h),g=e(o,d);if(Object.is(g,b)){let _=e(l,p);Object.is(_,m)?(i.swap(o,s),i.updateValue(s,p),l--,s--):i.move(s,o),i.updateValue(o,d),o++;continue}if(n??=new Py,r??=uN(i,o,s,e),lE(i,n,o,g))i.updateValue(o,d),o++,s++;else if(r.has(g))n.set(m,i.detach(o)),s--;else{let _=i.create(o,t[o]);i.attach(o,_),o++,s++}}for(;o<=l;)dN(i,n,e,o,t[o]),o++}else if(t!=null){let l=t[Symbol.iterator](),c=l.next();for(;!c.done&&o<=s;){let d=i.at(o),u=c.value,h=aM(o,d,o,u,e);if(h!==0)h<0&&i.updateValue(o,u),o++,c=l.next();else{n??=new Py,r??=uN(i,o,s,e);let p=e(o,u);if(lE(i,n,o,p))i.updateValue(o,u),o++,s++,c=l.next();else if(!r.has(p))i.attach(o,i.create(o,u)),o++,s++,c=l.next();else{let f=e(o,d);n.set(f,i.detach(o)),s--}}}for(;!c.done;)dN(i,n,e,i.length,c.value),c=l.next()}for(;o<=s;)i.destroy(i.detach(s--));n?.forEach(l=>{i.destroy(l)})}function lE(i,t,e,n){return t!==void 0&&t.has(n)?(i.attach(e,t.get(n)),t.delete(n),!0):!1}function dN(i,t,e,n,r){if(lE(i,t,n,e(n,r)))i.updateValue(n,r);else{let o=i.create(n,r);i.attach(n,o)}}function uN(i,t,e,n){let r=new Set;for(let o=t;o<=e;o++)r.add(n(o,i.at(o)));return r}var Py=class{constructor(){this.kvMap=new Map,this._vMap=void 0}has(t){return this.kvMap.has(t)}delete(t){if(!this.has(t))return!1;let e=this.kvMap.get(t);return this._vMap!==void 0&&this._vMap.has(e)?(this.kvMap.set(t,this._vMap.get(e)),this._vMap.delete(e)):this.kvMap.delete(t),!0}get(t){return this.kvMap.get(t)}set(t,e){if(this.kvMap.has(t)){let n=this.kvMap.get(t);this._vMap===void 0&&(this._vMap=new Map);let r=this._vMap;for(;r.has(n);)n=r.get(n);r.set(n,e)}else this.kvMap.set(t,e)}forEach(t){for(let[e,n]of this.kvMap)if(t(n,e),this._vMap!==void 0){let r=this._vMap;for(;r.has(n);)n=r.get(n),t(n,e)}}};function re(i,t){go("NgControlFlow");let e=zt(),n=Xc(),r=e[n]!==Hr?e[n]:-1,o=r!==-1?Ry(e,Vr+r):void 0,s=0;if(Bo(e,n,i)){let a=dn(null);try{if(o!==void 0&&C2(o,s),i!==-1){let l=Vr+i,c=Ry(e,l),d=hE(e[jt],l),u=eh(c,d.tView.ssrId),h=em(e,d,t,{dehydratedView:u});tm(c,h,s,Ju(d,u))}}finally{dn(a)}}else if(o!==void 0){let a=w2(o,s);a!==void 0&&(a[vr]=t)}}var cE=class{constructor(t,e,n){this.lContainer=t,this.$implicit=e,this.$index=n}get $count(){return this.lContainer.length-yr}};function c0(i){return i}function wr(i,t){return t}var dE=class{constructor(t,e,n){this.hasEmptyBlock=t,this.trackByFn=e,this.liveCollection=n}};function Xt(i,t,e,n,r,o,s,a,l,c,d,u,h){go("NgControlFlow");let p=zt(),f=ui(),m=l!==void 0,b=zt(),g=a?s.bind(b[fo][vr]):s,_=new dE(m,g);b[Vr+i]=_,Ty(p,f,i+1,t,e,n,r,Il(f.consts,o)),m&&Ty(p,f,i+2,l,c,d,u,Il(f.consts,h))}var uE=class extends aE{constructor(t,e,n){super(),this.lContainer=t,this.hostLView=e,this.templateTNode=n,this.operationsCounter=void 0,this.needsIndexUpdate=!1}get length(){return this.lContainer.length-yr}at(t){return this.getLView(t)[vr].$implicit}attach(t,e){let n=e[Qu];this.needsIndexUpdate||=t!==this.length,tm(this.lContainer,e,t,Ju(this.templateTNode,n))}detach(t){return this.needsIndexUpdate||=t!==this.length-1,vq(this.lContainer,t)}create(t,e){let n=eh(this.lContainer,this.templateTNode.tView.ssrId),r=em(this.hostLView,this.templateTNode,new cE(this.lContainer,e,t),{dehydratedView:n});return this.operationsCounter?.recordCreate(),r}destroy(t){n0(t[jt],t),this.operationsCounter?.recordDestroy()}updateValue(t,e){this.getLView(t)[vr].$implicit=e}reset(){this.needsIndexUpdate=!1,this.operationsCounter?.reset()}updateIndexes(){if(this.needsIndexUpdate)for(let t=0;t(Qy(!0),Zk(n,r,z6()));function wq(i,t,e,n,r){let o=t.consts,s=Il(o,n),a=sh(t,i,8,"ng-container",s);s!==null&&Sy(a,s,!0);let l=Il(o,r);return nI(t,e,a,l),t.queries!==null&&t.queries.elementStart(t,a),a}function _o(i,t,e){let n=zt(),r=ui(),o=i+Vr,s=r.firstCreatePass?wq(o,r,n,t,e):r.data[o];Yc(s,!0);let a=Cq(r,n,s,i);return n[o]=a,Xy()&&i0(r,n,a,s),Tl(a,n),Gy(s)&&(KE(r,n,s),ZE(r,s,n)),e!=null&&JE(n,s),_o}function vo(){let i=$i(),t=ui();return kE()?LE():(i=i.parent,Yc(i,!1)),t.firstCreatePass&&(Zy(t,i),PE(i)&&t.queries.elementEnd(i)),vo}function nr(i,t,e){return _o(i,t,e),vo(),nr}var Cq=(i,t,e,n)=>(Qy(!0),Y$(t[di],""));function te(){return zt()}function Cr(i,t,e){let n=zt(),r=Xc();if(Bo(n,r,t)){let o=ui(),s=qy();tI(o,s,n,i,t,n[di],e,!0)}return Cr}function rm(i,t,e){let n=zt(),r=Xc();if(Bo(n,r,t)){let o=ui(),s=qy(),a=FE(o.data),l=b2(a,s,n);tI(o,s,n,i,t,l,e,!0)}return rm}var Ay="en-US";var Sq=Ay;function Mq(i){typeof i=="string"&&(Sq=i.toLowerCase().replace(/_/g,"-"))}var Eq=(i,t,e)=>{};function H(i,t,e,n){let r=zt(),o=ui(),s=$i();return cL(o,r,r[di],s,i,t,n),H}function uI(i,t){let e=$i(),n=zt(),r=ui(),o=FE(r.data),s=b2(o,e,n);return cL(r,n,s,e,i,t),uI}function Iq(i,t,e,n){let r=i.cleanup;if(r!=null)for(let o=0;ol?a[l]:null}typeof s=="string"&&(o+=2)}return null}function cL(i,t,e,n,r,o,s){let a=Gy(n),c=i.firstCreatePass&&y2(i),d=t[vr],u=v2(t),h=!0;if(n.type&3||s){let m=Vo(n,t),b=s?s(m):m,g=u.length,_=s?C=>s(Vs(C[n.index])):n.index,x=null;if(!s&&a&&(x=Iq(i,t,r,n.index)),x!==null){let C=x.__ngLastListenerFn__||x;C.__ngNextListenerFn__=o,x.__ngLastListenerFn__=o,h=!1}else{o=pN(n,t,d,o),Eq(m,r,o);let C=e.listen(b,r,o);u.push(o,C),c&&c.push(r,_,g,g+1)}}else o=pN(n,t,d,o);let p=n.outputs,f;if(h&&p!==null&&(f=p[r])){let m=f.length;if(m)for(let b=0;b-1?Ol(i.index,t):t;sI(s,5);let a=hN(t,e,n,o),l=r.__ngNextListenerFn__;for(;l;)a=hN(t,e,l,o)&&a,l=l.__ngNextListenerFn__;return a}}function I(i=1){return B6(i)}function Tq(i,t){let e=null,n=YW(i);for(let r=0;r(Qy(!0),$$(t[di],n));function lt(i){return we("",i,""),lt}function we(i,t,e){let n=zt(),r=K2(n,i,t,e);return r!==Hr&&rI(n,Us(),r),we}function hI(i,t,e,n,r){let o=zt(),s=Z7(o,i,t,e,n,r);return s!==Hr&&rI(o,Us(),s),hI}function ed(i,t,e,n,r,o,s,a,l){let c=zt(),d=K7(c,i,t,e,n,r,o,s,a,l);return d!==Hr&&rI(c,Us(),d),ed}function Pq(i,t,e){let n=ui();if(n.firstCreatePass){let r=Ma(i);pE(e,n.data,n.blueprint,r,!0),pE(t,n.data,n.blueprint,r,!1)}}function pE(i,t,e,n,r){if(i=er(i),Array.isArray(i))for(let o=0;o>20;if(Xu(i)||!i.multi){let p=new Hc(c,r,q),f=cM(l,t,r?d:d+h,u);f===-1?(EM(vy(a,s),o,l),lM(o,i,t.length),t.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),e.push(p),s.push(p)):(e[f]=p,s[f]=p)}else{let p=cM(l,t,d+h,u),f=cM(l,t,d,d+h),m=p>=0&&e[p],b=f>=0&&e[f];if(r&&!b||!r&&!m){EM(vy(a,s),o,l);let g=Nq(r?Aq:Rq,e.length,r,n,c);!r&&b&&(e[f].providerFactory=g),lM(o,i,t.length,0),t.push(l),a.directiveStart++,a.directiveEnd++,r&&(a.providerIndexes+=1048576),e.push(g),s.push(g)}else{let g=hL(e[r?f:p],c,!r&&n);lM(o,i,p>-1?p:f,g)}!r&&n&&b&&e[f].componentProviders++}}}function lM(i,t,e,n){let r=Xu(t),o=l6(t);if(r||o){let l=(o?er(t.useClass):t).prototype.ngOnDestroy;if(l){let c=i.destroyHooks||(i.destroyHooks=[]);if(!r&&t.multi){let d=c.indexOf(e);d===-1?c.push(e,[n,l]):c[d+1].push(n,l)}else c.push(e,l)}}}function hL(i,t,e){return e&&i.componentProviders++,i.multi.push(t)-1}function cM(i,t,e,n){for(let r=e;r{e.providersResolver=(n,r)=>Pq(n,r?r(i):i,t)}}var kq=(()=>{class i{constructor(e){this._injector=e,this.cachedInjectors=new Map}getOrCreateStandaloneInjector(e){if(!e.standalone)return null;if(!this.cachedInjectors.has(e)){let n=zN(!1,e.type),r=n.length>0?cI([n],this._injector,`Standalone[${e.type.name}]`):null;this.cachedInjectors.set(e,r)}return this.cachedInjectors.get(e)}ngOnDestroy(){try{for(let e of this.cachedInjectors.values())e!==null&&e.destroy()}finally{this.cachedInjectors.clear()}}static{this.\u0275prov=J({token:i,providedIn:"environment",factory:()=>new i(Le(tr))})}}return i})();function se(i){go("NgStandalone"),i.getStandaloneInjector=t=>t.get(kq).getOrCreateStandaloneInjector(i)}function pL(i,t,e){let n=rk()+i,r=zt();return r[n]===Hr?G2(r,n,e?t.call(e):t()):V7(r,n)}function Pl(i,t,e,n){return Fq(zt(),rk(),i,t,e,n)}function Lq(i,t){let e=i[t];return e===Hr?void 0:e}function Fq(i,t,e,n,r,o){let s=t+e;return Bo(i,s,r)?G2(i,s+1,o?n.call(o,r):n(r)):Lq(i,s+1)}function Mt(i,t){return a0(i,t)}var mE=class{constructor(t,e){this.ngModuleFactory=t,this.componentFactories=e}},pI=(()=>{class i{compileModuleSync(e){return new eE(e)}compileModuleAsync(e){return Promise.resolve(this.compileModuleSync(e))}compileModuleAndAllComponentsSync(e){let n=this.compileModuleSync(e),r=FN(e),o=Xk(r.declarations).reduce((s,a)=>{let l=El(a);return l&&s.push(new nh(l)),s},[]);return new mE(n,o)}compileModuleAndAllComponentsAsync(e){return Promise.resolve(this.compileModuleAndAllComponentsSync(e))}clearCache(){}clearCacheFor(e){}getModuleId(e){}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Bq=(()=>{class i{constructor(){this.zone=S(Ue),this.changeDetectionScheduler=S(jc),this.applicationRef=S(zo)}initialize(){this._onMicrotaskEmptySubscription||(this._onMicrotaskEmptySubscription=this.zone.onMicrotaskEmpty.subscribe({next:()=>{this.changeDetectionScheduler.runningTick||this.zone.run(()=>{this.applicationRef.tick()})}}))}ngOnDestroy(){this._onMicrotaskEmptySubscription?.unsubscribe()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),Vq=new pe("",{factory:()=>!1});function fL({ngZoneFactory:i,ignoreChangesOutsideZone:t,scheduleInRootZone:e}){return i??=()=>new Ue(at(X({},gL()),{scheduleInRootZone:e})),[{provide:Ue,useFactory:i},{provide:Yu,multi:!0,useFactory:()=>{let n=S(Bq,{optional:!0});return()=>n.initialize()}},{provide:Yu,multi:!0,useFactory:()=>{let n=S(zq);return()=>{n.initialize()}}},t===!0?{provide:Sk,useValue:!0}:[],{provide:Mk,useValue:e??Ck}]}function mL(i){let t=i?.ignoreChangesOutsideZone,e=i?.scheduleInRootZone,n=fL({ngZoneFactory:()=>{let r=gL(i);return r.scheduleInRootZone=e,r.shouldCoalesceEventChangeDetection&&go("NgZone_CoalesceEvent"),new Ue(r)},ignoreChangesOutsideZone:t,scheduleInRootZone:e});return By([{provide:Vq,useValue:!0},{provide:Ky,useValue:!1},n])}function gL(i){return{enableLongStackTrace:!1,shouldCoalesceEventChangeDetection:i?.eventCoalescing??!1,shouldCoalesceRunChangeDetection:i?.runCoalescing??!1}}var zq=(()=>{class i{constructor(){this.subscription=new St,this.initialized=!1,this.zone=S(Ue),this.pendingTasks=S(Qc)}initialize(){if(this.initialized)return;this.initialized=!0;let e=null;!this.zone.isStable&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(e=this.pendingTasks.add()),this.zone.runOutsideAngular(()=>{this.subscription.add(this.zone.onStable.subscribe(()=>{Ue.assertNotInAngularZone(),queueMicrotask(()=>{e!==null&&!this.zone.hasPendingMacrotasks&&!this.zone.hasPendingMicrotasks&&(this.pendingTasks.remove(e),e=null)})}))}),this.subscription.add(this.zone.onUnstable.subscribe(()=>{Ue.assertInAngularZone(),e??=this.pendingTasks.add()}))}ngOnDestroy(){this.subscription.unsubscribe()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Uq=(()=>{class i{constructor(){this.appRef=S(zo),this.taskService=S(Qc),this.ngZone=S(Ue),this.zonelessEnabled=S(Ky),this.disableScheduling=S(Sk,{optional:!0})??!1,this.zoneIsDefined=typeof Zone<"u"&&!!Zone.root.run,this.schedulerTickApplyArgs=[{data:{__scheduler_tick__:!0}}],this.subscriptions=new St,this.angularZoneId=this.zoneIsDefined?this.ngZone._inner?.get(by):null,this.scheduleInRootZone=!this.zonelessEnabled&&this.zoneIsDefined&&(S(Mk,{optional:!0})??!1),this.cancelScheduledCallback=null,this.useMicrotaskScheduler=!1,this.runningTick=!1,this.pendingRenderTaskId=null,this.subscriptions.add(this.appRef.afterTick.subscribe(()=>{this.runningTick||this.cleanup()})),this.subscriptions.add(this.ngZone.onUnstable.subscribe(()=>{this.runningTick||this.cleanup()})),this.disableScheduling||=!this.zonelessEnabled&&(this.ngZone instanceof OM||!this.zoneIsDefined)}notify(e){if(!this.zonelessEnabled&&e===5)return;let n=!1;switch(e){case 0:{this.appRef.dirtyFlags|=2;break}case 3:case 2:case 4:case 5:case 1:{this.appRef.dirtyFlags|=4;break}case 8:{this.appRef.deferredDirtyFlags|=8;break}case 6:{this.appRef.dirtyFlags|=2,n=!0;break}case 13:{this.appRef.dirtyFlags|=16,n=!0;break}case 14:{this.appRef.dirtyFlags|=2,n=!0;break}case 12:{n=!0;break}case 10:case 9:case 7:case 11:default:this.appRef.dirtyFlags|=8}if(!this.shouldScheduleTick(n))return;let r=this.useMicrotaskScheduler?jA:Ek;this.pendingRenderTaskId=this.taskService.add(),this.scheduleInRootZone?this.cancelScheduledCallback=Zone.root.run(()=>r(()=>this.tick())):this.cancelScheduledCallback=this.ngZone.runOutsideAngular(()=>r(()=>this.tick()))}shouldScheduleTick(e){return!(this.disableScheduling&&!e||this.appRef.destroyed||this.pendingRenderTaskId!==null||this.runningTick||this.appRef._runningTick||!this.zonelessEnabled&&this.zoneIsDefined&&Zone.current.get(by+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 e=this.taskService.add();try{this.ngZone.run(()=>{this.runningTick=!0,this.appRef._tick()},void 0,this.schedulerTickApplyArgs)}catch(n){throw this.taskService.remove(e),n}finally{this.cleanup()}this.useMicrotaskScheduler=!0,jA(()=>{this.useMicrotaskScheduler=!1,this.taskService.remove(e)})}ngOnDestroy(){this.subscriptions.unsubscribe(),this.cleanup()}cleanup(){if(this.runningTick=!1,this.cancelScheduledCallback?.(),this.cancelScheduledCallback=null,this.pendingRenderTaskId!==null){let e=this.pendingRenderTaskId;this.pendingRenderTaskId=null,this.taskService.remove(e)}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function Hq(){return typeof $localize<"u"&&$localize.locale||Ay}var d0=new pe("",{providedIn:"root",factory:()=>S(d0,rn.Optional|rn.SkipSelf)||Hq()});var gE=new pe("");function ey(i){return!i.moduleRef}function Gq(i){let t=ey(i)?i.r3Injector:i.moduleRef.injector,e=t.get(Ue);return e.run(()=>{ey(i)?i.r3Injector.resolveInjectorInitializers():i.moduleRef.resolveInjectorInitializers();let n=t.get(io,null),r;if(e.runOutsideAngular(()=>{r=e.onError.subscribe({next:o=>{n.handleError(o)}})}),ey(i)){let o=()=>t.destroy(),s=i.platformInjector.get(gE);s.add(o),t.onDestroy(()=>{r.unsubscribe(),s.delete(o)})}else{let o=()=>i.moduleRef.destroy(),s=i.platformInjector.get(gE);s.add(o),i.moduleRef.onDestroy(()=>{sy(i.allPlatformModules,i.moduleRef),r.unsubscribe(),s.delete(o)})}return X7(n,e,()=>{let o=t.get(Q2);return o.runInitializers(),o.donePromise.then(()=>{let s=t.get(d0,Ay);if(Mq(s||Ay),ey(i)){let a=t.get(zo);return i.rootComponent!==void 0&&a.bootstrap(i.rootComponent),a}else return jq(i.moduleRef,i.allPlatformModules),i.moduleRef})})})}function jq(i,t){let e=i.injector.get(zo);if(i._bootstrapComponents.length>0)i._bootstrapComponents.forEach(n=>e.bootstrap(n));else if(i.instance.ngDoBootstrap)i.instance.ngDoBootstrap(e);else throw new De(-403,!1);t.push(i)}var ay=null;function Wq(i=[],t){return pt.create({name:t,providers:[{provide:Vy,useValue:"platform"},{provide:gE,useValue:new Set([()=>ay=null])},...i]})}function $q(i=[]){if(ay)return ay;let t=Wq(i);return ay=t,$7(),qq(t),t}function qq(i){let t=i.get(WE,null);ms(i,()=>{t?.forEach(e=>e())})}var Re=(()=>{class i{static{this.__NG_ELEMENT_ID__=Yq}}return i})();function Yq(i){return Xq($i(),zt(),(i&16)===16)}function Xq(i,t,e){if(Hy(i)&&!e){let n=Ol(i.index,t);return new Wc(n,n)}else if(i.type&175){let n=t[fo];return new Wc(n,t)}return null}var _E=class{constructor(){}supports(t){return H2(t)}create(t){return new vE(t)}},Qq=(i,t)=>t,vE=class{constructor(t){this.length=0,this._linkedRecords=null,this._unlinkedRecords=null,this._previousItHead=null,this._itHead=null,this._itTail=null,this._additionsHead=null,this._additionsTail=null,this._movesHead=null,this._movesTail=null,this._removalsHead=null,this._removalsTail=null,this._identityChangesHead=null,this._identityChangesTail=null,this._trackByFn=t||Qq}forEachItem(t){let e;for(e=this._itHead;e!==null;e=e._next)t(e)}forEachOperation(t){let e=this._itHead,n=this._removalsHead,r=0,o=null;for(;e||n;){let s=!n||e&&e.currentIndex{s=this._trackByFn(r,a),e===null||!Object.is(e.trackById,s)?(e=this._mismatch(e,a,s,r),n=!0):(n&&(e=this._verifyReinsertion(e,a,s,r)),Object.is(e.item,a)||this._addIdentityChange(e,a)),e=e._next,r++}),this.length=r;return this._truncate(e),this.collection=t,this.isDirty}get isDirty(){return this._additionsHead!==null||this._movesHead!==null||this._removalsHead!==null||this._identityChangesHead!==null}_reset(){if(this.isDirty){let t;for(t=this._previousItHead=this._itHead;t!==null;t=t._next)t._nextPrevious=t._next;for(t=this._additionsHead;t!==null;t=t._nextAdded)t.previousIndex=t.currentIndex;for(this._additionsHead=this._additionsTail=null,t=this._movesHead;t!==null;t=t._nextMoved)t.previousIndex=t.currentIndex;this._movesHead=this._movesTail=null,this._removalsHead=this._removalsTail=null,this._identityChangesHead=this._identityChangesTail=null}}_mismatch(t,e,n,r){let o;return t===null?o=this._itTail:(o=t._prev,this._remove(t)),t=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null),t!==null?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._reinsertAfter(t,o,r)):(t=this._linkedRecords===null?null:this._linkedRecords.get(n,r),t!==null?(Object.is(t.item,e)||this._addIdentityChange(t,e),this._moveAfter(t,o,r)):t=this._addAfter(new yE(e,n),o,r)),t}_verifyReinsertion(t,e,n,r){let o=this._unlinkedRecords===null?null:this._unlinkedRecords.get(n,null);return o!==null?t=this._reinsertAfter(o,t._prev,r):t.currentIndex!=r&&(t.currentIndex=r,this._addToMoves(t,r)),t}_truncate(t){for(;t!==null;){let e=t._next;this._addToRemovals(this._unlink(t)),t=e}this._unlinkedRecords!==null&&this._unlinkedRecords.clear(),this._additionsTail!==null&&(this._additionsTail._nextAdded=null),this._movesTail!==null&&(this._movesTail._nextMoved=null),this._itTail!==null&&(this._itTail._next=null),this._removalsTail!==null&&(this._removalsTail._nextRemoved=null),this._identityChangesTail!==null&&(this._identityChangesTail._nextIdentityChange=null)}_reinsertAfter(t,e,n){this._unlinkedRecords!==null&&this._unlinkedRecords.remove(t);let r=t._prevRemoved,o=t._nextRemoved;return r===null?this._removalsHead=o:r._nextRemoved=o,o===null?this._removalsTail=r:o._prevRemoved=r,this._insertAfter(t,e,n),this._addToMoves(t,n),t}_moveAfter(t,e,n){return this._unlink(t),this._insertAfter(t,e,n),this._addToMoves(t,n),t}_addAfter(t,e,n){return this._insertAfter(t,e,n),this._additionsTail===null?this._additionsTail=this._additionsHead=t:this._additionsTail=this._additionsTail._nextAdded=t,t}_insertAfter(t,e,n){let r=e===null?this._itHead:e._next;return t._next=r,t._prev=e,r===null?this._itTail=t:r._prev=t,e===null?this._itHead=t:e._next=t,this._linkedRecords===null&&(this._linkedRecords=new Ny),this._linkedRecords.put(t),t.currentIndex=n,t}_remove(t){return this._addToRemovals(this._unlink(t))}_unlink(t){this._linkedRecords!==null&&this._linkedRecords.remove(t);let e=t._prev,n=t._next;return e===null?this._itHead=n:e._next=n,n===null?this._itTail=e:n._prev=e,t}_addToMoves(t,e){return t.previousIndex===e||(this._movesTail===null?this._movesTail=this._movesHead=t:this._movesTail=this._movesTail._nextMoved=t),t}_addToRemovals(t){return this._unlinkedRecords===null&&(this._unlinkedRecords=new Ny),this._unlinkedRecords.put(t),t.currentIndex=null,t._nextRemoved=null,this._removalsTail===null?(this._removalsTail=this._removalsHead=t,t._prevRemoved=null):(t._prevRemoved=this._removalsTail,this._removalsTail=this._removalsTail._nextRemoved=t),t}_addIdentityChange(t,e){return t.item=e,this._identityChangesTail===null?this._identityChangesTail=this._identityChangesHead=t:this._identityChangesTail=this._identityChangesTail._nextIdentityChange=t,t}},yE=class{constructor(t,e){this.item=t,this.trackById=e,this.currentIndex=null,this.previousIndex=null,this._nextPrevious=null,this._prev=null,this._next=null,this._prevDup=null,this._nextDup=null,this._prevRemoved=null,this._nextRemoved=null,this._nextAdded=null,this._nextMoved=null,this._nextIdentityChange=null}},bE=class{constructor(){this._head=null,this._tail=null}add(t){this._head===null?(this._head=this._tail=t,t._nextDup=null,t._prevDup=null):(this._tail._nextDup=t,t._prevDup=this._tail,t._nextDup=null,this._tail=t)}get(t,e){let n;for(n=this._head;n!==null;n=n._nextDup)if((e===null||e<=n.currentIndex)&&Object.is(n.trackById,t))return n;return null}remove(t){let e=t._prevDup,n=t._nextDup;return e===null?this._head=n:e._nextDup=n,n===null?this._tail=e:n._prevDup=e,this._head===null}},Ny=class{constructor(){this.map=new Map}put(t){let e=t.trackById,n=this.map.get(e);n||(n=new bE,this.map.set(e,n)),n.add(t)}get(t,e){let n=t,r=this.map.get(n);return r?r.get(t,e):null}remove(t){let e=t.trackById;return this.map.get(e).remove(t)&&this.map.delete(e),t}get isEmpty(){return this.map.size===0}clear(){this.map.clear()}};function fN(i,t,e){let n=i.previousIndex;if(n===null)return n;let r=0;return e&&n{class i{static{this.\u0275prov=J({token:i,providedIn:"root",factory:mN})}constructor(e){this.factories=e}static create(e,n){if(n!=null){let r=n.factories.slice();e=e.concat(r)}return new i(e)}static extend(e){return{provide:i,useFactory:n=>i.create(e,n||mN()),deps:[[i,new ME,new Yf]]}}find(e){let n=this.factories.find(r=>r.supports(e));if(n!=null)return n;throw new De(901,!1)}}return i})();function _L(i){try{let{rootComponent:t,appProviders:e,platformProviders:n}=i,r=$q(n),o=[fL({}),{provide:jc,useExisting:Uq},...e||[]],s=new Iy({providers:o,parent:r,debugName:"",runEnvironmentInitializers:!1});return Gq({r3Injector:s.injector,platformInjector:r,rootComponent:t})}catch(t){return Promise.reject(t)}}function Ye(i){return typeof i=="boolean"?i:i!=null&&i!=="false"}function Jn(i,t=NaN){return!isNaN(parseFloat(i))&&!isNaN(Number(i))?Number(i):t}function Ot(i,t){go("NgSignals");let e=RS(i);return t?.equal&&(e[kr].equal=t.equal),e}function jr(i){let t=dn(null);try{return i()}finally{dn(t)}}var vL=(()=>{class i{constructor(e,n){this.view=e,this.node=n}static{this.__NG_ELEMENT_ID__=Zq}}return i})();function Zq(){return new vL(zt(),$i())}var Kq=!1,Jq=(()=>{class i extends Dy{constructor(){super(...arguments),this.pendingTasks=S(Qc),this.taskId=null}schedule(e){super.schedule(e),this.taskId===null&&(this.taskId=this.pendingTasks.add(),queueMicrotask(()=>this.flush()))}flush(){try{super.flush()}finally{this.taskId!==null&&(this.pendingTasks.remove(this.taskId),this.taskId=null)}}static{this.\u0275prov=J({token:i,providedIn:"root",factory:()=>new i})}}return i})(),xE=class{constructor(t,e,n,r,o,s){this.scheduler=t,this.effectFn=e,this.zone=n,this.injector=o,this.watcher=JR(a=>this.runEffect(a),()=>this.schedule(),s),this.unregisterOnDestroy=r?.onDestroy(()=>this.destroy())}runEffect(t){try{this.effectFn(t)}catch(e){this.injector.get(io,null,{optional:!0})?.handleError(e)}}run(){this.watcher.run()}schedule(){this.scheduler.schedule(this)}destroy(){this.watcher.destroy(),this.unregisterOnDestroy?.()}};function eY(){}function yL(i,t){go("NgSignals"),!t?.injector&&qc(eY);let e=t?.injector??S(pt),n=t?.manualCleanup!==!0?e.get(hi):null,r=new xE(e.get(Jq),i,typeof Zone>"u"?null:Zone.current,n,e,t?.allowSignalWrites??!1),o=e.get(Re,null,{optional:!0});return!o||!(o._lView[Tt]&8)?r.watcher.notify():(o._lView[ny]??=[]).push(r.watcher.notify),r}var tY=Kq;var wE=class{constructor(t){this[kr]=t}destroy(){this[kr].destroy()}};function ct(i,t){if(tY)return yL(i,t);go("NgSignals"),!t?.injector&&qc(ct);let e=t?.injector??S(pt),n=t?.manualCleanup!==!0?e.get(hi):null,r,o=e.get(vL,null,{optional:!0}),s=e.get(jc);return o!==null&&!t?.forceRoot?(r=rY(o.view,s,i),n instanceof yy&&n._lView===o.view&&(n=null)):r=oY(i,e.get(Z2),s),r.injector=e,n!==null&&(r.onDestroyFn=n.onDestroy(()=>r.destroy())),new wE(r)}var bL=at(X({},Oc),{consumerIsAlwaysLive:!0,consumerAllowSignalWrites:!0,dirty:!0,hasRun:!1,cleanupFns:void 0,zone:null,onDestroyFn:Gf,run(){if(this.dirty=!1,this.hasRun&&!Mf(this))return;this.hasRun=!0;let i=n=>(this.cleanupFns??=[]).push(n),t=Iu(this),e=my(!1);try{this.maybeCleanup(),this.fn(i)}finally{my(e),Sf(this,t)}},maybeCleanup(){if(this.cleanupFns?.length)try{for(;this.cleanupFns.length;)this.cleanupFns.pop()()}finally{this.cleanupFns=[]}}}),nY=at(X({},bL),{consumerMarkedDirty(){this.scheduler.schedule(this),this.notifier.notify(13)},destroy(){Tu(this),this.onDestroyFn(),this.maybeCleanup()}}),iY=at(X({},bL),{consumerMarkedDirty(){this.view[Tt]|=8192,Qf(this.view),this.notifier.notify(14)},destroy(){Tu(this),this.onDestroyFn(),this.maybeCleanup(),this.view[Bc]?.delete(this)}});function rY(i,t,e){let n=Object.create(iY);return n.view=i,n.zone=typeof Zone<"u"?Zone.current:null,n.notifier=t,n.fn=e,i[Bc]??=new Set,i[Bc].add(n),n.consumerMarkedDirty(n),n}function oY(i,t,e){let n=Object.create(nY);return n.fn=i,n.scheduler=t,n.notifier=e,n.zone=typeof Zone<"u"?Zone.current:null,n.scheduler.schedule(n),n.notifier.notify(13),n}function u0(i,t){let e=El(i),n=t.elementInjector||zy();return new nh(e).create(n,t.projectableNodes,t.hostElement,t.environmentInjector)}var EL=null;function Pa(){return EL}function IL(i){EL??=i}var h0=class{};var ft=new pe(""),TL=(()=>{class i{historyGo(e){throw new Error("")}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:()=>S(sY),providedIn:"platform"})}}return i})();var sY=(()=>{class i extends TL{constructor(){super(),this._doc=S(ft),this._location=window.location,this._history=window.history}getBaseHrefFromDOM(){return Pa().getBaseHref(this._doc)}onPopState(e){let n=Pa().getGlobalEventTarget(this._doc,"window");return n.addEventListener("popstate",e,!1),()=>n.removeEventListener("popstate",e)}onHashChange(e){let n=Pa().getGlobalEventTarget(this._doc,"window");return n.addEventListener("hashchange",e,!1),()=>n.removeEventListener("hashchange",e)}get href(){return this._location.href}get protocol(){return this._location.protocol}get hostname(){return this._location.hostname}get port(){return this._location.port}get pathname(){return this._location.pathname}get search(){return this._location.search}get hash(){return this._location.hash}set pathname(e){this._location.pathname=e}pushState(e,n,r){this._history.pushState(e,n,r)}replaceState(e,n,r){this._history.replaceState(e,n,r)}forward(){this._history.forward()}back(){this._history.back()}historyGo(e=0){this._history.go(e)}getState(){return this._history.state}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:()=>new i,providedIn:"platform"})}}return i})();function DL(i,t){if(i.length==0)return t;if(t.length==0)return i;let e=0;return i.endsWith("/")&&e++,t.startsWith("/")&&e++,e==2?i+t.substring(1):e==1?i+t:i+"/"+t}function xL(i){let t=i.match(/#|\?|$/),e=t&&t.index||i.length,n=e-(i[e-1]==="/"?1:0);return i.slice(0,n)+i.slice(e)}function td(i){return i&&i[0]!=="?"?"?"+i:i}var m0=(()=>{class i{historyGo(e){throw new Error("")}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:()=>S(OL),providedIn:"root"})}}return i})(),aY=new pe(""),OL=(()=>{class i extends m0{constructor(e,n){super(),this._platformLocation=e,this._removeListenerFns=[],this._baseHref=n??this._platformLocation.getBaseHrefFromDOM()??S(ft).location?.origin??""}ngOnDestroy(){for(;this._removeListenerFns.length;)this._removeListenerFns.pop()()}onPopState(e){this._removeListenerFns.push(this._platformLocation.onPopState(e),this._platformLocation.onHashChange(e))}getBaseHref(){return this._baseHref}prepareExternalUrl(e){return DL(this._baseHref,e)}path(e=!1){let n=this._platformLocation.pathname+td(this._platformLocation.search),r=this._platformLocation.hash;return r&&e?`${n}${r}`:n}pushState(e,n,r,o){let s=this.prepareExternalUrl(r+td(o));this._platformLocation.pushState(e,n,s)}replaceState(e,n,r,o){let s=this.prepareExternalUrl(r+td(o));this._platformLocation.replaceState(e,n,s)}forward(){this._platformLocation.forward()}back(){this._platformLocation.back()}getState(){return this._platformLocation.getState()}historyGo(e=0){this._platformLocation.historyGo?.(e)}static{this.\u0275fac=function(n){return new(n||i)(Le(TL),Le(aY,8))}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var nd=(()=>{class i{constructor(e){this._subject=new ce,this._urlChangeListeners=[],this._urlChangeSubscription=null,this._locationStrategy=e;let n=this._locationStrategy.getBaseHref();this._basePath=dY(xL(wL(n))),this._locationStrategy.onPopState(r=>{this._subject.next({url:this.path(!0),pop:!0,state:r.state,type:r.type})})}ngOnDestroy(){this._urlChangeSubscription?.unsubscribe(),this._urlChangeListeners=[]}path(e=!1){return this.normalize(this._locationStrategy.path(e))}getState(){return this._locationStrategy.getState()}isCurrentPathEqualTo(e,n=""){return this.path()==this.normalize(e+td(n))}normalize(e){return i.stripTrailingSlash(cY(this._basePath,wL(e)))}prepareExternalUrl(e){return e&&e[0]!=="/"&&(e="/"+e),this._locationStrategy.prepareExternalUrl(e)}go(e,n="",r=null){this._locationStrategy.pushState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+td(n)),r)}replaceState(e,n="",r=null){this._locationStrategy.replaceState(r,"",e,n),this._notifyUrlChangeListeners(this.prepareExternalUrl(e+td(n)),r)}forward(){this._locationStrategy.forward()}back(){this._locationStrategy.back()}historyGo(e=0){this._locationStrategy.historyGo?.(e)}onUrlChange(e){return this._urlChangeListeners.push(e),this._urlChangeSubscription??=this.subscribe(n=>{this._notifyUrlChangeListeners(n.url,n.state)}),()=>{let n=this._urlChangeListeners.indexOf(e);this._urlChangeListeners.splice(n,1),this._urlChangeListeners.length===0&&(this._urlChangeSubscription?.unsubscribe(),this._urlChangeSubscription=null)}}_notifyUrlChangeListeners(e="",n){this._urlChangeListeners.forEach(r=>r(e,n))}subscribe(e,n,r){return this._subject.subscribe({next:e,error:n??void 0,complete:r??void 0})}static{this.normalizeQueryParams=td}static{this.joinWithSlash=DL}static{this.stripTrailingSlash=xL}static{this.\u0275fac=function(n){return new(n||i)(Le(m0))}}static{this.\u0275prov=J({token:i,factory:()=>lY(),providedIn:"root"})}}return i})();function lY(){return new nd(Le(m0))}function cY(i,t){if(!i||!t.startsWith(i))return t;let e=t.substring(i.length);return e===""||["/",";","?","#"].includes(e[0])?e:t}function wL(i){return i.replace(/\/index.html$/,"")}function dY(i){if(new RegExp("^(https?:)?//").test(i)){let[,e]=i.split(/\/\/[^\/]+/);return e}return i}function PL(i,t){t=encodeURIComponent(t);for(let e of i.split(";")){let n=e.indexOf("="),[r,o]=n==-1?[e,""]:[e.slice(0,n),e.slice(n+1)];if(r.trim()===t)return decodeURIComponent(o)}return null}var fI=/\s+/,CL=[],g0=(()=>{class i{constructor(e,n){this._ngEl=e,this._renderer=n,this.initialClasses=CL,this.stateMap=new Map}set klass(e){this.initialClasses=e!=null?e.trim().split(fI):CL}set ngClass(e){this.rawClass=typeof e=="string"?e.trim().split(fI):e}ngDoCheck(){for(let n of this.initialClasses)this._updateState(n,!0);let e=this.rawClass;if(Array.isArray(e)||e instanceof Set)for(let n of e)this._updateState(n,!0);else if(e!=null)for(let n of Object.keys(e))this._updateState(n,!!e[n]);this._applyStateDiff()}_updateState(e,n){let r=this.stateMap.get(e);r!==void 0?(r.enabled!==n&&(r.changed=!0,r.enabled=n),r.touched=!0):this.stateMap.set(e,{enabled:n,changed:!0,touched:!0})}_applyStateDiff(){for(let e of this.stateMap){let n=e[0],r=e[1];r.changed?(this._toggleClass(n,r.enabled),r.changed=!1):r.touched||(r.enabled&&this._toggleClass(n,!1),this.stateMap.delete(n)),r.touched=!1}}_toggleClass(e,n){e=e.trim(),e.length>0&&e.split(fI).forEach(r=>{n?this._renderer.addClass(this._ngEl.nativeElement,r):this._renderer.removeClass(this._ngEl.nativeElement,r)})}static{this.\u0275fac=function(n){return new(n||i)(q(Fe),q(Kc))}}static{this.\u0275dir=Ve({type:i,selectors:[["","ngClass",""]],inputs:{klass:[0,"class","klass"],ngClass:"ngClass"},standalone:!0})}}return i})();var mI=class{constructor(t,e,n,r){this.$implicit=t,this.ngForOf=e,this.index=n,this.count=r}get first(){return this.index===0}get last(){return this.index===this.count-1}get even(){return this.index%2===0}get odd(){return!this.even}},Oi=(()=>{class i{set ngForOf(e){this._ngForOf=e,this._ngForOfDirty=!0}set ngForTrackBy(e){this._trackByFn=e}get ngForTrackBy(){return this._trackByFn}constructor(e,n,r){this._viewContainer=e,this._template=n,this._differs=r,this._ngForOf=null,this._ngForOfDirty=!0,this._differ=null}set ngForTemplate(e){e&&(this._template=e)}ngDoCheck(){if(this._ngForOfDirty){this._ngForOfDirty=!1;let e=this._ngForOf;if(!this._differ&&e)if(0)try{}catch{}else this._differ=this._differs.find(e).create(this.ngForTrackBy)}if(this._differ){let e=this._differ.diff(this._ngForOf);e&&this._applyChanges(e)}}_applyChanges(e){let n=this._viewContainer;e.forEachOperation((r,o,s)=>{if(r.previousIndex==null)n.createEmbeddedView(this._template,new mI(r.item,this._ngForOf,-1,-1),s===null?void 0:s);else if(s==null)n.remove(o===null?void 0:o);else if(o!==null){let a=n.get(o);n.move(a,s),SL(a,r)}});for(let r=0,o=n.length;r{let o=n.get(r.currentIndex);SL(o,r)})}static ngTemplateContextGuard(e,n){return!0}static{this.\u0275fac=function(n){return new(n||i)(q(Kt),q(Qn),q(ah))}}static{this.\u0275dir=Ve({type:i,selectors:[["","ngFor","","ngForOf",""]],inputs:{ngForOf:"ngForOf",ngForTrackBy:"ngForTrackBy",ngForTemplate:"ngForTemplate"},standalone:!0})}}return i})();function SL(i,t){i.context.$implicit=t.item}var On=(()=>{class i{constructor(e,n){this._viewContainer=e,this._context=new gI,this._thenTemplateRef=null,this._elseTemplateRef=null,this._thenViewRef=null,this._elseViewRef=null,this._thenTemplateRef=n}set ngIf(e){this._context.$implicit=this._context.ngIf=e,this._updateView()}set ngIfThen(e){ML("ngIfThen",e),this._thenTemplateRef=e,this._thenViewRef=null,this._updateView()}set ngIfElse(e){ML("ngIfElse",e),this._elseTemplateRef=e,this._elseViewRef=null,this._updateView()}_updateView(){this._context.$implicit?this._thenViewRef||(this._viewContainer.clear(),this._elseViewRef=null,this._thenTemplateRef&&(this._thenViewRef=this._viewContainer.createEmbeddedView(this._thenTemplateRef,this._context))):this._elseViewRef||(this._viewContainer.clear(),this._thenViewRef=null,this._elseTemplateRef&&(this._elseViewRef=this._viewContainer.createEmbeddedView(this._elseTemplateRef,this._context)))}static ngTemplateContextGuard(e,n){return!0}static{this.\u0275fac=function(n){return new(n||i)(q(Kt),q(Qn))}}static{this.\u0275dir=Ve({type:i,selectors:[["","ngIf",""]],inputs:{ngIf:"ngIf",ngIfThen:"ngIfThen",ngIfElse:"ngIfElse"},standalone:!0})}}return i})(),gI=class{constructor(){this.$implicit=null,this.ngIf=null}};function ML(i,t){if(!!!(!t||t.createEmbeddedView))throw new Error(`${i} must be a TemplateRef, but received '${Br(t)}'.`)}var _I=class{constructor(t,e){this._viewContainerRef=t,this._templateRef=e,this._created=!1}create(){this._created=!0,this._viewContainerRef.createEmbeddedView(this._templateRef)}destroy(){this._created=!1,this._viewContainerRef.clear()}enforceState(t){t&&!this._created?this.create():!t&&this._created&&this.destroy()}},vI=(()=>{class i{constructor(){this._defaultViews=[],this._defaultUsed=!1,this._caseCount=0,this._lastCaseCheckIndex=0,this._lastCasesMatched=!1}set ngSwitch(e){this._ngSwitch=e,this._caseCount===0&&this._updateDefaultCases(!0)}_addCase(){return this._caseCount++}_addDefault(e){this._defaultViews.push(e)}_matchCase(e){let n=e===this._ngSwitch;return this._lastCasesMatched||=n,this._lastCaseCheckIndex++,this._lastCaseCheckIndex===this._caseCount&&(this._updateDefaultCases(!this._lastCasesMatched),this._lastCaseCheckIndex=0,this._lastCasesMatched=!1),n}_updateDefaultCases(e){if(this._defaultViews.length>0&&e!==this._defaultUsed){this._defaultUsed=e;for(let n of this._defaultViews)n.enforceState(e)}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["","ngSwitch",""]],inputs:{ngSwitch:"ngSwitch"},standalone:!0})}}return i})(),RL=(()=>{class i{constructor(e,n,r){this.ngSwitch=r,r._addCase(),this._view=new _I(e,n)}ngDoCheck(){this._view.enforceState(this.ngSwitch._matchCase(this.ngSwitchCase))}static{this.\u0275fac=function(n){return new(n||i)(q(Kt),q(Qn),q(vI,9))}}static{this.\u0275dir=Ve({type:i,selectors:[["","ngSwitchCase",""]],inputs:{ngSwitchCase:"ngSwitchCase"},standalone:!0})}}return i})();var Gs=(()=>{class i{constructor(e){this._viewContainerRef=e,this._viewRef=null,this.ngTemplateOutletContext=null,this.ngTemplateOutlet=null,this.ngTemplateOutletInjector=null}ngOnChanges(e){if(this._shouldRecreateView(e)){let n=this._viewContainerRef;if(this._viewRef&&n.remove(n.indexOf(this._viewRef)),!this.ngTemplateOutlet){this._viewRef=null;return}let r=this._createContextForwardProxy();this._viewRef=n.createEmbeddedView(this.ngTemplateOutlet,r,{injector:this.ngTemplateOutletInjector??void 0})}}_shouldRecreateView(e){return!!e.ngTemplateOutlet||!!e.ngTemplateOutletInjector}_createContextForwardProxy(){return new Proxy({},{set:(e,n,r)=>this.ngTemplateOutletContext?Reflect.set(this.ngTemplateOutletContext,n,r):!1,get:(e,n,r)=>{if(this.ngTemplateOutletContext)return Reflect.get(this.ngTemplateOutletContext,n,r)}})}static{this.\u0275fac=function(n){return new(n||i)(q(Kt))}}static{this.\u0275dir=Ve({type:i,selectors:[["","ngTemplateOutlet",""]],inputs:{ngTemplateOutletContext:"ngTemplateOutletContext",ngTemplateOutlet:"ngTemplateOutlet",ngTemplateOutletInjector:"ngTemplateOutletInjector"},standalone:!0,features:[un]})}}return i})();var Oe=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({})}}return i})(),yI="browser",uY="server";function AL(i){return i===yI}function bI(i){return i===uY}var p0=class{};var wI=class{};var lh=class i{constructor(t){this.normalizedNames=new Map,this.lazyUpdate=null,t?typeof t=="string"?this.lazyInit=()=>{this.headers=new Map,t.split(` +`).forEach(e=>{let n=e.indexOf(":");if(n>0){let r=e.slice(0,n),o=e.slice(n+1).trim();this.addHeaderEntry(r,o)}})}:typeof Headers<"u"&&t instanceof Headers?(this.headers=new Map,t.forEach((e,n)=>{this.addHeaderEntry(n,e)})):this.lazyInit=()=>{this.headers=new Map,Object.entries(t).forEach(([e,n])=>{this.setHeaderEntries(e,n)})}:this.headers=new Map}has(t){return this.init(),this.headers.has(t.toLowerCase())}get(t){this.init();let e=this.headers.get(t.toLowerCase());return e&&e.length>0?e[0]:null}keys(){return this.init(),Array.from(this.normalizedNames.values())}getAll(t){return this.init(),this.headers.get(t.toLowerCase())||null}append(t,e){return this.clone({name:t,value:e,op:"a"})}set(t,e){return this.clone({name:t,value:e,op:"s"})}delete(t,e){return this.clone({name:t,value:e,op:"d"})}maybeSetNormalizedName(t,e){this.normalizedNames.has(e)||this.normalizedNames.set(e,t)}init(){this.lazyInit&&(this.lazyInit instanceof i?this.copyFrom(this.lazyInit):this.lazyInit(),this.lazyInit=null,this.lazyUpdate&&(this.lazyUpdate.forEach(t=>this.applyUpdate(t)),this.lazyUpdate=null))}copyFrom(t){t.init(),Array.from(t.headers.keys()).forEach(e=>{this.headers.set(e,t.headers.get(e)),this.normalizedNames.set(e,t.normalizedNames.get(e))})}clone(t){let e=new i;return e.lazyInit=this.lazyInit&&this.lazyInit instanceof i?this.lazyInit:this,e.lazyUpdate=(this.lazyUpdate||[]).concat([t]),e}applyUpdate(t){let e=t.name.toLowerCase();switch(t.op){case"a":case"s":let n=t.value;if(typeof n=="string"&&(n=[n]),n.length===0)return;this.maybeSetNormalizedName(t.name,e);let r=(t.op==="a"?this.headers.get(e):void 0)||[];r.push(...n),this.headers.set(e,r);break;case"d":let o=t.value;if(!o)this.headers.delete(e),this.normalizedNames.delete(e);else{let s=this.headers.get(e);if(!s)return;s=s.filter(a=>o.indexOf(a)===-1),s.length===0?(this.headers.delete(e),this.normalizedNames.delete(e)):this.headers.set(e,s)}break}}addHeaderEntry(t,e){let n=t.toLowerCase();this.maybeSetNormalizedName(t,n),this.headers.has(n)?this.headers.get(n).push(e):this.headers.set(n,[e])}setHeaderEntries(t,e){let n=(Array.isArray(e)?e:[e]).map(o=>o.toString()),r=t.toLowerCase();this.headers.set(r,n),this.maybeSetNormalizedName(t,r)}forEach(t){this.init(),Array.from(this.normalizedNames.keys()).forEach(e=>t(this.normalizedNames.get(e),this.headers.get(e)))}};var CI=class{encodeKey(t){return NL(t)}encodeValue(t){return NL(t)}decodeKey(t){return decodeURIComponent(t)}decodeValue(t){return decodeURIComponent(t)}};function hY(i,t){let e=new Map;return i.length>0&&i.replace(/^\?/,"").split("&").forEach(r=>{let o=r.indexOf("="),[s,a]=o==-1?[t.decodeKey(r),""]:[t.decodeKey(r.slice(0,o)),t.decodeValue(r.slice(o+1))],l=e.get(s)||[];l.push(a),e.set(s,l)}),e}var pY=/%(\d[a-f0-9])/gi,fY={40:"@","3A":":",24:"$","2C":",","3B":";","3D":"=","3F":"?","2F":"/"};function NL(i){return encodeURIComponent(i).replace(pY,(t,e)=>fY[e]??t)}function _0(i){return`${i}`}var Rl=class i{constructor(t={}){if(this.updates=null,this.cloneFrom=null,this.encoder=t.encoder||new CI,t.fromString){if(t.fromObject)throw new Error("Cannot specify both fromString and fromObject.");this.map=hY(t.fromString,this.encoder)}else t.fromObject?(this.map=new Map,Object.keys(t.fromObject).forEach(e=>{let n=t.fromObject[e],r=Array.isArray(n)?n.map(_0):[_0(n)];this.map.set(e,r)})):this.map=null}has(t){return this.init(),this.map.has(t)}get(t){this.init();let e=this.map.get(t);return e?e[0]:null}getAll(t){return this.init(),this.map.get(t)||null}keys(){return this.init(),Array.from(this.map.keys())}append(t,e){return this.clone({param:t,value:e,op:"a"})}appendAll(t){let e=[];return Object.keys(t).forEach(n=>{let r=t[n];Array.isArray(r)?r.forEach(o=>{e.push({param:n,value:o,op:"a"})}):e.push({param:n,value:r,op:"a"})}),this.clone(e)}set(t,e){return this.clone({param:t,value:e,op:"s"})}delete(t,e){return this.clone({param:t,value:e,op:"d"})}toString(){return this.init(),this.keys().map(t=>{let e=this.encoder.encodeKey(t);return this.map.get(t).map(n=>e+"="+this.encoder.encodeValue(n)).join("&")}).filter(t=>t!=="").join("&")}clone(t){let e=new i({encoder:this.encoder});return e.cloneFrom=this.cloneFrom||this,e.updates=(this.updates||[]).concat(t),e}init(){this.map===null&&(this.map=new Map),this.cloneFrom!==null&&(this.cloneFrom.init(),this.cloneFrom.keys().forEach(t=>this.map.set(t,this.cloneFrom.map.get(t))),this.updates.forEach(t=>{switch(t.op){case"a":case"s":let e=(t.op==="a"?this.map.get(t.param):void 0)||[];e.push(_0(t.value)),this.map.set(t.param,e);break;case"d":if(t.value!==void 0){let n=this.map.get(t.param)||[],r=n.indexOf(_0(t.value));r!==-1&&n.splice(r,1),n.length>0?this.map.set(t.param,n):this.map.delete(t.param)}else{this.map.delete(t.param);break}}}),this.cloneFrom=this.updates=null)}};var SI=class{constructor(){this.map=new Map}set(t,e){return this.map.set(t,e),this}get(t){return this.map.has(t)||this.map.set(t,t.defaultValue()),this.map.get(t)}delete(t){return this.map.delete(t),this}has(t){return this.map.has(t)}keys(){return this.map.keys()}};function mY(i){switch(i){case"DELETE":case"GET":case"HEAD":case"OPTIONS":case"JSONP":return!1;default:return!0}}function kL(i){return typeof ArrayBuffer<"u"&&i instanceof ArrayBuffer}function LL(i){return typeof Blob<"u"&&i instanceof Blob}function FL(i){return typeof FormData<"u"&&i instanceof FormData}function gY(i){return typeof URLSearchParams<"u"&&i instanceof URLSearchParams}var om=class i{constructor(t,e,n,r){this.url=e,this.body=null,this.reportProgress=!1,this.withCredentials=!1,this.responseType="json",this.method=t.toUpperCase();let o;if(mY(this.method)||r?(this.body=n!==void 0?n:null,o=r):o=n,o&&(this.reportProgress=!!o.reportProgress,this.withCredentials=!!o.withCredentials,o.responseType&&(this.responseType=o.responseType),o.headers&&(this.headers=o.headers),o.context&&(this.context=o.context),o.params&&(this.params=o.params),this.transferCache=o.transferCache),this.headers??=new lh,this.context??=new SI,!this.params)this.params=new Rl,this.urlWithParams=e;else{let s=this.params.toString();if(s.length===0)this.urlWithParams=e;else{let a=e.indexOf("?"),l=a===-1?"?":ah.set(p,t.setHeaders[p]),c)),t.setParams&&(d=Object.keys(t.setParams).reduce((h,p)=>h.set(p,t.setParams[p]),d)),new i(e,n,s,{params:d,headers:c,context:u,reportProgress:l,responseType:r,withCredentials:a,transferCache:o})}},BL=function(i){return i[i.Sent=0]="Sent",i[i.UploadProgress=1]="UploadProgress",i[i.ResponseHeader=2]="ResponseHeader",i[i.DownloadProgress=3]="DownloadProgress",i[i.Response=4]="Response",i[i.User=5]="User",i}(BL||{}),MI=class{constructor(t,e=200,n="OK"){this.headers=t.headers||new lh,this.status=t.status!==void 0?t.status:e,this.statusText=t.statusText||n,this.url=t.url||null,this.ok=this.status>=200&&this.status<300}};var EI=class i extends MI{constructor(t={}){super(t),this.type=BL.Response,this.body=t.body!==void 0?t.body:null}clone(t={}){return new i({body:t.body!==void 0?t.body:this.body,headers:t.headers||this.headers,status:t.status!==void 0?t.status:this.status,statusText:t.statusText||this.statusText,url:t.url||this.url||void 0})}};function xI(i,t){return{body:t,headers:i.headers,context:i.context,observe:i.observe,params:i.params,reportProgress:i.reportProgress,responseType:i.responseType,withCredentials:i.withCredentials,transferCache:i.transferCache}}var VL=(()=>{class i{constructor(e){this.handler=e}request(e,n,r={}){let o;if(e instanceof om)o=e;else{let l;r.headers instanceof lh?l=r.headers:l=new lh(r.headers);let c;r.params&&(r.params instanceof Rl?c=r.params:c=new Rl({fromObject:r.params})),o=new om(e,n,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})}let s=ke(o).pipe(ds(l=>this.handler.handle(l)));if(e instanceof om||r.observe==="events")return s;let a=s.pipe(qt(l=>l instanceof EI));switch(r.observe||"body"){case"body":switch(o.responseType){case"arraybuffer":return a.pipe(We(l=>{if(l.body!==null&&!(l.body instanceof ArrayBuffer))throw new Error("Response is not an ArrayBuffer.");return l.body}));case"blob":return a.pipe(We(l=>{if(l.body!==null&&!(l.body instanceof Blob))throw new Error("Response is not a Blob.");return l.body}));case"text":return a.pipe(We(l=>{if(l.body!==null&&typeof l.body!="string")throw new Error("Response is not a string.");return l.body}));case"json":default:return a.pipe(We(l=>l.body))}case"response":return a;default:throw new Error(`Unreachable: unhandled observe type ${r.observe}}`)}}delete(e,n={}){return this.request("DELETE",e,n)}get(e,n={}){return this.request("GET",e,n)}head(e,n={}){return this.request("HEAD",e,n)}jsonp(e,n){return this.request("JSONP",e,{params:new Rl().append(n,"JSONP_CALLBACK"),observe:"body",responseType:"json"})}options(e,n={}){return this.request("OPTIONS",e,n)}patch(e,n,r={}){return this.request("PATCH",e,xI(r,n))}post(e,n,r={}){return this.request("POST",e,xI(r,n))}put(e,n,r={}){return this.request("PUT",e,xI(r,n))}static{this.\u0275fac=function(n){return new(n||i)(Le(wI))}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac})}}return i})();var TI=class extends h0{constructor(){super(...arguments),this.supportsDOMEvents=!0}},DI=class i extends TI{static makeCurrent(){IL(new i)}onAndCancel(t,e,n){return t.addEventListener(e,n),()=>{t.removeEventListener(e,n)}}dispatchEvent(t,e){t.dispatchEvent(e)}remove(t){t.remove()}createElement(t,e){return e=e||this.getDefaultDocument(),e.createElement(t)}createHtmlDocument(){return document.implementation.createHTMLDocument("fakeTitle")}getDefaultDocument(){return document}isElementNode(t){return t.nodeType===Node.ELEMENT_NODE}isShadowRoot(t){return t instanceof DocumentFragment}getGlobalEventTarget(t,e){return e==="window"?window:e==="document"?t:e==="body"?t.body:null}getBaseHref(t){let e=vY();return e==null?null:yY(e)}resetBaseElement(){sm=null}getUserAgent(){return window.navigator.userAgent}getCookie(t){return PL(document.cookie,t)}},sm=null;function vY(){return sm=sm||document.querySelector("base"),sm?sm.getAttribute("href"):null}function yY(i){return new URL(i,document.baseURI).pathname}var bY=(()=>{class i{build(){return new XMLHttpRequest}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac})}}return i})(),OI=new pe(""),WL=(()=>{class i{constructor(e,n){this._zone=n,this._eventNameToPlugin=new Map,e.forEach(r=>{r.manager=this}),this._plugins=e.slice().reverse()}addEventListener(e,n,r){return this._findPluginFor(n).addEventListener(e,n,r)}getZone(){return this._zone}_findPluginFor(e){let n=this._eventNameToPlugin.get(e);if(n)return n;if(n=this._plugins.find(o=>o.supports(e)),!n)throw new De(5101,!1);return this._eventNameToPlugin.set(e,n),n}static{this.\u0275fac=function(n){return new(n||i)(Le(OI),Le(Ue))}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac})}}return i})(),v0=class{constructor(t){this._doc=t}},PI="ng-app-id";function zL(i){for(let t of i)t.remove()}function UL(i,t){let e=t.createElement("style");return e.textContent=i,e}function xY(i,t,e){let n=i.head?.querySelectorAll(`style[${PI}="${t}"]`);if(n)for(let r of n)r.textContent&&(r.removeAttribute(PI),e.set(r.textContent,{usage:0,elements:[r]}))}function HL(i,t){let e=t.createElement("link");return e.setAttribute("rel","stylesheet"),e.setAttribute("href",i),e}var $L=(()=>{class i{constructor(e,n,r,o={}){this.doc=e,this.appId=n,this.nonce=r,this.inline=new Map,this.external=new Map,this.hosts=new Set,this.isServer=bI(o),xY(e,n,this.inline),this.hosts.add(e.head)}addStyles(e,n){for(let r of e)this.addUsage(r,this.inline,UL);n?.forEach(r=>this.addUsage(r,this.external,HL))}removeStyles(e,n){for(let r of e)this.removeUsage(r,this.inline);n?.forEach(r=>this.removeUsage(r,this.external))}addUsage(e,n,r){let o=n.get(e);o?o.usage++:n.set(e,{usage:1,elements:[...this.hosts].map(s=>this.addElement(s,r(e,this.doc)))})}removeUsage(e,n){let r=n.get(e);r&&(r.usage--,r.usage<=0&&(zL(r.elements),n.delete(e)))}ngOnDestroy(){for(let[,{elements:e}]of[...this.inline,...this.external])zL(e);this.hosts.clear()}addHost(e){this.hosts.add(e);for(let[n,{elements:r}]of this.inline)r.push(this.addElement(e,UL(n,this.doc)));for(let[n,{elements:r}]of this.external)r.push(this.addElement(e,HL(n,this.doc)))}removeHost(e){this.hosts.delete(e)}addElement(e,n){return this.nonce&&n.setAttribute("nonce",this.nonce),this.isServer&&n.setAttribute(PI,this.appId),e.appendChild(n)}static{this.\u0275fac=function(n){return new(n||i)(Le(ft),Le(Zf),Le(Kf,8),Le(Da))}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac})}}return i})(),II={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"},AI=/%COMP%/g,qL="%COMP%",wY=`_nghost-${qL}`,CY=`_ngcontent-${qL}`,SY=!0,MY=new pe("",{providedIn:"root",factory:()=>SY});function EY(i){return CY.replace(AI,i)}function IY(i){return wY.replace(AI,i)}function YL(i,t){return t.map(e=>e.replace(AI,i))}var y0=(()=>{class i{constructor(e,n,r,o,s,a,l,c=null){this.eventManager=e,this.sharedStylesHost=n,this.appId=r,this.removeStylesOnCompDestroy=o,this.doc=s,this.platformId=a,this.ngZone=l,this.nonce=c,this.rendererByCompId=new Map,this.platformIsServer=bI(a),this.defaultRenderer=new am(e,s,l,this.platformIsServer)}createRenderer(e,n){if(!e||!n)return this.defaultRenderer;this.platformIsServer&&n.encapsulation===Bs.ShadowDom&&(n=at(X({},n),{encapsulation:Bs.Emulated}));let r=this.getOrCreateRenderer(e,n);return r instanceof b0?r.applyToHost(e):r instanceof lm&&r.applyStyles(),r}getOrCreateRenderer(e,n){let r=this.rendererByCompId,o=r.get(n.id);if(!o){let s=this.doc,a=this.ngZone,l=this.eventManager,c=this.sharedStylesHost,d=this.removeStylesOnCompDestroy,u=this.platformIsServer;switch(n.encapsulation){case Bs.Emulated:o=new b0(l,c,n,this.appId,d,s,a,u);break;case Bs.ShadowDom:return new RI(l,c,e,n,s,a,this.nonce,u);default:o=new lm(l,c,n,d,s,a,u);break}r.set(n.id,o)}return o}ngOnDestroy(){this.rendererByCompId.clear()}static{this.\u0275fac=function(n){return new(n||i)(Le(WL),Le($L),Le(Zf),Le(MY),Le(ft),Le(Da),Le(Ue),Le(Kf))}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac})}}return i})(),am=class{constructor(t,e,n,r){this.eventManager=t,this.doc=e,this.ngZone=n,this.platformIsServer=r,this.data=Object.create(null),this.throwOnSyntheticProps=!0,this.destroyNode=null}destroy(){}createElement(t,e){return e?this.doc.createElementNS(II[e]||e,t):this.doc.createElement(t)}createComment(t){return this.doc.createComment(t)}createText(t){return this.doc.createTextNode(t)}appendChild(t,e){(GL(t)?t.content:t).appendChild(e)}insertBefore(t,e,n){t&&(GL(t)?t.content:t).insertBefore(e,n)}removeChild(t,e){e.remove()}selectRootElement(t,e){let n=typeof t=="string"?this.doc.querySelector(t):t;if(!n)throw new De(-5104,!1);return e||(n.textContent=""),n}parentNode(t){return t.parentNode}nextSibling(t){return t.nextSibling}setAttribute(t,e,n,r){if(r){e=r+":"+e;let o=II[r];o?t.setAttributeNS(o,e,n):t.setAttribute(e,n)}else t.setAttribute(e,n)}removeAttribute(t,e,n){if(n){let r=II[n];r?t.removeAttributeNS(r,e):t.removeAttribute(`${n}:${e}`)}else t.removeAttribute(e)}addClass(t,e){t.classList.add(e)}removeClass(t,e){t.classList.remove(e)}setStyle(t,e,n,r){r&(Ia.DashCase|Ia.Important)?t.style.setProperty(e,n,r&Ia.Important?"important":""):t.style[e]=n}removeStyle(t,e,n){n&Ia.DashCase?t.style.removeProperty(e):t.style[e]=""}setProperty(t,e,n){t!=null&&(t[e]=n)}setValue(t,e){t.nodeValue=e}listen(t,e,n){if(typeof t=="string"&&(t=Pa().getGlobalEventTarget(this.doc,t),!t))throw new Error(`Unsupported event target ${t} for event ${e}`);return this.eventManager.addEventListener(t,e,this.decoratePreventDefault(n))}decoratePreventDefault(t){return e=>{if(e==="__ngUnwrap__")return t;(this.platformIsServer?this.ngZone.runGuarded(()=>t(e)):t(e))===!1&&e.preventDefault()}}};function GL(i){return i.tagName==="TEMPLATE"&&i.content!==void 0}var RI=class extends am{constructor(t,e,n,r,o,s,a,l){super(t,o,s,l),this.sharedStylesHost=e,this.hostEl=n,this.shadowRoot=n.attachShadow({mode:"open"}),this.sharedStylesHost.addHost(this.shadowRoot);let c=YL(r.id,r.styles);for(let d of c){let u=document.createElement("style");a&&u.setAttribute("nonce",a),u.textContent=d,this.shadowRoot.appendChild(u)}}nodeOrShadowRoot(t){return t===this.hostEl?this.shadowRoot:t}appendChild(t,e){return super.appendChild(this.nodeOrShadowRoot(t),e)}insertBefore(t,e,n){return super.insertBefore(this.nodeOrShadowRoot(t),e,n)}removeChild(t,e){return super.removeChild(null,e)}parentNode(t){return this.nodeOrShadowRoot(super.parentNode(this.nodeOrShadowRoot(t)))}destroy(){this.sharedStylesHost.removeHost(this.shadowRoot)}},lm=class extends am{constructor(t,e,n,r,o,s,a,l){super(t,o,s,a),this.sharedStylesHost=e,this.removeStylesOnCompDestroy=r,this.styles=l?YL(l,n.styles):n.styles,this.styleUrls=n.getExternalStyles?.(l)}applyStyles(){this.sharedStylesHost.addStyles(this.styles,this.styleUrls)}destroy(){this.removeStylesOnCompDestroy&&this.sharedStylesHost.removeStyles(this.styles,this.styleUrls)}},b0=class extends lm{constructor(t,e,n,r,o,s,a,l){let c=r+"-"+n.id;super(t,e,n,o,s,a,l,c),this.contentAttr=EY(c),this.hostAttr=IY(c)}applyToHost(t){this.applyStyles(),this.setAttribute(t,this.hostAttr,"")}createElement(t,e){let n=super.createElement(t,e);return super.setAttribute(n,this.contentAttr,""),n}},TY=(()=>{class i extends v0{constructor(e){super(e)}supports(e){return!0}addEventListener(e,n,r){return e.addEventListener(n,r,!1),()=>this.removeEventListener(e,n,r)}removeEventListener(e,n,r){return e.removeEventListener(n,r)}static{this.\u0275fac=function(n){return new(n||i)(Le(ft))}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac})}}return i})(),jL=["alt","control","meta","shift"],DY={"\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"},OY={alt:i=>i.altKey,control:i=>i.ctrlKey,meta:i=>i.metaKey,shift:i=>i.shiftKey},PY=(()=>{class i extends v0{constructor(e){super(e)}supports(e){return i.parseEventName(e)!=null}addEventListener(e,n,r){let o=i.parseEventName(n),s=i.eventCallback(o.fullKey,r,this.manager.getZone());return this.manager.getZone().runOutsideAngular(()=>Pa().onAndCancel(e,o.domEventName,s))}static parseEventName(e){let n=e.toLowerCase().split("."),r=n.shift();if(n.length===0||!(r==="keydown"||r==="keyup"))return null;let o=i._normalizeKey(n.pop()),s="",a=n.indexOf("code");if(a>-1&&(n.splice(a,1),s="code."),jL.forEach(c=>{let d=n.indexOf(c);d>-1&&(n.splice(d,1),s+=c+".")}),s+=o,n.length!=0||o.length===0)return null;let l={};return l.domEventName=r,l.fullKey=s,l}static matchEventFullKeyCode(e,n){let r=DY[e.key]||e.key,o="";return n.indexOf("code.")>-1&&(r=e.code,o="code."),r==null||!r?!1:(r=r.toLowerCase(),r===" "?r="space":r==="."&&(r="dot"),jL.forEach(s=>{if(s!==r){let a=OY[s];a(e)&&(o+=s+".")}}),o+=r,o===n)}static eventCallback(e,n,r){return o=>{i.matchEventFullKeyCode(o,e)&&r.runGuarded(()=>n(o))}}static _normalizeKey(e){return e==="esc"?"escape":e}static{this.\u0275fac=function(n){return new(n||i)(Le(ft))}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac})}}return i})();function XL(i,t){return _L(X({rootComponent:i},RY(t)))}function RY(i){return{appProviders:[...FY,...i?.providers??[]],platformProviders:LY}}function AY(){DI.makeCurrent()}function NY(){return new io}function kY(){return kk(document),document}var LY=[{provide:Da,useValue:yI},{provide:WE,useValue:AY,multi:!0},{provide:ft,useFactory:kY,deps:[]}];var FY=[{provide:Vy,useValue:"root"},{provide:io,useFactory:NY,deps:[]},{provide:OI,useClass:TY,multi:!0,deps:[ft,Ue,Da]},{provide:OI,useClass:PY,multi:!0,deps:[ft]},y0,$L,WL,{provide:Dl,useExisting:y0},{provide:p0,useClass:bY,deps:[]},[]];var QL=(()=>{class i{constructor(e){this._doc=e}getTitle(){return this._doc.title}setTitle(e){this._doc.title=e||""}static{this.\u0275fac=function(n){return new(n||i)(Le(ft))}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var NI=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:function(n){let r=null;return n?r=new(n||i):r=Le(BY),r},providedIn:"root"})}}return i})(),BY=(()=>{class i extends NI{constructor(e){super(),this._doc=e}sanitize(e,n){if(n==null)return null;switch(e){case Ur.NONE:return n;case Ur.HTML:return Zc(n,"HTML")?Hs(n):qk(this._doc,String(n)).toString();case Ur.STYLE:return Zc(n,"Style")?Hs(n):n;case Ur.SCRIPT:if(Zc(n,"Script"))return Hs(n);throw new De(5200,!1);case Ur.URL:return Zc(n,"URL")?Hs(n):e0(String(n));case Ur.RESOURCE_URL:if(Zc(n,"ResourceURL"))return Hs(n);throw new De(5201,!1);default:throw new De(5202,!1)}}bypassSecurityTrustHtml(e){return Fk(e)}bypassSecurityTrustStyle(e){return Bk(e)}bypassSecurityTrustScript(e){return Vk(e)}bypassSecurityTrustUrl(e){return zk(e)}bypassSecurityTrustResourceUrl(e){return Uk(e)}static{this.\u0275fac=function(n){return new(n||i)(Le(ft))}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Jt="primary",Mm=Symbol("RouteTitle"),VI=class{constructor(t){this.params=t||{}}has(t){return Object.prototype.hasOwnProperty.call(this.params,t)}get(t){if(this.has(t)){let e=this.params[t];return Array.isArray(e)?e[0]:e}return null}getAll(t){if(this.has(t)){let e=this.params[t];return Array.isArray(e)?e:[e]}return[]}get keys(){return Object.keys(this.params)}};function fh(i){return new VI(i)}function VY(i,t,e){let n=e.path.split("/");if(n.length>i.length||e.pathMatch==="full"&&(t.hasChildren()||n.lengthn[o]===r)}else return i===t}function sF(i){return i.length>0?i[i.length-1]:null}function Nl(i){return cs(i)?i:Jc(i)?ti(Promise.resolve(i)):ke(i)}var UY={exact:lF,subset:cF},aF={exact:HY,subset:GY,ignored:()=>!0};function KL(i,t,e){return UY[e.paths](i.root,t.root,e.matrixParams)&&aF[e.queryParams](i.queryParams,t.queryParams)&&!(e.fragment==="exact"&&i.fragment!==t.fragment)}function HY(i,t){return js(i,t)}function lF(i,t,e){if(!rd(i.segments,t.segments)||!C0(i.segments,t.segments,e)||i.numberOfChildren!==t.numberOfChildren)return!1;for(let n in t.children)if(!i.children[n]||!lF(i.children[n],t.children[n],e))return!1;return!0}function GY(i,t){return Object.keys(t).length<=Object.keys(i).length&&Object.keys(t).every(e=>oF(i[e],t[e]))}function cF(i,t,e){return dF(i,t,t.segments,e)}function dF(i,t,e,n){if(i.segments.length>e.length){let r=i.segments.slice(0,e.length);return!(!rd(r,e)||t.hasChildren()||!C0(r,e,n))}else if(i.segments.length===e.length){if(!rd(i.segments,e)||!C0(i.segments,e,n))return!1;for(let r in t.children)if(!i.children[r]||!cF(i.children[r],t.children[r],n))return!1;return!0}else{let r=e.slice(0,i.segments.length),o=e.slice(i.segments.length);return!rd(i.segments,r)||!C0(i.segments,r,n)||!i.children[Jt]?!1:dF(i.children[Jt],t,o,n)}}function C0(i,t,e){return t.every((n,r)=>aF[e](i[r].parameters,n.parameters))}var Aa=class{constructor(t=new Pn([],{}),e={},n=null){this.root=t,this.queryParams=e,this.fragment=n}get queryParamMap(){return this._queryParamMap??=fh(this.queryParams),this._queryParamMap}toString(){return $Y.serialize(this)}},Pn=class{constructor(t,e){this.segments=t,this.children=e,this.parent=null,Object.values(e).forEach(n=>n.parent=this)}hasChildren(){return this.numberOfChildren>0}get numberOfChildren(){return Object.keys(this.children).length}toString(){return S0(this)}},id=class{constructor(t,e){this.path=t,this.parameters=e}get parameterMap(){return this._parameterMap??=fh(this.parameters),this._parameterMap}toString(){return hF(this)}};function jY(i,t){return rd(i,t)&&i.every((e,n)=>js(e.parameters,t[n].parameters))}function rd(i,t){return i.length!==t.length?!1:i.every((e,n)=>e.path===t[n].path)}function WY(i,t){let e=[];return Object.entries(i.children).forEach(([n,r])=>{n===Jt&&(e=e.concat(t(r,n)))}),Object.entries(i.children).forEach(([n,r])=>{n!==Jt&&(e=e.concat(t(r,n)))}),e}var h1=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:()=>new mm,providedIn:"root"})}}return i})(),mm=class{parse(t){let e=new HI(t);return new Aa(e.parseRootSegment(),e.parseQueryParams(),e.parseFragment())}serialize(t){let e=`/${cm(t.root,!0)}`,n=XY(t.queryParams),r=typeof t.fragment=="string"?`#${qY(t.fragment)}`:"";return`${e}${n}${r}`}},$Y=new mm;function S0(i){return i.segments.map(t=>hF(t)).join("/")}function cm(i,t){if(!i.hasChildren())return S0(i);if(t){let e=i.children[Jt]?cm(i.children[Jt],!1):"",n=[];return Object.entries(i.children).forEach(([r,o])=>{r!==Jt&&n.push(`${r}:${cm(o,!1)}`)}),n.length>0?`${e}(${n.join("//")})`:e}else{let e=WY(i,(n,r)=>r===Jt?[cm(i.children[Jt],!1)]:[`${r}:${cm(n,!1)}`]);return Object.keys(i.children).length===1&&i.children[Jt]!=null?`${S0(i)}/${e[0]}`:`${S0(i)}/(${e.join("//")})`}}function uF(i){return encodeURIComponent(i).replace(/%40/g,"@").replace(/%3A/gi,":").replace(/%24/g,"$").replace(/%2C/gi,",")}function x0(i){return uF(i).replace(/%3B/gi,";")}function qY(i){return encodeURI(i)}function UI(i){return uF(i).replace(/\(/g,"%28").replace(/\)/g,"%29").replace(/%26/gi,"&")}function M0(i){return decodeURIComponent(i)}function JL(i){return M0(i.replace(/\+/g,"%20"))}function hF(i){return`${UI(i.path)}${YY(i.parameters)}`}function YY(i){return Object.entries(i).map(([t,e])=>`;${UI(t)}=${UI(e)}`).join("")}function XY(i){let t=Object.entries(i).map(([e,n])=>Array.isArray(n)?n.map(r=>`${x0(e)}=${x0(r)}`).join("&"):`${x0(e)}=${x0(n)}`).filter(e=>e);return t.length?`?${t.join("&")}`:""}var QY=/^[^\/()?;#]+/;function kI(i){let t=i.match(QY);return t?t[0]:""}var ZY=/^[^\/()?;=#]+/;function KY(i){let t=i.match(ZY);return t?t[0]:""}var JY=/^[^=?&#]+/;function eX(i){let t=i.match(JY);return t?t[0]:""}var tX=/^[^&#]+/;function nX(i){let t=i.match(tX);return t?t[0]:""}var HI=class{constructor(t){this.url=t,this.remaining=t}parseRootSegment(){return this.consumeOptional("/"),this.remaining===""||this.peekStartsWith("?")||this.peekStartsWith("#")?new Pn([],{}):new Pn([],this.parseChildren())}parseQueryParams(){let t={};if(this.consumeOptional("?"))do this.parseQueryParam(t);while(this.consumeOptional("&"));return t}parseFragment(){return this.consumeOptional("#")?decodeURIComponent(this.remaining):null}parseChildren(){if(this.remaining==="")return{};this.consumeOptional("/");let t=[];for(this.peekStartsWith("(")||t.push(this.parseSegment());this.peekStartsWith("/")&&!this.peekStartsWith("//")&&!this.peekStartsWith("/(");)this.capture("/"),t.push(this.parseSegment());let e={};this.peekStartsWith("/(")&&(this.capture("/"),e=this.parseParens(!0));let n={};return this.peekStartsWith("(")&&(n=this.parseParens(!1)),(t.length>0||Object.keys(e).length>0)&&(n[Jt]=new Pn(t,e)),n}parseSegment(){let t=kI(this.remaining);if(t===""&&this.peekStartsWith(";"))throw new De(4009,!1);return this.capture(t),new id(M0(t),this.parseMatrixParams())}parseMatrixParams(){let t={};for(;this.consumeOptional(";");)this.parseParam(t);return t}parseParam(t){let e=KY(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){let r=kI(this.remaining);r&&(n=r,this.capture(n))}t[M0(e)]=M0(n)}parseQueryParam(t){let e=eX(this.remaining);if(!e)return;this.capture(e);let n="";if(this.consumeOptional("=")){let s=nX(this.remaining);s&&(n=s,this.capture(n))}let r=JL(e),o=JL(n);if(t.hasOwnProperty(r)){let s=t[r];Array.isArray(s)||(s=[s],t[r]=s),s.push(o)}else t[r]=o}parseParens(t){let e={};for(this.capture("(");!this.consumeOptional(")")&&this.remaining.length>0;){let n=kI(this.remaining),r=this.remaining[n.length];if(r!=="/"&&r!==")"&&r!==";")throw new De(4010,!1);let o;n.indexOf(":")>-1?(o=n.slice(0,n.indexOf(":")),this.capture(o),this.capture(":")):t&&(o=Jt);let s=this.parseChildren();e[o]=Object.keys(s).length===1?s[Jt]:new Pn([],s),this.consumeOptional("//")}return e}peekStartsWith(t){return this.remaining.startsWith(t)}consumeOptional(t){return this.peekStartsWith(t)?(this.remaining=this.remaining.substring(t.length),!0):!1}capture(t){if(!this.consumeOptional(t))throw new De(4011,!1)}};function pF(i){return i.segments.length>0?new Pn([],{[Jt]:i}):i}function fF(i){let t={};for(let[n,r]of Object.entries(i.children)){let o=fF(r);if(n===Jt&&o.segments.length===0&&o.hasChildren())for(let[s,a]of Object.entries(o.children))t[s]=a;else(o.segments.length>0||o.hasChildren())&&(t[n]=o)}let e=new Pn(i.segments,t);return iX(e)}function iX(i){if(i.numberOfChildren===1&&i.children[Jt]){let t=i.children[Jt];return new Pn(i.segments.concat(t.segments),t.children)}return i}function gm(i){return i instanceof Aa}function rX(i,t,e=null,n=null){let r=mF(i);return gF(r,t,e,n)}function mF(i){let t;function e(o){let s={};for(let l of o.children){let c=e(l);s[l.outlet]=c}let a=new Pn(o.url,s);return o===i&&(t=a),a}let n=e(i.root),r=pF(n);return t??r}function gF(i,t,e,n){let r=i;for(;r.parent;)r=r.parent;if(t.length===0)return LI(r,r,r,e,n);let o=oX(t);if(o.toRoot())return LI(r,r,new Pn([],{}),e,n);let s=sX(o,r,i),a=s.processChildren?hm(s.segmentGroup,s.index,o.commands):vF(s.segmentGroup,s.index,o.commands);return LI(r,s.segmentGroup,a,e,n)}function E0(i){return typeof i=="object"&&i!=null&&!i.outlets&&!i.segmentPath}function _m(i){return typeof i=="object"&&i!=null&&i.outlets}function LI(i,t,e,n,r){let o={};n&&Object.entries(n).forEach(([l,c])=>{o[l]=Array.isArray(c)?c.map(d=>`${d}`):`${c}`});let s;i===t?s=e:s=_F(i,t,e);let a=pF(fF(s));return new Aa(a,o,r)}function _F(i,t,e){let n={};return Object.entries(i.children).forEach(([r,o])=>{o===t?n[r]=e:n[r]=_F(o,t,e)}),new Pn(i.segments,n)}var I0=class{constructor(t,e,n){if(this.isAbsolute=t,this.numberOfDoubleDots=e,this.commands=n,t&&n.length>0&&E0(n[0]))throw new De(4003,!1);let r=n.find(_m);if(r&&r!==sF(n))throw new De(4004,!1)}toRoot(){return this.isAbsolute&&this.commands.length===1&&this.commands[0]=="/"}};function oX(i){if(typeof i[0]=="string"&&i.length===1&&i[0]==="/")return new I0(!0,0,i);let t=0,e=!1,n=i.reduce((r,o,s)=>{if(typeof o=="object"&&o!=null){if(o.outlets){let a={};return Object.entries(o.outlets).forEach(([l,c])=>{a[l]=typeof c=="string"?c.split("/"):c}),[...r,{outlets:a}]}if(o.segmentPath)return[...r,o.segmentPath]}return typeof o!="string"?[...r,o]:s===0?(o.split("/").forEach((a,l)=>{l==0&&a==="."||(l==0&&a===""?e=!0:a===".."?t++:a!=""&&r.push(a))}),r):[...r,o]},[]);return new I0(e,t,n)}var uh=class{constructor(t,e,n){this.segmentGroup=t,this.processChildren=e,this.index=n}};function sX(i,t,e){if(i.isAbsolute)return new uh(t,!0,0);if(!e)return new uh(t,!1,NaN);if(e.parent===null)return new uh(e,!0,0);let n=E0(i.commands[0])?0:1,r=e.segments.length-1+n;return aX(e,r,i.numberOfDoubleDots)}function aX(i,t,e){let n=i,r=t,o=e;for(;o>r;){if(o-=r,n=n.parent,!n)throw new De(4005,!1);r=n.segments.length}return new uh(n,!1,r-o)}function lX(i){return _m(i[0])?i[0].outlets:{[Jt]:i}}function vF(i,t,e){if(i??=new Pn([],{}),i.segments.length===0&&i.hasChildren())return hm(i,t,e);let n=cX(i,t,e),r=e.slice(n.commandIndex);if(n.match&&n.pathIndexo!==Jt)&&i.children[Jt]&&i.numberOfChildren===1&&i.children[Jt].segments.length===0){let o=hm(i.children[Jt],t,e);return new Pn(i.segments,o.children)}return Object.entries(n).forEach(([o,s])=>{typeof s=="string"&&(s=[s]),s!==null&&(r[o]=vF(i.children[o],t,s))}),Object.entries(i.children).forEach(([o,s])=>{n[o]===void 0&&(r[o]=s)}),new Pn(i.segments,r)}}function cX(i,t,e){let n=0,r=t,o={match:!1,pathIndex:0,commandIndex:0};for(;r=e.length)return o;let s=i.segments[r],a=e[n];if(_m(a))break;let l=`${a}`,c=n0&&l===void 0)break;if(l&&c&&typeof c=="object"&&c.outlets===void 0){if(!tF(l,c,s))return o;n+=2}else{if(!tF(l,{},s))return o;n++}r++}return{match:!0,pathIndex:r,commandIndex:n}}function GI(i,t,e){let n=i.segments.slice(0,t),r=0;for(;r{typeof n=="string"&&(n=[n]),n!==null&&(t[e]=GI(new Pn([],{}),0,n))}),t}function eF(i){let t={};return Object.entries(i).forEach(([e,n])=>t[e]=`${n}`),t}function tF(i,t,e){return i==e.path&&js(t,e.parameters)}var pm="imperative",rr=function(i){return i[i.NavigationStart=0]="NavigationStart",i[i.NavigationEnd=1]="NavigationEnd",i[i.NavigationCancel=2]="NavigationCancel",i[i.NavigationError=3]="NavigationError",i[i.RoutesRecognized=4]="RoutesRecognized",i[i.ResolveStart=5]="ResolveStart",i[i.ResolveEnd=6]="ResolveEnd",i[i.GuardsCheckStart=7]="GuardsCheckStart",i[i.GuardsCheckEnd=8]="GuardsCheckEnd",i[i.RouteConfigLoadStart=9]="RouteConfigLoadStart",i[i.RouteConfigLoadEnd=10]="RouteConfigLoadEnd",i[i.ChildActivationStart=11]="ChildActivationStart",i[i.ChildActivationEnd=12]="ChildActivationEnd",i[i.ActivationStart=13]="ActivationStart",i[i.ActivationEnd=14]="ActivationEnd",i[i.Scroll=15]="Scroll",i[i.NavigationSkipped=16]="NavigationSkipped",i}(rr||{}),Uo=class{constructor(t,e){this.id=t,this.url=e}},vm=class extends Uo{constructor(t,e,n="imperative",r=null){super(t,e),this.type=rr.NavigationStart,this.navigationTrigger=n,this.restoredState=r}toString(){return`NavigationStart(id: ${this.id}, url: '${this.url}')`}},od=class extends Uo{constructor(t,e,n){super(t,e),this.urlAfterRedirects=n,this.type=rr.NavigationEnd}toString(){return`NavigationEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}')`}},bo=function(i){return i[i.Redirect=0]="Redirect",i[i.SupersededByNewNavigation=1]="SupersededByNewNavigation",i[i.NoDataFromResolver=2]="NoDataFromResolver",i[i.GuardRejected=3]="GuardRejected",i}(bo||{}),jI=function(i){return i[i.IgnoredSameUrlNavigation=0]="IgnoredSameUrlNavigation",i[i.IgnoredByUrlHandlingStrategy=1]="IgnoredByUrlHandlingStrategy",i}(jI||{}),Ra=class extends Uo{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=rr.NavigationCancel}toString(){return`NavigationCancel(id: ${this.id}, url: '${this.url}')`}},sd=class extends Uo{constructor(t,e,n,r){super(t,e),this.reason=n,this.code=r,this.type=rr.NavigationSkipped}},ym=class extends Uo{constructor(t,e,n,r){super(t,e),this.error=n,this.target=r,this.type=rr.NavigationError}toString(){return`NavigationError(id: ${this.id}, url: '${this.url}', error: ${this.error})`}},T0=class extends Uo{constructor(t,e,n,r){super(t,e),this.urlAfterRedirects=n,this.state=r,this.type=rr.RoutesRecognized}toString(){return`RoutesRecognized(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},WI=class extends Uo{constructor(t,e,n,r){super(t,e),this.urlAfterRedirects=n,this.state=r,this.type=rr.GuardsCheckStart}toString(){return`GuardsCheckStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},$I=class extends Uo{constructor(t,e,n,r,o){super(t,e),this.urlAfterRedirects=n,this.state=r,this.shouldActivate=o,this.type=rr.GuardsCheckEnd}toString(){return`GuardsCheckEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state}, shouldActivate: ${this.shouldActivate})`}},qI=class extends Uo{constructor(t,e,n,r){super(t,e),this.urlAfterRedirects=n,this.state=r,this.type=rr.ResolveStart}toString(){return`ResolveStart(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},YI=class extends Uo{constructor(t,e,n,r){super(t,e),this.urlAfterRedirects=n,this.state=r,this.type=rr.ResolveEnd}toString(){return`ResolveEnd(id: ${this.id}, url: '${this.url}', urlAfterRedirects: '${this.urlAfterRedirects}', state: ${this.state})`}},XI=class{constructor(t){this.route=t,this.type=rr.RouteConfigLoadStart}toString(){return`RouteConfigLoadStart(path: ${this.route.path})`}},QI=class{constructor(t){this.route=t,this.type=rr.RouteConfigLoadEnd}toString(){return`RouteConfigLoadEnd(path: ${this.route.path})`}},ZI=class{constructor(t){this.snapshot=t,this.type=rr.ChildActivationStart}toString(){return`ChildActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},KI=class{constructor(t){this.snapshot=t,this.type=rr.ChildActivationEnd}toString(){return`ChildActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},JI=class{constructor(t){this.snapshot=t,this.type=rr.ActivationStart}toString(){return`ActivationStart(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}},e1=class{constructor(t){this.snapshot=t,this.type=rr.ActivationEnd}toString(){return`ActivationEnd(path: '${this.snapshot.routeConfig&&this.snapshot.routeConfig.path||""}')`}};var bm=class{},mh=class{constructor(t,e){this.url=t,this.navigationBehaviorOptions=e}};function uX(i,t){return i.providers&&!i._injector&&(i._injector=cI(i.providers,t,`Route: ${i.path}`)),i._injector??t}function gs(i){return i.outlet||Jt}function hX(i,t){let e=i.filter(n=>gs(n)===t);return e.push(...i.filter(n=>gs(n)!==t)),e}function Em(i){if(!i)return null;if(i.routeConfig?._injector)return i.routeConfig._injector;for(let t=i.parent;t;t=t.parent){let e=t.routeConfig;if(e?._loadedInjector)return e._loadedInjector;if(e?._injector)return e._injector}return null}var t1=class{get injector(){return Em(this.route?.snapshot)??this.rootInjector}set injector(t){}constructor(t){this.rootInjector=t,this.outlet=null,this.route=null,this.children=new k0(this.rootInjector),this.attachRef=null}},k0=(()=>{class i{constructor(e){this.rootInjector=e,this.contexts=new Map}onChildOutletCreated(e,n){let r=this.getOrCreateContext(e);r.outlet=n,this.contexts.set(e,r)}onChildOutletDestroyed(e){let n=this.getContext(e);n&&(n.outlet=null,n.attachRef=null)}onOutletDeactivated(){let e=this.contexts;return this.contexts=new Map,e}onOutletReAttached(e){this.contexts=e}getOrCreateContext(e){let n=this.getContext(e);return n||(n=new t1(this.rootInjector),this.contexts.set(e,n)),n}getContext(e){return this.contexts.get(e)||null}static{this.\u0275fac=function(n){return new(n||i)(Le(tr))}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),D0=class{constructor(t){this._root=t}get root(){return this._root.value}parent(t){let e=this.pathFromRoot(t);return e.length>1?e[e.length-2]:null}children(t){let e=n1(t,this._root);return e?e.children.map(n=>n.value):[]}firstChild(t){let e=n1(t,this._root);return e&&e.children.length>0?e.children[0].value:null}siblings(t){let e=i1(t,this._root);return e.length<2?[]:e[e.length-2].children.map(r=>r.value).filter(r=>r!==t)}pathFromRoot(t){return i1(t,this._root).map(e=>e.value)}};function n1(i,t){if(i===t.value)return t;for(let e of t.children){let n=n1(i,e);if(n)return n}return null}function i1(i,t){if(i===t.value)return[t];for(let e of t.children){let n=i1(i,e);if(n.length)return n.unshift(t),n}return[]}var yo=class{constructor(t,e){this.value=t,this.children=e}toString(){return`TreeNode(${this.value})`}};function dh(i){let t={};return i&&i.children.forEach(e=>t[e.value.outlet]=e),t}var O0=class extends D0{constructor(t,e){super(t),this.snapshot=e,p1(this,t)}toString(){return this.snapshot.toString()}};function yF(i){let t=pX(i),e=new yn([new id("",{})]),n=new yn({}),r=new yn({}),o=new yn({}),s=new yn(""),a=new Al(e,n,o,s,r,Jt,i,t.root);return a.snapshot=t.root,new O0(new yo(a,[]),t)}function pX(i){let t={},e={},n={},r="",o=new hh([],t,n,r,e,Jt,i,null,{});return new R0("",new yo(o,[]))}var Al=class{constructor(t,e,n,r,o,s,a,l){this.urlSubject=t,this.paramsSubject=e,this.queryParamsSubject=n,this.fragmentSubject=r,this.dataSubject=o,this.outlet=s,this.component=a,this._futureSnapshot=l,this.title=this.dataSubject?.pipe(We(c=>c[Mm]))??ke(void 0),this.url=t,this.params=e,this.queryParams=n,this.fragment=r,this.data=o}get routeConfig(){return this._futureSnapshot.routeConfig}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=this.params.pipe(We(t=>fh(t))),this._paramMap}get queryParamMap(){return this._queryParamMap??=this.queryParams.pipe(We(t=>fh(t))),this._queryParamMap}toString(){return this.snapshot?this.snapshot.toString():`Future(${this._futureSnapshot})`}};function P0(i,t,e="emptyOnly"){let n,{routeConfig:r}=i;return t!==null&&(e==="always"||r?.path===""||!t.component&&!t.routeConfig?.loadComponent)?n={params:X(X({},t.params),i.params),data:X(X({},t.data),i.data),resolve:X(X(X(X({},i.data),t.data),r?.data),i._resolvedData)}:n={params:X({},i.params),data:X({},i.data),resolve:X(X({},i.data),i._resolvedData??{})},r&&xF(r)&&(n.resolve[Mm]=r.title),n}var hh=class{get title(){return this.data?.[Mm]}constructor(t,e,n,r,o,s,a,l,c){this.url=t,this.params=e,this.queryParams=n,this.fragment=r,this.data=o,this.outlet=s,this.component=a,this.routeConfig=l,this._resolve=c}get root(){return this._routerState.root}get parent(){return this._routerState.parent(this)}get firstChild(){return this._routerState.firstChild(this)}get children(){return this._routerState.children(this)}get pathFromRoot(){return this._routerState.pathFromRoot(this)}get paramMap(){return this._paramMap??=fh(this.params),this._paramMap}get queryParamMap(){return this._queryParamMap??=fh(this.queryParams),this._queryParamMap}toString(){let t=this.url.map(n=>n.toString()).join("/"),e=this.routeConfig?this.routeConfig.path:"";return`Route(url:'${t}', path:'${e}')`}},R0=class extends D0{constructor(t,e){super(e),this.url=t,p1(this,e)}toString(){return bF(this._root)}};function p1(i,t){t.value._routerState=i,t.children.forEach(e=>p1(i,e))}function bF(i){let t=i.children.length>0?` { ${i.children.map(bF).join(", ")} } `:"";return`${i.value}${t}`}function FI(i){if(i.snapshot){let t=i.snapshot,e=i._futureSnapshot;i.snapshot=e,js(t.queryParams,e.queryParams)||i.queryParamsSubject.next(e.queryParams),t.fragment!==e.fragment&&i.fragmentSubject.next(e.fragment),js(t.params,e.params)||i.paramsSubject.next(e.params),zY(t.url,e.url)||i.urlSubject.next(e.url),js(t.data,e.data)||i.dataSubject.next(e.data)}else i.snapshot=i._futureSnapshot,i.dataSubject.next(i._futureSnapshot.data)}function r1(i,t){let e=js(i.params,t.params)&&jY(i.url,t.url),n=!i.parent!=!t.parent;return e&&!n&&(!i.parent||r1(i.parent,t.parent))}function xF(i){return typeof i.title=="string"||i.title===null}var fX=new pe(""),f1=(()=>{class i{constructor(){this.activated=null,this._activatedRoute=null,this.name=Jt,this.activateEvents=new Ie,this.deactivateEvents=new Ie,this.attachEvents=new Ie,this.detachEvents=new Ie,this.routerOutletData=Tk(void 0),this.parentContexts=S(k0),this.location=S(Kt),this.changeDetector=S(Re),this.inputBinder=S(m1,{optional:!0}),this.supportsBindingToComponentInputs=!0}get activatedComponentRef(){return this.activated}ngOnChanges(e){if(e.name){let{firstChange:n,previousValue:r}=e.name;if(n)return;this.isTrackedInParentContexts(r)&&(this.deactivate(),this.parentContexts.onChildOutletDestroyed(r)),this.initializeOutletWithName()}}ngOnDestroy(){this.isTrackedInParentContexts(this.name)&&this.parentContexts.onChildOutletDestroyed(this.name),this.inputBinder?.unsubscribeFromRouteData(this)}isTrackedInParentContexts(e){return this.parentContexts.getContext(e)?.outlet===this}ngOnInit(){this.initializeOutletWithName()}initializeOutletWithName(){if(this.parentContexts.onChildOutletCreated(this.name,this),this.activated)return;let e=this.parentContexts.getContext(this.name);e?.route&&(e.attachRef?this.attach(e.attachRef,e.route):this.activateWith(e.route,e.injector))}get isActivated(){return!!this.activated}get component(){if(!this.activated)throw new De(4012,!1);return this.activated.instance}get activatedRoute(){if(!this.activated)throw new De(4012,!1);return this._activatedRoute}get activatedRouteData(){return this._activatedRoute?this._activatedRoute.snapshot.data:{}}detach(){if(!this.activated)throw new De(4012,!1);this.location.detach();let e=this.activated;return this.activated=null,this._activatedRoute=null,this.detachEvents.emit(e.instance),e}attach(e,n){this.activated=e,this._activatedRoute=n,this.location.insert(e.hostView),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.attachEvents.emit(e.instance)}deactivate(){if(this.activated){let e=this.component;this.activated.destroy(),this.activated=null,this._activatedRoute=null,this.deactivateEvents.emit(e)}}activateWith(e,n){if(this.isActivated)throw new De(4013,!1);this._activatedRoute=e;let r=this.location,s=e.snapshot.component,a=this.parentContexts.getOrCreateContext(this.name).children,l=new o1(e,a,r.injector,this.routerOutletData);this.activated=r.createComponent(s,{index:r.length,injector:l,environmentInjector:n}),this.changeDetector.markForCheck(),this.inputBinder?.bindActivatedRouteToOutletComponent(this),this.activateEvents.emit(this.activated.instance)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["router-outlet"]],inputs:{name:"name",routerOutletData:[1,"routerOutletData"]},outputs:{activateEvents:"activate",deactivateEvents:"deactivate",attachEvents:"attach",detachEvents:"detach"},exportAs:["outlet"],standalone:!0,features:[un]})}}return i})(),o1=class i{__ngOutletInjector(t){return new i(this.route,this.childContexts,t,this.outletData)}constructor(t,e,n,r){this.route=t,this.childContexts=e,this.parent=n,this.outletData=r}get(t,e){return t===Al?this.route:t===k0?this.childContexts:t===fX?this.outletData:this.parent.get(t,e)}},m1=new pe("");function mX(i,t,e){let n=xm(i,t._root,e?e._root:void 0);return new O0(n,t)}function xm(i,t,e){if(e&&i.shouldReuseRoute(t.value,e.value.snapshot)){let n=e.value;n._futureSnapshot=t.value;let r=gX(i,t,e);return new yo(n,r)}else{if(i.shouldAttach(t.value)){let o=i.retrieve(t.value);if(o!==null){let s=o.route;return s.value._futureSnapshot=t.value,s.children=t.children.map(a=>xm(i,a)),s}}let n=_X(t.value),r=t.children.map(o=>xm(i,o));return new yo(n,r)}}function gX(i,t,e){return t.children.map(n=>{for(let r of e.children)if(i.shouldReuseRoute(n.value,r.value.snapshot))return xm(i,n,r);return xm(i,n)})}function _X(i){return new Al(new yn(i.url),new yn(i.params),new yn(i.queryParams),new yn(i.fragment),new yn(i.data),i.outlet,i.component,i)}var wm=class{constructor(t,e){this.redirectTo=t,this.navigationBehaviorOptions=e}},wF="ngNavigationCancelingError";function A0(i,t){let{redirectTo:e,navigationBehaviorOptions:n}=gm(t)?{redirectTo:t,navigationBehaviorOptions:void 0}:t,r=CF(!1,bo.Redirect);return r.url=e,r.navigationBehaviorOptions=n,r}function CF(i,t){let e=new Error(`NavigationCancelingError: ${i||""}`);return e[wF]=!0,e.cancellationCode=t,e}function vX(i){return SF(i)&&gm(i.url)}function SF(i){return!!i&&i[wF]}var yX=(i,t,e,n)=>We(r=>(new s1(t,r.targetRouterState,r.currentRouterState,e,n).activate(i),r)),s1=class{constructor(t,e,n,r,o){this.routeReuseStrategy=t,this.futureState=e,this.currState=n,this.forwardEvent=r,this.inputBindingEnabled=o}activate(t){let e=this.futureState._root,n=this.currState?this.currState._root:null;this.deactivateChildRoutes(e,n,t),FI(this.futureState.root),this.activateChildRoutes(e,n,t)}deactivateChildRoutes(t,e,n){let r=dh(e);t.children.forEach(o=>{let s=o.value.outlet;this.deactivateRoutes(o,r[s],n),delete r[s]}),Object.values(r).forEach(o=>{this.deactivateRouteAndItsChildren(o,n)})}deactivateRoutes(t,e,n){let r=t.value,o=e?e.value:null;if(r===o)if(r.component){let s=n.getContext(r.outlet);s&&this.deactivateChildRoutes(t,e,s.children)}else this.deactivateChildRoutes(t,e,n);else o&&this.deactivateRouteAndItsChildren(e,n)}deactivateRouteAndItsChildren(t,e){t.value.component&&this.routeReuseStrategy.shouldDetach(t.value.snapshot)?this.detachAndStoreRouteSubtree(t,e):this.deactivateRouteAndOutlet(t,e)}detachAndStoreRouteSubtree(t,e){let n=e.getContext(t.value.outlet),r=n&&t.value.component?n.children:e,o=dh(t);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);if(n&&n.outlet){let s=n.outlet.detach(),a=n.children.onOutletDeactivated();this.routeReuseStrategy.store(t.value.snapshot,{componentRef:s,route:t,contexts:a})}}deactivateRouteAndOutlet(t,e){let n=e.getContext(t.value.outlet),r=n&&t.value.component?n.children:e,o=dh(t);for(let s of Object.values(o))this.deactivateRouteAndItsChildren(s,r);n&&(n.outlet&&(n.outlet.deactivate(),n.children.onOutletDeactivated()),n.attachRef=null,n.route=null)}activateChildRoutes(t,e,n){let r=dh(e);t.children.forEach(o=>{this.activateRoutes(o,r[o.value.outlet],n),this.forwardEvent(new e1(o.value.snapshot))}),t.children.length&&this.forwardEvent(new KI(t.value.snapshot))}activateRoutes(t,e,n){let r=t.value,o=e?e.value:null;if(FI(r),r===o)if(r.component){let s=n.getOrCreateContext(r.outlet);this.activateChildRoutes(t,e,s.children)}else this.activateChildRoutes(t,e,n);else if(r.component){let s=n.getOrCreateContext(r.outlet);if(this.routeReuseStrategy.shouldAttach(r.snapshot)){let a=this.routeReuseStrategy.retrieve(r.snapshot);this.routeReuseStrategy.store(r.snapshot,null),s.children.onOutletReAttached(a.contexts),s.attachRef=a.componentRef,s.route=a.route.value,s.outlet&&s.outlet.attach(a.componentRef,a.route.value),FI(a.route.value),this.activateChildRoutes(t,null,s.children)}else s.attachRef=null,s.route=r,s.outlet&&s.outlet.activateWith(r,s.injector),this.activateChildRoutes(t,null,s.children)}else this.activateChildRoutes(t,null,n)}},N0=class{constructor(t){this.path=t,this.route=this.path[this.path.length-1]}},ph=class{constructor(t,e){this.component=t,this.route=e}};function bX(i,t,e){let n=i._root,r=t?t._root:null;return dm(n,r,e,[n.value])}function xX(i){let t=i.routeConfig?i.routeConfig.canActivateChild:null;return!t||t.length===0?null:{node:i,guards:t}}function _h(i,t){let e=Symbol(),n=t.get(i,e);return n===e?typeof i=="function"&&!xN(i)?i:t.get(i):n}function dm(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=dh(t);return i.children.forEach(s=>{wX(s,o[s.value.outlet],e,n.concat([s.value]),r),delete o[s.value.outlet]}),Object.entries(o).forEach(([s,a])=>fm(a,e.getContext(s),r)),r}function wX(i,t,e,n,r={canDeactivateChecks:[],canActivateChecks:[]}){let o=i.value,s=t?t.value:null,a=e?e.getContext(i.value.outlet):null;if(s&&o.routeConfig===s.routeConfig){let l=CX(s,o,o.routeConfig.runGuardsAndResolvers);l?r.canActivateChecks.push(new N0(n)):(o.data=s.data,o._resolvedData=s._resolvedData),o.component?dm(i,t,a?a.children:null,n,r):dm(i,t,e,n,r),l&&a&&a.outlet&&a.outlet.isActivated&&r.canDeactivateChecks.push(new ph(a.outlet.component,s))}else s&&fm(t,a,r),r.canActivateChecks.push(new N0(n)),o.component?dm(i,null,a?a.children:null,n,r):dm(i,null,e,n,r);return r}function CX(i,t,e){if(typeof e=="function")return e(i,t);switch(e){case"pathParamsChange":return!rd(i.url,t.url);case"pathParamsOrQueryParamsChange":return!rd(i.url,t.url)||!js(i.queryParams,t.queryParams);case"always":return!0;case"paramsOrQueryParamsChange":return!r1(i,t)||!js(i.queryParams,t.queryParams);case"paramsChange":default:return!r1(i,t)}}function fm(i,t,e){let n=dh(i),r=i.value;Object.entries(n).forEach(([o,s])=>{r.component?t?fm(s,t.children.getContext(o),e):fm(s,null,e):fm(s,t,e)}),r.component?t&&t.outlet&&t.outlet.isActivated?e.canDeactivateChecks.push(new ph(t.outlet.component,r)):e.canDeactivateChecks.push(new ph(null,r)):e.canDeactivateChecks.push(new ph(null,r))}function Im(i){return typeof i=="function"}function SX(i){return typeof i=="boolean"}function MX(i){return i&&Im(i.canLoad)}function EX(i){return i&&Im(i.canActivate)}function IX(i){return i&&Im(i.canActivateChild)}function TX(i){return i&&Im(i.canDeactivate)}function DX(i){return i&&Im(i.canMatch)}function MF(i){return i instanceof xa||i?.name==="EmptyError"}var w0=Symbol("INITIAL_VALUE");function gh(){return Tn(i=>ji(i.map(t=>t.pipe(tn(1),ni(w0)))).pipe(We(t=>{for(let e of t)if(e!==!0){if(e===w0)return w0;if(e===!1||OX(e))return e}return!0}),qt(t=>t!==w0),tn(1)))}function OX(i){return gm(i)||i instanceof wm}function PX(i,t){return ri(e=>{let{targetSnapshot:n,currentSnapshot:r,guards:{canActivateChecks:o,canDeactivateChecks:s}}=e;return s.length===0&&o.length===0?ke(at(X({},e),{guardsResult:!0})):RX(s,n,r,i).pipe(ri(a=>a&&SX(a)?AX(n,o,i,t):ke(a)),We(a=>at(X({},e),{guardsResult:a})))})}function RX(i,t,e,n){return ti(i).pipe(ri(r=>BX(r.component,r.route,e,t,n)),Ns(r=>r!==!0,!0))}function AX(i,t,e,n){return ti(t).pipe(ds(r=>ho(kX(r.route.parent,n),NX(r.route,n),FX(i,r.path,e),LX(i,r.route,e))),Ns(r=>r!==!0,!0))}function NX(i,t){return i!==null&&t&&t(new JI(i)),ke(!0)}function kX(i,t){return i!==null&&t&&t(new ZI(i)),ke(!0)}function LX(i,t,e){let n=t.routeConfig?t.routeConfig.canActivate:null;if(!n||n.length===0)return ke(!0);let r=n.map(o=>ko(()=>{let s=Em(t)??e,a=_h(o,s),l=EX(a)?a.canActivate(t,i):ms(s,()=>a(t,i));return Nl(l).pipe(Ns())}));return ke(r).pipe(gh())}function FX(i,t,e){let n=t[t.length-1],o=t.slice(0,t.length-1).reverse().map(s=>xX(s)).filter(s=>s!==null).map(s=>ko(()=>{let a=s.guards.map(l=>{let c=Em(s.node)??e,d=_h(l,c),u=IX(d)?d.canActivateChild(n,i):ms(c,()=>d(n,i));return Nl(u).pipe(Ns())});return ke(a).pipe(gh())}));return ke(o).pipe(gh())}function BX(i,t,e,n,r){let o=t&&t.routeConfig?t.routeConfig.canDeactivate:null;if(!o||o.length===0)return ke(!0);let s=o.map(a=>{let l=Em(t)??r,c=_h(a,l),d=TX(c)?c.canDeactivate(i,t,e,n):ms(l,()=>c(i,t,e,n));return Nl(d).pipe(Ns())});return ke(s).pipe(gh())}function VX(i,t,e,n){let r=t.canLoad;if(r===void 0||r.length===0)return ke(!0);let o=r.map(s=>{let a=_h(s,i),l=MX(a)?a.canLoad(t,e):ms(i,()=>a(t,e));return Nl(l)});return ke(o).pipe(gh(),EF(n))}function EF(i){return VS(gn(t=>{if(typeof t!="boolean")throw A0(i,t)}),We(t=>t===!0))}function zX(i,t,e,n){let r=t.canMatch;if(!r||r.length===0)return ke(!0);let o=r.map(s=>{let a=_h(s,i),l=DX(a)?a.canMatch(t,e):ms(i,()=>a(t,e));return Nl(l)});return ke(o).pipe(gh(),EF(n))}var Cm=class{constructor(t){this.segmentGroup=t||null}},Sm=class extends Error{constructor(t){super(),this.urlTree=t}};function ch(i){return vl(new Cm(i))}function UX(i){return vl(new De(4e3,!1))}function HX(i){return vl(CF(!1,bo.GuardRejected))}var a1=class{constructor(t,e){this.urlSerializer=t,this.urlTree=e}lineralizeSegments(t,e){let n=[],r=e.root;for(;;){if(n=n.concat(r.segments),r.numberOfChildren===0)return ke(n);if(r.numberOfChildren>1||!r.children[Jt])return UX(`${t.redirectTo}`);r=r.children[Jt]}}applyRedirectCommands(t,e,n,r,o){if(typeof e!="string"){let a=e,{queryParams:l,fragment:c,routeConfig:d,url:u,outlet:h,params:p,data:f,title:m}=r,b=ms(o,()=>a({params:p,data:f,queryParams:l,fragment:c,routeConfig:d,url:u,outlet:h,title:m}));if(b instanceof Aa)throw new Sm(b);e=b}let s=this.applyRedirectCreateUrlTree(e,this.urlSerializer.parse(e),t,n);if(e[0]==="/")throw new Sm(s);return s}applyRedirectCreateUrlTree(t,e,n,r){let o=this.createSegmentGroup(t,e.root,n,r);return new Aa(o,this.createQueryParams(e.queryParams,this.urlTree.queryParams),e.fragment)}createQueryParams(t,e){let n={};return Object.entries(t).forEach(([r,o])=>{if(typeof o=="string"&&o[0]===":"){let a=o.substring(1);n[r]=e[a]}else n[r]=o}),n}createSegmentGroup(t,e,n,r){let o=this.createSegments(t,e.segments,n,r),s={};return Object.entries(e.children).forEach(([a,l])=>{s[a]=this.createSegmentGroup(t,l,n,r)}),new Pn(o,s)}createSegments(t,e,n,r){return e.map(o=>o.path[0]===":"?this.findPosParam(t,o,r):this.findOrReturn(o,n))}findPosParam(t,e,n){let r=n[e.path.substring(1)];if(!r)throw new De(4001,!1);return r}findOrReturn(t,e){let n=0;for(let r of e){if(r.path===t.path)return e.splice(n),r;n++}return t}},l1={matched:!1,consumedSegments:[],remainingSegments:[],parameters:{},positionalParamSegments:{}};function GX(i,t,e,n,r){let o=IF(i,t,e);return o.matched?(n=uX(t,n),zX(n,t,e,r).pipe(We(s=>s===!0?o:X({},l1)))):ke(o)}function IF(i,t,e){if(t.path==="**")return jX(e);if(t.path==="")return t.pathMatch==="full"&&(i.hasChildren()||e.length>0)?X({},l1):{matched:!0,consumedSegments:[],remainingSegments:e,parameters:{},positionalParamSegments:{}};let r=(t.matcher||VY)(e,i,t);if(!r)return X({},l1);let o={};Object.entries(r.posParams??{}).forEach(([a,l])=>{o[a]=l.path});let s=r.consumed.length>0?X(X({},o),r.consumed[r.consumed.length-1].parameters):o;return{matched:!0,consumedSegments:r.consumed,remainingSegments:e.slice(r.consumed.length),parameters:s,positionalParamSegments:r.posParams??{}}}function jX(i){return{matched:!0,parameters:i.length>0?sF(i).parameters:{},consumedSegments:i,remainingSegments:[],positionalParamSegments:{}}}function nF(i,t,e,n){return e.length>0&&qX(i,e,n)?{segmentGroup:new Pn(t,$X(n,new Pn(e,i.children))),slicedSegments:[]}:e.length===0&&YX(i,e,n)?{segmentGroup:new Pn(i.segments,WX(i,e,n,i.children)),slicedSegments:e}:{segmentGroup:new Pn(i.segments,i.children),slicedSegments:e}}function WX(i,t,e,n){let r={};for(let o of e)if(L0(i,t,o)&&!n[gs(o)]){let s=new Pn([],{});r[gs(o)]=s}return X(X({},n),r)}function $X(i,t){let e={};e[Jt]=t;for(let n of i)if(n.path===""&&gs(n)!==Jt){let r=new Pn([],{});e[gs(n)]=r}return e}function qX(i,t,e){return e.some(n=>L0(i,t,n)&&gs(n)!==Jt)}function YX(i,t,e){return e.some(n=>L0(i,t,n))}function L0(i,t,e){return(i.hasChildren()||t.length>0)&&e.pathMatch==="full"?!1:e.path===""}function XX(i,t,e){return t.length===0&&!i.children[e]}var c1=class{};function QX(i,t,e,n,r,o,s="emptyOnly"){return new d1(i,t,e,n,r,s,o).recognize()}var ZX=31,d1=class{constructor(t,e,n,r,o,s,a){this.injector=t,this.configLoader=e,this.rootComponentType=n,this.config=r,this.urlTree=o,this.paramsInheritanceStrategy=s,this.urlSerializer=a,this.applyRedirects=new a1(this.urlSerializer,this.urlTree),this.absoluteRedirectCount=0,this.allowRedirects=!0}noMatchError(t){return new De(4002,`'${t.segmentGroup}'`)}recognize(){let t=nF(this.urlTree.root,[],[],this.config).segmentGroup;return this.match(t).pipe(We(({children:e,rootSnapshot:n})=>{let r=new yo(n,e),o=new R0("",r),s=rX(n,[],this.urlTree.queryParams,this.urlTree.fragment);return s.queryParams=this.urlTree.queryParams,o.url=this.urlSerializer.serialize(s),{state:o,tree:s}}))}match(t){let e=new hh([],Object.freeze({}),Object.freeze(X({},this.urlTree.queryParams)),this.urlTree.fragment,Object.freeze({}),Jt,this.rootComponentType,null,{});return this.processSegmentGroup(this.injector,this.config,t,Jt,e).pipe(We(n=>({children:n,rootSnapshot:e})),As(n=>{if(n instanceof Sm)return this.urlTree=n.urlTree,this.match(n.urlTree.root);throw n instanceof Cm?this.noMatchError(n):n}))}processSegmentGroup(t,e,n,r,o){return n.segments.length===0&&n.hasChildren()?this.processChildren(t,e,n,o):this.processSegment(t,e,n,n.segments,r,!0,o).pipe(We(s=>s instanceof yo?[s]:[]))}processChildren(t,e,n,r){let o=[];for(let s of Object.keys(n.children))s==="primary"?o.unshift(s):o.push(s);return ti(o).pipe(ds(s=>{let a=n.children[s],l=hX(e,s);return this.processSegmentGroup(t,l,a,s,r)}),XS((s,a)=>(s.push(...a),s)),yl(null),YS(),ri(s=>{if(s===null)return ch(n);let a=TF(s);return KX(a),ke(a)}))}processSegment(t,e,n,r,o,s,a){return ti(e).pipe(ds(l=>this.processSegmentAgainstRoute(l._injector??t,e,l,n,r,o,s,a).pipe(As(c=>{if(c instanceof Cm)return ke(null);throw c}))),Ns(l=>!!l),As(l=>{if(MF(l))return XX(n,r,o)?ke(new c1):ch(n);throw l}))}processSegmentAgainstRoute(t,e,n,r,o,s,a,l){return gs(n)!==s&&(s===Jt||!L0(r,o,n))?ch(r):n.redirectTo===void 0?this.matchSegmentAgainstRoute(t,r,n,o,s,l):this.allowRedirects&&a?this.expandSegmentAgainstRouteUsingRedirect(t,r,e,n,o,s,l):ch(r)}expandSegmentAgainstRouteUsingRedirect(t,e,n,r,o,s,a){let{matched:l,parameters:c,consumedSegments:d,positionalParamSegments:u,remainingSegments:h}=IF(e,r,o);if(!l)return ch(e);typeof r.redirectTo=="string"&&r.redirectTo[0]==="/"&&(this.absoluteRedirectCount++,this.absoluteRedirectCount>ZX&&(this.allowRedirects=!1));let p=new hh(o,c,Object.freeze(X({},this.urlTree.queryParams)),this.urlTree.fragment,iF(r),gs(r),r.component??r._loadedComponent??null,r,rF(r)),f=P0(p,a,this.paramsInheritanceStrategy);p.params=Object.freeze(f.params),p.data=Object.freeze(f.data);let m=this.applyRedirects.applyRedirectCommands(d,r.redirectTo,u,p,t);return this.applyRedirects.lineralizeSegments(r,m).pipe(ri(b=>this.processSegment(t,n,e,b.concat(h),s,!1,a)))}matchSegmentAgainstRoute(t,e,n,r,o,s){let a=GX(e,n,r,t,this.urlSerializer);return n.path==="**"&&(e.children={}),a.pipe(Tn(l=>l.matched?(t=n._injector??t,this.getChildConfig(t,n,r).pipe(Tn(({routes:c})=>{let d=n._loadedInjector??t,{parameters:u,consumedSegments:h,remainingSegments:p}=l,f=new hh(h,u,Object.freeze(X({},this.urlTree.queryParams)),this.urlTree.fragment,iF(n),gs(n),n.component??n._loadedComponent??null,n,rF(n)),m=P0(f,s,this.paramsInheritanceStrategy);f.params=Object.freeze(m.params),f.data=Object.freeze(m.data);let{segmentGroup:b,slicedSegments:g}=nF(e,h,p,c);if(g.length===0&&b.hasChildren())return this.processChildren(d,c,b,f).pipe(We(x=>new yo(f,x)));if(c.length===0&&g.length===0)return ke(new yo(f,[]));let _=gs(n)===o;return this.processSegment(d,c,b,g,_?Jt:o,!0,f).pipe(We(x=>new yo(f,x instanceof yo?[x]:[])))}))):ch(e)))}getChildConfig(t,e,n){return e.children?ke({routes:e.children,injector:t}):e.loadChildren?e._loadedRoutes!==void 0?ke({routes:e._loadedRoutes,injector:e._loadedInjector}):VX(t,e,n,this.urlSerializer).pipe(ri(r=>r?this.configLoader.loadChildren(t,e).pipe(gn(o=>{e._loadedRoutes=o.routes,e._loadedInjector=o.injector})):HX(e))):ke({routes:[],injector:t})}};function KX(i){i.sort((t,e)=>t.value.outlet===Jt?-1:e.value.outlet===Jt?1:t.value.outlet.localeCompare(e.value.outlet))}function JX(i){let t=i.value.routeConfig;return t&&t.path===""}function TF(i){let t=[],e=new Set;for(let n of i){if(!JX(n)){t.push(n);continue}let r=t.find(o=>n.value.routeConfig===o.value.routeConfig);r!==void 0?(r.children.push(...n.children),e.add(r)):t.push(n)}for(let n of e){let r=TF(n.children);t.push(new yo(n.value,r))}return t.filter(n=>!e.has(n))}function iF(i){return i.data||{}}function rF(i){return i.resolve||{}}function eQ(i,t,e,n,r,o){return ri(s=>QX(i,t,e,n,s.extractedUrl,r,o).pipe(We(({state:a,tree:l})=>at(X({},s),{targetSnapshot:a,urlAfterRedirects:l}))))}function tQ(i,t){return ri(e=>{let{targetSnapshot:n,guards:{canActivateChecks:r}}=e;if(!r.length)return ke(e);let o=new Set(r.map(l=>l.route)),s=new Set;for(let l of o)if(!s.has(l))for(let c of DF(l))s.add(c);let a=0;return ti(s).pipe(ds(l=>o.has(l)?nQ(l,n,i,t):(l.data=P0(l,l.parent,i).resolve,ke(void 0))),gn(()=>a++),zu(1),ri(l=>a===s.size?ke(e):Ji))})}function DF(i){let t=i.children.map(e=>DF(e)).flat();return[i,...t]}function nQ(i,t,e,n){let r=i.routeConfig,o=i._resolve;return r?.title!==void 0&&!xF(r)&&(o[Mm]=r.title),iQ(o,i,t,n).pipe(We(s=>(i._resolvedData=s,i.data=P0(i,i.parent,e).resolve,null)))}function iQ(i,t,e,n){let r=zI(i);if(r.length===0)return ke({});let o={};return ti(r).pipe(ri(s=>rQ(i[s],t,e,n).pipe(Ns(),gn(a=>{if(a instanceof wm)throw A0(new mm,a);o[s]=a}))),zu(1),Af(o),As(s=>MF(s)?Ji:vl(s)))}function rQ(i,t,e,n){let r=Em(t)??n,o=_h(i,r),s=o.resolve?o.resolve(t,e):ms(r,()=>o(t,e));return Nl(s)}function BI(i){return Tn(t=>{let e=i(t);return e?ti(e).pipe(We(()=>t)):ke(t)})}var OF=(()=>{class i{buildTitle(e){let n,r=e.root;for(;r!==void 0;)n=this.getResolvedTitleForRoute(r)??n,r=r.children.find(o=>o.outlet===Jt);return n}getResolvedTitleForRoute(e){return e.data[Mm]}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:()=>S(oQ),providedIn:"root"})}}return i})(),oQ=(()=>{class i extends OF{constructor(e){super(),this.title=e}updateTitle(e){let n=this.buildTitle(e);n!==void 0&&this.title.setTitle(n)}static{this.\u0275fac=function(n){return new(n||i)(Le(QL))}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),g1=new pe("",{providedIn:"root",factory:()=>({})}),sQ=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["ng-component"]],standalone:!0,features:[se],decls:1,vars:0,template:function(n,r){n&1&&ee(0,"router-outlet")},dependencies:[f1],encapsulation:2})}}return i})();function _1(i){let t=i.children&&i.children.map(_1),e=t?at(X({},i),{children:t}):X({},i);return!e.component&&!e.loadComponent&&(t||e.loadChildren)&&e.outlet&&e.outlet!==Jt&&(e.component=sQ),e}var v1=new pe(""),aQ=(()=>{class i{constructor(){this.componentLoaders=new WeakMap,this.childrenLoaders=new WeakMap,this.compiler=S(pI)}loadComponent(e){if(this.componentLoaders.get(e))return this.componentLoaders.get(e);if(e._loadedComponent)return ke(e._loadedComponent);this.onLoadStartListener&&this.onLoadStartListener(e);let n=Nl(e.loadComponent()).pipe(We(PF),gn(o=>{this.onLoadEndListener&&this.onLoadEndListener(e),e._loadedComponent=o}),xl(()=>{this.componentLoaders.delete(e)})),r=new ml(n,()=>new ce).pipe(Au());return this.componentLoaders.set(e,r),r}loadChildren(e,n){if(this.childrenLoaders.get(n))return this.childrenLoaders.get(n);if(n._loadedRoutes)return ke({routes:n._loadedRoutes,injector:n._loadedInjector});this.onLoadStartListener&&this.onLoadStartListener(n);let o=lQ(n,this.compiler,e,this.onLoadEndListener).pipe(xl(()=>{this.childrenLoaders.delete(n)})),s=new ml(o,()=>new ce).pipe(Au());return this.childrenLoaders.set(n,s),s}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function lQ(i,t,e,n){return Nl(i.loadChildren()).pipe(We(PF),ri(r=>r instanceof Wf||Array.isArray(r)?ke(r):ti(t.compileModuleAsync(r))),We(r=>{n&&n(i);let o,s,a=!1;return Array.isArray(r)?(s=r,a=!0):(o=r.create(e).injector,s=o.get(v1,[],{optional:!0,self:!0}).flat()),{routes:s.map(_1),injector:o}}))}function cQ(i){return i&&typeof i=="object"&&"default"in i}function PF(i){return cQ(i)?i.default:i}var y1=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:()=>S(dQ),providedIn:"root"})}}return i})(),dQ=(()=>{class i{shouldProcessUrl(e){return!0}extract(e){return e}merge(e,n){return e}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),uQ=new pe("");var hQ=new pe(""),pQ=(()=>{class i{get hasRequestedNavigation(){return this.navigationId!==0}constructor(){this.currentNavigation=null,this.currentTransition=null,this.lastSuccessfulNavigation=null,this.events=new ce,this.transitionAbortSubject=new ce,this.configLoader=S(aQ),this.environmentInjector=S(tr),this.urlSerializer=S(h1),this.rootContexts=S(k0),this.location=S(nd),this.inputBindingEnabled=S(m1,{optional:!0})!==null,this.titleStrategy=S(OF),this.options=S(g1,{optional:!0})||{},this.paramsInheritanceStrategy=this.options.paramsInheritanceStrategy||"emptyOnly",this.urlHandlingStrategy=S(y1),this.createViewTransition=S(uQ,{optional:!0}),this.navigationErrorHandler=S(hQ,{optional:!0}),this.navigationId=0,this.afterPreactivation=()=>ke(void 0),this.rootComponentType=null;let e=r=>this.events.next(new XI(r)),n=r=>this.events.next(new QI(r));this.configLoader.onLoadEndListener=n,this.configLoader.onLoadStartListener=e}complete(){this.transitions?.complete()}handleNavigationRequest(e){let n=++this.navigationId;this.transitions?.next(at(X(X({},this.transitions.value),e),{id:n}))}setupNavigations(e,n,r){return this.transitions=new yn({id:0,currentUrlTree:n,currentRawUrl:n,extractedUrl:this.urlHandlingStrategy.extract(n),urlAfterRedirects:this.urlHandlingStrategy.extract(n),rawUrl:n,extras:{},resolve:()=>{},reject:()=>{},promise:Promise.resolve(!0),source:pm,restoredState:null,currentSnapshot:r.snapshot,targetSnapshot:null,currentRouterState:r,targetRouterState:null,guards:{canActivateChecks:[],canDeactivateChecks:[]},guardsResult:null}),this.transitions.pipe(qt(o=>o.id!==0),We(o=>at(X({},o),{extractedUrl:this.urlHandlingStrategy.extract(o.rawUrl)})),Tn(o=>{let s=!1,a=!1;return ke(o).pipe(Tn(l=>{if(this.navigationId>o.id)return this.cancelNavigationTransition(o,"",bo.SupersededByNewNavigation),Ji;this.currentTransition=o,this.currentNavigation={id:l.id,initialUrl:l.rawUrl,extractedUrl:l.extractedUrl,targetBrowserUrl:typeof l.extras.browserUrl=="string"?this.urlSerializer.parse(l.extras.browserUrl):l.extras.browserUrl,trigger:l.source,extras:l.extras,previousNavigation:this.lastSuccessfulNavigation?at(X({},this.lastSuccessfulNavigation),{previousNavigation:null}):null};let c=!e.navigated||this.isUpdatingInternalState()||this.isUpdatedBrowserUrl(),d=l.extras.onSameUrlNavigation??e.onSameUrlNavigation;if(!c&&d!=="reload"){let u="";return this.events.next(new sd(l.id,this.urlSerializer.serialize(l.rawUrl),u,jI.IgnoredSameUrlNavigation)),l.resolve(!1),Ji}if(this.urlHandlingStrategy.shouldProcessUrl(l.rawUrl))return ke(l).pipe(Tn(u=>{let h=this.transitions?.getValue();return this.events.next(new vm(u.id,this.urlSerializer.serialize(u.extractedUrl),u.source,u.restoredState)),h!==this.transitions?.getValue()?Ji:Promise.resolve(u)}),eQ(this.environmentInjector,this.configLoader,this.rootComponentType,e.config,this.urlSerializer,this.paramsInheritanceStrategy),gn(u=>{o.targetSnapshot=u.targetSnapshot,o.urlAfterRedirects=u.urlAfterRedirects,this.currentNavigation=at(X({},this.currentNavigation),{finalUrl:u.urlAfterRedirects});let h=new T0(u.id,this.urlSerializer.serialize(u.extractedUrl),this.urlSerializer.serialize(u.urlAfterRedirects),u.targetSnapshot);this.events.next(h)}));if(c&&this.urlHandlingStrategy.shouldProcessUrl(l.currentRawUrl)){let{id:u,extractedUrl:h,source:p,restoredState:f,extras:m}=l,b=new vm(u,this.urlSerializer.serialize(h),p,f);this.events.next(b);let g=yF(this.rootComponentType).snapshot;return this.currentTransition=o=at(X({},l),{targetSnapshot:g,urlAfterRedirects:h,extras:at(X({},m),{skipLocationChange:!1,replaceUrl:!1})}),this.currentNavigation.finalUrl=h,ke(o)}else{let u="";return this.events.next(new sd(l.id,this.urlSerializer.serialize(l.extractedUrl),u,jI.IgnoredByUrlHandlingStrategy)),l.resolve(!1),Ji}}),gn(l=>{let c=new WI(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot);this.events.next(c)}),We(l=>(this.currentTransition=o=at(X({},l),{guards:bX(l.targetSnapshot,l.currentSnapshot,this.rootContexts)}),o)),PX(this.environmentInjector,l=>this.events.next(l)),gn(l=>{if(o.guardsResult=l.guardsResult,l.guardsResult&&typeof l.guardsResult!="boolean")throw A0(this.urlSerializer,l.guardsResult);let c=new $I(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects),l.targetSnapshot,!!l.guardsResult);this.events.next(c)}),qt(l=>l.guardsResult?!0:(this.cancelNavigationTransition(l,"",bo.GuardRejected),!1)),BI(l=>{if(l.guards.canActivateChecks.length)return ke(l).pipe(gn(c=>{let d=new qI(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(d)}),Tn(c=>{let d=!1;return ke(c).pipe(tQ(this.paramsInheritanceStrategy,this.environmentInjector),gn({next:()=>d=!0,complete:()=>{d||this.cancelNavigationTransition(c,"",bo.NoDataFromResolver)}}))}),gn(c=>{let d=new YI(c.id,this.urlSerializer.serialize(c.extractedUrl),this.urlSerializer.serialize(c.urlAfterRedirects),c.targetSnapshot);this.events.next(d)}))}),BI(l=>{let c=d=>{let u=[];d.routeConfig?.loadComponent&&!d.routeConfig._loadedComponent&&u.push(this.configLoader.loadComponent(d.routeConfig).pipe(gn(h=>{d.component=h}),We(()=>{})));for(let h of d.children)u.push(...c(h));return u};return ji(c(l.targetSnapshot.root)).pipe(yl(null),tn(1))}),BI(()=>this.afterPreactivation()),Tn(()=>{let{currentSnapshot:l,targetSnapshot:c}=o,d=this.createViewTransition?.(this.environmentInjector,l.root,c.root);return d?ti(d).pipe(We(()=>o)):ke(o)}),We(l=>{let c=mX(e.routeReuseStrategy,l.targetSnapshot,l.currentRouterState);return this.currentTransition=o=at(X({},l),{targetRouterState:c}),this.currentNavigation.targetRouterState=c,o}),gn(()=>{this.events.next(new bm)}),yX(this.rootContexts,e.routeReuseStrategy,l=>this.events.next(l),this.inputBindingEnabled),tn(1),gn({next:l=>{s=!0,this.lastSuccessfulNavigation=this.currentNavigation,this.events.next(new od(l.id,this.urlSerializer.serialize(l.extractedUrl),this.urlSerializer.serialize(l.urlAfterRedirects))),this.titleStrategy?.updateTitle(l.targetRouterState.snapshot),l.resolve(!0)},complete:()=>{s=!0}}),Ke(this.transitionAbortSubject.pipe(gn(l=>{throw l}))),xl(()=>{!s&&!a&&this.cancelNavigationTransition(o,"",bo.SupersededByNewNavigation),this.currentTransition?.id===o.id&&(this.currentNavigation=null,this.currentTransition=null)}),As(l=>{if(a=!0,SF(l))this.events.next(new Ra(o.id,this.urlSerializer.serialize(o.extractedUrl),l.message,l.cancellationCode)),vX(l)?this.events.next(new mh(l.url,l.navigationBehaviorOptions)):o.resolve(!1);else{let c=new ym(o.id,this.urlSerializer.serialize(o.extractedUrl),l,o.targetSnapshot??void 0);try{let d=ms(this.environmentInjector,()=>this.navigationErrorHandler?.(c));if(d instanceof wm){let{message:u,cancellationCode:h}=A0(this.urlSerializer,d);this.events.next(new Ra(o.id,this.urlSerializer.serialize(o.extractedUrl),u,h)),this.events.next(new mh(d.redirectTo,d.navigationBehaviorOptions))}else throw this.events.next(c),l}catch(d){this.options.resolveNavigationPromiseOnError?o.resolve(!1):o.reject(d)}}return Ji}))}))}cancelNavigationTransition(e,n,r){let o=new Ra(e.id,this.urlSerializer.serialize(e.extractedUrl),n,r);this.events.next(o),e.resolve(!1)}isUpdatingInternalState(){return this.currentTransition?.extractedUrl.toString()!==this.currentTransition?.currentUrlTree.toString()}isUpdatedBrowserUrl(){let e=this.urlHandlingStrategy.extract(this.urlSerializer.parse(this.location.path(!0))),n=this.currentNavigation?.targetBrowserUrl??this.currentNavigation?.extractedUrl;return e.toString()!==n?.toString()&&!this.currentNavigation?.extras.skipLocationChange}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function fQ(i){return i!==pm}var mQ=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:()=>S(gQ),providedIn:"root"})}}return i})(),u1=class{shouldDetach(t){return!1}store(t,e){}shouldAttach(t){return!1}retrieve(t){return null}shouldReuseRoute(t,e){return t.routeConfig===e.routeConfig}},gQ=(()=>{class i extends u1{static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Zn(i)))(r||i)}})()}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),RF=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:()=>S(_Q),providedIn:"root"})}}return i})(),_Q=(()=>{class i extends RF{constructor(){super(...arguments),this.location=S(nd),this.urlSerializer=S(h1),this.options=S(g1,{optional:!0})||{},this.canceledNavigationResolution=this.options.canceledNavigationResolution||"replace",this.urlHandlingStrategy=S(y1),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.currentUrlTree=new Aa,this.rawUrlTree=this.currentUrlTree,this.currentPageId=0,this.lastSuccessfulId=-1,this.routerState=yF(null),this.stateMemento=this.createStateMemento()}getCurrentUrlTree(){return this.currentUrlTree}getRawUrlTree(){return this.rawUrlTree}restoredState(){return this.location.getState()}get browserPageId(){return this.canceledNavigationResolution!=="computed"?this.currentPageId:this.restoredState()?.\u0275routerPageId??this.currentPageId}getRouterState(){return this.routerState}createStateMemento(){return{rawUrlTree:this.rawUrlTree,currentUrlTree:this.currentUrlTree,routerState:this.routerState}}registerNonRouterCurrentEntryChangeListener(e){return this.location.subscribe(n=>{n.type==="popstate"&&e(n.url,n.state)})}handleRouterEvent(e,n){if(e instanceof vm)this.stateMemento=this.createStateMemento();else if(e instanceof sd)this.rawUrlTree=n.initialUrl;else if(e instanceof T0){if(this.urlUpdateStrategy==="eager"&&!n.extras.skipLocationChange){let r=this.urlHandlingStrategy.merge(n.finalUrl,n.initialUrl);this.setBrowserUrl(n.targetBrowserUrl??r,n)}}else e instanceof bm?(this.currentUrlTree=n.finalUrl,this.rawUrlTree=this.urlHandlingStrategy.merge(n.finalUrl,n.initialUrl),this.routerState=n.targetRouterState,this.urlUpdateStrategy==="deferred"&&!n.extras.skipLocationChange&&this.setBrowserUrl(n.targetBrowserUrl??this.rawUrlTree,n)):e instanceof Ra&&(e.code===bo.GuardRejected||e.code===bo.NoDataFromResolver)?this.restoreHistory(n):e instanceof ym?this.restoreHistory(n,!0):e instanceof od&&(this.lastSuccessfulId=e.id,this.currentPageId=this.browserPageId)}setBrowserUrl(e,n){let r=e instanceof Aa?this.urlSerializer.serialize(e):e;if(this.location.isCurrentPathEqualTo(r)||n.extras.replaceUrl){let o=this.browserPageId,s=X(X({},n.extras.state),this.generateNgRouterState(n.id,o));this.location.replaceState(r,"",s)}else{let o=X(X({},n.extras.state),this.generateNgRouterState(n.id,this.browserPageId+1));this.location.go(r,"",o)}}restoreHistory(e,n=!1){if(this.canceledNavigationResolution==="computed"){let r=this.browserPageId,o=this.currentPageId-r;o!==0?this.location.historyGo(o):this.currentUrlTree===e.finalUrl&&o===0&&(this.resetState(e),this.resetUrlToCurrentUrlTree())}else this.canceledNavigationResolution==="replace"&&(n&&this.resetState(e),this.resetUrlToCurrentUrlTree())}resetState(e){this.routerState=this.stateMemento.routerState,this.currentUrlTree=this.stateMemento.currentUrlTree,this.rawUrlTree=this.urlHandlingStrategy.merge(this.currentUrlTree,e.finalUrl??this.rawUrlTree)}resetUrlToCurrentUrlTree(){this.location.replaceState(this.urlSerializer.serialize(this.rawUrlTree),"",this.generateNgRouterState(this.lastSuccessfulId,this.currentPageId))}generateNgRouterState(e,n){return this.canceledNavigationResolution==="computed"?{navigationId:e,\u0275routerPageId:n}:{navigationId:e}}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Zn(i)))(r||i)}})()}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),um=function(i){return i[i.COMPLETE=0]="COMPLETE",i[i.FAILED=1]="FAILED",i[i.REDIRECTING=2]="REDIRECTING",i}(um||{});function vQ(i,t){i.events.pipe(qt(e=>e instanceof od||e instanceof Ra||e instanceof ym||e instanceof sd),We(e=>e instanceof od||e instanceof sd?um.COMPLETE:(e instanceof Ra?e.code===bo.Redirect||e.code===bo.SupersededByNewNavigation:!1)?um.REDIRECTING:um.FAILED),qt(e=>e!==um.REDIRECTING),tn(1)).subscribe(()=>{t()})}var yQ={paths:"exact",fragment:"ignored",matrixParams:"ignored",queryParams:"exact"},bQ={paths:"subset",fragment:"ignored",matrixParams:"ignored",queryParams:"subset"},vh=(()=>{class i{get currentUrlTree(){return this.stateManager.getCurrentUrlTree()}get rawUrlTree(){return this.stateManager.getRawUrlTree()}get events(){return this._events}get routerState(){return this.stateManager.getRouterState()}constructor(){this.disposed=!1,this.console=S(l0),this.stateManager=S(RF),this.options=S(g1,{optional:!0})||{},this.pendingTasks=S(Qc),this.urlUpdateStrategy=this.options.urlUpdateStrategy||"deferred",this.navigationTransitions=S(pQ),this.urlSerializer=S(h1),this.location=S(nd),this.urlHandlingStrategy=S(y1),this._events=new ce,this.navigated=!1,this.routeReuseStrategy=S(mQ),this.onSameUrlNavigation=this.options.onSameUrlNavigation||"ignore",this.config=S(v1,{optional:!0})?.flat()??[],this.componentInputBindingEnabled=!!S(m1,{optional:!0}),this.eventsSubscription=new St,this.resetConfig(this.config),this.navigationTransitions.setupNavigations(this,this.currentUrlTree,this.routerState).subscribe({error:e=>{this.console.warn(e)}}),this.subscribeToNavigationEvents()}subscribeToNavigationEvents(){let e=this.navigationTransitions.events.subscribe(n=>{try{let r=this.navigationTransitions.currentTransition,o=this.navigationTransitions.currentNavigation;if(r!==null&&o!==null){if(this.stateManager.handleRouterEvent(n,o),n instanceof Ra&&n.code!==bo.Redirect&&n.code!==bo.SupersededByNewNavigation)this.navigated=!0;else if(n instanceof od)this.navigated=!0;else if(n instanceof mh){let s=n.navigationBehaviorOptions,a=this.urlHandlingStrategy.merge(n.url,r.currentRawUrl),l=X({browserUrl:r.extras.browserUrl,info:r.extras.info,skipLocationChange:r.extras.skipLocationChange,replaceUrl:r.extras.replaceUrl||this.urlUpdateStrategy==="eager"||fQ(r.source)},s);this.scheduleNavigation(a,pm,null,l,{resolve:r.resolve,reject:r.reject,promise:r.promise})}}wQ(n)&&this._events.next(n)}catch(r){this.navigationTransitions.transitionAbortSubject.next(r)}});this.eventsSubscription.add(e)}resetRootComponentType(e){this.routerState.root.component=e,this.navigationTransitions.rootComponentType=e}initialNavigation(){this.setUpLocationChangeListener(),this.navigationTransitions.hasRequestedNavigation||this.navigateToSyncWithBrowser(this.location.path(!0),pm,this.stateManager.restoredState())}setUpLocationChangeListener(){this.nonRouterCurrentEntryChangeSubscription??=this.stateManager.registerNonRouterCurrentEntryChangeListener((e,n)=>{setTimeout(()=>{this.navigateToSyncWithBrowser(e,"popstate",n)},0)})}navigateToSyncWithBrowser(e,n,r){let o={replaceUrl:!0},s=r?.navigationId?r:null;if(r){let l=X({},r);delete l.navigationId,delete l.\u0275routerPageId,Object.keys(l).length!==0&&(o.state=l)}let a=this.parseUrl(e);this.scheduleNavigation(a,n,s,o)}get url(){return this.serializeUrl(this.currentUrlTree)}getCurrentNavigation(){return this.navigationTransitions.currentNavigation}get lastSuccessfulNavigation(){return this.navigationTransitions.lastSuccessfulNavigation}resetConfig(e){this.config=e.map(_1),this.navigated=!1}ngOnDestroy(){this.dispose()}dispose(){this.navigationTransitions.complete(),this.nonRouterCurrentEntryChangeSubscription&&(this.nonRouterCurrentEntryChangeSubscription.unsubscribe(),this.nonRouterCurrentEntryChangeSubscription=void 0),this.disposed=!0,this.eventsSubscription.unsubscribe()}createUrlTree(e,n={}){let{relativeTo:r,queryParams:o,fragment:s,queryParamsHandling:a,preserveFragment:l}=n,c=l?this.currentUrlTree.fragment:s,d=null;switch(a??this.options.defaultQueryParamsHandling){case"merge":d=X(X({},this.currentUrlTree.queryParams),o);break;case"preserve":d=this.currentUrlTree.queryParams;break;default:d=o||null}d!==null&&(d=this.removeEmptyProps(d));let u;try{let h=r?r.snapshot:this.routerState.snapshot.root;u=mF(h)}catch{(typeof e[0]!="string"||e[0][0]!=="/")&&(e=[]),u=this.currentUrlTree.root}return gF(u,e,d,c??null)}navigateByUrl(e,n={skipLocationChange:!1}){let r=gm(e)?e:this.parseUrl(e),o=this.urlHandlingStrategy.merge(r,this.rawUrlTree);return this.scheduleNavigation(o,pm,null,n)}navigate(e,n={skipLocationChange:!1}){return xQ(e),this.navigateByUrl(this.createUrlTree(e,n),n)}serializeUrl(e){return this.urlSerializer.serialize(e)}parseUrl(e){try{return this.urlSerializer.parse(e)}catch{return this.urlSerializer.parse("/")}}isActive(e,n){let r;if(n===!0?r=X({},yQ):n===!1?r=X({},bQ):r=n,gm(e))return KL(this.currentUrlTree,e,r);let o=this.parseUrl(e);return KL(this.currentUrlTree,o,r)}removeEmptyProps(e){return Object.entries(e).reduce((n,[r,o])=>(o!=null&&(n[r]=o),n),{})}scheduleNavigation(e,n,r,o,s){if(this.disposed)return Promise.resolve(!1);let a,l,c;s?(a=s.resolve,l=s.reject,c=s.promise):c=new Promise((u,h)=>{a=u,l=h});let d=this.pendingTasks.add();return vQ(this,()=>{queueMicrotask(()=>this.pendingTasks.remove(d))}),this.navigationTransitions.handleNavigationRequest({source:n,restoredState:r,currentUrlTree:this.currentUrlTree,currentRawUrl:this.currentUrlTree,rawUrl:e,extras:o,resolve:a,reject:l,promise:c,currentSnapshot:this.routerState.snapshot,currentRouterState:this.routerState}),c.catch(u=>Promise.reject(u))}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function xQ(i){for(let t=0;te.\u0275providers)])}function SQ(i){return i.routerState.root}function MQ(){let i=S(pt);return t=>{let e=i.get(zo);if(t!==e.components[0])return;let n=i.get(vh),r=i.get(EQ);i.get(IQ)===1&&n.initialNavigation(),i.get(TQ,null,rn.Optional)?.setUpPreloading(),i.get(CQ,null,rn.Optional)?.init(),n.resetRootComponentType(e.componentTypes[0]),r.closed||(r.next(),r.complete(),r.unsubscribe())}}var EQ=new pe("",{factory:()=>new ce}),IQ=new pe("",{providedIn:"root",factory:()=>1});var TQ=new pe("");var kF=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275cmp=oe({type:i,selectors:[["app-root"]],standalone:!0,features:[se],decls:1,vars:0,template:function(n,r){n&1&&ee(0,"router-outlet")},dependencies:[Oe,f1],encapsulation:2})}return i})();var Ut=function(i){return i[i.State=0]="State",i[i.Transition=1]="Transition",i[i.Sequence=2]="Sequence",i[i.Group=3]="Group",i[i.Animate=4]="Animate",i[i.Keyframes=5]="Keyframes",i[i.Style=6]="Style",i[i.Trigger=7]="Trigger",i[i.Reference=8]="Reference",i[i.AnimateChild=9]="AnimateChild",i[i.AnimateRef=10]="AnimateRef",i[i.Query=11]="Query",i[i.Stagger=12]="Stagger",i}(Ut||{}),Ws="*";function pi(i,t){return{type:Ut.Trigger,name:i,definitions:t,options:{}}}function Ln(i,t=null){return{type:Ut.Animate,styles:t,timings:i}}function LF(i,t=null){return{type:Ut.Group,steps:i,options:t}}function FF(i,t=null){return{type:Ut.Sequence,steps:i,options:t}}function en(i){return{type:Ut.Style,styles:i,offset:null}}function Ci(i,t,e){return{type:Ut.State,name:i,styles:t,options:e}}function Fn(i,t,e=null){return{type:Ut.Transition,expr:i,animation:t,options:e}}function BF(i=null){return{type:Ut.AnimateChild,options:i}}function VF(i,t,e=null){return{type:Ut.Query,selector:i,animation:t,options:e}}var kl=class{constructor(t=0,e=0){this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._originalOnDoneFns=[],this._originalOnStartFns=[],this._started=!1,this._destroyed=!1,this._finished=!1,this._position=0,this.parentPlayer=null,this.totalTime=t+e}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}init(){}play(){this.hasStarted()||(this._onStart(),this.triggerMicrotask()),this._started=!0}triggerMicrotask(){queueMicrotask(()=>this._onFinish())}_onStart(){this._onStartFns.forEach(t=>t()),this._onStartFns=[]}pause(){}restart(){}finish(){this._onFinish()}destroy(){this._destroyed||(this._destroyed=!0,this.hasStarted()||this._onStart(),this.finish(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this._started=!1,this._finished=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}setPosition(t){this._position=this.totalTime?t*this.totalTime:1}getPosition(){return this.totalTime?this._position/this.totalTime:1}triggerCallback(t){let e=t=="start"?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}},Tm=class{constructor(t){this._onDoneFns=[],this._onStartFns=[],this._finished=!1,this._started=!1,this._destroyed=!1,this._onDestroyFns=[],this.parentPlayer=null,this.totalTime=0,this.players=t;let e=0,n=0,r=0,o=this.players.length;o==0?queueMicrotask(()=>this._onFinish()):this.players.forEach(s=>{s.onDone(()=>{++e==o&&this._onFinish()}),s.onDestroy(()=>{++n==o&&this._onDestroy()}),s.onStart(()=>{++r==o&&this._onStart()})}),this.totalTime=this.players.reduce((s,a)=>Math.max(s,a.totalTime),0)}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this.players.forEach(t=>t.init())}onStart(t){this._onStartFns.push(t)}_onStart(){this.hasStarted()||(this._started=!0,this._onStartFns.forEach(t=>t()),this._onStartFns=[])}onDone(t){this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}hasStarted(){return this._started}play(){this.parentPlayer||this.init(),this._onStart(),this.players.forEach(t=>t.play())}pause(){this.players.forEach(t=>t.pause())}restart(){this.players.forEach(t=>t.restart())}finish(){this._onFinish(),this.players.forEach(t=>t.finish())}destroy(){this._onDestroy()}_onDestroy(){this._destroyed||(this._destroyed=!0,this._onFinish(),this.players.forEach(t=>t.destroy()),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}reset(){this.players.forEach(t=>t.reset()),this._destroyed=!1,this._finished=!1,this._started=!1}setPosition(t){let e=t*this.totalTime;this.players.forEach(n=>{let r=n.totalTime?Math.min(1,e/n.totalTime):1;n.setPosition(r)})}getPosition(){let t=this.players.reduce((e,n)=>e===null||n.totalTime>e.totalTime?n:e,null);return t!=null?t.getPosition():0}beforeDestroy(){this.players.forEach(t=>{t.beforeDestroy&&t.beforeDestroy()})}triggerCallback(t){let e=t=="start"?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}},F0="!";function zF(i){return new De(3e3,!1)}function DQ(){return new De(3100,!1)}function OQ(){return new De(3101,!1)}function PQ(i){return new De(3001,!1)}function RQ(i){return new De(3003,!1)}function AQ(i){return new De(3004,!1)}function NQ(i,t){return new De(3005,!1)}function kQ(){return new De(3006,!1)}function LQ(){return new De(3007,!1)}function FQ(i,t){return new De(3008,!1)}function BQ(i){return new De(3002,!1)}function VQ(i,t,e,n,r){return new De(3010,!1)}function zQ(){return new De(3011,!1)}function UQ(){return new De(3012,!1)}function HQ(){return new De(3200,!1)}function GQ(){return new De(3202,!1)}function jQ(){return new De(3013,!1)}function WQ(i){return new De(3014,!1)}function $Q(i){return new De(3015,!1)}function qQ(i){return new De(3016,!1)}function YQ(i,t){return new De(3404,!1)}function XQ(i){return new De(3502,!1)}function QQ(i){return new De(3503,!1)}function ZQ(){return new De(3300,!1)}function KQ(i){return new De(3504,!1)}function JQ(i){return new De(3301,!1)}function eZ(i,t){return new De(3302,!1)}function tZ(i){return new De(3303,!1)}function nZ(i,t){return new De(3400,!1)}function iZ(i){return new De(3401,!1)}function rZ(i){return new De(3402,!1)}function oZ(i,t){return new De(3505,!1)}function Ll(i){switch(i.length){case 0:return new kl;case 1:return i[0];default:return new Tm(i)}}function e3(i,t,e=new Map,n=new Map){let r=[],o=[],s=-1,a=null;if(t.forEach(l=>{let c=l.get("offset"),d=c==s,u=d&&a||new Map;l.forEach((h,p)=>{let f=p,m=h;if(p!=="offset")switch(f=i.normalizePropertyName(f,r),m){case F0:m=e.get(p);break;case Ws:m=n.get(p);break;default:m=i.normalizeStyleValue(p,f,m,r);break}u.set(f,m)}),d||o.push(u),a=u,s=c}),r.length)throw XQ(r);return o}function H1(i,t,e,n){switch(t){case"start":i.onStart(()=>n(e&&b1(e,"start",i)));break;case"done":i.onDone(()=>n(e&&b1(e,"done",i)));break;case"destroy":i.onDestroy(()=>n(e&&b1(e,"destroy",i)));break}}function b1(i,t,e){let n=e.totalTime,r=!!e.disabled,o=G1(i.element,i.triggerName,i.fromState,i.toState,t||i.phaseName,n??i.totalTime,r),s=i._data;return s!=null&&(o._data=s),o}function G1(i,t,e,n,r="",o=0,s){return{element:i,triggerName:t,fromState:e,toState:n,phaseName:r,totalTime:o,disabled:!!s}}function wo(i,t,e){let n=i.get(t);return n||i.set(t,n=e),n}function UF(i){let t=i.indexOf(":"),e=i.substring(1,t),n=i.slice(t+1);return[e,n]}var sZ=typeof document>"u"?null:document.documentElement;function j1(i){let t=i.parentNode||i.host||null;return t===sZ?null:t}function aZ(i){return i.substring(1,6)=="ebkit"}var ad=null,HF=!1;function lZ(i){ad||(ad=cZ()||{},HF=ad.style?"WebkitAppearance"in ad.style:!1);let t=!0;return ad.style&&!aZ(i)&&(t=i in ad.style,!t&&HF&&(t="Webkit"+i.charAt(0).toUpperCase()+i.slice(1)in ad.style)),t}function cZ(){return typeof document<"u"?document.body:null}function t3(i,t){for(;t;){if(t===i)return!0;t=j1(t)}return!1}function n3(i,t,e){if(e)return Array.from(i.querySelectorAll(t));let n=i.querySelector(t);return n?[n]:[]}var W1=(()=>{class i{validateStyleProperty(e){return lZ(e)}containsElement(e,n){return t3(e,n)}getParentElement(e){return j1(e)}query(e,n,r){return n3(e,n,r)}computeStyle(e,n,r){return r||""}animate(e,n,r,o,s,a=[],l){return new kl(r,o)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac})}}return i})(),dd=class{static{this.NOOP=new W1}},ud=class{};var dZ=1e3,i3="{{",uZ="}}",r3="ng-enter",E1="ng-leave",B0="ng-trigger",G0=".ng-trigger",GF="ng-animating",I1=".ng-animating";function Na(i){if(typeof i=="number")return i;let t=i.match(/^(-?[\.\d]+)(m?s)/);return!t||t.length<2?0:T1(parseFloat(t[1]),t[2])}function T1(i,t){switch(t){case"s":return i*dZ;default:return i}}function j0(i,t,e){return i.hasOwnProperty("duration")?i:hZ(i,t,e)}function hZ(i,t,e){let n=/^(-?[\.\d]+)(m?s)(?:\s+(-?[\.\d]+)(m?s))?(?:\s+([-a-z]+(?:\(.+?\))?))?$/i,r,o=0,s="";if(typeof i=="string"){let a=i.match(n);if(a===null)return t.push(zF(i)),{duration:0,delay:0,easing:""};r=T1(parseFloat(a[1]),a[2]);let l=a[3];l!=null&&(o=T1(parseFloat(l),a[4]));let c=a[5];c&&(s=c)}else r=i;if(!e){let a=!1,l=t.length;r<0&&(t.push(DQ()),a=!0),o<0&&(t.push(OQ()),a=!0),a&&t.splice(l,0,zF(i))}return{duration:r,delay:o,easing:s}}function pZ(i){return i.length?i[0]instanceof Map?i:i.map(t=>new Map(Object.entries(t))):[]}function $s(i,t,e){t.forEach((n,r)=>{let o=$1(r);e&&!e.has(r)&&e.set(r,i.style[o]),i.style[o]=n})}function cd(i,t){t.forEach((e,n)=>{let r=$1(n);i.style[r]=""})}function Dm(i){return Array.isArray(i)?i.length==1?i[0]:FF(i):i}function fZ(i,t,e){let n=t.params||{},r=o3(i);r.length&&r.forEach(o=>{n.hasOwnProperty(o)||e.push(PQ(o))})}var D1=new RegExp(`${i3}\\s*(.+?)\\s*${uZ}`,"g");function o3(i){let t=[];if(typeof i=="string"){let e;for(;e=D1.exec(i);)t.push(e[1]);D1.lastIndex=0}return t}function Pm(i,t,e){let n=`${i}`,r=n.replace(D1,(o,s)=>{let a=t[s];return a==null&&(e.push(RQ(s)),a=""),a.toString()});return r==n?i:r}var mZ=/-+([a-z0-9])/g;function $1(i){return i.replace(mZ,(...t)=>t[1].toUpperCase())}function gZ(i,t){return i===0||t===0}function _Z(i,t,e){if(e.size&&t.length){let n=t[0],r=[];if(e.forEach((o,s)=>{n.has(s)||r.push(s),n.set(s,o)}),r.length)for(let o=1;os.set(a,q1(i,a)))}}return t}function xo(i,t,e){switch(t.type){case Ut.Trigger:return i.visitTrigger(t,e);case Ut.State:return i.visitState(t,e);case Ut.Transition:return i.visitTransition(t,e);case Ut.Sequence:return i.visitSequence(t,e);case Ut.Group:return i.visitGroup(t,e);case Ut.Animate:return i.visitAnimate(t,e);case Ut.Keyframes:return i.visitKeyframes(t,e);case Ut.Style:return i.visitStyle(t,e);case Ut.Reference:return i.visitReference(t,e);case Ut.AnimateChild:return i.visitAnimateChild(t,e);case Ut.AnimateRef:return i.visitAnimateRef(t,e);case Ut.Query:return i.visitQuery(t,e);case Ut.Stagger:return i.visitStagger(t,e);default:throw AQ(t.type)}}function q1(i,t){return window.getComputedStyle(i)[t]}var vZ=new Set(["width","height","minWidth","minHeight","maxWidth","maxHeight","left","top","bottom","right","fontSize","outlineWidth","outlineOffset","paddingTop","paddingLeft","paddingBottom","paddingRight","marginTop","marginLeft","marginBottom","marginRight","borderRadius","borderWidth","borderTopWidth","borderLeftWidth","borderRightWidth","borderBottomWidth","textIndent","perspective"]),W0=class extends ud{normalizePropertyName(t,e){return $1(t)}normalizeStyleValue(t,e,n,r){let o="",s=n.toString().trim();if(vZ.has(e)&&n!==0&&n!=="0")if(typeof n=="number")o="px";else{let a=n.match(/^[+-]?[\d\.]+([a-z]*)$/);a&&a[1].length==0&&r.push(NQ(t,n))}return s+o}};var $0="*";function yZ(i,t){let e=[];return typeof i=="string"?i.split(/\s*,\s*/).forEach(n=>bZ(n,e,t)):e.push(i),e}function bZ(i,t,e){if(i[0]==":"){let l=xZ(i,e);if(typeof l=="function"){t.push(l);return}i=l}let n=i.match(/^(\*|[-\w]+)\s*()\s*(\*|[-\w]+)$/);if(n==null||n.length<4)return e.push($Q(i)),t;let r=n[1],o=n[2],s=n[3];t.push(jF(r,s));let a=r==$0&&s==$0;o[0]=="<"&&!a&&t.push(jF(s,r))}function xZ(i,t){switch(i){case":enter":return"void => *";case":leave":return"* => void";case":increment":return(e,n)=>parseFloat(n)>parseFloat(e);case":decrement":return(e,n)=>parseFloat(n) *"}}var V0=new Set(["true","1"]),z0=new Set(["false","0"]);function jF(i,t){let e=V0.has(i)||z0.has(i),n=V0.has(t)||z0.has(t);return(r,o)=>{let s=i==$0||i==r,a=t==$0||t==o;return!s&&e&&typeof r=="boolean"&&(s=r?V0.has(i):z0.has(i)),!a&&n&&typeof o=="boolean"&&(a=o?V0.has(t):z0.has(t)),s&&a}}var s3=":self",wZ=new RegExp(`s*${s3}s*,?`,"g");function a3(i,t,e,n){return new O1(i).build(t,e,n)}var WF="",O1=class{constructor(t){this._driver=t}build(t,e,n){let r=new P1(e);return this._resetContextStyleTimingState(r),xo(this,Dm(t),r)}_resetContextStyleTimingState(t){t.currentQuerySelector=WF,t.collectedStyles=new Map,t.collectedStyles.set(WF,new Map),t.currentTime=0}visitTrigger(t,e){let n=e.queryCount=0,r=e.depCount=0,o=[],s=[];return t.name.charAt(0)=="@"&&e.errors.push(kQ()),t.definitions.forEach(a=>{if(this._resetContextStyleTimingState(e),a.type==Ut.State){let l=a,c=l.name;c.toString().split(/\s*,\s*/).forEach(d=>{l.name=d,o.push(this.visitState(l,e))}),l.name=c}else if(a.type==Ut.Transition){let l=this.visitTransition(a,e);n+=l.queryCount,r+=l.depCount,s.push(l)}else e.errors.push(LQ())}),{type:Ut.Trigger,name:t.name,states:o,transitions:s,queryCount:n,depCount:r,options:null}}visitState(t,e){let n=this.visitStyle(t.styles,e),r=t.options&&t.options.params||null;if(n.containsDynamicStyles){let o=new Set,s=r||{};n.styles.forEach(a=>{a instanceof Map&&a.forEach(l=>{o3(l).forEach(c=>{s.hasOwnProperty(c)||o.add(c)})})}),o.size&&e.errors.push(FQ(t.name,[...o.values()]))}return{type:Ut.State,name:t.name,style:n,options:r?{params:r}:null}}visitTransition(t,e){e.queryCount=0,e.depCount=0;let n=xo(this,Dm(t.animation),e),r=yZ(t.expr,e.errors);return{type:Ut.Transition,matchers:r,animation:n,queryCount:e.queryCount,depCount:e.depCount,options:ld(t.options)}}visitSequence(t,e){return{type:Ut.Sequence,steps:t.steps.map(n=>xo(this,n,e)),options:ld(t.options)}}visitGroup(t,e){let n=e.currentTime,r=0,o=t.steps.map(s=>{e.currentTime=n;let a=xo(this,s,e);return r=Math.max(r,e.currentTime),a});return e.currentTime=r,{type:Ut.Group,steps:o,options:ld(t.options)}}visitAnimate(t,e){let n=EZ(t.timings,e.errors);e.currentAnimateTimings=n;let r,o=t.styles?t.styles:en({});if(o.type==Ut.Keyframes)r=this.visitKeyframes(o,e);else{let s=t.styles,a=!1;if(!s){a=!0;let c={};n.easing&&(c.easing=n.easing),s=en(c)}e.currentTime+=n.duration+n.delay;let l=this.visitStyle(s,e);l.isEmptyStep=a,r=l}return e.currentAnimateTimings=null,{type:Ut.Animate,timings:n,style:r,options:null}}visitStyle(t,e){let n=this._makeStyleAst(t,e);return this._validateStyleAst(n,e),n}_makeStyleAst(t,e){let n=[],r=Array.isArray(t.styles)?t.styles:[t.styles];for(let a of r)typeof a=="string"?a===Ws?n.push(a):e.errors.push(BQ(a)):n.push(new Map(Object.entries(a)));let o=!1,s=null;return n.forEach(a=>{if(a instanceof Map&&(a.has("easing")&&(s=a.get("easing"),a.delete("easing")),!o)){for(let l of a.values())if(l.toString().indexOf(i3)>=0){o=!0;break}}}),{type:Ut.Style,styles:n,easing:s,offset:t.offset,containsDynamicStyles:o,options:null}}_validateStyleAst(t,e){let n=e.currentAnimateTimings,r=e.currentTime,o=e.currentTime;n&&o>0&&(o-=n.duration+n.delay),t.styles.forEach(s=>{typeof s!="string"&&s.forEach((a,l)=>{let c=e.collectedStyles.get(e.currentQuerySelector),d=c.get(l),u=!0;d&&(o!=r&&o>=d.startTime&&r<=d.endTime&&(e.errors.push(VQ(l,d.startTime,d.endTime,o,r)),u=!1),o=d.startTime),u&&c.set(l,{startTime:o,endTime:r}),e.options&&fZ(a,e.options,e.errors)})})}visitKeyframes(t,e){let n={type:Ut.Keyframes,styles:[],options:null};if(!e.currentAnimateTimings)return e.errors.push(zQ()),n;let r=1,o=0,s=[],a=!1,l=!1,c=0,d=t.steps.map(g=>{let _=this._makeStyleAst(g,e),x=_.offset!=null?_.offset:MZ(_.styles),C=0;return x!=null&&(o++,C=_.offset=x),l=l||C<0||C>1,a=a||C0&&o{let x=h>0?_==p?1:h*_:s[_],C=x*b;e.currentTime=f+m.delay+C,m.duration=C,this._validateStyleAst(g,e),g.offset=x,n.styles.push(g)}),n}visitReference(t,e){return{type:Ut.Reference,animation:xo(this,Dm(t.animation),e),options:ld(t.options)}}visitAnimateChild(t,e){return e.depCount++,{type:Ut.AnimateChild,options:ld(t.options)}}visitAnimateRef(t,e){return{type:Ut.AnimateRef,animation:this.visitReference(t.animation,e),options:ld(t.options)}}visitQuery(t,e){let n=e.currentQuerySelector,r=t.options||{};e.queryCount++,e.currentQuery=t;let[o,s]=CZ(t.selector);e.currentQuerySelector=n.length?n+" "+o:o,wo(e.collectedStyles,e.currentQuerySelector,new Map);let a=xo(this,Dm(t.animation),e);return e.currentQuery=null,e.currentQuerySelector=n,{type:Ut.Query,selector:o,limit:r.limit||0,optional:!!r.optional,includeSelf:s,animation:a,originalSelector:t.selector,options:ld(t.options)}}visitStagger(t,e){e.currentQuery||e.errors.push(jQ());let n=t.timings==="full"?{duration:0,delay:0,easing:"full"}:j0(t.timings,e.errors,!0);return{type:Ut.Stagger,animation:xo(this,Dm(t.animation),e),timings:n,options:null}}};function CZ(i){let t=!!i.split(/\s*,\s*/).find(e=>e==s3);return t&&(i=i.replace(wZ,"")),i=i.replace(/@\*/g,G0).replace(/@\w+/g,e=>G0+"-"+e.slice(1)).replace(/:animating/g,I1),[i,t]}function SZ(i){return i?X({},i):null}var P1=class{constructor(t){this.errors=t,this.queryCount=0,this.depCount=0,this.currentTransition=null,this.currentQuery=null,this.currentQuerySelector=null,this.currentAnimateTimings=null,this.currentTime=0,this.collectedStyles=new Map,this.options=null,this.unsupportedCSSPropertiesFound=new Set}};function MZ(i){if(typeof i=="string")return null;let t=null;if(Array.isArray(i))i.forEach(e=>{if(e instanceof Map&&e.has("offset")){let n=e;t=parseFloat(n.get("offset")),n.delete("offset")}});else if(i instanceof Map&&i.has("offset")){let e=i;t=parseFloat(e.get("offset")),e.delete("offset")}return t}function EZ(i,t){if(i.hasOwnProperty("duration"))return i;if(typeof i=="number"){let o=j0(i,t).duration;return x1(o,0,"")}let e=i;if(e.split(/\s+/).some(o=>o.charAt(0)=="{"&&o.charAt(1)=="{")){let o=x1(0,0,"");return o.dynamic=!0,o.strValue=e,o}let r=j0(e,t);return x1(r.duration,r.delay,r.easing)}function ld(i){return i?(i=X({},i),i.params&&(i.params=SZ(i.params))):i={},i}function x1(i,t,e){return{duration:i,delay:t,easing:e}}function Y1(i,t,e,n,r,o,s=null,a=!1){return{type:1,element:i,keyframes:t,preStyleProps:e,postStyleProps:n,duration:r,delay:o,totalTime:r+o,easing:s,subTimeline:a}}var Rm=class{constructor(){this._map=new Map}get(t){return this._map.get(t)||[]}append(t,e){let n=this._map.get(t);n||this._map.set(t,n=[]),n.push(...e)}has(t){return this._map.has(t)}clear(){this._map.clear()}},IZ=1,TZ=":enter",DZ=new RegExp(TZ,"g"),OZ=":leave",PZ=new RegExp(OZ,"g");function l3(i,t,e,n,r,o=new Map,s=new Map,a,l,c=[]){return new R1().buildKeyframes(i,t,e,n,r,o,s,a,l,c)}var R1=class{buildKeyframes(t,e,n,r,o,s,a,l,c,d=[]){c=c||new Rm;let u=new A1(t,e,c,r,o,d,[]);u.options=l;let h=l.delay?Na(l.delay):0;u.currentTimeline.delayNextStep(h),u.currentTimeline.setStyles([s],null,u.errors,l),xo(this,n,u);let p=u.timelines.filter(f=>f.containsAnimation());if(p.length&&a.size){let f;for(let m=p.length-1;m>=0;m--){let b=p[m];if(b.element===e){f=b;break}}f&&!f.allowOnlyTimelineStyles()&&f.setStyles([a],null,u.errors,l)}return p.length?p.map(f=>f.buildKeyframes()):[Y1(e,[],[],[],0,h,"",!1)]}visitTrigger(t,e){}visitState(t,e){}visitTransition(t,e){}visitAnimateChild(t,e){let n=e.subInstructions.get(e.element);if(n){let r=e.createSubContext(t.options),o=e.currentTimeline.currentTime,s=this._visitSubInstructions(n,r,r.options);o!=s&&e.transformIntoNewTimeline(s)}e.previousNode=t}visitAnimateRef(t,e){let n=e.createSubContext(t.options);n.transformIntoNewTimeline(),this._applyAnimationRefDelays([t.options,t.animation.options],e,n),this.visitReference(t.animation,n),e.transformIntoNewTimeline(n.currentTimeline.currentTime),e.previousNode=t}_applyAnimationRefDelays(t,e,n){for(let r of t){let o=r?.delay;if(o){let s=typeof o=="number"?o:Na(Pm(o,r?.params??{},e.errors));n.delayNextStep(s)}}}_visitSubInstructions(t,e,n){let o=e.currentTimeline.currentTime,s=n.duration!=null?Na(n.duration):null,a=n.delay!=null?Na(n.delay):null;return s!==0&&t.forEach(l=>{let c=e.appendInstructionToTimeline(l,s,a);o=Math.max(o,c.duration+c.delay)}),o}visitReference(t,e){e.updateOptions(t.options,!0),xo(this,t.animation,e),e.previousNode=t}visitSequence(t,e){let n=e.subContextCount,r=e,o=t.options;if(o&&(o.params||o.delay)&&(r=e.createSubContext(o),r.transformIntoNewTimeline(),o.delay!=null)){r.previousNode.type==Ut.Style&&(r.currentTimeline.snapshotCurrentStyles(),r.previousNode=q0);let s=Na(o.delay);r.delayNextStep(s)}t.steps.length&&(t.steps.forEach(s=>xo(this,s,r)),r.currentTimeline.applyStylesToKeyframe(),r.subContextCount>n&&r.transformIntoNewTimeline()),e.previousNode=t}visitGroup(t,e){let n=[],r=e.currentTimeline.currentTime,o=t.options&&t.options.delay?Na(t.options.delay):0;t.steps.forEach(s=>{let a=e.createSubContext(t.options);o&&a.delayNextStep(o),xo(this,s,a),r=Math.max(r,a.currentTimeline.currentTime),n.push(a.currentTimeline)}),n.forEach(s=>e.currentTimeline.mergeTimelineCollectedStyles(s)),e.transformIntoNewTimeline(r),e.previousNode=t}_visitTiming(t,e){if(t.dynamic){let n=t.strValue,r=e.params?Pm(n,e.params,e.errors):n;return j0(r,e.errors)}else return{duration:t.duration,delay:t.delay,easing:t.easing}}visitAnimate(t,e){let n=e.currentAnimateTimings=this._visitTiming(t.timings,e),r=e.currentTimeline;n.delay&&(e.incrementTime(n.delay),r.snapshotCurrentStyles());let o=t.style;o.type==Ut.Keyframes?this.visitKeyframes(o,e):(e.incrementTime(n.duration),this.visitStyle(o,e),r.applyStylesToKeyframe()),e.currentAnimateTimings=null,e.previousNode=t}visitStyle(t,e){let n=e.currentTimeline,r=e.currentAnimateTimings;!r&&n.hasCurrentStyleProperties()&&n.forwardFrame();let o=r&&r.easing||t.easing;t.isEmptyStep?n.applyEmptyStep(o):n.setStyles(t.styles,o,e.errors,e.options),e.previousNode=t}visitKeyframes(t,e){let n=e.currentAnimateTimings,r=e.currentTimeline.duration,o=n.duration,a=e.createSubContext().currentTimeline;a.easing=n.easing,t.styles.forEach(l=>{let c=l.offset||0;a.forwardTime(c*o),a.setStyles(l.styles,l.easing,e.errors,e.options),a.applyStylesToKeyframe()}),e.currentTimeline.mergeTimelineCollectedStyles(a),e.transformIntoNewTimeline(r+o),e.previousNode=t}visitQuery(t,e){let n=e.currentTimeline.currentTime,r=t.options||{},o=r.delay?Na(r.delay):0;o&&(e.previousNode.type===Ut.Style||n==0&&e.currentTimeline.hasCurrentStyleProperties())&&(e.currentTimeline.snapshotCurrentStyles(),e.previousNode=q0);let s=n,a=e.invokeQuery(t.selector,t.originalSelector,t.limit,t.includeSelf,!!r.optional,e.errors);e.currentQueryTotal=a.length;let l=null;a.forEach((c,d)=>{e.currentQueryIndex=d;let u=e.createSubContext(t.options,c);o&&u.delayNextStep(o),c===e.element&&(l=u.currentTimeline),xo(this,t.animation,u),u.currentTimeline.applyStylesToKeyframe();let h=u.currentTimeline.currentTime;s=Math.max(s,h)}),e.currentQueryIndex=0,e.currentQueryTotal=0,e.transformIntoNewTimeline(s),l&&(e.currentTimeline.mergeTimelineCollectedStyles(l),e.currentTimeline.snapshotCurrentStyles()),e.previousNode=t}visitStagger(t,e){let n=e.parentContext,r=e.currentTimeline,o=t.timings,s=Math.abs(o.duration),a=s*(e.currentQueryTotal-1),l=s*e.currentQueryIndex;switch(o.duration<0?"reverse":o.easing){case"reverse":l=a-l;break;case"full":l=n.currentStaggerTime;break}let d=e.currentTimeline;l&&d.delayNextStep(l);let u=d.currentTime;xo(this,t.animation,e),e.previousNode=t,n.currentStaggerTime=r.currentTime-u+(r.startTime-n.currentTimeline.startTime)}},q0={},A1=class i{constructor(t,e,n,r,o,s,a,l){this._driver=t,this.element=e,this.subInstructions=n,this._enterClassName=r,this._leaveClassName=o,this.errors=s,this.timelines=a,this.parentContext=null,this.currentAnimateTimings=null,this.previousNode=q0,this.subContextCount=0,this.options={},this.currentQueryIndex=0,this.currentQueryTotal=0,this.currentStaggerTime=0,this.currentTimeline=l||new Y0(this._driver,e,0),a.push(this.currentTimeline)}get params(){return this.options.params}updateOptions(t,e){if(!t)return;let n=t,r=this.options;n.duration!=null&&(r.duration=Na(n.duration)),n.delay!=null&&(r.delay=Na(n.delay));let o=n.params;if(o){let s=r.params;s||(s=this.options.params={}),Object.keys(o).forEach(a=>{(!e||!s.hasOwnProperty(a))&&(s[a]=Pm(o[a],s,this.errors))})}}_copyOptions(){let t={};if(this.options){let e=this.options.params;if(e){let n=t.params={};Object.keys(e).forEach(r=>{n[r]=e[r]})}}return t}createSubContext(t=null,e,n){let r=e||this.element,o=new i(this._driver,r,this.subInstructions,this._enterClassName,this._leaveClassName,this.errors,this.timelines,this.currentTimeline.fork(r,n||0));return o.previousNode=this.previousNode,o.currentAnimateTimings=this.currentAnimateTimings,o.options=this._copyOptions(),o.updateOptions(t),o.currentQueryIndex=this.currentQueryIndex,o.currentQueryTotal=this.currentQueryTotal,o.parentContext=this,this.subContextCount++,o}transformIntoNewTimeline(t){return this.previousNode=q0,this.currentTimeline=this.currentTimeline.fork(this.element,t),this.timelines.push(this.currentTimeline),this.currentTimeline}appendInstructionToTimeline(t,e,n){let r={duration:e??t.duration,delay:this.currentTimeline.currentTime+(n??0)+t.delay,easing:""},o=new N1(this._driver,t.element,t.keyframes,t.preStyleProps,t.postStyleProps,r,t.stretchStartingKeyframe);return this.timelines.push(o),r}incrementTime(t){this.currentTimeline.forwardTime(this.currentTimeline.duration+t)}delayNextStep(t){t>0&&this.currentTimeline.delayNextStep(t)}invokeQuery(t,e,n,r,o,s){let a=[];if(r&&a.push(this.element),t.length>0){t=t.replace(DZ,"."+this._enterClassName),t=t.replace(PZ,"."+this._leaveClassName);let l=n!=1,c=this._driver.query(this.element,t,l);n!==0&&(c=n<0?c.slice(c.length+n,c.length):c.slice(0,n)),a.push(...c)}return!o&&a.length==0&&s.push(WQ(e)),a}},Y0=class i{constructor(t,e,n,r){this._driver=t,this.element=e,this.startTime=n,this._elementTimelineStylesLookup=r,this.duration=0,this.easing=null,this._previousKeyframe=new Map,this._currentKeyframe=new Map,this._keyframes=new Map,this._styleSummary=new Map,this._localTimelineStyles=new Map,this._pendingStyles=new Map,this._backFill=new Map,this._currentEmptyStepKeyframe=null,this._elementTimelineStylesLookup||(this._elementTimelineStylesLookup=new Map),this._globalTimelineStyles=this._elementTimelineStylesLookup.get(e),this._globalTimelineStyles||(this._globalTimelineStyles=this._localTimelineStyles,this._elementTimelineStylesLookup.set(e,this._localTimelineStyles)),this._loadKeyframe()}containsAnimation(){switch(this._keyframes.size){case 0:return!1;case 1:return this.hasCurrentStyleProperties();default:return!0}}hasCurrentStyleProperties(){return this._currentKeyframe.size>0}get currentTime(){return this.startTime+this.duration}delayNextStep(t){let e=this._keyframes.size===1&&this._pendingStyles.size;this.duration||e?(this.forwardTime(this.currentTime+t),e&&this.snapshotCurrentStyles()):this.startTime+=t}fork(t,e){return this.applyStylesToKeyframe(),new i(this._driver,t,e||this.currentTime,this._elementTimelineStylesLookup)}_loadKeyframe(){this._currentKeyframe&&(this._previousKeyframe=this._currentKeyframe),this._currentKeyframe=this._keyframes.get(this.duration),this._currentKeyframe||(this._currentKeyframe=new Map,this._keyframes.set(this.duration,this._currentKeyframe))}forwardFrame(){this.duration+=IZ,this._loadKeyframe()}forwardTime(t){this.applyStylesToKeyframe(),this.duration=t,this._loadKeyframe()}_updateStyle(t,e){this._localTimelineStyles.set(t,e),this._globalTimelineStyles.set(t,e),this._styleSummary.set(t,{time:this.currentTime,value:e})}allowOnlyTimelineStyles(){return this._currentEmptyStepKeyframe!==this._currentKeyframe}applyEmptyStep(t){t&&this._previousKeyframe.set("easing",t);for(let[e,n]of this._globalTimelineStyles)this._backFill.set(e,n||Ws),this._currentKeyframe.set(e,Ws);this._currentEmptyStepKeyframe=this._currentKeyframe}setStyles(t,e,n,r){e&&this._previousKeyframe.set("easing",e);let o=r&&r.params||{},s=RZ(t,this._globalTimelineStyles);for(let[a,l]of s){let c=Pm(l,o,n);this._pendingStyles.set(a,c),this._localTimelineStyles.has(a)||this._backFill.set(a,this._globalTimelineStyles.get(a)??Ws),this._updateStyle(a,c)}}applyStylesToKeyframe(){this._pendingStyles.size!=0&&(this._pendingStyles.forEach((t,e)=>{this._currentKeyframe.set(e,t)}),this._pendingStyles.clear(),this._localTimelineStyles.forEach((t,e)=>{this._currentKeyframe.has(e)||this._currentKeyframe.set(e,t)}))}snapshotCurrentStyles(){for(let[t,e]of this._localTimelineStyles)this._pendingStyles.set(t,e),this._updateStyle(t,e)}getFinalKeyframe(){return this._keyframes.get(this.duration)}get properties(){let t=[];for(let e in this._currentKeyframe)t.push(e);return t}mergeTimelineCollectedStyles(t){t._styleSummary.forEach((e,n)=>{let r=this._styleSummary.get(n);(!r||e.time>r.time)&&this._updateStyle(n,e.value)})}buildKeyframes(){this.applyStylesToKeyframe();let t=new Set,e=new Set,n=this._keyframes.size===1&&this.duration===0,r=[];this._keyframes.forEach((a,l)=>{let c=new Map([...this._backFill,...a]);c.forEach((d,u)=>{d===F0?t.add(u):d===Ws&&e.add(u)}),n||c.set("offset",l/this.duration),r.push(c)});let o=[...t.values()],s=[...e.values()];if(n){let a=r[0],l=new Map(a);a.set("offset",0),l.set("offset",1),r=[a,l]}return Y1(this.element,r,o,s,this.duration,this.startTime,this.easing,!1)}},N1=class extends Y0{constructor(t,e,n,r,o,s,a=!1){super(t,e,s.delay),this.keyframes=n,this.preStyleProps=r,this.postStyleProps=o,this._stretchStartingKeyframe=a,this.timings={duration:s.duration,delay:s.delay,easing:s.easing}}containsAnimation(){return this.keyframes.length>1}buildKeyframes(){let t=this.keyframes,{delay:e,duration:n,easing:r}=this.timings;if(this._stretchStartingKeyframe&&e){let o=[],s=n+e,a=e/s,l=new Map(t[0]);l.set("offset",0),o.push(l);let c=new Map(t[0]);c.set("offset",$F(a)),o.push(c);let d=t.length-1;for(let u=1;u<=d;u++){let h=new Map(t[u]),p=h.get("offset"),f=e+p*n;h.set("offset",$F(f/s)),o.push(h)}n=s,e=0,r="",t=o}return Y1(this.element,t,this.preStyleProps,this.postStyleProps,n,e,r,!0)}};function $F(i,t=3){let e=Math.pow(10,t-1);return Math.round(i*e)/e}function RZ(i,t){let e=new Map,n;return i.forEach(r=>{if(r==="*"){n??=t.keys();for(let o of n)e.set(o,Ws)}else for(let[o,s]of r)e.set(o,s)}),e}function qF(i,t,e,n,r,o,s,a,l,c,d,u,h){return{type:0,element:i,triggerName:t,isRemovalTransition:r,fromState:e,fromStyles:o,toState:n,toStyles:s,timelines:a,queriedElements:l,preStyleProps:c,postStyleProps:d,totalTime:u,errors:h}}var w1={},X0=class{constructor(t,e,n){this._triggerName=t,this.ast=e,this._stateStyles=n}match(t,e,n,r){return AZ(this.ast.matchers,t,e,n,r)}buildStyles(t,e,n){let r=this._stateStyles.get("*");return t!==void 0&&(r=this._stateStyles.get(t?.toString())||r),r?r.buildStyles(e,n):new Map}build(t,e,n,r,o,s,a,l,c,d){let u=[],h=this.ast.options&&this.ast.options.params||w1,p=a&&a.params||w1,f=this.buildStyles(n,p,u),m=l&&l.params||w1,b=this.buildStyles(r,m,u),g=new Set,_=new Map,x=new Map,C=r==="void",T={params:c3(m,h),delay:this.ast.options?.delay},D=d?[]:l3(t,e,this.ast.animation,o,s,f,b,T,c,u),E=0;return D.forEach(A=>{E=Math.max(A.duration+A.delay,E)}),u.length?qF(e,this._triggerName,n,r,C,f,b,[],[],_,x,E,u):(D.forEach(A=>{let Q=A.element,F=wo(_,Q,new Set);A.preStyleProps.forEach(O=>F.add(O));let z=wo(x,Q,new Set);A.postStyleProps.forEach(O=>z.add(O)),Q!==e&&g.add(Q)}),qF(e,this._triggerName,n,r,C,f,b,D,[...g.values()],_,x,E))}};function AZ(i,t,e,n,r){return i.some(o=>o(t,e,n,r))}function c3(i,t){let e=X({},t);return Object.entries(i).forEach(([n,r])=>{r!=null&&(e[n]=r)}),e}var k1=class{constructor(t,e,n){this.styles=t,this.defaultParams=e,this.normalizer=n}buildStyles(t,e){let n=new Map,r=c3(t,this.defaultParams);return this.styles.styles.forEach(o=>{typeof o!="string"&&o.forEach((s,a)=>{s&&(s=Pm(s,r,e));let l=this.normalizer.normalizePropertyName(a,e);s=this.normalizer.normalizeStyleValue(a,l,s,e),n.set(a,s)})}),n}};function NZ(i,t,e){return new L1(i,t,e)}var L1=class{constructor(t,e,n){this.name=t,this.ast=e,this._normalizer=n,this.transitionFactories=[],this.states=new Map,e.states.forEach(r=>{let o=r.options&&r.options.params||{};this.states.set(r.name,new k1(r.style,o,n))}),YF(this.states,"true","1"),YF(this.states,"false","0"),e.transitions.forEach(r=>{this.transitionFactories.push(new X0(t,r,this.states))}),this.fallbackTransition=kZ(t,this.states,this._normalizer)}get containsQueries(){return this.ast.queryCount>0}matchTransition(t,e,n,r){return this.transitionFactories.find(s=>s.match(t,e,n,r))||null}matchStyles(t,e,n){return this.fallbackTransition.buildStyles(t,e,n)}};function kZ(i,t,e){let n=[(s,a)=>!0],r={type:Ut.Sequence,steps:[],options:null},o={type:Ut.Transition,animation:r,matchers:n,options:null,queryCount:0,depCount:0};return new X0(i,o,t)}function YF(i,t,e){i.has(t)?i.has(e)||i.set(e,i.get(t)):i.has(e)&&i.set(t,i.get(e))}var LZ=new Rm,F1=class{constructor(t,e,n){this.bodyNode=t,this._driver=e,this._normalizer=n,this._animations=new Map,this._playersById=new Map,this.players=[]}register(t,e){let n=[],r=[],o=a3(this._driver,e,n,r);if(n.length)throw QQ(n);r.length&&void 0,this._animations.set(t,o)}_buildPlayer(t,e,n){let r=t.element,o=e3(this._normalizer,t.keyframes,e,n);return this._driver.animate(r,o,t.duration,t.delay,t.easing,[],!0)}create(t,e,n={}){let r=[],o=this._animations.get(t),s,a=new Map;if(o?(s=l3(this._driver,e,o,r3,E1,new Map,new Map,n,LZ,r),s.forEach(d=>{let u=wo(a,d.element,new Map);d.postStyleProps.forEach(h=>u.set(h,null))})):(r.push(ZQ()),s=[]),r.length)throw KQ(r);a.forEach((d,u)=>{d.forEach((h,p)=>{d.set(p,this._driver.computeStyle(u,p,Ws))})});let l=s.map(d=>{let u=a.get(d.element);return this._buildPlayer(d,new Map,u)}),c=Ll(l);return this._playersById.set(t,c),c.onDestroy(()=>this.destroy(t)),this.players.push(c),c}destroy(t){let e=this._getPlayer(t);e.destroy(),this._playersById.delete(t);let n=this.players.indexOf(e);n>=0&&this.players.splice(n,1)}_getPlayer(t){let e=this._playersById.get(t);if(!e)throw JQ(t);return e}listen(t,e,n,r){let o=G1(e,"","","");return H1(this._getPlayer(t),n,o,r),()=>{}}command(t,e,n,r){if(n=="register"){this.register(t,r[0]);return}if(n=="create"){let s=r[0]||{};this.create(t,e,s);return}let o=this._getPlayer(t);switch(n){case"play":o.play();break;case"pause":o.pause();break;case"reset":o.reset();break;case"restart":o.restart();break;case"finish":o.finish();break;case"init":o.init();break;case"setPosition":o.setPosition(parseFloat(r[0]));break;case"destroy":this.destroy(t);break}}},XF="ng-animate-queued",FZ=".ng-animate-queued",C1="ng-animate-disabled",BZ=".ng-animate-disabled",VZ="ng-star-inserted",zZ=".ng-star-inserted",UZ=[],d3={namespaceId:"",setForRemoval:!1,setForMove:!1,hasAnimation:!1,removedBeforeQueried:!1},HZ={namespaceId:"",setForMove:!1,setForRemoval:!1,hasAnimation:!1,removedBeforeQueried:!0},_s="__ng_removed",Am=class{get params(){return this.options.params}constructor(t,e=""){this.namespaceId=e;let n=t&&t.hasOwnProperty("value"),r=n?t.value:t;if(this.value=jZ(r),n){let o=t,{value:s}=o,a=SS(o,["value"]);this.options=a}else this.options={};this.options.params||(this.options.params={})}absorbOptions(t){let e=t.params;if(e){let n=this.options.params;Object.keys(e).forEach(r=>{n[r]==null&&(n[r]=e[r])})}}},Om="void",S1=new Am(Om),B1=class{constructor(t,e,n){this.id=t,this.hostElement=e,this._engine=n,this.players=[],this._triggers=new Map,this._queue=[],this._elementListeners=new Map,this._hostClassName="ng-tns-"+t,Ho(e,this._hostClassName)}listen(t,e,n,r){if(!this._triggers.has(e))throw eZ(n,e);if(n==null||n.length==0)throw tZ(e);if(!WZ(n))throw nZ(n,e);let o=wo(this._elementListeners,t,[]),s={name:e,phase:n,callback:r};o.push(s);let a=wo(this._engine.statesByElement,t,new Map);return a.has(e)||(Ho(t,B0),Ho(t,B0+"-"+e),a.set(e,S1)),()=>{this._engine.afterFlush(()=>{let l=o.indexOf(s);l>=0&&o.splice(l,1),this._triggers.has(e)||a.delete(e)})}}register(t,e){return this._triggers.has(t)?!1:(this._triggers.set(t,e),!0)}_getTrigger(t){let e=this._triggers.get(t);if(!e)throw iZ(t);return e}trigger(t,e,n,r=!0){let o=this._getTrigger(e),s=new Nm(this.id,e,t),a=this._engine.statesByElement.get(t);a||(Ho(t,B0),Ho(t,B0+"-"+e),this._engine.statesByElement.set(t,a=new Map));let l=a.get(e),c=new Am(n,this.id);if(!(n&&n.hasOwnProperty("value"))&&l&&c.absorbOptions(l.options),a.set(e,c),l||(l=S1),!(c.value===Om)&&l.value===c.value){if(!YZ(l.params,c.params)){let m=[],b=o.matchStyles(l.value,l.params,m),g=o.matchStyles(c.value,c.params,m);m.length?this._engine.reportError(m):this._engine.afterFlush(()=>{cd(t,b),$s(t,g)})}return}let h=wo(this._engine.playersByElement,t,[]);h.forEach(m=>{m.namespaceId==this.id&&m.triggerName==e&&m.queued&&m.destroy()});let p=o.matchTransition(l.value,c.value,t,c.params),f=!1;if(!p){if(!r)return;p=o.fallbackTransition,f=!0}return this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:e,transition:p,fromState:l,toState:c,player:s,isFallbackTransition:f}),f||(Ho(t,XF),s.onStart(()=>{yh(t,XF)})),s.onDone(()=>{let m=this.players.indexOf(s);m>=0&&this.players.splice(m,1);let b=this._engine.playersByElement.get(t);if(b){let g=b.indexOf(s);g>=0&&b.splice(g,1)}}),this.players.push(s),h.push(s),s}deregister(t){this._triggers.delete(t),this._engine.statesByElement.forEach(e=>e.delete(t)),this._elementListeners.forEach((e,n)=>{this._elementListeners.set(n,e.filter(r=>r.name!=t))})}clearElementCache(t){this._engine.statesByElement.delete(t),this._elementListeners.delete(t);let e=this._engine.playersByElement.get(t);e&&(e.forEach(n=>n.destroy()),this._engine.playersByElement.delete(t))}_signalRemovalForInnerTriggers(t,e){let n=this._engine.driver.query(t,G0,!0);n.forEach(r=>{if(r[_s])return;let o=this._engine.fetchNamespacesByElement(r);o.size?o.forEach(s=>s.triggerLeaveAnimation(r,e,!1,!0)):this.clearElementCache(r)}),this._engine.afterFlushAnimationsDone(()=>n.forEach(r=>this.clearElementCache(r)))}triggerLeaveAnimation(t,e,n,r){let o=this._engine.statesByElement.get(t),s=new Map;if(o){let a=[];if(o.forEach((l,c)=>{if(s.set(c,l.value),this._triggers.has(c)){let d=this.trigger(t,c,Om,r);d&&a.push(d)}}),a.length)return this._engine.markElementAsRemoved(this.id,t,!0,e,s),n&&Ll(a).onDone(()=>this._engine.processLeaveNode(t)),!0}return!1}prepareLeaveAnimationListeners(t){let e=this._elementListeners.get(t),n=this._engine.statesByElement.get(t);if(e&&n){let r=new Set;e.forEach(o=>{let s=o.name;if(r.has(s))return;r.add(s);let l=this._triggers.get(s).fallbackTransition,c=n.get(s)||S1,d=new Am(Om),u=new Nm(this.id,s,t);this._engine.totalQueuedPlayers++,this._queue.push({element:t,triggerName:s,transition:l,fromState:c,toState:d,player:u,isFallbackTransition:!0})})}}removeNode(t,e){let n=this._engine;if(t.childElementCount&&this._signalRemovalForInnerTriggers(t,e),this.triggerLeaveAnimation(t,e,!0))return;let r=!1;if(n.totalAnimations){let o=n.players.length?n.playersByQueriedElement.get(t):[];if(o&&o.length)r=!0;else{let s=t;for(;s=s.parentNode;)if(n.statesByElement.get(s)){r=!0;break}}}if(this.prepareLeaveAnimationListeners(t),r)n.markElementAsRemoved(this.id,t,!1,e);else{let o=t[_s];(!o||o===d3)&&(n.afterFlush(()=>this.clearElementCache(t)),n.destroyInnerAnimations(t),n._onRemovalComplete(t,e))}}insertNode(t,e){Ho(t,this._hostClassName)}drainQueuedTransitions(t){let e=[];return this._queue.forEach(n=>{let r=n.player;if(r.destroyed)return;let o=n.element,s=this._elementListeners.get(o);s&&s.forEach(a=>{if(a.name==n.triggerName){let l=G1(o,n.triggerName,n.fromState.value,n.toState.value);l._data=t,H1(n.player,a.phase,l,a.callback)}}),r.markedForDestroy?this._engine.afterFlush(()=>{r.destroy()}):e.push(n)}),this._queue=[],e.sort((n,r)=>{let o=n.transition.ast.depCount,s=r.transition.ast.depCount;return o==0||s==0?o-s:this._engine.driver.containsElement(n.element,r.element)?1:-1})}destroy(t){this.players.forEach(e=>e.destroy()),this._signalRemovalForInnerTriggers(this.hostElement,t)}},V1=class{_onRemovalComplete(t,e){this.onRemovalComplete(t,e)}constructor(t,e,n){this.bodyNode=t,this.driver=e,this._normalizer=n,this.players=[],this.newHostElements=new Map,this.playersByElement=new Map,this.playersByQueriedElement=new Map,this.statesByElement=new Map,this.disabledNodes=new Set,this.totalAnimations=0,this.totalQueuedPlayers=0,this._namespaceLookup={},this._namespaceList=[],this._flushFns=[],this._whenQuietFns=[],this.namespacesByHostElement=new Map,this.collectedEnterElements=[],this.collectedLeaveElements=[],this.onRemovalComplete=(r,o)=>{}}get queuedPlayers(){let t=[];return this._namespaceList.forEach(e=>{e.players.forEach(n=>{n.queued&&t.push(n)})}),t}createNamespace(t,e){let n=new B1(t,e,this);return this.bodyNode&&this.driver.containsElement(this.bodyNode,e)?this._balanceNamespaceList(n,e):(this.newHostElements.set(e,n),this.collectEnterElement(e)),this._namespaceLookup[t]=n}_balanceNamespaceList(t,e){let n=this._namespaceList,r=this.namespacesByHostElement;if(n.length-1>=0){let s=!1,a=this.driver.getParentElement(e);for(;a;){let l=r.get(a);if(l){let c=n.indexOf(l);n.splice(c+1,0,t),s=!0;break}a=this.driver.getParentElement(a)}s||n.unshift(t)}else n.push(t);return r.set(e,t),t}register(t,e){let n=this._namespaceLookup[t];return n||(n=this.createNamespace(t,e)),n}registerTrigger(t,e,n){let r=this._namespaceLookup[t];r&&r.register(e,n)&&this.totalAnimations++}destroy(t,e){t&&(this.afterFlush(()=>{}),this.afterFlushAnimationsDone(()=>{let n=this._fetchNamespace(t);this.namespacesByHostElement.delete(n.hostElement);let r=this._namespaceList.indexOf(n);r>=0&&this._namespaceList.splice(r,1),n.destroy(e),delete this._namespaceLookup[t]}))}_fetchNamespace(t){return this._namespaceLookup[t]}fetchNamespacesByElement(t){let e=new Set,n=this.statesByElement.get(t);if(n){for(let r of n.values())if(r.namespaceId){let o=this._fetchNamespace(r.namespaceId);o&&e.add(o)}}return e}trigger(t,e,n,r){if(U0(e)){let o=this._fetchNamespace(t);if(o)return o.trigger(e,n,r),!0}return!1}insertNode(t,e,n,r){if(!U0(e))return;let o=e[_s];if(o&&o.setForRemoval){o.setForRemoval=!1,o.setForMove=!0;let s=this.collectedLeaveElements.indexOf(e);s>=0&&this.collectedLeaveElements.splice(s,1)}if(t){let s=this._fetchNamespace(t);s&&s.insertNode(e,n)}r&&this.collectEnterElement(e)}collectEnterElement(t){this.collectedEnterElements.push(t)}markElementAsDisabled(t,e){e?this.disabledNodes.has(t)||(this.disabledNodes.add(t),Ho(t,C1)):this.disabledNodes.has(t)&&(this.disabledNodes.delete(t),yh(t,C1))}removeNode(t,e,n){if(U0(e)){let r=t?this._fetchNamespace(t):null;r?r.removeNode(e,n):this.markElementAsRemoved(t,e,!1,n);let o=this.namespacesByHostElement.get(e);o&&o.id!==t&&o.removeNode(e,n)}else this._onRemovalComplete(e,n)}markElementAsRemoved(t,e,n,r,o){this.collectedLeaveElements.push(e),e[_s]={namespaceId:t,setForRemoval:r,hasAnimation:n,removedBeforeQueried:!1,previousTriggersValues:o}}listen(t,e,n,r,o){return U0(e)?this._fetchNamespace(t).listen(e,n,r,o):()=>{}}_buildInstruction(t,e,n,r,o){return t.transition.build(this.driver,t.element,t.fromState.value,t.toState.value,n,r,t.fromState.options,t.toState.options,e,o)}destroyInnerAnimations(t){let e=this.driver.query(t,G0,!0);e.forEach(n=>this.destroyActiveAnimationsForElement(n)),this.playersByQueriedElement.size!=0&&(e=this.driver.query(t,I1,!0),e.forEach(n=>this.finishActiveQueriedAnimationOnElement(n)))}destroyActiveAnimationsForElement(t){let e=this.playersByElement.get(t);e&&e.forEach(n=>{n.queued?n.markedForDestroy=!0:n.destroy()})}finishActiveQueriedAnimationOnElement(t){let e=this.playersByQueriedElement.get(t);e&&e.forEach(n=>n.finish())}whenRenderingDone(){return new Promise(t=>{if(this.players.length)return Ll(this.players).onDone(()=>t());t()})}processLeaveNode(t){let e=t[_s];if(e&&e.setForRemoval){if(t[_s]=d3,e.namespaceId){this.destroyInnerAnimations(t);let n=this._fetchNamespace(e.namespaceId);n&&n.clearElementCache(t)}this._onRemovalComplete(t,e.setForRemoval)}t.classList?.contains(C1)&&this.markElementAsDisabled(t,!1),this.driver.query(t,BZ,!0).forEach(n=>{this.markElementAsDisabled(n,!1)})}flush(t=-1){let e=[];if(this.newHostElements.size&&(this.newHostElements.forEach((n,r)=>this._balanceNamespaceList(n,r)),this.newHostElements.clear()),this.totalAnimations&&this.collectedEnterElements.length)for(let n=0;nn()),this._flushFns=[],this._whenQuietFns.length){let n=this._whenQuietFns;this._whenQuietFns=[],e.length?Ll(e).onDone(()=>{n.forEach(r=>r())}):n.forEach(r=>r())}}reportError(t){throw rZ(t)}_flushAnimations(t,e){let n=new Rm,r=[],o=new Map,s=[],a=new Map,l=new Map,c=new Map,d=new Set;this.disabledNodes.forEach(k=>{d.add(k);let j=this.driver.query(k,FZ,!0);for(let K=0;K{let K=r3+m++;f.set(j,K),k.forEach(de=>Ho(de,K))});let b=[],g=new Set,_=new Set;for(let k=0;kg.add(de)):_.add(j))}let x=new Map,C=KF(h,Array.from(g));C.forEach((k,j)=>{let K=E1+m++;x.set(j,K),k.forEach(de=>Ho(de,K))}),t.push(()=>{p.forEach((k,j)=>{let K=f.get(j);k.forEach(de=>yh(de,K))}),C.forEach((k,j)=>{let K=x.get(j);k.forEach(de=>yh(de,K))}),b.forEach(k=>{this.processLeaveNode(k)})});let T=[],D=[];for(let k=this._namespaceList.length-1;k>=0;k--)this._namespaceList[k].drainQueuedTransitions(e).forEach(K=>{let de=K.player,Te=K.element;if(T.push(de),this.collectedEnterElements.length){let $e=Te[_s];if($e&&$e.setForMove){if($e.previousTriggersValues&&$e.previousTriggersValues.has(K.triggerName)){let gt=$e.previousTriggersValues.get(K.triggerName),ze=this.statesByElement.get(K.element);if(ze&&ze.has(K.triggerName)){let tt=ze.get(K.triggerName);tt.value=gt,ze.set(K.triggerName,tt)}}de.destroy();return}}let Ee=!u||!this.driver.containsElement(u,Te),Ge=x.get(Te),he=f.get(Te),ae=this._buildInstruction(K,n,he,Ge,Ee);if(ae.errors&&ae.errors.length){D.push(ae);return}if(Ee){de.onStart(()=>cd(Te,ae.fromStyles)),de.onDestroy(()=>$s(Te,ae.toStyles)),r.push(de);return}if(K.isFallbackTransition){de.onStart(()=>cd(Te,ae.fromStyles)),de.onDestroy(()=>$s(Te,ae.toStyles)),r.push(de);return}let je=[];ae.timelines.forEach($e=>{$e.stretchStartingKeyframe=!0,this.disabledNodes.has($e.element)||je.push($e)}),ae.timelines=je,n.append(Te,ae.timelines);let ue={instruction:ae,player:de,element:Te};s.push(ue),ae.queriedElements.forEach($e=>wo(a,$e,[]).push(de)),ae.preStyleProps.forEach(($e,gt)=>{if($e.size){let ze=l.get(gt);ze||l.set(gt,ze=new Set),$e.forEach((tt,At)=>ze.add(At))}}),ae.postStyleProps.forEach(($e,gt)=>{let ze=c.get(gt);ze||c.set(gt,ze=new Set),$e.forEach((tt,At)=>ze.add(At))})});if(D.length){let k=[];D.forEach(j=>{k.push(oZ(j.triggerName,j.errors))}),T.forEach(j=>j.destroy()),this.reportError(k)}let E=new Map,A=new Map;s.forEach(k=>{let j=k.element;n.has(j)&&(A.set(j,j),this._beforeAnimationBuild(k.player.namespaceId,k.instruction,E))}),r.forEach(k=>{let j=k.element;this._getPreviousPlayers(j,!1,k.namespaceId,k.triggerName,null).forEach(de=>{wo(E,j,[]).push(de),de.destroy()})});let Q=b.filter(k=>JF(k,l,c)),F=new Map;ZF(F,this.driver,_,c,Ws).forEach(k=>{JF(k,l,c)&&Q.push(k)});let O=new Map;p.forEach((k,j)=>{ZF(O,this.driver,new Set(k),l,F0)}),Q.forEach(k=>{let j=F.get(k),K=O.get(k);F.set(k,new Map([...j?.entries()??[],...K?.entries()??[]]))});let G=[],$=[],Y={};s.forEach(k=>{let{element:j,player:K,instruction:de}=k;if(n.has(j)){if(d.has(j)){K.onDestroy(()=>$s(j,de.toStyles)),K.disabled=!0,K.overrideTotalTime(de.totalTime),r.push(K);return}let Te=Y;if(A.size>1){let Ge=j,he=[];for(;Ge=Ge.parentNode;){let ae=A.get(Ge);if(ae){Te=ae;break}he.push(Ge)}he.forEach(ae=>A.set(ae,Te))}let Ee=this._buildAnimation(K.namespaceId,de,E,o,O,F);if(K.setRealPlayer(Ee),Te===Y)G.push(K);else{let Ge=this.playersByElement.get(Te);Ge&&Ge.length&&(K.parentPlayer=Ll(Ge)),r.push(K)}}else cd(j,de.fromStyles),K.onDestroy(()=>$s(j,de.toStyles)),$.push(K),d.has(j)&&r.push(K)}),$.forEach(k=>{let j=o.get(k.element);if(j&&j.length){let K=Ll(j);k.setRealPlayer(K)}}),r.forEach(k=>{k.parentPlayer?k.syncPlayerEvents(k.parentPlayer):k.destroy()});for(let k=0;k!Ee.destroyed);Te.length?$Z(this,j,Te):this.processLeaveNode(j)}return b.length=0,G.forEach(k=>{this.players.push(k),k.onDone(()=>{k.destroy();let j=this.players.indexOf(k);this.players.splice(j,1)}),k.play()}),G}afterFlush(t){this._flushFns.push(t)}afterFlushAnimationsDone(t){this._whenQuietFns.push(t)}_getPreviousPlayers(t,e,n,r,o){let s=[];if(e){let a=this.playersByQueriedElement.get(t);a&&(s=a)}else{let a=this.playersByElement.get(t);if(a){let l=!o||o==Om;a.forEach(c=>{c.queued||!l&&c.triggerName!=r||s.push(c)})}}return(n||r)&&(s=s.filter(a=>!(n&&n!=a.namespaceId||r&&r!=a.triggerName))),s}_beforeAnimationBuild(t,e,n){let r=e.triggerName,o=e.element,s=e.isRemovalTransition?void 0:t,a=e.isRemovalTransition?void 0:r;for(let l of e.timelines){let c=l.element,d=c!==o,u=wo(n,c,[]);this._getPreviousPlayers(c,d,s,a,e.toState).forEach(p=>{let f=p.getRealPlayer();f.beforeDestroy&&f.beforeDestroy(),p.destroy(),u.push(p)})}cd(o,e.fromStyles)}_buildAnimation(t,e,n,r,o,s){let a=e.triggerName,l=e.element,c=[],d=new Set,u=new Set,h=e.timelines.map(f=>{let m=f.element;d.add(m);let b=m[_s];if(b&&b.removedBeforeQueried)return new kl(f.duration,f.delay);let g=m!==l,_=qZ((n.get(m)||UZ).map(E=>E.getRealPlayer())).filter(E=>{let A=E;return A.element?A.element===m:!1}),x=o.get(m),C=s.get(m),T=e3(this._normalizer,f.keyframes,x,C),D=this._buildPlayer(f,T,_);if(f.subTimeline&&r&&u.add(m),g){let E=new Nm(t,a,m);E.setRealPlayer(D),c.push(E)}return D});c.forEach(f=>{wo(this.playersByQueriedElement,f.element,[]).push(f),f.onDone(()=>GZ(this.playersByQueriedElement,f.element,f))}),d.forEach(f=>Ho(f,GF));let p=Ll(h);return p.onDestroy(()=>{d.forEach(f=>yh(f,GF)),$s(l,e.toStyles)}),u.forEach(f=>{wo(r,f,[]).push(p)}),p}_buildPlayer(t,e,n){return e.length>0?this.driver.animate(t.element,e,t.duration,t.delay,t.easing,n):new kl(t.duration,t.delay)}},Nm=class{constructor(t,e,n){this.namespaceId=t,this.triggerName=e,this.element=n,this._player=new kl,this._containsRealPlayer=!1,this._queuedCallbacks=new Map,this.destroyed=!1,this.parentPlayer=null,this.markedForDestroy=!1,this.disabled=!1,this.queued=!0,this.totalTime=0}setRealPlayer(t){this._containsRealPlayer||(this._player=t,this._queuedCallbacks.forEach((e,n)=>{e.forEach(r=>H1(t,n,void 0,r))}),this._queuedCallbacks.clear(),this._containsRealPlayer=!0,this.overrideTotalTime(t.totalTime),this.queued=!1)}getRealPlayer(){return this._player}overrideTotalTime(t){this.totalTime=t}syncPlayerEvents(t){let e=this._player;e.triggerCallback&&t.onStart(()=>e.triggerCallback("start")),t.onDone(()=>this.finish()),t.onDestroy(()=>this.destroy())}_queueEvent(t,e){wo(this._queuedCallbacks,t,[]).push(e)}onDone(t){this.queued&&this._queueEvent("done",t),this._player.onDone(t)}onStart(t){this.queued&&this._queueEvent("start",t),this._player.onStart(t)}onDestroy(t){this.queued&&this._queueEvent("destroy",t),this._player.onDestroy(t)}init(){this._player.init()}hasStarted(){return this.queued?!1:this._player.hasStarted()}play(){!this.queued&&this._player.play()}pause(){!this.queued&&this._player.pause()}restart(){!this.queued&&this._player.restart()}finish(){this._player.finish()}destroy(){this.destroyed=!0,this._player.destroy()}reset(){!this.queued&&this._player.reset()}setPosition(t){this.queued||this._player.setPosition(t)}getPosition(){return this.queued?0:this._player.getPosition()}triggerCallback(t){let e=this._player;e.triggerCallback&&e.triggerCallback(t)}};function GZ(i,t,e){let n=i.get(t);if(n){if(n.length){let r=n.indexOf(e);n.splice(r,1)}n.length==0&&i.delete(t)}return n}function jZ(i){return i??null}function U0(i){return i&&i.nodeType===1}function WZ(i){return i=="start"||i=="done"}function QF(i,t){let e=i.style.display;return i.style.display=t??"none",e}function ZF(i,t,e,n,r){let o=[];e.forEach(l=>o.push(QF(l)));let s=[];n.forEach((l,c)=>{let d=new Map;l.forEach(u=>{let h=t.computeStyle(c,u,r);d.set(u,h),(!h||h.length==0)&&(c[_s]=HZ,s.push(c))}),i.set(c,d)});let a=0;return e.forEach(l=>QF(l,o[a++])),s}function KF(i,t){let e=new Map;if(i.forEach(a=>e.set(a,[])),t.length==0)return e;let n=1,r=new Set(t),o=new Map;function s(a){if(!a)return n;let l=o.get(a);if(l)return l;let c=a.parentNode;return e.has(c)?l=c:r.has(c)?l=n:l=s(c),o.set(a,l),l}return t.forEach(a=>{let l=s(a);l!==n&&e.get(l).push(a)}),e}function Ho(i,t){i.classList?.add(t)}function yh(i,t){i.classList?.remove(t)}function $Z(i,t,e){Ll(e).onDone(()=>i.processLeaveNode(t))}function qZ(i){let t=[];return u3(i,t),t}function u3(i,t){for(let e=0;er.add(o)):t.set(i,n),e.delete(i),!0}var bh=class{constructor(t,e,n){this._driver=e,this._normalizer=n,this._triggerCache={},this.onRemovalComplete=(r,o)=>{},this._transitionEngine=new V1(t.body,e,n),this._timelineEngine=new F1(t.body,e,n),this._transitionEngine.onRemovalComplete=(r,o)=>this.onRemovalComplete(r,o)}registerTrigger(t,e,n,r,o){let s=t+"-"+r,a=this._triggerCache[s];if(!a){let l=[],c=[],d=a3(this._driver,o,l,c);if(l.length)throw YQ(r,l);c.length&&void 0,a=NZ(r,d,this._normalizer),this._triggerCache[s]=a}this._transitionEngine.registerTrigger(e,r,a)}register(t,e){this._transitionEngine.register(t,e)}destroy(t,e){this._transitionEngine.destroy(t,e)}onInsert(t,e,n,r){this._transitionEngine.insertNode(t,e,n,r)}onRemove(t,e,n){this._transitionEngine.removeNode(t,e,n)}disableAnimations(t,e){this._transitionEngine.markElementAsDisabled(t,e)}process(t,e,n,r){if(n.charAt(0)=="@"){let[o,s]=UF(n),a=r;this._timelineEngine.command(o,e,s,a)}else this._transitionEngine.trigger(t,e,n,r)}listen(t,e,n,r,o){if(n.charAt(0)=="@"){let[s,a]=UF(n);return this._timelineEngine.listen(s,e,a,o)}return this._transitionEngine.listen(t,e,n,r,o)}flush(t=-1){this._transitionEngine.flush(t)}get players(){return[...this._transitionEngine.players,...this._timelineEngine.players]}whenRenderingDone(){return this._transitionEngine.whenRenderingDone()}afterFlushAnimationsDone(t){this._transitionEngine.afterFlushAnimationsDone(t)}};function XZ(i,t){let e=null,n=null;return Array.isArray(t)&&t.length?(e=M1(t[0]),t.length>1&&(n=M1(t[t.length-1]))):t instanceof Map&&(e=M1(t)),e||n?new z1(i,e,n):null}var z1=class i{static{this.initialStylesByElement=new WeakMap}constructor(t,e,n){this._element=t,this._startStyles=e,this._endStyles=n,this._state=0;let r=i.initialStylesByElement.get(t);r||i.initialStylesByElement.set(t,r=new Map),this._initialStyles=r}start(){this._state<1&&(this._startStyles&&$s(this._element,this._startStyles,this._initialStyles),this._state=1)}finish(){this.start(),this._state<2&&($s(this._element,this._initialStyles),this._endStyles&&($s(this._element,this._endStyles),this._endStyles=null),this._state=1)}destroy(){this.finish(),this._state<3&&(i.initialStylesByElement.delete(this._element),this._startStyles&&(cd(this._element,this._startStyles),this._endStyles=null),this._endStyles&&(cd(this._element,this._endStyles),this._endStyles=null),$s(this._element,this._initialStyles),this._state=3)}};function M1(i){let t=null;return i.forEach((e,n)=>{QZ(n)&&(t=t||new Map,t.set(n,e))}),t}function QZ(i){return i==="display"||i==="position"}var Q0=class{constructor(t,e,n,r){this.element=t,this.keyframes=e,this.options=n,this._specialStyles=r,this._onDoneFns=[],this._onStartFns=[],this._onDestroyFns=[],this._initialized=!1,this._finished=!1,this._started=!1,this._destroyed=!1,this._originalOnDoneFns=[],this._originalOnStartFns=[],this.time=0,this.parentPlayer=null,this.currentSnapshot=new Map,this._duration=n.duration,this._delay=n.delay||0,this.time=this._duration+this._delay}_onFinish(){this._finished||(this._finished=!0,this._onDoneFns.forEach(t=>t()),this._onDoneFns=[])}init(){this._buildPlayer(),this._preparePlayerBeforeStart()}_buildPlayer(){if(this._initialized)return;this._initialized=!0;let t=this.keyframes;this.domPlayer=this._triggerWebAnimation(this.element,t,this.options),this._finalKeyframe=t.length?t[t.length-1]:new Map;let e=()=>this._onFinish();this.domPlayer.addEventListener("finish",e),this.onDestroy(()=>{this.domPlayer.removeEventListener("finish",e)})}_preparePlayerBeforeStart(){this._delay?this._resetDomPlayerState():this.domPlayer.pause()}_convertKeyframesToObject(t){let e=[];return t.forEach(n=>{e.push(Object.fromEntries(n))}),e}_triggerWebAnimation(t,e,n){return t.animate(this._convertKeyframesToObject(e),n)}onStart(t){this._originalOnStartFns.push(t),this._onStartFns.push(t)}onDone(t){this._originalOnDoneFns.push(t),this._onDoneFns.push(t)}onDestroy(t){this._onDestroyFns.push(t)}play(){this._buildPlayer(),this.hasStarted()||(this._onStartFns.forEach(t=>t()),this._onStartFns=[],this._started=!0,this._specialStyles&&this._specialStyles.start()),this.domPlayer.play()}pause(){this.init(),this.domPlayer.pause()}finish(){this.init(),this._specialStyles&&this._specialStyles.finish(),this._onFinish(),this.domPlayer.finish()}reset(){this._resetDomPlayerState(),this._destroyed=!1,this._finished=!1,this._started=!1,this._onStartFns=this._originalOnStartFns,this._onDoneFns=this._originalOnDoneFns}_resetDomPlayerState(){this.domPlayer&&this.domPlayer.cancel()}restart(){this.reset(),this.play()}hasStarted(){return this._started}destroy(){this._destroyed||(this._destroyed=!0,this._resetDomPlayerState(),this._onFinish(),this._specialStyles&&this._specialStyles.destroy(),this._onDestroyFns.forEach(t=>t()),this._onDestroyFns=[])}setPosition(t){this.domPlayer===void 0&&this.init(),this.domPlayer.currentTime=t*this.time}getPosition(){return+(this.domPlayer.currentTime??0)/this.time}get totalTime(){return this._delay+this._duration}beforeDestroy(){let t=new Map;this.hasStarted()&&this._finalKeyframe.forEach((n,r)=>{r!=="offset"&&t.set(r,this._finished?n:q1(this.element,r))}),this.currentSnapshot=t}triggerCallback(t){let e=t==="start"?this._onStartFns:this._onDoneFns;e.forEach(n=>n()),e.length=0}},Z0=class{validateStyleProperty(t){return!0}validateAnimatableStyleProperty(t){return!0}containsElement(t,e){return t3(t,e)}getParentElement(t){return j1(t)}query(t,e,n){return n3(t,e,n)}computeStyle(t,e,n){return q1(t,e)}animate(t,e,n,r,o,s=[]){let a=r==0?"both":"forwards",l={duration:n,delay:r,fill:a};o&&(l.easing=o);let c=new Map,d=s.filter(p=>p instanceof Q0);gZ(n,r)&&d.forEach(p=>{p.currentSnapshot.forEach((f,m)=>c.set(m,f))});let u=pZ(e).map(p=>new Map(p));u=_Z(t,u,c);let h=XZ(t,u);return new Q0(t,u,l,h)}};var H0="@",h3="@.disabled",K0=class{constructor(t,e,n,r){this.namespaceId=t,this.delegate=e,this.engine=n,this._onDestroy=r,this.\u0275type=0}get data(){return this.delegate.data}destroyNode(t){this.delegate.destroyNode?.(t)}destroy(){this.engine.destroy(this.namespaceId,this.delegate),this.engine.afterFlushAnimationsDone(()=>{queueMicrotask(()=>{this.delegate.destroy()})}),this._onDestroy?.()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}appendChild(t,e){this.delegate.appendChild(t,e),this.engine.onInsert(this.namespaceId,e,t,!1)}insertBefore(t,e,n,r=!0){this.delegate.insertBefore(t,e,n),this.engine.onInsert(this.namespaceId,e,t,r)}removeChild(t,e,n){this.parentNode(e)&&this.engine.onRemove(this.namespaceId,e,this.delegate)}selectRootElement(t,e){return this.delegate.selectRootElement(t,e)}parentNode(t){return this.delegate.parentNode(t)}nextSibling(t){return this.delegate.nextSibling(t)}setAttribute(t,e,n,r){this.delegate.setAttribute(t,e,n,r)}removeAttribute(t,e,n){this.delegate.removeAttribute(t,e,n)}addClass(t,e){this.delegate.addClass(t,e)}removeClass(t,e){this.delegate.removeClass(t,e)}setStyle(t,e,n,r){this.delegate.setStyle(t,e,n,r)}removeStyle(t,e,n){this.delegate.removeStyle(t,e,n)}setProperty(t,e,n){e.charAt(0)==H0&&e==h3?this.disableAnimations(t,!!n):this.delegate.setProperty(t,e,n)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,n){return this.delegate.listen(t,e,n)}disableAnimations(t,e){this.engine.disableAnimations(t,e)}},U1=class extends K0{constructor(t,e,n,r,o){super(e,n,r,o),this.factory=t,this.namespaceId=e}setProperty(t,e,n){e.charAt(0)==H0?e.charAt(1)=="."&&e==h3?(n=n===void 0?!0:!!n,this.disableAnimations(t,n)):this.engine.process(this.namespaceId,t,e.slice(1),n):this.delegate.setProperty(t,e,n)}listen(t,e,n){if(e.charAt(0)==H0){let r=ZZ(t),o=e.slice(1),s="";return o.charAt(0)!=H0&&([o,s]=KZ(o)),this.engine.listen(this.namespaceId,r,o,s,a=>{let l=a._data||-1;this.factory.scheduleListenerCallback(l,n,a)})}return this.delegate.listen(t,e,n)}};function ZZ(i){switch(i){case"body":return document.body;case"document":return document;case"window":return window;default:return i}}function KZ(i){let t=i.indexOf("."),e=i.substring(0,t),n=i.slice(t+1);return[e,n]}var J0=class{constructor(t,e,n){this.delegate=t,this.engine=e,this._zone=n,this._currentId=0,this._microtaskId=1,this._animationCallbacksBuffer=[],this._rendererCache=new Map,this._cdRecurDepth=0,e.onRemovalComplete=(r,o)=>{o?.removeChild(null,r)}}createRenderer(t,e){let n="",r=this.delegate.createRenderer(t,e);if(!t||!e?.data?.animation){let c=this._rendererCache,d=c.get(r);if(!d){let u=()=>c.delete(r);d=new K0(n,r,this.engine,u),c.set(r,d)}return d}let o=e.id,s=e.id+"-"+this._currentId;this._currentId++,this.engine.register(s,t);let a=c=>{Array.isArray(c)?c.forEach(a):this.engine.registerTrigger(o,s,t,c.name,c)};return e.data.animation.forEach(a),new U1(this,s,r,this.engine)}begin(){this._cdRecurDepth++,this.delegate.begin&&this.delegate.begin()}_scheduleCountTask(){queueMicrotask(()=>{this._microtaskId++})}scheduleListenerCallback(t,e,n){if(t>=0&&te(n));return}let r=this._animationCallbacksBuffer;r.length==0&&queueMicrotask(()=>{this._zone.run(()=>{r.forEach(o=>{let[s,a]=o;s(a)}),this._animationCallbacksBuffer=[]})}),r.push([e,n])}end(){this._cdRecurDepth--,this._cdRecurDepth==0&&this._zone.runOutsideAngular(()=>{this._scheduleCountTask(),this.engine.flush(this._microtaskId)}),this.delegate.end&&this.delegate.end()}whenRenderingDone(){return this.engine.whenRenderingDone()}};var eK=(()=>{class i extends bh{constructor(e,n,r){super(e,n,r)}ngOnDestroy(){this.flush()}static{this.\u0275fac=function(n){return new(n||i)(Le(ft),Le(dd),Le(ud))}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac})}}return i})();function tK(){return new W0}function nK(i,t,e){return new J0(i,t,e)}var p3=[{provide:ud,useFactory:tK},{provide:bh,useClass:eK},{provide:Dl,useFactory:nK,deps:[y0,bh,Ue]}],iK=[{provide:dd,useFactory:()=>new Z0},{provide:Kn,useValue:"BrowserAnimations"},...p3],ITe=[{provide:dd,useClass:W1},{provide:Kn,useValue:"NoopAnimations"},...p3];function f3(){return go("NgEagerAnimations"),[...iK]}var Fl=function(i){return i[i.MAIN_PANEL=0]="MAIN_PANEL",i[i.POPUP=1]="POPUP",i[i.GRAPH_PANEL=2]="GRAPH_PANEL",i}(Fl||{}),X1=function(i){return i[i.WEBGL=0]="WEBGL",i}(X1||{}),xt=function(i){return i.NODE_LABEL="title",i.INPUT_METADATA="input",i.OUTPUT_METADATA="output",i.ATTRIBUTE="list",i}(xt||{}),Bn=function(i){return i.OP_NODE_ID="Op node id",i.OP_ATTRS="Op node attributes",i.OP_INPUTS="Op node inputs",i.OP_OUTPUTS="Op node outputs",i.LAYER_NODE_CHILDREN_COUNT="Layer node children count",i.LAYER_NODE_DESCENDANTS_COUNT="Layer node descendants count",i.LAYER_NODE_ATTRS="Layer node attributes",i}(Bn||{}),Bl=function(i){return i.TENSOR_SHAPE="Tensor shape",i}(Bl||{}),_n=function(i){return i[i.REGULAR=0]="REGULAR",i[i.MEDIUM=1]="MEDIUM",i[i.BOLD=2]="BOLD",i[i.MONOSPACE_MEDIUM=3]="MONOSPACE_MEDIUM",i[i.ICONS=4]="ICONS",i}(_n||{}),Vl=function(i){return i.OP_NODE_ID="id",i.NUMBER_OF_CHILDREN="#children",i.NUMBER_OF_DESCENDANTS="#descendants",i}(Vl||{}),qs=function(i){return i.NODE_BG_COLOR="node_bg_color",i.NODE_TEXT_COLOR="node_text_color",i.NODE_BORDER_COLOR="node_border_color",i}(qs||{}),eb=function(i){return i.V2="v2",i}(eb||{}),Un=function(i){return i.REGEX="regex",i.ATTR_VALUE_RANGE="attr_value_range",i.NODE_TYPE="node_type",i}(Un||{}),Sr=function(i){return i.OP_NODES="op_nodes",i.LAYER_NODES="layer_nodes",i.OP_AND_LAYER_NODES="op_and_layer_nodes",i}(Sr||{});function fi(i){i||(qc(fi),i=S(hi));let t=new Dt(e=>i.onDestroy(e.next.bind(e)));return e=>e.pipe(Ke(t))}function tb(i,t){!t?.injector&&qc(tb);let e=t?.injector??S(pt),n=new ya(1),r=ct(()=>{let o;try{o=i()}catch(s){jr(()=>n.error(s));return}jr(()=>n.next(o))},{injector:e,manualCleanup:!0});return e.get(hi).onDestroy(()=>{r.destroy(),n.complete()}),n.asObservable()}var Go=11,nb=4;var Q1=16,Z1=200,km=12,Lm=1e3;var Zt=.001,K1=25,J1=5,ib="me_test",m3=.1,rb="model_explorer_show_on_node_item_types_v2",ob="model_explorer_show_on_edge_item_types_v2",ka="Node data provider: ",zl=10,sb=7.5,La="__value",jo="__tensor_tag",eT=20,ab={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"};var g3="model-explorer-export-to-resource",xh=14;var Ys=function(i){return i[i.OP_NODE=0]="OP_NODE",i[i.GROUP_NODE=1]="GROUP_NODE",i}(Ys||{});var qTe=new OffscreenCanvas(300,300);var Fm=typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);function Et(i){return i?.nodeType===Ys.OP_NODE}function wt(i){return i?.nodeType===Ys.GROUP_NODE}function tT(i){let t=[];for(let[e,n]of Object.entries(i))switch(e){case Bn.OP_NODE_ID:n.selected&&t.push(Vl.OP_NODE_ID);break;default:break}return t}function nT(i){let t=[];for(let[e,n]of Object.entries(i))switch(e){case Bn.LAYER_NODE_CHILDREN_COUNT:n.selected&&t.push(Vl.NUMBER_OF_CHILDREN);break;case Bn.LAYER_NODE_DESCENDANTS_COUNT:n.selected&&t.push(Vl.NUMBER_OF_DESCENDANTS);break;default:break}return t}function lb(i,t){if(Et(i))switch(t.toLowerCase()){case Vl.OP_NODE_ID:return i.id;case"namespace":return hd(i);default:break}else if(wt(i))switch(t.toLowerCase()){case"namespace":return hd(i);case Vl.NUMBER_OF_CHILDREN:return String((i.nsChildrenIds||[]).length);case Vl.NUMBER_OF_DESCENDANTS:return String((i.descendantsNodeIds||[]).length);default:break}return""}function hd(i){return i.fullNamespace||i.namespace||""}function qi(){return Math.random().toString(36).slice(-6)}function Bm(i,t,e,n=!1){let r=[];i==null?r=t.rootNodes.map(o=>o.id):r=i.nsChildrenIds||[];for(let o of r){let s=t.nodesById[o];if(s&&wt(s)&&(n||!n&&s.expanded)){let a=s.nsChildrenIds||[];(n?a.filter(c=>wt(t.nodesById[c])).length===0:a.filter(c=>wt(t.nodesById[c])).every(c=>!t.nodesById[c].expanded))&&e.push(s.id),Bm(s,t,e,n)}}}function wh(i,t,e,n){let r=[];if(i.length===2)r=i;else if(i.length===3&&i[0].x===i[1].x&&i[1].x===i[2].x)r=i;else{let o=!0,s=0;for(let l=0;lc?1:-1;if(s!==0&&s!==u){o=!1;break}s=u}let a=n.Vector3;if(o){let c=t().x(h=>h.x).y(h=>h.y).curve(e)(i).split(/M|C/).filter(h=>h!=="").map(h=>h.split(",").map(p=>Number(p))),d=new a(c[0][0],c[0][1],0),u=new n.CurvePath;for(let h=1;hnew a(d.x,d.y,0));r=new n.CatmullRomCurve3(l,!1,"catmullrom",m3).getPoints(K1)}}return r}function cb(){let i=_3();return i?i.tagName==="INPUT"||i.tagName==="SELECT"||i.tagName==="TEXTAREA"||i.contentEditable==="true":!1}function _3(i=document){let t=i.activeElement;return t?t.shadowRoot?_3(t.shadowRoot):t:null}function rK(i,t,e){let n=e[jo];return n?`Input${i}:${n} (${t.label})`:`Input${i} (${t.label})`}function oK(i,t,e){let n=`Output${i}`;if(e.label==="GraphInputs"){let r=t.tensor_name;r!=null&&(n=`${n} (${r})`)}else{let r=t[jo];r&&(n=`Output${i}:${r}`)}return n}function v3(i){let t=((i||{}).shape||"").replace(/ /g,"").replace(/×/g,"x");return t===""&&(t="?"),t}function iT(i,t=""){let e=i.attrs||{},n=[],r=new RegExp(t,"i");for(let o of Object.keys(e)){let s=o,a=e[o],l=[`${s}:${a}`,`${s}=${a}`];if(t.trim()===""||l.some(c=>r.test(c))){let c=a;s===La?c=a.replace(/\s/gm,""):c=a.replace(/(\r\n|\n|\r)/gm," "),n.push({key:s,value:c})}}return n}function rT(i,t,e=""){let n=t.groupNodeAttributes?.[i.id.replace("___group___","")]||{},r=[],o=new RegExp(e,"i");for(let s of Object.keys(n)){let a=s,l=n[s],c=[`${a}:${l}`,`${a}=${l}`];if(e.trim()===""||c.some(d=>o.test(d))){let d=l.replace(/(\r\n|\n|\r)/gm," ");r.push({key:a,value:d})}}return r}function oT(i,t){let e=i.incomingEdges||[],n=[];for(let r=0;rzl){let r=e.length-zl;n.push({key:`(${r} more input${r===1?"":"s"} omitted)`,value:"..."})}return n}function sT(i){let t=[],e=i.outputsMetadata||{},n=Object.values(e);for(let r=0;rzl){let r=n.length-zl;t.push({key:`(${r} more output${r===1?"":"s"} omitted)`,value:"..."})}return t}function aT(i,t,e,n){let r=[],o=Object.keys(e).filter(a=>e[a].selected).filter(a=>a.startsWith(ka)).map(a=>a.replace(ka,"")),s=Object.values(n).filter(a=>o.includes(Fa(a,{id:t})));for(let a of s){let l=(a.results||{})?.[t][i.id]?.strValue||"-";r.push({key:Fa(a,{id:t}),value:l})}return r}function lT(i,t){let e=i.split("/"),n=t.split("/"),r="";for(let o=Math.min(e.length,n.length);o>0;o--){let s=e.slice(0,o).join("/"),a=n.slice(0,o).join("/");if(s===a){r=a;break}}return r}function y3(i){return new RegExp(/Only `SavedModel`s with \d+ MetaGraph are supported. Instead, it has \d+/).test(i)?`${i}. Try using the "TF adapter (direct)" adapter.`:i}function cT(i,t,e,n){let r=[],o=new Set;if(i.has(xt.NODE_LABEL)&&t.test(e.label)&&(r.push({type:xt.NODE_LABEL}),o.add(xt.NODE_LABEL)),i.has(xt.ATTRIBUTE)){let s=b3(e,n);for(let a of Object.keys(s)){let l=s[a],c=`${a}:${l}`,d=`${a}=${l}`;(t.test(c)||t.test(d))&&(r.push({type:xt.ATTRIBUTE,matchedAttrId:a}),o.add(xt.ATTRIBUTE))}}if(i.has(xt.INPUT_METADATA)&&Et(e))for(let s of e.incomingEdges||[]){let a=n.nodesById[s.sourceNodeId];t.test(a.label)&&(r.push({type:xt.INPUT_METADATA,matchedText:a.label}),o.add(xt.INPUT_METADATA));let l=e.inputsMetadata||{},c=(l[s.targetNodeInputId]||{})[jo];c&&t.test(c)&&(r.push({type:xt.INPUT_METADATA,matchedText:c}),o.add(xt.INPUT_METADATA));let d=(a.outputsMetadata||{})[s.sourceNodeOutputId]||{};for(let h of Object.keys(d)){if(h.startsWith("__"))continue;let p=d[h],f=`${h}:${p}`,m=`${h}=${p}`;(t.test(p)||t.test(f)||t.test(m))&&(r.push({type:xt.INPUT_METADATA,matchedText:p}),o.add(xt.INPUT_METADATA))}let u=l[s.targetNodeInputId]||{};for(let h of Object.keys(u)){if(h.startsWith("__"))continue;let p=u[h],f=`${h}:${p}`,m=`${h}=${p}`;(t.test(p)||t.test(f)||t.test(m))&&(r.push({type:xt.INPUT_METADATA,matchedText:p}),o.add(xt.INPUT_METADATA))}}if(i.has(xt.OUTPUT_METADATA)&&Et(e)){let s=e.outputsMetadata||{};for(let a of e.outgoingEdges||[]){let l=n.nodesById[a.targetNodeId];t.test(l.label)&&(r.push({type:xt.OUTPUT_METADATA,matchedText:l.label}),o.add(xt.OUTPUT_METADATA));let c=(s[a.sourceNodeOutputId]||{})[jo];c&&t.test(c)&&(r.push({type:xt.OUTPUT_METADATA,matchedText:c}),o.add(xt.OUTPUT_METADATA))}for(let a of Object.values(s))for(let l of Object.keys(a)){if(l.startsWith("__"))continue;let c=a[l],d=`${l}:${c}`,u=`${l}=${c}`;(t.test(c)||t.test(d)||t.test(u))&&(r.push({type:xt.OUTPUT_METADATA,matchedText:c}),o.add(xt.OUTPUT_METADATA))}}return{matches:r,matchTypes:o}}function b3(i,t){let e={};if(Et(i))e=X({},i.attrs||{}),e.id=i.id;else if(wt(i)){e={"#descendants":`${(i.descendantsNodeIds||[]).length}`,"#children":`${(i.nsChildrenIds||[]).length}`,namespace:i.namespace||i.savedNamespace||""};let n=t.groupNodeAttributes?.[i.id.replace("___group___","")]||{};e=X(X({},e),n)}return e}function sK(i,t,e,n,r){let o=[],a=b3(n,r)[i];if(a!=null){let l=Number(a);!isNaN(l)&&l>=t&&l<=e&&o.push({type:xt.ATTRIBUTE,matchedAttrId:i})}return o}function Ch(i){for(let t of i.filter(e=>e.type!==Un.NODE_TYPE))switch(t.type){case Un.REGEX:if(t.queryRegex!=="")return!0;break;case Un.ATTR_VALUE_RANGE:if(t.attrName!=="")return!0;break;default:break}return!1}function db(i){return i.map(t=>({queries:t.queries.map(n=>{switch(n.type){case Un.REGEX:{let r=new RegExp("","i");try{r=new RegExp(n.queryRegex,"i")}catch(s){console.warn("Failed to create regex",s)}return{type:Un.REGEX,queryRegex:r,matchTypes:new Set(n.matchTypes)}}case Un.NODE_TYPE:case Un.ATTR_VALUE_RANGE:return n;default:return}}),nodeType:t.nodeType,styles:t.styles}))}function Vm(i,t,e){let n=!0;for(let r of t)if(r.type===Un.NODE_TYPE){let o=!0;if((Et(i)&&r.nodeType===Sr.LAYER_NODES||wt(i)&&r.nodeType===Sr.OP_NODES)&&(o=!1),!o){n=!1;break}}else if(r.type===Un.REGEX){if(cT(r.matchTypes,r.queryRegex,i,e).matches.length===0){n=!1;break}}else if(r.type===Un.ATTR_VALUE_RANGE){if(r.attrName!==""&&sK(r.attrName,r.min??Number.NEGATIVE_INFINITY,r.max??Number.POSITIVE_INFINITY,i,e).length===0){n=!1;break}}else n=!1;return n}function ub(i,t){window.parent.postMessage({cmd:g3,name:i,resource:t},"*")}function pd(){return window.devicePixelRatio===1?1.5:window.devicePixelRatio}function fd(i,t){let e=i.styles[t];return e?typeof e=="string"?e:e.value:""}function md(i){return i.split(` +`).map(t=>t.trim()).filter(t=>t!=="")}function dT(i){return(md(i).length-1)*xh}function x3(i,t,e=0){function n(c){return{x:c.x+c.width/2+e*c.width,y:c.y+c.height/2}}function r(c,d,u){let h=u.x-d.x,p=u.y-d.y,f=Number.MAX_VALUE,m={x:0,y:0};if(h!==0){let b=(c.x-d.x)/h,g=d.y+b*p;b>=0&&g>=c.y&&g<=c.y+c.height&&b=0&&g>=c.y&&g<=c.y+c.height&&b=0&&g>=c.x&&g<=c.x+c.width&&b=0&&g>=c.x&&g<=c.x+c.width&&b{class i{getItem(e){return window.localStorage.getItem(e)}setItem(e,n){window.localStorage.setItem(e,n)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Ul=(()=>{class i{curUiState=et({paneStates:[this.createInitialPaneState()]});setDeepestExpandedGroupNodeIds(e,n){this.curUiState.update(r=>{let o=r.paneStates[n];return o?(o.deepestExpandedGroupNodeIds=e,X({},r)):r})}setSelectedNodeId(e,n){this.curUiState.update(r=>{let o=r.paneStates[n];return o?(o.selectedNodeId=e,X({},r)):r})}setSelectedGraphId(e,n,r){this.curUiState.update(o=>{let s=o.paneStates[r];return s?(s.selectedGraphId=e,s.selectedCollectionLabel=n,X({},o)):o})}setFlattenLayers(e,n){this.curUiState.update(r=>{let o=r.paneStates[n];return o?(o.flattenLayers=e,X({},r)):r})}addPane(){this.curUiState.update(e=>{e.paneStates.length>1&&(e.paneStates=[e.paneStates[0]]),e.paneStates.push(this.createInitialPaneState());for(let n of e.paneStates)n.widthFraction=.5;return X({},e)})}removePane(e){this.curUiState.update(n=>(n.paneStates.splice(e,1),n.paneStates.length===1&&(n.paneStates[0].widthFraction=1),X({},n)))}resizePane(e){this.curUiState.update(n=>(n.paneStates.length===2&&(n.paneStates[0].widthFraction=e,n.paneStates[1].widthFraction=1-e),X({},n)))}swapPane(){this.curUiState.update(e=>(e.paneStates.length===2&&(e.paneStates=[e.paneStates[1],e.paneStates[0]]),X({},e)))}selectPane(e){this.curUiState.update(n=>{for(let r=0;r{class i{worker;constructor(){this.worker=new Worker(new URL("worker-KVPVY7KV.js",import.meta.url),{type:"classic"})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var nt=(()=>{class i{localStorageService;uiStateService;workerService;curGraphCollections=et([]);curToLocateNodeInfo=et(void 0);curSelectedRenderer=et(void 0);spaceKeyToZoomFitClicked=new ce;searchKeyClicked=new ce;addSnapshotClicked=new ce;curSnapshotToRestore=new ce;expandOrCollapseAllGraphLayersClicked=new ce;downloadAsPngClicked=new ce;config=et(void 0);curInitialUiState=et(void 0);panes=et([{id:qi(),widthFraction:1}]);selectedPaneId=et(this.panes()[0].id);modelGraphProcessed$=new ce;remoteNodeDataPaths=et([]);selectedNode=et(void 0);hoveredNode=et(void 0);doubleClickedNode=et(void 0);testMode=!1;groupNodeChildrenCountThresholdFromUrl=null;paneIdToGraph={};paneIdToCurModelGraphs={};constructor(e,n,r){this.localStorageService=e,this.uiStateService=n,this.workerService=r,this.listenToWorker(),this.init()}addGraphCollections(e){this.curGraphCollections.update(n=>{let r=[...n],o={};for(let s of e){let a={},l={};for(let h of s.graphs){(h.id==null||h.id==="")&&(h.id="unnamed_graph");let p=h.id,f=o[p];f==null?(o[p]=0,f=0):(h.id=`${h.id} (${f+1})`,l[p]=h.id),o[p]=f+1,a[h.id]=h,h.collectionLabel=s.label}for(let h of s.graphs)for(let p of h.nodes)if(p.subgraphIds!=null&&p.subgraphIds.length>0){p.subgraphIds=p.subgraphIds.map(f=>l[f]||f),h.subGraphIds==null&&(h.subGraphIds=[]),h.subGraphIds.push(...p.subgraphIds);for(let f of p.subgraphIds)a[f].parentGraphId=h.id}let c=s.graphs.filter(h=>h.parentGraphId==null),d=[],u=(h,p=0)=>{let f=[];h==null?f=c:f=(h.subGraphIds||[]).map(m=>a[m]),f.sort((m,b)=>b.nodes.length-m.nodes.length);for(let m of f)m.level=p,d.push(m),u(m,p+1)};u(),s.graphs=d}return r.push(...e),r})}selectGraphInPane(e,n,r=!1,o,s=!0){if(n===1&&this.panes().length===1){this.openGraphInSplitPane(e);return}if((this.panes()[n].modelGraph?.id||"")===e.id)return;let l=this.panes()[n];l.searchResults=void 0,l.selectedNodeDataProviderRunId=void 0;let c=l.id;if(this.paneIdToGraph[c]=e,this.uiStateService.setSelectedGraphId(e.id,e.collectionLabel||"",this.getPaneIndexById(c)),l.subgraphBreadcrumbs!=null&&l.subgraphBreadcrumbs.length>0){let d=[...l.subgraphBreadcrumbs];d[d.length-1].graphId=e.id,l.subgraphBreadcrumbs=d}this.processGraph(c,r,o,s)}selectGraphInCurrentPane(e,n=!1,r,o=!0){this.selectGraphInPane(e,this.getPaneIndexById(this.selectedPaneId()),n,r,o)}openGraphInSplitPane(e,n=!1,r=!0){let o=qi();this.paneIdToGraph[o]=e,this.panes.update(l=>{let c=l[0];return c.widthFraction=.5,l.push({id:o,widthFraction:.5,flattenLayers:n,showOnNodeItemTypes:{[o]:this.getSavedShowOnNodeItemTypes()},showOnEdgeItemTypes:{[o]:this.getSavedShowOnEdgeItemTypes()}}),[...l]}),this.curSelectedRenderer.set({id:o,ownerType:Fl.GRAPH_PANEL});let s=this.getPaneIndexById(o);this.uiStateService.addPane(),this.selectPane(o),this.uiStateService.setSelectedGraphId(e.id,e.collectionLabel||"",s),this.uiStateService.setFlattenLayers(n,s);let a={eventType:sr.PROCESS_GRAPH_REQ,graph:e,showOnNodeItemTypes:this.getShowOnNodeItemTypes(o,o),nodeDataProviderRuns:{},config:this.config?this.config():void 0,paneId:o,groupNodeChildrenCountThreshold:this.getGroupNodeChildrenCountThreshold(),flattenLayers:n,keepLayersWithASingleChild:this.config()?.keepLayersWithASingleChild,initialLayout:r};this.workerService.worker.postMessage(a)}processGraph(e,n=!1,r,o=!0){if(r!=null){let a=this.getPaneById(e);a&&(a.snapshotToRestore=r)}this.setPaneLoading(e);let s={eventType:sr.PROCESS_GRAPH_REQ,graph:this.paneIdToGraph[e],showOnNodeItemTypes:this.getShowOnNodeItemTypes(e,e),nodeDataProviderRuns:{},config:this.config?this.config():void 0,paneId:e,groupNodeChildrenCountThreshold:this.getGroupNodeChildrenCountThreshold(),flattenLayers:n,keepLayersWithASingleChild:this.config()?.keepLayersWithASingleChild,initialLayout:o};this.workerService.worker.postMessage(s)}setFlattenLayersInCurrentPane(e){let n=this.getSelectedPane();if(!n)return;this.panes.update(o=>(n.flattenLayers=e,n.searchResults=void 0,[...o]));let r=this.getPaneIndexById(n.id);this.uiStateService.setFlattenLayers(e,r),this.uiStateService.setDeepestExpandedGroupNodeIds([],r)}toggleFlattenLayers(e){let n=this.getPaneById(e);if(!n)return;let r=n.flattenLayers===!0;this.panes.update(s=>(n.flattenLayers=!r,n.searchResults=void 0,[...s]));let o=this.getPaneIndexById(e);this.uiStateService.setFlattenLayers(!r,o),this.uiStateService.setDeepestExpandedGroupNodeIds([],o)}getFlattenLayers(e){return this.getPaneById(e)?.flattenLayers===!0}selectPane(e){this.selectedPaneId.set(e),this.uiStateService.selectPane(this.getPaneIndexById(e))}selectPaneByIndex(e){let n=this.panes()[e];n&&this.selectPane(n.id)}selectNode(e,n){this.panes.update(o=>{let s=this.getPaneById(e);return s?(s.selectedNodeInfo=n,[...o]):o}),this.uiStateService.setSelectedNodeId(n?.nodeId||"",this.getPaneIndexById(e));let r=this.getPaneById(e)?.modelGraph;if(r){let o=n?.nodeId||"",s=r.nodesById[o];if(s&&Et(s)&&window.parent){let a=s.outputsMetadata||{},l=[];for(let c of Object.keys(a)){let u=a[c].tensor_name;u&&l.push(u)}window.parent.postMessage({cmd:"model-explorer-node-selected",nodeId:o,outputTensorNames:l},"*")}}if(r){let o=n?.nodeId||"";this.updateSelectedNode(o,r.id,r.collectionLabel,r.nodesById[o])}}getModelGraphFromSelectedPane(){return this.getPaneById(this.selectedPaneId())?.modelGraph}getModelGraphFromPane(e){return this.getPaneById(e)?.modelGraph}getModelGraphFromPaneIndex(e){return this.panes()[e]?.modelGraph}getSelectedNodeInfoFromSelectedPane(){return this.getPaneById(this.selectedPaneId())?.selectedNodeInfo}getSelectedPane(){return this.getPaneById(this.selectedPaneId())}setPaneWidthFraction(e){this.panes.update(n=>n.length!==2?n:(n[0].widthFraction=e,n[1].widthFraction=1-e,[...n])),this.uiStateService.resizePane(e)}setSelectedNodeDataProviderRunId(e,n){this.panes.update(r=>{let o=this.getPaneById(e);return o?(o.selectedNodeDataProviderRunId=n,[...r]):r})}getSelectedNodeDataProviderRunId(e){return this.getPaneById(e)?.selectedNodeDataProviderRunId}setPaneHasArtificialLayers(e,n){this.panes.update(r=>{let o=this.getPaneById(e);return o?(o.hasArtificialLayers=n,[...r]):r})}setNodeToReveal(e,n){this.panes.update(r=>{let o=this.getPaneById(e);return o?(o.nodeIdToReveal=n,[...r]):r})}closePane(e){delete this.paneIdToGraph[e],delete this.paneIdToCurModelGraphs[e],this.panes.update(n=>{let r=n.findIndex(o=>o.id===e);return r>=0&&(n.splice(r,1),this.uiStateService.removePane(r)),n[0].widthFraction=1,[...n]}),this.selectPane(this.panes()[0].id)}swapPane(){this.panes.update(e=>e.length!==2?e:[e[1],e[0]]),this.uiStateService.swapPane()}getPaneById(e){return this.panes().find(n=>n.id===e)}getPaneIndexById(e){return this.panes().findIndex(n=>n.id===e)}addSnapshot(e,n,r){this.panes.update(o=>{let s=this.getPaneById(r);return s&&(s.snapshots==null&&(s.snapshots={}),s.snapshots[n]==null&&(s.snapshots[n]=[]),s.snapshots[n].push(e)),[...o]})}deleteSnapshot(e,n,r){this.panes.update(o=>{let s=this.getPaneById(r);return s&&s.snapshots&&s.snapshots[n]&&s.snapshots[n].splice(e,1),[...o]})}getGraphById(e){for(let n of this.curGraphCollections())for(let r of n.graphs)if(r.id===e)return r}addSubgraphBreadcrumbItem(e,n,r,o){this.panes.update(s=>{let a=this.getPaneById(e);if(!a)return s;let l=[...a.subgraphBreadcrumbs||[]];return l.length===0?l.push({graphId:n,snapshot:o}):l[l.length-1]={graphId:n,snapshot:o},l.push({graphId:r}),a.subgraphBreadcrumbs=l,[...s]})}setCurrentSubgraphBreadcrumb(e,n){this.panes.update(r=>{let o=this.getPaneById(e);if(!o)return r;let s=[...o.subgraphBreadcrumbs||[]];return s.splice(n+1),s.length===1&&(s=[]),o.subgraphBreadcrumbs=s,[...r]})}setSearchResults(e,n){this.panes.update(r=>{let o=this.getPaneById(e);return o?(o.searchResults=n,[...r]):r})}clearSearchResults(e){this.panes.update(n=>{let r=this.getPaneById(e);return r?(r.searchResults={results:{}},[...n]):n})}toggleShowOnNode(e,n,r,o){this.panes.update(s=>{let a=this.getPaneById(e);if(!a)return s;a.showOnNodeItemTypes||(a.showOnNodeItemTypes={}),a.showOnNodeItemTypes[n]==null&&(a.showOnNodeItemTypes[n]={}),a.showOnNodeItemTypes[n][r]==null&&(a.showOnNodeItemTypes[n][r]={selected:!1});let l=a.showOnNodeItemTypes[n][r].selected;return a.showOnNodeItemTypes[n]=X({},a.showOnNodeItemTypes[n]),a.showOnNodeItemTypes[n][r].selected=o??!l,a.showOnNodeItemTypes=X({},a.showOnNodeItemTypes),[...s]})}toggleShowOnEdge(e,n,r,o){this.panes.update(s=>{let a=this.getPaneById(e);if(!a)return s;a.showOnEdgeItemTypes||(a.showOnEdgeItemTypes={}),a.showOnEdgeItemTypes[n]==null&&(a.showOnEdgeItemTypes[n]={}),a.showOnEdgeItemTypes[n][r]==null&&(a.showOnEdgeItemTypes[n][r]={selected:!1});let l=a.showOnEdgeItemTypes[n][r].selected;return a.showOnEdgeItemTypes[n]=X({},a.showOnEdgeItemTypes[n]),a.showOnEdgeItemTypes[n][r].selected=o??!l,a.showOnEdgeItemTypes=X({},a.showOnEdgeItemTypes),[...s]})}setShowOnNodeFilter(e,n,r,o){this.panes.update(s=>{let a=this.getPaneById(e);return a?(a.showOnNodeItemTypes||(a.showOnNodeItemTypes={}),a.showOnNodeItemTypes[n]==null&&(a.showOnNodeItemTypes[n]={}),a.showOnNodeItemTypes[n][r]==null&&(a.showOnNodeItemTypes[n][r]={selected:!1}),a.showOnNodeItemTypes[n][r].filterRegex=o,a.showOnNodeItemTypes=X({},a.showOnNodeItemTypes),[...s]):s})}setShowOnNode(e,n,r){this.panes.update(o=>{let s=this.getPaneById(e);return s?(s.showOnNodeItemTypes||(s.showOnNodeItemTypes={}),s.showOnNodeItemTypes=X({},s.showOnNodeItemTypes),s.showOnNodeItemTypes[n]=r,[...o]):o})}setShowOnEdge(e,n,r){this.panes.update(o=>{let s=this.getPaneById(e);return s?(s.showOnEdgeItemTypes||(s.showOnEdgeItemTypes={}),s.showOnEdgeItemTypes=X({},s.showOnEdgeItemTypes),s.showOnEdgeItemTypes[n]=r,[...o]):o})}deleteShowOnNodeItemType(e){this.panes.update(n=>{for(let r of n){r.showOnNodeItemTypes=X({},r.showOnNodeItemTypes);for(let o of Object.keys(r.showOnNodeItemTypes))for(let s of e){let a=r.showOnNodeItemTypes[o][s];a&&(a.selected=!1)}}return[...n]})}getShowOnNodeItemTypes(e,n){let r=this.getPaneById(e);return r?JSON.parse(JSON.stringify((r.showOnNodeItemTypes||{})[n]||{})):{}}getSavedShowOnNodeItemTypes(){let e={};if(!this.testMode){let n=this.localStorageService.getItem(rb);n&&(e=JSON.parse(n))}return e}getSavedShowOnEdgeItemTypes(){let e={};if(!this.testMode){let n=this.localStorageService.getItem(ob);n&&(e=JSON.parse(n))}return e}getShowOnEdgeItemTypes(e,n){let r=this.getPaneById(e);return r?JSON.parse(JSON.stringify((r.showOnEdgeItemTypes||{})[n]||{})):{}}getGraphByPaneId(e){return this.paneIdToGraph[e]}updateCurrentModelGraph(e,n){this.paneIdToCurModelGraphs[e]=n}getCurrentModelGraphFromPane(e){return this.paneIdToCurModelGraphs[e]}updateSelectedNode(e,n,r,o){let s=this.selectedNode();(s?.nodeId!==e||s?.graphId!==n||s?.collectionLabel!==r)&&this.selectedNode.set({nodeId:e,graphId:n,collectionLabel:r,node:o})}updateHoveredNode(e,n,r,o){let s=this.hoveredNode();(s?.nodeId!==e||s?.graphId!==n||s?.collectionLabel!==r)&&this.hoveredNode.set({nodeId:e,graphId:n,collectionLabel:r,node:o})}updateDoubleClickedNode(e,n,r,o){let s=this.doubleClickedNode();(s?.nodeId!==e||s?.graphId!==n||s?.collectionLabel!==r)&&this.doubleClickedNode.set({nodeId:e,graphId:n,collectionLabel:r,node:o})}reset(){this.workerService.worker.postMessage({eventType:sr.CLEANUP}),this.curGraphCollections.set([]),this.curToLocateNodeInfo.set(void 0),this.curSelectedRenderer.set(void 0),this.config.set(void 0),this.curInitialUiState.set(void 0),this.panes.set([{id:qi(),widthFraction:1}]),this.selectedPaneId.set(this.panes()[0].id),this.remoteNodeDataPaths.set([]),this.groupNodeChildrenCountThresholdFromUrl=null,this.paneIdToGraph={},this.paneIdToCurModelGraphs={},this.init()}listenToWorker(){this.workerService.worker.addEventListener("message",e=>{let n=e.data;switch(n.eventType){case sr.PROCESS_GRAPH_RESP:this.handleGraphProcessed(n.modelGraph,n.paneId);break;default:break}})}init(){this.curSelectedRenderer.set({id:this.panes()[0].id,ownerType:Fl.GRAPH_PANEL});let e=new URLSearchParams(document.location.search);this.testMode=e.get("test_mode")==="1",this.groupNodeChildrenCountThresholdFromUrl=e.get("groupNodeChildrenCountThreshold");let n=this.panes()[0];n.showOnNodeItemTypes={[n.id]:this.getSavedShowOnNodeItemTypes()},n.showOnEdgeItemTypes={[n.id]:this.getSavedShowOnEdgeItemTypes()}}handleGraphProcessed(e,n){this.panes.update(r=>{for(let o of r)if(o.id===n){o.modelGraph=e;break}return[...r]}),this.modelGraphProcessed$.next({paneIndex:this.getPaneIndexById(n),modelGraph:e})}setPaneLoading(e){this.panes.update(n=>{for(let r of n)if(r.id===e){r.modelGraph=void 0;break}return[...n]})}getGroupNodeChildrenCountThreshold(){let e=Lm;return this.config&&(e=this.config()?.artificialLayerNodeCountThreshold||Lm),this.groupNodeChildrenCountThresholdFromUrl!=null&&(e=Number(this.groupNodeChildrenCountThresholdFromUrl)),e}static \u0275fac=function(n){return new(n||i)(Le(Mr),Le(Ul),Le(Hl))};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var T3=(()=>{class i{constructor(e,n){this._renderer=e,this._elementRef=n,this.onChange=r=>{},this.onTouched=()=>{}}setProperty(e,n){this._renderer.setProperty(this._elementRef.nativeElement,e,n)}registerOnTouched(e){this.onTouched=e}registerOnChange(e){this.onChange=e}setDisabledState(e){this.setProperty("disabled",e)}static{this.\u0275fac=function(n){return new(n||i)(q(Kc),q(Fe))}}static{this.\u0275dir=Ve({type:i,standalone:!0})}}return i})(),D3=(()=>{class i extends T3{static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Zn(i)))(r||i)}})()}static{this.\u0275dir=Ve({type:i,standalone:!0,features:[sn]})}}return i})(),Ba=new pe(""),aK={provide:Ba,useExisting:xr(()=>Wm),multi:!0},Wm=(()=>{class i extends D3{writeValue(e){this.setProperty("checked",e)}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Zn(i)))(r||i)}})()}static{this.\u0275dir=Ve({type:i,selectors:[["input","type","checkbox","formControlName",""],["input","type","checkbox","formControl",""],["input","type","checkbox","ngModel",""]],hostBindings:function(n,r){n&1&&H("change",function(s){return r.onChange(s.target.checked)})("blur",function(){return r.onTouched()})},features:[Bt([aK]),sn]})}}return i})(),lK={provide:Ba,useExisting:xr(()=>Xs),multi:!0};function cK(){let i=Pa()?Pa().getUserAgent():"";return/android (\d+)/.test(i.toLowerCase())}var dK=new pe(""),Xs=(()=>{class i extends T3{constructor(e,n,r){super(e,n),this._compositionMode=r,this._composing=!1,this._compositionMode==null&&(this._compositionMode=!cK())}writeValue(e){let n=e??"";this.setProperty("value",n)}_handleInput(e){(!this._compositionMode||this._compositionMode&&!this._composing)&&this.onChange(e)}_compositionStart(){this._composing=!0}_compositionEnd(e){this._composing=!1,this._compositionMode&&this.onChange(e)}static{this.\u0275fac=function(n){return new(n||i)(q(Kc),q(Fe),q(dK,8))}}static{this.\u0275dir=Ve({type:i,selectors:[["input","formControlName","",3,"type","checkbox"],["textarea","formControlName",""],["input","formControl","",3,"type","checkbox"],["textarea","formControl",""],["input","ngModel","",3,"type","checkbox"],["textarea","ngModel",""],["","ngDefaultControl",""]],hostBindings:function(n,r){n&1&&H("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)})},features:[Bt([lK]),sn]})}}return i})();function Gl(i){return i==null||(typeof i=="string"||Array.isArray(i))&&i.length===0}function O3(i){return i!=null&&typeof i.length=="number"}var vd=new pe(""),_T=new pe(""),uK=/^(?=.{1,254}$)(?=.{1,64}@)[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[a-zA-Z0-9!#$%&'*+/=?^_`{|}~-]+)*@[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?)*$/,pb=class{static min(t){return hK(t)}static max(t){return pK(t)}static required(t){return fK(t)}static requiredTrue(t){return mK(t)}static email(t){return gK(t)}static minLength(t){return _K(t)}static maxLength(t){return vK(t)}static pattern(t){return yK(t)}static nullValidator(t){return P3(t)}static compose(t){return F3(t)}static composeAsync(t){return B3(t)}};function hK(i){return t=>{if(Gl(t.value)||Gl(i))return null;let e=parseFloat(t.value);return!isNaN(e)&&e{if(Gl(t.value)||Gl(i))return null;let e=parseFloat(t.value);return!isNaN(e)&&e>i?{max:{max:i,actual:t.value}}:null}}function fK(i){return Gl(i.value)?{required:!0}:null}function mK(i){return i.value===!0?null:{required:!0}}function gK(i){return Gl(i.value)||uK.test(i.value)?null:{email:!0}}function _K(i){return t=>Gl(t.value)||!O3(t.value)?null:t.value.lengthO3(t.value)&&t.value.length>i?{maxlength:{requiredLength:i,actualLength:t.value.length}}:null}function yK(i){if(!i)return P3;let t,e;return typeof i=="string"?(e="",i.charAt(0)!=="^"&&(e+="^"),e+=i,i.charAt(i.length-1)!=="$"&&(e+="$"),t=new RegExp(e)):(e=i.toString(),t=i),n=>{if(Gl(n.value))return null;let r=n.value;return t.test(r)?null:{pattern:{requiredPattern:e,actualValue:r}}}}function P3(i){return null}function R3(i){return i!=null}function A3(i){return Jc(i)?ti(i):i}function N3(i){let t={};return i.forEach(e=>{t=e!=null?X(X({},t),e):t}),Object.keys(t).length===0?null:t}function k3(i,t){return t.map(e=>e(i))}function bK(i){return!i.validate}function L3(i){return i.map(t=>bK(t)?t:e=>t.validate(e))}function F3(i){if(!i)return null;let t=i.filter(R3);return t.length==0?null:function(e){return N3(k3(e,t))}}function vT(i){return i!=null?F3(L3(i)):null}function B3(i){if(!i)return null;let t=i.filter(R3);return t.length==0?null:function(e){let n=k3(e,t).map(A3);return Pf(n).pipe(We(N3))}}function yT(i){return i!=null?B3(L3(i)):null}function C3(i,t){return i===null?[t]:Array.isArray(i)?[...i,t]:[i,t]}function V3(i){return i._rawValidators}function z3(i){return i._rawAsyncValidators}function pT(i){return i?Array.isArray(i)?i:[i]:[]}function fb(i,t){return Array.isArray(i)?i.includes(t):i===t}function S3(i,t){let e=pT(t);return pT(i).forEach(r=>{fb(e,r)||e.push(r)}),e}function M3(i,t){return pT(t).filter(e=>!fb(i,e))}var mb=class{constructor(){this._rawValidators=[],this._rawAsyncValidators=[],this._onDestroyCallbacks=[]}get value(){return this.control?this.control.value:null}get valid(){return this.control?this.control.valid:null}get invalid(){return this.control?this.control.invalid:null}get pending(){return this.control?this.control.pending:null}get disabled(){return this.control?this.control.disabled:null}get enabled(){return this.control?this.control.enabled:null}get errors(){return this.control?this.control.errors:null}get pristine(){return this.control?this.control.pristine:null}get dirty(){return this.control?this.control.dirty:null}get touched(){return this.control?this.control.touched:null}get status(){return this.control?this.control.status:null}get untouched(){return this.control?this.control.untouched:null}get statusChanges(){return this.control?this.control.statusChanges:null}get valueChanges(){return this.control?this.control.valueChanges:null}get path(){return null}_setValidators(t){this._rawValidators=t||[],this._composedValidatorFn=vT(this._rawValidators)}_setAsyncValidators(t){this._rawAsyncValidators=t||[],this._composedAsyncValidatorFn=yT(this._rawAsyncValidators)}get validator(){return this._composedValidatorFn||null}get asyncValidator(){return this._composedAsyncValidatorFn||null}_registerOnDestroy(t){this._onDestroyCallbacks.push(t)}_invokeOnDestroyCallbacks(){this._onDestroyCallbacks.forEach(t=>t()),this._onDestroyCallbacks=[]}reset(t=void 0){this.control&&this.control.reset(t)}hasError(t,e){return this.control?this.control.hasError(t,e):!1}getError(t,e){return this.control?this.control.getError(t,e):null}},Ih=class extends mb{get formDirective(){return null}get path(){return null}},_d=class extends mb{constructor(){super(...arguments),this._parent=null,this.name=null,this.valueAccessor=null}},fT=class{constructor(t){this._cd=t}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}},xK={"[class.ng-untouched]":"isUntouched","[class.ng-touched]":"isTouched","[class.ng-pristine]":"isPristine","[class.ng-dirty]":"isDirty","[class.ng-valid]":"isValid","[class.ng-invalid]":"isInvalid","[class.ng-pending]":"isPending"},CDe=at(X({},xK),{"[class.ng-submitted]":"isSubmitted"}),Wo=(()=>{class i extends fT{constructor(e){super(e)}static{this.\u0275fac=function(n){return new(n||i)(q(_d,2))}}static{this.\u0275dir=Ve({type:i,selectors:[["","formControlName",""],["","ngModel",""],["","formControl",""]],hostVars:14,hostBindings:function(n,r){n&2&&ne("ng-untouched",r.isUntouched)("ng-touched",r.isTouched)("ng-pristine",r.isPristine)("ng-dirty",r.isDirty)("ng-valid",r.isValid)("ng-invalid",r.isInvalid)("ng-pending",r.isPending)},features:[sn]})}}return i})();var zm="VALID",hb="INVALID",Mh="PENDING",Um="DISABLED",jl=class{},gb=class extends jl{constructor(t,e){super(),this.value=t,this.source=e}},Gm=class extends jl{constructor(t,e){super(),this.pristine=t,this.source=e}},jm=class extends jl{constructor(t,e){super(),this.touched=t,this.source=e}},Eh=class extends jl{constructor(t,e){super(),this.status=t,this.source=e}},mT=class extends jl{constructor(t){super(),this.source=t}},gT=class extends jl{constructor(t){super(),this.source=t}};function U3(i){return(Cb(i)?i.validators:i)||null}function wK(i){return Array.isArray(i)?vT(i):i||null}function H3(i,t){return(Cb(t)?t.asyncValidators:i)||null}function CK(i){return Array.isArray(i)?yT(i):i||null}function Cb(i){return i!=null&&!Array.isArray(i)&&typeof i=="object"}function SK(i,t,e){let n=i.controls;if(!(t?Object.keys(n):n).length)throw new De(1e3,"");if(!n[e])throw new De(1001,"")}function MK(i,t,e){i._forEachChild((n,r)=>{if(e[r]===void 0)throw new De(1002,"")})}var _b=class{constructor(t,e){this._pendingDirty=!1,this._hasOwnPendingAsyncValidator=null,this._pendingTouched=!1,this._onCollectionChange=()=>{},this._parent=null,this._status=Ot(()=>this.statusReactive()),this.statusReactive=et(void 0),this._pristine=Ot(()=>this.pristineReactive()),this.pristineReactive=et(!0),this._touched=Ot(()=>this.touchedReactive()),this.touchedReactive=et(!1),this._events=new ce,this.events=this._events.asObservable(),this._onDisabledChange=[],this._assignValidators(t),this._assignAsyncValidators(e)}get validator(){return this._composedValidatorFn}set validator(t){this._rawValidators=this._composedValidatorFn=t}get asyncValidator(){return this._composedAsyncValidatorFn}set asyncValidator(t){this._rawAsyncValidators=this._composedAsyncValidatorFn=t}get parent(){return this._parent}get status(){return jr(this.statusReactive)}set status(t){jr(()=>this.statusReactive.set(t))}get valid(){return this.status===zm}get invalid(){return this.status===hb}get pending(){return this.status==Mh}get disabled(){return this.status===Um}get enabled(){return this.status!==Um}get pristine(){return jr(this.pristineReactive)}set pristine(t){jr(()=>this.pristineReactive.set(t))}get dirty(){return!this.pristine}get touched(){return jr(this.touchedReactive)}set touched(t){jr(()=>this.touchedReactive.set(t))}get untouched(){return!this.touched}get updateOn(){return this._updateOn?this._updateOn:this.parent?this.parent.updateOn:"change"}setValidators(t){this._assignValidators(t)}setAsyncValidators(t){this._assignAsyncValidators(t)}addValidators(t){this.setValidators(S3(t,this._rawValidators))}addAsyncValidators(t){this.setAsyncValidators(S3(t,this._rawAsyncValidators))}removeValidators(t){this.setValidators(M3(t,this._rawValidators))}removeAsyncValidators(t){this.setAsyncValidators(M3(t,this._rawAsyncValidators))}hasValidator(t){return fb(this._rawValidators,t)}hasAsyncValidator(t){return fb(this._rawAsyncValidators,t)}clearValidators(){this.validator=null}clearAsyncValidators(){this.asyncValidator=null}markAsTouched(t={}){let e=this.touched===!1;this.touched=!0;let n=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsTouched(at(X({},t),{sourceControl:n})),e&&t.emitEvent!==!1&&this._events.next(new jm(!0,n))}markAllAsTouched(t={}){this.markAsTouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:this}),this._forEachChild(e=>e.markAllAsTouched(t))}markAsUntouched(t={}){let e=this.touched===!0;this.touched=!1,this._pendingTouched=!1;let n=t.sourceControl??this;this._forEachChild(r=>{r.markAsUntouched({onlySelf:!0,emitEvent:t.emitEvent,sourceControl:n})}),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,n),e&&t.emitEvent!==!1&&this._events.next(new jm(!1,n))}markAsDirty(t={}){let e=this.pristine===!0;this.pristine=!1;let n=t.sourceControl??this;this._parent&&!t.onlySelf&&this._parent.markAsDirty(at(X({},t),{sourceControl:n})),e&&t.emitEvent!==!1&&this._events.next(new Gm(!1,n))}markAsPristine(t={}){let e=this.pristine===!1;this.pristine=!0,this._pendingDirty=!1;let n=t.sourceControl??this;this._forEachChild(r=>{r.markAsPristine({onlySelf:!0,emitEvent:t.emitEvent})}),this._parent&&!t.onlySelf&&this._parent._updatePristine(t,n),e&&t.emitEvent!==!1&&this._events.next(new Gm(!0,n))}markAsPending(t={}){this.status=Mh;let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new Eh(this.status,e)),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.markAsPending(at(X({},t),{sourceControl:e}))}disable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=Um,this.errors=null,this._forEachChild(r=>{r.disable(at(X({},t),{onlySelf:!0}))}),this._updateValue();let n=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new gb(this.value,n)),this._events.next(new Eh(this.status,n)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._updateAncestors(at(X({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(r=>r(!0))}enable(t={}){let e=this._parentMarkedDirty(t.onlySelf);this.status=zm,this._forEachChild(n=>{n.enable(at(X({},t),{onlySelf:!0}))}),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent}),this._updateAncestors(at(X({},t),{skipPristineCheck:e}),this),this._onDisabledChange.forEach(n=>n(!1))}_updateAncestors(t,e){this._parent&&!t.onlySelf&&(this._parent.updateValueAndValidity(t),t.skipPristineCheck||this._parent._updatePristine({},e),this._parent._updateTouched({},e))}setParent(t){this._parent=t}getRawValue(){return this.value}updateValueAndValidity(t={}){if(this._setInitialStatus(),this._updateValue(),this.enabled){let n=this._cancelExistingSubscription();this.errors=this._runValidator(),this.status=this._calculateStatus(),(this.status===zm||this.status===Mh)&&this._runAsyncValidator(n,t.emitEvent)}let e=t.sourceControl??this;t.emitEvent!==!1&&(this._events.next(new gb(this.value,e)),this._events.next(new Eh(this.status,e)),this.valueChanges.emit(this.value),this.statusChanges.emit(this.status)),this._parent&&!t.onlySelf&&this._parent.updateValueAndValidity(at(X({},t),{sourceControl:e}))}_updateTreeValidity(t={emitEvent:!0}){this._forEachChild(e=>e._updateTreeValidity(t)),this.updateValueAndValidity({onlySelf:!0,emitEvent:t.emitEvent})}_setInitialStatus(){this.status=this._allControlsDisabled()?Um:zm}_runValidator(){return this.validator?this.validator(this):null}_runAsyncValidator(t,e){if(this.asyncValidator){this.status=Mh,this._hasOwnPendingAsyncValidator={emitEvent:e!==!1};let n=A3(this.asyncValidator(this));this._asyncValidationSubscription=n.subscribe(r=>{this._hasOwnPendingAsyncValidator=null,this.setErrors(r,{emitEvent:e,shouldHaveEmitted:t})})}}_cancelExistingSubscription(){if(this._asyncValidationSubscription){this._asyncValidationSubscription.unsubscribe();let t=this._hasOwnPendingAsyncValidator?.emitEvent??!1;return this._hasOwnPendingAsyncValidator=null,t}return!1}setErrors(t,e={}){this.errors=t,this._updateControlsErrors(e.emitEvent!==!1,this,e.shouldHaveEmitted)}get(t){let e=t;return e==null||(Array.isArray(e)||(e=e.split(".")),e.length===0)?null:e.reduce((n,r)=>n&&n._find(r),this)}getError(t,e){let n=e?this.get(e):this;return n&&n.errors?n.errors[t]:null}hasError(t,e){return!!this.getError(t,e)}get root(){let t=this;for(;t._parent;)t=t._parent;return t}_updateControlsErrors(t,e,n){this.status=this._calculateStatus(),t&&this.statusChanges.emit(this.status),(t||n)&&this._events.next(new Eh(this.status,e)),this._parent&&this._parent._updateControlsErrors(t,e,n)}_initObservables(){this.valueChanges=new Ie,this.statusChanges=new Ie}_calculateStatus(){return this._allControlsDisabled()?Um:this.errors?hb:this._hasOwnPendingAsyncValidator||this._anyControlsHaveStatus(Mh)?Mh:this._anyControlsHaveStatus(hb)?hb:zm}_anyControlsHaveStatus(t){return this._anyControls(e=>e.status===t)}_anyControlsDirty(){return this._anyControls(t=>t.dirty)}_anyControlsTouched(){return this._anyControls(t=>t.touched)}_updatePristine(t,e){let n=!this._anyControlsDirty(),r=this.pristine!==n;this.pristine=n,this._parent&&!t.onlySelf&&this._parent._updatePristine(t,e),r&&this._events.next(new Gm(this.pristine,e))}_updateTouched(t={},e){this.touched=this._anyControlsTouched(),this._events.next(new jm(this.touched,e)),this._parent&&!t.onlySelf&&this._parent._updateTouched(t,e)}_registerOnCollectionChange(t){this._onCollectionChange=t}_setUpdateStrategy(t){Cb(t)&&t.updateOn!=null&&(this._updateOn=t.updateOn)}_parentMarkedDirty(t){let e=this._parent&&this._parent.dirty;return!t&&!!e&&!this._parent._anyControlsDirty()}_find(t){return null}_assignValidators(t){this._rawValidators=Array.isArray(t)?t.slice():t,this._composedValidatorFn=wK(this._rawValidators)}_assignAsyncValidators(t){this._rawAsyncValidators=Array.isArray(t)?t.slice():t,this._composedAsyncValidatorFn=CK(this._rawAsyncValidators)}},vb=class extends _b{constructor(t,e,n){super(U3(e),H3(n,e)),this.controls=t,this._initObservables(),this._setUpdateStrategy(e),this._setUpControls(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator})}registerControl(t,e){return this.controls[t]?this.controls[t]:(this.controls[t]=e,e.setParent(this),e._registerOnCollectionChange(this._onCollectionChange),e)}addControl(t,e,n={}){this.registerControl(t,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}removeControl(t,e={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],this.updateValueAndValidity({emitEvent:e.emitEvent}),this._onCollectionChange()}setControl(t,e,n={}){this.controls[t]&&this.controls[t]._registerOnCollectionChange(()=>{}),delete this.controls[t],e&&this.registerControl(t,e),this.updateValueAndValidity({emitEvent:n.emitEvent}),this._onCollectionChange()}contains(t){return this.controls.hasOwnProperty(t)&&this.controls[t].enabled}setValue(t,e={}){MK(this,!0,t),Object.keys(t).forEach(n=>{SK(this,!0,n),this.controls[n].setValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e)}patchValue(t,e={}){t!=null&&(Object.keys(t).forEach(n=>{let r=this.controls[n];r&&r.patchValue(t[n],{onlySelf:!0,emitEvent:e.emitEvent})}),this.updateValueAndValidity(e))}reset(t={},e={}){this._forEachChild((n,r)=>{n.reset(t?t[r]:null,{onlySelf:!0,emitEvent:e.emitEvent})}),this._updatePristine(e,this),this._updateTouched(e,this),this.updateValueAndValidity(e)}getRawValue(){return this._reduceChildren({},(t,e,n)=>(t[n]=e.getRawValue(),t))}_syncPendingControls(){let t=this._reduceChildren(!1,(e,n)=>n._syncPendingControls()?!0:e);return t&&this.updateValueAndValidity({onlySelf:!0}),t}_forEachChild(t){Object.keys(this.controls).forEach(e=>{let n=this.controls[e];n&&t(n,e)})}_setUpControls(){this._forEachChild(t=>{t.setParent(this),t._registerOnCollectionChange(this._onCollectionChange)})}_updateValue(){this.value=this._reduceValue()}_anyControls(t){for(let[e,n]of Object.entries(this.controls))if(this.contains(e)&&t(n))return!0;return!1}_reduceValue(){let t={};return this._reduceChildren(t,(e,n,r)=>((n.enabled||this.disabled)&&(e[r]=n.value),e))}_reduceChildren(t,e){let n=t;return this._forEachChild((r,o)=>{n=e(n,r,o)}),n}_allControlsDisabled(){for(let t of Object.keys(this.controls))if(this.controls[t].enabled)return!1;return Object.keys(this.controls).length>0||this.disabled}_find(t){return this.controls.hasOwnProperty(t)?this.controls[t]:null}};var Sb=new pe("CallSetDisabledState",{providedIn:"root",factory:()=>bT}),bT="always";function yb(i,t,e=bT){xT(i,t),t.valueAccessor.writeValue(i.value),(i.disabled||e==="always")&&t.valueAccessor.setDisabledState?.(i.disabled),IK(i,t),DK(i,t),TK(i,t),EK(i,t)}function bb(i,t,e=!0){let n=()=>{};t.valueAccessor&&(t.valueAccessor.registerOnChange(n),t.valueAccessor.registerOnTouched(n)),wb(i,t),i&&(t._invokeOnDestroyCallbacks(),i._registerOnCollectionChange(()=>{}))}function xb(i,t){i.forEach(e=>{e.registerOnValidatorChange&&e.registerOnValidatorChange(t)})}function EK(i,t){if(t.valueAccessor.setDisabledState){let e=n=>{t.valueAccessor.setDisabledState(n)};i.registerOnDisabledChange(e),t._registerOnDestroy(()=>{i._unregisterOnDisabledChange(e)})}}function xT(i,t){let e=V3(i);t.validator!==null?i.setValidators(C3(e,t.validator)):typeof e=="function"&&i.setValidators([e]);let n=z3(i);t.asyncValidator!==null?i.setAsyncValidators(C3(n,t.asyncValidator)):typeof n=="function"&&i.setAsyncValidators([n]);let r=()=>i.updateValueAndValidity();xb(t._rawValidators,r),xb(t._rawAsyncValidators,r)}function wb(i,t){let e=!1;if(i!==null){if(t.validator!==null){let r=V3(i);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==t.validator);o.length!==r.length&&(e=!0,i.setValidators(o))}}if(t.asyncValidator!==null){let r=z3(i);if(Array.isArray(r)&&r.length>0){let o=r.filter(s=>s!==t.asyncValidator);o.length!==r.length&&(e=!0,i.setAsyncValidators(o))}}}let n=()=>{};return xb(t._rawValidators,n),xb(t._rawAsyncValidators,n),e}function IK(i,t){t.valueAccessor.registerOnChange(e=>{i._pendingValue=e,i._pendingChange=!0,i._pendingDirty=!0,i.updateOn==="change"&&G3(i,t)})}function TK(i,t){t.valueAccessor.registerOnTouched(()=>{i._pendingTouched=!0,i.updateOn==="blur"&&i._pendingChange&&G3(i,t),i.updateOn!=="submit"&&i.markAsTouched()})}function G3(i,t){i._pendingDirty&&i.markAsDirty(),i.setValue(i._pendingValue,{emitModelToViewChange:!1}),t.viewToModelUpdate(i._pendingValue),i._pendingChange=!1}function DK(i,t){let e=(n,r)=>{t.valueAccessor.writeValue(n),r&&t.viewToModelUpdate(n)};i.registerOnChange(e),t._registerOnDestroy(()=>{i._unregisterOnChange(e)})}function j3(i,t){i==null,xT(i,t)}function OK(i,t){return wb(i,t)}function PK(i,t){if(!i.hasOwnProperty("model"))return!1;let e=i.model;return e.isFirstChange()?!0:!Object.is(t,e.currentValue)}function RK(i){return Object.getPrototypeOf(i.constructor)===D3}function W3(i,t){i._syncPendingControls(),t.forEach(e=>{let n=e.control;n.updateOn==="submit"&&n._pendingChange&&(e.viewToModelUpdate(n._pendingValue),n._pendingChange=!1)})}function AK(i,t){if(!t)return null;Array.isArray(t);let e,n,r;return t.forEach(o=>{o.constructor===Xs?e=o:RK(o)?n=o:r=o}),r||n||e||null}function NK(i,t){let e=i.indexOf(t);e>-1&&i.splice(e,1)}var kK={provide:Ih,useExisting:xr(()=>wT)},Hm=Promise.resolve(),wT=(()=>{class i extends Ih{get submitted(){return jr(this.submittedReactive)}constructor(e,n,r){super(),this.callSetDisabledState=r,this._submitted=Ot(()=>this.submittedReactive()),this.submittedReactive=et(!1),this._directives=new Set,this.ngSubmit=new Ie,this.form=new vb({},vT(e),yT(n))}ngAfterViewInit(){this._setUpdateStrategy()}get formDirective(){return this}get control(){return this.form}get path(){return[]}get controls(){return this.form.controls}addControl(e){Hm.then(()=>{let n=this._findContainer(e.path);e.control=n.registerControl(e.name,e.control),yb(e.control,e,this.callSetDisabledState),e.control.updateValueAndValidity({emitEvent:!1}),this._directives.add(e)})}getControl(e){return this.form.get(e.path)}removeControl(e){Hm.then(()=>{let n=this._findContainer(e.path);n&&n.removeControl(e.name),this._directives.delete(e)})}addFormGroup(e){Hm.then(()=>{let n=this._findContainer(e.path),r=new vb({});j3(r,e),n.registerControl(e.name,r),r.updateValueAndValidity({emitEvent:!1})})}removeFormGroup(e){Hm.then(()=>{let n=this._findContainer(e.path);n&&n.removeControl(e.name)})}getFormGroup(e){return this.form.get(e.path)}updateModel(e,n){Hm.then(()=>{this.form.get(e.path).setValue(n)})}setValue(e){this.control.setValue(e)}onSubmit(e){return this.submittedReactive.set(!0),W3(this.form,this._directives),this.ngSubmit.emit(e),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this.submittedReactive.set(!1)}_setUpdateStrategy(){this.options&&this.options.updateOn!=null&&(this.form._updateOn=this.options.updateOn)}_findContainer(e){return e.pop(),e.length?this.form.get(e):this.form}static{this.\u0275fac=function(n){return new(n||i)(q(vd,10),q(_T,10),q(Sb,8))}}static{this.\u0275dir=Ve({type:i,selectors:[["form",3,"ngNoForm","",3,"formGroup",""],["ng-form"],["","ngForm",""]],hostBindings:function(n,r){n&1&&H("submit",function(s){return r.onSubmit(s)})("reset",function(){return r.onReset()})},inputs:{options:[0,"ngFormOptions","options"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Bt([kK]),sn]})}}return i})();function E3(i,t){let e=i.indexOf(t);e>-1&&i.splice(e,1)}function I3(i){return typeof i=="object"&&i!==null&&Object.keys(i).length===2&&"value"in i&&"disabled"in i}var Er=class extends _b{constructor(t=null,e,n){super(U3(e),H3(n,e)),this.defaultValue=null,this._onChange=[],this._pendingChange=!1,this._applyFormState(t),this._setUpdateStrategy(e),this._initObservables(),this.updateValueAndValidity({onlySelf:!0,emitEvent:!!this.asyncValidator}),Cb(e)&&(e.nonNullable||e.initialValueIsDefault)&&(I3(t)?this.defaultValue=t.value:this.defaultValue=t)}setValue(t,e={}){this.value=this._pendingValue=t,this._onChange.length&&e.emitModelToViewChange!==!1&&this._onChange.forEach(n=>n(this.value,e.emitViewToModelChange!==!1)),this.updateValueAndValidity(e)}patchValue(t,e={}){this.setValue(t,e)}reset(t=this.defaultValue,e={}){this._applyFormState(t),this.markAsPristine(e),this.markAsUntouched(e),this.setValue(this.value,e),this._pendingChange=!1}_updateValue(){}_anyControls(t){return!1}_allControlsDisabled(){return this.disabled}registerOnChange(t){this._onChange.push(t)}_unregisterOnChange(t){E3(this._onChange,t)}registerOnDisabledChange(t){this._onDisabledChange.push(t)}_unregisterOnDisabledChange(t){E3(this._onDisabledChange,t)}_forEachChild(t){}_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(t){I3(t)?(this.value=this._pendingValue=t.value,t.disabled?this.disable({onlySelf:!0,emitEvent:!1}):this.enable({onlySelf:!0,emitEvent:!1})):this.value=this._pendingValue=t}};var LK=i=>i instanceof Er;var $3=new pe(""),FK={provide:_d,useExisting:xr(()=>Co)},Co=(()=>{class i extends _d{set isDisabled(e){}static{this._ngModelWarningSentOnce=!1}constructor(e,n,r,o,s){super(),this._ngModelWarningConfig=o,this.callSetDisabledState=s,this.update=new Ie,this._ngModelWarningSent=!1,this._setValidators(e),this._setAsyncValidators(n),this.valueAccessor=AK(this,r)}ngOnChanges(e){if(this._isControlChanged(e)){let n=e.form.previousValue;n&&bb(n,this,!1),yb(this.form,this,this.callSetDisabledState),this.form.updateValueAndValidity({emitEvent:!1})}PK(e,this.viewModel)&&(this.form.setValue(this.model),this.viewModel=this.model)}ngOnDestroy(){this.form&&bb(this.form,this,!1)}get path(){return[]}get control(){return this.form}viewToModelUpdate(e){this.viewModel=e,this.update.emit(e)}_isControlChanged(e){return e.hasOwnProperty("form")}static{this.\u0275fac=function(n){return new(n||i)(q(vd,10),q(_T,10),q(Ba,10),q($3,8),q(Sb,8))}}static{this.\u0275dir=Ve({type:i,selectors:[["","formControl",""]],inputs:{form:[0,"formControl","form"],isDisabled:[0,"disabled","isDisabled"],model:[0,"ngModel","model"]},outputs:{update:"ngModelChange"},exportAs:["ngForm"],features:[Bt([FK]),sn,un]})}}return i})(),BK={provide:Ih,useExisting:xr(()=>CT)},CT=(()=>{class i extends Ih{get submitted(){return jr(this._submittedReactive)}set submitted(e){this._submittedReactive.set(e)}constructor(e,n,r){super(),this.callSetDisabledState=r,this._submitted=Ot(()=>this._submittedReactive()),this._submittedReactive=et(!1),this._onCollectionChange=()=>this._updateDomValue(),this.directives=[],this.form=null,this.ngSubmit=new Ie,this._setValidators(e),this._setAsyncValidators(n)}ngOnChanges(e){this._checkFormPresent(),e.hasOwnProperty("form")&&(this._updateValidators(),this._updateDomValue(),this._updateRegistrations(),this._oldForm=this.form)}ngOnDestroy(){this.form&&(wb(this.form,this),this.form._onCollectionChange===this._onCollectionChange&&this.form._registerOnCollectionChange(()=>{}))}get formDirective(){return this}get control(){return this.form}get path(){return[]}addControl(e){let n=this.form.get(e.path);return yb(n,e,this.callSetDisabledState),n.updateValueAndValidity({emitEvent:!1}),this.directives.push(e),n}getControl(e){return this.form.get(e.path)}removeControl(e){bb(e.control||null,e,!1),NK(this.directives,e)}addFormGroup(e){this._setUpFormContainer(e)}removeFormGroup(e){this._cleanUpFormContainer(e)}getFormGroup(e){return this.form.get(e.path)}addFormArray(e){this._setUpFormContainer(e)}removeFormArray(e){this._cleanUpFormContainer(e)}getFormArray(e){return this.form.get(e.path)}updateModel(e,n){this.form.get(e.path).setValue(n)}onSubmit(e){return this._submittedReactive.set(!0),W3(this.form,this.directives),this.ngSubmit.emit(e),this.form._events.next(new mT(this.control)),e?.target?.method==="dialog"}onReset(){this.resetForm()}resetForm(e=void 0){this.form.reset(e),this._submittedReactive.set(!1),this.form._events.next(new gT(this.form))}_updateDomValue(){this.directives.forEach(e=>{let n=e.control,r=this.form.get(e.path);n!==r&&(bb(n||null,e),LK(r)&&(yb(r,e,this.callSetDisabledState),e.control=r))}),this.form._updateTreeValidity({emitEvent:!1})}_setUpFormContainer(e){let n=this.form.get(e.path);j3(n,e),n.updateValueAndValidity({emitEvent:!1})}_cleanUpFormContainer(e){if(this.form){let n=this.form.get(e.path);n&&OK(n,e)&&n.updateValueAndValidity({emitEvent:!1})}}_updateRegistrations(){this.form._registerOnCollectionChange(this._onCollectionChange),this._oldForm&&this._oldForm._registerOnCollectionChange(()=>{})}_updateValidators(){xT(this.form,this),this._oldForm&&wb(this._oldForm,this)}_checkFormPresent(){this.form}static{this.\u0275fac=function(n){return new(n||i)(q(vd,10),q(_T,10),q(Sb,8))}}static{this.\u0275dir=Ve({type:i,selectors:[["","formGroup",""]],hostBindings:function(n,r){n&1&&H("submit",function(s){return r.onSubmit(s)})("reset",function(){return r.onReset()})},inputs:{form:[0,"formGroup","form"]},outputs:{ngSubmit:"ngSubmit"},exportAs:["ngForm"],features:[Bt([BK]),sn,un]})}}return i})();var VK=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({})}}return i})();var Ir=(()=>{class i{static withConfig(e){return{ngModule:i,providers:[{provide:$3,useValue:e.warnOnNgModelWithFormControl??"always"},{provide:Sb,useValue:e.callSetDisabledState??bT}]}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({imports:[VK]})}}return i})();var MT;try{MT=typeof Intl<"u"&&Intl.v8BreakIterator}catch{MT=!1}var Rn=(()=>{class i{constructor(){this._platformId=S(Da),this.isBrowser=this._platformId?AL(this._platformId):typeof document=="object"&&!!document,this.EDGE=this.isBrowser&&/(edge)/i.test(navigator.userAgent),this.TRIDENT=this.isBrowser&&/(msie|trident)/i.test(navigator.userAgent),this.BLINK=this.isBrowser&&!!(window.chrome||MT)&&typeof CSS<"u"&&!this.EDGE&&!this.TRIDENT,this.WEBKIT=this.isBrowser&&/AppleWebKit/i.test(navigator.userAgent)&&!this.BLINK&&!this.EDGE&&!this.TRIDENT,this.IOS=this.isBrowser&&/iPad|iPhone|iPod/.test(navigator.userAgent)&&!("MSStream"in window),this.FIREFOX=this.isBrowser&&/(firefox|minefield)/i.test(navigator.userAgent),this.ANDROID=this.isBrowser&&/android/i.test(navigator.userAgent)&&!this.TRIDENT,this.SAFARI=this.isBrowser&&/safari/i.test(navigator.userAgent)&&this.WEBKIT}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var $m;function zK(){if($m==null&&typeof window<"u")try{window.addEventListener("test",null,Object.defineProperty({},"passive",{get:()=>$m=!0}))}finally{$m=$m||!1}return $m}function Wr(i){return zK()?i:!!i.capture}var vs=function(i){return i[i.NORMAL=0]="NORMAL",i[i.NEGATED=1]="NEGATED",i[i.INVERTED=2]="INVERTED",i}(vs||{}),Mb,yd;function Eb(){if(yd==null){if(typeof document!="object"||!document||typeof Element!="function"||!Element)return yd=!1,yd;if("scrollBehavior"in document.documentElement.style)yd=!0;else{let i=Element.prototype.scrollTo;i?yd=!/\{\s*\[native code\]\s*\}/.test(i.toString()):yd=!1}}return yd}function Dh(){if(typeof document!="object"||!document)return vs.NORMAL;if(Mb==null){let i=document.createElement("div"),t=i.style;i.dir="rtl",t.width="1px",t.overflow="auto",t.visibility="hidden",t.pointerEvents="none",t.position="absolute";let e=document.createElement("div"),n=e.style;n.width="2px",n.height="1px",i.appendChild(e),document.body.appendChild(i),Mb=vs.NORMAL,i.scrollLeft===0&&(i.scrollLeft=1,Mb=i.scrollLeft===0?vs.NEGATED:vs.INVERTED),i.remove()}return Mb}var ST;function UK(){if(ST==null){let i=typeof document<"u"?document.head:null;ST=!!(i&&(i.createShadowRoot||i.attachShadow))}return ST}function Oh(i){if(UK()){let t=i.getRootNode?i.getRootNode():null;if(typeof ShadowRoot<"u"&&ShadowRoot&&t instanceof ShadowRoot)return t}return null}function qm(){let i=typeof document<"u"&&document?document.activeElement:null;for(;i&&i.shadowRoot;){let t=i.shadowRoot.activeElement;if(t===i)break;i=t}return i}function Pi(i){return i.composedPath?i.composedPath()[0]:i.target}function ET(){return typeof __karma__<"u"&&!!__karma__||typeof jasmine<"u"&&!!jasmine||typeof jest<"u"&&!!jest||typeof Mocha<"u"&&!!Mocha}var Ib=new WeakMap,mi=(()=>{class i{constructor(){this._injector=S(pt),this._environmentInjector=S(tr)}load(e){let n=this._appRef=this._appRef||this._injector.get(zo),r=Ib.get(n);r||(r={loaders:new Set,refs:[]},Ib.set(n,r),n.onDestroy(()=>{Ib.get(n)?.refs.forEach(o=>o.destroy()),Ib.delete(n)})),r.loaders.has(e)||(r.loaders.add(e),r.refs.push(u0(e,{environmentInjector:this._environmentInjector})))}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),Ym=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["ng-component"]],exportAs:["cdkVisuallyHidden"],standalone:!0,features:[se],decls:0,vars:0,template:function(n,r){},styles:[".cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}"],encapsulation:2,changeDetection:0})}}return i})();function Si(i,...t){return t.length?t.some(e=>i[e]):i.altKey||i.shiftKey||i.ctrlKey||i.metaKey}function bd(i){return cs(i)?i:ke(i)}function Xm(i){return i!=null&&`${i}`!="false"}function Va(i,t=0){return HK(i)?Number(i):arguments.length===2?t:0}function HK(i){return!isNaN(parseFloat(i))&&!isNaN(Number(i))}function xd(i){return Array.isArray(i)?i:[i]}function Mi(i){return i==null?"":typeof i=="string"?i:`${i}px`}function ar(i){return i instanceof Fe?i.nativeElement:i}var GK=(()=>{class i{create(e){return typeof MutationObserver>"u"?null:new MutationObserver(e)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Tb=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({providers:[GK]})}}return i})();var q3=new Set,wd,jK=(()=>{class i{constructor(){this._platform=S(Rn),this._nonce=S(Kf,{optional:!0}),this._matchMedia=this._platform.isBrowser&&window.matchMedia?window.matchMedia.bind(window):$K}matchMedia(e){return(this._platform.WEBKIT||this._platform.BLINK)&&WK(e,this._nonce),this._matchMedia(e)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function WK(i,t){if(!q3.has(i))try{wd||(wd=document.createElement("style"),t&&wd.setAttribute("nonce",t),wd.setAttribute("type","text/css"),document.head.appendChild(wd)),wd.sheet&&(wd.sheet.insertRule(`@media ${i} {body{ }}`,0),q3.add(i))}catch(e){console.error(e)}}function $K(i){return{matches:i==="all"||i==="",media:i,addListener:()=>{},removeListener:()=>{}}}var Ph=(()=>{class i{constructor(){this._mediaMatcher=S(jK),this._zone=S(Ue),this._queries=new Map,this._destroySubject=new ce}ngOnDestroy(){this._destroySubject.next(),this._destroySubject.complete()}isMatched(e){return Y3(xd(e)).some(r=>this._registerQuery(r).mql.matches)}observe(e){let r=Y3(xd(e)).map(s=>this._registerQuery(s).observable),o=ji(r);return o=ho(o.pipe(tn(1)),o.pipe(kf(1),Lo(0))),o.pipe(We(s=>{let a={matches:!1,breakpoints:{}};return s.forEach(({matches:l,query:c})=>{a.matches=a.matches||l,a.breakpoints[c]=l}),a}))}_registerQuery(e){if(this._queries.has(e))return this._queries.get(e);let n=this._mediaMatcher.matchMedia(e),o={observable:new Dt(s=>{let a=l=>this._zone.run(()=>s.next(l));return n.addListener(a),()=>{n.removeListener(a)}}).pipe(ni(n),We(({matches:s})=>({query:e,matches:s})),Ke(this._destroySubject)),mql:n};return this._queries.set(e,o),o}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function Y3(i){return i.map(t=>t.split(",")).reduce((t,e)=>t.concat(e)).map(t=>t.trim())}var Db={XSmall:"(max-width: 599.98px)",Small:"(min-width: 600px) and (max-width: 959.98px)",Medium:"(min-width: 960px) and (max-width: 1279.98px)",Large:"(min-width: 1280px) and (max-width: 1919.98px)",XLarge:"(min-width: 1920px)",Handset:"(max-width: 599.98px) and (orientation: portrait), (max-width: 959.98px) and (orientation: landscape)",Tablet:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait), (min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",Web:"(min-width: 840px) and (orientation: portrait), (min-width: 1280px) and (orientation: landscape)",HandsetPortrait:"(max-width: 599.98px) and (orientation: portrait)",TabletPortrait:"(min-width: 600px) and (max-width: 839.98px) and (orientation: portrait)",WebPortrait:"(min-width: 840px) and (orientation: portrait)",HandsetLandscape:"(max-width: 959.98px) and (orientation: landscape)",TabletLandscape:"(min-width: 960px) and (max-width: 1279.98px) and (orientation: landscape)",WebLandscape:"(min-width: 1280px) and (orientation: landscape)"};var J3=" ";function Lh(i,t,e){let n=Ab(i,t);e=e.trim(),!n.some(r=>r.trim()===e)&&(n.push(e),i.setAttribute(t,n.join(J3)))}function $l(i,t,e){let n=Ab(i,t);e=e.trim();let r=n.filter(o=>o!==e);r.length?i.setAttribute(t,r.join(J3)):i.removeAttribute(t)}function Ab(i,t){return i.getAttribute(t)?.match(/\S+/g)??[]}var eB="cdk-describedby-message",Ob="cdk-describedby-host",DT=0,tB=(()=>{class i{constructor(){this._platform=S(Rn),this._document=S(ft),this._messageRegistry=new Map,this._messagesContainer=null,this._id=`${DT++}`,S(mi).load(Ym),this._id=S(Zf)+"-"+DT++}describe(e,n,r){if(!this._canBeDescribed(e,n))return;let o=IT(n,r);typeof n!="string"?(X3(n,this._id),this._messageRegistry.set(o,{messageElement:n,referenceCount:0})):this._messageRegistry.has(o)||this._createMessageElement(n,r),this._isElementDescribedByMessage(e,o)||this._addMessageReference(e,o)}removeDescription(e,n,r){if(!n||!this._isElementNode(e))return;let o=IT(n,r);if(this._isElementDescribedByMessage(e,o)&&this._removeMessageReference(e,o),typeof n=="string"){let s=this._messageRegistry.get(o);s&&s.referenceCount===0&&this._deleteMessageElement(o)}this._messagesContainer?.childNodes.length===0&&(this._messagesContainer.remove(),this._messagesContainer=null)}ngOnDestroy(){let e=this._document.querySelectorAll(`[${Ob}="${this._id}"]`);for(let n=0;nr.indexOf(eB)!=0);e.setAttribute("aria-describedby",n.join(" "))}_addMessageReference(e,n){let r=this._messageRegistry.get(n);Lh(e,"aria-describedby",r.messageElement.id),e.setAttribute(Ob,this._id),r.referenceCount++}_removeMessageReference(e,n){let r=this._messageRegistry.get(n);r.referenceCount--,$l(e,"aria-describedby",r.messageElement.id),e.removeAttribute(Ob)}_isElementDescribedByMessage(e,n){let r=Ab(e,"aria-describedby"),o=this._messageRegistry.get(n),s=o&&o.messageElement.id;return!!s&&r.indexOf(s)!=-1}_canBeDescribed(e,n){if(!this._isElementNode(e))return!1;if(n&&typeof n=="object")return!0;let r=n==null?"":`${n}`.trim(),o=e.getAttribute("aria-label");return r?!o||o.trim()!==r:!1}_isElementNode(e){return e.nodeType===this._document.ELEMENT_NODE}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function IT(i,t){return typeof i=="string"?`${t||""}/${i}`:i}function X3(i,t){i.id||(i.id=`${eB}-${t}-${DT++}`)}var oJ=200,Nb=class{constructor(t,e){this._letterKeyStream=new ce,this._items=[],this._selectedItemIndex=-1,this._pressedLetters=[],this._selectedItem=new ce,this.selectedItem=this._selectedItem;let n=typeof e?.debounceInterval=="number"?e.debounceInterval:oJ;e?.skipPredicate&&(this._skipPredicateFn=e.skipPredicate),this.setItems(t),this._setupKeyHandler(n)}destroy(){this._pressedLetters=[],this._letterKeyStream.complete(),this._selectedItem.complete()}setCurrentSelectedItemIndex(t){this._selectedItemIndex=t}setItems(t){this._items=t}handleKey(t){let e=t.keyCode;t.key&&t.key.length===1?this._letterKeyStream.next(t.key.toLocaleUpperCase()):(e>=65&&e<=90||e>=48&&e<=57)&&this._letterKeyStream.next(String.fromCharCode(e))}isTyping(){return this._pressedLetters.length>0}reset(){this._pressedLetters=[]}_setupKeyHandler(t){this._letterKeyStream.pipe(gn(e=>this._pressedLetters.push(e)),Lo(t),qt(()=>this._pressedLetters.length>0),We(()=>this._pressedLetters.join("").toLocaleUpperCase())).subscribe(e=>{for(let n=1;nn.disabled,this.tabOut=new ce,this.change=new ce,t instanceof Wi?this._itemChangesSubscription=t.changes.subscribe(n=>this._itemsChanged(n.toArray())):nm(t)&&(this._effectRef=ct(()=>this._itemsChanged(t()),{injector:e}))}skipPredicate(t){return this._skipPredicateFn=t,this}withWrap(t=!0){return this._wrap=t,this}withVerticalOrientation(t=!0){return this._vertical=t,this}withHorizontalOrientation(t){return this._horizontal=t,this}withAllowedModifierKeys(t){return this._allowedModifierKeys=t,this}withTypeAhead(t=200){this._typeaheadSubscription.unsubscribe();let e=this._getItemsArray();return this._typeahead=new Nb(e,{debounceInterval:typeof t=="number"?t:void 0,skipPredicate:n=>this._skipPredicateFn(n)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(n=>{this.setActiveItem(n)}),this}cancelTypeahead(){return this._typeahead?.reset(),this}withHomeAndEnd(t=!0){return this._homeAndEnd=t,this}withPageUpDown(t=!0,e=10){return this._pageUpAndDown={enabled:t,delta:e},this}setActiveItem(t){let e=this._activeItem;this.updateActiveItem(t),this._activeItem!==e&&this.change.next(this._activeItemIndex)}onKeydown(t){let e=t.keyCode,r=["altKey","ctrlKey","metaKey","shiftKey"].every(o=>!t[o]||this._allowedModifierKeys.indexOf(o)>-1);switch(e){case 9:this.tabOut.next();return;case 40:if(this._vertical&&r){this.setNextItemActive();break}else return;case 38:if(this._vertical&&r){this.setPreviousItemActive();break}else return;case 39:if(this._horizontal&&r){this._horizontal==="rtl"?this.setPreviousItemActive():this.setNextItemActive();break}else return;case 37:if(this._horizontal&&r){this._horizontal==="rtl"?this.setNextItemActive():this.setPreviousItemActive();break}else return;case 36:if(this._homeAndEnd&&r){this.setFirstItemActive();break}else return;case 35:if(this._homeAndEnd&&r){this.setLastItemActive();break}else return;case 33:if(this._pageUpAndDown.enabled&&r){let o=this._activeItemIndex-this._pageUpAndDown.delta;this._setActiveItemByIndex(o>0?o:0,1);break}else return;case 34:if(this._pageUpAndDown.enabled&&r){let o=this._activeItemIndex+this._pageUpAndDown.delta,s=this._getItemsArray().length;this._setActiveItemByIndex(o-1&&e!==this._activeItemIndex&&(this._activeItemIndex=e,this._typeahead?.setCurrentSelectedItemIndex(e))}}},Ah=class extends kb{setActiveItem(t){this.activeItem&&this.activeItem.setInactiveStyles(),super.setActiveItem(t),this.activeItem&&this.activeItem.setActiveStyles()}},Lb=class extends kb{constructor(){super(...arguments),this._origin="program"}setFocusOrigin(t){return this._origin=t,this}setActiveItem(t){super.setActiveItem(t),this.activeItem&&this.activeItem.focus(this._origin)}},OT=class{_initializeFocus(){if(this._hasInitialFocused||this._items.length===0)return;let t=0;for(let n=0;n!1,this._trackByFn=n=>n,this._items=[],this._typeaheadSubscription=St.EMPTY,this._hasInitialFocused=!1,this.change=new ce,t instanceof Wi?(this._items=t.toArray(),t.changes.subscribe(n=>{this._items=n.toArray(),this._typeahead?.setItems(this._items),this._updateActiveItemIndex(this._items),this._initializeFocus()})):cs(t)?t.subscribe(n=>{this._items=n,this._typeahead?.setItems(n),this._updateActiveItemIndex(n),this._initializeFocus()}):(this._items=t,this._initializeFocus()),typeof e.shouldActivationFollowFocus=="boolean"&&(this._shouldActivationFollowFocus=e.shouldActivationFollowFocus),e.horizontalOrientation&&(this._horizontalOrientation=e.horizontalOrientation),e.skipPredicate&&(this._skipPredicateFn=e.skipPredicate),e.trackBy&&(this._trackByFn=e.trackBy),typeof e.typeAheadDebounceInterval<"u"&&this._setTypeAhead(e.typeAheadDebounceInterval)}destroy(){this._typeaheadSubscription.unsubscribe(),this._typeahead?.destroy(),this.change.complete()}onKeydown(t){switch(t.key){case"Tab":return;case"ArrowDown":this._focusNextItem();break;case"ArrowUp":this._focusPreviousItem();break;case"ArrowRight":this._horizontalOrientation==="rtl"?this._collapseCurrentItem():this._expandCurrentItem();break;case"ArrowLeft":this._horizontalOrientation==="rtl"?this._expandCurrentItem():this._collapseCurrentItem();break;case"Home":this._focusFirstItem();break;case"End":this._focusLastItem();break;case"Enter":case" ":this._activateCurrentItem();break;default:if(t.key==="*"){this._expandAllItemsAtCurrentItemLevel();break}this._typeahead?.handleKey(t);return}this._typeahead?.reset(),t.preventDefault()}getActiveItemIndex(){return this._activeItemIndex}getActiveItem(){return this._activeItem}_focusFirstItem(){this.focusItem(this._findNextAvailableItemIndex(-1))}_focusLastItem(){this.focusItem(this._findPreviousAvailableItemIndex(this._items.length))}_focusNextItem(){this.focusItem(this._findNextAvailableItemIndex(this._activeItemIndex))}_focusPreviousItem(){this.focusItem(this._findPreviousAvailableItemIndex(this._activeItemIndex))}focusItem(t,e={}){e.emitChangeEvent??=!0;let n=typeof t=="number"?t:this._items.findIndex(s=>this._trackByFn(s)===this._trackByFn(t));if(n<0||n>=this._items.length)return;let r=this._items[n];if(this._activeItem!==null&&this._trackByFn(r)===this._trackByFn(this._activeItem))return;let o=this._activeItem;this._activeItem=r??null,this._activeItemIndex=n,this._typeahead?.setCurrentSelectedItemIndex(n),this._activeItem?.focus(),o?.unfocus(),e.emitChangeEvent&&this.change.next(this._activeItem),this._shouldActivationFollowFocus&&this._activateCurrentItem()}_updateActiveItemIndex(t){let e=this._activeItem;if(!e)return;let n=t.findIndex(r=>this._trackByFn(r)===this._trackByFn(e));n>-1&&n!==this._activeItemIndex&&(this._activeItemIndex=n,this._typeahead?.setCurrentSelectedItemIndex(n))}_setTypeAhead(t){this._typeahead=new Nb(this._items,{debounceInterval:typeof t=="number"?t:void 0,skipPredicate:e=>this._skipPredicateFn(e)}),this._typeaheadSubscription=this._typeahead.selectedItem.subscribe(e=>{this.focusItem(e)})}_findNextAvailableItemIndex(t){for(let e=t+1;e=0;e--)if(!this._skipPredicateFn(this._items[e]))return e;return t}_collapseCurrentItem(){if(this._activeItem)if(this._isCurrentItemExpanded())this._activeItem.collapse();else{let t=this._activeItem.getParent();if(!t||this._skipPredicateFn(t))return;this.focusItem(t)}}_expandCurrentItem(){this._activeItem&&(this._isCurrentItemExpanded()?bd(this._activeItem.getChildren()).pipe(tn(1)).subscribe(t=>{let e=t.find(n=>!this._skipPredicateFn(n));e&&this.focusItem(e)}):this._activeItem.expand())}_isCurrentItemExpanded(){return this._activeItem?typeof this._activeItem.isExpanded=="boolean"?this._activeItem.isExpanded:this._activeItem.isExpanded():!1}_isItemDisabled(t){return typeof t.isDisabled=="boolean"?t.isDisabled:t.isDisabled?.()}_expandAllItemsAtCurrentItemLevel(){if(!this._activeItem)return;let t=this._activeItem.getParent(),e;t?e=bd(t.getChildren()):e=ke(this._items.filter(n=>n.getParent()===null)),e.pipe(tn(1)).subscribe(n=>{for(let r of n)r.expand()})}_activateCurrentItem(){this._activeItem?.activate()}};function sJ(){return(i,t)=>new OT(i,t)}var nB=new pe("tree-key-manager",{providedIn:"root",factory:sJ});var Bb=(()=>{class i{constructor(){this._platform=S(Rn)}isDisabled(e){return e.hasAttribute("disabled")}isVisible(e){return lJ(e)&&getComputedStyle(e).visibility==="visible"}isTabbable(e){if(!this._platform.isBrowser)return!1;let n=aJ(gJ(e));if(n&&(Q3(n)===-1||!this.isVisible(n)))return!1;let r=e.nodeName.toLowerCase(),o=Q3(e);return e.hasAttribute("contenteditable")?o!==-1:r==="iframe"||r==="object"||this._platform.WEBKIT&&this._platform.IOS&&!fJ(e)?!1:r==="audio"?e.hasAttribute("controls")?o!==-1:!1:r==="video"?o===-1?!1:o!==null?!0:this._platform.FIREFOX||e.hasAttribute("controls"):e.tabIndex>=0}isFocusable(e,n){return mJ(e)&&!this.isDisabled(e)&&(n?.ignoreVisibility||this.isVisible(e))}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function aJ(i){try{return i.frameElement}catch{return null}}function lJ(i){return!!(i.offsetWidth||i.offsetHeight||typeof i.getClientRects=="function"&&i.getClientRects().length)}function cJ(i){let t=i.nodeName.toLowerCase();return t==="input"||t==="select"||t==="button"||t==="textarea"}function dJ(i){return hJ(i)&&i.type=="hidden"}function uJ(i){return pJ(i)&&i.hasAttribute("href")}function hJ(i){return i.nodeName.toLowerCase()=="input"}function pJ(i){return i.nodeName.toLowerCase()=="a"}function iB(i){if(!i.hasAttribute("tabindex")||i.tabIndex===void 0)return!1;let t=i.getAttribute("tabindex");return!!(t&&!isNaN(parseInt(t,10)))}function Q3(i){if(!iB(i))return null;let t=parseInt(i.getAttribute("tabindex")||"",10);return isNaN(t)?-1:t}function fJ(i){let t=i.nodeName.toLowerCase(),e=t==="input"&&i.type;return e==="text"||e==="password"||t==="select"||t==="textarea"}function mJ(i){return dJ(i)?!1:cJ(i)||uJ(i)||i.hasAttribute("contenteditable")||iB(i)}function gJ(i){return i.ownerDocument&&i.ownerDocument.defaultView||window}var Fb=class{get enabled(){return this._enabled}set enabled(t){this._enabled=t,this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}constructor(t,e,n,r,o=!1,s){this._element=t,this._checker=e,this._ngZone=n,this._document=r,this._injector=s,this._hasAttached=!1,this.startAnchorListener=()=>this.focusLastTabbableElement(),this.endAnchorListener=()=>this.focusFirstTabbableElement(),this._enabled=!0,o||this.attachAnchors()}destroy(){let t=this._startAnchor,e=this._endAnchor;t&&(t.removeEventListener("focus",this.startAnchorListener),t.remove()),e&&(e.removeEventListener("focus",this.endAnchorListener),e.remove()),this._startAnchor=this._endAnchor=null,this._hasAttached=!1}attachAnchors(){return this._hasAttached?!0:(this._ngZone.runOutsideAngular(()=>{this._startAnchor||(this._startAnchor=this._createAnchor(),this._startAnchor.addEventListener("focus",this.startAnchorListener)),this._endAnchor||(this._endAnchor=this._createAnchor(),this._endAnchor.addEventListener("focus",this.endAnchorListener))}),this._element.parentNode&&(this._element.parentNode.insertBefore(this._startAnchor,this._element),this._element.parentNode.insertBefore(this._endAnchor,this._element.nextSibling),this._hasAttached=!0),this._hasAttached)}focusInitialElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusInitialElement(t)))})}focusFirstTabbableElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusFirstTabbableElement(t)))})}focusLastTabbableElementWhenReady(t){return new Promise(e=>{this._executeOnStable(()=>e(this.focusLastTabbableElement(t)))})}_getRegionBoundary(t){let e=this._element.querySelectorAll(`[cdk-focus-region-${t}], [cdkFocusRegion${t}], [cdk-focus-${t}]`);return t=="start"?e.length?e[0]:this._getFirstTabbableElement(this._element):e.length?e[e.length-1]:this._getLastTabbableElement(this._element)}focusInitialElement(t){let e=this._element.querySelector("[cdk-focus-initial], [cdkFocusInitial]");if(e){if(!this._checker.isFocusable(e)){let n=this._getFirstTabbableElement(e);return n?.focus(t),!!n}return e.focus(t),!0}return this.focusFirstTabbableElement(t)}focusFirstTabbableElement(t){let e=this._getRegionBoundary("start");return e&&e.focus(t),!!e}focusLastTabbableElement(t){let e=this._getRegionBoundary("end");return e&&e.focus(t),!!e}hasAttached(){return this._hasAttached}_getFirstTabbableElement(t){if(this._checker.isFocusable(t)&&this._checker.isTabbable(t))return t;let e=t.children;for(let n=0;n=0;n--){let r=e[n].nodeType===this._document.ELEMENT_NODE?this._getLastTabbableElement(e[n]):null;if(r)return r}return null}_createAnchor(){let t=this._document.createElement("div");return this._toggleAnchorTabIndex(this._enabled,t),t.classList.add("cdk-visually-hidden"),t.classList.add("cdk-focus-trap-anchor"),t.setAttribute("aria-hidden","true"),t}_toggleAnchorTabIndex(t,e){t?e.setAttribute("tabindex","0"):e.removeAttribute("tabindex")}toggleAnchors(t){this._startAnchor&&this._endAnchor&&(this._toggleAnchorTabIndex(t,this._startAnchor),this._toggleAnchorTabIndex(t,this._endAnchor))}_executeOnStable(t){this._injector?zi(t,{injector:this._injector}):setTimeout(t)}},rB=(()=>{class i{constructor(){this._checker=S(Bb),this._ngZone=S(Ue),this._document=S(ft),this._injector=S(pt),S(mi).load(Ym)}create(e,n=!1){return new Fb(e,this._checker,this._ngZone,this._document,n,this._injector)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var PT=class extends Fb{get enabled(){return this._enabled}set enabled(t){this._enabled=t,this._enabled?this._focusTrapManager.register(this):this._focusTrapManager.deregister(this)}constructor(t,e,n,r,o,s,a,l){super(t,e,n,r,a.defer,l),this._focusTrapManager=o,this._inertStrategy=s,this._focusTrapManager.register(this)}destroy(){this._focusTrapManager.deregister(this),super.destroy()}_enable(){this._inertStrategy.preventFocus(this),this.toggleAnchors(!0)}_disable(){this._inertStrategy.allowFocus(this),this.toggleAnchors(!1)}},RT=class{constructor(){this._listener=null}preventFocus(t){this._listener&&t._document.removeEventListener("focus",this._listener,!0),this._listener=e=>this._trapFocus(t,e),t._ngZone.runOutsideAngular(()=>{t._document.addEventListener("focus",this._listener,!0)})}allowFocus(t){this._listener&&(t._document.removeEventListener("focus",this._listener,!0),this._listener=null)}_trapFocus(t,e){let n=e.target,r=t._element;n&&!r.contains(n)&&!n.closest?.("div.cdk-overlay-pane")&&setTimeout(()=>{t.enabled&&!r.contains(t._document.activeElement)&&t.focusFirstTabbableElement()})}},_J=new pe("FOCUS_TRAP_INERT_STRATEGY"),vJ=(()=>{class i{constructor(){this._focusTrapStack=[]}register(e){this._focusTrapStack=this._focusTrapStack.filter(r=>r!==e);let n=this._focusTrapStack;n.length&&n[n.length-1]._disable(),n.push(e),e._enable()}deregister(e){e._disable();let n=this._focusTrapStack,r=n.indexOf(e);r!==-1&&(n.splice(r,1),n.length&&n[n.length-1]._enable())}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),Fh=(()=>{class i{constructor(){this._checker=S(Bb),this._ngZone=S(Ue),this._focusTrapManager=S(vJ),this._document=S(ft),this._injector=S(pt);let e=S(_J,{optional:!0});this._inertStrategy=e||new RT}create(e,n={defer:!1}){let r;return typeof n=="boolean"?r={defer:n}:r=n,new PT(e,this._checker,this._ngZone,this._document,this._focusTrapManager,this._inertStrategy,r,this._injector)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function Sd(i){return i.buttons===0||i.detail===0}function Md(i){let t=i.touches&&i.touches[0]||i.changedTouches&&i.changedTouches[0];return!!t&&t.identifier===-1&&(t.radiusX==null||t.radiusX===1)&&(t.radiusY==null||t.radiusY===1)}var yJ=new pe("cdk-input-modality-detector-options"),bJ={ignoreKeys:[18,17,224,91,16]},oB=650,Rh=Wr({passive:!0,capture:!0}),xJ=(()=>{class i{get mostRecentModality(){return this._modality.value}constructor(){this._platform=S(Rn),this._mostRecentTarget=null,this._modality=new yn(null),this._lastTouchMs=0,this._onKeydown=o=>{this._options?.ignoreKeys?.some(s=>s===o.keyCode)||(this._modality.next("keyboard"),this._mostRecentTarget=Pi(o))},this._onMousedown=o=>{Date.now()-this._lastTouchMs{if(Md(o)){this._modality.next("keyboard");return}this._lastTouchMs=Date.now(),this._modality.next("touch"),this._mostRecentTarget=Pi(o)};let e=S(Ue),n=S(ft),r=S(yJ,{optional:!0});this._options=X(X({},bJ),r),this.modalityDetected=this._modality.pipe(kf(1)),this.modalityChanged=this.modalityDetected.pipe(bl()),this._platform.isBrowser&&e.runOutsideAngular(()=>{n.addEventListener("keydown",this._onKeydown,Rh),n.addEventListener("mousedown",this._onMousedown,Rh),n.addEventListener("touchstart",this._onTouchstart,Rh)})}ngOnDestroy(){this._modality.complete(),this._platform.isBrowser&&(document.removeEventListener("keydown",this._onKeydown,Rh),document.removeEventListener("mousedown",this._onMousedown,Rh),document.removeEventListener("touchstart",this._onTouchstart,Rh))}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),wJ=new pe("liveAnnouncerElement",{providedIn:"root",factory:CJ});function CJ(){return null}var SJ=new pe("LIVE_ANNOUNCER_DEFAULT_OPTIONS"),MJ=0,Vb=(()=>{class i{constructor(){this._ngZone=S(Ue),this._defaultOptions=S(SJ,{optional:!0}),this._document=S(ft);let e=S(wJ,{optional:!0});this._liveElement=e||this._createLiveElement()}announce(e,...n){let r=this._defaultOptions,o,s;return n.length===1&&typeof n[0]=="number"?s=n[0]:[o,s]=n,this.clear(),clearTimeout(this._previousTimeout),o||(o=r&&r.politeness?r.politeness:"polite"),s==null&&r&&(s=r.duration),this._liveElement.setAttribute("aria-live",o),this._liveElement.id&&this._exposeAnnouncerToModals(this._liveElement.id),this._ngZone.runOutsideAngular(()=>(this._currentPromise||(this._currentPromise=new Promise(a=>this._currentResolve=a)),clearTimeout(this._previousTimeout),this._previousTimeout=setTimeout(()=>{this._liveElement.textContent=e,typeof s=="number"&&(this._previousTimeout=setTimeout(()=>this.clear(),s)),this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0},100),this._currentPromise))}clear(){this._liveElement&&(this._liveElement.textContent="")}ngOnDestroy(){clearTimeout(this._previousTimeout),this._liveElement?.remove(),this._liveElement=null,this._currentResolve?.(),this._currentPromise=this._currentResolve=void 0}_createLiveElement(){let e="cdk-live-announcer-element",n=this._document.getElementsByClassName(e),r=this._document.createElement("div");for(let o=0;o .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{class i{constructor(){this._ngZone=S(Ue),this._platform=S(Rn),this._inputModalityDetector=S(xJ),this._origin=null,this._windowFocused=!1,this._originFromTouchInteraction=!1,this._elementInfo=new Map,this._monitoredElementCount=0,this._rootNodeFocusListenerCount=new Map,this._windowFocusListener=()=>{this._windowFocused=!0,this._windowFocusTimeoutId=window.setTimeout(()=>this._windowFocused=!1)},this._document=S(ft,{optional:!0}),this._stopInputModalityDetector=new ce,this._rootNodeFocusAndBlurListener=n=>{let r=Pi(n);for(let o=r;o;o=o.parentElement)n.type==="focus"?this._onFocus(n,o):this._onBlur(n,o)};let e=S(EJ,{optional:!0});this._detectionMode=e?.detectionMode||Rb.IMMEDIATE}monitor(e,n=!1){let r=ar(e);if(!this._platform.isBrowser||r.nodeType!==1)return ke();let o=Oh(r)||this._getDocument(),s=this._elementInfo.get(r);if(s)return n&&(s.checkChildren=!0),s.subject;let a={checkChildren:n,subject:new ce,rootNode:o};return this._elementInfo.set(r,a),this._registerGlobalListeners(a),a.subject}stopMonitoring(e){let n=ar(e),r=this._elementInfo.get(n);r&&(r.subject.complete(),this._setClasses(n),this._elementInfo.delete(n),this._removeGlobalListeners(r))}focusVia(e,n,r){let o=ar(e),s=this._getDocument().activeElement;o===s?this._getClosestElementsInfo(o).forEach(([a,l])=>this._originChanged(a,n,l)):(this._setOrigin(n),typeof o.focus=="function"&&o.focus(r))}ngOnDestroy(){this._elementInfo.forEach((e,n)=>this.stopMonitoring(n))}_getDocument(){return this._document||document}_getWindow(){return this._getDocument().defaultView||window}_getFocusOrigin(e){return this._origin?this._originFromTouchInteraction?this._shouldBeAttributedToTouch(e)?"touch":"program":this._origin:this._windowFocused&&this._lastFocusOrigin?this._lastFocusOrigin:e&&this._isLastInteractionFromInputLabel(e)?"mouse":"program"}_shouldBeAttributedToTouch(e){return this._detectionMode===Rb.EVENTUAL||!!e?.contains(this._inputModalityDetector._mostRecentTarget)}_setClasses(e,n){e.classList.toggle("cdk-focused",!!n),e.classList.toggle("cdk-touch-focused",n==="touch"),e.classList.toggle("cdk-keyboard-focused",n==="keyboard"),e.classList.toggle("cdk-mouse-focused",n==="mouse"),e.classList.toggle("cdk-program-focused",n==="program")}_setOrigin(e,n=!1){this._ngZone.runOutsideAngular(()=>{if(this._origin=e,this._originFromTouchInteraction=e==="touch"&&n,this._detectionMode===Rb.IMMEDIATE){clearTimeout(this._originTimeoutId);let r=this._originFromTouchInteraction?oB:1;this._originTimeoutId=setTimeout(()=>this._origin=null,r)}})}_onFocus(e,n){let r=this._elementInfo.get(n),o=Pi(e);!r||!r.checkChildren&&n!==o||this._originChanged(n,this._getFocusOrigin(o),r)}_onBlur(e,n){let r=this._elementInfo.get(n);!r||r.checkChildren&&e.relatedTarget instanceof Node&&n.contains(e.relatedTarget)||(this._setClasses(n),this._emitOrigin(r,null))}_emitOrigin(e,n){e.subject.observers.length&&this._ngZone.run(()=>e.subject.next(n))}_registerGlobalListeners(e){if(!this._platform.isBrowser)return;let n=e.rootNode,r=this._rootNodeFocusListenerCount.get(n)||0;r||this._ngZone.runOutsideAngular(()=>{n.addEventListener("focus",this._rootNodeFocusAndBlurListener,Pb),n.addEventListener("blur",this._rootNodeFocusAndBlurListener,Pb)}),this._rootNodeFocusListenerCount.set(n,r+1),++this._monitoredElementCount===1&&(this._ngZone.runOutsideAngular(()=>{this._getWindow().addEventListener("focus",this._windowFocusListener)}),this._inputModalityDetector.modalityDetected.pipe(Ke(this._stopInputModalityDetector)).subscribe(o=>{this._setOrigin(o,!0)}))}_removeGlobalListeners(e){let n=e.rootNode;if(this._rootNodeFocusListenerCount.has(n)){let r=this._rootNodeFocusListenerCount.get(n);r>1?this._rootNodeFocusListenerCount.set(n,r-1):(n.removeEventListener("focus",this._rootNodeFocusAndBlurListener,Pb),n.removeEventListener("blur",this._rootNodeFocusAndBlurListener,Pb),this._rootNodeFocusListenerCount.delete(n))}--this._monitoredElementCount||(this._getWindow().removeEventListener("focus",this._windowFocusListener),this._stopInputModalityDetector.next(),clearTimeout(this._windowFocusTimeoutId),clearTimeout(this._originTimeoutId))}_originChanged(e,n,r){this._setClasses(e,n),this._emitOrigin(r,n),this._lastFocusOrigin=n}_getClosestElementsInfo(e){let n=[];return this._elementInfo.forEach((r,o)=>{(o===e||r.checkChildren&&o.contains(e))&&n.push([o,r])}),n}_isLastInteractionFromInputLabel(e){let{_mostRecentTarget:n,mostRecentModality:r}=this._inputModalityDetector;if(r!=="mouse"||!n||n===e||e.nodeName!=="INPUT"&&e.nodeName!=="TEXTAREA"||e.disabled)return!1;let o=e.labels;if(o){for(let s=0;s{class i{constructor(){this._platform=S(Rn),this._document=S(ft),this._breakpointSubscription=S(Ph).observe("(forced-colors: active)").subscribe(()=>{this._hasCheckedHighContrastMode&&(this._hasCheckedHighContrastMode=!1,this._applyBodyHighContrastModeCssClasses())})}getHighContrastMode(){if(!this._platform.isBrowser)return Cd.NONE;let e=this._document.createElement("div");e.style.backgroundColor="rgb(1,2,3)",e.style.position="absolute",this._document.body.appendChild(e);let n=this._document.defaultView||window,r=n&&n.getComputedStyle?n.getComputedStyle(e):null,o=(r&&r.backgroundColor||"").replace(/ /g,"");switch(e.remove(),o){case"rgb(0,0,0)":case"rgb(45,50,54)":case"rgb(32,32,32)":return Cd.WHITE_ON_BLACK;case"rgb(255,255,255)":case"rgb(255,250,239)":return Cd.BLACK_ON_WHITE}return Cd.NONE}ngOnDestroy(){this._breakpointSubscription.unsubscribe()}_applyBodyHighContrastModeCssClasses(){if(!this._hasCheckedHighContrastMode&&this._platform.isBrowser&&this._document.body){let e=this._document.body.classList;e.remove(TT,Z3,K3),this._hasCheckedHighContrastMode=!0;let n=this.getHighContrastMode();n===Cd.BLACK_ON_WHITE?e.add(TT,Z3):n===Cd.WHITE_ON_BLACK&&e.add(TT,K3)}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),zb=(()=>{class i{constructor(){S(kT)._applyBodyHighContrastModeCssClasses()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({imports:[Tb]})}}return i})();var IJ=new pe("cdk-dir-doc",{providedIn:"root",factory:TJ});function TJ(){return S(ft)}var DJ=/^(ar|ckb|dv|he|iw|fa|nqo|ps|sd|ug|ur|yi|.*[-_](Adlm|Arab|Hebr|Nkoo|Rohg|Thaa))(?!.*[-_](Latn|Cyrl)($|-|_))($|-|_)/i;function OJ(i){let t=i?.toLowerCase()||"";return t==="auto"&&typeof navigator<"u"&&navigator?.language?DJ.test(navigator.language)?"rtl":"ltr":t==="rtl"?"rtl":"ltr"}var oi=(()=>{class i{constructor(){this.value="ltr",this.change=new Ie;let e=S(IJ,{optional:!0});if(e){let n=e.body?e.body.dir:null,r=e.documentElement?e.documentElement.dir:null;this.value=OJ(n||r||"ltr")}}ngOnDestroy(){this.change.complete()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var ql=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({})}}return i})();var PJ=["*",[["mat-option"],["ng-container"]]],RJ=["*","mat-option, ng-container"],AJ=["text"],NJ=[[["mat-icon"]],"*"],kJ=["mat-icon","*"];function LJ(i,t){if(i&1&&ee(0,"mat-pseudo-checkbox",1),i&2){let e=I();R("disabled",e.disabled)("state",e.selected?"checked":"unchecked")}}function FJ(i,t){if(i&1&&ee(0,"mat-pseudo-checkbox",3),i&2){let e=I();R("disabled",e.disabled)}}function BJ(i,t){if(i&1&&(v(0,"span",4),M(1),y()),i&2){let e=I();w(),we("(",e.group.label,")")}}var VJ=["mat-internal-form-field",""],zJ=["*"];var UT=(()=>{class i{static{this.STANDARD_CURVE="cubic-bezier(0.4,0.0,0.2,1)"}static{this.DECELERATION_CURVE="cubic-bezier(0.0,0.0,0.2,1)"}static{this.ACCELERATION_CURVE="cubic-bezier(0.4,0.0,1,1)"}static{this.SHARP_CURVE="cubic-bezier(0.4,0.0,0.6,1)"}}return i})();var Ht=(()=>{class i{constructor(){S(kT)._applyBodyHighContrastModeCssClasses()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({imports:[ql,ql]})}}return i})(),Hb=class{constructor(t,e,n,r,o){this._defaultMatcher=t,this.ngControl=e,this._parentFormGroup=n,this._parentForm=r,this._stateChanges=o,this.errorState=!1}updateErrorState(){let t=this.errorState,e=this._parentFormGroup||this._parentForm,n=this.matcher||this._defaultMatcher,r=this.ngControl?this.ngControl.control:null,o=n?.isErrorState(r,e)??!1;o!==t&&(this.errorState=o,this._stateChanges.next())}};var pB=(()=>{class i{isErrorState(e,n){return!!(e&&e.invalid&&(e.touched||n&&n.submitted))}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),ys=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["structural-styles"]],standalone:!0,features:[se],decls:0,vars:0,template:function(n,r){},styles:['.mat-focus-indicator{position:relative}.mat-focus-indicator::before{top:0;left:0;right:0;bottom:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border-width:var(--mat-focus-indicator-border-width, 3px);border-style:var(--mat-focus-indicator-border-style, solid);border-color:var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus::before{content:""}@media(forced-colors: active){html{--mat-focus-indicator-display: block}}'],encapsulation:2,changeDetection:0})}}return i})();var $o=function(i){return i[i.FADING_IN=0]="FADING_IN",i[i.VISIBLE=1]="VISIBLE",i[i.FADING_OUT=2]="FADING_OUT",i[i.HIDDEN=3]="HIDDEN",i}($o||{}),VT=class{constructor(t,e,n,r=!1){this._renderer=t,this.element=e,this.config=n,this._animationForciblyDisabledThroughCss=r,this.state=$o.HIDDEN}fadeOut(){this._renderer.fadeOutRipple(this)}},sB=Wr({passive:!0,capture:!0}),zT=class{constructor(){this._events=new Map,this._delegateEventHandler=t=>{let e=Pi(t);e&&this._events.get(t.type)?.forEach((n,r)=>{(r===e||r.contains(e))&&n.forEach(o=>o.handleEvent(t))})}}addHandler(t,e,n,r){let o=this._events.get(e);if(o){let s=o.get(n);s?s.add(r):o.set(n,new Set([r]))}else this._events.set(e,new Map([[n,new Set([r])]])),t.runOutsideAngular(()=>{document.addEventListener(e,this._delegateEventHandler,sB)})}removeHandler(t,e,n){let r=this._events.get(t);if(!r)return;let o=r.get(e);o&&(o.delete(n),o.size===0&&r.delete(e),r.size===0&&(this._events.delete(t),document.removeEventListener(t,this._delegateEventHandler,sB)))}},Gb={enterDuration:225,exitDuration:150},UJ=800,aB=Wr({passive:!0,capture:!0}),lB=["mousedown","touchstart"],cB=["mouseup","mouseleave","touchend","touchcancel"],HJ=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["ng-component"]],hostAttrs:["mat-ripple-style-loader",""],standalone:!0,features:[se],decls:0,vars:0,template:function(n,r){},styles:[".mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0, 0, 0.2, 1);transform:scale3d(0, 0, 0);background-color:var(--mat-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface) 10%, transparent))}@media(forced-colors: active){.mat-ripple-element{display:none}}.cdk-drag-preview .mat-ripple-element,.cdk-drag-placeholder .mat-ripple-element{display:none}"],encapsulation:2,changeDetection:0})}}return i})(),jb=class i{static{this._eventManager=new zT}constructor(t,e,n,r,o){this._target=t,this._ngZone=e,this._platform=r,this._isPointerDown=!1,this._activeRipples=new Map,this._pointerUpEventsRegistered=!1,r.isBrowser&&(this._containerElement=ar(n)),o&&o.get(mi).load(HJ)}fadeInRipple(t,e,n={}){let r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o=X(X({},Gb),n.animation);n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);let s=n.radius||GJ(t,e,r),a=t-r.left,l=e-r.top,c=o.enterDuration,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=`${a-s}px`,d.style.top=`${l-s}px`,d.style.height=`${s*2}px`,d.style.width=`${s*2}px`,n.color!=null&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);let u=window.getComputedStyle(d),h=u.transitionProperty,p=u.transitionDuration,f=h==="none"||p==="0s"||p==="0s, 0s"||r.width===0&&r.height===0,m=new VT(this,d,n,f);d.style.transform="scale3d(1, 1, 1)",m.state=$o.FADING_IN,n.persistent||(this._mostRecentTransientRipple=m);let b=null;return!f&&(c||o.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let g=()=>{b&&(b.fallbackTimer=null),clearTimeout(x),this._finishRippleTransition(m)},_=()=>this._destroyRipple(m),x=setTimeout(_,c+100);d.addEventListener("transitionend",g),d.addEventListener("transitioncancel",_),b={onTransitionEnd:g,onTransitionCancel:_,fallbackTimer:x}}),this._activeRipples.set(m,b),(f||!c)&&this._finishRippleTransition(m),m}fadeOutRipple(t){if(t.state===$o.FADING_OUT||t.state===$o.HIDDEN)return;let e=t.element,n=X(X({},Gb),t.config.animation);e.style.transitionDuration=`${n.exitDuration}ms`,e.style.opacity="0",t.state=$o.FADING_OUT,(t._animationForciblyDisabledThroughCss||!n.exitDuration)&&this._finishRippleTransition(t)}fadeOutAll(){this._getActiveRipples().forEach(t=>t.fadeOut())}fadeOutAllNonPersistent(){this._getActiveRipples().forEach(t=>{t.config.persistent||t.fadeOut()})}setupTriggerEvents(t){let e=ar(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,lB.forEach(n=>{i._eventManager.addHandler(this._ngZone,n,e,this)}))}handleEvent(t){t.type==="mousedown"?this._onMousedown(t):t.type==="touchstart"?this._onTouchStart(t):this._onPointerUp(),this._pointerUpEventsRegistered||(this._ngZone.runOutsideAngular(()=>{cB.forEach(e=>{this._triggerElement.addEventListener(e,this,aB)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(t){t.state===$o.FADING_IN?this._startFadeOutTransition(t):t.state===$o.FADING_OUT&&this._destroyRipple(t)}_startFadeOutTransition(t){let e=t===this._mostRecentTransientRipple,{persistent:n}=t.config;t.state=$o.VISIBLE,!n&&(!e||!this._isPointerDown)&&t.fadeOut()}_destroyRipple(t){let e=this._activeRipples.get(t)??null;this._activeRipples.delete(t),this._activeRipples.size||(this._containerRect=null),t===this._mostRecentTransientRipple&&(this._mostRecentTransientRipple=null),t.state=$o.HIDDEN,e!==null&&(t.element.removeEventListener("transitionend",e.onTransitionEnd),t.element.removeEventListener("transitioncancel",e.onTransitionCancel),e.fallbackTimer!==null&&clearTimeout(e.fallbackTimer)),t.element.remove()}_onMousedown(t){let e=Sd(t),n=this._lastTouchStartEvent&&Date.now(){let e=t.state===$o.VISIBLE||t.config.terminateOnPointerUp&&t.state===$o.FADING_IN;!t.config.persistent&&e&&t.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let t=this._triggerElement;t&&(lB.forEach(e=>i._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&(cB.forEach(e=>t.removeEventListener(e,this,aB)),this._pointerUpEventsRegistered=!1))}};function GJ(i,t,e){let n=Math.max(Math.abs(i-e.left),Math.abs(i-e.right)),r=Math.max(Math.abs(t-e.top),Math.abs(t-e.bottom));return Math.sqrt(n*n+r*r)}var fB=new pe("mat-ripple-global-options"),Ha=(()=>{class i{get disabled(){return this._disabled}set disabled(e){e&&this.fadeOutAllNonPersistent(),this._disabled=e,this._setupTriggerEventsIfEnabled()}get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}constructor(){this._elementRef=S(Fe),this._animationMode=S(Kn,{optional:!0}),this.radius=0,this._disabled=!1,this._isInitialized=!1;let e=S(Ue),n=S(Rn),r=S(fB,{optional:!0}),o=S(pt);this._globalOptions=r||{},this._rippleRenderer=new jb(this,e,this._elementRef,n,o)}ngOnInit(){this._isInitialized=!0,this._setupTriggerEventsIfEnabled()}ngOnDestroy(){this._rippleRenderer._removeTriggerEvents()}fadeOutAll(){this._rippleRenderer.fadeOutAll()}fadeOutAllNonPersistent(){this._rippleRenderer.fadeOutAllNonPersistent()}get rippleConfig(){return{centered:this.centered,radius:this.radius,color:this.color,animation:X(X(X({},this._globalOptions.animation),this._animationMode==="NoopAnimations"?{enterDuration:0,exitDuration:0}:{}),this.animation),terminateOnPointerUp:this._globalOptions.terminateOnPointerUp}}get rippleDisabled(){return this.disabled||!!this._globalOptions.disabled}_setupTriggerEventsIfEnabled(){!this.disabled&&this._isInitialized&&this._rippleRenderer.setupTriggerEvents(this.trigger)}launch(e,n=0,r){return typeof e=="number"?this._rippleRenderer.fadeInRipple(e,n,X(X({},this.rippleConfig),r)):this._rippleRenderer.fadeInRipple(0,0,X(X({},this.rippleConfig),e))}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(n,r){n&2&&ne("mat-ripple-unbounded",r.unbounded)},inputs:{color:[0,"matRippleColor","color"],unbounded:[0,"matRippleUnbounded","unbounded"],centered:[0,"matRippleCentered","centered"],radius:[0,"matRippleRadius","radius"],animation:[0,"matRippleAnimation","animation"],disabled:[0,"matRippleDisabled","disabled"],trigger:[0,"matRippleTrigger","trigger"]},exportAs:["matRipple"],standalone:!0})}}return i})(),Id=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({imports:[Ht,Ht]})}}return i})(),jJ=(()=>{class i{constructor(){this._animationMode=S(Kn,{optional:!0}),this.state="unchecked",this.disabled=!1,this.appearance="full"}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["mat-pseudo-checkbox"]],hostAttrs:[1,"mat-pseudo-checkbox"],hostVars:12,hostBindings:function(n,r){n&2&&ne("mat-pseudo-checkbox-indeterminate",r.state==="indeterminate")("mat-pseudo-checkbox-checked",r.state==="checked")("mat-pseudo-checkbox-disabled",r.disabled)("mat-pseudo-checkbox-minimal",r.appearance==="minimal")("mat-pseudo-checkbox-full",r.appearance==="full")("_mat-animation-noopable",r._animationMode==="NoopAnimations")},inputs:{state:"state",disabled:"disabled",appearance:"appearance"},standalone:!0,features:[se],decls:0,vars:0,template:function(n,r){},styles:['.mat-pseudo-checkbox{border-radius:2px;cursor:pointer;display:inline-block;vertical-align:middle;box-sizing:border-box;position:relative;flex-shrink:0;transition:border-color 90ms cubic-bezier(0, 0, 0.2, 0.1),background-color 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox::after{position:absolute;opacity:0;content:"";border-bottom:2px solid currentColor;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 0.1)}.mat-pseudo-checkbox._mat-animation-noopable{transition:none !important;animation:none !important}.mat-pseudo-checkbox._mat-animation-noopable::after{transition:none}.mat-pseudo-checkbox-disabled{cursor:default}.mat-pseudo-checkbox-indeterminate::after{left:1px;opacity:1;border-radius:2px}.mat-pseudo-checkbox-checked::after{left:1px;border-left:2px solid currentColor;transform:rotate(-45deg);opacity:1;box-sizing:content-box}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-minimal-pseudo-checkbox-selected-checkmark-color, var(--mat-sys-primary))}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full{border-color:var(--mat-full-pseudo-checkbox-unselected-icon-color, var(--mat-sys-on-surface-variant));border-width:2px;border-style:solid}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-disabled{border-color:var(--mat-full-pseudo-checkbox-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate{background-color:var(--mat-full-pseudo-checkbox-selected-icon-color, var(--mat-sys-primary));border-color:rgba(0,0,0,0)}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{color:var(--mat-full-pseudo-checkbox-selected-checkmark-color, var(--mat-sys-on-primary))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled{background-color:var(--mat-full-pseudo-checkbox-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked.mat-pseudo-checkbox-disabled::after,.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate.mat-pseudo-checkbox-disabled::after{color:var(--mat-full-pseudo-checkbox-disabled-selected-checkmark-color, var(--mat-sys-surface))}.mat-pseudo-checkbox{width:18px;height:18px}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-checked::after{width:14px;height:6px;transform-origin:center;top:-4.2426406871px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-minimal.mat-pseudo-checkbox-indeterminate::after{top:8px;width:16px}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-checked::after{width:10px;height:4px;transform-origin:center;top:-2.8284271247px;left:0;bottom:0;right:0;margin:auto}.mat-pseudo-checkbox-full.mat-pseudo-checkbox-indeterminate::after{top:6px;width:12px}'],encapsulation:2,changeDetection:0})}}return i})(),WJ=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({imports:[Ht]})}}return i})(),Bh=new pe("MAT_OPTION_PARENT_COMPONENT"),$J=0,Vh=new pe("MatOptgroup"),mB=(()=>{class i{constructor(){this.disabled=!1,this._labelId=`mat-optgroup-label-${$J++}`;let e=S(Bh,{optional:!0});this._inert=e?.inertGroups??!1}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["mat-optgroup"]],hostAttrs:[1,"mat-mdc-optgroup"],hostVars:3,hostBindings:function(n,r){n&2&&qe("role",r._inert?null:"group")("aria-disabled",r._inert?null:r.disabled.toString())("aria-labelledby",r._inert?null:r._labelId)},inputs:{label:"label",disabled:[2,"disabled","disabled",Ye]},exportAs:["matOptgroup"],standalone:!0,features:[Bt([{provide:Vh,useExisting:i}]),nn,se],ngContentSelectors:RJ,decls:5,vars:4,consts:[["role","presentation",1,"mat-mdc-optgroup-label",3,"id"],[1,"mdc-list-item__primary-text"]],template:function(n,r){n&1&&(Dn(PJ),v(0,"span",0)(1,"span",1),M(2),Wt(3),y()(),Wt(4,1)),n&2&&(ne("mdc-list-item--disabled",r.disabled),R("id",r._labelId),w(2),we("",r.label," "))},styles:[".mat-mdc-optgroup{color:var(--mat-optgroup-label-text-color, var(--mat-sys-on-surface-variant));font-family:var(--mat-optgroup-label-text-font, var(--mat-sys-title-small-font));line-height:var(--mat-optgroup-label-text-line-height, var(--mat-sys-title-small-line-height));font-size:var(--mat-optgroup-label-text-size, var(--mat-sys-title-small-size));letter-spacing:var(--mat-optgroup-label-text-tracking, var(--mat-sys-title-small-tracking));font-weight:var(--mat-optgroup-label-text-weight, var(--mat-sys-title-small-weight))}.mat-mdc-optgroup-label{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;outline:none}.mat-mdc-optgroup-label.mdc-list-item--disabled{opacity:.38}.mat-mdc-optgroup-label .mdc-list-item__primary-text{font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;white-space:normal}"],encapsulation:2,changeDetection:0})}}return i})(),qJ=0,Qm=class{constructor(t,e=!1){this.source=t,this.isUserInput=e}},Yl=(()=>{class i{get multiple(){return this._parent&&this._parent.multiple}get selected(){return this._selected}get disabled(){return this.group&&this.group.disabled||this._disabled}set disabled(e){this._disabled=e}get disableRipple(){return this._signalDisableRipple?this._parent.disableRipple():!!this._parent?.disableRipple}get hideSingleSelectionIndicator(){return!!(this._parent&&this._parent.hideSingleSelectionIndicator)}constructor(){this._element=S(Fe),this._changeDetectorRef=S(Re),this._parent=S(Bh,{optional:!0}),this.group=S(Vh,{optional:!0}),this._signalDisableRipple=!1,this._selected=!1,this._active=!1,this._disabled=!1,this._mostRecentViewValue="",this.id=`mat-option-${qJ++}`,this.onSelectionChange=new Ie,this._stateChanges=new ce,S(mi).load(ys),S(mi).load(Ym),this._signalDisableRipple=!!this._parent&&nm(this._parent.disableRipple)}get active(){return this._active}get viewValue(){return(this._text?.nativeElement.textContent||"").trim()}select(e=!0){this._selected||(this._selected=!0,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}deselect(e=!0){this._selected&&(this._selected=!1,this._changeDetectorRef.markForCheck(),e&&this._emitSelectionChangeEvent())}focus(e,n){let r=this._getHostElement();typeof r.focus=="function"&&r.focus(n)}setActiveStyles(){this._active||(this._active=!0,this._changeDetectorRef.markForCheck())}setInactiveStyles(){this._active&&(this._active=!1,this._changeDetectorRef.markForCheck())}getLabel(){return this.viewValue}_handleKeydown(e){(e.keyCode===13||e.keyCode===32)&&!Si(e)&&(this._selectViaInteraction(),e.preventDefault())}_selectViaInteraction(){this.disabled||(this._selected=this.multiple?!this._selected:!0,this._changeDetectorRef.markForCheck(),this._emitSelectionChangeEvent(!0))}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._element.nativeElement}ngAfterViewChecked(){if(this._selected){let e=this.viewValue;e!==this._mostRecentViewValue&&(this._mostRecentViewValue&&this._stateChanges.next(),this._mostRecentViewValue=e)}}ngOnDestroy(){this._stateChanges.complete()}_emitSelectionChangeEvent(e=!1){this.onSelectionChange.emit(new Qm(this,e))}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["mat-option"]],viewQuery:function(n,r){if(n&1&&Me(AJ,7),n&2){let o;_e(o=ve())&&(r._text=o.first)}},hostAttrs:["role","option",1,"mat-mdc-option","mdc-list-item"],hostVars:11,hostBindings:function(n,r){n&1&&H("click",function(){return r._selectViaInteraction()})("keydown",function(s){return r._handleKeydown(s)}),n&2&&(Cr("id",r.id),qe("aria-selected",r.selected)("aria-disabled",r.disabled.toString()),ne("mdc-list-item--selected",r.selected)("mat-mdc-option-multiple",r.multiple)("mat-mdc-option-active",r.active)("mdc-list-item--disabled",r.disabled))},inputs:{value:"value",id:"id",disabled:[2,"disabled","disabled",Ye]},outputs:{onSelectionChange:"onSelectionChange"},exportAs:["matOption"],standalone:!0,features:[nn,se],ngContentSelectors:kJ,decls:8,vars:5,consts:[["text",""],["aria-hidden","true",1,"mat-mdc-option-pseudo-checkbox",3,"disabled","state"],[1,"mdc-list-item__primary-text"],["state","checked","aria-hidden","true","appearance","minimal",1,"mat-mdc-option-pseudo-checkbox",3,"disabled"],[1,"cdk-visually-hidden"],["aria-hidden","true","mat-ripple","",1,"mat-mdc-option-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled"]],template:function(n,r){n&1&&(Dn(NJ),W(0,LJ,1,2,"mat-pseudo-checkbox",1),Wt(1),v(2,"span",2,0),Wt(4,1),y(),W(5,FJ,1,1,"mat-pseudo-checkbox",3)(6,BJ,2,1,"span",4),ee(7,"div",5)),n&2&&(re(r.multiple?0:-1),w(5),re(!r.multiple&&r.selected&&!r.hideSingleSelectionIndicator?5:-1),w(),re(r.group&&r.group._inert?6:-1),w(),R("matRippleTrigger",r._getHostElement())("matRippleDisabled",r.disabled||r.disableRipple))},dependencies:[jJ,Ha],styles:['.mat-mdc-option{-webkit-user-select:none;user-select:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;min-height:48px;padding:0 16px;cursor:pointer;-webkit-tap-highlight-color:rgba(0,0,0,0);color:var(--mat-option-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-option-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-option-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-option-label-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-option-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-option-label-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-option:hover:not(.mdc-list-item--disabled){background-color:var(--mat-option-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-option:focus.mdc-list-item,.mat-mdc-option.mat-mdc-option-active.mdc-list-item{background-color:var(--mat-option-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent));outline:0}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled) .mdc-list-item__primary-text{color:var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option.mdc-list-item--selected:not(.mdc-list-item--disabled):not(.mat-mdc-option-multiple){background-color:var(--mat-option-selected-state-layer-color, var(--mat-sys-secondary-container))}.mat-mdc-option .mat-pseudo-checkbox{--mat-minimal-pseudo-checkbox-selected-checkmark-color: var(--mat-option-selected-state-label-text-color, var(--mat-sys-on-secondary-container))}.mat-mdc-option.mdc-list-item{align-items:center;background:rgba(0,0,0,0)}.mat-mdc-option.mdc-list-item--disabled{cursor:default;pointer-events:none}.mat-mdc-option.mdc-list-item--disabled .mat-mdc-option-pseudo-checkbox,.mat-mdc-option.mdc-list-item--disabled .mdc-list-item__primary-text,.mat-mdc-option.mdc-list-item--disabled>mat-icon{opacity:.38}.mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:32px}[dir=rtl] .mat-mdc-optgroup .mat-mdc-option:not(.mat-mdc-option-multiple){padding-left:16px;padding-right:32px}.mat-mdc-option .mat-icon,.mat-mdc-option .mat-pseudo-checkbox-full{margin-right:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-icon,[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-full{margin-right:0;margin-left:16px}.mat-mdc-option .mat-pseudo-checkbox-minimal{margin-left:16px;flex-shrink:0}[dir=rtl] .mat-mdc-option .mat-pseudo-checkbox-minimal{margin-right:16px;margin-left:0}.mat-mdc-option .mat-mdc-option-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-option .mdc-list-item__primary-text{white-space:normal;font-size:inherit;font-weight:inherit;letter-spacing:inherit;line-height:inherit;font-family:inherit;text-decoration:inherit;text-transform:inherit;margin-right:auto}[dir=rtl] .mat-mdc-option .mdc-list-item__primary-text{margin-right:0;margin-left:auto}@media(forced-colors: active){.mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}[dir=rtl] .mat-mdc-option.mdc-list-item--selected:not(:has(.mat-mdc-option-pseudo-checkbox))::after{right:auto;left:16px}}.mat-mdc-option-multiple{--mdc-list-list-item-selected-container-color:var(--mdc-list-list-item-container-color, transparent)}.mat-mdc-option-active .mat-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0})}}return i})();function Wb(i,t,e){if(e.length){let n=t.toArray(),r=e.toArray(),o=0;for(let s=0;se+n?Math.max(0,i-n+t):e}var zh=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({imports:[Id,Ht,WJ]})}}return i})(),dB={capture:!0},uB=["focus","mousedown","mouseenter","touchstart"],FT="mat-ripple-loader-uninitialized",BT="mat-ripple-loader-class-name",hB="mat-ripple-loader-centered",Ub="mat-ripple-loader-disabled",gB=(()=>{class i{constructor(){this._document=S(ft,{optional:!0}),this._animationMode=S(Kn,{optional:!0}),this._globalRippleOptions=S(fB,{optional:!0}),this._platform=S(Rn),this._ngZone=S(Ue),this._injector=S(pt),this._hosts=new Map,this._onInteraction=e=>{let n=Pi(e);if(n instanceof HTMLElement){let r=n.closest(`[${FT}="${this._globalRippleOptions?.namespace??""}"]`);r&&this._createRipple(r)}},this._ngZone.runOutsideAngular(()=>{for(let e of uB)this._document?.addEventListener(e,this._onInteraction,dB)})}ngOnDestroy(){let e=this._hosts.keys();for(let n of e)this.destroyRipple(n);for(let n of uB)this._document?.removeEventListener(n,this._onInteraction,dB)}configureRipple(e,n){e.setAttribute(FT,this._globalRippleOptions?.namespace??""),(n.className||!e.hasAttribute(BT))&&e.setAttribute(BT,n.className||""),n.centered&&e.setAttribute(hB,""),n.disabled&&e.setAttribute(Ub,"")}setDisabled(e,n){let r=this._hosts.get(e);r?(r.target.rippleDisabled=n,!n&&!r.hasSetUpEvents&&(r.hasSetUpEvents=!0,r.renderer.setupTriggerEvents(e))):n?e.setAttribute(Ub,""):e.removeAttribute(Ub)}_createRipple(e){if(!this._document||this._hosts.has(e))return;e.querySelector(".mat-ripple")?.remove();let n=this._document.createElement("span");n.classList.add("mat-ripple",e.getAttribute(BT)),e.append(n);let r=this._animationMode==="NoopAnimations",o=this._globalRippleOptions,s=r?0:o?.animation?.enterDuration??Gb.enterDuration,a=r?0:o?.animation?.exitDuration??Gb.exitDuration,l={rippleDisabled:r||o?.disabled||e.hasAttribute(Ub),rippleConfig:{centered:e.hasAttribute(hB),terminateOnPointerUp:o?.terminateOnPointerUp,animation:{enterDuration:s,exitDuration:a}}},c=new jb(l,this._ngZone,n,this._platform,this._injector),d=!l.rippleDisabled;d&&c.setupTriggerEvents(e),this._hosts.set(e,{target:l,renderer:c,hasSetUpEvents:d}),e.removeAttribute(FT)}destroyRipple(e){let n=this._hosts.get(e);n&&(n.renderer._removeTriggerEvents(),this._hosts.delete(e))}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),Uh=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["div","mat-internal-form-field",""]],hostAttrs:[1,"mdc-form-field","mat-internal-form-field"],hostVars:2,hostBindings:function(n,r){n&2&&ne("mdc-form-field--align-end",r.labelPosition==="before")},inputs:{labelPosition:"labelPosition"},standalone:!0,features:[se],attrs:VJ,ngContentSelectors:zJ,decls:1,vars:0,template:function(n,r){n&1&&(Dn(),Wt(0))},styles:[".mat-internal-form-field{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;display:inline-flex;align-items:center;vertical-align:middle}.mat-internal-form-field>label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0;order:0}[dir=rtl] .mat-internal-form-field>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px}.mdc-form-field--align-end>label{margin-left:auto;margin-right:0;padding-left:0;padding-right:4px;order:-1}[dir=rtl] .mdc-form-field--align-end .mdc-form-field--align-end label{margin-left:0;margin-right:auto;padding-left:4px;padding-right:0}"],encapsulation:2,changeDetection:0})}}return i})();var YJ=["mat-button",""],XJ=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],QJ=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"];var ZJ="@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-icon-button.mat-mdc-icon-button{outline:solid 1px}}";var KJ=["mat-icon-button",""],JJ=["*"];var eee=new pe("MAT_BUTTON_CONFIG");var tee=[{attribute:"mat-button",mdcClasses:["mdc-button","mat-mdc-button"]},{attribute:"mat-flat-button",mdcClasses:["mdc-button","mdc-button--unelevated","mat-mdc-unelevated-button"]},{attribute:"mat-raised-button",mdcClasses:["mdc-button","mdc-button--raised","mat-mdc-raised-button"]},{attribute:"mat-stroked-button",mdcClasses:["mdc-button","mdc-button--outlined","mat-mdc-outlined-button"]},{attribute:"mat-fab",mdcClasses:["mdc-fab","mat-mdc-fab-base","mat-mdc-fab"]},{attribute:"mat-mini-fab",mdcClasses:["mdc-fab","mat-mdc-fab-base","mdc-fab--mini","mat-mdc-mini-fab"]},{attribute:"mat-icon-button",mdcClasses:["mdc-icon-button","mat-mdc-icon-button"]}],vB=(()=>{class i{get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=e,this._updateRippleDisabled()}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._updateRippleDisabled()}constructor(){this._elementRef=S(Fe),this._platform=S(Rn),this._ngZone=S(Ue),this._animationMode=S(Kn,{optional:!0}),this._focusMonitor=S(So),this._rippleLoader=S(gB),this._isFab=!1,this._disableRipple=!1,this._disabled=!1,S(mi).load(ys);let e=S(eee,{optional:!0}),n=this._elementRef.nativeElement,r=n.classList;this.disabledInteractive=e?.disabledInteractive??!1,this.color=e?.color??null,this._rippleLoader?.configureRipple(n,{className:"mat-mdc-button-ripple"});for(let{attribute:o,mdcClasses:s}of tee)n.hasAttribute(o)&&r.add(...s)}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef),this._rippleLoader?.destroyRipple(this._elementRef.nativeElement)}focus(e="program",n){e?this._focusMonitor.focusVia(this._elementRef.nativeElement,e,n):this._elementRef.nativeElement.focus(n)}_getAriaDisabled(){return this.ariaDisabled!=null?this.ariaDisabled:this.disabled&&this.disabledInteractive?!0:null}_getDisabledAttribute(){return this.disabledInteractive||!this.disabled?null:!0}_updateRippleDisabled(){this._rippleLoader?.setDisabled(this._elementRef.nativeElement,this.disableRipple||this.disabled)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,inputs:{color:"color",disableRipple:[2,"disableRipple","disableRipple",Ye],disabled:[2,"disabled","disabled",Ye],ariaDisabled:[2,"aria-disabled","ariaDisabled",Ye],disabledInteractive:[2,"disabledInteractive","disabledInteractive",Ye]},standalone:!0,features:[nn]})}}return i})();var gi=(()=>{class i extends vB{static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Zn(i)))(r||i)}})()}static{this.\u0275cmp=oe({type:i,selectors:[["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""]],hostVars:14,hostBindings:function(n,r){n&2&&(qe("disabled",r._getDisabledAttribute())("aria-disabled",r._getAriaDisabled()),Gr(r.color?"mat-"+r.color:""),ne("mat-mdc-button-disabled",r.disabled)("mat-mdc-button-disabled-interactive",r.disabledInteractive)("_mat-animation-noopable",r._animationMode==="NoopAnimations")("mat-unthemed",!r.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[sn,se],attrs:YJ,ngContentSelectors:QJ,decls:7,vars:4,consts:[[1,"mat-mdc-button-persistent-ripple"],[1,"mdc-button__label"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(n,r){n&1&&(Dn(XJ),ee(0,"span",0),Wt(1),v(2,"span",1),Wt(3,1),y(),Wt(4,2),ee(5,"span",2)(6,"span",3)),n&2&&ne("mdc-button__ripple",!r._isFab)("mdc-fab__ripple",r._isFab)},styles:['.mat-mdc-button-base{text-decoration:none}.mdc-button{-webkit-user-select:none;user-select:none;position:relative;display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:64px;border:none;outline:none;line-height:inherit;-webkit-appearance:none;overflow:visible;vertical-align:middle;background:rgba(0,0,0,0);padding:0 8px}.mdc-button::-moz-focus-inner{padding:0;border:0}.mdc-button:active{outline:none}.mdc-button:hover{cursor:pointer}.mdc-button:disabled{cursor:default;pointer-events:none}.mdc-button[hidden]{display:none}.mdc-button .mdc-button__label{position:relative}.mat-mdc-button{padding:0 var(--mat-text-button-horizontal-padding, 12px);height:var(--mdc-text-button-container-height, 40px);font-family:var(--mdc-text-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-text-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-text-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-text-button-label-text-transform);font-weight:var(--mdc-text-button-label-text-weight, var(--mat-sys-label-large-weight))}.mat-mdc-button,.mat-mdc-button .mdc-button__ripple{border-radius:var(--mdc-text-button-container-shape, var(--mat-sys-corner-full))}.mat-mdc-button:not(:disabled){color:var(--mdc-text-button-label-text-color, var(--mat-sys-primary))}.mat-mdc-button[disabled],.mat-mdc-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-text-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-button:has(.material-icons,mat-icon,[matButtonIcon]){padding:0 var(--mat-text-button-with-icon-horizontal-padding, 16px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, -4px)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-text-button-icon-offset, -4px);margin-left:var(--mat-text-button-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-offset, -4px);margin-left:var(--mat-text-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-text-button-icon-spacing, 8px);margin-left:var(--mat-text-button-icon-offset, -4px)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-text-button-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-state-layer-color, var(--mat-sys-primary))}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-text-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-text-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-text-button-touch-target-display, block)}.mat-mdc-unelevated-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mdc-filled-button-container-height, 40px);font-family:var(--mdc-filled-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-filled-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-filled-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-filled-button-label-text-transform);font-weight:var(--mdc-filled-button-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-filled-button-horizontal-padding, 24px)}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -8px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -8px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-offset, -8px);margin-left:var(--mat-filled-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-filled-button-icon-spacing, 8px);margin-left:var(--mat-filled-button-icon-offset, -8px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-filled-button-ripple-color, color-mix(in srgb, var(--mat-sys-on-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-state-layer-color, var(--mat-sys-on-primary))}.mat-mdc-unelevated-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-filled-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-unelevated-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-unelevated-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-unelevated-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-filled-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-unelevated-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-filled-button-touch-target-display, block)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mdc-filled-button-label-text-color, var(--mat-sys-on-primary));background-color:var(--mdc-filled-button-container-color, var(--mat-sys-primary))}.mat-mdc-unelevated-button,.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mdc-filled-button-container-shape, var(--mat-sys-corner-full))}.mat-mdc-unelevated-button[disabled],.mat-mdc-unelevated-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-filled-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mdc-filled-button-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-unelevated-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-raised-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);box-shadow:var(--mdc-protected-button-container-elevation-shadow, var(--mat-sys-level1));height:var(--mdc-protected-button-container-height, 40px);font-family:var(--mdc-protected-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-protected-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-protected-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-protected-button-label-text-transform);font-weight:var(--mdc-protected-button-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-protected-button-horizontal-padding, 24px)}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -8px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -8px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-offset, -8px);margin-left:var(--mat-protected-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-protected-button-icon-spacing, 8px);margin-left:var(--mat-protected-button-icon-offset, -8px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-protected-button-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-state-layer-color, var(--mat-sys-primary))}.mat-mdc-raised-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-protected-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-raised-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-raised-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-raised-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-protected-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-raised-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-protected-button-touch-target-display, block)}.mat-mdc-raised-button:not(:disabled){color:var(--mdc-protected-button-label-text-color, var(--mat-sys-primary));background-color:var(--mdc-protected-button-container-color, var(--mat-sys-surface))}.mat-mdc-raised-button,.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mdc-protected-button-container-shape, var(--mat-sys-corner-full))}.mat-mdc-raised-button:hover{box-shadow:var(--mdc-protected-button-hover-container-elevation-shadow, var(--mat-sys-level2))}.mat-mdc-raised-button:focus{box-shadow:var(--mdc-protected-button-focus-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mdc-protected-button-pressed-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button[disabled],.mat-mdc-raised-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-protected-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mdc-protected-button-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-raised-button[disabled].mat-mdc-button-disabled,.mat-mdc-raised-button.mat-mdc-button-disabled.mat-mdc-button-disabled{box-shadow:var(--mdc-protected-button-disabled-container-elevation-shadow, var(--mat-sys-level0))}.mat-mdc-raised-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button{border-style:solid;transition:border 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mdc-outlined-button-container-height, 40px);font-family:var(--mdc-outlined-button-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mdc-outlined-button-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mdc-outlined-button-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mdc-outlined-button-label-text-transform);font-weight:var(--mdc-outlined-button-label-text-weight, var(--mat-sys-label-large-weight));border-radius:var(--mdc-outlined-button-container-shape, var(--mat-sys-corner-full));border-width:var(--mdc-outlined-button-outline-width, 1px);padding:0 var(--mat-outlined-button-horizontal-padding, 24px)}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -8px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -8px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-offset, -8px);margin-left:var(--mat-outlined-button-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-outlined-button-icon-spacing, 8px);margin-left:var(--mat-outlined-button-icon-offset, -8px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-outlined-button-ripple-color, color-mix(in srgb, var(--mat-sys-primary) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-state-layer-color, var(--mat-sys-primary))}.mat-mdc-outlined-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-outlined-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-outlined-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-outlined-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-outlined-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-outlined-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-outlined-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:0;right:0;transform:translateY(-50%);display:var(--mat-outlined-button-touch-target-display, block)}.mat-mdc-outlined-button:not(:disabled){color:var(--mdc-outlined-button-label-text-color, var(--mat-sys-primary));border-color:var(--mdc-outlined-button-outline-color, var(--mat-sys-outline))}.mat-mdc-outlined-button[disabled],.mat-mdc-outlined-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-outlined-button-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:var(--mdc-outlined-button-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-mdc-outlined-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-outlined-button .mdc-button__ripple{border-width:var(--mdc-outlined-button-outline-width, 1px);border-style:solid;border-color:rgba(0,0,0,0)}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple,.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-button .mat-mdc-button-ripple,.mat-mdc-unelevated-button .mat-mdc-button-ripple,.mat-mdc-raised-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-unelevated-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-raised-button .mat-mdc-button-persistent-ripple::before,.mat-mdc-outlined-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-button .mdc-button__label,.mat-mdc-button .mat-icon,.mat-mdc-unelevated-button .mdc-button__label,.mat-mdc-unelevated-button .mat-icon,.mat-mdc-raised-button .mdc-button__label,.mat-mdc-raised-button .mat-icon,.mat-mdc-outlined-button .mdc-button__label,.mat-mdc-outlined-button .mat-icon{z-index:1;position:relative}.mat-mdc-button .mat-focus-indicator,.mat-mdc-unelevated-button .mat-focus-indicator,.mat-mdc-raised-button .mat-focus-indicator,.mat-mdc-outlined-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-button:focus .mat-focus-indicator::before,.mat-mdc-unelevated-button:focus .mat-focus-indicator::before,.mat-mdc-raised-button:focus .mat-focus-indicator::before,.mat-mdc-outlined-button:focus .mat-focus-indicator::before{content:""}.mat-mdc-button._mat-animation-noopable,.mat-mdc-unelevated-button._mat-animation-noopable,.mat-mdc-raised-button._mat-animation-noopable,.mat-mdc-outlined-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-button>.mat-icon,.mat-mdc-unelevated-button>.mat-icon,.mat-mdc-raised-button>.mat-icon,.mat-mdc-outlined-button>.mat-icon{display:inline-block;position:relative;vertical-align:top;font-size:1.125rem;height:1.125rem;width:1.125rem}.mat-mdc-outlined-button .mat-mdc-button-ripple,.mat-mdc-outlined-button .mdc-button__ripple{top:-1px;left:-1px;bottom:-1px;right:-1px}.mat-mdc-unelevated-button .mat-focus-indicator::before,.mat-mdc-raised-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 2px)*-1)}.mat-mdc-outlined-button .mat-focus-indicator::before{margin:calc(calc(var(--mat-focus-indicator-border-width, 3px) + 3px)*-1)}',"@media(forced-colors: active){.mat-mdc-button:not(.mdc-button--outlined),.mat-mdc-unelevated-button:not(.mdc-button--outlined),.mat-mdc-raised-button:not(.mdc-button--outlined),.mat-mdc-outlined-button:not(.mdc-button--outlined),.mat-mdc-icon-button.mat-mdc-icon-button{outline:solid 1px}}"],encapsulation:2,changeDetection:0})}}return i})();var qo=(()=>{class i extends vB{constructor(){super(),this._rippleLoader.configureRipple(this._elementRef.nativeElement,{centered:!0})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["button","mat-icon-button",""]],hostVars:14,hostBindings:function(n,r){n&2&&(qe("disabled",r._getDisabledAttribute())("aria-disabled",r._getAriaDisabled()),Gr(r.color?"mat-"+r.color:""),ne("mat-mdc-button-disabled",r.disabled)("mat-mdc-button-disabled-interactive",r.disabledInteractive)("_mat-animation-noopable",r._animationMode==="NoopAnimations")("mat-unthemed",!r.color)("mat-mdc-button-base",!0))},exportAs:["matButton"],standalone:!0,features:[sn,se],attrs:KJ,ngContentSelectors:JJ,decls:4,vars:0,consts:[[1,"mat-mdc-button-persistent-ripple","mdc-icon-button__ripple"],[1,"mat-focus-indicator"],[1,"mat-mdc-button-touch-target"]],template:function(n,r){n&1&&(Dn(),ee(0,"span",0),Wt(1),ee(2,"span",1)(3,"span",2))},styles:['.mat-mdc-icon-button{-webkit-user-select:none;user-select:none;display:inline-block;position:relative;box-sizing:border-box;border:none;outline:none;background-color:rgba(0,0,0,0);fill:currentColor;color:inherit;text-decoration:none;cursor:pointer;z-index:0;overflow:visible;border-radius:50%;flex-shrink:0;text-align:center;width:var(--mdc-icon-button-state-layer-size, 40px);height:var(--mdc-icon-button-state-layer-size, 40px);padding:calc(calc(var(--mdc-icon-button-state-layer-size, 40px) - var(--mdc-icon-button-icon-size, 24px)) / 2);font-size:var(--mdc-icon-button-icon-size, 24px);color:var(--mdc-icon-button-icon-color, var(--mat-sys-on-surface-variant));-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-icon-button .mat-mdc-button-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple,.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:inherit}.mat-mdc-icon-button .mat-mdc-button-ripple{overflow:hidden}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{content:"";opacity:0}.mat-mdc-icon-button .mdc-button__label,.mat-mdc-icon-button .mat-icon{z-index:1;position:relative}.mat-mdc-icon-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute}.mat-mdc-icon-button:focus .mat-focus-indicator::before{content:""}.mat-mdc-icon-button .mat-ripple-element{background-color:var(--mat-icon-button-ripple-color, color-mix(in srgb, var(--mat-sys-on-surface-variant) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-icon-button-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-icon-button:hover .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-icon-button.cdk-program-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.cdk-keyboard-focused .mat-mdc-button-persistent-ripple::before,.mat-mdc-icon-button.mat-mdc-button-disabled-interactive:focus .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-icon-button:active .mat-mdc-button-persistent-ripple::before{opacity:var(--mat-icon-button-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-icon-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:48px;left:50%;width:48px;transform:translate(-50%, -50%);display:var(--mat-icon-button-touch-target-display, block)}.mat-mdc-icon-button._mat-animation-noopable{transition:none !important;animation:none !important}.mat-mdc-icon-button[disabled],.mat-mdc-icon-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mdc-icon-button-disabled-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-icon-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-mdc-icon-button img,.mat-mdc-icon-button svg{width:var(--mdc-icon-button-icon-size, 24px);height:var(--mdc-icon-button-icon-size, 24px);vertical-align:baseline}.mat-mdc-icon-button .mat-mdc-button-persistent-ripple{border-radius:50%}.mat-mdc-icon-button[hidden]{display:none}.mat-mdc-icon-button.mat-unthemed:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-primary:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-accent:not(.mdc-ripple-upgraded):focus::before,.mat-mdc-icon-button.mat-warn:not(.mdc-ripple-upgraded):focus::before{background:rgba(0,0,0,0);opacity:1}',ZJ],encapsulation:2,changeDetection:0})}}return i})();var vn=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({imports:[Ht,Id,Ht]})}}return i})();function Qs(i,t){return it?1:i>=t?0:NaN}function qb(i){return i.length===1&&(i=nee(i)),{left:function(t,e,n,r){for(n==null&&(n=0),r==null&&(r=t.length);n>>1;i(t[o],e)<0?n=o+1:r=o}return n},right:function(t,e,n,r){for(n==null&&(n=0),r==null&&(r=t.length);n>>1;i(t[o],e)>0?r=o:n=o+1}return n}}}function nee(i){return function(t,e){return Qs(i(t),e)}}var yB=qb(Qs),iee=yB.right,ree=yB.left;var bB=Array.prototype,see=bB.slice,aee=bB.map;var xPe=Math.sqrt(50),wPe=Math.sqrt(10),CPe=Math.sqrt(2);var pee=Array.prototype.slice;var fee={value:function(){}};function MB(){for(var i=0,t=arguments.length,e={},n;i=0&&(n=e.slice(r+1),e=e.slice(0,r)),e&&!t.hasOwnProperty(e))throw new Error("unknown type: "+e);return{type:e,name:n}})}Xb.prototype=MB.prototype={constructor:Xb,on:function(i,t){var e=this._,n=mee(i+"",e),r,o=-1,s=n.length;if(arguments.length<2){for(;++o0)for(var e=new Array(r),n=0,r,o;n=0&&(t=i.slice(0,e))!=="xmlns"&&(i=i.slice(e+1)),GT.hasOwnProperty(t)?{space:GT[t],local:i}:i}function _ee(i){return function(){var t=this.ownerDocument,e=this.namespaceURI;return e===Qb&&t.documentElement.namespaceURI===Qb?t.createElement(i):t.createElementNS(e,i)}}function vee(i){return function(){return this.ownerDocument.createElementNS(i.space,i.local)}}function Zb(i){var t=Ga(i);return(t.local?vee:_ee)(t)}function yee(){}function Td(i){return i==null?yee:function(){return this.querySelector(i)}}function EB(i){typeof i!="function"&&(i=Td(i));for(var t=this._groups,e=t.length,n=new Array(e),r=0;r=x&&(x=_+1);!(T=b[x])&&++x=0;)(s=n[r])&&(o&&s.compareDocumentPosition(o)^4&&o.parentNode.insertBefore(s,o),o=s);return this}function FB(i){i||(i=Cee);function t(u,h){return u&&h?i(u.__data__,h.__data__):!u-!h}for(var e=this._groups,n=e.length,r=new Array(n),o=0;ot?1:i>=t?0:NaN}function BB(){var i=arguments[0];return arguments[0]=this,i.apply(null,arguments),this}function VB(){var i=new Array(this.size()),t=-1;return this.each(function(){i[++t]=this}),i}function zB(){for(var i=this._groups,t=0,e=i.length;t1?this.each((t==null?Oee:typeof t=="function"?Ree:Pee)(i,t,e??"")):Xl(this.node(),i)}function Xl(i,t){return i.style.getPropertyValue(t)||Jb(i).getComputedStyle(i,null).getPropertyValue(t)}function Aee(i){return function(){delete this[i]}}function Nee(i,t){return function(){this[i]=t}}function kee(i,t){return function(){var e=t.apply(this,arguments);e==null?delete this[i]:this[i]=e}}function $B(i,t){return arguments.length>1?this.each((t==null?Aee:typeof t=="function"?kee:Nee)(i,t)):this.node()[i]}function qB(i){return i.trim().split(/^|\s+/)}function jT(i){return i.classList||new YB(i)}function YB(i){this._node=i,this._names=qB(i.getAttribute("class")||"")}YB.prototype={add:function(i){var t=this._names.indexOf(i);t<0&&(this._names.push(i),this._node.setAttribute("class",this._names.join(" ")))},remove:function(i){var t=this._names.indexOf(i);t>=0&&(this._names.splice(t,1),this._node.setAttribute("class",this._names.join(" ")))},contains:function(i){return this._names.indexOf(i)>=0}};function XB(i,t){for(var e=jT(i),n=-1,r=t.length;++n=0&&(e=t.slice(n+1),t=t.slice(0,n)),{type:t,name:e}})}function Jee(i){return function(){var t=this.__on;if(t){for(var e=0,n=-1,r=t.length,o;e>8&15|t>>4&240,t>>4&15|t&240,(t&15)<<4|t&15,1):e===8?ox(t>>24&255,t>>16&255,t>>8&255,(t&255)/255):e===4?ox(t>>12&15|t>>8&240,t>>8&15|t>>4&240,t>>4&15|t&240,((t&15)<<4|t&15)/255):null):(t=rte.exec(i))?new Mo(t[1],t[2],t[3],1):(t=ote.exec(i))?new Mo(t[1]*255/100,t[2]*255/100,t[3]*255/100,1):(t=ste.exec(i))?ox(t[1],t[2],t[3],t[4]):(t=ate.exec(i))?ox(t[1]*255/100,t[2]*255/100,t[3]*255/100,t[4]):(t=lte.exec(i))?bV(t[1],t[2]/100,t[3]/100,1):(t=cte.exec(i))?bV(t[1],t[2]/100,t[3]/100,t[4]):fV.hasOwnProperty(i)?_V(fV[i]):i==="transparent"?new Mo(NaN,NaN,NaN,0):null}function _V(i){return new Mo(i>>16&255,i>>8&255,i&255,1)}function ox(i,t,e,n){return n<=0&&(i=t=e=NaN),new Mo(i,t,e,n)}function ute(i){return i instanceof og||(i=bs(i)),i?(i=i.rgb(),new Mo(i.r,i.g,i.b,i.opacity)):new Mo}function Wh(i,t,e,n){return arguments.length===1?ute(i):new Mo(i,t,e,n??1)}function Mo(i,t,e,n){this.r=+i,this.g=+t,this.b=+e,this.opacity=+n}rx(Mo,Wh,XT(og,{brighter:function(i){return i=i==null?sx:Math.pow(sx,i),new Mo(this.r*i,this.g*i,this.b*i,this.opacity)},darker:function(i){return i=i==null?ig:Math.pow(ig,i),new Mo(this.r*i,this.g*i,this.b*i,this.opacity)},rgb:function(){return this},displayable:function(){return-.5<=this.r&&this.r<255.5&&-.5<=this.g&&this.g<255.5&&-.5<=this.b&&this.b<255.5&&0<=this.opacity&&this.opacity<=1},hex:vV,formatHex:vV,formatRgb:yV,toString:yV}));function vV(){return"#"+QT(this.r)+QT(this.g)+QT(this.b)}function yV(){var i=this.opacity;return i=isNaN(i)?1:Math.max(0,Math.min(1,i)),(i===1?"rgb(":"rgba(")+Math.max(0,Math.min(255,Math.round(this.r)||0))+", "+Math.max(0,Math.min(255,Math.round(this.g)||0))+", "+Math.max(0,Math.min(255,Math.round(this.b)||0))+(i===1?")":", "+i+")")}function QT(i){return i=Math.max(0,Math.min(255,Math.round(i)||0)),(i<16?"0":"")+i.toString(16)}function bV(i,t,e,n){return n<=0?i=t=e=NaN:e<=0||e>=1?i=t=NaN:t<=0&&(i=NaN),new Zs(i,t,e,n)}function xV(i){if(i instanceof Zs)return new Zs(i.h,i.s,i.l,i.opacity);if(i instanceof og||(i=bs(i)),!i)return new Zs;if(i instanceof Zs)return i;i=i.rgb();var t=i.r/255,e=i.g/255,n=i.b/255,r=Math.min(t,e,n),o=Math.max(t,e,n),s=NaN,a=o-r,l=(o+r)/2;return a?(t===o?s=(e-n)/a+(e0&&l<1?0:s,new Zs(s,a,l,i.opacity)}function wV(i,t,e,n){return arguments.length===1?xV(i):new Zs(i,t,e,n??1)}function Zs(i,t,e,n){this.h=+i,this.s=+t,this.l=+e,this.opacity=+n}rx(Zs,wV,XT(og,{brighter:function(i){return i=i==null?sx:Math.pow(sx,i),new Zs(this.h,this.s,this.l*i,this.opacity)},darker:function(i){return i=i==null?ig:Math.pow(ig,i),new Zs(this.h,this.s,this.l*i,this.opacity)},rgb:function(){var i=this.h%360+(this.h<0)*360,t=isNaN(i)||isNaN(this.s)?0:this.s,e=this.l,n=e+(e<.5?e:1-e)*t,r=2*e-n;return new Mo(ZT(i>=240?i-240:i+120,r,n),ZT(i,r,n),ZT(i<120?i+240:i-120,r,n),this.opacity)},displayable:function(){return(0<=this.s&&this.s<=1||isNaN(this.s))&&0<=this.l&&this.l<=1&&0<=this.opacity&&this.opacity<=1},formatHsl:function(){var i=this.opacity;return i=isNaN(i)?1:Math.max(0,Math.min(1,i)),(i===1?"hsl(":"hsla(")+(this.h||0)+", "+(this.s||0)*100+"%, "+(this.l||0)*100+"%"+(i===1?")":", "+i+")")}}));function ZT(i,t,e){return(i<60?t+(e-t)*i/60:i<180?e:i<240?t+(e-t)*(240-i)/60:t)*255}function KT(i,t,e,n,r){var o=i*i,s=o*i;return((1-3*i+3*o-s)*t+(4-6*o+3*s)*e+(1+3*i+3*o-3*s)*n+s*r)/6}function CV(i){var t=i.length-1;return function(e){var n=e<=0?e=0:e>=1?(e=1,t-1):Math.floor(e*t),r=i[n],o=i[n+1],s=n>0?i[n-1]:2*r-o,a=ne&&(o=t.slice(e,o),a[s]?a[s]+=o:a[++s]=o),(n=n[0])===(r=r[0])?a[s]?a[s]+=r:a[++s]=r:(a[++s]=null,l.push({i:s,x:qr(n,r)})),e=JT.lastIndex;return e180?d+=360:d-c>180&&(c+=360),h.push({i:u.push(r(u)+"rotate(",null,n)-2,x:qr(c,d)})):d&&u.push(r(u)+"rotate("+d+n)}function a(c,d,u,h){c!==d?h.push({i:u.push(r(u)+"skewX(",null,n)-2,x:qr(c,d)}):d&&u.push(r(u)+"skewX("+d+n)}function l(c,d,u,h,p,f){if(c!==u||d!==h){var m=p.push(r(p)+"scale(",null,",",null,")");f.push({i:m-4,x:qr(c,u)},{i:m-2,x:qr(d,h)})}else(u!==1||h!==1)&&p.push(r(p)+"scale("+u+","+h+")")}return function(c,d){var u=[],h=[];return c=i(c),d=i(d),o(c.translateX,c.translateY,d.translateX,d.translateY,u,h),s(c.rotate,d.rotate,u,h),a(c.skewX,d.skewX,u,h),l(c.scaleX,c.scaleY,d.scaleX,d.scaleY,u,h),c=d=null,function(p){for(var f=-1,m=h.length,b;++f=0&&i._call.call(null,t),i=i._next;--$h}function VV(){Pd=(ux=pg.now())+hx,$h=ug=0;try{HV()}finally{$h=0,Cte(),Pd=0}}function wte(){var i=pg.now(),t=i-ux;t>zV&&(hx-=t,ux=i)}function Cte(){for(var i,t=dx,e,n=1/0;t;)t._call?(n>t._time&&(n=t._time),i=t,t=t._next):(e=t._next,t._next=null,t=i?i._next=e:dx=e);hg=i,aD(n)}function aD(i){if(!$h){ug&&(ug=clearTimeout(ug));var t=i-Pd;t>24?(i<1/0&&(ug=setTimeout(VV,i-pg.now()-hx)),dg&&(dg=clearInterval(dg))):(dg||(ux=pg.now(),dg=setInterval(wte,zV)),$h=1,UV(VV))}}function fx(i,t,e){var n=new fg;return t=t==null?0:+t,n.restart(function(r){n.stop(),i(r+t)},t,e),n}var Ste=Jm("start","end","cancel","interrupt"),Mte=[],jV=0,lD=1,gx=2,mx=3,GV=4,_x=5,mg=6;function Ql(i,t,e,n,r,o){var s=i.__transition;if(!s)i.__transition={};else if(e in s)return;Ete(i,e,{name:t,index:n,group:r,on:Ste,tween:Mte,time:o.time,delay:o.delay,duration:o.duration,ease:o.ease,timer:null,state:jV})}function gg(i,t){var e=Ui(i,t);if(e.state>jV)throw new Error("too late; already scheduled");return e}function Yr(i,t){var e=Ui(i,t);if(e.state>mx)throw new Error("too late; already running");return e}function Ui(i,t){var e=i.__transition;if(!e||!(e=e[t]))throw new Error("transition not found");return e}function Ete(i,t,e){var n=i.__transition,r;n[t]=e,e.timer=px(o,0,e.time);function o(c){e.state=lD,e.timer.restart(s,e.delay,e.time),e.delay<=c&&s(c-e.delay)}function s(c){var d,u,h,p;if(e.state!==lD)return l();for(d in n)if(p=n[d],p.name===e.name){if(p.state===mx)return fx(s);p.state===GV?(p.state=mg,p.timer.stop(),p.on.call("interrupt",i,i.__data__,p.index,p.group),delete n[d]):+dgx&&n.state<_x,n.state=mg,n.timer.stop(),n.on.call(r?"interrupt":"cancel",i,i.__data__,n.index,n.group),delete e[s]}o&&delete i.__transition}}function WV(i){return this.each(function(){Zl(this,i)})}function Ite(i,t){var e,n;return function(){var r=Yr(this,i),o=r.tween;if(o!==e){n=e=o;for(var s=0,a=n.length;s=0&&(t=t.slice(0,e)),!t||t==="start"})}function Wte(i,t,e){var n,r,o=jte(t)?gg:Yr;return function(){var s=o(this,i),a=s.on;a!==n&&(r=(n=a).copy()).on(t,e),s.on=r}}function ez(i,t){var e=this._id;return arguments.length<2?Ui(this.node(),e).on.on(i):this.each(Wte(e,i,t))}function $te(i){return function(){var t=this.parentNode;for(var e in this.__transition)if(+e!==i)return;t&&t.removeChild(this)}}function tz(){return this.on("end.remove",$te(this._id))}function nz(i){var t=this._name,e=this._id;typeof i!="function"&&(i=Td(i));for(var n=this._groups,r=n.length,o=new Array(r),s=0;sRd)if(!(Math.abs(d*a-l*c)>Rd)||!r)this._+="L"+(this._x1=i)+","+(this._y1=t);else{var h=e-o,p=n-s,f=a*a+l*l,m=h*h+p*p,b=Math.sqrt(f),g=Math.sqrt(u),_=r*Math.tan((pD-Math.acos((f+u-m)/(2*b*g)))/2),x=_/g,C=_/b;Math.abs(x-1)>Rd&&(this._+="L"+(i+x*c)+","+(t+x*d)),this._+="A"+r+","+r+",0,0,"+ +(d*h>c*p)+","+(this._x1=i+C*a)+","+(this._y1=t+C*l)}},arc:function(i,t,e,n,r,o){i=+i,t=+t,e=+e,o=!!o;var s=e*Math.cos(n),a=e*Math.sin(n),l=i+s,c=t+a,d=1^o,u=o?n-r:r-n;if(e<0)throw new Error("negative radius: "+e);this._x1===null?this._+="M"+l+","+c:(Math.abs(this._x1-l)>Rd||Math.abs(this._y1-c)>Rd)&&(this._+="L"+l+","+c),e&&(u<0&&(u=u%fD+fD),u>une?this._+="A"+e+","+e+",0,1,"+d+","+(i-s)+","+(t-a)+"A"+e+","+e+",0,1,"+d+","+(this._x1=l)+","+(this._y1=c):u>Rd&&(this._+="A"+e+","+e+",0,"+ +(u>=pD)+","+d+","+(this._x1=i+e*Math.cos(r))+","+(this._y1=t+e*Math.sin(r))))},rect:function(i,t,e,n){this._+="M"+(this._x0=this._x1=+i)+","+(this._y0=this._y1=+t)+"h"+ +e+"v"+ +n+"h"+-e+"Z"},toString:function(){return this._}};var gD=gz;var Eo="$";function xx(){}xx.prototype=_z.prototype={constructor:xx,has:function(i){return Eo+i in this},get:function(i){return this[Eo+i]},set:function(i,t){return this[Eo+i]=t,this},remove:function(i){var t=Eo+i;return t in this&&delete this[t]},clear:function(){for(var i in this)i[0]===Eo&&delete this[i]},keys:function(){var i=[];for(var t in this)t[0]===Eo&&i.push(t.slice(1));return i},values:function(){var i=[];for(var t in this)t[0]===Eo&&i.push(this[t]);return i},entries:function(){var i=[];for(var t in this)t[0]===Eo&&i.push({key:t.slice(1),value:this[t]});return i},size:function(){var i=0;for(var t in this)t[0]===Eo&&++i;return i},empty:function(){for(var i in this)if(i[0]===Eo)return!1;return!0},each:function(i){for(var t in this)t[0]===Eo&&i(this[t],t.slice(1),this)}};function _z(i,t){var e=new xx;if(i instanceof xx)i.each(function(a,l){e.set(l,a)});else if(Array.isArray(i)){var n=-1,r=i.length,o;if(t==null)for(;++n1);return n+r*a*Math.sqrt(-2*Math.log(s)/s)}}return e.source=i,e}(Xo);var _ne=function i(t){function e(){var n=_D.source(t).apply(this,arguments);return function(){return Math.exp(n())}}return e.source=i,e}(Xo);var vD=function i(t){function e(n){return function(){for(var r=0,o=0;o0)){if(m/=p,p<0){if(m0){if(m>h)return;m>u&&(u=m)}if(m=n-a,!(!p&&m<0)){if(m/=p,p<0){if(m>h)return;m>u&&(u=m)}else if(p>0){if(m0)){if(m/=f,f<0){if(m0){if(m>h)return;m>u&&(u=m)}if(m=r-l,!(!f&&m<0)){if(m/=f,f<0){if(m>h)return;m>u&&(u=m)}else if(f>0){if(m0)&&!(h<1)||(u>0&&(i[0]=[a+u*p,l+u*f]),h<1&&(i[1]=[a+h*p,l+h*f])),!0}}}}}function Rne(i,t,e,n,r){var o=i[1];if(o)return!0;var s=i[0],a=i.left,l=i.right,c=a[0],d=a[1],u=l[0],h=l[1],p=(c+u)/2,f=(d+h)/2,m,b;if(h===d){if(p=n)return;if(c>u){if(!s)s=[p,e];else if(s[1]>=r)return;o=[p,r]}else{if(!s)s=[p,r];else if(s[1]1)if(c>u){if(!s)s=[(e-b)/m,e];else if(s[1]>=r)return;o=[(r-b)/m,r]}else{if(!s)s=[(r-b)/m,r];else if(s[1]=n)return;o=[n,m*n+b]}else{if(!s)s=[n,m*n+b];else if(s[0]Gn||Math.abs(o[0][1]-o[1][1])>Gn))&&delete Yi[r]}function Nz(i){return Xr[i.index]={site:i,halfedges:[]}}function Ane(i,t){var e=i.site,n=t.left,r=t.right;return e===r&&(r=n,n=e),r?Math.atan2(r[1]-n[1],r[0]-n[0]):(e===n?(n=t[1],r=t[0]):(n=t[0],r=t[1]),Math.atan2(n[0]-r[0],r[1]-n[1]))}function MD(i,t){return t[+(t.left!==i.site)]}function Nne(i,t){return t[+(t.left===i.site)]}function kz(){for(var i=0,t=Xr.length,e,n,r,o;iGn||Math.abs(b-p)>Gn)&&(c.splice(l,0,Yi.push(ep(a,f,Math.abs(m-i)Gn?[i,Math.abs(h-i)Gn?[Math.abs(p-n)Gn?[e,Math.abs(h-e)Gn?[Math.abs(p-t)=-Bz)){var p=l*l+c*c,f=d*d+u*u,m=(u*p-c*f)/h,b=(l*f-d*p)/h,g=Fz.pop()||new kne;g.arc=i,g.site=r,g.x=m+s,g.y=(g.cy=b+a)+Math.sqrt(m*m+b*b),i.circle=g;for(var _=null,x=tp._;x;)if(g.yGn)a=a.L;else if(s=t-Fne(a,e),s>Gn){if(!a.R){n=a;break}a=a.R}else{o>-Gn?(n=a.P,r=a):s>-Gn?(n=a,r=a.N):n=r=a;break}Nz(i);var l=Vz(i);if(Fd.insert(n,l),!(!n&&!r)){if(n===r){Ld(n),r=Vz(n.site),Fd.insert(l,r),l.edge=r.edge=Jh(n.site,l.site),kd(n),kd(r);return}if(!r){l.edge=Jh(n.site,l.site);return}Ld(n),Ld(r);var c=n.site,d=c[0],u=c[1],h=i[0]-d,p=i[1]-u,f=r.site,m=f[0]-d,b=f[1]-u,g=2*(h*b-p*m),_=h*h+p*p,x=m*m+b*b,C=[(b*_-p*x)/g+d,(h*x-m*_)/g+u];Sg(r.edge,c,f,C),l.edge=Jh(c,i,null,C),r.edge=Jh(i,f,null,C),kd(n),kd(r)}}function Gz(i,t){var e=i.site,n=e[0],r=e[1],o=r-t;if(!o)return n;var s=i.P;if(!s)return-1/0;e=s.site;var a=e[0],l=e[1],c=l-t;if(!c)return a;var d=a-n,u=1/o-1/c,h=d/c;return u?(-h+Math.sqrt(h*h-2*u*(d*d/(-2*c)-l+c/2+r-o/2)))/u+n:(n+a)/2}function Fne(i,t){var e=i.N;if(e)return Gz(e,t);var n=i.site;return n[1]===t?n[0]:1/0}var Gn=1e-6,Bz=1e-12,Fd,Xr,tp,Yi;function Bne(i,t,e){return(i[0]-e[0])*(t[1]-i[1])-(i[0]-t[0])*(e[1]-i[1])}function Vne(i,t){return t[1]-i[1]||t[0]-i[0]}function Mx(i,t){var e=i.sort(Vne).pop(),n,r,o;for(Yi=[],Xr=new Array(i.length),Fd=new SD,tp=new SD;;)if(o=Sx,e&&(!o||e[1]=s)return null;var l=i-a.site[0],c=t-a.site[1],d=l*l+c*c;do a=n.cells[r=o],o=null,a.halfedges.forEach(function(u){var h=n.edges[u],p=h.left;if(!((p===a.site||!p)&&!(p=h.right))){var f=i-p[0],m=t-p[1],b=f*f+m*m;bn?(n+r)/2:Math.min(0,n)||Math.max(0,r),s>o?(o+s)/2:Math.min(0,o)||Math.max(0,s))}function DD(){var i=zne,t=Une,e=jne,n=Hne,r=Gne,o=[0,1/0],s=[[-1/0,-1/0],[1/0,1/0]],a=250,l=sD,c=Jm("start","zoom","end"),d,u,h=500,p=150,f=0;function m(O){O.property("__zoom",jz).on("wheel.zoom",D).on("mousedown.zoom",E).on("dblclick.zoom",A).filter(r).on("touchstart.zoom",Q).on("touchmove.zoom",F).on("touchend.zoom touchcancel.zoom",z).style("touch-action","none").style("-webkit-tap-highlight-color","rgba(0,0,0,0)")}m.transform=function(O,G,$){var Y=O.selection?O.selection():O;Y.property("__zoom",jz),O!==Y?x(O,G,$):Y.interrupt().each(function(){C(this,arguments).start().zoom(null,typeof G=="function"?G.apply(this,arguments):G).end()})},m.scaleBy=function(O,G,$){m.scaleTo(O,function(){var Y=this.__zoom.k,k=typeof G=="function"?G.apply(this,arguments):G;return Y*k},$)},m.scaleTo=function(O,G,$){m.transform(O,function(){var Y=t.apply(this,arguments),k=this.__zoom,j=$==null?_(Y):typeof $=="function"?$.apply(this,arguments):$,K=k.invert(j),de=typeof G=="function"?G.apply(this,arguments):G;return e(g(b(k,de),j,K),Y,s)},$)},m.translateBy=function(O,G,$){m.transform(O,function(){return e(this.__zoom.translate(typeof G=="function"?G.apply(this,arguments):G,typeof $=="function"?$.apply(this,arguments):$),t.apply(this,arguments),s)})},m.translateTo=function(O,G,$,Y){m.transform(O,function(){var k=t.apply(this,arguments),j=this.__zoom,K=Y==null?_(k):typeof Y=="function"?Y.apply(this,arguments):Y;return e(Bd.translate(K[0],K[1]).scale(j.k).translate(typeof G=="function"?-G.apply(this,arguments):-G,typeof $=="function"?-$.apply(this,arguments):-$),k,s)},Y)};function b(O,G){return G=Math.max(o[0],Math.min(o[1],G)),G===O.k?O:new ea(G,O.x,O.y)}function g(O,G,$){var Y=G[0]-$[0]*O.k,k=G[1]-$[1]*O.k;return Y===O.x&&k===O.y?O:new ea(O.k,Y,k)}function _(O){return[(+O[0][0]+ +O[1][0])/2,(+O[0][1]+ +O[1][1])/2]}function x(O,G,$){O.on("start.zoom",function(){C(this,arguments).start()}).on("interrupt.zoom end.zoom",function(){C(this,arguments).end()}).tween("zoom",function(){var Y=this,k=arguments,j=C(Y,k),K=t.apply(Y,k),de=$==null?_(K):typeof $=="function"?$.apply(Y,k):$,Te=Math.max(K[1][0]-K[0][0],K[1][1]-K[0][1]),Ee=Y.__zoom,Ge=typeof G=="function"?G.apply(Y,k):G,he=l(Ee.invert(de).concat(Te/Ee.k),Ge.invert(de).concat(Te/Ge.k));return function(ae){if(ae===1)ae=Ge;else{var je=he(ae),ue=Te/je[2];ae=new ea(ue,de[0]-je[0]*ue,de[1]-je[1]*ue)}j.zoom(null,ae)}})}function C(O,G,$){return!$&&O.__zooming||new T(O,G)}function T(O,G){this.that=O,this.args=G,this.active=0,this.extent=t.apply(O,G),this.taps=0}T.prototype={start:function(){return++this.active===1&&(this.that.__zooming=this,this.emit("start")),this},zoom:function(O,G){return this.mouse&&O!=="mouse"&&(this.mouse[1]=G.invert(this.mouse[0])),this.touch0&&O!=="touch"&&(this.touch0[1]=G.invert(this.touch0[0])),this.touch1&&O!=="touch"&&(this.touch1[1]=G.invert(this.touch1[0])),this.that.__zoom=G,this.emit("zoom"),this},end:function(){return--this.active===0&&(delete this.that.__zooming,this.emit("end")),this},emit:function(O){WT(new ID(m,O,this.that.__zoom),c.apply,c,[O,this.that,this.args])}};function D(){if(!i.apply(this,arguments))return;var O=C(this,arguments),G=this.__zoom,$=Math.max(o[0],Math.min(o[1],G.k*Math.pow(2,n.apply(this,arguments)))),Y=Gh(this);if(O.wheel)(O.mouse[0][0]!==Y[0]||O.mouse[0][1]!==Y[1])&&(O.mouse[1]=G.invert(O.mouse[0]=Y)),clearTimeout(O.wheel);else{if(G.k===$)return;O.mouse=[Y,G.invert(Y)],Zl(this),O.start()}np(),O.wheel=setTimeout(k,p),O.zoom("mouse",e(g(b(G,$),O.mouse[0],O.mouse[1]),O.extent,s));function k(){O.wheel=null,O.end()}}function E(){if(u||!i.apply(this,arguments))return;var O=C(this,arguments,!0),G=Yo(mt.view).on("mousemove.zoom",j,!0).on("mouseup.zoom",K,!0),$=Gh(this),Y=mt.clientX,k=mt.clientY;qT(mt.view),Ex(),O.mouse=[$,this.__zoom.invert($)],Zl(this),O.start();function j(){if(np(),!O.moved){var de=mt.clientX-Y,Te=mt.clientY-k;O.moved=de*de+Te*Te>f}O.zoom("mouse",e(g(O.that.__zoom,O.mouse[0]=Gh(O.that),O.mouse[1]),O.extent,s))}function K(){G.on("mousemove.zoom mouseup.zoom",null),YT(mt.view,O.moved),np(),O.end()}}function A(){if(i.apply(this,arguments)){var O=this.__zoom,G=Gh(this),$=O.invert(G),Y=O.k*(mt.shiftKey?.5:2),k=e(g(b(O,Y),G,$),t.apply(this,arguments),s);np(),a>0?Yo(this).transition().duration(a).call(x,k,G):Yo(this).call(m.transform,k)}}function Q(){if(i.apply(this,arguments)){var O=mt.touches,G=O.length,$=C(this,arguments,mt.changedTouches.length===G),Y,k,j,K;for(Ex(),k=0;kHH,AddEquation:()=>qd,AddOperation:()=>BH,AdditiveAnimationBlendMode:()=>dP,AdditiveBlending:()=>pO,AlphaFormat:()=>QH,AlwaysDepth:()=>PH,AlwaysStencilFunc:()=>j4,AmbientLight:()=>z_,AmbientLightProbe:()=>Qw,AnimationClip:()=>pu,AnimationLoader:()=>kO,AnimationMixer:()=>tC,AnimationObjectGroup:()=>eC,AnimationUtils:()=>ei,ArcCurve:()=>d_,ArrayCamera:()=>e_,ArrowHelper:()=>tP,Audio:()=>j_,AudioAnalyser:()=>Kw,AudioContext:()=>yP,AudioListener:()=>VO,AudioLoader:()=>Yw,AxesHelper:()=>cC,AxisHelper:()=>Dce,BackSide:()=>Ti,BasicDepthPacking:()=>U4,BasicShadowMap:()=>Yne,BinaryTextureLoader:()=>Nce,Bone:()=>jp,BooleanKeyframeTrack:()=>al,BoundingBoxHelper:()=>Oce,Box2:()=>gc,Box3:()=>Qr,Box3Helper:()=>JO,BoxBufferGeometry:()=>cc,BoxGeometry:()=>cc,BoxHelper:()=>lC,BufferAttribute:()=>hn,BufferGeometry:()=>Pt,BufferGeometryLoader:()=>$w,ByteType:()=>jH,Cache:()=>fu,Camera:()=>iu,CameraHelper:()=>KO,CanvasRenderer:()=>Lce,CanvasTexture:()=>Rw,CatmullRomCurve3:()=>u_,CineonToneMapping:()=>UH,CircleBufferGeometry:()=>s_,CircleGeometry:()=>s_,ClampToEdgeWrapping:()=>dr,Clock:()=>Zw,Color:()=>Xe,ColorKeyframeTrack:()=>A_,CompressedTexture:()=>o_,CompressedTextureLoader:()=>LO,ConeBufferGeometry:()=>a_,ConeGeometry:()=>a_,CubeCamera:()=>Np,CubeReflectionMapping:()=>_u,CubeRefractionMapping:()=>vu,CubeTexture:()=>dc,CubeTextureLoader:()=>Vw,CubeUVReflectionMapping:()=>ef,CubeUVRefractionMapping:()=>$_,CubicBezierCurve:()=>Wp,CubicBezierCurve3:()=>h_,CubicInterpolant:()=>Lw,CullFaceBack:()=>hO,CullFaceFront:()=>gH,CullFaceFrontBack:()=>qne,CullFaceNone:()=>mH,Curve:()=>Kr,CurvePath:()=>kw,CustomBlending:()=>vH,CustomToneMapping:()=>GH,CylinderBufferGeometry:()=>au,CylinderGeometry:()=>au,Cylindrical:()=>$O,DataTexture:()=>Ja,DataTexture2DArray:()=>Fp,DataTexture3D:()=>Jg,DataTextureLoader:()=>zw,DataUtils:()=>iP,DecrementStencilOp:()=>oie,DecrementWrapStencilOp:()=>aie,DefaultLoadingManager:()=>uG,DepthFormat:()=>Kd,DepthStencilFormat:()=>Tp,DepthTexture:()=>Aw,DirectionalLight:()=>V_,DirectionalLightHelper:()=>ZO,DiscreteInterpolant:()=>Fw,DodecahedronBufferGeometry:()=>l_,DodecahedronGeometry:()=>l_,DoubleSide:()=>tu,DstAlphaFactor:()=>MH,DstColorFactor:()=>IH,DynamicBufferAttribute:()=>yce,DynamicCopyUsage:()=>xie,DynamicDrawUsage:()=>Op,DynamicReadUsage:()=>vie,EdgesGeometry:()=>c_,EdgesHelper:()=>Pce,EllipseCurve:()=>lu,EqualDepth:()=>AH,EqualStencilFunc:()=>uie,EquirectangularReflectionMapping:()=>Hg,EquirectangularRefractionMapping:()=>Gg,Euler:()=>nu,EventDispatcher:()=>ra,ExtrudeBufferGeometry:()=>sl,ExtrudeGeometry:()=>sl,FaceColors:()=>lce,FileLoader:()=>Jo,FlatShading:()=>sP,Float16BufferAttribute:()=>Mw,Float32Attribute:()=>Ice,Float32BufferAttribute:()=>st,Float64Attribute:()=>Tce,Float64BufferAttribute:()=>Ew,FloatType:()=>na,Fog:()=>n_,FogExp2:()=>t_,Font:()=>Gce,FontLoader:()=>Hce,FrontSide:()=>eu,Frustum:()=>ru,GLBufferAttribute:()=>rC,GLSL1:()=>Cie,GLSL3:()=>TO,GammaEncoding:()=>hC,GreaterDepth:()=>kH,GreaterEqualDepth:()=>NH,GreaterEqualStencilFunc:()=>mie,GreaterStencilFunc:()=>pie,GridHelper:()=>aC,Group:()=>Za,HalfFloatType:()=>Qd,HemisphereLight:()=>k_,HemisphereLightHelper:()=>XO,HemisphereLightProbe:()=>Xw,IcosahedronBufferGeometry:()=>g_,IcosahedronGeometry:()=>g_,ImageBitmapLoader:()=>qw,ImageLoader:()=>mu,ImageUtils:()=>tl,ImmediateRenderObject:()=>jce,IncrementStencilOp:()=>rie,IncrementWrapStencilOp:()=>sie,InstancedBufferAttribute:()=>il,InstancedBufferGeometry:()=>G_,InstancedInterleavedBuffer:()=>iC,InstancedMesh:()=>i_,Int16Attribute:()=>Cce,Int16BufferAttribute:()=>Cw,Int32Attribute:()=>Mce,Int32BufferAttribute:()=>Sw,Int8Attribute:()=>bce,Int8BufferAttribute:()=>bw,IntType:()=>$H,InterleavedBuffer:()=>nl,InterleavedBufferAttribute:()=>pc,Interpolant:()=>Ts,InterpolateDiscrete:()=>qg,InterpolateLinear:()=>Yg,InterpolateSmooth:()=>fw,InvertStencilOp:()=>lie,JSONLoader:()=>Fce,KeepStencilOp:()=>mw,KeyframeTrack:()=>Po,LOD:()=>Dw,LatheBufferGeometry:()=>__,LatheGeometry:()=>__,Layers:()=>Kg,LensFlare:()=>Vce,LessDepth:()=>RH,LessEqualDepth:()=>gw,LessEqualStencilFunc:()=>hie,LessStencilFunc:()=>die,Light:()=>Ro,LightProbe:()=>gu,Line:()=>Is,Line3:()=>oC,LineBasicMaterial:()=>ki,LineCurve:()=>cu,LineCurve3:()=>Nw,LineDashedMaterial:()=>P_,LineLoop:()=>r_,LinePieces:()=>sce,LineSegments:()=>Pr,LineStrip:()=>oce,LinearEncoding:()=>pr,LinearFilter:()=>Hi,LinearInterpolant:()=>R_,LinearMipMapLinearFilter:()=>Jne,LinearMipMapNearestFilter:()=>Kne,LinearMipmapLinearFilter:()=>yu,LinearMipmapNearestFilter:()=>cP,LinearToneMapping:()=>VH,Loader:()=>fr,LoaderUtils:()=>Jp,LoadingManager:()=>N_,LogLuvEncoding:()=>z4,LoopOnce:()=>L4,LoopPingPong:()=>B4,LoopRepeat:()=>F4,LuminanceAlphaFormat:()=>KH,LuminanceFormat:()=>ZH,MOUSE:()=>Wne,Material:()=>Ni,MaterialLoader:()=>Ww,Math:()=>Bie,MathUtils:()=>Bie,Matrix3:()=>Di,Matrix4:()=>ut,MaxEquation:()=>_O,Mesh:()=>yi,MeshBasicMaterial:()=>Ms,MeshDepthMaterial:()=>Bp,MeshDistanceMaterial:()=>Vp,MeshFaceMaterial:()=>dce,MeshLambertMaterial:()=>D_,MeshMatcapMaterial:()=>O_,MeshNormalMaterial:()=>T_,MeshPhongMaterial:()=>E_,MeshPhysicalMaterial:()=>M_,MeshStandardMaterial:()=>Kp,MeshToonMaterial:()=>I_,MinEquation:()=>gO,MirroredRepeatWrapping:()=>Wg,MixOperation:()=>FH,MultiMaterial:()=>uce,MultiplyBlending:()=>mO,MultiplyOperation:()=>W_,NearestFilter:()=>Ai,NearestMipMapLinearFilter:()=>Zne,NearestMipMapNearestFilter:()=>Qne,NearestMipmapLinearFilter:()=>vw,NearestMipmapNearestFilter:()=>_w,NeverDepth:()=>OH,NeverStencilFunc:()=>cie,NoBlending:()=>Ka,NoColors:()=>ace,NoToneMapping:()=>sc,NormalAnimationBlendMode:()=>uC,NormalBlending:()=>Mp,NotEqualDepth:()=>LH,NotEqualStencilFunc:()=>fie,NumberKeyframeTrack:()=>uu,Object3D:()=>pn,ObjectLoader:()=>FO,ObjectSpaceNormalMap:()=>G4,OctahedronBufferGeometry:()=>Xp,OctahedronGeometry:()=>Xp,OneFactor:()=>wH,OneMinusDstAlphaFactor:()=>EH,OneMinusDstColorFactor:()=>TH,OneMinusSrcAlphaFactor:()=>lP,OneMinusSrcColorFactor:()=>SH,OrthographicCamera:()=>ou,PCFShadowMap:()=>oP,PCFSoftShadowMap:()=>_H,PMREMGenerator:()=>Iw,ParametricGeometry:()=>zce,Particle:()=>pce,ParticleBasicMaterial:()=>gce,ParticleSystem:()=>fce,ParticleSystemMaterial:()=>_ce,Path:()=>du,PerspectiveCamera:()=>Ri,Plane:()=>Zo,PlaneBufferGeometry:()=>Lp,PlaneGeometry:()=>Lp,PlaneHelper:()=>eP,PointCloud:()=>hce,PointCloudMaterial:()=>mce,PointLight:()=>B_,PointLightHelper:()=>YO,Points:()=>su,PointsMaterial:()=>rl,PolarGridHelper:()=>QO,PolyhedronBufferGeometry:()=>ol,PolyhedronGeometry:()=>ol,PositionalAudio:()=>zO,PropertyBinding:()=>$n,PropertyMixer:()=>Jw,QuadraticBezierCurve:()=>$p,QuadraticBezierCurve3:()=>qp,Quaternion:()=>Gi,QuaternionKeyframeTrack:()=>mc,QuaternionLinearInterpolant:()=>Bw,REVISION:()=>rP,RGBADepthPacking:()=>H4,RGBAFormat:()=>ur,RGBAIntegerFormat:()=>o4,RGBA_ASTC_10x10_Format:()=>v4,RGBA_ASTC_10x5_Format:()=>m4,RGBA_ASTC_10x6_Format:()=>g4,RGBA_ASTC_10x8_Format:()=>_4,RGBA_ASTC_12x10_Format:()=>y4,RGBA_ASTC_12x12_Format:()=>b4,RGBA_ASTC_4x4_Format:()=>a4,RGBA_ASTC_5x4_Format:()=>l4,RGBA_ASTC_5x5_Format:()=>c4,RGBA_ASTC_6x5_Format:()=>d4,RGBA_ASTC_6x6_Format:()=>u4,RGBA_ASTC_8x5_Format:()=>h4,RGBA_ASTC_8x6_Format:()=>p4,RGBA_ASTC_8x8_Format:()=>f4,RGBA_BPTC_Format:()=>x4,RGBA_ETC2_EAC_Format:()=>IO,RGBA_PVRTC_2BPPV1_Format:()=>MO,RGBA_PVRTC_4BPPV1_Format:()=>SO,RGBA_S3TC_DXT1_Format:()=>yO,RGBA_S3TC_DXT3_Format:()=>bO,RGBA_S3TC_DXT5_Format:()=>xO,RGBDEncoding:()=>pP,RGBEEncoding:()=>pC,RGBEFormat:()=>JH,RGBFormat:()=>Zd,RGBIntegerFormat:()=>r4,RGBM16Encoding:()=>hP,RGBM7Encoding:()=>uP,RGB_ETC1_Format:()=>s4,RGB_ETC2_Format:()=>EO,RGB_PVRTC_2BPPV1_Format:()=>CO,RGB_PVRTC_4BPPV1_Format:()=>wO,RGB_S3TC_DXT1_Format:()=>vO,RGFormat:()=>n4,RGIntegerFormat:()=>i4,RawShaderMaterial:()=>uc,Ray:()=>sa,Raycaster:()=>GO,RectAreaLight:()=>U_,RedFormat:()=>e4,RedIntegerFormat:()=>t4,ReinhardToneMapping:()=>zH,RepeatWrapping:()=>jg,ReplaceStencilOp:()=>iie,ReverseSubtractEquation:()=>bH,RingBufferGeometry:()=>v_,RingGeometry:()=>v_,SRGB8_ALPHA8_ASTC_10x10_Format:()=>A4,SRGB8_ALPHA8_ASTC_10x5_Format:()=>O4,SRGB8_ALPHA8_ASTC_10x6_Format:()=>P4,SRGB8_ALPHA8_ASTC_10x8_Format:()=>R4,SRGB8_ALPHA8_ASTC_12x10_Format:()=>N4,SRGB8_ALPHA8_ASTC_12x12_Format:()=>k4,SRGB8_ALPHA8_ASTC_4x4_Format:()=>w4,SRGB8_ALPHA8_ASTC_5x4_Format:()=>C4,SRGB8_ALPHA8_ASTC_5x5_Format:()=>S4,SRGB8_ALPHA8_ASTC_6x5_Format:()=>M4,SRGB8_ALPHA8_ASTC_6x6_Format:()=>E4,SRGB8_ALPHA8_ASTC_8x5_Format:()=>I4,SRGB8_ALPHA8_ASTC_8x6_Format:()=>T4,SRGB8_ALPHA8_ASTC_8x8_Format:()=>D4,Scene:()=>zp,SceneUtils:()=>Bce,ShaderChunk:()=>ln,ShaderLib:()=>Ss,ShaderMaterial:()=>Es,ShadowMaterial:()=>S_,Shape:()=>Ko,ShapeBufferGeometry:()=>Qp,ShapeGeometry:()=>Qp,ShapePath:()=>nP,ShapeUtils:()=>ia,ShortType:()=>WH,Skeleton:()=>Ow,SkeletonHelper:()=>sC,SkinnedMesh:()=>Gp,SmoothShading:()=>Xne,Sphere:()=>oa,SphereBufferGeometry:()=>Zp,SphereGeometry:()=>Zp,Spherical:()=>WO,SphericalHarmonics3:()=>H_,SplineCurve:()=>Yp,SpotLight:()=>F_,SpotLightHelper:()=>qO,Sprite:()=>Hp,SpriteMaterial:()=>Up,SrcAlphaFactor:()=>aP,SrcAlphaSaturateFactor:()=>DH,SrcColorFactor:()=>CH,StaticCopyUsage:()=>bie,StaticDrawUsage:()=>Dp,StaticReadUsage:()=>_ie,StereoCamera:()=>BO,StreamCopyUsage:()=>wie,StreamDrawUsage:()=>gie,StreamReadUsage:()=>yie,StringKeyframeTrack:()=>ll,SubtractEquation:()=>yH,SubtractiveBlending:()=>fO,TOUCH:()=>$ne,TangentSpaceNormalMap:()=>bu,TetrahedronBufferGeometry:()=>y_,TetrahedronGeometry:()=>y_,TextGeometry:()=>Uce,Texture:()=>Qi,TextureLoader:()=>Uw,TorusBufferGeometry:()=>b_,TorusGeometry:()=>b_,TorusKnotBufferGeometry:()=>x_,TorusKnotGeometry:()=>x_,Triangle:()=>hr,TriangleFanDrawMode:()=>tie,TriangleStripDrawMode:()=>eie,TrianglesDrawMode:()=>V4,TubeBufferGeometry:()=>w_,TubeGeometry:()=>w_,UVMapping:()=>dC,Uint16Attribute:()=>Sce,Uint16BufferAttribute:()=>Pp,Uint32Attribute:()=>Ece,Uint32BufferAttribute:()=>Rp,Uint8Attribute:()=>xce,Uint8BufferAttribute:()=>xw,Uint8ClampedAttribute:()=>wce,Uint8ClampedBufferAttribute:()=>ww,Uniform:()=>nC,UniformsLib:()=>He,UniformsUtils:()=>Y4,UnsignedByteType:()=>el,UnsignedInt248Type:()=>Ep,UnsignedIntType:()=>Fg,UnsignedShort4444Type:()=>qH,UnsignedShort5551Type:()=>YH,UnsignedShort565Type:()=>XH,UnsignedShortType:()=>$g,VSMShadowMap:()=>wp,Vector2:()=>xe,Vector3:()=>P,Vector4:()=>Mn,VectorKeyframeTrack:()=>hu,Vertex:()=>vce,VertexColors:()=>cce,VideoTexture:()=>Pw,WebGL1Renderer:()=>Tw,WebGLCubeRenderTarget:()=>kp,WebGLMultipleRenderTargets:()=>yw,WebGLMultisampleRenderTarget:()=>Zg,WebGLRenderTarget:()=>Oo,WebGLRenderTargetCube:()=>kce,WebGLRenderer:()=>Vn,WebGLUtils:()=>sG,WireframeGeometry:()=>C_,WireframeHelper:()=>Rce,WrapAroundEnding:()=>Xg,XHRLoader:()=>Ace,ZeroCurvatureEnding:()=>Yd,ZeroFactor:()=>xH,ZeroSlopeEnding:()=>Xd,ZeroStencilOp:()=>nie,sRGBEncoding:()=>_c});var rP="134",Wne={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},$ne={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},mH=0,hO=1,gH=2,qne=3,Yne=0,oP=1,_H=2,wp=3,eu=0,Ti=1,tu=2,sP=1,Xne=2,Ka=0,Mp=1,pO=2,fO=3,mO=4,vH=5,qd=100,yH=101,bH=102,gO=103,_O=104,xH=200,wH=201,CH=202,SH=203,aP=204,lP=205,MH=206,EH=207,IH=208,TH=209,DH=210,OH=0,PH=1,RH=2,gw=3,AH=4,NH=5,kH=6,LH=7,W_=0,FH=1,BH=2,sc=0,VH=1,zH=2,UH=3,HH=4,GH=5,dC=300,_u=301,vu=302,Hg=303,Gg=304,ef=306,$_=307,jg=1e3,dr=1001,Wg=1002,Ai=1003,_w=1004,Qne=1004,vw=1005,Zne=1005,Hi=1006,cP=1007,Kne=1007,yu=1008,Jne=1008,el=1009,jH=1010,WH=1011,$g=1012,$H=1013,Fg=1014,na=1015,Qd=1016,qH=1017,YH=1018,XH=1019,Ep=1020,QH=1021,Zd=1022,ur=1023,ZH=1024,KH=1025,JH=ur,Kd=1026,Tp=1027,e4=1028,t4=1029,n4=1030,i4=1031,r4=1032,o4=1033,vO=33776,yO=33777,bO=33778,xO=33779,wO=35840,CO=35841,SO=35842,MO=35843,s4=36196,EO=37492,IO=37496,a4=37808,l4=37809,c4=37810,d4=37811,u4=37812,h4=37813,p4=37814,f4=37815,m4=37816,g4=37817,_4=37818,v4=37819,y4=37820,b4=37821,x4=36492,w4=37840,C4=37841,S4=37842,M4=37843,E4=37844,I4=37845,T4=37846,D4=37847,O4=37848,P4=37849,R4=37850,A4=37851,N4=37852,k4=37853,L4=2200,F4=2201,B4=2202,qg=2300,Yg=2301,fw=2302,Yd=2400,Xd=2401,Xg=2402,uC=2500,dP=2501,V4=0,eie=1,tie=2,pr=3e3,_c=3001,hC=3007,pC=3002,z4=3003,uP=3004,hP=3005,pP=3006,U4=3200,H4=3201,bu=0,G4=1,nie=0,mw=7680,iie=7681,rie=7682,oie=7683,sie=34055,aie=34056,lie=5386,cie=512,die=513,uie=514,hie=515,pie=516,fie=517,mie=518,j4=519,Dp=35044,Op=35048,gie=35040,_ie=35045,vie=35049,yie=35041,bie=35046,xie=35050,wie=35042,Cie="100",TO="300 es",ra=class{addEventListener(t,e){this._listeners===void 0&&(this._listeners={});let n=this._listeners;n[t]===void 0&&(n[t]=[]),n[t].indexOf(e)===-1&&n[t].push(e)}hasEventListener(t,e){if(this._listeners===void 0)return!1;let n=this._listeners;return n[t]!==void 0&&n[t].indexOf(e)!==-1}removeEventListener(t,e){if(this._listeners===void 0)return;let r=this._listeners[t];if(r!==void 0){let o=r.indexOf(e);o!==-1&&r.splice(o,1)}}dispatchEvent(t){if(this._listeners===void 0)return;let n=this._listeners[t.type];if(n!==void 0){t.target=this;let r=n.slice(0);for(let o=0,s=r.length;o>8&255]+lr[i>>16&255]+lr[i>>24&255]+"-"+lr[t&255]+lr[t>>8&255]+"-"+lr[t>>16&15|64]+lr[t>>24&255]+"-"+lr[e&63|128]+lr[e>>8&255]+"-"+lr[e>>16&255]+lr[e>>24&255]+lr[n&255]+lr[n>>8&255]+lr[n>>16&255]+lr[n>>24&255]).toUpperCase()}function cr(i,t,e){return Math.max(t,Math.min(e,i))}function fP(i,t){return(i%t+t)%t}function Mie(i,t,e,n,r){return n+(i-t)*(r-n)/(e-t)}function Eie(i,t,e){return i!==t?(e-i)/(t-i):0}function Bg(i,t,e){return(1-e)*i+e*t}function Iie(i,t,e,n){return Bg(i,t,1-Math.exp(-e*n))}function Tie(i,t=1){return t-Math.abs(fP(i,t*2)-t)}function Die(i,t,e){return i<=t?0:i>=e?1:(i=(i-t)/(e-t),i*i*(3-2*i))}function Oie(i,t,e){return i<=t?0:i>=e?1:(i=(i-t)/(e-t),i*i*i*(i*(i*6-15)+10))}function Pie(i,t){return i+Math.floor(Math.random()*(t-i+1))}function Rie(i,t){return i+Math.random()*(t-i)}function Aie(i){return i*(.5-Math.random())}function Nie(i){return i!==void 0&&(Ix=i%2147483647),Ix=Ix*16807%2147483647,(Ix-1)/2147483646}function kie(i){return i*Jd}function Lie(i){return i*Qg}function DO(i){return(i&i-1)===0&&i!==0}function W4(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function $4(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function Fie(i,t,e,n,r){let o=Math.cos,s=Math.sin,a=o(e/2),l=s(e/2),c=o((t+n)/2),d=s((t+n)/2),u=o((t-n)/2),h=s((t-n)/2),p=o((n-t)/2),f=s((n-t)/2);switch(r){case"XYX":i.set(a*d,l*u,l*h,a*c);break;case"YZY":i.set(l*h,a*d,l*u,a*c);break;case"ZXZ":i.set(l*u,l*h,a*d,a*c);break;case"XZX":i.set(a*d,l*f,l*p,a*c);break;case"YXY":i.set(l*p,a*d,l*f,a*c);break;case"ZYZ":i.set(l*f,l*p,a*d,a*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}var Bie=Object.freeze({__proto__:null,DEG2RAD:Jd,RAD2DEG:Qg,generateUUID:Do,clamp:cr,euclideanModulo:fP,mapLinear:Mie,inverseLerp:Eie,lerp:Bg,damp:Iie,pingpong:Tie,smoothstep:Die,smootherstep:Oie,randInt:Pie,randFloat:Rie,randFloatSpread:Aie,seededRandom:Nie,degToRad:kie,radToDeg:Lie,isPowerOfTwo:DO,ceilPowerOfTwo:W4,floorPowerOfTwo:$4,setQuaternionFromProperEuler:Fie}),xe=class{constructor(t=0,e=0){this.x=t,this.y=e}get width(){return this.x}set width(t){this.x=t}get height(){return this.y}set height(t){this.y=t}set(t,e){return this.x=t,this.y=e,this}setScalar(t){return this.x=t,this.y=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y)}copy(t){return this.x=t.x,this.y=t.y,this}add(t,e){return e!==void 0?(console.warn("THREE.Vector2: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this)}addScalar(t){return this.x+=t,this.y+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this}sub(t,e){return e!==void 0?(console.warn("THREE.Vector2: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this)}subScalar(t){return this.x-=t,this.y-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this}multiply(t){return this.x*=t.x,this.y*=t.y,this}multiplyScalar(t){return this.x*=t,this.y*=t,this}divide(t){return this.x/=t.x,this.y/=t.y,this}divideScalar(t){return this.multiplyScalar(1/t)}applyMatrix3(t){let e=this.x,n=this.y,r=t.elements;return this.x=r[0]*e+r[3]*n+r[6],this.y=r[1]*e+r[4]*n+r[7],this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this}negate(){return this.x=-this.x,this.y=-this.y,this}dot(t){return this.x*t.x+this.y*t.y}cross(t){return this.x*t.y-this.y*t.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}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,n=this.y-t.y;return e*e+n*n}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)}setLength(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this}equals(t){return t.x===this.x&&t.y===this.y}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t}fromBufferAttribute(t,e,n){return n!==void 0&&console.warn("THREE.Vector2: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this}rotateAround(t,e){let n=Math.cos(e),r=Math.sin(e),o=this.x-t.x,s=this.y-t.y;return this.x=o*n-s*r+t.x,this.y=o*r+s*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}};xe.prototype.isVector2=!0;var Di=class{constructor(){this.elements=[1,0,0,0,1,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix3: the constructor no longer reads arguments. use .set() instead.")}set(t,e,n,r,o,s,a,l,c){let d=this.elements;return d[0]=t,d[1]=r,d[2]=a,d[3]=e,d[4]=o,d[5]=l,d[6]=n,d[7]=s,d[8]=c,this}identity(){return this.set(1,0,0,0,1,0,0,0,1),this}copy(t){let e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],this}extractBasis(t,e,n){return t.setFromMatrix3Column(this,0),e.setFromMatrix3Column(this,1),n.setFromMatrix3Column(this,2),this}setFromMatrix4(t){let e=t.elements;return this.set(e[0],e[4],e[8],e[1],e[5],e[9],e[2],e[6],e[10]),this}multiply(t){return this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let n=t.elements,r=e.elements,o=this.elements,s=n[0],a=n[3],l=n[6],c=n[1],d=n[4],u=n[7],h=n[2],p=n[5],f=n[8],m=r[0],b=r[3],g=r[6],_=r[1],x=r[4],C=r[7],T=r[2],D=r[5],E=r[8];return o[0]=s*m+a*_+l*T,o[3]=s*b+a*x+l*D,o[6]=s*g+a*C+l*E,o[1]=c*m+d*_+u*T,o[4]=c*b+d*x+u*D,o[7]=c*g+d*C+u*E,o[2]=h*m+p*_+f*T,o[5]=h*b+p*x+f*D,o[8]=h*g+p*C+f*E,this}multiplyScalar(t){let e=this.elements;return e[0]*=t,e[3]*=t,e[6]*=t,e[1]*=t,e[4]*=t,e[7]*=t,e[2]*=t,e[5]*=t,e[8]*=t,this}determinant(){let t=this.elements,e=t[0],n=t[1],r=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],d=t[8];return e*s*d-e*a*c-n*o*d+n*a*l+r*o*c-r*s*l}invert(){let t=this.elements,e=t[0],n=t[1],r=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],d=t[8],u=d*s-a*c,h=a*l-d*o,p=c*o-s*l,f=e*u+n*h+r*p;if(f===0)return this.set(0,0,0,0,0,0,0,0,0);let m=1/f;return t[0]=u*m,t[1]=(r*c-d*n)*m,t[2]=(a*n-r*s)*m,t[3]=h*m,t[4]=(d*e-r*l)*m,t[5]=(r*o-a*e)*m,t[6]=p*m,t[7]=(n*l-c*e)*m,t[8]=(s*e-n*o)*m,this}transpose(){let t,e=this.elements;return t=e[1],e[1]=e[3],e[3]=t,t=e[2],e[2]=e[6],e[6]=t,t=e[5],e[5]=e[7],e[7]=t,this}getNormalMatrix(t){return this.setFromMatrix4(t).invert().transpose()}transposeIntoArray(t){let e=this.elements;return t[0]=e[0],t[1]=e[3],t[2]=e[6],t[3]=e[1],t[4]=e[4],t[5]=e[7],t[6]=e[2],t[7]=e[5],t[8]=e[8],this}setUvTransform(t,e,n,r,o,s,a){let l=Math.cos(o),c=Math.sin(o);return this.set(n*l,n*c,-n*(l*s+c*a)+s+t,-r*c,r*l,-r*(-c*s+l*a)+a+e,0,0,1),this}scale(t,e){let n=this.elements;return n[0]*=t,n[3]*=t,n[6]*=t,n[1]*=e,n[4]*=e,n[7]*=e,this}rotate(t){let e=Math.cos(t),n=Math.sin(t),r=this.elements,o=r[0],s=r[3],a=r[6],l=r[1],c=r[4],d=r[7];return r[0]=e*o+n*l,r[3]=e*s+n*c,r[6]=e*a+n*d,r[1]=-n*o+e*l,r[4]=-n*s+e*c,r[7]=-n*a+e*d,this}translate(t,e){let n=this.elements;return n[0]+=t*n[2],n[3]+=t*n[5],n[6]+=t*n[8],n[1]+=e*n[2],n[4]+=e*n[5],n[7]+=e*n[8],this}equals(t){let e=this.elements,n=t.elements;for(let r=0;r<9;r++)if(e[r]!==n[r])return!1;return!0}fromArray(t,e=0){for(let n=0;n<9;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){let n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t}clone(){return new this.constructor().fromArray(this.elements)}};Di.prototype.isMatrix3=!0;function q4(i){if(i.length===0)return-1/0;let t=i[0];for(let e=1,n=i.length;et&&(t=i[e]);return t}var Vie={Int8Array,Uint8Array,Uint8ClampedArray,Int16Array,Uint16Array,Int32Array,Uint32Array,Float32Array,Float64Array};function Cp(i,t){return new Vie[i](t)}function fC(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function Wz(i,t=0){let e=3735928559^t,n=1103547991^t;for(let r=0,o;r>>16,2246822507)^Math.imul(n^n>>>13,3266489909),n=Math.imul(n^n>>>16,2246822507)^Math.imul(e^e>>>13,3266489909),4294967296*(2097151&n)+(e>>>0)}var ip,tl=class{static getDataURL(t){if(/^data:/i.test(t.src)||typeof HTMLCanvasElement>"u")return t.src;let e;if(t instanceof HTMLCanvasElement)e=t;else{ip===void 0&&(ip=fC("canvas")),ip.width=t.width,ip.height=t.height;let n=ip.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=ip}return e.width>2048||e.height>2048?(console.warn("THREE.ImageUtils.getDataURL: Image converted to jpg for performance reasons",t),e.toDataURL("image/jpeg",.6)):e.toDataURL("image/png")}},zie=0,Qi=class i extends ra{constructor(t=i.DEFAULT_IMAGE,e=i.DEFAULT_MAPPING,n=dr,r=dr,o=Hi,s=yu,a=ur,l=el,c=1,d=pr){super(),Object.defineProperty(this,"id",{value:zie++}),this.uuid=Do(),this.name="",this.image=t,this.mipmaps=[],this.mapping=e,this.wrapS=n,this.wrapT=r,this.magFilter=o,this.minFilter=s,this.anisotropy=c,this.format=a,this.internalFormat=null,this.type=l,this.offset=new xe(0,0),this.repeat=new xe(1,1),this.center=new xe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Di,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.encoding=d,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1}updateMatrix(){this.matrix.setUvTransform(this.offset.x,this.offset.y,this.repeat.x,this.repeat.y,this.rotation,this.center.x,this.center.y)}clone(){return new this.constructor().copy(this)}copy(t){return this.name=t.name,this.image=t.image,this.mipmaps=t.mipmaps.slice(0),this.mapping=t.mapping,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.encoding=t.encoding,this.userData=JSON.parse(JSON.stringify(t.userData)),this}toJSON(t){let e=t===void 0||typeof t=="string";if(!e&&t.textures[this.uuid]!==void 0)return t.textures[this.uuid];let n={metadata:{version:4.5,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,mapping:this.mapping,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,type:this.type,encoding:this.encoding,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};if(this.image!==void 0){let r=this.image;if(r.uuid===void 0&&(r.uuid=Do()),!e&&t.images[r.uuid]===void 0){let o;if(Array.isArray(r)){o=[];for(let s=0,a=r.length;s1)switch(this.wrapS){case jg:t.x=t.x-Math.floor(t.x);break;case dr:t.x=t.x<0?0:1;break;case Wg: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 jg:t.y=t.y-Math.floor(t.y);break;case dr:t.y=t.y<0?0:1;break;case Wg: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++}};Qi.DEFAULT_IMAGE=void 0;Qi.DEFAULT_MAPPING=dC;Qi.prototype.isTexture=!0;function PD(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?tl.getDataURL(i):i.data?{data:Array.prototype.slice.call(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}var Mn=class{constructor(t=0,e=0,n=0,r=1){this.x=t,this.y=e,this.z=n,this.w=r}get width(){return this.z}set width(t){this.z=t}get height(){return this.w}set height(t){this.w=t}set(t,e,n,r){return this.x=t,this.y=e,this.z=n,this.w=r,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this.w=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setW(t){return this.w=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;case 3:this.w=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){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: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z,this.w)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this.w=t.w!==void 0?t.w:1,this}add(t,e){return e!==void 0?(console.warn("THREE.Vector4: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this.w+=t.w,this)}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this.w+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this.w=t.w+e.w,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this.w+=t.w*e,this}sub(t,e){return e!==void 0?(console.warn("THREE.Vector4: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this.w-=t.w,this)}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this.w-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this.w=t.w-e.w,this}multiply(t){return this.x*=t.x,this.y*=t.y,this.z*=t.z,this.w*=t.w,this}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this.w*=t,this}applyMatrix4(t){let e=this.x,n=this.y,r=this.z,o=this.w,s=t.elements;return this.x=s[0]*e+s[4]*n+s[8]*r+s[12]*o,this.y=s[1]*e+s[5]*n+s[9]*r+s[13]*o,this.z=s[2]*e+s[6]*n+s[10]*r+s[14]*o,this.w=s[3]*e+s[7]*n+s[11]*r+s[15]*o,this}divideScalar(t){return this.multiplyScalar(1/t)}setAxisAngleFromQuaternion(t){this.w=2*Math.acos(t.w);let e=Math.sqrt(1-t.w*t.w);return e<1e-4?(this.x=1,this.y=0,this.z=0):(this.x=t.x/e,this.y=t.y/e,this.z=t.z/e),this}setAxisAngleFromRotationMatrix(t){let e,n,r,o,l=t.elements,c=l[0],d=l[4],u=l[8],h=l[1],p=l[5],f=l[9],m=l[2],b=l[6],g=l[10];if(Math.abs(d-h)<.01&&Math.abs(u-m)<.01&&Math.abs(f-b)<.01){if(Math.abs(d+h)<.1&&Math.abs(u+m)<.1&&Math.abs(f+b)<.1&&Math.abs(c+p+g-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;let x=(c+1)/2,C=(p+1)/2,T=(g+1)/2,D=(d+h)/4,E=(u+m)/4,A=(f+b)/4;return x>C&&x>T?x<.01?(n=0,r=.707106781,o=.707106781):(n=Math.sqrt(x),r=D/n,o=E/n):C>T?C<.01?(n=.707106781,r=0,o=.707106781):(r=Math.sqrt(C),n=D/r,o=A/r):T<.01?(n=.707106781,r=.707106781,o=0):(o=Math.sqrt(T),n=E/o,r=A/o),this.set(n,r,o,e),this}let _=Math.sqrt((b-f)*(b-f)+(u-m)*(u-m)+(h-d)*(h-d));return Math.abs(_)<.001&&(_=1),this.x=(b-f)/_,this.y=(u-m)/_,this.z=(h-d)/_,this.w=Math.acos((c+p+g-1)/2),this}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this.w=Math.min(this.w,t.w),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this.w=Math.max(this.w,t.w),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this.w=Math.max(t.w,Math.min(e.w,this.w)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this.w=Math.max(t,Math.min(e,this.w)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this.w=this.w<0?Math.ceil(this.w):Math.floor(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.z+this.w*t.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(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this.w+=(t.w-this.w)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this.w=t.w+(e.w-t.w)*n,this}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z&&t.w===this.w}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this.w=t[e+3],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t[e+3]=this.w,t}fromBufferAttribute(t,e,n){return n!==void 0&&console.warn("THREE.Vector4: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this.w=t.getW(e),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}};Mn.prototype.isVector4=!0;var Oo=class extends ra{constructor(t,e,n={}){super(),this.width=t,this.height=e,this.depth=1,this.scissor=new Mn(0,0,t,e),this.scissorTest=!1,this.viewport=new Mn(0,0,t,e),this.texture=new Qi(void 0,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.encoding),this.texture.isRenderTargetTexture=!0,this.texture.image={width:t,height:e,depth:1},this.texture.generateMipmaps=n.generateMipmaps!==void 0?n.generateMipmaps:!1,this.texture.internalFormat=n.internalFormat!==void 0?n.internalFormat:null,this.texture.minFilter=n.minFilter!==void 0?n.minFilter:Hi,this.depthBuffer=n.depthBuffer!==void 0?n.depthBuffer:!0,this.stencilBuffer=n.stencilBuffer!==void 0?n.stencilBuffer:!1,this.depthTexture=n.depthTexture!==void 0?n.depthTexture:null}setTexture(t){t.image={width:this.width,height:this.height,depth:this.depth},this.texture=t}setSize(t,e,n=1){(this.width!==t||this.height!==e||this.depth!==n)&&(this.width=t,this.height=e,this.depth=n,this.texture.image.width=t,this.texture.image.height=e,this.texture.image.depth=n,this.dispose()),this.viewport.set(0,0,t,e),this.scissor.set(0,0,t,e)}clone(){return new this.constructor().copy(this)}copy(t){return this.width=t.width,this.height=t.height,this.depth=t.depth,this.viewport.copy(t.viewport),this.texture=t.texture.clone(),this.texture.image=X({},this.texture.image),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.depthTexture=t.depthTexture,this}dispose(){this.dispatchEvent({type:"dispose"})}};Oo.prototype.isWebGLRenderTarget=!0;var yw=class extends Oo{constructor(t,e,n){super(t,e);let r=this.texture;this.texture=[];for(let o=0;o=0?1:-1,x=1-g*g;if(x>Number.EPSILON){let T=Math.sqrt(x),D=Math.atan2(T,g*_);b=Math.sin(b*D)/T,a=Math.sin(a*D)/T}let C=a*_;if(l=l*b+h*C,c=c*b+p*C,d=d*b+f*C,u=u*b+m*C,b===1-a){let T=1/Math.sqrt(l*l+c*c+d*d+u*u);l*=T,c*=T,d*=T,u*=T}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=u}static multiplyQuaternionsFlat(t,e,n,r,o,s){let a=n[r],l=n[r+1],c=n[r+2],d=n[r+3],u=o[s],h=o[s+1],p=o[s+2],f=o[s+3];return t[e]=a*f+d*u+l*p-c*h,t[e+1]=l*f+d*h+c*u-a*p,t[e+2]=c*f+d*p+a*h-l*u,t[e+3]=d*f-a*u-l*h-c*p,t}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 w(){return this._w}set w(t){this._w=t,this._onChangeCallback()}set(t,e,n,r){return this._x=t,this._y=e,this._z=n,this._w=r,this._onChangeCallback(),this}clone(){return new this.constructor(this._x,this._y,this._z,this._w)}copy(t){return this._x=t.x,this._y=t.y,this._z=t.z,this._w=t.w,this._onChangeCallback(),this}setFromEuler(t,e){if(!(t&&t.isEuler))throw new Error("THREE.Quaternion: .setFromEuler() now expects an Euler rotation rather than a Vector3 and order.");let n=t._x,r=t._y,o=t._z,s=t._order,a=Math.cos,l=Math.sin,c=a(n/2),d=a(r/2),u=a(o/2),h=l(n/2),p=l(r/2),f=l(o/2);switch(s){case"XYZ":this._x=h*d*u+c*p*f,this._y=c*p*u-h*d*f,this._z=c*d*f+h*p*u,this._w=c*d*u-h*p*f;break;case"YXZ":this._x=h*d*u+c*p*f,this._y=c*p*u-h*d*f,this._z=c*d*f-h*p*u,this._w=c*d*u+h*p*f;break;case"ZXY":this._x=h*d*u-c*p*f,this._y=c*p*u+h*d*f,this._z=c*d*f+h*p*u,this._w=c*d*u-h*p*f;break;case"ZYX":this._x=h*d*u-c*p*f,this._y=c*p*u+h*d*f,this._z=c*d*f-h*p*u,this._w=c*d*u+h*p*f;break;case"YZX":this._x=h*d*u+c*p*f,this._y=c*p*u+h*d*f,this._z=c*d*f-h*p*u,this._w=c*d*u-h*p*f;break;case"XZY":this._x=h*d*u-c*p*f,this._y=c*p*u-h*d*f,this._z=c*d*f+h*p*u,this._w=c*d*u+h*p*f;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+s)}return e!==!1&&this._onChangeCallback(),this}setFromAxisAngle(t,e){let n=e/2,r=Math.sin(n);return this._x=t.x*r,this._y=t.y*r,this._z=t.z*r,this._w=Math.cos(n),this._onChangeCallback(),this}setFromRotationMatrix(t){let e=t.elements,n=e[0],r=e[4],o=e[8],s=e[1],a=e[5],l=e[9],c=e[2],d=e[6],u=e[10],h=n+a+u;if(h>0){let p=.5/Math.sqrt(h+1);this._w=.25/p,this._x=(d-l)*p,this._y=(o-c)*p,this._z=(s-r)*p}else if(n>a&&n>u){let p=2*Math.sqrt(1+n-a-u);this._w=(d-l)/p,this._x=.25*p,this._y=(r+s)/p,this._z=(o+c)/p}else if(a>u){let p=2*Math.sqrt(1+a-n-u);this._w=(o-c)/p,this._x=(r+s)/p,this._y=.25*p,this._z=(l+d)/p}else{let p=2*Math.sqrt(1+u-n-a);this._w=(s-r)/p,this._x=(o+c)/p,this._y=(l+d)/p,this._z=.25*p}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return nMath.abs(t.z)?(this._x=-t.y,this._y=t.x,this._z=0,this._w=n):(this._x=0,this._y=-t.z,this._z=t.y,this._w=n)):(this._x=t.y*e.z-t.z*e.y,this._y=t.z*e.x-t.x*e.z,this._z=t.x*e.y-t.y*e.x,this._w=n),this.normalize()}angleTo(t){return 2*Math.acos(Math.abs(cr(this.dot(t),-1,1)))}rotateTowards(t,e){let n=this.angleTo(t);if(n===0)return this;let r=Math.min(1,e/n);return this.slerp(t,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(t){return this._x*t._x+this._y*t._y+this._z*t._z+this._w*t._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 t=this.length();return t===0?(this._x=0,this._y=0,this._z=0,this._w=1):(t=1/t,this._x=this._x*t,this._y=this._y*t,this._z=this._z*t,this._w=this._w*t),this._onChangeCallback(),this}multiply(t,e){return e!==void 0?(console.warn("THREE.Quaternion: .multiply() now only accepts one argument. Use .multiplyQuaternions( a, b ) instead."),this.multiplyQuaternions(t,e)):this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){let n=t._x,r=t._y,o=t._z,s=t._w,a=e._x,l=e._y,c=e._z,d=e._w;return this._x=n*d+s*a+r*c-o*l,this._y=r*d+s*l+o*a-n*c,this._z=o*d+s*c+n*l-r*a,this._w=s*d-n*a-r*l-o*c,this._onChangeCallback(),this}slerp(t,e){if(e===0)return this;if(e===1)return this.copy(t);let n=this._x,r=this._y,o=this._z,s=this._w,a=s*t._w+n*t._x+r*t._y+o*t._z;if(a<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,a=-a):this.copy(t),a>=1)return this._w=s,this._x=n,this._y=r,this._z=o,this;let l=1-a*a;if(l<=Number.EPSILON){let p=1-e;return this._w=p*s+e*this._w,this._x=p*n+e*this._x,this._y=p*r+e*this._y,this._z=p*o+e*this._z,this.normalize(),this._onChangeCallback(),this}let c=Math.sqrt(l),d=Math.atan2(c,a),u=Math.sin((1-e)*d)/c,h=Math.sin(e*d)/c;return this._w=s*u+this._w*h,this._x=n*u+this._x*h,this._y=r*u+this._y*h,this._z=o*u+this._z*h,this._onChangeCallback(),this}slerpQuaternions(t,e,n){this.copy(t).slerp(e,n)}random(){let t=Math.random(),e=Math.sqrt(1-t),n=Math.sqrt(t),r=2*Math.PI*Math.random(),o=2*Math.PI*Math.random();return this.set(e*Math.cos(r),n*Math.sin(o),n*Math.cos(o),e*Math.sin(r))}equals(t){return t._x===this._x&&t._y===this._y&&t._z===this._z&&t._w===this._w}fromArray(t,e=0){return this._x=t[e],this._y=t[e+1],this._z=t[e+2],this._w=t[e+3],this._onChangeCallback(),this}toArray(t=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._w,t}fromBufferAttribute(t,e){return this._x=t.getX(e),this._y=t.getY(e),this._z=t.getZ(e),this._w=t.getW(e),this}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}};Gi.prototype.isQuaternion=!0;var P=class{constructor(t=0,e=0,n=0){this.x=t,this.y=e,this.z=n}set(t,e,n){return n===void 0&&(n=this.z),this.x=t,this.y=e,this.z=n,this}setScalar(t){return this.x=t,this.y=t,this.z=t,this}setX(t){return this.x=t,this}setY(t){return this.y=t,this}setZ(t){return this.z=t,this}setComponent(t,e){switch(t){case 0:this.x=e;break;case 1:this.y=e;break;case 2:this.z=e;break;default:throw new Error("index is out of range: "+t)}return this}getComponent(t){switch(t){case 0:return this.x;case 1:return this.y;case 2:return this.z;default:throw new Error("index is out of range: "+t)}}clone(){return new this.constructor(this.x,this.y,this.z)}copy(t){return this.x=t.x,this.y=t.y,this.z=t.z,this}add(t,e){return e!==void 0?(console.warn("THREE.Vector3: .add() now only accepts one argument. Use .addVectors( a, b ) instead."),this.addVectors(t,e)):(this.x+=t.x,this.y+=t.y,this.z+=t.z,this)}addScalar(t){return this.x+=t,this.y+=t,this.z+=t,this}addVectors(t,e){return this.x=t.x+e.x,this.y=t.y+e.y,this.z=t.z+e.z,this}addScaledVector(t,e){return this.x+=t.x*e,this.y+=t.y*e,this.z+=t.z*e,this}sub(t,e){return e!==void 0?(console.warn("THREE.Vector3: .sub() now only accepts one argument. Use .subVectors( a, b ) instead."),this.subVectors(t,e)):(this.x-=t.x,this.y-=t.y,this.z-=t.z,this)}subScalar(t){return this.x-=t,this.y-=t,this.z-=t,this}subVectors(t,e){return this.x=t.x-e.x,this.y=t.y-e.y,this.z=t.z-e.z,this}multiply(t,e){return e!==void 0?(console.warn("THREE.Vector3: .multiply() now only accepts one argument. Use .multiplyVectors( a, b ) instead."),this.multiplyVectors(t,e)):(this.x*=t.x,this.y*=t.y,this.z*=t.z,this)}multiplyScalar(t){return this.x*=t,this.y*=t,this.z*=t,this}multiplyVectors(t,e){return this.x=t.x*e.x,this.y=t.y*e.y,this.z=t.z*e.z,this}applyEuler(t){return t&&t.isEuler||console.error("THREE.Vector3: .applyEuler() now expects an Euler rotation rather than a Vector3 and order."),this.applyQuaternion($z.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion($z.setFromAxisAngle(t,e))}applyMatrix3(t){let e=this.x,n=this.y,r=this.z,o=t.elements;return this.x=o[0]*e+o[3]*n+o[6]*r,this.y=o[1]*e+o[4]*n+o[7]*r,this.z=o[2]*e+o[5]*n+o[8]*r,this}applyNormalMatrix(t){return this.applyMatrix3(t).normalize()}applyMatrix4(t){let e=this.x,n=this.y,r=this.z,o=t.elements,s=1/(o[3]*e+o[7]*n+o[11]*r+o[15]);return this.x=(o[0]*e+o[4]*n+o[8]*r+o[12])*s,this.y=(o[1]*e+o[5]*n+o[9]*r+o[13])*s,this.z=(o[2]*e+o[6]*n+o[10]*r+o[14])*s,this}applyQuaternion(t){let e=this.x,n=this.y,r=this.z,o=t.x,s=t.y,a=t.z,l=t.w,c=l*e+s*r-a*n,d=l*n+a*e-o*r,u=l*r+o*n-s*e,h=-o*e-s*n-a*r;return this.x=c*l+h*-o+d*-a-u*-s,this.y=d*l+h*-s+u*-o-c*-a,this.z=u*l+h*-a+c*-s-d*-o,this}project(t){return this.applyMatrix4(t.matrixWorldInverse).applyMatrix4(t.projectionMatrix)}unproject(t){return this.applyMatrix4(t.projectionMatrixInverse).applyMatrix4(t.matrixWorld)}transformDirection(t){let e=this.x,n=this.y,r=this.z,o=t.elements;return this.x=o[0]*e+o[4]*n+o[8]*r,this.y=o[1]*e+o[5]*n+o[9]*r,this.z=o[2]*e+o[6]*n+o[10]*r,this.normalize()}divide(t){return this.x/=t.x,this.y/=t.y,this.z/=t.z,this}divideScalar(t){return this.multiplyScalar(1/t)}min(t){return this.x=Math.min(this.x,t.x),this.y=Math.min(this.y,t.y),this.z=Math.min(this.z,t.z),this}max(t){return this.x=Math.max(this.x,t.x),this.y=Math.max(this.y,t.y),this.z=Math.max(this.z,t.z),this}clamp(t,e){return this.x=Math.max(t.x,Math.min(e.x,this.x)),this.y=Math.max(t.y,Math.min(e.y,this.y)),this.z=Math.max(t.z,Math.min(e.z,this.z)),this}clampScalar(t,e){return this.x=Math.max(t,Math.min(e,this.x)),this.y=Math.max(t,Math.min(e,this.y)),this.z=Math.max(t,Math.min(e,this.z)),this}clampLength(t,e){let n=this.length();return this.divideScalar(n||1).multiplyScalar(Math.max(t,Math.min(e,n)))}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=this.x<0?Math.ceil(this.x):Math.floor(this.x),this.y=this.y<0?Math.ceil(this.y):Math.floor(this.y),this.z=this.z<0?Math.ceil(this.z):Math.floor(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(t){return this.x*t.x+this.y*t.y+this.z*t.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(t){return this.normalize().multiplyScalar(t)}lerp(t,e){return this.x+=(t.x-this.x)*e,this.y+=(t.y-this.y)*e,this.z+=(t.z-this.z)*e,this}lerpVectors(t,e,n){return this.x=t.x+(e.x-t.x)*n,this.y=t.y+(e.y-t.y)*n,this.z=t.z+(e.z-t.z)*n,this}cross(t,e){return e!==void 0?(console.warn("THREE.Vector3: .cross() now only accepts one argument. Use .crossVectors( a, b ) instead."),this.crossVectors(t,e)):this.crossVectors(this,t)}crossVectors(t,e){let n=t.x,r=t.y,o=t.z,s=e.x,a=e.y,l=e.z;return this.x=r*l-o*a,this.y=o*s-n*l,this.z=n*a-r*s,this}projectOnVector(t){let e=t.lengthSq();if(e===0)return this.set(0,0,0);let n=t.dot(this)/e;return this.copy(t).multiplyScalar(n)}projectOnPlane(t){return RD.copy(this).projectOnVector(t),this.sub(RD)}reflect(t){return this.sub(RD.copy(t).multiplyScalar(2*this.dot(t)))}angleTo(t){let e=Math.sqrt(this.lengthSq()*t.lengthSq());if(e===0)return Math.PI/2;let n=this.dot(t)/e;return Math.acos(cr(n,-1,1))}distanceTo(t){return Math.sqrt(this.distanceToSquared(t))}distanceToSquared(t){let e=this.x-t.x,n=this.y-t.y,r=this.z-t.z;return e*e+n*n+r*r}manhattanDistanceTo(t){return Math.abs(this.x-t.x)+Math.abs(this.y-t.y)+Math.abs(this.z-t.z)}setFromSpherical(t){return this.setFromSphericalCoords(t.radius,t.phi,t.theta)}setFromSphericalCoords(t,e,n){let r=Math.sin(e)*t;return this.x=r*Math.sin(n),this.y=Math.cos(e)*t,this.z=r*Math.cos(n),this}setFromCylindrical(t){return this.setFromCylindricalCoords(t.radius,t.theta,t.y)}setFromCylindricalCoords(t,e,n){return this.x=t*Math.sin(e),this.y=n,this.z=t*Math.cos(e),this}setFromMatrixPosition(t){let e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this}setFromMatrixScale(t){let e=this.setFromMatrixColumn(t,0).length(),n=this.setFromMatrixColumn(t,1).length(),r=this.setFromMatrixColumn(t,2).length();return this.x=e,this.y=n,this.z=r,this}setFromMatrixColumn(t,e){return this.fromArray(t.elements,e*4)}setFromMatrix3Column(t,e){return this.fromArray(t.elements,e*3)}equals(t){return t.x===this.x&&t.y===this.y&&t.z===this.z}fromArray(t,e=0){return this.x=t[e],this.y=t[e+1],this.z=t[e+2],this}toArray(t=[],e=0){return t[e]=this.x,t[e+1]=this.y,t[e+2]=this.z,t}fromBufferAttribute(t,e,n){return n!==void 0&&console.warn("THREE.Vector3: offset has been removed from .fromBufferAttribute()."),this.x=t.getX(e),this.y=t.getY(e),this.z=t.getZ(e),this}random(){return this.x=Math.random(),this.y=Math.random(),this.z=Math.random(),this}randomDirection(){let t=(Math.random()-.5)*2,e=Math.random()*Math.PI*2,n=Math.sqrt(1-t**2);return this.x=n*Math.cos(e),this.y=n*Math.sin(e),this.z=t,this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}};P.prototype.isVector3=!0;var RD=new P,$z=new Gi,Qr=class{constructor(t=new P(1/0,1/0,1/0),e=new P(-1/0,-1/0,-1/0)){this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){let e=1/0,n=1/0,r=1/0,o=-1/0,s=-1/0,a=-1/0;for(let l=0,c=t.length;lo&&(o=d),u>s&&(s=u),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(o,s,a),this}setFromBufferAttribute(t){let e=1/0,n=1/0,r=1/0,o=-1/0,s=-1/0,a=-1/0;for(let l=0,c=t.count;lo&&(o=d),u>s&&(s=u),h>a&&(a=h)}return this.min.set(e,n,r),this.max.set(o,s,a),this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;ethis.max.x||t.ythis.max.y||t.zthis.max.z)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y&&this.min.z<=t.min.z&&t.max.z<=this.max.z}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y),(t.z-this.min.z)/(this.max.z-this.min.z))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y||t.max.zthis.max.z)}intersectsSphere(t){return this.clampPoint(t.center,Eg),Eg.distanceToSquared(t.center)<=t.radius*t.radius}intersectsPlane(t){let e,n;return t.normal.x>0?(e=t.normal.x*this.min.x,n=t.normal.x*this.max.x):(e=t.normal.x*this.max.x,n=t.normal.x*this.min.x),t.normal.y>0?(e+=t.normal.y*this.min.y,n+=t.normal.y*this.max.y):(e+=t.normal.y*this.max.y,n+=t.normal.y*this.min.y),t.normal.z>0?(e+=t.normal.z*this.min.z,n+=t.normal.z*this.max.z):(e+=t.normal.z*this.max.z,n+=t.normal.z*this.min.z),e<=-t.constant&&n>=-t.constant}intersectsTriangle(t){if(this.isEmpty())return!1;this.getCenter(Ig),Tx.subVectors(this.max,Ig),rp.subVectors(t.a,Ig),op.subVectors(t.b,Ig),sp.subVectors(t.c,Ig),Kl.subVectors(op,rp),Jl.subVectors(sp,op),Vd.subVectors(rp,sp);let e=[0,-Kl.z,Kl.y,0,-Jl.z,Jl.y,0,-Vd.z,Vd.y,Kl.z,0,-Kl.x,Jl.z,0,-Jl.x,Vd.z,0,-Vd.x,-Kl.y,Kl.x,0,-Jl.y,Jl.x,0,-Vd.y,Vd.x,0];return!ND(e,rp,op,sp,Tx)||(e=[1,0,0,0,1,0,0,0,1],!ND(e,rp,op,sp,Tx))?!1:(Dx.crossVectors(Kl,Jl),e=[Dx.x,Dx.y,Dx.z],ND(e,rp,op,sp,Tx))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return Eg.copy(t).clamp(this.min,this.max).sub(t).length()}getBoundingSphere(t){return this.getCenter(t.center),t.radius=this.getSize(Eg).length()*.5,t}intersect(t){return this.min.max(t.min),this.max.min(t.max),this.isEmpty()&&this.makeEmpty(),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}applyMatrix4(t){return this.isEmpty()?this:(Wa[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Wa[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Wa[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Wa[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Wa[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Wa[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Wa[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Wa[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Wa),this)}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}};Qr.prototype.isBox3=!0;var Wa=[new P,new P,new P,new P,new P,new P,new P,new P],Eg=new P,AD=new Qr,rp=new P,op=new P,sp=new P,Kl=new P,Jl=new P,Vd=new P,Ig=new P,Tx=new P,Dx=new P,zd=new P;function ND(i,t,e,n,r){for(let o=0,s=i.length-3;o<=s;o+=3){zd.fromArray(i,o);let a=r.x*Math.abs(zd.x)+r.y*Math.abs(zd.y)+r.z*Math.abs(zd.z),l=t.dot(zd),c=e.dot(zd),d=n.dot(zd);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>a)return!1}return!0}var Uie=new Qr,qz=new P,kD=new P,LD=new P,oa=class{constructor(t=new P,e=-1){this.center=t,this.radius=e}set(t,e){return this.center.copy(t),this.radius=e,this}setFromPoints(t,e){let n=this.center;e!==void 0?n.copy(e):Uie.setFromPoints(t).getCenter(n);let r=0;for(let o=0,s=t.length;othis.radius*this.radius&&(e.sub(this.center).normalize(),e.multiplyScalar(this.radius).add(this.center)),e}getBoundingBox(t){return this.isEmpty()?(t.makeEmpty(),t):(t.set(this.center,this.center),t.expandByScalar(this.radius),t)}applyMatrix4(t){return this.center.applyMatrix4(t),this.radius=this.radius*t.getMaxScaleOnAxis(),this}translate(t){return this.center.add(t),this}expandByPoint(t){LD.subVectors(t,this.center);let e=LD.lengthSq();if(e>this.radius*this.radius){let n=Math.sqrt(e),r=(n-this.radius)*.5;this.center.add(LD.multiplyScalar(r/n)),this.radius+=r}return this}union(t){return kD.subVectors(t.center,this.center).normalize().multiplyScalar(t.radius),this.expandByPoint(qz.copy(t.center).add(kD)),this.expandByPoint(qz.copy(t.center).sub(kD)),this}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}},$a=new P,FD=new P,Ox=new P,ec=new P,BD=new P,Px=new P,VD=new P,sa=class{constructor(t=new P,e=new P(0,0,-1)){this.origin=t,this.direction=e}set(t,e){return this.origin.copy(t),this.direction.copy(e),this}copy(t){return this.origin.copy(t.origin),this.direction.copy(t.direction),this}at(t,e){return e.copy(this.direction).multiplyScalar(t).add(this.origin)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,$a)),this}closestPointToPoint(t,e){e.subVectors(t,this.origin);let n=e.dot(this.direction);return n<0?e.copy(this.origin):e.copy(this.direction).multiplyScalar(n).add(this.origin)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){let e=$a.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):($a.copy(this.direction).multiplyScalar(e).add(this.origin),$a.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){FD.copy(t).add(e).multiplyScalar(.5),Ox.copy(e).sub(t).normalize(),ec.copy(this.origin).sub(FD);let o=t.distanceTo(e)*.5,s=-this.direction.dot(Ox),a=ec.dot(this.direction),l=-ec.dot(Ox),c=ec.lengthSq(),d=Math.abs(1-s*s),u,h,p,f;if(d>0)if(u=s*l-a,h=s*a-l,f=o*d,u>=0)if(h>=-f)if(h<=f){let m=1/d;u*=m,h*=m,p=u*(u+s*h+2*a)+h*(s*u+h+2*l)+c}else h=o,u=Math.max(0,-(s*h+a)),p=-u*u+h*(h+2*l)+c;else h=-o,u=Math.max(0,-(s*h+a)),p=-u*u+h*(h+2*l)+c;else h<=-f?(u=Math.max(0,-(-s*o+a)),h=u>0?-o:Math.min(Math.max(-o,-l),o),p=-u*u+h*(h+2*l)+c):h<=f?(u=0,h=Math.min(Math.max(-o,-l),o),p=h*(h+2*l)+c):(u=Math.max(0,-(s*o+a)),h=u>0?o:Math.min(Math.max(-o,-l),o),p=-u*u+h*(h+2*l)+c);else h=s>0?-o:o,u=Math.max(0,-(s*h+a)),p=-u*u+h*(h+2*l)+c;return n&&n.copy(this.direction).multiplyScalar(u).add(this.origin),r&&r.copy(Ox).multiplyScalar(h).add(FD),p}intersectSphere(t,e){$a.subVectors(t.center,this.origin);let n=$a.dot(this.direction),r=$a.dot($a)-n*n,o=t.radius*t.radius;if(r>o)return null;let s=Math.sqrt(o-r),a=n-s,l=n+s;return a<0&&l<0?null:a<0?this.at(l,e):this.at(a,e)}intersectsSphere(t){return this.distanceSqToPoint(t.center)<=t.radius*t.radius}distanceToPlane(t){let e=t.normal.dot(this.direction);if(e===0)return t.distanceToPoint(this.origin)===0?0:null;let n=-(this.origin.dot(t.normal)+t.constant)/e;return n>=0?n:null}intersectPlane(t,e){let n=this.distanceToPlane(t);return n===null?null:this.at(n,e)}intersectsPlane(t){let e=t.distanceToPoint(this.origin);return e===0||t.normal.dot(this.direction)*e<0}intersectBox(t,e){let n,r,o,s,a,l,c=1/this.direction.x,d=1/this.direction.y,u=1/this.direction.z,h=this.origin;return c>=0?(n=(t.min.x-h.x)*c,r=(t.max.x-h.x)*c):(n=(t.max.x-h.x)*c,r=(t.min.x-h.x)*c),d>=0?(o=(t.min.y-h.y)*d,s=(t.max.y-h.y)*d):(o=(t.max.y-h.y)*d,s=(t.min.y-h.y)*d),n>s||o>r||((o>n||n!==n)&&(n=o),(s=0?(a=(t.min.z-h.z)*u,l=(t.max.z-h.z)*u):(a=(t.max.z-h.z)*u,l=(t.min.z-h.z)*u),n>l||a>r)||((a>n||n!==n)&&(n=a),(l=0?n:r,e)}intersectsBox(t){return this.intersectBox(t,$a)!==null}intersectTriangle(t,e,n,r,o){BD.subVectors(e,t),Px.subVectors(n,t),VD.crossVectors(BD,Px);let s=this.direction.dot(VD),a;if(s>0){if(r)return null;a=1}else if(s<0)a=-1,s=-s;else return null;ec.subVectors(this.origin,t);let l=a*this.direction.dot(Px.crossVectors(ec,Px));if(l<0)return null;let c=a*this.direction.dot(BD.cross(ec));if(c<0||l+c>s)return null;let d=-a*ec.dot(VD);return d<0?null:this.at(d/s,o)}applyMatrix4(t){return this.origin.applyMatrix4(t),this.direction.transformDirection(t),this}equals(t){return t.origin.equals(this.origin)&&t.direction.equals(this.direction)}clone(){return new this.constructor().copy(this)}},ut=class i{constructor(){this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],arguments.length>0&&console.error("THREE.Matrix4: the constructor no longer reads arguments. use .set() instead.")}set(t,e,n,r,o,s,a,l,c,d,u,h,p,f,m,b){let g=this.elements;return g[0]=t,g[4]=e,g[8]=n,g[12]=r,g[1]=o,g[5]=s,g[9]=a,g[13]=l,g[2]=c,g[6]=d,g[10]=u,g[14]=h,g[3]=p,g[7]=f,g[11]=m,g[15]=b,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 i().fromArray(this.elements)}copy(t){let e=this.elements,n=t.elements;return e[0]=n[0],e[1]=n[1],e[2]=n[2],e[3]=n[3],e[4]=n[4],e[5]=n[5],e[6]=n[6],e[7]=n[7],e[8]=n[8],e[9]=n[9],e[10]=n[10],e[11]=n[11],e[12]=n[12],e[13]=n[13],e[14]=n[14],e[15]=n[15],this}copyPosition(t){let e=this.elements,n=t.elements;return e[12]=n[12],e[13]=n[13],e[14]=n[14],this}setFromMatrix3(t){let e=t.elements;return this.set(e[0],e[3],e[6],0,e[1],e[4],e[7],0,e[2],e[5],e[8],0,0,0,0,1),this}extractBasis(t,e,n){return t.setFromMatrixColumn(this,0),e.setFromMatrixColumn(this,1),n.setFromMatrixColumn(this,2),this}makeBasis(t,e,n){return this.set(t.x,e.x,n.x,0,t.y,e.y,n.y,0,t.z,e.z,n.z,0,0,0,0,1),this}extractRotation(t){let e=this.elements,n=t.elements,r=1/ap.setFromMatrixColumn(t,0).length(),o=1/ap.setFromMatrixColumn(t,1).length(),s=1/ap.setFromMatrixColumn(t,2).length();return e[0]=n[0]*r,e[1]=n[1]*r,e[2]=n[2]*r,e[3]=0,e[4]=n[4]*o,e[5]=n[5]*o,e[6]=n[6]*o,e[7]=0,e[8]=n[8]*s,e[9]=n[9]*s,e[10]=n[10]*s,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){t&&t.isEuler||console.error("THREE.Matrix4: .makeRotationFromEuler() now expects a Euler rotation rather than a Vector3 and order.");let e=this.elements,n=t.x,r=t.y,o=t.z,s=Math.cos(n),a=Math.sin(n),l=Math.cos(r),c=Math.sin(r),d=Math.cos(o),u=Math.sin(o);if(t.order==="XYZ"){let h=s*d,p=s*u,f=a*d,m=a*u;e[0]=l*d,e[4]=-l*u,e[8]=c,e[1]=p+f*c,e[5]=h-m*c,e[9]=-a*l,e[2]=m-h*c,e[6]=f+p*c,e[10]=s*l}else if(t.order==="YXZ"){let h=l*d,p=l*u,f=c*d,m=c*u;e[0]=h+m*a,e[4]=f*a-p,e[8]=s*c,e[1]=s*u,e[5]=s*d,e[9]=-a,e[2]=p*a-f,e[6]=m+h*a,e[10]=s*l}else if(t.order==="ZXY"){let h=l*d,p=l*u,f=c*d,m=c*u;e[0]=h-m*a,e[4]=-s*u,e[8]=f+p*a,e[1]=p+f*a,e[5]=s*d,e[9]=m-h*a,e[2]=-s*c,e[6]=a,e[10]=s*l}else if(t.order==="ZYX"){let h=s*d,p=s*u,f=a*d,m=a*u;e[0]=l*d,e[4]=f*c-p,e[8]=h*c+m,e[1]=l*u,e[5]=m*c+h,e[9]=p*c-f,e[2]=-c,e[6]=a*l,e[10]=s*l}else if(t.order==="YZX"){let h=s*l,p=s*c,f=a*l,m=a*c;e[0]=l*d,e[4]=m-h*u,e[8]=f*u+p,e[1]=u,e[5]=s*d,e[9]=-a*d,e[2]=-c*d,e[6]=p*u+f,e[10]=h-m*u}else if(t.order==="XZY"){let h=s*l,p=s*c,f=a*l,m=a*c;e[0]=l*d,e[4]=-u,e[8]=c*d,e[1]=h*u+m,e[5]=s*d,e[9]=p*u-f,e[2]=f*u-p,e[6]=a*d,e[10]=m*u+h}return e[3]=0,e[7]=0,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromQuaternion(t){return this.compose(Hie,t,Gie)}lookAt(t,e,n){let r=this.elements;return Io.subVectors(t,e),Io.lengthSq()===0&&(Io.z=1),Io.normalize(),tc.crossVectors(n,Io),tc.lengthSq()===0&&(Math.abs(n.z)===1?Io.x+=1e-4:Io.z+=1e-4,Io.normalize(),tc.crossVectors(n,Io)),tc.normalize(),Rx.crossVectors(Io,tc),r[0]=tc.x,r[4]=Rx.x,r[8]=Io.x,r[1]=tc.y,r[5]=Rx.y,r[9]=Io.y,r[2]=tc.z,r[6]=Rx.z,r[10]=Io.z,this}multiply(t,e){return e!==void 0?(console.warn("THREE.Matrix4: .multiply() now only accepts one argument. Use .multiplyMatrices( a, b ) instead."),this.multiplyMatrices(t,e)):this.multiplyMatrices(this,t)}premultiply(t){return this.multiplyMatrices(t,this)}multiplyMatrices(t,e){let n=t.elements,r=e.elements,o=this.elements,s=n[0],a=n[4],l=n[8],c=n[12],d=n[1],u=n[5],h=n[9],p=n[13],f=n[2],m=n[6],b=n[10],g=n[14],_=n[3],x=n[7],C=n[11],T=n[15],D=r[0],E=r[4],A=r[8],Q=r[12],F=r[1],z=r[5],O=r[9],G=r[13],$=r[2],Y=r[6],k=r[10],j=r[14],K=r[3],de=r[7],Te=r[11],Ee=r[15];return o[0]=s*D+a*F+l*$+c*K,o[4]=s*E+a*z+l*Y+c*de,o[8]=s*A+a*O+l*k+c*Te,o[12]=s*Q+a*G+l*j+c*Ee,o[1]=d*D+u*F+h*$+p*K,o[5]=d*E+u*z+h*Y+p*de,o[9]=d*A+u*O+h*k+p*Te,o[13]=d*Q+u*G+h*j+p*Ee,o[2]=f*D+m*F+b*$+g*K,o[6]=f*E+m*z+b*Y+g*de,o[10]=f*A+m*O+b*k+g*Te,o[14]=f*Q+m*G+b*j+g*Ee,o[3]=_*D+x*F+C*$+T*K,o[7]=_*E+x*z+C*Y+T*de,o[11]=_*A+x*O+C*k+T*Te,o[15]=_*Q+x*G+C*j+T*Ee,this}multiplyScalar(t){let e=this.elements;return e[0]*=t,e[4]*=t,e[8]*=t,e[12]*=t,e[1]*=t,e[5]*=t,e[9]*=t,e[13]*=t,e[2]*=t,e[6]*=t,e[10]*=t,e[14]*=t,e[3]*=t,e[7]*=t,e[11]*=t,e[15]*=t,this}determinant(){let t=this.elements,e=t[0],n=t[4],r=t[8],o=t[12],s=t[1],a=t[5],l=t[9],c=t[13],d=t[2],u=t[6],h=t[10],p=t[14],f=t[3],m=t[7],b=t[11],g=t[15];return f*(+o*l*u-r*c*u-o*a*h+n*c*h+r*a*p-n*l*p)+m*(+e*l*p-e*c*h+o*s*h-r*s*p+r*c*d-o*l*d)+b*(+e*c*u-e*a*p-o*s*u+n*s*p+o*a*d-n*c*d)+g*(-r*a*d-e*l*u+e*a*h+r*s*u-n*s*h+n*l*d)}transpose(){let t=this.elements,e;return e=t[1],t[1]=t[4],t[4]=e,e=t[2],t[2]=t[8],t[8]=e,e=t[6],t[6]=t[9],t[9]=e,e=t[3],t[3]=t[12],t[12]=e,e=t[7],t[7]=t[13],t[13]=e,e=t[11],t[11]=t[14],t[14]=e,this}setPosition(t,e,n){let r=this.elements;return t.isVector3?(r[12]=t.x,r[13]=t.y,r[14]=t.z):(r[12]=t,r[13]=e,r[14]=n),this}invert(){let t=this.elements,e=t[0],n=t[1],r=t[2],o=t[3],s=t[4],a=t[5],l=t[6],c=t[7],d=t[8],u=t[9],h=t[10],p=t[11],f=t[12],m=t[13],b=t[14],g=t[15],_=u*b*c-m*h*c+m*l*p-a*b*p-u*l*g+a*h*g,x=f*h*c-d*b*c-f*l*p+s*b*p+d*l*g-s*h*g,C=d*m*c-f*u*c+f*a*p-s*m*p-d*a*g+s*u*g,T=f*u*l-d*m*l-f*a*h+s*m*h+d*a*b-s*u*b,D=e*_+n*x+r*C+o*T;if(D===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let E=1/D;return t[0]=_*E,t[1]=(m*h*o-u*b*o-m*r*p+n*b*p+u*r*g-n*h*g)*E,t[2]=(a*b*o-m*l*o+m*r*c-n*b*c-a*r*g+n*l*g)*E,t[3]=(u*l*o-a*h*o-u*r*c+n*h*c+a*r*p-n*l*p)*E,t[4]=x*E,t[5]=(d*b*o-f*h*o+f*r*p-e*b*p-d*r*g+e*h*g)*E,t[6]=(f*l*o-s*b*o-f*r*c+e*b*c+s*r*g-e*l*g)*E,t[7]=(s*h*o-d*l*o+d*r*c-e*h*c-s*r*p+e*l*p)*E,t[8]=C*E,t[9]=(f*u*o-d*m*o-f*n*p+e*m*p+d*n*g-e*u*g)*E,t[10]=(s*m*o-f*a*o+f*n*c-e*m*c-s*n*g+e*a*g)*E,t[11]=(d*a*o-s*u*o-d*n*c+e*u*c+s*n*p-e*a*p)*E,t[12]=T*E,t[13]=(d*m*r-f*u*r+f*n*h-e*m*h-d*n*b+e*u*b)*E,t[14]=(f*a*r-s*m*r-f*n*l+e*m*l+s*n*b-e*a*b)*E,t[15]=(s*u*r-d*a*r+d*n*l-e*u*l-s*n*h+e*a*h)*E,this}scale(t){let e=this.elements,n=t.x,r=t.y,o=t.z;return e[0]*=n,e[4]*=r,e[8]*=o,e[1]*=n,e[5]*=r,e[9]*=o,e[2]*=n,e[6]*=r,e[10]*=o,e[3]*=n,e[7]*=r,e[11]*=o,this}getMaxScaleOnAxis(){let t=this.elements,e=t[0]*t[0]+t[1]*t[1]+t[2]*t[2],n=t[4]*t[4]+t[5]*t[5]+t[6]*t[6],r=t[8]*t[8]+t[9]*t[9]+t[10]*t[10];return Math.sqrt(Math.max(e,n,r))}makeTranslation(t,e,n){return this.set(1,0,0,t,0,1,0,e,0,0,1,n,0,0,0,1),this}makeRotationX(t){let e=Math.cos(t),n=Math.sin(t);return this.set(1,0,0,0,0,e,-n,0,0,n,e,0,0,0,0,1),this}makeRotationY(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,0,n,0,0,1,0,0,-n,0,e,0,0,0,0,1),this}makeRotationZ(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,0,n,e,0,0,0,0,1,0,0,0,0,1),this}makeRotationAxis(t,e){let n=Math.cos(e),r=Math.sin(e),o=1-n,s=t.x,a=t.y,l=t.z,c=o*s,d=o*a;return this.set(c*s+n,c*a-r*l,c*l+r*a,0,c*a+r*l,d*a+n,d*l-r*s,0,c*l-r*a,d*l+r*s,o*l*l+n,0,0,0,0,1),this}makeScale(t,e,n){return this.set(t,0,0,0,0,e,0,0,0,0,n,0,0,0,0,1),this}makeShear(t,e,n,r,o,s){return this.set(1,n,o,0,t,1,s,0,e,r,1,0,0,0,0,1),this}compose(t,e,n){let r=this.elements,o=e._x,s=e._y,a=e._z,l=e._w,c=o+o,d=s+s,u=a+a,h=o*c,p=o*d,f=o*u,m=s*d,b=s*u,g=a*u,_=l*c,x=l*d,C=l*u,T=n.x,D=n.y,E=n.z;return r[0]=(1-(m+g))*T,r[1]=(p+C)*T,r[2]=(f-x)*T,r[3]=0,r[4]=(p-C)*D,r[5]=(1-(h+g))*D,r[6]=(b+_)*D,r[7]=0,r[8]=(f+x)*E,r[9]=(b-_)*E,r[10]=(1-(h+m))*E,r[11]=0,r[12]=t.x,r[13]=t.y,r[14]=t.z,r[15]=1,this}decompose(t,e,n){let r=this.elements,o=ap.set(r[0],r[1],r[2]).length(),s=ap.set(r[4],r[5],r[6]).length(),a=ap.set(r[8],r[9],r[10]).length();this.determinant()<0&&(o=-o),t.x=r[12],t.y=r[13],t.z=r[14],xs.copy(this);let c=1/o,d=1/s,u=1/a;return xs.elements[0]*=c,xs.elements[1]*=c,xs.elements[2]*=c,xs.elements[4]*=d,xs.elements[5]*=d,xs.elements[6]*=d,xs.elements[8]*=u,xs.elements[9]*=u,xs.elements[10]*=u,e.setFromRotationMatrix(xs),n.x=o,n.y=s,n.z=a,this}makePerspective(t,e,n,r,o,s){s===void 0&&console.warn("THREE.Matrix4: .makePerspective() has been redefined and has a new signature. Please check the docs.");let a=this.elements,l=2*o/(e-t),c=2*o/(n-r),d=(e+t)/(e-t),u=(n+r)/(n-r),h=-(s+o)/(s-o),p=-2*s*o/(s-o);return a[0]=l,a[4]=0,a[8]=d,a[12]=0,a[1]=0,a[5]=c,a[9]=u,a[13]=0,a[2]=0,a[6]=0,a[10]=h,a[14]=p,a[3]=0,a[7]=0,a[11]=-1,a[15]=0,this}makeOrthographic(t,e,n,r,o,s){let a=this.elements,l=1/(e-t),c=1/(n-r),d=1/(s-o),u=(e+t)*l,h=(n+r)*c,p=(s+o)*d;return a[0]=2*l,a[4]=0,a[8]=0,a[12]=-u,a[1]=0,a[5]=2*c,a[9]=0,a[13]=-h,a[2]=0,a[6]=0,a[10]=-2*d,a[14]=-p,a[3]=0,a[7]=0,a[11]=0,a[15]=1,this}equals(t){let e=this.elements,n=t.elements;for(let r=0;r<16;r++)if(e[r]!==n[r])return!1;return!0}fromArray(t,e=0){for(let n=0;n<16;n++)this.elements[n]=t[n+e];return this}toArray(t=[],e=0){let n=this.elements;return t[e]=n[0],t[e+1]=n[1],t[e+2]=n[2],t[e+3]=n[3],t[e+4]=n[4],t[e+5]=n[5],t[e+6]=n[6],t[e+7]=n[7],t[e+8]=n[8],t[e+9]=n[9],t[e+10]=n[10],t[e+11]=n[11],t[e+12]=n[12],t[e+13]=n[13],t[e+14]=n[14],t[e+15]=n[15],t}};ut.prototype.isMatrix4=!0;var ap=new P,xs=new ut,Hie=new P(0,0,0),Gie=new P(1,1,1),tc=new P,Rx=new P,Io=new P,Yz=new ut,Xz=new Gi,nu=class i{constructor(t=0,e=0,n=0,r=i.DefaultOrder){this._x=t,this._y=e,this._z=n,this._order=r}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,e,n,r=this._order){return this._x=t,this._y=e,this._z=n,this._order=r,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,e=this._order,n=!0){let r=t.elements,o=r[0],s=r[4],a=r[8],l=r[1],c=r[5],d=r[9],u=r[2],h=r[6],p=r[10];switch(e){case"XYZ":this._y=Math.asin(cr(a,-1,1)),Math.abs(a)<.9999999?(this._x=Math.atan2(-d,p),this._z=Math.atan2(-s,o)):(this._x=Math.atan2(h,c),this._z=0);break;case"YXZ":this._x=Math.asin(-cr(d,-1,1)),Math.abs(d)<.9999999?(this._y=Math.atan2(a,p),this._z=Math.atan2(l,c)):(this._y=Math.atan2(-u,o),this._z=0);break;case"ZXY":this._x=Math.asin(cr(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(-u,p),this._z=Math.atan2(-s,c)):(this._y=0,this._z=Math.atan2(l,o));break;case"ZYX":this._y=Math.asin(-cr(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(h,p),this._z=Math.atan2(l,o)):(this._x=0,this._z=Math.atan2(-s,c));break;case"YZX":this._z=Math.asin(cr(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-d,c),this._y=Math.atan2(-u,o)):(this._x=0,this._y=Math.atan2(a,p));break;case"XZY":this._z=Math.asin(-cr(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(h,c),this._y=Math.atan2(a,o)):(this._x=Math.atan2(-d,p),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+e)}return this._order=e,n===!0&&this._onChangeCallback(),this}setFromQuaternion(t,e,n){return Yz.makeRotationFromQuaternion(t),this.setFromRotationMatrix(Yz,e,n)}setFromVector3(t,e=this._order){return this.set(t.x,t.y,t.z,e)}reorder(t){return Xz.setFromEuler(this),this.setFromQuaternion(Xz,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=[],e=0){return t[e]=this._x,t[e+1]=this._y,t[e+2]=this._z,t[e+3]=this._order,t}toVector3(t){return t?t.set(this._x,this._y,this._z):new P(this._x,this._y,this._z)}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}};nu.prototype.isEuler=!0;nu.DefaultOrder="XYZ";nu.RotationOrders=["XYZ","YZX","ZXY","XZY","YXZ","ZYX"];var Kg=class{constructor(){this.mask=1}set(t){this.mask=1<1){for(let e=0;e1){for(let n=0;n0){r.children=[];for(let a=0;a0){r.animations=[];for(let a=0;a0&&(n.geometries=a),l.length>0&&(n.materials=l),c.length>0&&(n.textures=c),d.length>0&&(n.images=d),u.length>0&&(n.shapes=u),h.length>0&&(n.skeletons=h),p.length>0&&(n.animations=p)}return n.object=r,n;function s(a){let l=[];for(let c in a){let d=a[c];delete d.metadata,l.push(d)}return l}}clone(t){return new this.constructor().copy(this,t)}copy(t,e=!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.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.userData=JSON.parse(JSON.stringify(t.userData)),e===!0)for(let n=0;n0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(t,e,n,r,o){ws.subVectors(r,e),Ya.subVectors(n,e),zD.subVectors(t,e);let s=ws.dot(ws),a=ws.dot(Ya),l=ws.dot(zD),c=Ya.dot(Ya),d=Ya.dot(zD),u=s*c-a*a;if(u===0)return o.set(-2,-1,-1);let h=1/u,p=(c*l-a*d)*h,f=(s*d-a*l)*h;return o.set(1-p-f,f,p)}static containsPoint(t,e,n,r){return this.getBarycoord(t,e,n,r,Xa),Xa.x>=0&&Xa.y>=0&&Xa.x+Xa.y<=1}static getUV(t,e,n,r,o,s,a,l){return this.getBarycoord(t,e,n,r,Xa),l.set(0,0),l.addScaledVector(o,Xa.x),l.addScaledVector(s,Xa.y),l.addScaledVector(a,Xa.z),l}static isFrontFacing(t,e,n,r){return ws.subVectors(n,e),Ya.subVectors(t,e),ws.cross(Ya).dot(r)<0}set(t,e,n){return this.a.copy(t),this.b.copy(e),this.c.copy(n),this}setFromPointsAndIndices(t,e,n,r){return this.a.copy(t[e]),this.b.copy(t[n]),this.c.copy(t[r]),this}setFromAttributeAndIndices(t,e,n,r){return this.a.fromBufferAttribute(t,e),this.b.fromBufferAttribute(t,n),this.c.fromBufferAttribute(t,r),this}clone(){return new this.constructor().copy(this)}copy(t){return this.a.copy(t.a),this.b.copy(t.b),this.c.copy(t.c),this}getArea(){return ws.subVectors(this.c,this.b),Ya.subVectors(this.a,this.b),ws.cross(Ya).length()*.5}getMidpoint(t){return t.addVectors(this.a,this.b).add(this.c).multiplyScalar(1/3)}getNormal(t){return i.getNormal(this.a,this.b,this.c,t)}getPlane(t){return t.setFromCoplanarPoints(this.a,this.b,this.c)}getBarycoord(t,e){return i.getBarycoord(t,this.a,this.b,this.c,e)}getUV(t,e,n,r,o){return i.getUV(t,this.a,this.b,this.c,e,n,r,o)}containsPoint(t){return i.containsPoint(t,this.a,this.b,this.c)}isFrontFacing(t){return i.isFrontFacing(this.a,this.b,this.c,t)}intersectsBox(t){return t.intersectsTriangle(this)}closestPointToPoint(t,e){let n=this.a,r=this.b,o=this.c,s,a;cp.subVectors(r,n),dp.subVectors(o,n),UD.subVectors(t,n);let l=cp.dot(UD),c=dp.dot(UD);if(l<=0&&c<=0)return e.copy(n);HD.subVectors(t,r);let d=cp.dot(HD),u=dp.dot(HD);if(d>=0&&u<=d)return e.copy(r);let h=l*u-d*c;if(h<=0&&l>=0&&d<=0)return s=l/(l-d),e.copy(n).addScaledVector(cp,s);GD.subVectors(t,o);let p=cp.dot(GD),f=dp.dot(GD);if(f>=0&&p<=f)return e.copy(o);let m=p*c-l*f;if(m<=0&&c>=0&&f<=0)return a=c/(c-f),e.copy(n).addScaledVector(dp,a);let b=d*f-p*u;if(b<=0&&u-d>=0&&p-f>=0)return tU.subVectors(o,r),a=(u-d)/(u-d+(p-f)),e.copy(r).addScaledVector(tU,a);let g=1/(b+m+h);return s=m*g,a=h*g,e.copy(n).addScaledVector(cp,s).addScaledVector(dp,a)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}},Yie=0,Ni=class extends ra{constructor(){super(),Object.defineProperty(this,"id",{value:Yie++}),this.uuid=Do(),this.name="",this.type="Material",this.fog=!0,this.blending=Mp,this.side=eu,this.vertexColors=!1,this.opacity=1,this.format=ur,this.transparent=!1,this.blendSrc=aP,this.blendDst=lP,this.blendEquation=qd,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.depthFunc=gw,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=j4,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=mw,this.stencilZFail=mw,this.stencilZPass=mw,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.visible=!0,this.toneMapped=!0,this.userData={},this.version=0,this._alphaTest=0}get alphaTest(){return this._alphaTest}set alphaTest(t){this._alphaTest>0!=t>0&&this.version++,this._alphaTest=t}onBuild(){}onBeforeRender(){}onBeforeCompile(){}customProgramCacheKey(){return this.onBeforeCompile.toString()}setValues(t){if(t!==void 0)for(let e in t){let n=t[e];if(n===void 0){console.warn("THREE.Material: '"+e+"' parameter is undefined.");continue}if(e==="shading"){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=n===sP;continue}let r=this[e];if(r===void 0){console.warn("THREE."+this.type+": '"+e+"' is not a property of this material.");continue}r&&r.isColor?r.set(n):r&&r.isVector3&&n&&n.isVector3?r.copy(n):this[e]=n}}toJSON(t){let e=t===void 0||typeof t=="string";e&&(t={textures:{},images:{}});let n={metadata:{version:4.5,type:"Material",generator:"Material.toJSON"}};n.uuid=this.uuid,n.type=this.type,this.name!==""&&(n.name=this.name),this.color&&this.color.isColor&&(n.color=this.color.getHex()),this.roughness!==void 0&&(n.roughness=this.roughness),this.metalness!==void 0&&(n.metalness=this.metalness),this.sheen!==void 0&&(n.sheen=this.sheen),this.sheenColor&&this.sheenColor.isColor&&(n.sheenColor=this.sheenColor.getHex()),this.sheenRoughness!==void 0&&(n.sheenRoughness=this.sheenRoughness),this.emissive&&this.emissive.isColor&&(n.emissive=this.emissive.getHex()),this.emissiveIntensity&&this.emissiveIntensity!==1&&(n.emissiveIntensity=this.emissiveIntensity),this.specular&&this.specular.isColor&&(n.specular=this.specular.getHex()),this.specularIntensity!==void 0&&(n.specularIntensity=this.specularIntensity),this.specularColor&&this.specularColor.isColor&&(n.specularColor=this.specularColor.getHex()),this.shininess!==void 0&&(n.shininess=this.shininess),this.clearcoat!==void 0&&(n.clearcoat=this.clearcoat),this.clearcoatRoughness!==void 0&&(n.clearcoatRoughness=this.clearcoatRoughness),this.clearcoatMap&&this.clearcoatMap.isTexture&&(n.clearcoatMap=this.clearcoatMap.toJSON(t).uuid),this.clearcoatRoughnessMap&&this.clearcoatRoughnessMap.isTexture&&(n.clearcoatRoughnessMap=this.clearcoatRoughnessMap.toJSON(t).uuid),this.clearcoatNormalMap&&this.clearcoatNormalMap.isTexture&&(n.clearcoatNormalMap=this.clearcoatNormalMap.toJSON(t).uuid,n.clearcoatNormalScale=this.clearcoatNormalScale.toArray()),this.map&&this.map.isTexture&&(n.map=this.map.toJSON(t).uuid),this.matcap&&this.matcap.isTexture&&(n.matcap=this.matcap.toJSON(t).uuid),this.alphaMap&&this.alphaMap.isTexture&&(n.alphaMap=this.alphaMap.toJSON(t).uuid),this.lightMap&&this.lightMap.isTexture&&(n.lightMap=this.lightMap.toJSON(t).uuid,n.lightMapIntensity=this.lightMapIntensity),this.aoMap&&this.aoMap.isTexture&&(n.aoMap=this.aoMap.toJSON(t).uuid,n.aoMapIntensity=this.aoMapIntensity),this.bumpMap&&this.bumpMap.isTexture&&(n.bumpMap=this.bumpMap.toJSON(t).uuid,n.bumpScale=this.bumpScale),this.normalMap&&this.normalMap.isTexture&&(n.normalMap=this.normalMap.toJSON(t).uuid,n.normalMapType=this.normalMapType,n.normalScale=this.normalScale.toArray()),this.displacementMap&&this.displacementMap.isTexture&&(n.displacementMap=this.displacementMap.toJSON(t).uuid,n.displacementScale=this.displacementScale,n.displacementBias=this.displacementBias),this.roughnessMap&&this.roughnessMap.isTexture&&(n.roughnessMap=this.roughnessMap.toJSON(t).uuid),this.metalnessMap&&this.metalnessMap.isTexture&&(n.metalnessMap=this.metalnessMap.toJSON(t).uuid),this.emissiveMap&&this.emissiveMap.isTexture&&(n.emissiveMap=this.emissiveMap.toJSON(t).uuid),this.specularMap&&this.specularMap.isTexture&&(n.specularMap=this.specularMap.toJSON(t).uuid),this.specularIntensityMap&&this.specularIntensityMap.isTexture&&(n.specularIntensityMap=this.specularIntensityMap.toJSON(t).uuid),this.specularColorMap&&this.specularColorMap.isTexture&&(n.specularColorMap=this.specularColorMap.toJSON(t).uuid),this.envMap&&this.envMap.isTexture&&(n.envMap=this.envMap.toJSON(t).uuid,this.combine!==void 0&&(n.combine=this.combine)),this.envMapIntensity!==void 0&&(n.envMapIntensity=this.envMapIntensity),this.reflectivity!==void 0&&(n.reflectivity=this.reflectivity),this.refractionRatio!==void 0&&(n.refractionRatio=this.refractionRatio),this.gradientMap&&this.gradientMap.isTexture&&(n.gradientMap=this.gradientMap.toJSON(t).uuid),this.transmission!==void 0&&(n.transmission=this.transmission),this.transmissionMap&&this.transmissionMap.isTexture&&(n.transmissionMap=this.transmissionMap.toJSON(t).uuid),this.thickness!==void 0&&(n.thickness=this.thickness),this.thicknessMap&&this.thicknessMap.isTexture&&(n.thicknessMap=this.thicknessMap.toJSON(t).uuid),this.attenuationDistance!==void 0&&(n.attenuationDistance=this.attenuationDistance),this.attenuationColor!==void 0&&(n.attenuationColor=this.attenuationColor.getHex()),this.size!==void 0&&(n.size=this.size),this.shadowSide!==null&&(n.shadowSide=this.shadowSide),this.sizeAttenuation!==void 0&&(n.sizeAttenuation=this.sizeAttenuation),this.blending!==Mp&&(n.blending=this.blending),this.side!==eu&&(n.side=this.side),this.vertexColors&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.format!==ur&&(n.format=this.format),this.transparent===!0&&(n.transparent=this.transparent),n.depthFunc=this.depthFunc,n.depthTest=this.depthTest,n.depthWrite=this.depthWrite,n.colorWrite=this.colorWrite,n.stencilWrite=this.stencilWrite,n.stencilWriteMask=this.stencilWriteMask,n.stencilFunc=this.stencilFunc,n.stencilRef=this.stencilRef,n.stencilFuncMask=this.stencilFuncMask,n.stencilFail=this.stencilFail,n.stencilZFail=this.stencilZFail,n.stencilZPass=this.stencilZPass,this.rotation&&this.rotation!==0&&(n.rotation=this.rotation),this.polygonOffset===!0&&(n.polygonOffset=!0),this.polygonOffsetFactor!==0&&(n.polygonOffsetFactor=this.polygonOffsetFactor),this.polygonOffsetUnits!==0&&(n.polygonOffsetUnits=this.polygonOffsetUnits),this.linewidth&&this.linewidth!==1&&(n.linewidth=this.linewidth),this.dashSize!==void 0&&(n.dashSize=this.dashSize),this.gapSize!==void 0&&(n.gapSize=this.gapSize),this.scale!==void 0&&(n.scale=this.scale),this.dithering===!0&&(n.dithering=!0),this.alphaTest>0&&(n.alphaTest=this.alphaTest),this.alphaToCoverage===!0&&(n.alphaToCoverage=this.alphaToCoverage),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=this.premultipliedAlpha),this.wireframe===!0&&(n.wireframe=this.wireframe),this.wireframeLinewidth>1&&(n.wireframeLinewidth=this.wireframeLinewidth),this.wireframeLinecap!=="round"&&(n.wireframeLinecap=this.wireframeLinecap),this.wireframeLinejoin!=="round"&&(n.wireframeLinejoin=this.wireframeLinejoin),this.flatShading===!0&&(n.flatShading=this.flatShading),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),JSON.stringify(this.userData)!=="{}"&&(n.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(e){let o=r(t.textures),s=r(t.images);o.length>0&&(n.textures=o),s.length>0&&(n.images=s)}return n}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.fog=t.fog,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,this.format=t.format,this.transparent=t.transparent,this.blendSrc=t.blendSrc,this.blendDst=t.blendDst,this.blendEquation=t.blendEquation,this.blendSrcAlpha=t.blendSrcAlpha,this.blendDstAlpha=t.blendDstAlpha,this.blendEquationAlpha=t.blendEquationAlpha,this.depthFunc=t.depthFunc,this.depthTest=t.depthTest,this.depthWrite=t.depthWrite,this.stencilWriteMask=t.stencilWriteMask,this.stencilFunc=t.stencilFunc,this.stencilRef=t.stencilRef,this.stencilFuncMask=t.stencilFuncMask,this.stencilFail=t.stencilFail,this.stencilZFail=t.stencilZFail,this.stencilZPass=t.stencilZPass,this.stencilWrite=t.stencilWrite;let e=t.clippingPlanes,n=null;if(e!==null){let r=e.length;n=new Array(r);for(let o=0;o!==r;++o)n[o]=e[o].clone()}return this.clippingPlanes=n,this.clipIntersection=t.clipIntersection,this.clipShadows=t.clipShadows,this.shadowSide=t.shadowSide,this.colorWrite=t.colorWrite,this.precision=t.precision,this.polygonOffset=t.polygonOffset,this.polygonOffsetFactor=t.polygonOffsetFactor,this.polygonOffsetUnits=t.polygonOffsetUnits,this.dithering=t.dithering,this.alphaTest=t.alphaTest,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.visible=t.visible,this.toneMapped=t.toneMapped,this.userData=JSON.parse(JSON.stringify(t.userData)),this}dispose(){this.dispatchEvent({type:"dispose"})}set needsUpdate(t){t===!0&&this.version++}};Ni.prototype.isMaterial=!0;var nU={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},Cs={h:0,s:0,l:0},Nx={h:0,s:0,l:0};function jD(i,t,e){return e<0&&(e+=1),e>1&&(e-=1),e<1/6?i+(t-i)*6*e:e<1/2?t:e<2/3?i+(t-i)*6*(2/3-e):i}function WD(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function $D(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}var Xe=(()=>{class i{constructor(e,n,r){return n===void 0&&r===void 0?this.set(e):this.setRGB(e,n,r)}set(e){return e&&e.isColor?this.copy(e):typeof e=="number"?this.setHex(e):typeof e=="string"&&this.setStyle(e),this}setScalar(e){return this.r=e,this.g=e,this.b=e,this}setHex(e){return e=Math.floor(e),this.r=(e>>16&255)/255,this.g=(e>>8&255)/255,this.b=(e&255)/255,this}setRGB(e,n,r){return this.r=e,this.g=n,this.b=r,this}setHSL(e,n,r){if(e=fP(e,1),n=cr(n,0,1),r=cr(r,0,1),n===0)this.r=this.g=this.b=r;else{let o=r<=.5?r*(1+n):r+n-r*n,s=2*r-o;this.r=jD(s,o,e+1/3),this.g=jD(s,o,e),this.b=jD(s,o,e-1/3)}return this}setStyle(e){function n(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+e+" will be ignored.")}let r;if(r=/^((?:rgb|hsl)a?)\(([^\)]*)\)/.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 this.r=Math.min(255,parseInt(o[1],10))/255,this.g=Math.min(255,parseInt(o[2],10))/255,this.b=Math.min(255,parseInt(o[3],10))/255,n(o[4]),this;if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a))return this.r=Math.min(100,parseInt(o[1],10))/100,this.g=Math.min(100,parseInt(o[2],10))/100,this.b=Math.min(100,parseInt(o[3],10))/100,n(o[4]),this;break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(a)){let l=parseFloat(o[1])/360,c=parseInt(o[2],10)/100,d=parseInt(o[3],10)/100;return n(o[4]),this.setHSL(l,c,d)}break}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(e)){let o=r[1],s=o.length;if(s===3)return this.r=parseInt(o.charAt(0)+o.charAt(0),16)/255,this.g=parseInt(o.charAt(1)+o.charAt(1),16)/255,this.b=parseInt(o.charAt(2)+o.charAt(2),16)/255,this;if(s===6)return this.r=parseInt(o.charAt(0)+o.charAt(1),16)/255,this.g=parseInt(o.charAt(2)+o.charAt(3),16)/255,this.b=parseInt(o.charAt(4)+o.charAt(5),16)/255,this}return e&&e.length>0?this.setColorName(e):this}setColorName(e){let n=nU[e.toLowerCase()];return n!==void 0?this.setHex(n):console.warn("THREE.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}copyGammaToLinear(e,n=2){return this.r=Math.pow(e.r,n),this.g=Math.pow(e.g,n),this.b=Math.pow(e.b,n),this}copyLinearToGamma(e,n=2){let r=n>0?1/n:1;return this.r=Math.pow(e.r,r),this.g=Math.pow(e.g,r),this.b=Math.pow(e.b,r),this}convertGammaToLinear(e){return this.copyGammaToLinear(this,e),this}convertLinearToGamma(e){return this.copyLinearToGamma(this,e),this}copySRGBToLinear(e){return this.r=WD(e.r),this.g=WD(e.g),this.b=WD(e.b),this}copyLinearToSRGB(e){return this.r=$D(e.r),this.g=$D(e.g),this.b=$D(e.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(){return this.r*255<<16^this.g*255<<8^this.b*255<<0}getHexString(){return("000000"+this.getHex().toString(16)).slice(-6)}getHSL(e){let n=this.r,r=this.g,o=this.b,s=Math.max(n,r,o),a=Math.min(n,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 n:l=(r-o)/u+(r65535?Rp:Pp)(t,1):this.index=t,this}getAttribute(t){return this.attributes[t]}setAttribute(t,e){return this.attributes[t]=e,this}deleteAttribute(t){return delete this.attributes[t],this}hasAttribute(t){return this.attributes[t]!==void 0}addGroup(t,e,n=0){this.groups.push({start:t,count:e,materialIndex:n})}clearGroups(){this.groups=[]}setDrawRange(t,e){this.drawRange.start=t,this.drawRange.count=e}applyMatrix4(t){let e=this.attributes.position;e!==void 0&&(e.applyMatrix4(t),e.needsUpdate=!0);let n=this.attributes.normal;if(n!==void 0){let o=new Di().getNormalMatrix(t);n.applyNormalMatrix(o),n.needsUpdate=!0}let r=this.attributes.tangent;return r!==void 0&&(r.transformDirection(t),r.needsUpdate=!0),this.boundingBox!==null&&this.computeBoundingBox(),this.boundingSphere!==null&&this.computeBoundingSphere(),this}applyQuaternion(t){return Qo.makeRotationFromQuaternion(t),this.applyMatrix4(Qo),this}rotateX(t){return Qo.makeRotationX(t),this.applyMatrix4(Qo),this}rotateY(t){return Qo.makeRotationY(t),this.applyMatrix4(Qo),this}rotateZ(t){return Qo.makeRotationZ(t),this.applyMatrix4(Qo),this}translate(t,e,n){return Qo.makeTranslation(t,e,n),this.applyMatrix4(Qo),this}scale(t,e,n){return Qo.makeScale(t,e,n),this.applyMatrix4(Qo),this}lookAt(t){return qD.lookAt(t),qD.updateMatrix(),this.applyMatrix4(qD.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(up).negate(),this.translate(up.x,up.y,up.z),this}setFromPoints(t){let e=[];for(let n=0,r=t.length;n0&&(t.userData=this.userData),this.parameters!==void 0){let l=this.parameters;for(let c in l)l[c]!==void 0&&(t[c]=l[c]);return t}t.data={attributes:{}};let e=this.index;e!==null&&(t.data.index={type:e.array.constructor.name,array:Array.prototype.slice.call(e.array)});let n=this.attributes;for(let l in n){let c=n[l];t.data.attributes[l]=c.toJSON(t.data)}let r={},o=!1;for(let l in this.morphAttributes){let c=this.morphAttributes[l],d=[];for(let u=0,h=c.length;u0&&(r[l]=d,o=!0)}o&&(t.data.morphAttributes=r,t.data.morphTargetsRelative=this.morphTargetsRelative);let s=this.groups;s.length>0&&(t.data.groups=JSON.parse(JSON.stringify(s)));let a=this.boundingSphere;return a!==null&&(t.data.boundingSphere={center:a.center.toArray(),radius:a.radius}),t}clone(){return new this.constructor().copy(this)}copy(t){this.index=null,this.attributes={},this.morphAttributes={},this.groups=[],this.boundingBox=null,this.boundingSphere=null;let e={};this.name=t.name;let n=t.index;n!==null&&this.setIndex(n.clone(e));let r=t.attributes;for(let c in r){let d=r[c];this.setAttribute(c,d.clone(e))}let o=t.morphAttributes;for(let c in o){let d=[],u=o[c];for(let h=0,p=u.length;h0){let r=e[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=r.length;o0&&console.error("THREE.Mesh.updateMorphTargets() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}}raycast(t,e){let n=this.geometry,r=this.material,o=this.matrixWorld;if(r===void 0||(n.boundingSphere===null&&n.computeBoundingSphere(),YD.copy(n.boundingSphere),YD.applyMatrix4(o),t.ray.intersectsSphere(YD)===!1)||(iU.copy(o).invert(),hp.copy(t.ray).applyMatrix4(iU),n.boundingBox!==null&&hp.intersectsBox(n.boundingBox)===!1))return;let s;if(n.isBufferGeometry){let a=n.index,l=n.attributes.position,c=n.morphAttributes.position,d=n.morphTargetsRelative,u=n.attributes.uv,h=n.attributes.uv2,p=n.groups,f=n.drawRange;if(a!==null)if(Array.isArray(r))for(let m=0,b=p.length;me.far?null:{distance:c,point:Hx.clone(),object:i}}function Gx(i,t,e,n,r,o,s,a,l,c,d,u){nc.fromBufferAttribute(r,c),ic.fromBufferAttribute(r,d),rc.fromBufferAttribute(r,u);let h=i.morphTargetInfluences;if(o&&h){Lx.set(0,0,0),Fx.set(0,0,0),Bx.set(0,0,0);for(let f=0,m=o.length;f0?1:-1,d.push(de.x,de.y,de.z),u.push(Ge/E),u.push(1-Te/A),j+=1}}for(let Te=0;Te0&&(e.defines=this.defines),e.vertexShader=this.vertexShader,e.fragmentShader=this.fragmentShader;let n={};for(let r in this.extensions)this.extensions[r]===!0&&(n[r]=!0);return Object.keys(n).length>0&&(e.extensions=n),e}};Es.prototype.isShaderMaterial=!0;var iu=class extends pn{constructor(){super(),this.type="Camera",this.matrixWorldInverse=new ut,this.projectionMatrix=new ut,this.projectionMatrixInverse=new ut}copy(t,e){return super.copy(t,e),this.matrixWorldInverse.copy(t.matrixWorldInverse),this.projectionMatrix.copy(t.projectionMatrix),this.projectionMatrixInverse.copy(t.projectionMatrixInverse),this}getWorldDirection(t){this.updateWorldMatrix(!0,!1);let e=this.matrixWorld.elements;return t.set(-e[8],-e[9],-e[10]).normalize()}updateMatrixWorld(t){super.updateMatrixWorld(t),this.matrixWorldInverse.copy(this.matrixWorld).invert()}updateWorldMatrix(t,e){super.updateWorldMatrix(t,e),this.matrixWorldInverse.copy(this.matrixWorld).invert()}clone(){return new this.constructor().copy(this)}};iu.prototype.isCamera=!0;var Ri=class extends iu{constructor(t=50,e=1,n=.1,r=2e3){super(),this.type="PerspectiveCamera",this.fov=t,this.zoom=1,this.near=n,this.far=r,this.focus=10,this.aspect=e,this.view=null,this.filmGauge=35,this.filmOffset=0,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.fov=t.fov,this.zoom=t.zoom,this.near=t.near,this.far=t.far,this.focus=t.focus,this.aspect=t.aspect,this.view=t.view===null?null:Object.assign({},t.view),this.filmGauge=t.filmGauge,this.filmOffset=t.filmOffset,this}setFocalLength(t){let e=.5*this.getFilmHeight()/t;this.fov=Qg*2*Math.atan(e),this.updateProjectionMatrix()}getFocalLength(){let t=Math.tan(Jd*.5*this.fov);return .5*this.getFilmHeight()/t}getEffectiveFOV(){return Qg*2*Math.atan(Math.tan(Jd*.5*this.fov)/this.zoom)}getFilmWidth(){return this.filmGauge*Math.min(this.aspect,1)}getFilmHeight(){return this.filmGauge/Math.max(this.aspect,1)}setViewOffset(t,e,n,r,o,s){this.aspect=t/e,this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let t=this.near,e=t*Math.tan(Jd*.5*this.fov)/this.zoom,n=2*e,r=this.aspect*n,o=-.5*r,s=this.view;if(this.view!==null&&this.view.enabled){let l=s.fullWidth,c=s.fullHeight;o+=s.offsetX*r/l,e-=s.offsetY*n/c,r*=s.width/l,n*=s.height/c}let a=this.filmOffset;a!==0&&(o+=t*a/this.getFilmWidth()),this.projectionMatrix.makePerspective(o,o+r,e,e-n,t,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){let e=super.toJSON(t);return e.object.fov=this.fov,e.object.zoom=this.zoom,e.object.near=this.near,e.object.far=this.far,e.object.focus=this.focus,e.object.aspect=this.aspect,this.view!==null&&(e.object.view=Object.assign({},this.view)),e.object.filmGauge=this.filmGauge,e.object.filmOffset=this.filmOffset,e}};Ri.prototype.isPerspectiveCamera=!0;var pp=90,fp=1,Np=class extends pn{constructor(t,e,n){if(super(),this.type="CubeCamera",n.isWebGLCubeRenderTarget!==!0){console.error("THREE.CubeCamera: The constructor now expects an instance of WebGLCubeRenderTarget as third parameter.");return}this.renderTarget=n;let r=new Ri(pp,fp,t,e);r.layers=this.layers,r.up.set(0,-1,0),r.lookAt(new P(1,0,0)),this.add(r);let o=new Ri(pp,fp,t,e);o.layers=this.layers,o.up.set(0,-1,0),o.lookAt(new P(-1,0,0)),this.add(o);let s=new Ri(pp,fp,t,e);s.layers=this.layers,s.up.set(0,0,1),s.lookAt(new P(0,1,0)),this.add(s);let a=new Ri(pp,fp,t,e);a.layers=this.layers,a.up.set(0,0,-1),a.lookAt(new P(0,-1,0)),this.add(a);let l=new Ri(pp,fp,t,e);l.layers=this.layers,l.up.set(0,-1,0),l.lookAt(new P(0,0,1)),this.add(l);let c=new Ri(pp,fp,t,e);c.layers=this.layers,c.up.set(0,-1,0),c.lookAt(new P(0,0,-1)),this.add(c)}update(t,e){this.parent===null&&this.updateMatrixWorld();let n=this.renderTarget,[r,o,s,a,l,c]=this.children,d=t.xr.enabled,u=t.getRenderTarget();t.xr.enabled=!1;let h=n.texture.generateMipmaps;n.texture.generateMipmaps=!1,t.setRenderTarget(n,0),t.render(e,r),t.setRenderTarget(n,1),t.render(e,o),t.setRenderTarget(n,2),t.render(e,s),t.setRenderTarget(n,3),t.render(e,a),t.setRenderTarget(n,4),t.render(e,l),n.texture.generateMipmaps=h,t.setRenderTarget(n,5),t.render(e,c),t.setRenderTarget(u),t.xr.enabled=d}},dc=class extends Qi{constructor(t,e,n,r,o,s,a,l,c,d){t=t!==void 0?t:[],e=e!==void 0?e:_u,super(t,e,n,r,o,s,a,l,c,d),this.flipY=!1}get images(){return this.image}set images(t){this.image=t}};dc.prototype.isCubeTexture=!0;var kp=class extends Oo{constructor(t,e,n){Number.isInteger(e)&&(console.warn("THREE.WebGLCubeRenderTarget: constructor signature is now WebGLCubeRenderTarget( size, options )"),e=n),super(t,t,e),e=e||{},this.texture=new dc(void 0,e.mapping,e.wrapS,e.wrapT,e.magFilter,e.minFilter,e.format,e.type,e.anisotropy,e.encoding),this.texture.isRenderTargetTexture=!0,this.texture.generateMipmaps=e.generateMipmaps!==void 0?e.generateMipmaps:!1,this.texture.minFilter=e.minFilter!==void 0?e.minFilter:Hi,this.texture._needsFlipEnvMap=!1}fromEquirectangularTexture(t,e){this.texture.type=e.type,this.texture.format=ur,this.texture.encoding=e.encoding,this.texture.generateMipmaps=e.generateMipmaps,this.texture.minFilter=e.minFilter,this.texture.magFilter=e.magFilter;let n={uniforms:{tEquirect:{value:null}},vertexShader:` + + varying vec3 vWorldDirection; + + vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); + + } + + void main() { + + vWorldDirection = transformDirection( position, modelMatrix ); + + #include + #include + + } + `,fragmentShader:` + + uniform sampler2D tEquirect; + + varying vec3 vWorldDirection; + + #include + + void main() { + + vec3 direction = normalize( vWorldDirection ); + + vec2 sampleUV = equirectUv( direction ); + + gl_FragColor = texture2D( tEquirect, sampleUV ); + + } + `},r=new cc(5,5,5),o=new Es({name:"CubemapFromEquirect",uniforms:Ap(n.uniforms),vertexShader:n.vertexShader,fragmentShader:n.fragmentShader,side:Ti,blending:Ka});o.uniforms.tEquirect.value=e;let s=new yi(r,o),a=e.minFilter;return e.minFilter===yu&&(e.minFilter=Hi),new Np(1,10,this).update(t,s),e.minFilter=a,s.geometry.dispose(),s.material.dispose(),this}clear(t,e,n,r){let o=t.getRenderTarget();for(let s=0;s<6;s++)t.setRenderTarget(this,s),t.clear(e,n,r);t.setRenderTarget(o)}};kp.prototype.isWebGLCubeRenderTarget=!0;var JD=new P,Jie=new P,ere=new Di,Zo=class{constructor(t=new P(1,0,0),e=0){this.normal=t,this.constant=e}set(t,e){return this.normal.copy(t),this.constant=e,this}setComponents(t,e,n,r){return this.normal.set(t,e,n),this.constant=r,this}setFromNormalAndCoplanarPoint(t,e){return this.normal.copy(t),this.constant=-e.dot(this.normal),this}setFromCoplanarPoints(t,e,n){let r=JD.subVectors(n,e).cross(Jie.subVectors(t,e)).normalize();return this.setFromNormalAndCoplanarPoint(r,t),this}copy(t){return this.normal.copy(t.normal),this.constant=t.constant,this}normalize(){let t=1/this.normal.length();return this.normal.multiplyScalar(t),this.constant*=t,this}negate(){return this.constant*=-1,this.normal.negate(),this}distanceToPoint(t){return this.normal.dot(t)+this.constant}distanceToSphere(t){return this.distanceToPoint(t.center)-t.radius}projectPoint(t,e){return e.copy(this.normal).multiplyScalar(-this.distanceToPoint(t)).add(t)}intersectLine(t,e){let n=t.delta(JD),r=this.normal.dot(n);if(r===0)return this.distanceToPoint(t.start)===0?e.copy(t.start):null;let o=-(t.start.dot(this.normal)+this.constant)/r;return o<0||o>1?null:e.copy(n).multiplyScalar(o).add(t.start)}intersectsLine(t){let e=this.distanceToPoint(t.start),n=this.distanceToPoint(t.end);return e<0&&n>0||n<0&&e>0}intersectsBox(t){return t.intersectsPlane(this)}intersectsSphere(t){return t.intersectsPlane(this)}coplanarPoint(t){return t.copy(this.normal).multiplyScalar(-this.constant)}applyMatrix4(t,e){let n=e||ere.getNormalMatrix(t),r=this.coplanarPoint(JD).applyMatrix4(t),o=this.normal.applyMatrix3(n).normalize();return this.constant=-r.dot(o),this}translate(t){return this.constant-=t.dot(this.normal),this}equals(t){return t.normal.equals(this.normal)&&t.constant===this.constant}clone(){return new this.constructor().copy(this)}};Zo.prototype.isPlane=!0;var mp=new oa,jx=new P,ru=class{constructor(t=new Zo,e=new Zo,n=new Zo,r=new Zo,o=new Zo,s=new Zo){this.planes=[t,e,n,r,o,s]}set(t,e,n,r,o,s){let a=this.planes;return a[0].copy(t),a[1].copy(e),a[2].copy(n),a[3].copy(r),a[4].copy(o),a[5].copy(s),this}copy(t){let e=this.planes;for(let n=0;n<6;n++)e[n].copy(t.planes[n]);return this}setFromProjectionMatrix(t){let e=this.planes,n=t.elements,r=n[0],o=n[1],s=n[2],a=n[3],l=n[4],c=n[5],d=n[6],u=n[7],h=n[8],p=n[9],f=n[10],m=n[11],b=n[12],g=n[13],_=n[14],x=n[15];return e[0].setComponents(a-r,u-l,m-h,x-b).normalize(),e[1].setComponents(a+r,u+l,m+h,x+b).normalize(),e[2].setComponents(a+o,u+c,m+p,x+g).normalize(),e[3].setComponents(a-o,u-c,m-p,x-g).normalize(),e[4].setComponents(a-s,u-d,m-f,x-_).normalize(),e[5].setComponents(a+s,u+d,m+f,x+_).normalize(),this}intersectsObject(t){let e=t.geometry;return e.boundingSphere===null&&e.computeBoundingSphere(),mp.copy(e.boundingSphere).applyMatrix4(t.matrixWorld),this.intersectsSphere(mp)}intersectsSprite(t){return mp.center.set(0,0,0),mp.radius=.7071067811865476,mp.applyMatrix4(t.matrixWorld),this.intersectsSphere(mp)}intersectsSphere(t){let e=this.planes,n=t.center,r=-t.radius;for(let o=0;o<6;o++)if(e[o].distanceToPoint(n)0?t.max.x:t.min.x,jx.y=r.normal.y>0?t.max.y:t.min.y,jx.z=r.normal.z>0?t.max.z:t.min.z,r.distanceToPoint(jx)<0)return!1}return!0}containsPoint(t){let e=this.planes;for(let n=0;n<6;n++)if(e[n].distanceToPoint(t)<0)return!1;return!0}clone(){return new this.constructor().copy(this)}};function X4(){let i=null,t=!1,e=null,n=null;function r(o,s){e(o,s),n=i.requestAnimationFrame(r)}return{start:function(){t!==!0&&e!==null&&(n=i.requestAnimationFrame(r),t=!0)},stop:function(){i.cancelAnimationFrame(n),t=!1},setAnimationLoop:function(o){e=o},setContext:function(o){i=o}}}function tre(i,t){let e=t.isWebGL2,n=new WeakMap;function r(c,d){let u=c.array,h=c.usage,p=i.createBuffer();i.bindBuffer(d,p),i.bufferData(d,u,h),c.onUploadCallback();let f=5126;return u instanceof Float32Array?f=5126:u instanceof Float64Array?console.warn("THREE.WebGLAttributes: Unsupported data buffer format: Float64Array."):u instanceof Uint16Array?c.isFloat16BufferAttribute?e?f=5131:console.warn("THREE.WebGLAttributes: Usage of Float16BufferAttribute requires WebGL2."):f=5123:u instanceof Int16Array?f=5122:u instanceof Uint32Array?f=5125:u instanceof Int32Array?f=5124:u instanceof Int8Array?f=5120:(u instanceof Uint8Array||u instanceof Uint8ClampedArray)&&(f=5121),{buffer:p,type:f,bytesPerElement:u.BYTES_PER_ELEMENT,version:c.version}}function o(c,d,u){let h=d.array,p=d.updateRange;i.bindBuffer(u,c),p.count===-1?i.bufferSubData(u,0,h):(e?i.bufferSubData(u,p.offset*h.BYTES_PER_ELEMENT,h,p.offset,p.count):i.bufferSubData(u,p.offset*h.BYTES_PER_ELEMENT,h.subarray(p.offset,p.offset+p.count)),p.count=-1)}function s(c){return c.isInterleavedBufferAttribute&&(c=c.data),n.get(c)}function a(c){c.isInterleavedBufferAttribute&&(c=c.data);let d=n.get(c);d&&(i.deleteBuffer(d.buffer),n.delete(c))}function l(c,d){if(c.isGLBufferAttribute){let h=n.get(c);(!h||h.version 0.0 ) ? v : 0.5 * inversesqrt( max( 1.0 - x * x, 1e-7 ) ) - v; + return cross( v1, v2 ) * theta_sintheta; +} +vec3 LTC_Evaluate( const in vec3 N, const in vec3 V, const in vec3 P, const in mat3 mInv, const in vec3 rectCoords[ 4 ] ) { + vec3 v1 = rectCoords[ 1 ] - rectCoords[ 0 ]; + vec3 v2 = rectCoords[ 3 ] - rectCoords[ 0 ]; + vec3 lightNormal = cross( v1, v2 ); + if( dot( lightNormal, P - rectCoords[ 0 ] ) < 0.0 ) return vec3( 0.0 ); + vec3 T1, T2; + T1 = normalize( V - N * dot( V, N ) ); + T2 = - cross( N, T1 ); + mat3 mat = mInv * transposeMat3( mat3( T1, T2, N ) ); + vec3 coords[ 4 ]; + coords[ 0 ] = mat * ( rectCoords[ 0 ] - P ); + coords[ 1 ] = mat * ( rectCoords[ 1 ] - P ); + coords[ 2 ] = mat * ( rectCoords[ 2 ] - P ); + coords[ 3 ] = mat * ( rectCoords[ 3 ] - P ); + coords[ 0 ] = normalize( coords[ 0 ] ); + coords[ 1 ] = normalize( coords[ 1 ] ); + coords[ 2 ] = normalize( coords[ 2 ] ); + coords[ 3 ] = normalize( coords[ 3 ] ); + vec3 vectorFormFactor = vec3( 0.0 ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 0 ], coords[ 1 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 1 ], coords[ 2 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 2 ], coords[ 3 ] ); + vectorFormFactor += LTC_EdgeVectorFormFactor( coords[ 3 ], coords[ 0 ] ); + float result = LTC_ClippedSphereFormFactor( vectorFormFactor ); + return vec3( result ); +} +float G_BlinnPhong_Implicit( ) { + return 0.25; +} +float D_BlinnPhong( const in float shininess, const in float dotNH ) { + return RECIPROCAL_PI * ( shininess * 0.5 + 1.0 ) * pow( dotNH, shininess ); +} +vec3 BRDF_BlinnPhong( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, const in vec3 specularColor, const in float shininess ) { + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNH = saturate( dot( normal, halfDir ) ); + float dotVH = saturate( dot( viewDir, halfDir ) ); + vec3 F = F_Schlick( specularColor, 1.0, dotVH ); + float G = G_BlinnPhong_Implicit( ); + float D = D_BlinnPhong( shininess, dotNH ); + return F * ( G * D ); +} +#if defined( USE_SHEEN ) +float D_Charlie( float roughness, float dotNH ) { + float alpha = pow2( roughness ); + float invAlpha = 1.0 / alpha; + float cos2h = dotNH * dotNH; + float sin2h = max( 1.0 - cos2h, 0.0078125 ); + return ( 2.0 + invAlpha ) * pow( sin2h, invAlpha * 0.5 ) / ( 2.0 * PI ); +} +float V_Neubelt( float dotNV, float dotNL ) { + return saturate( 1.0 / ( 4.0 * ( dotNL + dotNV - dotNL * dotNV ) ) ); +} +vec3 BRDF_Sheen( const in vec3 lightDir, const in vec3 viewDir, const in vec3 normal, vec3 sheenColor, const in float sheenRoughness ) { + vec3 halfDir = normalize( lightDir + viewDir ); + float dotNL = saturate( dot( normal, lightDir ) ); + float dotNV = saturate( dot( normal, viewDir ) ); + float dotNH = saturate( dot( normal, halfDir ) ); + float D = D_Charlie( sheenRoughness, dotNH ); + float V = V_Neubelt( dotNV, dotNL ); + return sheenColor * ( D * V ); +} +#endif`,ure=`#ifdef USE_BUMPMAP + uniform sampler2D bumpMap; + uniform float bumpScale; + vec2 dHdxy_fwd() { + vec2 dSTdx = dFdx( vUv ); + vec2 dSTdy = dFdy( vUv ); + float Hll = bumpScale * texture2D( bumpMap, vUv ).x; + float dBx = bumpScale * texture2D( bumpMap, vUv + dSTdx ).x - Hll; + float dBy = bumpScale * texture2D( bumpMap, vUv + dSTdy ).x - Hll; + return vec2( dBx, dBy ); + } + vec3 perturbNormalArb( vec3 surf_pos, vec3 surf_norm, vec2 dHdxy, float faceDirection ) { + vec3 vSigmaX = vec3( dFdx( surf_pos.x ), dFdx( surf_pos.y ), dFdx( surf_pos.z ) ); + vec3 vSigmaY = vec3( dFdy( surf_pos.x ), dFdy( surf_pos.y ), dFdy( surf_pos.z ) ); + vec3 vN = surf_norm; + vec3 R1 = cross( vSigmaY, vN ); + vec3 R2 = cross( vN, vSigmaX ); + float fDet = dot( vSigmaX, R1 ) * faceDirection; + vec3 vGrad = sign( fDet ) * ( dHdxy.x * R1 + dHdxy.y * R2 ); + return normalize( abs( fDet ) * surf_norm - vGrad ); + } +#endif`,hre=`#if NUM_CLIPPING_PLANES > 0 + vec4 plane; + #pragma unroll_loop_start + for ( int i = 0; i < UNION_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + if ( dot( vClipPosition, plane.xyz ) > plane.w ) discard; + } + #pragma unroll_loop_end + #if UNION_CLIPPING_PLANES < NUM_CLIPPING_PLANES + bool clipped = true; + #pragma unroll_loop_start + for ( int i = UNION_CLIPPING_PLANES; i < NUM_CLIPPING_PLANES; i ++ ) { + plane = clippingPlanes[ i ]; + clipped = ( dot( vClipPosition, plane.xyz ) > plane.w ) && clipped; + } + #pragma unroll_loop_end + if ( clipped ) discard; + #endif +#endif`,pre=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; + uniform vec4 clippingPlanes[ NUM_CLIPPING_PLANES ]; +#endif`,fre=`#if NUM_CLIPPING_PLANES > 0 + varying vec3 vClipPosition; +#endif`,mre=`#if NUM_CLIPPING_PLANES > 0 + vClipPosition = - mvPosition.xyz; +#endif`,gre=`#if defined( USE_COLOR_ALPHA ) + diffuseColor *= vColor; +#elif defined( USE_COLOR ) + diffuseColor.rgb *= vColor; +#endif`,_re=`#if defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#elif defined( USE_COLOR ) + varying vec3 vColor; +#endif`,vre=`#if defined( USE_COLOR_ALPHA ) + varying vec4 vColor; +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) + varying vec3 vColor; +#endif`,yre=`#if defined( USE_COLOR_ALPHA ) + vColor = vec4( 1.0 ); +#elif defined( USE_COLOR ) || defined( USE_INSTANCING_COLOR ) + vColor = vec3( 1.0 ); +#endif +#ifdef USE_COLOR + vColor *= color; +#endif +#ifdef USE_INSTANCING_COLOR + vColor.xyz *= instanceColor.xyz; +#endif`,bre=`#define PI 3.141592653589793 +#define PI2 6.283185307179586 +#define PI_HALF 1.5707963267948966 +#define RECIPROCAL_PI 0.3183098861837907 +#define RECIPROCAL_PI2 0.15915494309189535 +#define EPSILON 1e-6 +#ifndef saturate +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +#define whiteComplement( a ) ( 1.0 - saturate( a ) ) +float pow2( const in float x ) { return x*x; } +float pow3( const in float x ) { return x*x*x; } +float pow4( const in float x ) { float x2 = x*x; return x2*x2; } +float max3( const in vec3 v ) { return max( max( v.x, v.y ), v.z ); } +float average( const in vec3 color ) { return dot( color, vec3( 0.3333 ) ); } +highp float rand( const in vec2 uv ) { + const highp float a = 12.9898, b = 78.233, c = 43758.5453; + highp float dt = dot( uv.xy, vec2( a,b ) ), sn = mod( dt, PI ); + return fract( sin( sn ) * c ); +} +#ifdef HIGH_PRECISION + float precisionSafeLength( vec3 v ) { return length( v ); } +#else + float precisionSafeLength( vec3 v ) { + float maxComponent = max3( abs( v ) ); + return length( v / maxComponent ) * maxComponent; + } +#endif +struct IncidentLight { + vec3 color; + vec3 direction; + bool visible; +}; +struct ReflectedLight { + vec3 directDiffuse; + vec3 directSpecular; + vec3 indirectDiffuse; + vec3 indirectSpecular; +}; +struct GeometricContext { + vec3 position; + vec3 normal; + vec3 viewDir; +#ifdef USE_CLEARCOAT + vec3 clearcoatNormal; +#endif +}; +vec3 transformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( matrix * vec4( dir, 0.0 ) ).xyz ); +} +vec3 inverseTransformDirection( in vec3 dir, in mat4 matrix ) { + return normalize( ( vec4( dir, 0.0 ) * matrix ).xyz ); +} +mat3 transposeMat3( const in mat3 m ) { + mat3 tmp; + tmp[ 0 ] = vec3( m[ 0 ].x, m[ 1 ].x, m[ 2 ].x ); + tmp[ 1 ] = vec3( m[ 0 ].y, m[ 1 ].y, m[ 2 ].y ); + tmp[ 2 ] = vec3( m[ 0 ].z, m[ 1 ].z, m[ 2 ].z ); + return tmp; +} +float linearToRelativeLuminance( const in vec3 color ) { + vec3 weights = vec3( 0.2126, 0.7152, 0.0722 ); + return dot( weights, color.rgb ); +} +bool isPerspectiveMatrix( mat4 m ) { + return m[ 2 ][ 3 ] == - 1.0; +} +vec2 equirectUv( in vec3 dir ) { + float u = atan( dir.z, dir.x ) * RECIPROCAL_PI2 + 0.5; + float v = asin( clamp( dir.y, - 1.0, 1.0 ) ) * RECIPROCAL_PI + 0.5; + return vec2( u, v ); +}`,xre=`#ifdef ENVMAP_TYPE_CUBE_UV + #define cubeUV_maxMipLevel 8.0 + #define cubeUV_minMipLevel 4.0 + #define cubeUV_maxTileSize 256.0 + #define cubeUV_minTileSize 16.0 + float getFace( vec3 direction ) { + vec3 absDirection = abs( direction ); + float face = - 1.0; + if ( absDirection.x > absDirection.z ) { + if ( absDirection.x > absDirection.y ) + face = direction.x > 0.0 ? 0.0 : 3.0; + else + face = direction.y > 0.0 ? 1.0 : 4.0; + } else { + if ( absDirection.z > absDirection.y ) + face = direction.z > 0.0 ? 2.0 : 5.0; + else + face = direction.y > 0.0 ? 1.0 : 4.0; + } + return face; + } + vec2 getUV( vec3 direction, float face ) { + vec2 uv; + if ( face == 0.0 ) { + uv = vec2( direction.z, direction.y ) / abs( direction.x ); + } else if ( face == 1.0 ) { + uv = vec2( - direction.x, - direction.z ) / abs( direction.y ); + } else if ( face == 2.0 ) { + uv = vec2( - direction.x, direction.y ) / abs( direction.z ); + } else if ( face == 3.0 ) { + uv = vec2( - direction.z, direction.y ) / abs( direction.x ); + } else if ( face == 4.0 ) { + uv = vec2( - direction.x, direction.z ) / abs( direction.y ); + } else { + uv = vec2( direction.x, direction.y ) / abs( direction.z ); + } + return 0.5 * ( uv + 1.0 ); + } + vec3 bilinearCubeUV( sampler2D envMap, vec3 direction, float mipInt ) { + float face = getFace( direction ); + float filterInt = max( cubeUV_minMipLevel - mipInt, 0.0 ); + mipInt = max( mipInt, cubeUV_minMipLevel ); + float faceSize = exp2( mipInt ); + float texelSize = 1.0 / ( 3.0 * cubeUV_maxTileSize ); + vec2 uv = getUV( direction, face ) * ( faceSize - 1.0 ); + vec2 f = fract( uv ); + uv += 0.5 - f; + if ( face > 2.0 ) { + uv.y += faceSize; + face -= 3.0; + } + uv.x += face * faceSize; + if ( mipInt < cubeUV_maxMipLevel ) { + uv.y += 2.0 * cubeUV_maxTileSize; + } + uv.y += filterInt * 2.0 * cubeUV_minTileSize; + uv.x += 3.0 * max( 0.0, cubeUV_maxTileSize - 2.0 * faceSize ); + uv *= texelSize; + vec3 tl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb; + uv.x += texelSize; + vec3 tr = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb; + uv.y += texelSize; + vec3 br = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb; + uv.x -= texelSize; + vec3 bl = envMapTexelToLinear( texture2D( envMap, uv ) ).rgb; + vec3 tm = mix( tl, tr, f.x ); + vec3 bm = mix( bl, br, f.x ); + return mix( tm, bm, f.y ); + } + #define r0 1.0 + #define v0 0.339 + #define m0 - 2.0 + #define r1 0.8 + #define v1 0.276 + #define m1 - 1.0 + #define r4 0.4 + #define v4 0.046 + #define m4 2.0 + #define r5 0.305 + #define v5 0.016 + #define m5 3.0 + #define r6 0.21 + #define v6 0.0038 + #define m6 4.0 + float roughnessToMip( float roughness ) { + float mip = 0.0; + if ( roughness >= r1 ) { + mip = ( r0 - roughness ) * ( m1 - m0 ) / ( r0 - r1 ) + m0; + } else if ( roughness >= r4 ) { + mip = ( r1 - roughness ) * ( m4 - m1 ) / ( r1 - r4 ) + m1; + } else if ( roughness >= r5 ) { + mip = ( r4 - roughness ) * ( m5 - m4 ) / ( r4 - r5 ) + m4; + } else if ( roughness >= r6 ) { + mip = ( r5 - roughness ) * ( m6 - m5 ) / ( r5 - r6 ) + m5; + } else { + mip = - 2.0 * log2( 1.16 * roughness ); } + return mip; + } + vec4 textureCubeUV( sampler2D envMap, vec3 sampleDir, float roughness ) { + float mip = clamp( roughnessToMip( roughness ), m0, cubeUV_maxMipLevel ); + float mipF = fract( mip ); + float mipInt = floor( mip ); + vec3 color0 = bilinearCubeUV( envMap, sampleDir, mipInt ); + if ( mipF == 0.0 ) { + return vec4( color0, 1.0 ); + } else { + vec3 color1 = bilinearCubeUV( envMap, sampleDir, mipInt + 1.0 ); + return vec4( mix( color0, color1, mipF ), 1.0 ); + } + } +#endif`,wre=`vec3 transformedNormal = objectNormal; +#ifdef USE_INSTANCING + mat3 m = mat3( instanceMatrix ); + transformedNormal /= vec3( dot( m[ 0 ], m[ 0 ] ), dot( m[ 1 ], m[ 1 ] ), dot( m[ 2 ], m[ 2 ] ) ); + transformedNormal = m * transformedNormal; +#endif +transformedNormal = normalMatrix * transformedNormal; +#ifdef FLIP_SIDED + transformedNormal = - transformedNormal; +#endif +#ifdef USE_TANGENT + vec3 transformedTangent = ( modelViewMatrix * vec4( objectTangent, 0.0 ) ).xyz; + #ifdef FLIP_SIDED + transformedTangent = - transformedTangent; + #endif +#endif`,Cre=`#ifdef USE_DISPLACEMENTMAP + uniform sampler2D displacementMap; + uniform float displacementScale; + uniform float displacementBias; +#endif`,Sre=`#ifdef USE_DISPLACEMENTMAP + transformed += normalize( objectNormal ) * ( texture2D( displacementMap, vUv ).x * displacementScale + displacementBias ); +#endif`,Mre=`#ifdef USE_EMISSIVEMAP + vec4 emissiveColor = texture2D( emissiveMap, vUv ); + emissiveColor.rgb = emissiveMapTexelToLinear( emissiveColor ).rgb; + totalEmissiveRadiance *= emissiveColor.rgb; +#endif`,Ere=`#ifdef USE_EMISSIVEMAP + uniform sampler2D emissiveMap; +#endif`,Ire="gl_FragColor = linearToOutputTexel( gl_FragColor );",Tre=` +vec4 LinearToLinear( in vec4 value ) { + return value; +} +vec4 GammaToLinear( in vec4 value, in float gammaFactor ) { + return vec4( pow( value.rgb, vec3( gammaFactor ) ), value.a ); +} +vec4 LinearToGamma( in vec4 value, in float gammaFactor ) { + return vec4( pow( value.rgb, vec3( 1.0 / gammaFactor ) ), value.a ); +} +vec4 sRGBToLinear( in vec4 value ) { + return vec4( mix( pow( value.rgb * 0.9478672986 + vec3( 0.0521327014 ), vec3( 2.4 ) ), value.rgb * 0.0773993808, vec3( lessThanEqual( value.rgb, vec3( 0.04045 ) ) ) ), value.a ); +} +vec4 LinearTosRGB( in vec4 value ) { + return vec4( mix( pow( value.rgb, vec3( 0.41666 ) ) * 1.055 - vec3( 0.055 ), value.rgb * 12.92, vec3( lessThanEqual( value.rgb, vec3( 0.0031308 ) ) ) ), value.a ); +} +vec4 RGBEToLinear( in vec4 value ) { + return vec4( value.rgb * exp2( value.a * 255.0 - 128.0 ), 1.0 ); +} +vec4 LinearToRGBE( in vec4 value ) { + float maxComponent = max( max( value.r, value.g ), value.b ); + float fExp = clamp( ceil( log2( maxComponent ) ), -128.0, 127.0 ); + return vec4( value.rgb / exp2( fExp ), ( fExp + 128.0 ) / 255.0 ); +} +vec4 RGBMToLinear( in vec4 value, in float maxRange ) { + return vec4( value.rgb * value.a * maxRange, 1.0 ); +} +vec4 LinearToRGBM( in vec4 value, in float maxRange ) { + float maxRGB = max( value.r, max( value.g, value.b ) ); + float M = clamp( maxRGB / maxRange, 0.0, 1.0 ); + M = ceil( M * 255.0 ) / 255.0; + return vec4( value.rgb / ( M * maxRange ), M ); +} +vec4 RGBDToLinear( in vec4 value, in float maxRange ) { + return vec4( value.rgb * ( ( maxRange / 255.0 ) / value.a ), 1.0 ); +} +vec4 LinearToRGBD( in vec4 value, in float maxRange ) { + float maxRGB = max( value.r, max( value.g, value.b ) ); + float D = max( maxRange / maxRGB, 1.0 ); + D = clamp( floor( D ) / 255.0, 0.0, 1.0 ); + return vec4( value.rgb * ( D * ( 255.0 / maxRange ) ), D ); +} +const mat3 cLogLuvM = mat3( 0.2209, 0.3390, 0.4184, 0.1138, 0.6780, 0.7319, 0.0102, 0.1130, 0.2969 ); +vec4 LinearToLogLuv( in vec4 value ) { + vec3 Xp_Y_XYZp = cLogLuvM * value.rgb; + Xp_Y_XYZp = max( Xp_Y_XYZp, vec3( 1e-6, 1e-6, 1e-6 ) ); + vec4 vResult; + vResult.xy = Xp_Y_XYZp.xy / Xp_Y_XYZp.z; + float Le = 2.0 * log2(Xp_Y_XYZp.y) + 127.0; + vResult.w = fract( Le ); + vResult.z = ( Le - ( floor( vResult.w * 255.0 ) ) / 255.0 ) / 255.0; + return vResult; +} +const mat3 cLogLuvInverseM = mat3( 6.0014, -2.7008, -1.7996, -1.3320, 3.1029, -5.7721, 0.3008, -1.0882, 5.6268 ); +vec4 LogLuvToLinear( in vec4 value ) { + float Le = value.z * 255.0 + value.w; + vec3 Xp_Y_XYZp; + Xp_Y_XYZp.y = exp2( ( Le - 127.0 ) / 2.0 ); + Xp_Y_XYZp.z = Xp_Y_XYZp.y / value.y; + Xp_Y_XYZp.x = value.x * Xp_Y_XYZp.z; + vec3 vRGB = cLogLuvInverseM * Xp_Y_XYZp.rgb; + return vec4( max( vRGB, 0.0 ), 1.0 ); +}`,Dre=`#ifdef USE_ENVMAP + #ifdef ENV_WORLDPOS + vec3 cameraToFrag; + if ( isOrthographic ) { + cameraToFrag = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + } else { + cameraToFrag = normalize( vWorldPosition - cameraPosition ); + } + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vec3 reflectVec = reflect( cameraToFrag, worldNormal ); + #else + vec3 reflectVec = refract( cameraToFrag, worldNormal, refractionRatio ); + #endif + #else + vec3 reflectVec = vReflect; + #endif + #ifdef ENVMAP_TYPE_CUBE + vec4 envColor = textureCube( envMap, vec3( flipEnvMap * reflectVec.x, reflectVec.yz ) ); + envColor = envMapTexelToLinear( envColor ); + #elif defined( ENVMAP_TYPE_CUBE_UV ) + vec4 envColor = textureCubeUV( envMap, reflectVec, 0.0 ); + #else + vec4 envColor = vec4( 0.0 ); + #endif + #ifdef ENVMAP_BLENDING_MULTIPLY + outgoingLight = mix( outgoingLight, outgoingLight * envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_MIX ) + outgoingLight = mix( outgoingLight, envColor.xyz, specularStrength * reflectivity ); + #elif defined( ENVMAP_BLENDING_ADD ) + outgoingLight += envColor.xyz * specularStrength * reflectivity; + #endif +#endif`,Ore=`#ifdef USE_ENVMAP + uniform float envMapIntensity; + uniform float flipEnvMap; + uniform int maxMipLevel; + #ifdef ENVMAP_TYPE_CUBE + uniform samplerCube envMap; + #else + uniform sampler2D envMap; + #endif + +#endif`,Pre=`#ifdef USE_ENVMAP + uniform float reflectivity; + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) || defined( PHONG ) + #define ENV_WORLDPOS + #endif + #ifdef ENV_WORLDPOS + varying vec3 vWorldPosition; + uniform float refractionRatio; + #else + varying vec3 vReflect; + #endif +#endif`,Rre=`#ifdef USE_ENVMAP + #if defined( USE_BUMPMAP ) || defined( USE_NORMALMAP ) ||defined( PHONG ) + #define ENV_WORLDPOS + #endif + #ifdef ENV_WORLDPOS + + varying vec3 vWorldPosition; + #else + varying vec3 vReflect; + uniform float refractionRatio; + #endif +#endif`,Are=`#ifdef USE_ENVMAP + #ifdef ENV_WORLDPOS + vWorldPosition = worldPosition.xyz; + #else + vec3 cameraToVertex; + if ( isOrthographic ) { + cameraToVertex = normalize( vec3( - viewMatrix[ 0 ][ 2 ], - viewMatrix[ 1 ][ 2 ], - viewMatrix[ 2 ][ 2 ] ) ); + } else { + cameraToVertex = normalize( worldPosition.xyz - cameraPosition ); + } + vec3 worldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + #ifdef ENVMAP_MODE_REFLECTION + vReflect = reflect( cameraToVertex, worldNormal ); + #else + vReflect = refract( cameraToVertex, worldNormal, refractionRatio ); + #endif + #endif +#endif`,Nre=`#ifdef USE_FOG + vFogDepth = - mvPosition.z; +#endif`,kre=`#ifdef USE_FOG + varying float vFogDepth; +#endif`,Lre=`#ifdef USE_FOG + #ifdef FOG_EXP2 + float fogFactor = 1.0 - exp( - fogDensity * fogDensity * vFogDepth * vFogDepth ); + #else + float fogFactor = smoothstep( fogNear, fogFar, vFogDepth ); + #endif + gl_FragColor.rgb = mix( gl_FragColor.rgb, fogColor, fogFactor ); +#endif`,Fre=`#ifdef USE_FOG + uniform vec3 fogColor; + varying float vFogDepth; + #ifdef FOG_EXP2 + uniform float fogDensity; + #else + uniform float fogNear; + uniform float fogFar; + #endif +#endif`,Bre=`#ifdef USE_GRADIENTMAP + uniform sampler2D gradientMap; +#endif +vec3 getGradientIrradiance( vec3 normal, vec3 lightDirection ) { + float dotNL = dot( normal, lightDirection ); + vec2 coord = vec2( dotNL * 0.5 + 0.5, 0.0 ); + #ifdef USE_GRADIENTMAP + return texture2D( gradientMap, coord ).rgb; + #else + return ( coord.x < 0.7 ) ? vec3( 0.7 ) : vec3( 1.0 ); + #endif +}`,Vre=`#ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vUv2 ); + vec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity; + #ifndef PHYSICALLY_CORRECT_LIGHTS + lightMapIrradiance *= PI; + #endif + reflectedLight.indirectDiffuse += lightMapIrradiance; +#endif`,zre=`#ifdef USE_LIGHTMAP + uniform sampler2D lightMap; + uniform float lightMapIntensity; +#endif`,Ure=`vec3 diffuse = vec3( 1.0 ); +GeometricContext geometry; +geometry.position = mvPosition.xyz; +geometry.normal = normalize( transformedNormal ); +geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( -mvPosition.xyz ); +GeometricContext backGeometry; +backGeometry.position = geometry.position; +backGeometry.normal = -geometry.normal; +backGeometry.viewDir = geometry.viewDir; +vLightFront = vec3( 0.0 ); +vIndirectFront = vec3( 0.0 ); +#ifdef DOUBLE_SIDED + vLightBack = vec3( 0.0 ); + vIndirectBack = vec3( 0.0 ); +#endif +IncidentLight directLight; +float dotNL; +vec3 directLightColor_Diffuse; +vIndirectFront += getAmbientLightIrradiance( ambientLightColor ); +vIndirectFront += getLightProbeIrradiance( lightProbe, geometry.normal ); +#ifdef DOUBLE_SIDED + vIndirectBack += getAmbientLightIrradiance( ambientLightColor ); + vIndirectBack += getLightProbeIrradiance( lightProbe, backGeometry.normal ); +#endif +#if NUM_POINT_LIGHTS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { + getPointLightInfo( pointLights[ i ], geometry, directLight ); + dotNL = dot( geometry.normal, directLight.direction ); + directLightColor_Diffuse = directLight.color; + vLightFront += saturate( dotNL ) * directLightColor_Diffuse; + #ifdef DOUBLE_SIDED + vLightBack += saturate( - dotNL ) * directLightColor_Diffuse; + #endif + } + #pragma unroll_loop_end +#endif +#if NUM_SPOT_LIGHTS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { + getSpotLightInfo( spotLights[ i ], geometry, directLight ); + dotNL = dot( geometry.normal, directLight.direction ); + directLightColor_Diffuse = directLight.color; + vLightFront += saturate( dotNL ) * directLightColor_Diffuse; + #ifdef DOUBLE_SIDED + vLightBack += saturate( - dotNL ) * directLightColor_Diffuse; + #endif + } + #pragma unroll_loop_end +#endif +#if NUM_DIR_LIGHTS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { + getDirectionalLightInfo( directionalLights[ i ], geometry, directLight ); + dotNL = dot( geometry.normal, directLight.direction ); + directLightColor_Diffuse = directLight.color; + vLightFront += saturate( dotNL ) * directLightColor_Diffuse; + #ifdef DOUBLE_SIDED + vLightBack += saturate( - dotNL ) * directLightColor_Diffuse; + #endif + } + #pragma unroll_loop_end +#endif +#if NUM_HEMI_LIGHTS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { + vIndirectFront += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal ); + #ifdef DOUBLE_SIDED + vIndirectBack += getHemisphereLightIrradiance( hemisphereLights[ i ], backGeometry.normal ); + #endif + } + #pragma unroll_loop_end +#endif`,Hre=`uniform bool receiveShadow; +uniform vec3 ambientLightColor; +uniform vec3 lightProbe[ 9 ]; +vec3 shGetIrradianceAt( in vec3 normal, in vec3 shCoefficients[ 9 ] ) { + float x = normal.x, y = normal.y, z = normal.z; + vec3 result = shCoefficients[ 0 ] * 0.886227; + result += shCoefficients[ 1 ] * 2.0 * 0.511664 * y; + result += shCoefficients[ 2 ] * 2.0 * 0.511664 * z; + result += shCoefficients[ 3 ] * 2.0 * 0.511664 * x; + result += shCoefficients[ 4 ] * 2.0 * 0.429043 * x * y; + result += shCoefficients[ 5 ] * 2.0 * 0.429043 * y * z; + result += shCoefficients[ 6 ] * ( 0.743125 * z * z - 0.247708 ); + result += shCoefficients[ 7 ] * 2.0 * 0.429043 * x * z; + result += shCoefficients[ 8 ] * 0.429043 * ( x * x - y * y ); + return result; +} +vec3 getLightProbeIrradiance( const in vec3 lightProbe[ 9 ], const in vec3 normal ) { + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + vec3 irradiance = shGetIrradianceAt( worldNormal, lightProbe ); + return irradiance; +} +vec3 getAmbientLightIrradiance( const in vec3 ambientLightColor ) { + vec3 irradiance = ambientLightColor; + return irradiance; +} +float getDistanceAttenuation( const in float lightDistance, const in float cutoffDistance, const in float decayExponent ) { + #if defined ( PHYSICALLY_CORRECT_LIGHTS ) + float distanceFalloff = 1.0 / max( pow( lightDistance, decayExponent ), 0.01 ); + if ( cutoffDistance > 0.0 ) { + distanceFalloff *= pow2( saturate( 1.0 - pow4( lightDistance / cutoffDistance ) ) ); + } + return distanceFalloff; + #else + if ( cutoffDistance > 0.0 && decayExponent > 0.0 ) { + return pow( saturate( - lightDistance / cutoffDistance + 1.0 ), decayExponent ); + } + return 1.0; + #endif +} +float getSpotAttenuation( const in float coneCosine, const in float penumbraCosine, const in float angleCosine ) { + return smoothstep( coneCosine, penumbraCosine, angleCosine ); +} +#if NUM_DIR_LIGHTS > 0 + struct DirectionalLight { + vec3 direction; + vec3 color; + }; + uniform DirectionalLight directionalLights[ NUM_DIR_LIGHTS ]; + void getDirectionalLightInfo( const in DirectionalLight directionalLight, const in GeometricContext geometry, out IncidentLight light ) { + light.color = directionalLight.color; + light.direction = directionalLight.direction; + light.visible = true; + } +#endif +#if NUM_POINT_LIGHTS > 0 + struct PointLight { + vec3 position; + vec3 color; + float distance; + float decay; + }; + uniform PointLight pointLights[ NUM_POINT_LIGHTS ]; + void getPointLightInfo( const in PointLight pointLight, const in GeometricContext geometry, out IncidentLight light ) { + vec3 lVector = pointLight.position - geometry.position; + light.direction = normalize( lVector ); + float lightDistance = length( lVector ); + light.color = pointLight.color; + light.color *= getDistanceAttenuation( lightDistance, pointLight.distance, pointLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + } +#endif +#if NUM_SPOT_LIGHTS > 0 + struct SpotLight { + vec3 position; + vec3 direction; + vec3 color; + float distance; + float decay; + float coneCos; + float penumbraCos; + }; + uniform SpotLight spotLights[ NUM_SPOT_LIGHTS ]; + void getSpotLightInfo( const in SpotLight spotLight, const in GeometricContext geometry, out IncidentLight light ) { + vec3 lVector = spotLight.position - geometry.position; + light.direction = normalize( lVector ); + float angleCos = dot( light.direction, spotLight.direction ); + float spotAttenuation = getSpotAttenuation( spotLight.coneCos, spotLight.penumbraCos, angleCos ); + if ( spotAttenuation > 0.0 ) { + float lightDistance = length( lVector ); + light.color = spotLight.color * spotAttenuation; + light.color *= getDistanceAttenuation( lightDistance, spotLight.distance, spotLight.decay ); + light.visible = ( light.color != vec3( 0.0 ) ); + } else { + light.color = vec3( 0.0 ); + light.visible = false; + } + } +#endif +#if NUM_RECT_AREA_LIGHTS > 0 + struct RectAreaLight { + vec3 color; + vec3 position; + vec3 halfWidth; + vec3 halfHeight; + }; + uniform sampler2D ltc_1; uniform sampler2D ltc_2; + uniform RectAreaLight rectAreaLights[ NUM_RECT_AREA_LIGHTS ]; +#endif +#if NUM_HEMI_LIGHTS > 0 + struct HemisphereLight { + vec3 direction; + vec3 skyColor; + vec3 groundColor; + }; + uniform HemisphereLight hemisphereLights[ NUM_HEMI_LIGHTS ]; + vec3 getHemisphereLightIrradiance( const in HemisphereLight hemiLight, const in vec3 normal ) { + float dotNL = dot( normal, hemiLight.direction ); + float hemiDiffuseWeight = 0.5 * dotNL + 0.5; + vec3 irradiance = mix( hemiLight.groundColor, hemiLight.skyColor, hemiDiffuseWeight ); + return irradiance; + } +#endif`,Gre=`#if defined( USE_ENVMAP ) + #ifdef ENVMAP_MODE_REFRACTION + uniform float refractionRatio; + #endif + vec3 getIBLIrradiance( const in vec3 normal ) { + #if defined( ENVMAP_TYPE_CUBE_UV ) + vec3 worldNormal = inverseTransformDirection( normal, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, worldNormal, 1.0 ); + return PI * envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } + vec3 getIBLRadiance( const in vec3 viewDir, const in vec3 normal, const in float roughness ) { + #if defined( ENVMAP_TYPE_CUBE_UV ) + vec3 reflectVec; + #ifdef ENVMAP_MODE_REFLECTION + reflectVec = reflect( - viewDir, normal ); + reflectVec = normalize( mix( reflectVec, normal, roughness * roughness) ); + #else + reflectVec = refract( - viewDir, normal, refractionRatio ); + #endif + reflectVec = inverseTransformDirection( reflectVec, viewMatrix ); + vec4 envMapColor = textureCubeUV( envMap, reflectVec, roughness ); + return envMapColor.rgb * envMapIntensity; + #else + return vec3( 0.0 ); + #endif + } +#endif`,jre=`ToonMaterial material; +material.diffuseColor = diffuseColor.rgb;`,Wre=`varying vec3 vViewPosition; +struct ToonMaterial { + vec3 diffuseColor; +}; +void RE_Direct_Toon( const in IncidentLight directLight, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + vec3 irradiance = getGradientIrradiance( geometry.normal, directLight.direction ) * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Toon( const in vec3 irradiance, const in GeometricContext geometry, const in ToonMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_Toon +#define RE_IndirectDiffuse RE_IndirectDiffuse_Toon +#define Material_LightProbeLOD( material ) (0)`,$re=`BlinnPhongMaterial material; +material.diffuseColor = diffuseColor.rgb; +material.specularColor = specular; +material.specularShininess = shininess; +material.specularStrength = specularStrength;`,qre=`varying vec3 vViewPosition; +struct BlinnPhongMaterial { + vec3 diffuseColor; + vec3 specularColor; + float specularShininess; + float specularStrength; +}; +void RE_Direct_BlinnPhong( const in IncidentLight directLight, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); + reflectedLight.directSpecular += irradiance * BRDF_BlinnPhong( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularShininess ) * material.specularStrength; +} +void RE_IndirectDiffuse_BlinnPhong( const in vec3 irradiance, const in GeometricContext geometry, const in BlinnPhongMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +#define RE_Direct RE_Direct_BlinnPhong +#define RE_IndirectDiffuse RE_IndirectDiffuse_BlinnPhong +#define Material_LightProbeLOD( material ) (0)`,Yre=`PhysicalMaterial material; +material.diffuseColor = diffuseColor.rgb * ( 1.0 - metalnessFactor ); +vec3 dxy = max( abs( dFdx( geometryNormal ) ), abs( dFdy( geometryNormal ) ) ); +float geometryRoughness = max( max( dxy.x, dxy.y ), dxy.z ); +material.roughness = max( roughnessFactor, 0.0525 );material.roughness += geometryRoughness; +material.roughness = min( material.roughness, 1.0 ); +#ifdef IOR + #ifdef SPECULAR + float specularIntensityFactor = specularIntensity; + vec3 specularColorFactor = specularColor; + #ifdef USE_SPECULARINTENSITYMAP + specularIntensityFactor *= texture2D( specularIntensityMap, vUv ).a; + #endif + #ifdef USE_SPECULARCOLORMAP + specularColorFactor *= specularColorMapTexelToLinear( texture2D( specularColorMap, vUv ) ).rgb; + #endif + material.specularF90 = mix( specularIntensityFactor, 1.0, metalnessFactor ); + #else + float specularIntensityFactor = 1.0; + vec3 specularColorFactor = vec3( 1.0 ); + material.specularF90 = 1.0; + #endif + material.specularColor = mix( min( pow2( ( ior - 1.0 ) / ( ior + 1.0 ) ) * specularColorFactor, vec3( 1.0 ) ) * specularIntensityFactor, diffuseColor.rgb, metalnessFactor ); +#else + material.specularColor = mix( vec3( 0.04 ), diffuseColor.rgb, metalnessFactor ); + material.specularF90 = 1.0; +#endif +#ifdef USE_CLEARCOAT + material.clearcoat = clearcoat; + material.clearcoatRoughness = clearcoatRoughness; + material.clearcoatF0 = vec3( 0.04 ); + material.clearcoatF90 = 1.0; + #ifdef USE_CLEARCOATMAP + material.clearcoat *= texture2D( clearcoatMap, vUv ).x; + #endif + #ifdef USE_CLEARCOAT_ROUGHNESSMAP + material.clearcoatRoughness *= texture2D( clearcoatRoughnessMap, vUv ).y; + #endif + material.clearcoat = saturate( material.clearcoat ); material.clearcoatRoughness = max( material.clearcoatRoughness, 0.0525 ); + material.clearcoatRoughness += geometryRoughness; + material.clearcoatRoughness = min( material.clearcoatRoughness, 1.0 ); +#endif +#ifdef USE_SHEEN + material.sheenColor = sheenColor; + #ifdef USE_SHEENCOLORMAP + material.sheenColor *= sheenColorMapTexelToLinear( texture2D( sheenColorMap, vUv ) ).rgb; + #endif + material.sheenRoughness = clamp( sheenRoughness, 0.07, 1.0 ); + #ifdef USE_SHEENROUGHNESSMAP + material.sheenRoughness *= texture2D( sheenRoughnessMap, vUv ).a; + #endif +#endif`,Xre=`struct PhysicalMaterial { + vec3 diffuseColor; + float roughness; + vec3 specularColor; + float specularF90; + #ifdef USE_CLEARCOAT + float clearcoat; + float clearcoatRoughness; + vec3 clearcoatF0; + float clearcoatF90; + #endif + #ifdef USE_SHEEN + vec3 sheenColor; + float sheenRoughness; + #endif +}; +vec3 clearcoatSpecular = vec3( 0.0 ); +vec2 DFGApprox( const in vec3 normal, const in vec3 viewDir, const in float roughness ) { + float dotNV = saturate( dot( normal, viewDir ) ); + const vec4 c0 = vec4( - 1, - 0.0275, - 0.572, 0.022 ); + const vec4 c1 = vec4( 1, 0.0425, 1.04, - 0.04 ); + vec4 r = roughness * c0 + c1; + float a004 = min( r.x * r.x, exp2( - 9.28 * dotNV ) ) * r.x + r.y; + vec2 fab = vec2( - 1.04, 1.04 ) * a004 + r.zw; + return fab; +} +vec3 EnvironmentBRDF( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness ) { + vec2 fab = DFGApprox( normal, viewDir, roughness ); + return specularColor * fab.x + specularF90 * fab.y; +} +void computeMultiscattering( const in vec3 normal, const in vec3 viewDir, const in vec3 specularColor, const in float specularF90, const in float roughness, inout vec3 singleScatter, inout vec3 multiScatter ) { + vec2 fab = DFGApprox( normal, viewDir, roughness ); + vec3 FssEss = specularColor * fab.x + specularF90 * fab.y; + float Ess = fab.x + fab.y; + float Ems = 1.0 - Ess; + vec3 Favg = specularColor + ( 1.0 - specularColor ) * 0.047619; vec3 Fms = FssEss * Favg / ( 1.0 - Ems * Favg ); + singleScatter += FssEss; + multiScatter += Fms * Ems; +} +#if NUM_RECT_AREA_LIGHTS > 0 + void RE_Direct_RectArea_Physical( const in RectAreaLight rectAreaLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + vec3 normal = geometry.normal; + vec3 viewDir = geometry.viewDir; + vec3 position = geometry.position; + vec3 lightPos = rectAreaLight.position; + vec3 halfWidth = rectAreaLight.halfWidth; + vec3 halfHeight = rectAreaLight.halfHeight; + vec3 lightColor = rectAreaLight.color; + float roughness = material.roughness; + vec3 rectCoords[ 4 ]; + rectCoords[ 0 ] = lightPos + halfWidth - halfHeight; rectCoords[ 1 ] = lightPos - halfWidth - halfHeight; + rectCoords[ 2 ] = lightPos - halfWidth + halfHeight; + rectCoords[ 3 ] = lightPos + halfWidth + halfHeight; + vec2 uv = LTC_Uv( normal, viewDir, roughness ); + vec4 t1 = texture2D( ltc_1, uv ); + vec4 t2 = texture2D( ltc_2, uv ); + mat3 mInv = mat3( + vec3( t1.x, 0, t1.y ), + vec3( 0, 1, 0 ), + vec3( t1.z, 0, t1.w ) + ); + vec3 fresnel = ( material.specularColor * t2.x + ( vec3( 1.0 ) - material.specularColor ) * t2.y ); + reflectedLight.directSpecular += lightColor * fresnel * LTC_Evaluate( normal, viewDir, position, mInv, rectCoords ); + reflectedLight.directDiffuse += lightColor * material.diffuseColor * LTC_Evaluate( normal, viewDir, position, mat3( 1.0 ), rectCoords ); + } +#endif +void RE_Direct_Physical( const in IncidentLight directLight, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + float dotNL = saturate( dot( geometry.normal, directLight.direction ) ); + vec3 irradiance = dotNL * directLight.color; + #ifdef USE_CLEARCOAT + float dotNLcc = saturate( dot( geometry.clearcoatNormal, directLight.direction ) ); + vec3 ccIrradiance = dotNLcc * directLight.color; + clearcoatSpecular += ccIrradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.clearcoatNormal, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); + #endif + #ifdef USE_SHEEN + reflectedLight.directSpecular += irradiance * BRDF_Sheen( directLight.direction, geometry.viewDir, geometry.normal, material.sheenColor, material.sheenRoughness ); + #endif + reflectedLight.directSpecular += irradiance * BRDF_GGX( directLight.direction, geometry.viewDir, geometry.normal, material.specularColor, material.specularF90, material.roughness ); + reflectedLight.directDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectDiffuse_Physical( const in vec3 irradiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight ) { + reflectedLight.indirectDiffuse += irradiance * BRDF_Lambert( material.diffuseColor ); +} +void RE_IndirectSpecular_Physical( const in vec3 radiance, const in vec3 irradiance, const in vec3 clearcoatRadiance, const in GeometricContext geometry, const in PhysicalMaterial material, inout ReflectedLight reflectedLight) { + #ifdef USE_CLEARCOAT + clearcoatSpecular += clearcoatRadiance * EnvironmentBRDF( geometry.clearcoatNormal, geometry.viewDir, material.clearcoatF0, material.clearcoatF90, material.clearcoatRoughness ); + #endif + vec3 singleScattering = vec3( 0.0 ); + vec3 multiScattering = vec3( 0.0 ); + vec3 cosineWeightedIrradiance = irradiance * RECIPROCAL_PI; + computeMultiscattering( geometry.normal, geometry.viewDir, material.specularColor, material.specularF90, material.roughness, singleScattering, multiScattering ); + vec3 diffuse = material.diffuseColor * ( 1.0 - ( singleScattering + multiScattering ) ); + reflectedLight.indirectSpecular += radiance * singleScattering; + reflectedLight.indirectSpecular += multiScattering * cosineWeightedIrradiance; + reflectedLight.indirectDiffuse += diffuse * cosineWeightedIrradiance; +} +#define RE_Direct RE_Direct_Physical +#define RE_Direct_RectArea RE_Direct_RectArea_Physical +#define RE_IndirectDiffuse RE_IndirectDiffuse_Physical +#define RE_IndirectSpecular RE_IndirectSpecular_Physical +float computeSpecularOcclusion( const in float dotNV, const in float ambientOcclusion, const in float roughness ) { + return saturate( pow( dotNV + ambientOcclusion, exp2( - 16.0 * roughness - 1.0 ) ) - 1.0 + ambientOcclusion ); +}`,Qre=` +GeometricContext geometry; +geometry.position = - vViewPosition; +geometry.normal = normal; +geometry.viewDir = ( isOrthographic ) ? vec3( 0, 0, 1 ) : normalize( vViewPosition ); +#ifdef USE_CLEARCOAT + geometry.clearcoatNormal = clearcoatNormal; +#endif +IncidentLight directLight; +#if ( NUM_POINT_LIGHTS > 0 ) && defined( RE_Direct ) + PointLight pointLight; + #if defined( USE_SHADOWMAP ) && NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHTS; i ++ ) { + pointLight = pointLights[ i ]; + getPointLightInfo( pointLight, geometry, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_POINT_LIGHT_SHADOWS ) + pointLightShadow = pointLightShadows[ i ]; + directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getPointShadow( pointShadowMap[ i ], pointLightShadow.shadowMapSize, pointLightShadow.shadowBias, pointLightShadow.shadowRadius, vPointShadowCoord[ i ], pointLightShadow.shadowCameraNear, pointLightShadow.shadowCameraFar ) : 1.0; + #endif + RE_Direct( directLight, geometry, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_SPOT_LIGHTS > 0 ) && defined( RE_Direct ) + SpotLight spotLight; + #if defined( USE_SHADOWMAP ) && NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHTS; i ++ ) { + spotLight = spotLights[ i ]; + getSpotLightInfo( spotLight, geometry, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_SPOT_LIGHT_SHADOWS ) + spotLightShadow = spotLightShadows[ i ]; + directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( spotShadowMap[ i ], spotLightShadow.shadowMapSize, spotLightShadow.shadowBias, spotLightShadow.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometry, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_DIR_LIGHTS > 0 ) && defined( RE_Direct ) + DirectionalLight directionalLight; + #if defined( USE_SHADOWMAP ) && NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLightShadow; + #endif + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHTS; i ++ ) { + directionalLight = directionalLights[ i ]; + getDirectionalLightInfo( directionalLight, geometry, directLight ); + #if defined( USE_SHADOWMAP ) && ( UNROLLED_LOOP_INDEX < NUM_DIR_LIGHT_SHADOWS ) + directionalLightShadow = directionalLightShadows[ i ]; + directLight.color *= all( bvec2( directLight.visible, receiveShadow ) ) ? getShadow( directionalShadowMap[ i ], directionalLightShadow.shadowMapSize, directionalLightShadow.shadowBias, directionalLightShadow.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + #endif + RE_Direct( directLight, geometry, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if ( NUM_RECT_AREA_LIGHTS > 0 ) && defined( RE_Direct_RectArea ) + RectAreaLight rectAreaLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_RECT_AREA_LIGHTS; i ++ ) { + rectAreaLight = rectAreaLights[ i ]; + RE_Direct_RectArea( rectAreaLight, geometry, material, reflectedLight ); + } + #pragma unroll_loop_end +#endif +#if defined( RE_IndirectDiffuse ) + vec3 iblIrradiance = vec3( 0.0 ); + vec3 irradiance = getAmbientLightIrradiance( ambientLightColor ); + irradiance += getLightProbeIrradiance( lightProbe, geometry.normal ); + #if ( NUM_HEMI_LIGHTS > 0 ) + #pragma unroll_loop_start + for ( int i = 0; i < NUM_HEMI_LIGHTS; i ++ ) { + irradiance += getHemisphereLightIrradiance( hemisphereLights[ i ], geometry.normal ); + } + #pragma unroll_loop_end + #endif +#endif +#if defined( RE_IndirectSpecular ) + vec3 radiance = vec3( 0.0 ); + vec3 clearcoatRadiance = vec3( 0.0 ); +#endif`,Zre=`#if defined( RE_IndirectDiffuse ) + #ifdef USE_LIGHTMAP + vec4 lightMapTexel = texture2D( lightMap, vUv2 ); + vec3 lightMapIrradiance = lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity; + #ifndef PHYSICALLY_CORRECT_LIGHTS + lightMapIrradiance *= PI; + #endif + irradiance += lightMapIrradiance; + #endif + #if defined( USE_ENVMAP ) && defined( STANDARD ) && defined( ENVMAP_TYPE_CUBE_UV ) + iblIrradiance += getIBLIrradiance( geometry.normal ); + #endif +#endif +#if defined( USE_ENVMAP ) && defined( RE_IndirectSpecular ) + radiance += getIBLRadiance( geometry.viewDir, geometry.normal, material.roughness ); + #ifdef USE_CLEARCOAT + clearcoatRadiance += getIBLRadiance( geometry.viewDir, geometry.clearcoatNormal, material.clearcoatRoughness ); + #endif +#endif`,Kre=`#if defined( RE_IndirectDiffuse ) + RE_IndirectDiffuse( irradiance, geometry, material, reflectedLight ); +#endif +#if defined( RE_IndirectSpecular ) + RE_IndirectSpecular( radiance, iblIrradiance, clearcoatRadiance, geometry, material, reflectedLight ); +#endif`,Jre=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) + gl_FragDepthEXT = vIsPerspective == 0.0 ? gl_FragCoord.z : log2( vFragDepth ) * logDepthBufFC * 0.5; +#endif`,eoe=`#if defined( USE_LOGDEPTHBUF ) && defined( USE_LOGDEPTHBUF_EXT ) + uniform float logDepthBufFC; + varying float vFragDepth; + varying float vIsPerspective; +#endif`,toe=`#ifdef USE_LOGDEPTHBUF + #ifdef USE_LOGDEPTHBUF_EXT + varying float vFragDepth; + varying float vIsPerspective; + #else + uniform float logDepthBufFC; + #endif +#endif`,noe=`#ifdef USE_LOGDEPTHBUF + #ifdef USE_LOGDEPTHBUF_EXT + vFragDepth = 1.0 + gl_Position.w; + vIsPerspective = float( isPerspectiveMatrix( projectionMatrix ) ); + #else + if ( isPerspectiveMatrix( projectionMatrix ) ) { + gl_Position.z = log2( max( EPSILON, gl_Position.w + 1.0 ) ) * logDepthBufFC - 1.0; + gl_Position.z *= gl_Position.w; + } + #endif +#endif`,ioe=`#ifdef USE_MAP + vec4 texelColor = texture2D( map, vUv ); + texelColor = mapTexelToLinear( texelColor ); + diffuseColor *= texelColor; +#endif`,roe=`#ifdef USE_MAP + uniform sampler2D map; +#endif`,ooe=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + vec2 uv = ( uvTransform * vec3( gl_PointCoord.x, 1.0 - gl_PointCoord.y, 1 ) ).xy; +#endif +#ifdef USE_MAP + vec4 mapTexel = texture2D( map, uv ); + diffuseColor *= mapTexelToLinear( mapTexel ); +#endif +#ifdef USE_ALPHAMAP + diffuseColor.a *= texture2D( alphaMap, uv ).g; +#endif`,soe=`#if defined( USE_MAP ) || defined( USE_ALPHAMAP ) + uniform mat3 uvTransform; +#endif +#ifdef USE_MAP + uniform sampler2D map; +#endif +#ifdef USE_ALPHAMAP + uniform sampler2D alphaMap; +#endif`,aoe=`float metalnessFactor = metalness; +#ifdef USE_METALNESSMAP + vec4 texelMetalness = texture2D( metalnessMap, vUv ); + metalnessFactor *= texelMetalness.b; +#endif`,loe=`#ifdef USE_METALNESSMAP + uniform sampler2D metalnessMap; +#endif`,coe=`#ifdef USE_MORPHNORMALS + objectNormal *= morphTargetBaseInfluence; + #ifdef MORPHTARGETS_TEXTURE + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + if ( morphTargetInfluences[ i ] > 0.0 ) objectNormal += getMorph( gl_VertexID, i, 1, 2 ) * morphTargetInfluences[ i ]; + } + #else + objectNormal += morphNormal0 * morphTargetInfluences[ 0 ]; + objectNormal += morphNormal1 * morphTargetInfluences[ 1 ]; + objectNormal += morphNormal2 * morphTargetInfluences[ 2 ]; + objectNormal += morphNormal3 * morphTargetInfluences[ 3 ]; + #endif +#endif`,doe=`#ifdef USE_MORPHTARGETS + uniform float morphTargetBaseInfluence; + #ifdef MORPHTARGETS_TEXTURE + uniform float morphTargetInfluences[ MORPHTARGETS_COUNT ]; + uniform sampler2DArray morphTargetsTexture; + uniform vec2 morphTargetsTextureSize; + vec3 getMorph( const in int vertexIndex, const in int morphTargetIndex, const in int offset, const in int stride ) { + float texelIndex = float( vertexIndex * stride + offset ); + float y = floor( texelIndex / morphTargetsTextureSize.x ); + float x = texelIndex - y * morphTargetsTextureSize.x; + vec3 morphUV = vec3( ( x + 0.5 ) / morphTargetsTextureSize.x, y / morphTargetsTextureSize.y, morphTargetIndex ); + return texture( morphTargetsTexture, morphUV ).xyz; + } + #else + #ifndef USE_MORPHNORMALS + uniform float morphTargetInfluences[ 8 ]; + #else + uniform float morphTargetInfluences[ 4 ]; + #endif + #endif +#endif`,uoe=`#ifdef USE_MORPHTARGETS + transformed *= morphTargetBaseInfluence; + #ifdef MORPHTARGETS_TEXTURE + for ( int i = 0; i < MORPHTARGETS_COUNT; i ++ ) { + #ifndef USE_MORPHNORMALS + if ( morphTargetInfluences[ i ] > 0.0 ) transformed += getMorph( gl_VertexID, i, 0, 1 ) * morphTargetInfluences[ i ]; + #else + if ( morphTargetInfluences[ i ] > 0.0 ) transformed += getMorph( gl_VertexID, i, 0, 2 ) * morphTargetInfluences[ i ]; + #endif + } + #else + transformed += morphTarget0 * morphTargetInfluences[ 0 ]; + transformed += morphTarget1 * morphTargetInfluences[ 1 ]; + transformed += morphTarget2 * morphTargetInfluences[ 2 ]; + transformed += morphTarget3 * morphTargetInfluences[ 3 ]; + #ifndef USE_MORPHNORMALS + transformed += morphTarget4 * morphTargetInfluences[ 4 ]; + transformed += morphTarget5 * morphTargetInfluences[ 5 ]; + transformed += morphTarget6 * morphTargetInfluences[ 6 ]; + transformed += morphTarget7 * morphTargetInfluences[ 7 ]; + #endif + #endif +#endif`,hoe=`float faceDirection = gl_FrontFacing ? 1.0 : - 1.0; +#ifdef FLAT_SHADED + vec3 fdx = vec3( dFdx( vViewPosition.x ), dFdx( vViewPosition.y ), dFdx( vViewPosition.z ) ); + vec3 fdy = vec3( dFdy( vViewPosition.x ), dFdy( vViewPosition.y ), dFdy( vViewPosition.z ) ); + vec3 normal = normalize( cross( fdx, fdy ) ); +#else + vec3 normal = normalize( vNormal ); + #ifdef DOUBLE_SIDED + normal = normal * faceDirection; + #endif + #ifdef USE_TANGENT + vec3 tangent = normalize( vTangent ); + vec3 bitangent = normalize( vBitangent ); + #ifdef DOUBLE_SIDED + tangent = tangent * faceDirection; + bitangent = bitangent * faceDirection; + #endif + #if defined( TANGENTSPACE_NORMALMAP ) || defined( USE_CLEARCOAT_NORMALMAP ) + mat3 vTBN = mat3( tangent, bitangent, normal ); + #endif + #endif +#endif +vec3 geometryNormal = normal;`,poe=`#ifdef OBJECTSPACE_NORMALMAP + normal = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; + #ifdef FLIP_SIDED + normal = - normal; + #endif + #ifdef DOUBLE_SIDED + normal = normal * faceDirection; + #endif + normal = normalize( normalMatrix * normal ); +#elif defined( TANGENTSPACE_NORMALMAP ) + vec3 mapN = texture2D( normalMap, vUv ).xyz * 2.0 - 1.0; + mapN.xy *= normalScale; + #ifdef USE_TANGENT + normal = normalize( vTBN * mapN ); + #else + normal = perturbNormal2Arb( - vViewPosition, normal, mapN, faceDirection ); + #endif +#elif defined( USE_BUMPMAP ) + normal = perturbNormalArb( - vViewPosition, normal, dHdxy_fwd(), faceDirection ); +#endif`,foe=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,moe=`#ifndef FLAT_SHADED + varying vec3 vNormal; + #ifdef USE_TANGENT + varying vec3 vTangent; + varying vec3 vBitangent; + #endif +#endif`,goe=`#ifndef FLAT_SHADED + vNormal = normalize( transformedNormal ); + #ifdef USE_TANGENT + vTangent = normalize( transformedTangent ); + vBitangent = normalize( cross( vNormal, vTangent ) * tangent.w ); + #endif +#endif`,_oe=`#ifdef USE_NORMALMAP + uniform sampler2D normalMap; + uniform vec2 normalScale; +#endif +#ifdef OBJECTSPACE_NORMALMAP + uniform mat3 normalMatrix; +#endif +#if ! defined ( USE_TANGENT ) && ( defined ( TANGENTSPACE_NORMALMAP ) || defined ( USE_CLEARCOAT_NORMALMAP ) ) + vec3 perturbNormal2Arb( vec3 eye_pos, vec3 surf_norm, vec3 mapN, float faceDirection ) { + vec3 q0 = vec3( dFdx( eye_pos.x ), dFdx( eye_pos.y ), dFdx( eye_pos.z ) ); + vec3 q1 = vec3( dFdy( eye_pos.x ), dFdy( eye_pos.y ), dFdy( eye_pos.z ) ); + vec2 st0 = dFdx( vUv.st ); + vec2 st1 = dFdy( vUv.st ); + vec3 N = surf_norm; + vec3 q1perp = cross( q1, N ); + vec3 q0perp = cross( N, q0 ); + vec3 T = q1perp * st0.x + q0perp * st1.x; + vec3 B = q1perp * st0.y + q0perp * st1.y; + float det = max( dot( T, T ), dot( B, B ) ); + float scale = ( det == 0.0 ) ? 0.0 : faceDirection * inversesqrt( det ); + return normalize( T * ( mapN.x * scale ) + B * ( mapN.y * scale ) + N * mapN.z ); + } +#endif`,voe=`#ifdef USE_CLEARCOAT + vec3 clearcoatNormal = geometryNormal; +#endif`,yoe=`#ifdef USE_CLEARCOAT_NORMALMAP + vec3 clearcoatMapN = texture2D( clearcoatNormalMap, vUv ).xyz * 2.0 - 1.0; + clearcoatMapN.xy *= clearcoatNormalScale; + #ifdef USE_TANGENT + clearcoatNormal = normalize( vTBN * clearcoatMapN ); + #else + clearcoatNormal = perturbNormal2Arb( - vViewPosition, clearcoatNormal, clearcoatMapN, faceDirection ); + #endif +#endif`,boe=`#ifdef USE_CLEARCOATMAP + uniform sampler2D clearcoatMap; +#endif +#ifdef USE_CLEARCOAT_ROUGHNESSMAP + uniform sampler2D clearcoatRoughnessMap; +#endif +#ifdef USE_CLEARCOAT_NORMALMAP + uniform sampler2D clearcoatNormalMap; + uniform vec2 clearcoatNormalScale; +#endif`,xoe=`#ifdef OPAQUE +diffuseColor.a = 1.0; +#endif +#ifdef USE_TRANSMISSION +diffuseColor.a *= transmissionAlpha + 0.1; +#endif +gl_FragColor = vec4( outgoingLight, diffuseColor.a );`,woe=`vec3 packNormalToRGB( const in vec3 normal ) { + return normalize( normal ) * 0.5 + 0.5; +} +vec3 unpackRGBToNormal( const in vec3 rgb ) { + return 2.0 * rgb.xyz - 1.0; +} +const float PackUpscale = 256. / 255.;const float UnpackDownscale = 255. / 256.; +const vec3 PackFactors = vec3( 256. * 256. * 256., 256. * 256., 256. ); +const vec4 UnpackFactors = UnpackDownscale / vec4( PackFactors, 1. ); +const float ShiftRight8 = 1. / 256.; +vec4 packDepthToRGBA( const in float v ) { + vec4 r = vec4( fract( v * PackFactors ), v ); + r.yzw -= r.xyz * ShiftRight8; return r * PackUpscale; +} +float unpackRGBAToDepth( const in vec4 v ) { + return dot( v, UnpackFactors ); +} +vec4 pack2HalfToRGBA( vec2 v ) { + vec4 r = vec4( v.x, fract( v.x * 255.0 ), v.y, fract( v.y * 255.0 ) ); + return vec4( r.x - r.y / 255.0, r.y, r.z - r.w / 255.0, r.w ); +} +vec2 unpackRGBATo2Half( vec4 v ) { + return vec2( v.x + ( v.y / 255.0 ), v.z + ( v.w / 255.0 ) ); +} +float viewZToOrthographicDepth( const in float viewZ, const in float near, const in float far ) { + return ( viewZ + near ) / ( near - far ); +} +float orthographicDepthToViewZ( const in float linearClipZ, const in float near, const in float far ) { + return linearClipZ * ( near - far ) - near; +} +float viewZToPerspectiveDepth( const in float viewZ, const in float near, const in float far ) { + return ( ( near + viewZ ) * far ) / ( ( far - near ) * viewZ ); +} +float perspectiveDepthToViewZ( const in float invClipZ, const in float near, const in float far ) { + return ( near * far ) / ( ( far - near ) * invClipZ - far ); +}`,Coe=`#ifdef PREMULTIPLIED_ALPHA + gl_FragColor.rgb *= gl_FragColor.a; +#endif`,Soe=`vec4 mvPosition = vec4( transformed, 1.0 ); +#ifdef USE_INSTANCING + mvPosition = instanceMatrix * mvPosition; +#endif +mvPosition = modelViewMatrix * mvPosition; +gl_Position = projectionMatrix * mvPosition;`,Moe=`#ifdef DITHERING + gl_FragColor.rgb = dithering( gl_FragColor.rgb ); +#endif`,Eoe=`#ifdef DITHERING + vec3 dithering( vec3 color ) { + float grid_position = rand( gl_FragCoord.xy ); + vec3 dither_shift_RGB = vec3( 0.25 / 255.0, -0.25 / 255.0, 0.25 / 255.0 ); + dither_shift_RGB = mix( 2.0 * dither_shift_RGB, -2.0 * dither_shift_RGB, grid_position ); + return color + dither_shift_RGB; + } +#endif`,Ioe=`float roughnessFactor = roughness; +#ifdef USE_ROUGHNESSMAP + vec4 texelRoughness = texture2D( roughnessMap, vUv ); + roughnessFactor *= texelRoughness.g; +#endif`,Toe=`#ifdef USE_ROUGHNESSMAP + uniform sampler2D roughnessMap; +#endif`,Doe=`#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + uniform sampler2D directionalShadowMap[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + struct DirectionalLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + uniform sampler2D spotShadowMap[ NUM_SPOT_LIGHT_SHADOWS ]; + varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ]; + struct SpotLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + uniform sampler2D pointShadowMap[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + struct PointLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + #endif + float texture2DCompare( sampler2D depths, vec2 uv, float compare ) { + return step( compare, unpackRGBAToDepth( texture2D( depths, uv ) ) ); + } + vec2 texture2DDistribution( sampler2D shadow, vec2 uv ) { + return unpackRGBATo2Half( texture2D( shadow, uv ) ); + } + float VSMShadow (sampler2D shadow, vec2 uv, float compare ){ + float occlusion = 1.0; + vec2 distribution = texture2DDistribution( shadow, uv ); + float hard_shadow = step( compare , distribution.x ); + if (hard_shadow != 1.0 ) { + float distance = compare - distribution.x ; + float variance = max( 0.00000, distribution.y * distribution.y ); + float softness_probability = variance / (variance + distance * distance ); softness_probability = clamp( ( softness_probability - 0.3 ) / ( 0.95 - 0.3 ), 0.0, 1.0 ); occlusion = clamp( max( hard_shadow, softness_probability ), 0.0, 1.0 ); + } + return occlusion; + } + float getShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord ) { + float shadow = 1.0; + shadowCoord.xyz /= shadowCoord.w; + shadowCoord.z += shadowBias; + bvec4 inFrustumVec = bvec4 ( shadowCoord.x >= 0.0, shadowCoord.x <= 1.0, shadowCoord.y >= 0.0, shadowCoord.y <= 1.0 ); + bool inFrustum = all( inFrustumVec ); + bvec2 frustumTestVec = bvec2( inFrustum, shadowCoord.z <= 1.0 ); + bool frustumTest = all( frustumTestVec ); + if ( frustumTest ) { + #if defined( SHADOWMAP_TYPE_PCF ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx0 = - texelSize.x * shadowRadius; + float dy0 = - texelSize.y * shadowRadius; + float dx1 = + texelSize.x * shadowRadius; + float dy1 = + texelSize.y * shadowRadius; + float dx2 = dx0 / 2.0; + float dy2 = dy0 / 2.0; + float dx3 = dx1 / 2.0; + float dy3 = dy1 / 2.0; + shadow = ( + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy2 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx2, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx3, dy3 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( 0.0, dy1 ), shadowCoord.z ) + + texture2DCompare( shadowMap, shadowCoord.xy + vec2( dx1, dy1 ), shadowCoord.z ) + ) * ( 1.0 / 17.0 ); + #elif defined( SHADOWMAP_TYPE_PCF_SOFT ) + vec2 texelSize = vec2( 1.0 ) / shadowMapSize; + float dx = texelSize.x; + float dy = texelSize.y; + vec2 uv = shadowCoord.xy; + vec2 f = fract( uv * shadowMapSize + 0.5 ); + uv -= f * texelSize; + shadow = ( + texture2DCompare( shadowMap, uv, shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( dx, 0.0 ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + vec2( 0.0, dy ), shadowCoord.z ) + + texture2DCompare( shadowMap, uv + texelSize, shadowCoord.z ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 0.0 ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 0.0 ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( -dx, dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, dy ), shadowCoord.z ), + f.x ) + + mix( texture2DCompare( shadowMap, uv + vec2( 0.0, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 0.0, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( texture2DCompare( shadowMap, uv + vec2( dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( dx, 2.0 * dy ), shadowCoord.z ), + f.y ) + + mix( mix( texture2DCompare( shadowMap, uv + vec2( -dx, -dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, -dy ), shadowCoord.z ), + f.x ), + mix( texture2DCompare( shadowMap, uv + vec2( -dx, 2.0 * dy ), shadowCoord.z ), + texture2DCompare( shadowMap, uv + vec2( 2.0 * dx, 2.0 * dy ), shadowCoord.z ), + f.x ), + f.y ) + ) * ( 1.0 / 9.0 ); + #elif defined( SHADOWMAP_TYPE_VSM ) + shadow = VSMShadow( shadowMap, shadowCoord.xy, shadowCoord.z ); + #else + shadow = texture2DCompare( shadowMap, shadowCoord.xy, shadowCoord.z ); + #endif + } + return shadow; + } + vec2 cubeToUV( vec3 v, float texelSizeY ) { + vec3 absV = abs( v ); + float scaleToCube = 1.0 / max( absV.x, max( absV.y, absV.z ) ); + absV *= scaleToCube; + v *= scaleToCube * ( 1.0 - 2.0 * texelSizeY ); + vec2 planar = v.xy; + float almostATexel = 1.5 * texelSizeY; + float almostOne = 1.0 - almostATexel; + if ( absV.z >= almostOne ) { + if ( v.z > 0.0 ) + planar.x = 4.0 - v.x; + } else if ( absV.x >= almostOne ) { + float signX = sign( v.x ); + planar.x = v.z * signX + 2.0 * signX; + } else if ( absV.y >= almostOne ) { + float signY = sign( v.y ); + planar.x = v.x + 2.0 * signY + 2.0; + planar.y = v.z * signY - 2.0; + } + return vec2( 0.125, 0.25 ) * planar + vec2( 0.375, 0.75 ); + } + float getPointShadow( sampler2D shadowMap, vec2 shadowMapSize, float shadowBias, float shadowRadius, vec4 shadowCoord, float shadowCameraNear, float shadowCameraFar ) { + vec2 texelSize = vec2( 1.0 ) / ( shadowMapSize * vec2( 4.0, 2.0 ) ); + vec3 lightToPosition = shadowCoord.xyz; + float dp = ( length( lightToPosition ) - shadowCameraNear ) / ( shadowCameraFar - shadowCameraNear ); dp += shadowBias; + vec3 bd3D = normalize( lightToPosition ); + #if defined( SHADOWMAP_TYPE_PCF ) || defined( SHADOWMAP_TYPE_PCF_SOFT ) || defined( SHADOWMAP_TYPE_VSM ) + vec2 offset = vec2( - 1, 1 ) * shadowRadius * texelSize.y; + return ( + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yyx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxy, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.xxx, texelSize.y ), dp ) + + texture2DCompare( shadowMap, cubeToUV( bd3D + offset.yxx, texelSize.y ), dp ) + ) * ( 1.0 / 9.0 ); + #else + return texture2DCompare( shadowMap, cubeToUV( bd3D, texelSize.y ), dp ); + #endif + } +#endif`,Ooe=`#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + uniform mat4 directionalShadowMatrix[ NUM_DIR_LIGHT_SHADOWS ]; + varying vec4 vDirectionalShadowCoord[ NUM_DIR_LIGHT_SHADOWS ]; + struct DirectionalLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform DirectionalLightShadow directionalLightShadows[ NUM_DIR_LIGHT_SHADOWS ]; + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + uniform mat4 spotShadowMatrix[ NUM_SPOT_LIGHT_SHADOWS ]; + varying vec4 vSpotShadowCoord[ NUM_SPOT_LIGHT_SHADOWS ]; + struct SpotLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + }; + uniform SpotLightShadow spotLightShadows[ NUM_SPOT_LIGHT_SHADOWS ]; + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + uniform mat4 pointShadowMatrix[ NUM_POINT_LIGHT_SHADOWS ]; + varying vec4 vPointShadowCoord[ NUM_POINT_LIGHT_SHADOWS ]; + struct PointLightShadow { + float shadowBias; + float shadowNormalBias; + float shadowRadius; + vec2 shadowMapSize; + float shadowCameraNear; + float shadowCameraFar; + }; + uniform PointLightShadow pointLightShadows[ NUM_POINT_LIGHT_SHADOWS ]; + #endif +#endif`,Poe=`#ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 || NUM_SPOT_LIGHT_SHADOWS > 0 || NUM_POINT_LIGHT_SHADOWS > 0 + vec3 shadowWorldNormal = inverseTransformDirection( transformedNormal, viewMatrix ); + vec4 shadowWorldPosition; + #endif + #if NUM_DIR_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * directionalLightShadows[ i ].shadowNormalBias, 0 ); + vDirectionalShadowCoord[ i ] = directionalShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * spotLightShadows[ i ].shadowNormalBias, 0 ); + vSpotShadowCoord[ i ] = spotShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + shadowWorldPosition = worldPosition + vec4( shadowWorldNormal * pointLightShadows[ i ].shadowNormalBias, 0 ); + vPointShadowCoord[ i ] = pointShadowMatrix[ i ] * shadowWorldPosition; + } + #pragma unroll_loop_end + #endif +#endif`,Roe=`float getShadowMask() { + float shadow = 1.0; + #ifdef USE_SHADOWMAP + #if NUM_DIR_LIGHT_SHADOWS > 0 + DirectionalLightShadow directionalLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_DIR_LIGHT_SHADOWS; i ++ ) { + directionalLight = directionalLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( directionalShadowMap[ i ], directionalLight.shadowMapSize, directionalLight.shadowBias, directionalLight.shadowRadius, vDirectionalShadowCoord[ i ] ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_SPOT_LIGHT_SHADOWS > 0 + SpotLightShadow spotLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_SPOT_LIGHT_SHADOWS; i ++ ) { + spotLight = spotLightShadows[ i ]; + shadow *= receiveShadow ? getShadow( spotShadowMap[ i ], spotLight.shadowMapSize, spotLight.shadowBias, spotLight.shadowRadius, vSpotShadowCoord[ i ] ) : 1.0; + } + #pragma unroll_loop_end + #endif + #if NUM_POINT_LIGHT_SHADOWS > 0 + PointLightShadow pointLight; + #pragma unroll_loop_start + for ( int i = 0; i < NUM_POINT_LIGHT_SHADOWS; i ++ ) { + pointLight = pointLightShadows[ i ]; + shadow *= receiveShadow ? getPointShadow( pointShadowMap[ i ], pointLight.shadowMapSize, pointLight.shadowBias, pointLight.shadowRadius, vPointShadowCoord[ i ], pointLight.shadowCameraNear, pointLight.shadowCameraFar ) : 1.0; + } + #pragma unroll_loop_end + #endif + #endif + return shadow; +}`,Aoe=`#ifdef USE_SKINNING + mat4 boneMatX = getBoneMatrix( skinIndex.x ); + mat4 boneMatY = getBoneMatrix( skinIndex.y ); + mat4 boneMatZ = getBoneMatrix( skinIndex.z ); + mat4 boneMatW = getBoneMatrix( skinIndex.w ); +#endif`,Noe=`#ifdef USE_SKINNING + uniform mat4 bindMatrix; + uniform mat4 bindMatrixInverse; + #ifdef BONE_TEXTURE + uniform highp sampler2D boneTexture; + uniform int boneTextureSize; + mat4 getBoneMatrix( const in float i ) { + float j = i * 4.0; + float x = mod( j, float( boneTextureSize ) ); + float y = floor( j / float( boneTextureSize ) ); + float dx = 1.0 / float( boneTextureSize ); + float dy = 1.0 / float( boneTextureSize ); + y = dy * ( y + 0.5 ); + vec4 v1 = texture2D( boneTexture, vec2( dx * ( x + 0.5 ), y ) ); + vec4 v2 = texture2D( boneTexture, vec2( dx * ( x + 1.5 ), y ) ); + vec4 v3 = texture2D( boneTexture, vec2( dx * ( x + 2.5 ), y ) ); + vec4 v4 = texture2D( boneTexture, vec2( dx * ( x + 3.5 ), y ) ); + mat4 bone = mat4( v1, v2, v3, v4 ); + return bone; + } + #else + uniform mat4 boneMatrices[ MAX_BONES ]; + mat4 getBoneMatrix( const in float i ) { + mat4 bone = boneMatrices[ int(i) ]; + return bone; + } + #endif +#endif`,koe=`#ifdef USE_SKINNING + vec4 skinVertex = bindMatrix * vec4( transformed, 1.0 ); + vec4 skinned = vec4( 0.0 ); + skinned += boneMatX * skinVertex * skinWeight.x; + skinned += boneMatY * skinVertex * skinWeight.y; + skinned += boneMatZ * skinVertex * skinWeight.z; + skinned += boneMatW * skinVertex * skinWeight.w; + transformed = ( bindMatrixInverse * skinned ).xyz; +#endif`,Loe=`#ifdef USE_SKINNING + mat4 skinMatrix = mat4( 0.0 ); + skinMatrix += skinWeight.x * boneMatX; + skinMatrix += skinWeight.y * boneMatY; + skinMatrix += skinWeight.z * boneMatZ; + skinMatrix += skinWeight.w * boneMatW; + skinMatrix = bindMatrixInverse * skinMatrix * bindMatrix; + objectNormal = vec4( skinMatrix * vec4( objectNormal, 0.0 ) ).xyz; + #ifdef USE_TANGENT + objectTangent = vec4( skinMatrix * vec4( objectTangent, 0.0 ) ).xyz; + #endif +#endif`,Foe=`float specularStrength; +#ifdef USE_SPECULARMAP + vec4 texelSpecular = texture2D( specularMap, vUv ); + specularStrength = texelSpecular.r; +#else + specularStrength = 1.0; +#endif`,Boe=`#ifdef USE_SPECULARMAP + uniform sampler2D specularMap; +#endif`,Voe=`#if defined( TONE_MAPPING ) + gl_FragColor.rgb = toneMapping( gl_FragColor.rgb ); +#endif`,zoe=`#ifndef saturate +#define saturate( a ) clamp( a, 0.0, 1.0 ) +#endif +uniform float toneMappingExposure; +vec3 LinearToneMapping( vec3 color ) { + return toneMappingExposure * color; +} +vec3 ReinhardToneMapping( vec3 color ) { + color *= toneMappingExposure; + return saturate( color / ( vec3( 1.0 ) + color ) ); +} +vec3 OptimizedCineonToneMapping( vec3 color ) { + color *= toneMappingExposure; + color = max( vec3( 0.0 ), color - 0.004 ); + return pow( ( color * ( 6.2 * color + 0.5 ) ) / ( color * ( 6.2 * color + 1.7 ) + 0.06 ), vec3( 2.2 ) ); +} +vec3 RRTAndODTFit( vec3 v ) { + vec3 a = v * ( v + 0.0245786 ) - 0.000090537; + vec3 b = v * ( 0.983729 * v + 0.4329510 ) + 0.238081; + return a / b; +} +vec3 ACESFilmicToneMapping( vec3 color ) { + const mat3 ACESInputMat = mat3( + vec3( 0.59719, 0.07600, 0.02840 ), vec3( 0.35458, 0.90834, 0.13383 ), + vec3( 0.04823, 0.01566, 0.83777 ) + ); + const mat3 ACESOutputMat = mat3( + vec3( 1.60475, -0.10208, -0.00327 ), vec3( -0.53108, 1.10813, -0.07276 ), + vec3( -0.07367, -0.00605, 1.07602 ) + ); + color *= toneMappingExposure / 0.6; + color = ACESInputMat * color; + color = RRTAndODTFit( color ); + color = ACESOutputMat * color; + return saturate( color ); +} +vec3 CustomToneMapping( vec3 color ) { return color; }`,Uoe=`#ifdef USE_TRANSMISSION + float transmissionAlpha = 1.0; + float transmissionFactor = transmission; + float thicknessFactor = thickness; + #ifdef USE_TRANSMISSIONMAP + transmissionFactor *= texture2D( transmissionMap, vUv ).r; + #endif + #ifdef USE_THICKNESSMAP + thicknessFactor *= texture2D( thicknessMap, vUv ).g; + #endif + vec3 pos = vWorldPosition; + vec3 v = normalize( cameraPosition - pos ); + vec3 n = inverseTransformDirection( normal, viewMatrix ); + vec4 transmission = getIBLVolumeRefraction( + n, v, roughnessFactor, material.diffuseColor, material.specularColor, material.specularF90, + pos, modelMatrix, viewMatrix, projectionMatrix, ior, thicknessFactor, + attenuationColor, attenuationDistance ); + totalDiffuse = mix( totalDiffuse, transmission.rgb, transmissionFactor ); + transmissionAlpha = mix( transmissionAlpha, transmission.a, transmissionFactor ); +#endif`,Hoe=`#ifdef USE_TRANSMISSION + uniform float transmission; + uniform float thickness; + uniform float attenuationDistance; + uniform vec3 attenuationColor; + #ifdef USE_TRANSMISSIONMAP + uniform sampler2D transmissionMap; + #endif + #ifdef USE_THICKNESSMAP + uniform sampler2D thicknessMap; + #endif + uniform vec2 transmissionSamplerSize; + uniform sampler2D transmissionSamplerMap; + uniform mat4 modelMatrix; + uniform mat4 projectionMatrix; + varying vec3 vWorldPosition; + vec3 getVolumeTransmissionRay( vec3 n, vec3 v, float thickness, float ior, mat4 modelMatrix ) { + vec3 refractionVector = refract( - v, normalize( n ), 1.0 / ior ); + vec3 modelScale; + modelScale.x = length( vec3( modelMatrix[ 0 ].xyz ) ); + modelScale.y = length( vec3( modelMatrix[ 1 ].xyz ) ); + modelScale.z = length( vec3( modelMatrix[ 2 ].xyz ) ); + return normalize( refractionVector ) * thickness * modelScale; + } + float applyIorToRoughness( float roughness, float ior ) { + return roughness * clamp( ior * 2.0 - 2.0, 0.0, 1.0 ); + } + vec4 getTransmissionSample( vec2 fragCoord, float roughness, float ior ) { + float framebufferLod = log2( transmissionSamplerSize.x ) * applyIorToRoughness( roughness, ior ); + #ifdef TEXTURE_LOD_EXT + return texture2DLodEXT( transmissionSamplerMap, fragCoord.xy, framebufferLod ); + #else + return texture2D( transmissionSamplerMap, fragCoord.xy, framebufferLod ); + #endif + } + vec3 applyVolumeAttenuation( vec3 radiance, float transmissionDistance, vec3 attenuationColor, float attenuationDistance ) { + if ( attenuationDistance == 0.0 ) { + return radiance; + } else { + vec3 attenuationCoefficient = -log( attenuationColor ) / attenuationDistance; + vec3 transmittance = exp( - attenuationCoefficient * transmissionDistance ); return transmittance * radiance; + } + } + vec4 getIBLVolumeRefraction( vec3 n, vec3 v, float roughness, vec3 diffuseColor, vec3 specularColor, float specularF90, + vec3 position, mat4 modelMatrix, mat4 viewMatrix, mat4 projMatrix, float ior, float thickness, + vec3 attenuationColor, float attenuationDistance ) { + vec3 transmissionRay = getVolumeTransmissionRay( n, v, thickness, ior, modelMatrix ); + vec3 refractedRayExit = position + transmissionRay; + vec4 ndcPos = projMatrix * viewMatrix * vec4( refractedRayExit, 1.0 ); + vec2 refractionCoords = ndcPos.xy / ndcPos.w; + refractionCoords += 1.0; + refractionCoords /= 2.0; + vec4 transmittedLight = getTransmissionSample( refractionCoords, roughness, ior ); + vec3 attenuatedColor = applyVolumeAttenuation( transmittedLight.rgb, length( transmissionRay ), attenuationColor, attenuationDistance ); + vec3 F = EnvironmentBRDF( n, v, specularColor, specularF90, roughness ); + return vec4( ( 1.0 - F ) * attenuatedColor * diffuseColor, transmittedLight.a ); + } +#endif`,Goe=`#if ( defined( USE_UV ) && ! defined( UVS_VERTEX_ONLY ) ) + varying vec2 vUv; +#endif`,joe=`#ifdef USE_UV + #ifdef UVS_VERTEX_ONLY + vec2 vUv; + #else + varying vec2 vUv; + #endif + uniform mat3 uvTransform; +#endif`,Woe=`#ifdef USE_UV + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; +#endif`,$oe=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) + varying vec2 vUv2; +#endif`,qoe=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) + attribute vec2 uv2; + varying vec2 vUv2; + uniform mat3 uv2Transform; +#endif`,Yoe=`#if defined( USE_LIGHTMAP ) || defined( USE_AOMAP ) + vUv2 = ( uv2Transform * vec3( uv2, 1 ) ).xy; +#endif`,Xoe=`#if defined( USE_ENVMAP ) || defined( DISTANCE ) || defined ( USE_SHADOWMAP ) || defined ( USE_TRANSMISSION ) + vec4 worldPosition = vec4( transformed, 1.0 ); + #ifdef USE_INSTANCING + worldPosition = instanceMatrix * worldPosition; + #endif + worldPosition = modelMatrix * worldPosition; +#endif`,Qoe=`varying vec2 vUv; +uniform mat3 uvTransform; +void main() { + vUv = ( uvTransform * vec3( uv, 1 ) ).xy; + gl_Position = vec4( position.xy, 1.0, 1.0 ); +}`,Zoe=`uniform sampler2D t2D; +varying vec2 vUv; +void main() { + vec4 texColor = texture2D( t2D, vUv ); + gl_FragColor = mapTexelToLinear( texColor ); + #include + #include +}`,Koe=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include + gl_Position.z = gl_Position.w; +}`,Joe=`#include +uniform float opacity; +varying vec3 vWorldDirection; +#include +void main() { + vec3 vReflect = vWorldDirection; + #include + gl_FragColor = envColor; + gl_FragColor.a *= opacity; + #include + #include +}`,ese=`#include +#include +#include +#include +#include +#include +#include +varying vec2 vHighPrecisionZW; +void main() { + #include + #include + #ifdef USE_DISPLACEMENTMAP + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + vHighPrecisionZW = gl_Position.zw; +}`,tse=`#if DEPTH_PACKING == 3200 + uniform float opacity; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +varying vec2 vHighPrecisionZW; +void main() { + #include + vec4 diffuseColor = vec4( 1.0 ); + #if DEPTH_PACKING == 3200 + diffuseColor.a = opacity; + #endif + #include + #include + #include + #include + float fragCoordZ = 0.5 * vHighPrecisionZW[0] / vHighPrecisionZW[1] + 0.5; + #if DEPTH_PACKING == 3200 + gl_FragColor = vec4( vec3( 1.0 - fragCoordZ ), opacity ); + #elif DEPTH_PACKING == 3201 + gl_FragColor = packDepthToRGBA( fragCoordZ ); + #endif +}`,nse=`#define DISTANCE +varying vec3 vWorldPosition; +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #ifdef USE_DISPLACEMENTMAP + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + vWorldPosition = worldPosition.xyz; +}`,ise=`#define DISTANCE +uniform vec3 referencePosition; +uniform float nearDistance; +uniform float farDistance; +varying vec3 vWorldPosition; +#include +#include +#include +#include +#include +#include +#include +void main () { + #include + vec4 diffuseColor = vec4( 1.0 ); + #include + #include + #include + float dist = length( vWorldPosition - referencePosition ); + dist = ( dist - nearDistance ) / ( farDistance - nearDistance ); + dist = saturate( dist ); + gl_FragColor = packDepthToRGBA( dist ); +}`,rse=`varying vec3 vWorldDirection; +#include +void main() { + vWorldDirection = transformDirection( position, modelMatrix ); + #include + #include +}`,ose=`uniform sampler2D tEquirect; +varying vec3 vWorldDirection; +#include +void main() { + vec3 direction = normalize( vWorldDirection ); + vec2 sampleUV = equirectUv( direction ); + vec4 texColor = texture2D( tEquirect, sampleUV ); + gl_FragColor = mapTexelToLinear( texColor ); + #include + #include +}`,sse=`uniform float scale; +attribute float lineDistance; +varying float vLineDistance; +#include +#include +#include +#include +#include +#include +void main() { + vLineDistance = scale * lineDistance; + #include + #include + #include + #include + #include + #include + #include +}`,ase=`uniform vec3 diffuse; +uniform float opacity; +uniform float dashSize; +uniform float totalSize; +varying float vLineDistance; +#include +#include +#include +#include +#include +void main() { + #include + if ( mod( vLineDistance, totalSize ) > dashSize ) { + discard; + } + vec3 outgoingLight = vec3( 0.0 ); + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include + #include +}`,lse=`#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #if defined ( USE_ENVMAP ) || defined ( USE_SKINNING ) + #include + #include + #include + #include + #include + #endif + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,cse=`uniform vec3 diffuse; +uniform float opacity; +#ifndef FLAT_SHADED + varying vec3 vNormal; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + #ifdef USE_LIGHTMAP + vec4 lightMapTexel= texture2D( lightMap, vUv2 ); + reflectedLight.indirectDiffuse += lightMapTexelToLinear( lightMapTexel ).rgb * lightMapIntensity; + #else + reflectedLight.indirectDiffuse += vec3( 1.0 ); + #endif + #include + reflectedLight.indirectDiffuse *= diffuseColor.rgb; + vec3 outgoingLight = reflectedLight.indirectDiffuse; + #include + #include + #include + #include + #include + #include + #include +}`,dse=`#define LAMBERT +varying vec3 vLightFront; +varying vec3 vIndirectFront; +#ifdef DOUBLE_SIDED + varying vec3 vLightBack; + varying vec3 vIndirectBack; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,use=`uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +varying vec3 vLightFront; +varying vec3 vIndirectFront; +#ifdef DOUBLE_SIDED + varying vec3 vLightBack; + varying vec3 vIndirectBack; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #ifdef DOUBLE_SIDED + reflectedLight.indirectDiffuse += ( gl_FrontFacing ) ? vIndirectFront : vIndirectBack; + #else + reflectedLight.indirectDiffuse += vIndirectFront; + #endif + #include + reflectedLight.indirectDiffuse *= BRDF_Lambert( diffuseColor.rgb ); + #ifdef DOUBLE_SIDED + reflectedLight.directDiffuse = ( gl_FrontFacing ) ? vLightFront : vLightBack; + #else + reflectedLight.directDiffuse = vLightFront; + #endif + reflectedLight.directDiffuse *= BRDF_Lambert( diffuseColor.rgb ) * getShadowMask(); + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include + #include +}`,hse=`#define MATCAP +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; +}`,pse=`#define MATCAP +uniform vec3 diffuse; +uniform float opacity; +uniform sampler2D matcap; +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + #include + #include + #include + vec3 viewDir = normalize( vViewPosition ); + vec3 x = normalize( vec3( viewDir.z, 0.0, - viewDir.x ) ); + vec3 y = cross( viewDir, x ); + vec2 uv = vec2( dot( x, normal ), dot( y, normal ) ) * 0.495 + 0.5; + #ifdef USE_MATCAP + vec4 matcapColor = texture2D( matcap, uv ); + matcapColor = matcapTexelToLinear( matcapColor ); + #else + vec4 matcapColor = vec4( 1.0 ); + #endif + vec3 outgoingLight = diffuseColor.rgb * matcapColor.rgb; + #include + #include + #include + #include + #include + #include +}`,fse=`#define NORMAL +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) + varying vec3 vViewPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) + vViewPosition = - mvPosition.xyz; +#endif +}`,mse=`#define NORMAL +uniform float opacity; +#if defined( FLAT_SHADED ) || defined( USE_BUMPMAP ) || defined( TANGENTSPACE_NORMALMAP ) + varying vec3 vViewPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + gl_FragColor = vec4( packNormalToRGB( normal ), opacity ); +}`,gse=`#define PHONG +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include + #include +}`,_se=`#define PHONG +uniform vec3 diffuse; +uniform vec3 emissive; +uniform vec3 specular; +uniform float shininess; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + reflectedLight.directSpecular + reflectedLight.indirectSpecular + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include + #include +}`,vse=`#define STANDARD +varying vec3 vViewPosition; +#ifdef USE_TRANSMISSION + varying vec3 vWorldPosition; +#endif +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +#ifdef USE_TRANSMISSION + vWorldPosition = worldPosition.xyz; +#endif +}`,yse=`#define STANDARD +#ifdef PHYSICAL + #define IOR + #define SPECULAR +#endif +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float roughness; +uniform float metalness; +uniform float opacity; +#ifdef IOR + uniform float ior; +#endif +#ifdef SPECULAR + uniform float specularIntensity; + uniform vec3 specularColor; + #ifdef USE_SPECULARINTENSITYMAP + uniform sampler2D specularIntensityMap; + #endif + #ifdef USE_SPECULARCOLORMAP + uniform sampler2D specularColorMap; + #endif +#endif +#ifdef USE_CLEARCOAT + uniform float clearcoat; + uniform float clearcoatRoughness; +#endif +#ifdef USE_SHEEN + uniform vec3 sheenColor; + uniform float sheenRoughness; + #ifdef USE_SHEENCOLORMAP + uniform sampler2D sheenColorMap; + #endif + #ifdef USE_SHEENROUGHNESSMAP + uniform sampler2D sheenRoughnessMap; + #endif +#endif +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 totalDiffuse = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse; + vec3 totalSpecular = reflectedLight.directSpecular + reflectedLight.indirectSpecular; + #include + vec3 outgoingLight = totalDiffuse + totalSpecular + totalEmissiveRadiance; + #ifdef USE_CLEARCOAT + float dotNVcc = saturate( dot( geometry.clearcoatNormal, geometry.viewDir ) ); + vec3 Fcc = F_Schlick( material.clearcoatF0, material.clearcoatF90, dotNVcc ); + outgoingLight = outgoingLight * ( 1.0 - clearcoat * Fcc ) + clearcoatSpecular * clearcoat; + #endif + #include + #include + #include + #include + #include + #include +}`,bse=`#define TOON +varying vec3 vViewPosition; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vViewPosition = - mvPosition.xyz; + #include + #include + #include +}`,xse=`#define TOON +uniform vec3 diffuse; +uniform vec3 emissive; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec4 diffuseColor = vec4( diffuse, opacity ); + ReflectedLight reflectedLight = ReflectedLight( vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ), vec3( 0.0 ) ); + vec3 totalEmissiveRadiance = emissive; + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + vec3 outgoingLight = reflectedLight.directDiffuse + reflectedLight.indirectDiffuse + totalEmissiveRadiance; + #include + #include + #include + #include + #include + #include +}`,wse=`uniform float size; +uniform float scale; +#include +#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + gl_PointSize = size; + #ifdef USE_SIZEATTENUATION + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) gl_PointSize *= ( scale / - mvPosition.z ); + #endif + #include + #include + #include + #include +}`,Cse=`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec3 outgoingLight = vec3( 0.0 ); + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include + #include +}`,Sse=`#include +#include +#include +#include +#include +void main() { + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include + #include +}`,Mse=`uniform vec3 color; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +void main() { + gl_FragColor = vec4( color, opacity * ( 1.0 - getShadowMask() ) ); + #include + #include + #include +}`,Ese=`uniform float rotation; +uniform vec2 center; +#include +#include +#include +#include +#include +void main() { + #include + vec4 mvPosition = modelViewMatrix * vec4( 0.0, 0.0, 0.0, 1.0 ); + vec2 scale; + scale.x = length( vec3( modelMatrix[ 0 ].x, modelMatrix[ 0 ].y, modelMatrix[ 0 ].z ) ); + scale.y = length( vec3( modelMatrix[ 1 ].x, modelMatrix[ 1 ].y, modelMatrix[ 1 ].z ) ); + #ifndef USE_SIZEATTENUATION + bool isPerspective = isPerspectiveMatrix( projectionMatrix ); + if ( isPerspective ) scale *= - mvPosition.z; + #endif + vec2 alignedPosition = ( position.xy - ( center - vec2( 0.5 ) ) ) * scale; + vec2 rotatedPosition; + rotatedPosition.x = cos( rotation ) * alignedPosition.x - sin( rotation ) * alignedPosition.y; + rotatedPosition.y = sin( rotation ) * alignedPosition.x + cos( rotation ) * alignedPosition.y; + mvPosition.xy += rotatedPosition; + gl_Position = projectionMatrix * mvPosition; + #include + #include + #include +}`,Ise=`uniform vec3 diffuse; +uniform float opacity; +#include +#include +#include +#include +#include +#include +#include +#include +void main() { + #include + vec3 outgoingLight = vec3( 0.0 ); + vec4 diffuseColor = vec4( diffuse, opacity ); + #include + #include + #include + #include + outgoingLight = diffuseColor.rgb; + #include + #include + #include + #include +}`,ln={alphamap_fragment:nre,alphamap_pars_fragment:ire,alphatest_fragment:rre,alphatest_pars_fragment:ore,aomap_fragment:sre,aomap_pars_fragment:are,begin_vertex:lre,beginnormal_vertex:cre,bsdfs:dre,bumpmap_pars_fragment:ure,clipping_planes_fragment:hre,clipping_planes_pars_fragment:pre,clipping_planes_pars_vertex:fre,clipping_planes_vertex:mre,color_fragment:gre,color_pars_fragment:_re,color_pars_vertex:vre,color_vertex:yre,common:bre,cube_uv_reflection_fragment:xre,defaultnormal_vertex:wre,displacementmap_pars_vertex:Cre,displacementmap_vertex:Sre,emissivemap_fragment:Mre,emissivemap_pars_fragment:Ere,encodings_fragment:Ire,encodings_pars_fragment:Tre,envmap_fragment:Dre,envmap_common_pars_fragment:Ore,envmap_pars_fragment:Pre,envmap_pars_vertex:Rre,envmap_physical_pars_fragment:Gre,envmap_vertex:Are,fog_vertex:Nre,fog_pars_vertex:kre,fog_fragment:Lre,fog_pars_fragment:Fre,gradientmap_pars_fragment:Bre,lightmap_fragment:Vre,lightmap_pars_fragment:zre,lights_lambert_vertex:Ure,lights_pars_begin:Hre,lights_toon_fragment:jre,lights_toon_pars_fragment:Wre,lights_phong_fragment:$re,lights_phong_pars_fragment:qre,lights_physical_fragment:Yre,lights_physical_pars_fragment:Xre,lights_fragment_begin:Qre,lights_fragment_maps:Zre,lights_fragment_end:Kre,logdepthbuf_fragment:Jre,logdepthbuf_pars_fragment:eoe,logdepthbuf_pars_vertex:toe,logdepthbuf_vertex:noe,map_fragment:ioe,map_pars_fragment:roe,map_particle_fragment:ooe,map_particle_pars_fragment:soe,metalnessmap_fragment:aoe,metalnessmap_pars_fragment:loe,morphnormal_vertex:coe,morphtarget_pars_vertex:doe,morphtarget_vertex:uoe,normal_fragment_begin:hoe,normal_fragment_maps:poe,normal_pars_fragment:foe,normal_pars_vertex:moe,normal_vertex:goe,normalmap_pars_fragment:_oe,clearcoat_normal_fragment_begin:voe,clearcoat_normal_fragment_maps:yoe,clearcoat_pars_fragment:boe,output_fragment:xoe,packing:woe,premultiplied_alpha_fragment:Coe,project_vertex:Soe,dithering_fragment:Moe,dithering_pars_fragment:Eoe,roughnessmap_fragment:Ioe,roughnessmap_pars_fragment:Toe,shadowmap_pars_fragment:Doe,shadowmap_pars_vertex:Ooe,shadowmap_vertex:Poe,shadowmask_pars_fragment:Roe,skinbase_vertex:Aoe,skinning_pars_vertex:Noe,skinning_vertex:koe,skinnormal_vertex:Loe,specularmap_fragment:Foe,specularmap_pars_fragment:Boe,tonemapping_fragment:Voe,tonemapping_pars_fragment:zoe,transmission_fragment:Uoe,transmission_pars_fragment:Hoe,uv_pars_fragment:Goe,uv_pars_vertex:joe,uv_vertex:Woe,uv2_pars_fragment:$oe,uv2_pars_vertex:qoe,uv2_vertex:Yoe,worldpos_vertex:Xoe,background_vert:Qoe,background_frag:Zoe,cube_vert:Koe,cube_frag:Joe,depth_vert:ese,depth_frag:tse,distanceRGBA_vert:nse,distanceRGBA_frag:ise,equirect_vert:rse,equirect_frag:ose,linedashed_vert:sse,linedashed_frag:ase,meshbasic_vert:lse,meshbasic_frag:cse,meshlambert_vert:dse,meshlambert_frag:use,meshmatcap_vert:hse,meshmatcap_frag:pse,meshnormal_vert:fse,meshnormal_frag:mse,meshphong_vert:gse,meshphong_frag:_se,meshphysical_vert:vse,meshphysical_frag:yse,meshtoon_vert:bse,meshtoon_frag:xse,points_vert:wse,points_frag:Cse,shadow_vert:Sse,shadow_frag:Mse,sprite_vert:Ese,sprite_frag:Ise},He={common:{diffuse:{value:new Xe(16777215)},opacity:{value:1},map:{value:null},uvTransform:{value:new Di},uv2Transform:{value:new Di},alphaMap:{value:null},alphaTest:{value:0}},specularmap:{specularMap:{value:null}},envmap:{envMap:{value:null},flipEnvMap:{value:-1},reflectivity:{value:1},ior:{value:1.5},refractionRatio:{value:.98},maxMipLevel:{value:0}},aomap:{aoMap:{value:null},aoMapIntensity:{value:1}},lightmap:{lightMap:{value:null},lightMapIntensity:{value:1}},emissivemap:{emissiveMap:{value:null}},bumpmap:{bumpMap:{value:null},bumpScale:{value:1}},normalmap:{normalMap:{value:null},normalScale:{value:new xe(1,1)}},displacementmap:{displacementMap:{value:null},displacementScale:{value:1},displacementBias:{value:0}},roughnessmap:{roughnessMap:{value:null}},metalnessmap:{metalnessMap:{value:null}},gradientmap:{gradientMap:{value:null}},fog:{fogDensity:{value:25e-5},fogNear:{value:1},fogFar:{value:2e3},fogColor:{value:new Xe(16777215)}},lights:{ambientLightColor:{value:[]},lightProbe:{value:[]},directionalLights:{value:[],properties:{direction:{},color:{}}},directionalLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},directionalShadowMap:{value:[]},directionalShadowMatrix:{value:[]},spotLights:{value:[],properties:{color:{},position:{},direction:{},distance:{},coneCos:{},penumbraCos:{},decay:{}}},spotLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{}}},spotShadowMap:{value:[]},spotShadowMatrix:{value:[]},pointLights:{value:[],properties:{color:{},position:{},decay:{},distance:{}}},pointLightShadows:{value:[],properties:{shadowBias:{},shadowNormalBias:{},shadowRadius:{},shadowMapSize:{},shadowCameraNear:{},shadowCameraFar:{}}},pointShadowMap:{value:[]},pointShadowMatrix:{value:[]},hemisphereLights:{value:[],properties:{direction:{},skyColor:{},groundColor:{}}},rectAreaLights:{value:[],properties:{color:{},position:{},width:{},height:{}}},ltc_1:{value:null},ltc_2:{value:null}},points:{diffuse:{value:new Xe(16777215)},opacity:{value:1},size:{value:1},scale:{value:1},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Di}},sprite:{diffuse:{value:new Xe(16777215)},opacity:{value:1},center:{value:new xe(.5,.5)},rotation:{value:0},map:{value:null},alphaMap:{value:null},alphaTest:{value:0},uvTransform:{value:new Di}}},Ss={basic:{uniforms:Dr([He.common,He.specularmap,He.envmap,He.aomap,He.lightmap,He.fog]),vertexShader:ln.meshbasic_vert,fragmentShader:ln.meshbasic_frag},lambert:{uniforms:Dr([He.common,He.specularmap,He.envmap,He.aomap,He.lightmap,He.emissivemap,He.fog,He.lights,{emissive:{value:new Xe(0)}}]),vertexShader:ln.meshlambert_vert,fragmentShader:ln.meshlambert_frag},phong:{uniforms:Dr([He.common,He.specularmap,He.envmap,He.aomap,He.lightmap,He.emissivemap,He.bumpmap,He.normalmap,He.displacementmap,He.fog,He.lights,{emissive:{value:new Xe(0)},specular:{value:new Xe(1118481)},shininess:{value:30}}]),vertexShader:ln.meshphong_vert,fragmentShader:ln.meshphong_frag},standard:{uniforms:Dr([He.common,He.envmap,He.aomap,He.lightmap,He.emissivemap,He.bumpmap,He.normalmap,He.displacementmap,He.roughnessmap,He.metalnessmap,He.fog,He.lights,{emissive:{value:new Xe(0)},roughness:{value:1},metalness:{value:0},envMapIntensity:{value:1}}]),vertexShader:ln.meshphysical_vert,fragmentShader:ln.meshphysical_frag},toon:{uniforms:Dr([He.common,He.aomap,He.lightmap,He.emissivemap,He.bumpmap,He.normalmap,He.displacementmap,He.gradientmap,He.fog,He.lights,{emissive:{value:new Xe(0)}}]),vertexShader:ln.meshtoon_vert,fragmentShader:ln.meshtoon_frag},matcap:{uniforms:Dr([He.common,He.bumpmap,He.normalmap,He.displacementmap,He.fog,{matcap:{value:null}}]),vertexShader:ln.meshmatcap_vert,fragmentShader:ln.meshmatcap_frag},points:{uniforms:Dr([He.points,He.fog]),vertexShader:ln.points_vert,fragmentShader:ln.points_frag},dashed:{uniforms:Dr([He.common,He.fog,{scale:{value:1},dashSize:{value:1},totalSize:{value:2}}]),vertexShader:ln.linedashed_vert,fragmentShader:ln.linedashed_frag},depth:{uniforms:Dr([He.common,He.displacementmap]),vertexShader:ln.depth_vert,fragmentShader:ln.depth_frag},normal:{uniforms:Dr([He.common,He.bumpmap,He.normalmap,He.displacementmap,{opacity:{value:1}}]),vertexShader:ln.meshnormal_vert,fragmentShader:ln.meshnormal_frag},sprite:{uniforms:Dr([He.sprite,He.fog]),vertexShader:ln.sprite_vert,fragmentShader:ln.sprite_frag},background:{uniforms:{uvTransform:{value:new Di},t2D:{value:null}},vertexShader:ln.background_vert,fragmentShader:ln.background_frag},cube:{uniforms:Dr([He.envmap,{opacity:{value:1}}]),vertexShader:ln.cube_vert,fragmentShader:ln.cube_frag},equirect:{uniforms:{tEquirect:{value:null}},vertexShader:ln.equirect_vert,fragmentShader:ln.equirect_frag},distanceRGBA:{uniforms:Dr([He.common,He.displacementmap,{referencePosition:{value:new P},nearDistance:{value:1},farDistance:{value:1e3}}]),vertexShader:ln.distanceRGBA_vert,fragmentShader:ln.distanceRGBA_frag},shadow:{uniforms:Dr([He.lights,He.fog,{color:{value:new Xe(0)},opacity:{value:1}}]),vertexShader:ln.shadow_vert,fragmentShader:ln.shadow_frag}};Ss.physical={uniforms:Dr([Ss.standard.uniforms,{clearcoat:{value:0},clearcoatMap:{value:null},clearcoatRoughness:{value:0},clearcoatRoughnessMap:{value:null},clearcoatNormalScale:{value:new xe(1,1)},clearcoatNormalMap:{value:null},sheen:{value:0},sheenColor:{value:new Xe(0)},sheenColorMap:{value:null},sheenRoughness:{value:0},sheenRoughnessMap:{value:null},transmission:{value:0},transmissionMap:{value:null},transmissionSamplerSize:{value:new xe},transmissionSamplerMap:{value:null},thickness:{value:0},thicknessMap:{value:null},attenuationDistance:{value:0},attenuationColor:{value:new Xe(0)},specularIntensity:{value:0},specularIntensityMap:{value:null},specularColor:{value:new Xe(1,1,1)},specularColorMap:{value:null}}]),vertexShader:ln.meshphysical_vert,fragmentShader:ln.meshphysical_frag};function Tse(i,t,e,n,r){let o=new Xe(0),s=0,a,l,c=null,d=0,u=null;function h(f,m){let b=!1,g=m.isScene===!0?m.background:null;g&&g.isTexture&&(g=t.get(g));let _=i.xr,x=_.getSession&&_.getSession();x&&x.environmentBlendMode==="additive"&&(g=null),g===null?p(o,s):g&&g.isColor&&(p(g,1),b=!0),(i.autoClear||b)&&i.clear(i.autoClearColor,i.autoClearDepth,i.autoClearStencil),g&&(g.isCubeTexture||g.mapping===ef)?(l===void 0&&(l=new yi(new cc(1,1,1),new Es({name:"BackgroundCubeMaterial",uniforms:Ap(Ss.cube.uniforms),vertexShader:Ss.cube.vertexShader,fragmentShader:Ss.cube.fragmentShader,side:Ti,depthTest:!1,depthWrite:!1,fog:!1})),l.geometry.deleteAttribute("normal"),l.geometry.deleteAttribute("uv"),l.onBeforeRender=function(C,T,D){this.matrixWorld.copyPosition(D.matrixWorld)},Object.defineProperty(l.material,"envMap",{get:function(){return this.uniforms.envMap.value}}),n.update(l)),l.material.uniforms.envMap.value=g,l.material.uniforms.flipEnvMap.value=g.isCubeTexture&&g.isRenderTargetTexture===!1?-1:1,(c!==g||d!==g.version||u!==i.toneMapping)&&(l.material.needsUpdate=!0,c=g,d=g.version,u=i.toneMapping),f.unshift(l,l.geometry,l.material,0,0,null)):g&&g.isTexture&&(a===void 0&&(a=new yi(new Lp(2,2),new Es({name:"BackgroundMaterial",uniforms:Ap(Ss.background.uniforms),vertexShader:Ss.background.vertexShader,fragmentShader:Ss.background.fragmentShader,side:eu,depthTest:!1,depthWrite:!1,fog:!1})),a.geometry.deleteAttribute("normal"),Object.defineProperty(a.material,"map",{get:function(){return this.uniforms.t2D.value}}),n.update(a)),a.material.uniforms.t2D.value=g,g.matrixAutoUpdate===!0&&g.updateMatrix(),a.material.uniforms.uvTransform.value.copy(g.matrix),(c!==g||d!==g.version||u!==i.toneMapping)&&(a.material.needsUpdate=!0,c=g,d=g.version,u=i.toneMapping),f.unshift(a,a.geometry,a.material,0,0,null))}function p(f,m){e.buffers.color.setClear(f.r,f.g,f.b,m,r)}return{getClearColor:function(){return o},setClearColor:function(f,m=1){o.set(f),s=m,p(o,s)},getClearAlpha:function(){return s},setClearAlpha:function(f){s=f,p(o,s)},render:h}}function Dse(i,t,e,n){let r=i.getParameter(34921),o=n.isWebGL2?null:t.get("OES_vertex_array_object"),s=n.isWebGL2||o!==null,a={},l=m(null),c=l;function d(G,$,Y,k,j){let K=!1;if(s){let de=f(k,Y,$);c!==de&&(c=de,h(c.object)),K=b(k,j),K&&g(k,j)}else{let de=$.wireframe===!0;(c.geometry!==k.id||c.program!==Y.id||c.wireframe!==de)&&(c.geometry=k.id,c.program=Y.id,c.wireframe=de,K=!0)}G.isInstancedMesh===!0&&(K=!0),j!==null&&e.update(j,34963),K&&(E(G,$,Y,k),j!==null&&i.bindBuffer(34963,e.get(j).buffer))}function u(){return n.isWebGL2?i.createVertexArray():o.createVertexArrayOES()}function h(G){return n.isWebGL2?i.bindVertexArray(G):o.bindVertexArrayOES(G)}function p(G){return n.isWebGL2?i.deleteVertexArray(G):o.deleteVertexArrayOES(G)}function f(G,$,Y){let k=Y.wireframe===!0,j=a[G.id];j===void 0&&(j={},a[G.id]=j);let K=j[$.id];K===void 0&&(K={},j[$.id]=K);let de=K[k];return de===void 0&&(de=m(u()),K[k]=de),de}function m(G){let $=[],Y=[],k=[];for(let j=0;j=0){let Ge=j[Te];if(Ge===void 0&&(Te==="instanceMatrix"&&G.instanceMatrix&&(Ge=G.instanceMatrix),Te==="instanceColor"&&G.instanceColor&&(Ge=G.instanceColor)),Ge!==void 0){let he=Ge.normalized,ae=Ge.itemSize,je=e.get(Ge);if(je===void 0)continue;let ue=je.buffer,$e=je.type,gt=je.bytesPerElement;if(Ge.isInterleavedBufferAttribute){let ze=Ge.data,tt=ze.stride,At=Ge.offset;if(ze&&ze.isInstancedInterleavedBuffer){for(let ye=0;ye0&&i.getShaderPrecisionFormat(35632,36338).precision>0)return"highp";E="mediump"}return E==="mediump"&&i.getShaderPrecisionFormat(35633,36337).precision>0&&i.getShaderPrecisionFormat(35632,36337).precision>0?"mediump":"lowp"}let s=typeof WebGL2RenderingContext<"u"&&i instanceof WebGL2RenderingContext||typeof WebGL2ComputeRenderingContext<"u"&&i instanceof WebGL2ComputeRenderingContext,a=e.precision!==void 0?e.precision:"highp",l=o(a);l!==a&&(console.warn("THREE.WebGLRenderer:",a,"not supported, using",l,"instead."),a=l);let c=s||t.has("WEBGL_draw_buffers"),d=e.logarithmicDepthBuffer===!0,u=i.getParameter(34930),h=i.getParameter(35660),p=i.getParameter(3379),f=i.getParameter(34076),m=i.getParameter(34921),b=i.getParameter(36347),g=i.getParameter(36348),_=i.getParameter(36349),x=h>0,C=s||t.has("OES_texture_float"),T=x&&C,D=s?i.getParameter(36183):0;return{isWebGL2:s,drawBuffers:c,getMaxAnisotropy:r,getMaxPrecision:o,precision:a,logarithmicDepthBuffer:d,maxTextures:u,maxVertexTextures:h,maxTextureSize:p,maxCubemapSize:f,maxAttributes:m,maxVertexUniforms:b,maxVaryings:g,maxFragmentUniforms:_,vertexTextures:x,floatFragmentTextures:C,floatVertexTextures:T,maxSamples:D}}function Rse(i){let t=this,e=null,n=0,r=!1,o=!1,s=new Zo,a=new Di,l={value:null,needsUpdate:!1};this.uniform=l,this.numPlanes=0,this.numIntersection=0,this.init=function(u,h,p){let f=u.length!==0||h||n!==0||r;return r=h,e=d(u,p,0),n=u.length,f},this.beginShadows=function(){o=!0,d(null)},this.endShadows=function(){o=!1,c()},this.setState=function(u,h,p){let f=u.clippingPlanes,m=u.clipIntersection,b=u.clipShadows,g=i.get(u);if(!r||f===null||f.length===0||o&&!b)o?d(null):c();else{let _=o?0:n,x=_*4,C=g.clippingState||null;l.value=C,C=d(f,h,x,p);for(let T=0;T!==x;++T)C[T]=e[T];g.clippingState=C,this.numIntersection=m?this.numPlanes:0,this.numPlanes+=_}};function c(){l.value!==e&&(l.value=e,l.needsUpdate=n>0),t.numPlanes=n,t.numIntersection=0}function d(u,h,p,f){let m=u!==null?u.length:0,b=null;if(m!==0){if(b=l.value,f!==!0||b===null){let g=p+m*4,_=h.matrixWorldInverse;a.getNormalMatrix(_),(b===null||b.length0){let c=i.getRenderTarget(),d=new kp(l.height/2);return d.fromEquirectangularTexture(i,s),t.set(s,d),i.setRenderTarget(c),s.addEventListener("dispose",r),e(d.texture,s.mapping)}else return null}}return s}function r(s){let a=s.target;a.removeEventListener("dispose",r);let l=t.get(a);l!==void 0&&(t.delete(a),l.dispose())}function o(){t=new WeakMap}return{get:n,dispose:o}}var ou=class extends iu{constructor(t=-1,e=1,n=1,r=-1,o=.1,s=2e3){super(),this.type="OrthographicCamera",this.zoom=1,this.view=null,this.left=t,this.right=e,this.top=n,this.bottom=r,this.near=o,this.far=s,this.updateProjectionMatrix()}copy(t,e){return super.copy(t,e),this.left=t.left,this.right=t.right,this.top=t.top,this.bottom=t.bottom,this.near=t.near,this.far=t.far,this.zoom=t.zoom,this.view=t.view===null?null:Object.assign({},t.view),this}setViewOffset(t,e,n,r,o,s){this.view===null&&(this.view={enabled:!0,fullWidth:1,fullHeight:1,offsetX:0,offsetY:0,width:1,height:1}),this.view.enabled=!0,this.view.fullWidth=t,this.view.fullHeight=e,this.view.offsetX=n,this.view.offsetY=r,this.view.width=o,this.view.height=s,this.updateProjectionMatrix()}clearViewOffset(){this.view!==null&&(this.view.enabled=!1),this.updateProjectionMatrix()}updateProjectionMatrix(){let t=(this.right-this.left)/(2*this.zoom),e=(this.top-this.bottom)/(2*this.zoom),n=(this.right+this.left)/2,r=(this.top+this.bottom)/2,o=n-t,s=n+t,a=r+e,l=r-e;if(this.view!==null&&this.view.enabled){let c=(this.right-this.left)/this.view.fullWidth/this.zoom,d=(this.top-this.bottom)/this.view.fullHeight/this.zoom;o+=c*this.view.offsetX,s=o+c*this.view.width,a-=d*this.view.offsetY,l=a-d*this.view.height}this.projectionMatrix.makeOrthographic(o,s,a,l,this.near,this.far),this.projectionMatrixInverse.copy(this.projectionMatrix).invert()}toJSON(t){let e=super.toJSON(t);return e.object.zoom=this.zoom,e.object.left=this.left,e.object.right=this.right,e.object.top=this.top,e.object.bottom=this.bottom,e.object.near=this.near,e.object.far=this.far,this.view!==null&&(e.object.view=Object.assign({},this.view)),e}};ou.prototype.isOrthographicCamera=!0;var uc=class extends Es{constructor(t){super(t),this.type="RawShaderMaterial"}};uc.prototype.isRawShaderMaterial=!0;var Ip=4,ac=8,ta=Math.pow(2,ac),Q4=[.125,.215,.35,.446,.526,.582],Z4=ac-Ip+1+Q4.length,gp=20,hc={[pr]:0,[_c]:1,[pC]:2,[uP]:3,[hP]:4,[pP]:5,[hC]:6},eO=new ou,{_lodPlanes:Og,_sizeLods:rU,_sigmas:Wx}=kse(),oU=new Xe,tO=null,$d=(1+Math.sqrt(5))/2,_p=1/$d,sU=[new P(1,1,1),new P(-1,1,1),new P(1,1,-1),new P(-1,1,-1),new P(0,$d,_p),new P(0,$d,-_p),new P(_p,0,$d),new P(-_p,0,$d),new P($d,_p,0),new P(-$d,_p,0)],Iw=class{constructor(t){this._renderer=t,this._pingPongRenderTarget=null,this._blurMaterial=Lse(gp),this._equirectShader=null,this._cubemapShader=null,this._compileMaterial(this._blurMaterial)}fromScene(t,e=0,n=.1,r=100){tO=this._renderer.getRenderTarget();let o=this._allocateTargets();return this._sceneToCubeUV(t,n,r,o),e>0&&this._blur(o,0,0,e),this._applyPMREM(o),this._cleanup(o),o}fromEquirectangular(t){return this._fromTexture(t)}fromCubemap(t){return this._fromTexture(t)}compileCubemapShader(){this._cubemapShader===null&&(this._cubemapShader=cU(),this._compileMaterial(this._cubemapShader))}compileEquirectangularShader(){this._equirectShader===null&&(this._equirectShader=lU(),this._compileMaterial(this._equirectShader))}dispose(){this._blurMaterial.dispose(),this._cubemapShader!==null&&this._cubemapShader.dispose(),this._equirectShader!==null&&this._equirectShader.dispose();for(let t=0;t2?ta:0,ta,ta),d.setRenderTarget(r),b&&d.render(m,a),d.render(t,a)}m.geometry.dispose(),m.material.dispose(),d.toneMapping=p,d.outputEncoding=h,d.autoClear=u,t.background=g}_setEncoding(t,e){this._renderer.capabilities.isWebGL2===!0&&e.format===ur&&e.type===el&&e.encoding===_c?t.value=hc[pr]:t.value=hc[e.encoding]}_textureToCubeUV(t,e){let n=this._renderer,r=t.mapping===_u||t.mapping===vu;r?this._cubemapShader==null&&(this._cubemapShader=cU()):this._equirectShader==null&&(this._equirectShader=lU());let o=r?this._cubemapShader:this._equirectShader,s=new yi(Og[0],o),a=o.uniforms;a.envMap.value=t,r||a.texelSize.value.set(1/t.image.width,1/t.image.height),this._setEncoding(a.inputEncoding,t),this._setEncoding(a.outputEncoding,e.texture),$x(e,0,0,3*ta,2*ta),n.setRenderTarget(e),n.render(s,eO)}_applyPMREM(t){let e=this._renderer,n=e.autoClear;e.autoClear=!1;for(let r=1;rgp&&console.warn(`sigmaRadians, ${o}, is too large and will clip, as it requested ${b} samples when the maximum is set to ${gp}`);let g=[],_=0;for(let D=0;Dac-Ip?r-ac+Ip:0);$x(e,C,T,3*x,2*x),l.setRenderTarget(e),l.render(u,eO)}};function Nse(i){return i===void 0||i.type!==el?!1:i.encoding===pr||i.encoding===_c||i.encoding===hC}function kse(){let i=[],t=[],e=[],n=ac;for(let r=0;rac-Ip?s=Q4[r-ac+Ip-1]:r==0&&(s=0),e.push(s);let a=1/(o-1),l=-a/2,c=1+a/2,d=[l,l,c,l,c,c,l,l,c,c,l,c],u=6,h=6,p=3,f=2,m=1,b=new Float32Array(p*h*u),g=new Float32Array(f*h*u),_=new Float32Array(m*h*u);for(let C=0;C2?0:-1,E=[T,D,0,T+2/3,D,0,T+2/3,D+1,0,T,D,0,T+2/3,D+1,0,T,D+1,0];b.set(E,p*h*C),g.set(d,f*h*C);let A=[C,C,C,C,C,C];_.set(A,m*h*C)}let x=new Pt;x.setAttribute("position",new hn(b,p)),x.setAttribute("uv",new hn(g,f)),x.setAttribute("faceIndex",new hn(_,m)),i.push(x),n>Ip&&n--}return{_lodPlanes:i,_sizeLods:t,_sigmas:e}}function aU(i){let t=new Oo(3*ta,3*ta,i);return t.texture.mapping=ef,t.texture.name="PMREM.cubeUv",t.scissorTest=!0,t}function $x(i,t,e,n,r){i.viewport.set(t,e,n,r),i.scissor.set(t,e,n,r)}function Lse(i){let t=new Float32Array(i),e=new P(0,1,0);return new uc({name:"SphericalGaussianBlur",defines:{n:i},uniforms:{envMap:{value:null},samples:{value:1},weights:{value:t},latitudinal:{value:!1},dTheta:{value:0},mipInt:{value:0},poleAxis:{value:e},inputEncoding:{value:hc[pr]},outputEncoding:{value:hc[pr]}},vertexShader:mP(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + uniform int samples; + uniform float weights[ n ]; + uniform bool latitudinal; + uniform float dTheta; + uniform float mipInt; + uniform vec3 poleAxis; + + ${gP()} + + #define ENVMAP_TYPE_CUBE_UV + #include + + vec3 getSample( float theta, vec3 axis ) { + + float cosTheta = cos( theta ); + // Rodrigues' axis-angle rotation + vec3 sampleDirection = vOutputDirection * cosTheta + + cross( axis, vOutputDirection ) * sin( theta ) + + axis * dot( axis, vOutputDirection ) * ( 1.0 - cosTheta ); + + return bilinearCubeUV( envMap, sampleDirection, mipInt ); + + } + + void main() { + + vec3 axis = latitudinal ? poleAxis : cross( poleAxis, vOutputDirection ); + + if ( all( equal( axis, vec3( 0.0 ) ) ) ) { + + axis = vec3( vOutputDirection.z, 0.0, - vOutputDirection.x ); + + } + + axis = normalize( axis ); + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + gl_FragColor.rgb += weights[ 0 ] * getSample( 0.0, axis ); + + for ( int i = 1; i < n; i++ ) { + + if ( i >= samples ) { + + break; + + } + + float theta = dTheta * float( i ); + gl_FragColor.rgb += weights[ i ] * getSample( -1.0 * theta, axis ); + gl_FragColor.rgb += weights[ i ] * getSample( theta, axis ); + + } + + gl_FragColor = linearToOutputTexel( gl_FragColor ); + + } + `,blending:Ka,depthTest:!1,depthWrite:!1})}function lU(){let i=new xe(1,1);return new uc({name:"EquirectangularToCubeUV",uniforms:{envMap:{value:null},texelSize:{value:i},inputEncoding:{value:hc[pr]},outputEncoding:{value:hc[pr]}},vertexShader:mP(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform sampler2D envMap; + uniform vec2 texelSize; + + ${gP()} + + #include + + void main() { + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + + vec3 outputDirection = normalize( vOutputDirection ); + vec2 uv = equirectUv( outputDirection ); + + vec2 f = fract( uv / texelSize - 0.5 ); + uv -= f * texelSize; + vec3 tl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; + uv.x += texelSize.x; + vec3 tr = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; + uv.y += texelSize.y; + vec3 br = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; + uv.x -= texelSize.x; + vec3 bl = envMapTexelToLinear( texture2D ( envMap, uv ) ).rgb; + + vec3 tm = mix( tl, tr, f.x ); + vec3 bm = mix( bl, br, f.x ); + gl_FragColor.rgb = mix( tm, bm, f.y ); + + gl_FragColor = linearToOutputTexel( gl_FragColor ); + + } + `,blending:Ka,depthTest:!1,depthWrite:!1})}function cU(){return new uc({name:"CubemapToCubeUV",uniforms:{envMap:{value:null},inputEncoding:{value:hc[pr]},outputEncoding:{value:hc[pr]}},vertexShader:mP(),fragmentShader:` + + precision mediump float; + precision mediump int; + + varying vec3 vOutputDirection; + + uniform samplerCube envMap; + + ${gP()} + + void main() { + + gl_FragColor = vec4( 0.0, 0.0, 0.0, 1.0 ); + gl_FragColor.rgb = envMapTexelToLinear( textureCube( envMap, vec3( - vOutputDirection.x, vOutputDirection.yz ) ) ).rgb; + gl_FragColor = linearToOutputTexel( gl_FragColor ); + + } + `,blending:Ka,depthTest:!1,depthWrite:!1})}function mP(){return` + + precision mediump float; + precision mediump int; + + attribute vec3 position; + attribute vec2 uv; + attribute float faceIndex; + + varying vec3 vOutputDirection; + + // RH coordinate system; PMREM face-indexing convention + vec3 getDirection( vec2 uv, float face ) { + + uv = 2.0 * uv - 1.0; + + vec3 direction = vec3( uv, 1.0 ); + + if ( face == 0.0 ) { + + direction = direction.zyx; // ( 1, v, u ) pos x + + } else if ( face == 1.0 ) { + + direction = direction.xzy; + direction.xz *= -1.0; // ( -u, 1, -v ) pos y + + } else if ( face == 2.0 ) { + + direction.x *= -1.0; // ( -u, v, 1 ) pos z + + } else if ( face == 3.0 ) { + + direction = direction.zyx; + direction.xz *= -1.0; // ( -1, v, -u ) neg x + + } else if ( face == 4.0 ) { + + direction = direction.xzy; + direction.xy *= -1.0; // ( -u, -1, v ) neg y + + } else if ( face == 5.0 ) { + + direction.z *= -1.0; // ( u, v, -1 ) neg z + + } + + return direction; + + } + + void main() { + + vOutputDirection = getDirection( uv, faceIndex ); + gl_Position = vec4( position, 1.0 ); + + } + `}function gP(){return` + + uniform int inputEncoding; + uniform int outputEncoding; + + #include + + vec4 inputTexelToLinear( vec4 value ) { + + if ( inputEncoding == 0 ) { + + return value; + + } else if ( inputEncoding == 1 ) { + + return sRGBToLinear( value ); + + } else if ( inputEncoding == 2 ) { + + return RGBEToLinear( value ); + + } else if ( inputEncoding == 3 ) { + + return RGBMToLinear( value, 7.0 ); + + } else if ( inputEncoding == 4 ) { + + return RGBMToLinear( value, 16.0 ); + + } else if ( inputEncoding == 5 ) { + + return RGBDToLinear( value, 256.0 ); + + } else { + + return GammaToLinear( value, 2.2 ); + + } + + } + + vec4 linearToOutputTexel( vec4 value ) { + + if ( outputEncoding == 0 ) { + + return value; + + } else if ( outputEncoding == 1 ) { + + return LinearTosRGB( value ); + + } else if ( outputEncoding == 2 ) { + + return LinearToRGBE( value ); + + } else if ( outputEncoding == 3 ) { + + return LinearToRGBM( value, 7.0 ); + + } else if ( outputEncoding == 4 ) { + + return LinearToRGBM( value, 16.0 ); + + } else if ( outputEncoding == 5 ) { + + return LinearToRGBD( value, 256.0 ); + + } else { + + return LinearToGamma( value, 2.2 ); + + } + + } + + vec4 envMapTexelToLinear( vec4 color ) { + + return inputTexelToLinear( color ); + + } + `}function Fse(i){let t=new WeakMap,e=null;function n(a){if(a&&a.isTexture&&a.isRenderTargetTexture===!1){let l=a.mapping,c=l===Hg||l===Gg,d=l===_u||l===vu;if(c||d){if(t.has(a))return t.get(a).texture;{let u=a.image;if(c&&u&&u.height>0||d&&u&&r(u)){let h=i.getRenderTarget();e===null&&(e=new Iw(i));let p=c?e.fromEquirectangular(a):e.fromCubemap(a);return t.set(a,p),i.setRenderTarget(h),a.addEventListener("dispose",o),p.texture}else return null}}}return a}function r(a){let l=0,c=6;for(let d=0;d65535?Rp:Pp)(h,1);b.version=m;let g=o.get(u);g&&t.remove(g),o.set(u,b)}function d(u){let h=o.get(u);if(h){let p=u.index;p!==null&&h.versiont.maxTextureSize&&(A=Math.ceil(E/t.maxTextureSize),E=t.maxTextureSize);let Q=new Float32Array(E*A*4*f),F=new Fp(Q,E,A,f);F.format=ur,F.type=na;let z=D*4;for(let O=0;O0)return i;let r=t*e,o=uU[r];if(o===void 0&&(o=new Float32Array(r),uU[r]=o),t!==0){n.toArray(o,0);for(let s=1,a=0;s!==t;++s)a+=e,i[s].toArray(o,a)}return o}function Zr(i,t){if(i.length!==t.length)return!1;for(let e=0,n=i.length;e/gm;function OO(i){return i.replace(Uae,Hae)}function Hae(i,t){let e=ln[t];if(e===void 0)throw new Error("Can not resolve #include <"+t+">");return OO(e)}var Gae=/#pragma unroll_loop[\s]+?for \( int i \= (\d+)\; i < (\d+)\; i \+\+ \) \{([\s\S]+?)(?=\})\}/g,jae=/#pragma unroll_loop_start\s+for\s*\(\s*int\s+i\s*=\s*(\d+)\s*;\s*i\s*<\s*(\d+)\s*;\s*i\s*\+\+\s*\)\s*{([\s\S]+?)}\s+#pragma unroll_loop_end/g;function xU(i){return i.replace(jae,rG).replace(Gae,Wae)}function Wae(i,t,e,n){return console.warn("WebGLProgram: #pragma unroll_loop shader syntax is deprecated. Please use #pragma unroll_loop_start syntax instead."),rG(i,t,e,n)}function rG(i,t,e,n){let r="";for(let o=parseInt(t);o0?i.gammaFactor:1,p=e.isWebGL2?"":Bae(e),f=Vae(o),m=r.createProgram(),b,g,_=e.glslVersion?"#version "+e.glslVersion+` +`:"";e.isRawShaderMaterial?(b=[f].filter(Lg).join(` +`),b.length>0&&(b+=` +`),g=[p,f].filter(Lg).join(` +`),g.length>0&&(g+=` +`)):(b=[wU(e),"#define SHADER_NAME "+e.shaderName,f,e.instancing?"#define USE_INSTANCING":"",e.instancingColor?"#define USE_INSTANCING_COLOR":"",e.supportsVertexTextures?"#define VERTEX_TEXTURES":"","#define GAMMA_FACTOR "+h,"#define MAX_BONES "+e.maxBones,e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+d:"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMap&&e.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",e.normalMap&&e.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.displacementMap&&e.supportsVertexTextures?"#define USE_DISPLACEMENTMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",e.specularColorMap?"#define USE_SPECULARCOLORMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.transmission?"#define USE_TRANSMISSION":"",e.transmissionMap?"#define USE_TRANSMISSIONMAP":"",e.thicknessMap?"#define USE_THICKNESSMAP":"",e.sheenColorMap?"#define USE_SHEENCOLORMAP":"",e.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",e.vertexTangents?"#define USE_TANGENT":"",e.vertexColors?"#define USE_COLOR":"",e.vertexAlphas?"#define USE_COLOR_ALPHA":"",e.vertexUvs?"#define USE_UV":"",e.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",e.flatShading?"#define FLAT_SHADED":"",e.skinning?"#define USE_SKINNING":"",e.useVertexTexture?"#define BONE_TEXTURE":"",e.morphTargets?"#define USE_MORPHTARGETS":"",e.morphNormals&&e.flatShading===!1?"#define USE_MORPHNORMALS":"",e.morphTargets&&e.isWebGL2?"#define MORPHTARGETS_TEXTURE":"",e.morphTargets&&e.isWebGL2?"#define MORPHTARGETS_COUNT "+e.morphTargetsCount:"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+l:"",e.sizeAttenuation?"#define USE_SIZEATTENUATION":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",e.logarithmicDepthBuffer&&e.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"","uniform mat4 modelMatrix;","uniform mat4 modelViewMatrix;","uniform mat4 projectionMatrix;","uniform mat4 viewMatrix;","uniform mat3 normalMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;","#ifdef USE_INSTANCING"," attribute mat4 instanceMatrix;","#endif","#ifdef USE_INSTANCING_COLOR"," attribute vec3 instanceColor;","#endif","attribute vec3 position;","attribute vec3 normal;","attribute vec2 uv;","#ifdef USE_TANGENT"," attribute vec4 tangent;","#endif","#if defined( USE_COLOR_ALPHA )"," attribute vec4 color;","#elif defined( USE_COLOR )"," attribute vec3 color;","#endif","#if ( defined( USE_MORPHTARGETS ) && ! defined( MORPHTARGETS_TEXTURE ) )"," attribute vec3 morphTarget0;"," attribute vec3 morphTarget1;"," attribute vec3 morphTarget2;"," attribute vec3 morphTarget3;"," #ifdef USE_MORPHNORMALS"," attribute vec3 morphNormal0;"," attribute vec3 morphNormal1;"," attribute vec3 morphNormal2;"," attribute vec3 morphNormal3;"," #else"," attribute vec3 morphTarget4;"," attribute vec3 morphTarget5;"," attribute vec3 morphTarget6;"," attribute vec3 morphTarget7;"," #endif","#endif","#ifdef USE_SKINNING"," attribute vec4 skinIndex;"," attribute vec4 skinWeight;","#endif",` +`].filter(Lg).join(` +`),g=[p,wU(e),"#define SHADER_NAME "+e.shaderName,f,"#define GAMMA_FACTOR "+h,e.useFog&&e.fog?"#define USE_FOG":"",e.useFog&&e.fogExp2?"#define FOG_EXP2":"",e.map?"#define USE_MAP":"",e.matcap?"#define USE_MATCAP":"",e.envMap?"#define USE_ENVMAP":"",e.envMap?"#define "+c:"",e.envMap?"#define "+d:"",e.envMap?"#define "+u:"",e.lightMap?"#define USE_LIGHTMAP":"",e.aoMap?"#define USE_AOMAP":"",e.emissiveMap?"#define USE_EMISSIVEMAP":"",e.bumpMap?"#define USE_BUMPMAP":"",e.normalMap?"#define USE_NORMALMAP":"",e.normalMap&&e.objectSpaceNormalMap?"#define OBJECTSPACE_NORMALMAP":"",e.normalMap&&e.tangentSpaceNormalMap?"#define TANGENTSPACE_NORMALMAP":"",e.clearcoat?"#define USE_CLEARCOAT":"",e.clearcoatMap?"#define USE_CLEARCOATMAP":"",e.clearcoatRoughnessMap?"#define USE_CLEARCOAT_ROUGHNESSMAP":"",e.clearcoatNormalMap?"#define USE_CLEARCOAT_NORMALMAP":"",e.specularMap?"#define USE_SPECULARMAP":"",e.specularIntensityMap?"#define USE_SPECULARINTENSITYMAP":"",e.specularColorMap?"#define USE_SPECULARCOLORMAP":"",e.roughnessMap?"#define USE_ROUGHNESSMAP":"",e.metalnessMap?"#define USE_METALNESSMAP":"",e.alphaMap?"#define USE_ALPHAMAP":"",e.alphaTest?"#define USE_ALPHATEST":"",e.sheen?"#define USE_SHEEN":"",e.sheenColorMap?"#define USE_SHEENCOLORMAP":"",e.sheenRoughnessMap?"#define USE_SHEENROUGHNESSMAP":"",e.transmission?"#define USE_TRANSMISSION":"",e.transmissionMap?"#define USE_TRANSMISSIONMAP":"",e.thicknessMap?"#define USE_THICKNESSMAP":"",e.vertexTangents?"#define USE_TANGENT":"",e.vertexColors||e.instancingColor?"#define USE_COLOR":"",e.vertexAlphas?"#define USE_COLOR_ALPHA":"",e.vertexUvs?"#define USE_UV":"",e.uvsVertexOnly?"#define UVS_VERTEX_ONLY":"",e.gradientMap?"#define USE_GRADIENTMAP":"",e.flatShading?"#define FLAT_SHADED":"",e.doubleSided?"#define DOUBLE_SIDED":"",e.flipSided?"#define FLIP_SIDED":"",e.shadowMapEnabled?"#define USE_SHADOWMAP":"",e.shadowMapEnabled?"#define "+l:"",e.premultipliedAlpha?"#define PREMULTIPLIED_ALPHA":"",e.physicallyCorrectLights?"#define PHYSICALLY_CORRECT_LIGHTS":"",e.logarithmicDepthBuffer?"#define USE_LOGDEPTHBUF":"",e.logarithmicDepthBuffer&&e.rendererExtensionFragDepth?"#define USE_LOGDEPTHBUF_EXT":"",(e.extensionShaderTextureLOD||e.envMap)&&e.rendererExtensionShaderTextureLod?"#define TEXTURE_LOD_EXT":"","uniform mat4 viewMatrix;","uniform vec3 cameraPosition;","uniform bool isOrthographic;",e.toneMapping!==sc?"#define TONE_MAPPING":"",e.toneMapping!==sc?ln.tonemapping_pars_fragment:"",e.toneMapping!==sc?Fae("toneMapping",e.toneMapping):"",e.dithering?"#define DITHERING":"",e.format===Zd?"#define OPAQUE":"",ln.encodings_pars_fragment,e.map?Ud("mapTexelToLinear",e.mapEncoding):"",e.matcap?Ud("matcapTexelToLinear",e.matcapEncoding):"",e.envMap?Ud("envMapTexelToLinear",e.envMapEncoding):"",e.emissiveMap?Ud("emissiveMapTexelToLinear",e.emissiveMapEncoding):"",e.specularColorMap?Ud("specularColorMapTexelToLinear",e.specularColorMapEncoding):"",e.sheenColorMap?Ud("sheenColorMapTexelToLinear",e.sheenColorMapEncoding):"",e.lightMap?Ud("lightMapTexelToLinear",e.lightMapEncoding):"",Lae("linearToOutputTexel",e.outputEncoding),e.depthPacking?"#define DEPTH_PACKING "+e.depthPacking:"",` +`].filter(Lg).join(` +`)),s=OO(s),s=yU(s,e),s=bU(s,e),a=OO(a),a=yU(a,e),a=bU(a,e),s=xU(s),a=xU(a),e.isWebGL2&&e.isRawShaderMaterial!==!0&&(_=`#version 300 es +`,b=["precision mediump sampler2DArray;","#define attribute in","#define varying out","#define texture2D texture"].join(` +`)+` +`+b,g=["#define varying in",e.glslVersion===TO?"":"out highp vec4 pc_fragColor;",e.glslVersion===TO?"":"#define gl_FragColor pc_fragColor","#define gl_FragDepthEXT gl_FragDepth","#define texture2D texture","#define textureCube texture","#define texture2DProj textureProj","#define texture2DLodEXT textureLod","#define texture2DProjLodEXT textureProjLod","#define textureCubeLodEXT textureLod","#define texture2DGradEXT textureGrad","#define texture2DProjGradEXT textureProjGrad","#define textureCubeGradEXT textureGrad"].join(` +`)+` +`+g);let x=_+b+s,C=_+g+a,T=_U(r,35633,x),D=_U(r,35632,C);if(r.attachShader(m,T),r.attachShader(m,D),e.index0AttributeName!==void 0?r.bindAttribLocation(m,0,e.index0AttributeName):e.morphTargets===!0&&r.bindAttribLocation(m,0,"position"),r.linkProgram(m),i.debug.checkShaderErrors){let Q=r.getProgramInfoLog(m).trim(),F=r.getShaderInfoLog(T).trim(),z=r.getShaderInfoLog(D).trim(),O=!0,G=!0;if(r.getProgramParameter(m,35714)===!1){O=!1;let $=vU(r,T,"vertex"),Y=vU(r,D,"fragment");console.error("THREE.WebGLProgram: Shader Error "+r.getError()+" - VALIDATE_STATUS "+r.getProgramParameter(m,35715)+` + +Program Info Log: `+Q+` +`+$+` +`+Y)}else Q!==""?console.warn("THREE.WebGLProgram: Program Info Log:",Q):(F===""||z==="")&&(G=!1);G&&(this.diagnostics={runnable:O,programLog:Q,vertexShader:{log:F,prefix:b},fragmentShader:{log:z,prefix:g}})}r.deleteShader(T),r.deleteShader(D);let E;this.getUniforms=function(){return E===void 0&&(E=new lc(r,m)),E};let A;return this.getAttributes=function(){return A===void 0&&(A=zae(r,m)),A},this.destroy=function(){n.releaseStatesOfProgram(this),r.deleteProgram(m),this.program=void 0},this.name=e.shaderName,this.id=Nae++,this.cacheKey=t,this.usedTimes=1,this.program=m,this.vertexShader=T,this.fragmentShader=D,this}function Zae(i,t,e,n,r,o,s){let a=[],l=r.isWebGL2,c=r.logarithmicDepthBuffer,d=r.floatVertexTextures,u=r.maxVertexUniforms,h=r.vertexTextures,p=r.precision,f={MeshDepthMaterial:"depth",MeshDistanceMaterial:"distanceRGBA",MeshNormalMaterial:"normal",MeshBasicMaterial:"basic",MeshLambertMaterial:"lambert",MeshPhongMaterial:"phong",MeshToonMaterial:"toon",MeshStandardMaterial:"physical",MeshPhysicalMaterial:"physical",MeshMatcapMaterial:"matcap",LineBasicMaterial:"basic",LineDashedMaterial:"dashed",PointsMaterial:"points",ShadowMaterial:"shadow",SpriteMaterial:"sprite"},m=["precision","isWebGL2","supportsVertexTextures","outputEncoding","instancing","instancingColor","map","mapEncoding","matcap","matcapEncoding","envMap","envMapMode","envMapEncoding","envMapCubeUV","lightMap","lightMapEncoding","aoMap","emissiveMap","emissiveMapEncoding","bumpMap","normalMap","objectSpaceNormalMap","tangentSpaceNormalMap","clearcoat","clearcoatMap","clearcoatRoughnessMap","clearcoatNormalMap","displacementMap","specularMap",,"roughnessMap","metalnessMap","gradientMap","alphaMap","alphaTest","combine","vertexColors","vertexAlphas","vertexTangents","vertexUvs","uvsVertexOnly","fog","useFog","fogExp2","flatShading","sizeAttenuation","logarithmicDepthBuffer","skinning","maxBones","useVertexTexture","morphTargets","morphNormals","morphTargetsCount","premultipliedAlpha","numDirLights","numPointLights","numSpotLights","numHemiLights","numRectAreaLights","numDirLightShadows","numPointLightShadows","numSpotLightShadows","shadowMapEnabled","shadowMapType","toneMapping","physicallyCorrectLights","doubleSided","flipSided","numClippingPlanes","numClipIntersection","depthPacking","dithering","format","specularIntensityMap","specularColorMap","specularColorMapEncoding","transmission","transmissionMap","thicknessMap","sheen","sheenColorMap","sheenColorMapEncoding","sheenRoughnessMap"];function b(E){let Q=E.skeleton.bones;if(d)return 1024;{let z=Math.floor((u-20)/4),O=Math.min(z,Q.length);return O0,Ee=E.clearcoat>0;return{isWebGL2:l,shaderID:Y,shaderName:E.type,vertexShader:j,fragmentShader:K,defines:E.defines,isRawShaderMaterial:E.isRawShaderMaterial===!0,glslVersion:E.glslVersion,precision:p,instancing:z.isInstancedMesh===!0,instancingColor:z.isInstancedMesh===!0&&z.instanceColor!==null,supportsVertexTextures:h,outputEncoding:de!==null?g(de.texture):i.outputEncoding,map:!!E.map,mapEncoding:g(E.map),matcap:!!E.matcap,matcapEncoding:g(E.matcap),envMap:!!$,envMapMode:$&&$.mapping,envMapEncoding:g($),envMapCubeUV:!!$&&($.mapping===ef||$.mapping===$_),lightMap:!!E.lightMap,lightMapEncoding:g(E.lightMap),aoMap:!!E.aoMap,emissiveMap:!!E.emissiveMap,emissiveMapEncoding:g(E.emissiveMap),bumpMap:!!E.bumpMap,normalMap:!!E.normalMap,objectSpaceNormalMap:E.normalMapType===G4,tangentSpaceNormalMap:E.normalMapType===bu,clearcoat:Ee,clearcoatMap:Ee&&!!E.clearcoatMap,clearcoatRoughnessMap:Ee&&!!E.clearcoatRoughnessMap,clearcoatNormalMap:Ee&&!!E.clearcoatNormalMap,displacementMap:!!E.displacementMap,roughnessMap:!!E.roughnessMap,metalnessMap:!!E.metalnessMap,specularMap:!!E.specularMap,specularIntensityMap:!!E.specularIntensityMap,specularColorMap:!!E.specularColorMap,specularColorMapEncoding:g(E.specularColorMap),alphaMap:!!E.alphaMap,alphaTest:Te,gradientMap:!!E.gradientMap,sheen:E.sheen>0,sheenColorMap:!!E.sheenColorMap,sheenColorMapEncoding:g(E.sheenColorMap),sheenRoughnessMap:!!E.sheenRoughnessMap,transmission:E.transmission>0,transmissionMap:!!E.transmissionMap,thicknessMap:!!E.thicknessMap,combine:E.combine,vertexTangents:!!E.normalMap&&!!z.geometry&&!!z.geometry.attributes.tangent,vertexColors:E.vertexColors,vertexAlphas:E.vertexColors===!0&&!!z.geometry&&!!z.geometry.attributes.color&&z.geometry.attributes.color.itemSize===4,vertexUvs:!!E.map||!!E.bumpMap||!!E.normalMap||!!E.specularMap||!!E.alphaMap||!!E.emissiveMap||!!E.roughnessMap||!!E.metalnessMap||!!E.clearcoatMap||!!E.clearcoatRoughnessMap||!!E.clearcoatNormalMap||!!E.displacementMap||!!E.transmissionMap||!!E.thicknessMap||!!E.specularIntensityMap||!!E.specularColorMap||!!E.sheenColorMap||E.sheenRoughnessMap,uvsVertexOnly:!(E.map||E.bumpMap||E.normalMap||E.specularMap||E.alphaMap||E.emissiveMap||E.roughnessMap||E.metalnessMap||E.clearcoatNormalMap||E.transmission>0||E.transmissionMap||E.thicknessMap||E.specularIntensityMap||E.specularColorMap||!!E.sheen>0||E.sheenColorMap||E.sheenRoughnessMap)&&!!E.displacementMap,fog:!!O,useFog:E.fog,fogExp2:O&&O.isFogExp2,flatShading:!!E.flatShading,sizeAttenuation:E.sizeAttenuation,logarithmicDepthBuffer:c,skinning:z.isSkinnedMesh===!0&&k>0,maxBones:k,useVertexTexture:d,morphTargets:!!z.geometry&&!!z.geometry.morphAttributes.position,morphNormals:!!z.geometry&&!!z.geometry.morphAttributes.normal,morphTargetsCount:z.geometry&&z.geometry.morphAttributes.position?z.geometry.morphAttributes.position.length:0,numDirLights:A.directional.length,numPointLights:A.point.length,numSpotLights:A.spot.length,numRectAreaLights:A.rectArea.length,numHemiLights:A.hemi.length,numDirLightShadows:A.directionalShadowMap.length,numPointLightShadows:A.pointShadowMap.length,numSpotLightShadows:A.spotShadowMap.length,numClippingPlanes:s.numPlanes,numClipIntersection:s.numIntersection,format:E.format,dithering:E.dithering,shadowMapEnabled:i.shadowMap.enabled&&Q.length>0,shadowMapType:i.shadowMap.type,toneMapping:E.toneMapped?i.toneMapping:sc,physicallyCorrectLights:i.physicallyCorrectLights,premultipliedAlpha:E.premultipliedAlpha,doubleSided:E.side===tu,flipSided:E.side===Ti,depthPacking:E.depthPacking!==void 0?E.depthPacking:!1,index0AttributeName:E.index0AttributeName,extensionDerivatives:E.extensions&&E.extensions.derivatives,extensionFragDepth:E.extensions&&E.extensions.fragDepth,extensionDrawBuffers:E.extensions&&E.extensions.drawBuffers,extensionShaderTextureLOD:E.extensions&&E.extensions.shaderTextureLOD,rendererExtensionFragDepth:l||n.has("EXT_frag_depth"),rendererExtensionDrawBuffers:l||n.has("WEBGL_draw_buffers"),rendererExtensionShaderTextureLod:l||n.has("EXT_shader_texture_lod"),customProgramCacheKey:E.customProgramCacheKey()}}function x(E){let A=[];if(E.shaderID?A.push(E.shaderID):(A.push(Wz(E.fragmentShader)),A.push(Wz(E.vertexShader))),E.defines!==void 0)for(let Q in E.defines)A.push(Q),A.push(E.defines[Q]);if(E.isRawShaderMaterial===!1){for(let Q=0;Q0?r.push(x):m.transparent===!0?o.push(x):n.push(x)}function d(p,f,m,b,g,_){let x=l(p,f,m,b,g,_);m.transmission>0?r.unshift(x):m.transparent===!0?o.unshift(x):n.unshift(x)}function u(p,f){n.length>1&&n.sort(p||Jae),r.length>1&&r.sort(f||CU),o.length>1&&o.sort(f||CU)}function h(){for(let p=e,f=t.length;p=t.get(r).length?(s=new SU(i),t.get(r).push(s)):s=t.get(r)[o],s}function n(){t=new WeakMap}return{get:e,dispose:n}}function tle(){let i={};return{get:function(t){if(i[t.id]!==void 0)return i[t.id];let e;switch(t.type){case"DirectionalLight":e={direction:new P,color:new Xe};break;case"SpotLight":e={position:new P,direction:new P,color:new Xe,distance:0,coneCos:0,penumbraCos:0,decay:0};break;case"PointLight":e={position:new P,color:new Xe,distance:0,decay:0};break;case"HemisphereLight":e={direction:new P,skyColor:new Xe,groundColor:new Xe};break;case"RectAreaLight":e={color:new Xe,position:new P,halfWidth:new P,halfHeight:new P};break}return i[t.id]=e,e}}}function nle(){let i={};return{get:function(t){if(i[t.id]!==void 0)return i[t.id];let e;switch(t.type){case"DirectionalLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"SpotLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe};break;case"PointLight":e={shadowBias:0,shadowNormalBias:0,shadowRadius:1,shadowMapSize:new xe,shadowCameraNear:1,shadowCameraFar:1e3};break}return i[t.id]=e,e}}}var ile=0;function rle(i,t){return(t.castShadow?1:0)-(i.castShadow?1:0)}function ole(i,t){let e=new tle,n=nle(),r={version:0,hash:{directionalLength:-1,pointLength:-1,spotLength:-1,rectAreaLength:-1,hemiLength:-1,numDirectionalShadows:-1,numPointShadows:-1,numSpotShadows:-1},ambient:[0,0,0],probe:[],directional:[],directionalShadow:[],directionalShadowMap:[],directionalShadowMatrix:[],spot:[],spotShadow:[],spotShadowMap:[],spotShadowMatrix:[],rectArea:[],rectAreaLTC1:null,rectAreaLTC2:null,point:[],pointShadow:[],pointShadowMap:[],pointShadowMatrix:[],hemi:[]};for(let d=0;d<9;d++)r.probe.push(new P);let o=new P,s=new ut,a=new ut;function l(d,u){let h=0,p=0,f=0;for(let Q=0;Q<9;Q++)r.probe[Q].set(0,0,0);let m=0,b=0,g=0,_=0,x=0,C=0,T=0,D=0;d.sort(rle);let E=u!==!0?Math.PI:1;for(let Q=0,F=d.length;Q0&&(t.isWebGL2||i.has("OES_texture_float_linear")===!0?(r.rectAreaLTC1=He.LTC_FLOAT_1,r.rectAreaLTC2=He.LTC_FLOAT_2):i.has("OES_texture_half_float_linear")===!0?(r.rectAreaLTC1=He.LTC_HALF_1,r.rectAreaLTC2=He.LTC_HALF_2):console.error("THREE.WebGLRenderer: Unable to use RectAreaLight. Missing WebGL extensions.")),r.ambient[0]=h,r.ambient[1]=p,r.ambient[2]=f;let A=r.hash;(A.directionalLength!==m||A.pointLength!==b||A.spotLength!==g||A.rectAreaLength!==_||A.hemiLength!==x||A.numDirectionalShadows!==C||A.numPointShadows!==T||A.numSpotShadows!==D)&&(r.directional.length=m,r.spot.length=g,r.rectArea.length=_,r.point.length=b,r.hemi.length=x,r.directionalShadow.length=C,r.directionalShadowMap.length=C,r.pointShadow.length=T,r.pointShadowMap.length=T,r.spotShadow.length=D,r.spotShadowMap.length=D,r.directionalShadowMatrix.length=C,r.pointShadowMatrix.length=T,r.spotShadowMatrix.length=D,A.directionalLength=m,A.pointLength=b,A.spotLength=g,A.rectAreaLength=_,A.hemiLength=x,A.numDirectionalShadows=C,A.numPointShadows=T,A.numSpotShadows=D,r.version=ile++)}function c(d,u){let h=0,p=0,f=0,m=0,b=0,g=u.matrixWorldInverse;for(let _=0,x=d.length;_=e.get(o).length?(a=new MU(i,t),e.get(o).push(a)):a=e.get(o)[s],a}function r(){e=new WeakMap}return{get:n,dispose:r}}var Bp=class extends Ni{constructor(t){super(),this.type="MeshDepthMaterial",this.depthPacking=U4,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.setValues(t)}copy(t){return super.copy(t),this.depthPacking=t.depthPacking,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this}};Bp.prototype.isMeshDepthMaterial=!0;var Vp=class extends Ni{constructor(t){super(),this.type="MeshDistanceMaterial",this.referencePosition=new P,this.nearDistance=1,this.farDistance=1e3,this.map=null,this.alphaMap=null,this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.fog=!1,this.setValues(t)}copy(t){return super.copy(t),this.referencePosition.copy(t.referencePosition),this.nearDistance=t.nearDistance,this.farDistance=t.farDistance,this.map=t.map,this.alphaMap=t.alphaMap,this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this}};Vp.prototype.isMeshDistanceMaterial=!0;var ale=`void main() { + gl_Position = vec4( position, 1.0 ); +}`,lle=`uniform sampler2D shadow_pass; +uniform vec2 resolution; +uniform float radius; +#include +void main() { + const float samples = float( VSM_SAMPLES ); + float mean = 0.0; + float squared_mean = 0.0; + float uvStride = samples <= 1.0 ? 0.0 : 2.0 / ( samples - 1.0 ); + float uvStart = samples <= 1.0 ? 0.0 : - 1.0; + for ( float i = 0.0; i < samples; i ++ ) { + float uvOffset = uvStart + i * uvStride; + #ifdef HORIZONTAL_PASS + vec2 distribution = unpackRGBATo2Half( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( uvOffset, 0.0 ) * radius ) / resolution ) ); + mean += distribution.x; + squared_mean += distribution.y * distribution.y + distribution.x * distribution.x; + #else + float depth = unpackRGBAToDepth( texture2D( shadow_pass, ( gl_FragCoord.xy + vec2( 0.0, uvOffset ) * radius ) / resolution ) ); + mean += depth; + squared_mean += depth * depth; + #endif + } + mean = mean / samples; + squared_mean = squared_mean / samples; + float std_dev = sqrt( squared_mean - mean * mean ); + gl_FragColor = pack2HalfToRGBA( vec2( mean, std_dev ) ); +}`;function oG(i,t,e){let n=new ru,r=new xe,o=new xe,s=new Mn,a=new Bp({depthPacking:H4}),l=new Vp,c={},d=e.maxTextureSize,u={0:Ti,1:eu,2:tu},h=new Es({defines:{VSM_SAMPLES:8},uniforms:{shadow_pass:{value:null},resolution:{value:new xe},radius:{value:4}},vertexShader:ale,fragmentShader:lle}),p=h.clone();p.defines.HORIZONTAL_PASS=1;let f=new Pt;f.setAttribute("position",new hn(new Float32Array([-1,-1,.5,3,-1,.5,-1,3,.5]),3));let m=new yi(f,h),b=this;this.enabled=!1,this.autoUpdate=!0,this.needsUpdate=!1,this.type=oP,this.render=function(C,T,D){if(b.enabled===!1||b.autoUpdate===!1&&b.needsUpdate===!1||C.length===0)return;let E=i.getRenderTarget(),A=i.getActiveCubeFace(),Q=i.getActiveMipmapLevel(),F=i.state;F.setBlending(Ka),F.buffers.color.setClear(1,1,1,1),F.buffers.depth.setTest(!0),F.setScissorTest(!1);for(let z=0,O=C.length;zd||r.y>d)&&(r.x>d&&(o.x=Math.floor(d/Y.x),r.x=o.x*Y.x,$.mapSize.x=o.x),r.y>d&&(o.y=Math.floor(d/Y.y),r.y=o.y*Y.y,$.mapSize.y=o.y)),$.map===null&&!$.isPointLightShadow&&this.type===wp){let j={minFilter:Hi,magFilter:Hi,format:ur};$.map=new Oo(r.x,r.y,j),$.map.texture.name=G.name+".shadowMap",$.mapPass=new Oo(r.x,r.y,j),$.camera.updateProjectionMatrix()}if($.map===null){let j={minFilter:Ai,magFilter:Ai,format:ur};$.map=new Oo(r.x,r.y,j),$.map.texture.name=G.name+".shadowMap",$.camera.updateProjectionMatrix()}i.setRenderTarget($.map),i.clear();let k=$.getViewportCount();for(let j=0;j0){let G=z.uuid,$=D.uuid,Y=c[G];Y===void 0&&(Y={},c[G]=Y);let k=Y[$];k===void 0&&(k=z.clone(),Y[$]=k),z=k}return z.visible=D.visible,z.wireframe=D.wireframe,F===wp?z.side=D.shadowSide!==null?D.shadowSide:D.side:z.side=D.shadowSide!==null?D.shadowSide:u[D.side],z.alphaMap=D.alphaMap,z.alphaTest=D.alphaTest,z.clipShadows=D.clipShadows,z.clippingPlanes=D.clippingPlanes,z.clipIntersection=D.clipIntersection,z.displacementMap=D.displacementMap,z.displacementScale=D.displacementScale,z.displacementBias=D.displacementBias,z.wireframeLinewidth=D.wireframeLinewidth,z.linewidth=D.linewidth,E.isPointLight===!0&&z.isMeshDistanceMaterial===!0&&(z.referencePosition.setFromMatrixPosition(E.matrixWorld),z.nearDistance=A,z.farDistance=Q),z}function x(C,T,D,E,A){if(C.visible===!1)return;if(C.layers.test(T.layers)&&(C.isMesh||C.isLine||C.isPoints)&&(C.castShadow||C.receiveShadow&&A===wp)&&(!C.frustumCulled||n.intersectsObject(C))){C.modelViewMatrix.multiplyMatrices(D.matrixWorldInverse,C.matrixWorld);let z=t.update(C),O=C.material;if(Array.isArray(O)){let G=z.groups;for(let $=0,Y=G.length;$=1):Y.indexOf("OpenGL ES")!==-1&&($=parseFloat(/^OpenGL ES (\d)/.exec(Y)[1]),G=$>=2);let k=null,j={},K=i.getParameter(3088),de=i.getParameter(2978),Te=new Mn().fromArray(K),Ee=new Mn().fromArray(de);function Ge(Z,Ze,Se){let yt=new Uint8Array(4),ht=i.createTexture();i.bindTexture(Z,ht),i.texParameteri(Z,10241,9728),i.texParameteri(Z,10240,9728);for(let fn=0;fnAe||U.height>Ae)&&(Ne=Ae/Math.max(U.width,U.height)),Ne<1||N===!0)if(typeof HTMLImageElement<"u"&&U instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&U instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&U instanceof ImageBitmap){let it=N?$4:Math.floor,kt=it(Ne*U.width),bt=it(Ne*U.height);p===void 0&&(p=m(kt,bt));let Vt=ge?m(kt,bt):p;return Vt.width=kt,Vt.height=bt,Vt.getContext("2d").drawImage(U,0,0,kt,bt),console.warn("THREE.WebGLRenderer: Texture has been resized from ("+U.width+"x"+U.height+") to ("+kt+"x"+bt+")."),Vt}else return"data"in U&&console.warn("THREE.WebGLRenderer: Image in DataTexture is too big ("+U.width+"x"+U.height+")."),U;return U}function g(U){return DO(U.width)&&DO(U.height)}function _(U){return a?!1:U.wrapS!==dr||U.wrapT!==dr||U.minFilter!==Ai&&U.minFilter!==Hi}function x(U,N){return U.generateMipmaps&&N&&U.minFilter!==Ai&&U.minFilter!==Hi}function C(U,N,ge,Ae,Ne=1){i.generateMipmap(U);let it=n.get(N);it.__maxMipLevel=Math.log2(Math.max(ge,Ae,Ne))}function T(U,N,ge,Ae){if(a===!1)return N;if(U!==null){if(i[U]!==void 0)return i[U];console.warn("THREE.WebGLRenderer: Attempt to use non-existing WebGL internal format '"+U+"'")}let Ne=N;return N===6403&&(ge===5126&&(Ne=33326),ge===5131&&(Ne=33325),ge===5121&&(Ne=33321)),N===6407&&(ge===5126&&(Ne=34837),ge===5131&&(Ne=34843),ge===5121&&(Ne=32849)),N===6408&&(ge===5126&&(Ne=34836),ge===5131&&(Ne=34842),ge===5121&&(Ne=Ae===_c?35907:32856)),(Ne===33325||Ne===33326||Ne===34842||Ne===34836)&&t.get("EXT_color_buffer_float"),Ne}function D(U){return U===Ai||U===_w||U===vw?9728:9729}function E(U){let N=U.target;N.removeEventListener("dispose",E),Q(N),N.isVideoTexture&&h.delete(N),s.memory.textures--}function A(U){let N=U.target;N.removeEventListener("dispose",A),F(N)}function Q(U){let N=n.get(U);N.__webglInit!==void 0&&(i.deleteTexture(N.__webglTexture),n.remove(U))}function F(U){let N=U.texture,ge=n.get(U),Ae=n.get(N);if(U){if(Ae.__webglTexture!==void 0&&(i.deleteTexture(Ae.__webglTexture),s.memory.textures--),U.depthTexture&&U.depthTexture.dispose(),U.isWebGLCubeRenderTarget)for(let Ne=0;Ne<6;Ne++)i.deleteFramebuffer(ge.__webglFramebuffer[Ne]),ge.__webglDepthbuffer&&i.deleteRenderbuffer(ge.__webglDepthbuffer[Ne]);else i.deleteFramebuffer(ge.__webglFramebuffer),ge.__webglDepthbuffer&&i.deleteRenderbuffer(ge.__webglDepthbuffer),ge.__webglMultisampledFramebuffer&&i.deleteFramebuffer(ge.__webglMultisampledFramebuffer),ge.__webglColorRenderbuffer&&i.deleteRenderbuffer(ge.__webglColorRenderbuffer),ge.__webglDepthRenderbuffer&&i.deleteRenderbuffer(ge.__webglDepthRenderbuffer);if(U.isWebGLMultipleRenderTargets)for(let Ne=0,it=N.length;Ne=l&&console.warn("THREE.WebGLTextures: Trying to use "+U+" texture units while this GPU supports only "+l),z+=1,U}function $(U,N){let ge=n.get(U);if(U.isVideoTexture&&ye(U),U.version>0&&ge.__version!==U.version){let Ae=U.image;if(Ae===void 0)console.warn("THREE.WebGLRenderer: Texture marked for update but image is undefined");else if(Ae.complete===!1)console.warn("THREE.WebGLRenderer: Texture marked for update but image is incomplete");else{Ge(ge,U,N);return}}e.activeTexture(33984+N),e.bindTexture(3553,ge.__webglTexture)}function Y(U,N){let ge=n.get(U);if(U.version>0&&ge.__version!==U.version){Ge(ge,U,N);return}e.activeTexture(33984+N),e.bindTexture(35866,ge.__webglTexture)}function k(U,N){let ge=n.get(U);if(U.version>0&&ge.__version!==U.version){Ge(ge,U,N);return}e.activeTexture(33984+N),e.bindTexture(32879,ge.__webglTexture)}function j(U,N){let ge=n.get(U);if(U.version>0&&ge.__version!==U.version){he(ge,U,N);return}e.activeTexture(33984+N),e.bindTexture(34067,ge.__webglTexture)}let K={[jg]:10497,[dr]:33071,[Wg]:33648},de={[Ai]:9728,[_w]:9984,[vw]:9986,[Hi]:9729,[cP]:9985,[yu]:9987};function Te(U,N,ge){if(ge?(i.texParameteri(U,10242,K[N.wrapS]),i.texParameteri(U,10243,K[N.wrapT]),(U===32879||U===35866)&&i.texParameteri(U,32882,K[N.wrapR]),i.texParameteri(U,10240,de[N.magFilter]),i.texParameteri(U,10241,de[N.minFilter])):(i.texParameteri(U,10242,33071),i.texParameteri(U,10243,33071),(U===32879||U===35866)&&i.texParameteri(U,32882,33071),(N.wrapS!==dr||N.wrapT!==dr)&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.wrapS and Texture.wrapT should be set to THREE.ClampToEdgeWrapping."),i.texParameteri(U,10240,D(N.magFilter)),i.texParameteri(U,10241,D(N.minFilter)),N.minFilter!==Ai&&N.minFilter!==Hi&&console.warn("THREE.WebGLRenderer: Texture is not power of two. Texture.minFilter should be set to THREE.NearestFilter or THREE.LinearFilter.")),t.has("EXT_texture_filter_anisotropic")===!0){let Ae=t.get("EXT_texture_filter_anisotropic");if(N.type===na&&t.has("OES_texture_float_linear")===!1||a===!1&&N.type===Qd&&t.has("OES_texture_half_float_linear")===!1)return;(N.anisotropy>1||n.get(N).__currentAnisotropy)&&(i.texParameterf(U,Ae.TEXTURE_MAX_ANISOTROPY_EXT,Math.min(N.anisotropy,r.getMaxAnisotropy())),n.get(N).__currentAnisotropy=N.anisotropy)}}function Ee(U,N){U.__webglInit===void 0&&(U.__webglInit=!0,N.addEventListener("dispose",E),U.__webglTexture=i.createTexture(),s.memory.textures++)}function Ge(U,N,ge){let Ae=3553;N.isDataTexture2DArray&&(Ae=35866),N.isDataTexture3D&&(Ae=32879),Ee(U,N),e.activeTexture(33984+ge),e.bindTexture(Ae,U.__webglTexture),i.pixelStorei(37440,N.flipY),i.pixelStorei(37441,N.premultiplyAlpha),i.pixelStorei(3317,N.unpackAlignment),i.pixelStorei(37443,0);let Ne=_(N)&&g(N.image)===!1,it=b(N.image,Ne,!1,d),kt=g(it)||a,bt=o.convert(N.format),Vt=o.convert(N.type),vt=T(N.internalFormat,bt,Vt,N.encoding);Te(Ae,N,kt);let Z,Ze=N.mipmaps;if(N.isDepthTexture)vt=6402,a?N.type===na?vt=36012:N.type===Fg?vt=33190:N.type===Ep?vt=35056:vt=33189:N.type===na&&console.error("WebGLRenderer: Floating point depth texture requires WebGL2."),N.format===Kd&&vt===6402&&N.type!==$g&&N.type!==Fg&&(console.warn("THREE.WebGLRenderer: Use UnsignedShortType or UnsignedIntType for DepthFormat DepthTexture."),N.type=$g,Vt=o.convert(N.type)),N.format===Tp&&vt===6402&&(vt=34041,N.type!==Ep&&(console.warn("THREE.WebGLRenderer: Use UnsignedInt248Type for DepthStencilFormat DepthTexture."),N.type=Ep,Vt=o.convert(N.type))),e.texImage2D(3553,0,vt,it.width,it.height,0,bt,Vt,null);else if(N.isDataTexture)if(Ze.length>0&&kt){for(let Se=0,yt=Ze.length;Se0&&kt){for(let Se=0,yt=Ze.length;Sep+f?(c.inputState.pinching=!1,this.dispatchEvent({type:"pinchend",handedness:t.handedness,target:this})):!c.inputState.pinching&&h<=p-f&&(c.inputState.pinching=!0,this.dispatchEvent({type:"pinchstart",handedness:t.handedness,target:this}))}else l!==null&&t.gripSpace&&(o=e.getPose(t.gripSpace,n),o!==null&&(l.matrix.fromArray(o.transform.matrix),l.matrix.decompose(l.position,l.rotation,l.scale),o.linearVelocity?(l.hasLinearVelocity=!0,l.linearVelocity.copy(o.linearVelocity)):l.hasLinearVelocity=!1,o.angularVelocity?(l.hasAngularVelocity=!0,l.angularVelocity.copy(o.angularVelocity)):l.hasAngularVelocity=!1));return a!==null&&(a.visible=r!==null),l!==null&&(l.visible=o!==null),c!==null&&(c.visible=s!==null),this}},PO=class extends ra{constructor(t,e){super();let n=this,r=t.state,o=null,s=1,a=null,l="local-floor",c=null,d=null,u=null,h=null,p=null,f=!1,m=null,b=null,g=null,_=null,x=null,C=null,T=[],D=new Map,E=new Ri;E.layers.enable(1),E.viewport=new Mn;let A=new Ri;A.layers.enable(2),A.viewport=new Mn;let Q=[E,A],F=new e_;F.layers.enable(1),F.layers.enable(2);let z=null,O=null;this.cameraAutoUpdate=!0,this.enabled=!1,this.isPresenting=!1,this.getController=function(he){let ae=T[he];return ae===void 0&&(ae=new Vg,T[he]=ae),ae.getTargetRaySpace()},this.getControllerGrip=function(he){let ae=T[he];return ae===void 0&&(ae=new Vg,T[he]=ae),ae.getGripSpace()},this.getHand=function(he){let ae=T[he];return ae===void 0&&(ae=new Vg,T[he]=ae),ae.getHandSpace()};function G(he){let ae=D.get(he.inputSource);ae&&ae.dispatchEvent({type:he.type,data:he.inputSource})}function $(){D.forEach(function(he,ae){he.disconnect(ae)}),D.clear(),z=null,O=null,r.bindXRFramebuffer(null),t.setRenderTarget(t.getRenderTarget()),u&&e.deleteFramebuffer(u),m&&e.deleteFramebuffer(m),b&&e.deleteRenderbuffer(b),g&&e.deleteRenderbuffer(g),u=null,m=null,b=null,g=null,p=null,h=null,d=null,o=null,Ge.stop(),n.isPresenting=!1,n.dispatchEvent({type:"sessionend"})}this.setFramebufferScaleFactor=function(he){s=he,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change framebuffer scale while presenting.")},this.setReferenceSpaceType=function(he){l=he,n.isPresenting===!0&&console.warn("THREE.WebXRManager: Cannot change reference space type while presenting.")},this.getReferenceSpace=function(){return a},this.getBaseLayer=function(){return h!==null?h:p},this.getBinding=function(){return d},this.getFrame=function(){return _},this.getSession=function(){return o},this.setSession=function(he){return Ct(this,null,function*(){if(o=he,o!==null){o.addEventListener("select",G),o.addEventListener("selectstart",G),o.addEventListener("selectend",G),o.addEventListener("squeeze",G),o.addEventListener("squeezestart",G),o.addEventListener("squeezeend",G),o.addEventListener("end",$),o.addEventListener("inputsourceschange",Y);let ae=e.getContextAttributes();if(ae.xrCompatible!==!0&&(yield e.makeXRCompatible()),o.renderState.layers===void 0){let je={antialias:ae.antialias,alpha:ae.alpha,depth:ae.depth,stencil:ae.stencil,framebufferScaleFactor:s};p=new XRWebGLLayer(o,e,je),o.updateRenderState({baseLayer:p})}else if(e instanceof WebGLRenderingContext){let je={antialias:!0,alpha:ae.alpha,depth:ae.depth,stencil:ae.stencil,framebufferScaleFactor:s};p=new XRWebGLLayer(o,e,je),o.updateRenderState({layers:[p]})}else{f=ae.antialias;let je=null;ae.depth&&(C=256,ae.stencil&&(C|=1024),x=ae.stencil?33306:36096,je=ae.stencil?35056:33190);let ue={colorFormat:ae.alpha?32856:32849,depthFormat:je,scaleFactor:s};d=new XRWebGLBinding(o,e),h=d.createProjectionLayer(ue),u=e.createFramebuffer(),o.updateRenderState({layers:[h]}),f&&(m=e.createFramebuffer(),b=e.createRenderbuffer(),e.bindRenderbuffer(36161,b),e.renderbufferStorageMultisample(36161,4,32856,h.textureWidth,h.textureHeight),r.bindFramebuffer(36160,m),e.framebufferRenderbuffer(36160,36064,36161,b),e.bindRenderbuffer(36161,null),je!==null&&(g=e.createRenderbuffer(),e.bindRenderbuffer(36161,g),e.renderbufferStorageMultisample(36161,4,je,h.textureWidth,h.textureHeight),e.framebufferRenderbuffer(36160,x,36161,g),e.bindRenderbuffer(36161,null)),r.bindFramebuffer(36160,null))}a=yield o.requestReferenceSpace(l),Ge.setContext(o),Ge.start(),n.isPresenting=!0,n.dispatchEvent({type:"sessionstart"})}})};function Y(he){let ae=o.inputSources;for(let je=0;je0&&(g.alphaTest.value=_.alphaTest);let x=i.get(_).envMap;if(x){g.envMap.value=x,g.flipEnvMap.value=x.isCubeTexture&&x.isRenderTargetTexture===!1?-1:1,g.reflectivity.value=_.reflectivity,g.ior.value=_.ior,g.refractionRatio.value=_.refractionRatio;let D=i.get(x).__maxMipLevel;D!==void 0&&(g.maxMipLevel.value=D)}_.lightMap&&(g.lightMap.value=_.lightMap,g.lightMapIntensity.value=_.lightMapIntensity),_.aoMap&&(g.aoMap.value=_.aoMap,g.aoMapIntensity.value=_.aoMapIntensity);let C;_.map?C=_.map:_.specularMap?C=_.specularMap:_.displacementMap?C=_.displacementMap:_.normalMap?C=_.normalMap:_.bumpMap?C=_.bumpMap:_.roughnessMap?C=_.roughnessMap:_.metalnessMap?C=_.metalnessMap:_.alphaMap?C=_.alphaMap:_.emissiveMap?C=_.emissiveMap:_.clearcoatMap?C=_.clearcoatMap:_.clearcoatNormalMap?C=_.clearcoatNormalMap:_.clearcoatRoughnessMap?C=_.clearcoatRoughnessMap:_.specularIntensityMap?C=_.specularIntensityMap:_.specularColorMap?C=_.specularColorMap:_.transmissionMap?C=_.transmissionMap:_.thicknessMap?C=_.thicknessMap:_.sheenColorMap?C=_.sheenColorMap:_.sheenRoughnessMap&&(C=_.sheenRoughnessMap),C!==void 0&&(C.isWebGLRenderTarget&&(C=C.texture),C.matrixAutoUpdate===!0&&C.updateMatrix(),g.uvTransform.value.copy(C.matrix));let T;_.aoMap?T=_.aoMap:_.lightMap&&(T=_.lightMap),T!==void 0&&(T.isWebGLRenderTarget&&(T=T.texture),T.matrixAutoUpdate===!0&&T.updateMatrix(),g.uv2Transform.value.copy(T.matrix))}function r(g,_){g.diffuse.value.copy(_.color),g.opacity.value=_.opacity}function o(g,_){g.dashSize.value=_.dashSize,g.totalSize.value=_.dashSize+_.gapSize,g.scale.value=_.scale}function s(g,_,x,C){g.diffuse.value.copy(_.color),g.opacity.value=_.opacity,g.size.value=_.size*x,g.scale.value=C*.5,_.map&&(g.map.value=_.map),_.alphaMap&&(g.alphaMap.value=_.alphaMap),_.alphaTest>0&&(g.alphaTest.value=_.alphaTest);let T;_.map?T=_.map:_.alphaMap&&(T=_.alphaMap),T!==void 0&&(T.matrixAutoUpdate===!0&&T.updateMatrix(),g.uvTransform.value.copy(T.matrix))}function a(g,_){g.diffuse.value.copy(_.color),g.opacity.value=_.opacity,g.rotation.value=_.rotation,_.map&&(g.map.value=_.map),_.alphaMap&&(g.alphaMap.value=_.alphaMap),_.alphaTest>0&&(g.alphaTest.value=_.alphaTest);let x;_.map?x=_.map:_.alphaMap&&(x=_.alphaMap),x!==void 0&&(x.matrixAutoUpdate===!0&&x.updateMatrix(),g.uvTransform.value.copy(x.matrix))}function l(g,_){_.emissiveMap&&(g.emissiveMap.value=_.emissiveMap)}function c(g,_){g.specular.value.copy(_.specular),g.shininess.value=Math.max(_.shininess,1e-4),_.emissiveMap&&(g.emissiveMap.value=_.emissiveMap),_.bumpMap&&(g.bumpMap.value=_.bumpMap,g.bumpScale.value=_.bumpScale,_.side===Ti&&(g.bumpScale.value*=-1)),_.normalMap&&(g.normalMap.value=_.normalMap,g.normalScale.value.copy(_.normalScale),_.side===Ti&&g.normalScale.value.negate()),_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias)}function d(g,_){_.gradientMap&&(g.gradientMap.value=_.gradientMap),_.emissiveMap&&(g.emissiveMap.value=_.emissiveMap),_.bumpMap&&(g.bumpMap.value=_.bumpMap,g.bumpScale.value=_.bumpScale,_.side===Ti&&(g.bumpScale.value*=-1)),_.normalMap&&(g.normalMap.value=_.normalMap,g.normalScale.value.copy(_.normalScale),_.side===Ti&&g.normalScale.value.negate()),_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias)}function u(g,_){g.roughness.value=_.roughness,g.metalness.value=_.metalness,_.roughnessMap&&(g.roughnessMap.value=_.roughnessMap),_.metalnessMap&&(g.metalnessMap.value=_.metalnessMap),_.emissiveMap&&(g.emissiveMap.value=_.emissiveMap),_.bumpMap&&(g.bumpMap.value=_.bumpMap,g.bumpScale.value=_.bumpScale,_.side===Ti&&(g.bumpScale.value*=-1)),_.normalMap&&(g.normalMap.value=_.normalMap,g.normalScale.value.copy(_.normalScale),_.side===Ti&&g.normalScale.value.negate()),_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias),i.get(_).envMap&&(g.envMapIntensity.value=_.envMapIntensity)}function h(g,_,x){u(g,_),g.ior.value=_.ior,_.sheen>0&&(g.sheenColor.value.copy(_.sheenColor).multiplyScalar(_.sheen),g.sheenRoughness.value=_.sheenRoughness,_.sheenColorMap&&(g.sheenColorMap.value=_.sheenColorMap),_.sheenRoughnessMap&&(g.sheenRoughnessMap.value=_.sheenRoughnessMap)),_.clearcoat>0&&(g.clearcoat.value=_.clearcoat,g.clearcoatRoughness.value=_.clearcoatRoughness,_.clearcoatMap&&(g.clearcoatMap.value=_.clearcoatMap),_.clearcoatRoughnessMap&&(g.clearcoatRoughnessMap.value=_.clearcoatRoughnessMap),_.clearcoatNormalMap&&(g.clearcoatNormalScale.value.copy(_.clearcoatNormalScale),g.clearcoatNormalMap.value=_.clearcoatNormalMap,_.side===Ti&&g.clearcoatNormalScale.value.negate())),_.transmission>0&&(g.transmission.value=_.transmission,g.transmissionSamplerMap.value=x.texture,g.transmissionSamplerSize.value.set(x.width,x.height),_.transmissionMap&&(g.transmissionMap.value=_.transmissionMap),g.thickness.value=_.thickness,_.thicknessMap&&(g.thicknessMap.value=_.thicknessMap),g.attenuationDistance.value=_.attenuationDistance,g.attenuationColor.value.copy(_.attenuationColor)),g.specularIntensity.value=_.specularIntensity,g.specularColor.value.copy(_.specularColor),_.specularIntensityMap&&(g.specularIntensityMap.value=_.specularIntensityMap),_.specularColorMap&&(g.specularColorMap.value=_.specularColorMap)}function p(g,_){_.matcap&&(g.matcap.value=_.matcap),_.bumpMap&&(g.bumpMap.value=_.bumpMap,g.bumpScale.value=_.bumpScale,_.side===Ti&&(g.bumpScale.value*=-1)),_.normalMap&&(g.normalMap.value=_.normalMap,g.normalScale.value.copy(_.normalScale),_.side===Ti&&g.normalScale.value.negate()),_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias)}function f(g,_){_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias)}function m(g,_){_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias),g.referencePosition.value.copy(_.referencePosition),g.nearDistance.value=_.nearDistance,g.farDistance.value=_.farDistance}function b(g,_){_.bumpMap&&(g.bumpMap.value=_.bumpMap,g.bumpScale.value=_.bumpScale,_.side===Ti&&(g.bumpScale.value*=-1)),_.normalMap&&(g.normalMap.value=_.normalMap,g.normalScale.value.copy(_.normalScale),_.side===Ti&&g.normalScale.value.negate()),_.displacementMap&&(g.displacementMap.value=_.displacementMap,g.displacementScale.value=_.displacementScale,g.displacementBias.value=_.displacementBias)}return{refreshFogUniforms:t,refreshMaterialUniforms:e}}function ple(){let i=fC("canvas");return i.style.display="block",i}function Vn(i={}){let t=i.canvas!==void 0?i.canvas:ple(),e=i.context!==void 0?i.context:null,n=i.alpha!==void 0?i.alpha:!1,r=i.depth!==void 0?i.depth:!0,o=i.stencil!==void 0?i.stencil:!0,s=i.antialias!==void 0?i.antialias:!1,a=i.premultipliedAlpha!==void 0?i.premultipliedAlpha:!0,l=i.preserveDrawingBuffer!==void 0?i.preserveDrawingBuffer:!1,c=i.powerPreference!==void 0?i.powerPreference:"default",d=i.failIfMajorPerformanceCaveat!==void 0?i.failIfMajorPerformanceCaveat:!1,u=null,h=null,p=[],f=[];this.domElement=t,this.debug={checkShaderErrors:!0},this.autoClear=!0,this.autoClearColor=!0,this.autoClearDepth=!0,this.autoClearStencil=!0,this.sortObjects=!0,this.clippingPlanes=[],this.localClippingEnabled=!1,this.gammaFactor=2,this.outputEncoding=pr,this.physicallyCorrectLights=!1,this.toneMapping=sc,this.toneMappingExposure=1;let m=this,b=!1,g=0,_=0,x=null,C=-1,T=null,D=new Mn,E=new Mn,A=null,Q=t.width,F=t.height,z=1,O=null,G=null,$=new Mn(0,0,Q,F),Y=new Mn(0,0,Q,F),k=!1,j=[],K=new ru,de=!1,Te=!1,Ee=null,Ge=new ut,he=new P,ae={background:null,fog:null,environment:null,overrideMaterial:null,isScene:!0};function je(){return x===null?z:1}let ue=e;function $e(L,ie){for(let me=0;me0?h=f[f.length-1]:h=null,p.pop(),p.length>0?u=p[p.length-1]:u=null};function NR(L,ie,me,le){if(L.visible===!1)return;if(L.layers.test(ie.layers)){if(L.isGroup)me=L.renderOrder;else if(L.isLOD)L.autoUpdate===!0&&L.update(ie);else if(L.isLight)h.pushLight(L),L.castShadow&&h.pushShadow(L);else if(L.isSprite){if(!L.frustumCulled||K.intersectsSprite(L)){le&&he.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ge);let Lt=N.update(L),Rt=L.material;Rt.visible&&u.push(L,Lt,Rt,me,he.z,null)}}else if((L.isMesh||L.isLine||L.isPoints)&&(L.isSkinnedMesh&&L.skeleton.frame!==At.render.frame&&(L.skeleton.update(),L.skeleton.frame=At.render.frame),!L.frustumCulled||K.intersectsObject(L))){le&&he.setFromMatrixPosition(L.matrixWorld).applyMatrix4(Ge);let Lt=N.update(L),Rt=L.material;if(Array.isArray(Rt)){let cn=Lt.groups;for(let kn=0,mn=cn.length;kn0&&S8(Ce,ie,me),le&&tt.viewport(D.copy(le)),Ce.length>0&&uv(Ce,ie,me),Gt.length>0&&uv(Gt,ie,me),Lt.length>0&&uv(Lt,ie,me)}function S8(L,ie,me){if(Ee===null){let Lt=s===!0&&ze.isWebGL2===!0?Zg:Oo;Ee=new Lt(1024,1024,{generateMipmaps:!0,type:Se.convert(Qd)!==null?Qd:el,minFilter:yu,magFilter:Ai,wrapS:dr,wrapT:dr})}let le=m.getRenderTarget();m.setRenderTarget(Ee),m.clear();let Ce=m.toneMapping;m.toneMapping=sc,uv(L,ie,me),m.toneMapping=Ce,Pe.updateMultisampleRenderTarget(Ee),Pe.updateRenderTargetMipmap(Ee),m.setRenderTarget(le)}function uv(L,ie,me){let le=ie.isScene===!0?ie.overrideMaterial:null;for(let Ce=0,Gt=L.length;Ce=0&&ie<=L.width-le&&me>=0&&me<=L.height-Ce&&ue.readPixels(ie,me,le,Ce,Se.convert(kn),Se.convert(mn),Gt):console.error("THREE.WebGLRenderer.readRenderTargetPixels: readPixels from renderTarget failed. Framebuffer not complete.")}finally{let cn=x!==null?ye.get(x).__webglFramebuffer:null;tt.bindFramebuffer(36160,cn)}}},this.copyFramebufferToTexture=function(L,ie,me=0){let le=Math.pow(2,-me),Ce=Math.floor(ie.image.width*le),Gt=Math.floor(ie.image.height*le),Lt=Se.convert(ie.format);ze.isWebGL2&&(Lt===6407&&(Lt=32849),Lt===6408&&(Lt=32856)),Pe.setTexture2D(ie,0),ue.copyTexImage2D(3553,me,Lt,L.x,L.y,Ce,Gt,0),tt.unbindTexture()},this.copyTextureToTexture=function(L,ie,me,le=0){let Ce=ie.image.width,Gt=ie.image.height,Lt=Se.convert(me.format),Rt=Se.convert(me.type);Pe.setTexture2D(me,0),ue.pixelStorei(37440,me.flipY),ue.pixelStorei(37441,me.premultiplyAlpha),ue.pixelStorei(3317,me.unpackAlignment),ie.isDataTexture?ue.texSubImage2D(3553,le,L.x,L.y,Ce,Gt,Lt,Rt,ie.image.data):ie.isCompressedTexture?ue.compressedTexSubImage2D(3553,le,L.x,L.y,ie.mipmaps[0].width,ie.mipmaps[0].height,Lt,ie.mipmaps[0].data):ue.texSubImage2D(3553,le,L.x,L.y,Lt,Rt,ie.image),le===0&&me.generateMipmaps&&ue.generateMipmap(3553),tt.unbindTexture()},this.copyTextureToTexture3D=function(L,ie,me,le,Ce=0){if(m.isWebGL1Renderer){console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: can only be used with WebGL2.");return}let Gt=L.max.x-L.min.x+1,Lt=L.max.y-L.min.y+1,Rt=L.max.z-L.min.z+1,cn=Se.convert(le.format),kn=Se.convert(le.type),mn;if(le.isDataTexture3D)Pe.setTexture3D(le,0),mn=32879;else if(le.isDataTexture2DArray)Pe.setTexture2DArray(le,0),mn=35866;else{console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: only supports THREE.DataTexture3D and THREE.DataTexture2DArray.");return}ue.pixelStorei(37440,le.flipY),ue.pixelStorei(37441,le.premultiplyAlpha),ue.pixelStorei(3317,le.unpackAlignment);let xn=ue.getParameter(3314),li=ue.getParameter(32878),Ec=ue.getParameter(3316),Cn=ue.getParameter(3315),bf=ue.getParameter(32877),Yn=me.isCompressedTexture?me.mipmaps[0]:me.image;ue.pixelStorei(3314,Yn.width),ue.pixelStorei(32878,Yn.height),ue.pixelStorei(3316,L.min.x),ue.pixelStorei(3315,L.min.y),ue.pixelStorei(32877,L.min.z),me.isDataTexture||me.isDataTexture3D?ue.texSubImage3D(mn,Ce,ie.x,ie.y,ie.z,Gt,Lt,Rt,cn,kn,Yn.data):me.isCompressedTexture?(console.warn("THREE.WebGLRenderer.copyTextureToTexture3D: untested support for compressed srcTexture."),ue.compressedTexSubImage3D(mn,Ce,ie.x,ie.y,ie.z,Gt,Lt,Rt,cn,Yn.data)):ue.texSubImage3D(mn,Ce,ie.x,ie.y,ie.z,Gt,Lt,Rt,cn,kn,Yn),ue.pixelStorei(3314,xn),ue.pixelStorei(32878,li),ue.pixelStorei(3316,Ec),ue.pixelStorei(3315,Cn),ue.pixelStorei(32877,bf),Ce===0&&le.generateMipmaps&&ue.generateMipmap(mn),tt.unbindTexture()},this.initTexture=function(L){Pe.setTexture2D(L,0),tt.unbindTexture()},this.resetState=function(){g=0,_=0,x=null,tt.reset(),yt.reset()},typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}Vn.prototype.isWebGLRenderer=!0;var Tw=class extends Vn{};Tw.prototype.isWebGL1Renderer=!0;var t_=class i{constructor(t,e=25e-5){this.name="",this.color=new Xe(t),this.density=e}clone(){return new i(this.color,this.density)}toJSON(){return{type:"FogExp2",color:this.color.getHex(),density:this.density}}};t_.prototype.isFogExp2=!0;var n_=class i{constructor(t,e=1,n=1e3){this.name="",this.color=new Xe(t),this.near=e,this.far=n}clone(){return new i(this.color,this.near,this.far)}toJSON(){return{type:"Fog",color:this.color.getHex(),near:this.near,far:this.far}}};n_.prototype.isFog=!0;var zp=class extends pn{constructor(){super(),this.type="Scene",this.background=null,this.environment=null,this.fog=null,this.overrideMaterial=null,this.autoUpdate=!0,typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("observe",{detail:this}))}copy(t,e){return super.copy(t,e),t.background!==null&&(this.background=t.background.clone()),t.environment!==null&&(this.environment=t.environment.clone()),t.fog!==null&&(this.fog=t.fog.clone()),t.overrideMaterial!==null&&(this.overrideMaterial=t.overrideMaterial.clone()),this.autoUpdate=t.autoUpdate,this.matrixAutoUpdate=t.matrixAutoUpdate,this}toJSON(t){let e=super.toJSON(t);return this.fog!==null&&(e.object.fog=this.fog.toJSON()),e}};zp.prototype.isScene=!0;var nl=class{constructor(t,e){this.array=t,this.stride=e,this.count=t!==void 0?t.length/e:0,this.usage=Dp,this.updateRange={offset:0,count:-1},this.version=0,this.uuid=Do()}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}setUsage(t){return this.usage=t,this}copy(t){return this.array=new t.array.constructor(t.array),this.count=t.count,this.stride=t.stride,this.usage=t.usage,this}copyAt(t,e,n){t*=this.stride,n*=e.stride;for(let r=0,o=this.stride;rt.far||e.push({distance:l,point:Pg.clone(),uv:hr.getUV(Pg,qx,Ag,Yx,EU,iO,IU,new xe),face:null,object:this})}copy(t){return super.copy(t),t.center!==void 0&&this.center.copy(t.center),this.material=t.material,this}};Hp.prototype.isSprite=!0;function Xx(i,t,e,n,r,o){xp.subVectors(i,e).addScalar(.5).multiply(n),r!==void 0?(Rg.x=o*xp.x-r*xp.y,Rg.y=r*xp.x+o*xp.y):Rg.copy(xp),i.copy(t),i.x+=Rg.x,i.y+=Rg.y,i.applyMatrix4(aG)}var Qx=new P,TU=new P,Dw=class extends pn{constructor(){super(),this._currentLevel=0,this.type="LOD",Object.defineProperties(this,{levels:{enumerable:!0,value:[]},isLOD:{value:!0}}),this.autoUpdate=!0}copy(t){super.copy(t,!1);let e=t.levels;for(let n=0,r=e.length;n0){let n,r;for(n=1,r=e.length;n0){Qx.setFromMatrixPosition(this.matrixWorld);let r=t.ray.origin.distanceTo(Qx);this.getObjectForDistance(r).raycast(t,e)}}update(t){let e=this.levels;if(e.length>1){Qx.setFromMatrixPosition(t.matrixWorld),TU.setFromMatrixPosition(this.matrixWorld);let n=Qx.distanceTo(TU)/t.zoom;e[0].object.visible=!0;let r,o;for(r=1,o=e.length;r=e[r].distance;r++)e[r-1].object.visible=!1,e[r].object.visible=!0;for(this._currentLevel=r-1;rl)continue;h.applyMatrix4(this.matrixWorld);let A=t.ray.origin.distanceTo(h);At.far||e.push({distance:A,point:u.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}}else{let g=Math.max(0,s.start),_=Math.min(b.count,s.start+s.count);for(let x=g,C=_-1;xl)continue;h.applyMatrix4(this.matrixWorld);let D=t.ray.origin.distanceTo(h);Dt.far||e.push({distance:D,point:u.clone().applyMatrix4(this.matrixWorld),index:x,face:null,faceIndex:null,object:this})}}}else n.isGeometry&&console.error("THREE.Line.raycast() no longer supports THREE.Geometry. Use THREE.BufferGeometry instead.")}updateMorphTargets(){let t=this.geometry;if(t.isBufferGeometry){let e=t.morphAttributes,n=Object.keys(e);if(n.length>0){let r=e[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=r.length;o0&&console.error("THREE.Line.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}};Is.prototype.isLine=!0;var VU=new P,zU=new P,Pr=class extends Is{constructor(t,e){super(t,e),this.type="LineSegments"}computeLineDistances(){let t=this.geometry;if(t.isBufferGeometry)if(t.index===null){let e=t.attributes.position,n=[];for(let r=0,o=e.count;r0){let r=e[n[0]];if(r!==void 0){this.morphTargetInfluences=[],this.morphTargetDictionary={};for(let o=0,s=r.length;o0&&console.error("THREE.Points.updateMorphTargets() does not support THREE.Geometry. Use THREE.BufferGeometry instead.")}}};su.prototype.isPoints=!0;function HU(i,t,e,n,r,o,s){let a=RO.distanceSqToPoint(i);if(ar.far)return;o.push({distance:c,distanceToRay:Math.sqrt(a),point:l,index:t,face:null,object:s})}}var Pw=class extends Qi{constructor(t,e,n,r,o,s,a,l,c){super(t,e,n,r,o,s,a,l,c),this.format=a!==void 0?a:Zd,this.minFilter=s!==void 0?s:Hi,this.magFilter=o!==void 0?o:Hi,this.generateMipmaps=!1;let d=this;function u(){d.needsUpdate=!0,t.requestVideoFrameCallback(u)}"requestVideoFrameCallback"in t&&t.requestVideoFrameCallback(u)}clone(){return new this.constructor(this.image).copy(this)}update(){let t=this.image;"requestVideoFrameCallback"in t===!1&&t.readyState>=t.HAVE_CURRENT_DATA&&(this.needsUpdate=!0)}};Pw.prototype.isVideoTexture=!0;var o_=class extends Qi{constructor(t,e,n,r,o,s,a,l,c,d,u,h){super(null,s,a,l,c,d,r,o,u,h),this.image={width:e,height:n},this.mipmaps=t,this.flipY=!1,this.generateMipmaps=!1}};o_.prototype.isCompressedTexture=!0;var Rw=class extends Qi{constructor(t,e,n,r,o,s,a,l,c){super(t,e,n,r,o,s,a,l,c),this.needsUpdate=!0}};Rw.prototype.isCanvasTexture=!0;var Aw=class extends Qi{constructor(t,e,n,r,o,s,a,l,c,d){if(d=d!==void 0?d:Kd,d!==Kd&&d!==Tp)throw new Error("DepthTexture format must be either THREE.DepthFormat or THREE.DepthStencilFormat");n===void 0&&d===Kd&&(n=$g),n===void 0&&d===Tp&&(n=Ep),super(null,r,o,s,a,l,d,n,c),this.image={width:t,height:e},this.magFilter=a!==void 0?a:Ai,this.minFilter=l!==void 0?l:Ai,this.flipY=!1,this.generateMipmaps=!1}};Aw.prototype.isDepthTexture=!0;var s_=class i extends Pt{constructor(t=1,e=8,n=0,r=Math.PI*2){super(),this.type="CircleGeometry",this.parameters={radius:t,segments:e,thetaStart:n,thetaLength:r},e=Math.max(3,e);let o=[],s=[],a=[],l=[],c=new P,d=new xe;s.push(0,0,0),a.push(0,0,1),l.push(.5,.5);for(let u=0,h=3;u<=e;u++,h+=3){let p=n+u/e*r;c.x=t*Math.cos(p),c.y=t*Math.sin(p),s.push(c.x,c.y,c.z),a.push(0,0,1),d.x=(s[h]/t+1)/2,d.y=(s[h+1]/t+1)/2,l.push(d.x,d.y)}for(let u=1;u<=e;u++)o.push(u,u+1,0);this.setIndex(o),this.setAttribute("position",new st(s,3)),this.setAttribute("normal",new st(a,3)),this.setAttribute("uv",new st(l,2))}static fromJSON(t){return new i(t.radius,t.segments,t.thetaStart,t.thetaLength)}},au=class i extends Pt{constructor(t=1,e=1,n=1,r=8,o=1,s=!1,a=0,l=Math.PI*2){super(),this.type="CylinderGeometry",this.parameters={radiusTop:t,radiusBottom:e,height:n,radialSegments:r,heightSegments:o,openEnded:s,thetaStart:a,thetaLength:l};let c=this;r=Math.floor(r),o=Math.floor(o);let d=[],u=[],h=[],p=[],f=0,m=[],b=n/2,g=0;_(),s===!1&&(t>0&&x(!0),e>0&&x(!1)),this.setIndex(d),this.setAttribute("position",new st(u,3)),this.setAttribute("normal",new st(h,3)),this.setAttribute("uv",new st(p,2));function _(){let C=new P,T=new P,D=0,E=(e-t)/n;for(let A=0;A<=o;A++){let Q=[],F=A/o,z=F*(e-t)+t;for(let O=0;O<=r;O++){let G=O/r,$=G*l+a,Y=Math.sin($),k=Math.cos($);T.x=z*Y,T.y=-F*n+b,T.z=z*k,u.push(T.x,T.y,T.z),C.set(Y,E,k).normalize(),h.push(C.x,C.y,C.z),p.push(G,1-F),Q.push(f++)}m.push(Q)}for(let A=0;A.9&&E<.1&&(x<.2&&(s[_+0]+=1),C<.2&&(s[_+2]+=1),T<.2&&(s[_+4]+=1))}}function h(_){o.push(_.x,_.y,_.z)}function p(_,x){let C=_*3;x.x=t[C+0],x.y=t[C+1],x.z=t[C+2]}function f(){let _=new P,x=new P,C=new P,T=new P,D=new xe,E=new xe,A=new xe;for(let Q=0,F=0;Q0)l=r-1;else{l=r;break}if(r=l,n[r]===s)return r/(o-1);let d=n[r],h=n[r+1]-d,p=(s-d)/h;return(r+p)/(o-1)}getTangent(t,e){let r=t-1e-4,o=t+1e-4;r<0&&(r=0),o>1&&(o=1);let s=this.getPoint(r),a=this.getPoint(o),l=e||(s.isVector2?new xe:new P);return l.copy(a).sub(s).normalize(),l}getTangentAt(t,e){let n=this.getUtoTmapping(t);return this.getTangent(n,e)}computeFrenetFrames(t,e){let n=new P,r=[],o=[],s=[],a=new P,l=new ut;for(let p=0;p<=t;p++){let f=p/t;r[p]=this.getTangentAt(f,new P)}o[0]=new P,s[0]=new P;let c=Number.MAX_VALUE,d=Math.abs(r[0].x),u=Math.abs(r[0].y),h=Math.abs(r[0].z);d<=c&&(c=d,n.set(1,0,0)),u<=c&&(c=u,n.set(0,1,0)),h<=c&&n.set(0,0,1),a.crossVectors(r[0],n).normalize(),o[0].crossVectors(r[0],a),s[0].crossVectors(r[0],o[0]);for(let p=1;p<=t;p++){if(o[p]=o[p-1].clone(),s[p]=s[p-1].clone(),a.crossVectors(r[p-1],r[p]),a.length()>Number.EPSILON){a.normalize();let f=Math.acos(cr(r[p-1].dot(r[p]),-1,1));o[p].applyMatrix4(l.makeRotationAxis(a,f))}s[p].crossVectors(r[p],o[p])}if(e===!0){let p=Math.acos(cr(o[0].dot(o[t]),-1,1));p/=t,r[0].dot(a.crossVectors(o[0],o[t]))>0&&(p=-p);for(let f=1;f<=t;f++)o[f].applyMatrix4(l.makeRotationAxis(r[f],p*f)),s[f].crossVectors(r[f],o[f])}return{tangents:r,normals:o,binormals:s}}clone(){return new this.constructor().copy(this)}copy(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}toJSON(){let t={metadata:{version:4.5,type:"Curve",generator:"Curve.toJSON"}};return t.arcLengthDivisions=this.arcLengthDivisions,t.type=this.type,t}fromJSON(t){return this.arcLengthDivisions=t.arcLengthDivisions,this}},lu=class extends Kr{constructor(t=0,e=0,n=1,r=1,o=0,s=Math.PI*2,a=!1,l=0){super(),this.type="EllipseCurve",this.aX=t,this.aY=e,this.xRadius=n,this.yRadius=r,this.aStartAngle=o,this.aEndAngle=s,this.aClockwise=a,this.aRotation=l}getPoint(t,e){let n=e||new xe,r=Math.PI*2,o=this.aEndAngle-this.aStartAngle,s=Math.abs(o)r;)o-=r;o0?0:(Math.floor(Math.abs(a)/o)+1)*o:l===0&&a===o-1&&(a=o-2,l=1);let c,d;this.closed||a>0?c=r[(a-1)%o]:(rw.subVectors(r[0],r[1]).add(r[0]),c=rw);let u=r[a%o],h=r[(a+1)%o];if(this.closed||a+2r.length-2?r.length-1:s+1],u=r[s>r.length-3?r.length-1:s+2];return n.set(GU(a,l.x,c.x,d.x,u.x),GU(a,l.y,c.y,d.y,u.y)),n}copy(t){super.copy(t),this.points=[];for(let e=0,n=t.points.length;e=n){let s=r[o]-n,a=this.curves[o],l=a.getLength(),c=l===0?0:1-s/l;return a.getPointAt(c,e)}o++}return null}getLength(){let t=this.getCurveLengths();return t[t.length-1]}updateArcLengths(){this.needsUpdate=!0,this.cacheLengths=null,this.getCurveLengths()}getCurveLengths(){if(this.cacheLengths&&this.cacheLengths.length===this.curves.length)return this.cacheLengths;let t=[],e=0;for(let n=0,r=this.curves.length;n1&&!e[e.length-1].equals(e[0])&&e.push(e[0]),e}copy(t){super.copy(t),this.curves=[];for(let e=0,n=t.curves.length;e0){let u=c.getPoint(0);u.equals(this.currentPoint)||this.lineTo(u.x,u.y)}this.curves.push(c);let d=c.getPoint(1);return this.currentPoint.copy(d),this}copy(t){return super.copy(t),this.currentPoint.copy(t.currentPoint),this}toJSON(){let t=super.toJSON();return t.currentPoint=this.currentPoint.toArray(),t}fromJSON(t){return super.fromJSON(t),this.currentPoint.fromArray(t.currentPoint),this}},Ko=class extends du{constructor(t){super(t),this.uuid=Do(),this.type="Shape",this.holes=[]}getPointsHoles(t){let e=[];for(let n=0,r=this.holes.length;n80*e){a=c=i[0],l=d=i[1];for(let f=e;fc&&(c=u),h>d&&(d=h);p=Math.max(c-a,d-l),p=p!==0?1/p:0}return p_(o,s,e,a,l,p),s}};function lG(i,t,e,n,r){let o,s;if(r===Vle(i,t,e,n)>0)for(o=t;o=t;o-=n)s=jU(o,i[o],i[o+1],s);return s&&mC(s,s.next)&&(m_(s),s=s.next),s}function fc(i,t){if(!i)return i;t||(t=i);let e=i,n;do if(n=!1,!e.steiner&&(mC(e,e.next)||si(e.prev,e,e.next)===0)){if(m_(e),e=t=e.prev,e===e.next)break;n=!0}else e=e.next;while(n||e!==t);return t}function p_(i,t,e,n,r,o,s){if(!i)return;!s&&o&&Ale(i,n,r,o);let a=i,l,c;for(;i.prev!==i.next;){if(l=i.prev,c=i.next,o?Mle(i,n,r,o):Sle(i)){t.push(l.i/e),t.push(i.i/e),t.push(c.i/e),m_(i),i=c.next,a=c.next;continue}if(i=c,i===a){s?s===1?(i=Ele(fc(i),t,e),p_(i,t,e,n,r,o,2)):s===2&&Ile(i,t,e,n,r,o):p_(fc(i),t,e,n,r,o,1);break}}}function Sle(i){let t=i.prev,e=i,n=i.next;if(si(t,e,n)>=0)return!1;let r=i.next.next;for(;r!==i.prev;){if(Sp(t.x,t.y,e.x,e.y,n.x,n.y,r.x,r.y)&&si(r.prev,r,r.next)>=0)return!1;r=r.next}return!0}function Mle(i,t,e,n){let r=i.prev,o=i,s=i.next;if(si(r,o,s)>=0)return!1;let a=r.xo.x?r.x>s.x?r.x:s.x:o.x>s.x?o.x:s.x,d=r.y>o.y?r.y>s.y?r.y:s.y:o.y>s.y?o.y:s.y,u=AO(a,l,t,e,n),h=AO(c,d,t,e,n),p=i.prevZ,f=i.nextZ;for(;p&&p.z>=u&&f&&f.z<=h;){if(p!==i.prev&&p!==i.next&&Sp(r.x,r.y,o.x,o.y,s.x,s.y,p.x,p.y)&&si(p.prev,p,p.next)>=0||(p=p.prevZ,f!==i.prev&&f!==i.next&&Sp(r.x,r.y,o.x,o.y,s.x,s.y,f.x,f.y)&&si(f.prev,f,f.next)>=0))return!1;f=f.nextZ}for(;p&&p.z>=u;){if(p!==i.prev&&p!==i.next&&Sp(r.x,r.y,o.x,o.y,s.x,s.y,p.x,p.y)&&si(p.prev,p,p.next)>=0)return!1;p=p.prevZ}for(;f&&f.z<=h;){if(f!==i.prev&&f!==i.next&&Sp(r.x,r.y,o.x,o.y,s.x,s.y,f.x,f.y)&&si(f.prev,f,f.next)>=0)return!1;f=f.nextZ}return!0}function Ele(i,t,e){let n=i;do{let r=n.prev,o=n.next.next;!mC(r,o)&&cG(r,n,n.next,o)&&f_(r,o)&&f_(o,r)&&(t.push(r.i/e),t.push(n.i/e),t.push(o.i/e),m_(n),m_(n.next),n=i=o),n=n.next}while(n!==i);return fc(n)}function Ile(i,t,e,n,r,o){let s=i;do{let a=s.next.next;for(;a!==s.prev;){if(s.i!==a.i&&Lle(s,a)){let l=dG(s,a);s=fc(s,s.next),l=fc(l,l.next),p_(s,t,e,n,r,o),p_(l,t,e,n,r,o);return}a=a.next}s=s.next}while(s!==i)}function Tle(i,t,e,n){let r=[],o,s,a,l,c;for(o=0,s=t.length;o=e.next.y&&e.next.y!==e.y){let h=e.x+(r-e.y)*(e.next.x-e.x)/(e.next.y-e.y);if(h<=n&&h>o){if(o=h,h===n){if(r===e.y)return e;if(r===e.next.y)return e.next}s=e.x=e.x&&e.x>=l&&n!==e.x&&Sp(rs.x||e.x===s.x&&Rle(s,e)))&&(s=e,d=u)),e=e.next;while(e!==a);return s}function Rle(i,t){return si(i.prev,i,t.prev)<0&&si(t.next,i,i.next)<0}function Ale(i,t,e,n){let r=i;do r.z===null&&(r.z=AO(r.x,r.y,t,e,n)),r.prevZ=r.prev,r.nextZ=r.next,r=r.next;while(r!==i);r.prevZ.nextZ=null,r.prevZ=null,Nle(r)}function Nle(i){let t,e,n,r,o,s,a,l,c=1;do{for(e=i,i=null,o=null,s=0;e;){for(s++,n=e,a=0,t=0;t0||l>0&&n;)a!==0&&(l===0||!n||e.z<=n.z)?(r=e,e=e.nextZ,a--):(r=n,n=n.nextZ,l--),o?o.nextZ=r:i=r,r.prevZ=o,o=r;e=n}o.nextZ=null,c*=2}while(s>1);return i}function AO(i,t,e,n,r){return i=32767*(i-e)*r,t=32767*(t-n)*r,i=(i|i<<8)&16711935,i=(i|i<<4)&252645135,i=(i|i<<2)&858993459,i=(i|i<<1)&1431655765,t=(t|t<<8)&16711935,t=(t|t<<4)&252645135,t=(t|t<<2)&858993459,t=(t|t<<1)&1431655765,i|t<<1}function kle(i){let t=i,e=i;do(t.x=0&&(i-s)*(n-a)-(e-s)*(t-a)>=0&&(e-s)*(o-a)-(r-s)*(n-a)>=0}function Lle(i,t){return i.next.i!==t.i&&i.prev.i!==t.i&&!Fle(i,t)&&(f_(i,t)&&f_(t,i)&&Ble(i,t)&&(si(i.prev,i,t.prev)||si(i,t.prev,t))||mC(i,t)&&si(i.prev,i,i.next)>0&&si(t.prev,t,t.next)>0)}function si(i,t,e){return(t.y-i.y)*(e.x-t.x)-(t.x-i.x)*(e.y-t.y)}function mC(i,t){return i.x===t.x&&i.y===t.y}function cG(i,t,e,n){let r=sw(si(i,t,e)),o=sw(si(i,t,n)),s=sw(si(e,n,i)),a=sw(si(e,n,t));return!!(r!==o&&s!==a||r===0&&ow(i,e,t)||o===0&&ow(i,n,t)||s===0&&ow(e,i,n)||a===0&&ow(e,t,n))}function ow(i,t,e){return t.x<=Math.max(i.x,e.x)&&t.x>=Math.min(i.x,e.x)&&t.y<=Math.max(i.y,e.y)&&t.y>=Math.min(i.y,e.y)}function sw(i){return i>0?1:i<0?-1:0}function Fle(i,t){let e=i;do{if(e.i!==i.i&&e.next.i!==i.i&&e.i!==t.i&&e.next.i!==t.i&&cG(e,e.next,i,t))return!0;e=e.next}while(e!==i);return!1}function f_(i,t){return si(i.prev,i,i.next)<0?si(i,t,i.next)>=0&&si(i,i.prev,t)>=0:si(i,t,i.prev)<0||si(i,i.next,t)<0}function Ble(i,t){let e=i,n=!1,r=(i.x+t.x)/2,o=(i.y+t.y)/2;do e.y>o!=e.next.y>o&&e.next.y!==e.y&&r<(e.next.x-e.x)*(o-e.y)/(e.next.y-e.y)+e.x&&(n=!n),e=e.next;while(e!==i);return n}function dG(i,t){let e=new NO(i.i,i.x,i.y),n=new NO(t.i,t.x,t.y),r=i.next,o=t.prev;return i.next=t,t.prev=i,e.next=r,r.prev=e,n.next=e,e.prev=n,o.next=n,n.prev=o,n}function jU(i,t,e,n){let r=new NO(i,t,e);return n?(r.next=n.next,r.prev=n,n.next.prev=r,n.next=r):(r.prev=r,r.next=r),r}function m_(i){i.next.prev=i.prev,i.prev.next=i.next,i.prevZ&&(i.prevZ.nextZ=i.nextZ),i.nextZ&&(i.nextZ.prevZ=i.prevZ)}function NO(i,t,e){this.i=i,this.x=t,this.y=e,this.prev=null,this.next=null,this.z=null,this.prevZ=null,this.nextZ=null,this.steiner=!1}function Vle(i,t,e,n){let r=0;for(let o=t,s=e-n;o2&&i[t-1].equals(i[0])&&i.pop()}function $U(i,t){for(let e=0;eNumber.EPSILON){let bt=Math.sqrt(it),Vt=Math.sqrt(Ae*Ae+Ne*Ne),vt=Pe.x-ge/bt,Z=Pe.y+N/bt,Ze=Be.x-Ne/Vt,Se=Be.y+Ae/Vt,yt=((Ze-vt)*Ne-(Se-Z)*Ae)/(N*Ne-ge*Ae);_t=vt+N*yt-ye.x,Qe=Z+ge*yt-ye.y;let ht=_t*_t+Qe*Qe;if(ht<=2)return new xe(_t,Qe);U=Math.sqrt(ht/2)}else{let bt=!1;N>Number.EPSILON?Ae>Number.EPSILON&&(bt=!0):N<-Number.EPSILON?Ae<-Number.EPSILON&&(bt=!0):Math.sign(ge)===Math.sign(Ne)&&(bt=!0),bt?(_t=-ge,Qe=N,U=Math.sqrt(it)):(_t=N,Qe=ge,U=Math.sqrt(it/2))}return new xe(_t/U,Qe/U)}let de=[];for(let ye=0,Pe=$.length,Be=Pe-1,_t=ye+1;ye=0;ye--){let Pe=ye/b,Be=p*Math.cos(Pe*Math.PI/2),_t=f*Math.sin(Pe*Math.PI/2)+m;for(let Qe=0,U=$.length;Qe=0;){let _t=Be,Qe=Be-1;Qe<0&&(Qe=ye.length-1);for(let U=0,N=d+b*2;U0)&&p.push(x,C,D),(g!==n-1||l0!=t>0&&this.version++,this._sheen=t}get clearcoat(){return this._clearcoat}set clearcoat(t){this._clearcoat>0!=t>0&&this.version++,this._clearcoat=t}get transmission(){return this._transmission}set transmission(t){this._transmission>0!=t>0&&this.version++,this._transmission=t}copy(t){return super.copy(t),this.defines={STANDARD:"",PHYSICAL:""},this.clearcoat=t.clearcoat,this.clearcoatMap=t.clearcoatMap,this.clearcoatRoughness=t.clearcoatRoughness,this.clearcoatRoughnessMap=t.clearcoatRoughnessMap,this.clearcoatNormalMap=t.clearcoatNormalMap,this.clearcoatNormalScale.copy(t.clearcoatNormalScale),this.ior=t.ior,this.sheen=t.sheen,this.sheenColor.copy(t.sheenColor),this.sheenColorMap=t.sheenColorMap,this.sheenRoughness=t.sheenRoughness,this.sheenRoughnessMap=t.sheenRoughnessMap,this.transmission=t.transmission,this.transmissionMap=t.transmissionMap,this.thickness=t.thickness,this.thicknessMap=t.thicknessMap,this.attenuationDistance=t.attenuationDistance,this.attenuationColor.copy(t.attenuationColor),this.specularIntensity=t.specularIntensity,this.specularIntensityMap=t.specularIntensityMap,this.specularColor.copy(t.specularColor),this.specularColorMap=t.specularColorMap,this}};M_.prototype.isMeshPhysicalMaterial=!0;var E_=class extends Ni{constructor(t){super(),this.type="MeshPhongMaterial",this.color=new Xe(16777215),this.specular=new Xe(1118481),this.shininess=30,this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Xe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=bu,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=W_,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.specular.copy(t.specular),this.shininess=t.shininess,this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this.flatShading=t.flatShading,this}};E_.prototype.isMeshPhongMaterial=!0;var I_=class extends Ni{constructor(t){super(),this.defines={TOON:""},this.type="MeshToonMaterial",this.color=new Xe(16777215),this.map=null,this.gradientMap=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Xe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=bu,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.gradientMap=t.gradientMap,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this}};I_.prototype.isMeshToonMaterial=!0;var T_=class extends Ni{constructor(t){super(),this.type="MeshNormalMaterial",this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=bu,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.wireframe=!1,this.wireframeLinewidth=1,this.fog=!1,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.flatShading=t.flatShading,this}};T_.prototype.isMeshNormalMaterial=!0;var D_=class extends Ni{constructor(t){super(),this.type="MeshLambertMaterial",this.color=new Xe(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.emissive=new Xe(0),this.emissiveIntensity=1,this.emissiveMap=null,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.combine=W_,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.setValues(t)}copy(t){return super.copy(t),this.color.copy(t.color),this.map=t.map,this.lightMap=t.lightMap,this.lightMapIntensity=t.lightMapIntensity,this.aoMap=t.aoMap,this.aoMapIntensity=t.aoMapIntensity,this.emissive.copy(t.emissive),this.emissiveMap=t.emissiveMap,this.emissiveIntensity=t.emissiveIntensity,this.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.combine=t.combine,this.reflectivity=t.reflectivity,this.refractionRatio=t.refractionRatio,this.wireframe=t.wireframe,this.wireframeLinewidth=t.wireframeLinewidth,this.wireframeLinecap=t.wireframeLinecap,this.wireframeLinejoin=t.wireframeLinejoin,this}};D_.prototype.isMeshLambertMaterial=!0;var O_=class extends Ni{constructor(t){super(),this.defines={MATCAP:""},this.type="MeshMatcapMaterial",this.color=new Xe(16777215),this.matcap=null,this.map=null,this.bumpMap=null,this.bumpScale=1,this.normalMap=null,this.normalMapType=bu,this.normalScale=new xe(1,1),this.displacementMap=null,this.displacementScale=1,this.displacementBias=0,this.alphaMap=null,this.flatShading=!1,this.setValues(t)}copy(t){return super.copy(t),this.defines={MATCAP:""},this.color.copy(t.color),this.matcap=t.matcap,this.map=t.map,this.bumpMap=t.bumpMap,this.bumpScale=t.bumpScale,this.normalMap=t.normalMap,this.normalMapType=t.normalMapType,this.normalScale.copy(t.normalScale),this.displacementMap=t.displacementMap,this.displacementScale=t.displacementScale,this.displacementBias=t.displacementBias,this.alphaMap=t.alphaMap,this.flatShading=t.flatShading,this}};O_.prototype.isMeshMatcapMaterial=!0;var P_=class extends ki{constructor(t){super(),this.type="LineDashedMaterial",this.scale=1,this.dashSize=3,this.gapSize=1,this.setValues(t)}copy(t){return super.copy(t),this.scale=t.scale,this.dashSize=t.dashSize,this.gapSize=t.gapSize,this}};P_.prototype.isLineDashedMaterial=!0;var Gle=Object.freeze({__proto__:null,ShadowMaterial:S_,SpriteMaterial:Up,RawShaderMaterial:uc,ShaderMaterial:Es,PointsMaterial:rl,MeshPhysicalMaterial:M_,MeshStandardMaterial:Kp,MeshPhongMaterial:E_,MeshToonMaterial:I_,MeshNormalMaterial:T_,MeshLambertMaterial:D_,MeshDepthMaterial:Bp,MeshDistanceMaterial:Vp,MeshBasicMaterial:Ms,MeshMatcapMaterial:O_,LineDashedMaterial:P_,LineBasicMaterial:ki,Material:Ni}),ei={arraySlice:function(i,t,e){return ei.isTypedArray(i)?new i.constructor(i.subarray(t,e!==void 0?e:i.length)):i.slice(t,e)},convertArray:function(i,t,e){return!i||!e&&i.constructor===t?i:typeof t.BYTES_PER_ELEMENT=="number"?new t(i):Array.prototype.slice.call(i)},isTypedArray:function(i){return ArrayBuffer.isView(i)&&!(i instanceof DataView)},getKeyframeOrder:function(i){function t(r,o){return i[r]-i[o]}let e=i.length,n=new Array(e);for(let r=0;r!==e;++r)n[r]=r;return n.sort(t),n},sortedArray:function(i,t,e){let n=i.length,r=new i.constructor(n);for(let o=0,s=0;s!==n;++o){let a=e[o]*t;for(let l=0;l!==t;++l)r[s++]=i[a+l]}return r},flattenJSON:function(i,t,e,n){let r=1,o=i[0];for(;o!==void 0&&o[n]===void 0;)o=i[r++];if(o===void 0)return;let s=o[n];if(s!==void 0)if(Array.isArray(s))do s=o[n],s!==void 0&&(t.push(o.time),e.push.apply(e,s)),o=i[r++];while(o!==void 0);else if(s.toArray!==void 0)do s=o[n],s!==void 0&&(t.push(o.time),s.toArray(e,e.length)),o=i[r++];while(o!==void 0);else do s=o[n],s!==void 0&&(t.push(o.time),e.push(s)),o=i[r++];while(o!==void 0)},subclip:function(i,t,e,n,r=30){let o=i.clone();o.name=t;let s=[];for(let l=0;l=n)){u.push(c.times[p]);for(let m=0;mo.tracks[l].times[0]&&(a=o.tracks[l].times[0]);for(let l=0;l=a.times[f]){let g=f*u+d,_=g+u-d;m=ei.arraySlice(a.values,g,_)}else{let g=a.createInterpolant(),_=d,x=u-d;g.evaluate(o),m=ei.arraySlice(g.resultBuffer,_,x)}l==="quaternion"&&new Gi().fromArray(m).normalize().conjugate().toArray(m);let b=c.times.length;for(let g=0;g=o)){let a=e[1];t=o)break t}s=n,n=0;break n}break e}for(;n>>1;te;)--s;if(++s,o!==0||s!==r){o>=s&&(s=Math.max(s,1),o=s-1);let a=this.getValueSize();this.times=ei.arraySlice(n,o,s),this.values=ei.arraySlice(this.values,o*a,s*a)}return this}validate(){let t=!0,e=this.getValueSize();e-Math.floor(e)!==0&&(console.error("THREE.KeyframeTrack: Invalid value size in track.",this),t=!1);let n=this.times,r=this.values,o=n.length;o===0&&(console.error("THREE.KeyframeTrack: Track is empty.",this),t=!1);let s=null;for(let a=0;a!==o;a++){let l=n[a];if(typeof l=="number"&&isNaN(l)){console.error("THREE.KeyframeTrack: Time is not a valid number.",this,a,l),t=!1;break}if(s!==null&&s>l){console.error("THREE.KeyframeTrack: Out of order keys.",this,a,l,s),t=!1;break}s=l}if(r!==void 0&&ei.isTypedArray(r))for(let a=0,l=r.length;a!==l;++a){let c=r[a];if(isNaN(c)){console.error("THREE.KeyframeTrack: Value is not a valid number.",this,a,c),t=!1;break}}return t}optimize(){let t=ei.arraySlice(this.times),e=ei.arraySlice(this.values),n=this.getValueSize(),r=this.getInterpolation()===fw,o=t.length-1,s=1;for(let a=1;a0){t[s]=t[o];for(let a=o*n,l=s*n,c=0;c!==n;++c)e[l+c]=e[a+c];++s}return s!==t.length?(this.times=ei.arraySlice(t,0,s),this.values=ei.arraySlice(e,0,s*n)):(this.times=t,this.values=e),this}clone(){let t=ei.arraySlice(this.times,0),e=ei.arraySlice(this.values,0),n=this.constructor,r=new n(this.name,t,e);return r.createInterpolant=this.createInterpolant,r}};Po.prototype.TimeBufferType=Float32Array;Po.prototype.ValueBufferType=Float32Array;Po.prototype.DefaultInterpolation=Yg;var al=class extends Po{};al.prototype.ValueTypeName="bool";al.prototype.ValueBufferType=Array;al.prototype.DefaultInterpolation=qg;al.prototype.InterpolantFactoryMethodLinear=void 0;al.prototype.InterpolantFactoryMethodSmooth=void 0;var A_=class extends Po{};A_.prototype.ValueTypeName="color";var uu=class extends Po{};uu.prototype.ValueTypeName="number";var Bw=class extends Ts{constructor(t,e,n,r){super(t,e,n,r)}interpolate_(t,e,n,r){let o=this.resultBuffer,s=this.sampleValues,a=this.valueSize,l=(n-e)/(r-e),c=t*a;for(let d=c+a;c!==d;c+=4)Gi.slerpFlat(o,0,s,c-a,s,c,l);return o}},mc=class extends Po{InterpolantFactoryMethodLinear(t){return new Bw(this.times,this.values,this.getValueSize(),t)}};mc.prototype.ValueTypeName="quaternion";mc.prototype.DefaultInterpolation=Yg;mc.prototype.InterpolantFactoryMethodSmooth=void 0;var ll=class extends Po{};ll.prototype.ValueTypeName="string";ll.prototype.ValueBufferType=Array;ll.prototype.DefaultInterpolation=qg;ll.prototype.InterpolantFactoryMethodLinear=void 0;ll.prototype.InterpolantFactoryMethodSmooth=void 0;var hu=class extends Po{};hu.prototype.ValueTypeName="vector";var pu=class{constructor(t,e=-1,n,r=uC){this.name=t,this.tracks=n,this.duration=e,this.blendMode=r,this.uuid=Do(),this.duration<0&&this.resetDuration()}static parse(t){let e=[],n=t.tracks,r=1/(t.fps||1);for(let s=0,a=n.length;s!==a;++s)e.push(Wle(n[s]).scale(r));let o=new this(t.name,t.duration,e,t.blendMode);return o.uuid=t.uuid,o}static toJSON(t){let e=[],n=t.tracks,r={name:t.name,duration:t.duration,tracks:e,uuid:t.uuid,blendMode:t.blendMode};for(let o=0,s=n.length;o!==s;++o)e.push(Po.toJSON(n[o]));return r}static CreateFromMorphTargetSequence(t,e,n,r){let o=e.length,s=[];for(let a=0;a1){let u=d[1],h=r[u];h||(r[u]=h=[]),h.push(c)}}let s=[];for(let a in r)s.push(this.CreateFromMorphTargetSequence(a,r[a],e,n));return s}static parseAnimation(t,e){if(!t)return console.error("THREE.AnimationClip: No animation in JSONLoader data."),null;let n=function(u,h,p,f,m){if(p.length!==0){let b=[],g=[];ei.flattenJSON(p,b,g,f),b.length!==0&&m.push(new u(h,b,g))}},r=[],o=t.name||"default",s=t.fps||30,a=t.blendMode,l=t.length||-1,c=t.hierarchy||[];for(let u=0;u{e&&e(o),this.manager.itemEnd(t)},0),o;if(Qa[t]!==void 0){Qa[t].push({onLoad:e,onProgress:n,onError:r});return}Qa[t]=[],Qa[t].push({onLoad:e,onProgress:n,onError:r});let s=new Request(t,{headers:new Headers(this.requestHeader),credentials:this.withCredentials?"include":"same-origin"});fetch(s).then(a=>{if(a.status===200||a.status===0){a.status===0&&console.warn("THREE.FileLoader: HTTP Status 0 received.");let l=Qa[t],c=a.body.getReader(),d=a.headers.get("Content-Length"),u=d?parseInt(d):0,h=u!==0,p=0;return new ReadableStream({start(f){m();function m(){c.read().then(({done:b,value:g})=>{if(b)f.close();else{p+=g.byteLength;let _=new ProgressEvent("progress",{lengthComputable:h,loaded:p,total:u});for(let x=0,C=l.length;x{let l=new Response(a);switch(this.responseType){case"arraybuffer":return l.arrayBuffer();case"blob":return l.blob();case"document":return l.text().then(c=>new DOMParser().parseFromString(c,this.mimeType));case"json":return l.json();default:return l.text()}}).then(a=>{fu.add(t,a);let l=Qa[t];delete Qa[t];for(let c=0,d=l.length;c{let l=Qa[t];delete Qa[t];for(let c=0,d=l.length;c0:r.vertexColors=t.vertexColors),t.uniforms!==void 0)for(let o in t.uniforms){let s=t.uniforms[o];switch(r.uniforms[o]={},s.type){case"t":r.uniforms[o].value=n(s.value);break;case"c":r.uniforms[o].value=new Xe().setHex(s.value);break;case"v2":r.uniforms[o].value=new xe().fromArray(s.value);break;case"v3":r.uniforms[o].value=new P().fromArray(s.value);break;case"v4":r.uniforms[o].value=new Mn().fromArray(s.value);break;case"m3":r.uniforms[o].value=new Di().fromArray(s.value);break;case"m4":r.uniforms[o].value=new ut().fromArray(s.value);break;default:r.uniforms[o].value=s.value}}if(t.defines!==void 0&&(r.defines=t.defines),t.vertexShader!==void 0&&(r.vertexShader=t.vertexShader),t.fragmentShader!==void 0&&(r.fragmentShader=t.fragmentShader),t.extensions!==void 0)for(let o in t.extensions)r.extensions[o]=t.extensions[o];if(t.shading!==void 0&&(r.flatShading=t.shading===1),t.size!==void 0&&(r.size=t.size),t.sizeAttenuation!==void 0&&(r.sizeAttenuation=t.sizeAttenuation),t.map!==void 0&&(r.map=n(t.map)),t.matcap!==void 0&&(r.matcap=n(t.matcap)),t.alphaMap!==void 0&&(r.alphaMap=n(t.alphaMap)),t.bumpMap!==void 0&&(r.bumpMap=n(t.bumpMap)),t.bumpScale!==void 0&&(r.bumpScale=t.bumpScale),t.normalMap!==void 0&&(r.normalMap=n(t.normalMap)),t.normalMapType!==void 0&&(r.normalMapType=t.normalMapType),t.normalScale!==void 0){let o=t.normalScale;Array.isArray(o)===!1&&(o=[o,o]),r.normalScale=new xe().fromArray(o)}return t.displacementMap!==void 0&&(r.displacementMap=n(t.displacementMap)),t.displacementScale!==void 0&&(r.displacementScale=t.displacementScale),t.displacementBias!==void 0&&(r.displacementBias=t.displacementBias),t.roughnessMap!==void 0&&(r.roughnessMap=n(t.roughnessMap)),t.metalnessMap!==void 0&&(r.metalnessMap=n(t.metalnessMap)),t.emissiveMap!==void 0&&(r.emissiveMap=n(t.emissiveMap)),t.emissiveIntensity!==void 0&&(r.emissiveIntensity=t.emissiveIntensity),t.specularMap!==void 0&&(r.specularMap=n(t.specularMap)),t.specularIntensityMap!==void 0&&(r.specularIntensityMap=n(t.specularIntensityMap)),t.specularColorMap!==void 0&&(r.specularColorMap=n(t.specularColorMap)),t.envMap!==void 0&&(r.envMap=n(t.envMap)),t.envMapIntensity!==void 0&&(r.envMapIntensity=t.envMapIntensity),t.reflectivity!==void 0&&(r.reflectivity=t.reflectivity),t.refractionRatio!==void 0&&(r.refractionRatio=t.refractionRatio),t.lightMap!==void 0&&(r.lightMap=n(t.lightMap)),t.lightMapIntensity!==void 0&&(r.lightMapIntensity=t.lightMapIntensity),t.aoMap!==void 0&&(r.aoMap=n(t.aoMap)),t.aoMapIntensity!==void 0&&(r.aoMapIntensity=t.aoMapIntensity),t.gradientMap!==void 0&&(r.gradientMap=n(t.gradientMap)),t.clearcoatMap!==void 0&&(r.clearcoatMap=n(t.clearcoatMap)),t.clearcoatRoughnessMap!==void 0&&(r.clearcoatRoughnessMap=n(t.clearcoatRoughnessMap)),t.clearcoatNormalMap!==void 0&&(r.clearcoatNormalMap=n(t.clearcoatNormalMap)),t.clearcoatNormalScale!==void 0&&(r.clearcoatNormalScale=new xe().fromArray(t.clearcoatNormalScale)),t.transmissionMap!==void 0&&(r.transmissionMap=n(t.transmissionMap)),t.thicknessMap!==void 0&&(r.thicknessMap=n(t.thicknessMap)),t.sheenColorMap!==void 0&&(r.sheenColorMap=n(t.sheenColorMap)),t.sheenRoughnessMap!==void 0&&(r.sheenRoughnessMap=n(t.sheenRoughnessMap)),r}setTextures(t){return this.textures=t,this}},Jp=class{static decodeText(t){if(typeof TextDecoder<"u")return new TextDecoder().decode(t);let e="";for(let n=0,r=t.length;n0){let l=new N_(e);o=new mu(l),o.setCrossOrigin(this.crossOrigin);for(let c=0,d=t.length;c0){r=new mu(this.manager),r.setCrossOrigin(this.crossOrigin);for(let s=0,a=t.length;s"u"&&console.warn("THREE.ImageBitmapLoader: createImageBitmap() not supported."),typeof fetch>"u"&&console.warn("THREE.ImageBitmapLoader: fetch() not supported."),this.options={premultiplyAlpha:"none"}}setOptions(t){return this.options=t,this}load(t,e,n,r){t===void 0&&(t=""),this.path!==void 0&&(t=this.path+t),t=this.manager.resolveURL(t);let o=this,s=fu.get(t);if(s!==void 0)return o.manager.itemStart(t),setTimeout(function(){e&&e(s),o.manager.itemEnd(t)},0),s;let a={};a.credentials=this.crossOrigin==="anonymous"?"same-origin":"include",a.headers=this.requestHeader,fetch(t,a).then(function(l){return l.blob()}).then(function(l){return createImageBitmap(l,Object.assign(o.options,{colorSpaceConversion:"none"}))}).then(function(l){fu.add(t,l),e&&e(l),o.manager.itemEnd(t)}).catch(function(l){r&&r(l),o.manager.itemError(t),o.manager.itemEnd(t)}),o.manager.itemStart(t)}};qw.prototype.isImageBitmapLoader=!0;var aw,yP={getContext:function(){return aw===void 0&&(aw=new(window.AudioContext||window.webkitAudioContext)),aw},setContext:function(i){aw=i}},Yw=class extends fr{constructor(t){super(t)}load(t,e,n,r){let o=this,s=new Jo(this.manager);s.setResponseType("arraybuffer"),s.setPath(this.path),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(t,function(a){try{let l=a.slice(0);yP.getContext().decodeAudioData(l,function(d){e(d)})}catch(l){r?r(l):console.error(l),o.manager.itemError(t)}},n,r)}},Xw=class extends gu{constructor(t,e,n=1){super(void 0,n);let r=new Xe().set(t),o=new Xe().set(e),s=new P(r.r,r.g,r.b),a=new P(o.r,o.g,o.b),l=Math.sqrt(Math.PI),c=l*Math.sqrt(.75);this.sh.coefficients[0].copy(s).add(a).multiplyScalar(l),this.sh.coefficients[1].copy(s).sub(a).multiplyScalar(c)}};Xw.prototype.isHemisphereLightProbe=!0;var Qw=class extends gu{constructor(t,e=1){super(void 0,e);let n=new Xe().set(t);this.sh.coefficients[0].set(n.r,n.g,n.b).multiplyScalar(2*Math.sqrt(Math.PI))}};Qw.prototype.isAmbientLightProbe=!0;var tH=new ut,nH=new ut,BO=class{constructor(){this.type="StereoCamera",this.aspect=1,this.eyeSep=.064,this.cameraL=new Ri,this.cameraL.layers.enable(1),this.cameraL.matrixAutoUpdate=!1,this.cameraR=new Ri,this.cameraR.layers.enable(2),this.cameraR.matrixAutoUpdate=!1,this._cache={focus:null,fov:null,aspect:null,near:null,far:null,zoom:null,eyeSep:null}}update(t){let e=this._cache;if(e.focus!==t.focus||e.fov!==t.fov||e.aspect!==t.aspect*this.aspect||e.near!==t.near||e.far!==t.far||e.zoom!==t.zoom||e.eyeSep!==this.eyeSep){e.focus=t.focus,e.fov=t.fov,e.aspect=t.aspect*this.aspect,e.near=t.near,e.far=t.far,e.zoom=t.zoom,e.eyeSep=this.eyeSep;let r=t.projectionMatrix.clone(),o=e.eyeSep/2,s=o*e.near/e.focus,a=e.near*Math.tan(Jd*e.fov*.5)/e.zoom,l,c;nH.elements[12]=-o,tH.elements[12]=o,l=-a*e.aspect+s,c=a*e.aspect+s,r.elements[0]=2*e.near/(c-l),r.elements[8]=(c+l)/(c-l),this.cameraL.projectionMatrix.copy(r),l=-a*e.aspect-s,c=a*e.aspect-s,r.elements[0]=2*e.near/(c-l),r.elements[8]=(c+l)/(c-l),this.cameraR.projectionMatrix.copy(r)}this.cameraL.matrixWorld.copy(t.matrixWorld).multiply(nH),this.cameraR.matrixWorld.copy(t.matrixWorld).multiply(tH)}},Zw=class{constructor(t=!0){this.autoStart=t,this.startTime=0,this.oldTime=0,this.elapsedTime=0,this.running=!1}start(){this.startTime=iH(),this.oldTime=this.startTime,this.elapsedTime=0,this.running=!0}stop(){this.getElapsedTime(),this.running=!1,this.autoStart=!1}getElapsedTime(){return this.getDelta(),this.elapsedTime}getDelta(){let t=0;if(this.autoStart&&!this.running)return this.start(),0;if(this.running){let e=iH();t=(e-this.oldTime)/1e3,this.oldTime=e,this.elapsedTime+=t}return t}};function iH(){return(typeof performance>"u"?Date:performance).now()}var Hd=new P,rH=new Gi,qle=new P,Gd=new P,VO=class extends pn{constructor(){super(),this.type="AudioListener",this.context=yP.getContext(),this.gain=this.context.createGain(),this.gain.connect(this.context.destination),this.filter=null,this.timeDelta=0,this._clock=new Zw}getInput(){return this.gain}removeFilter(){return this.filter!==null&&(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination),this.gain.connect(this.context.destination),this.filter=null),this}getFilter(){return this.filter}setFilter(t){return this.filter!==null?(this.gain.disconnect(this.filter),this.filter.disconnect(this.context.destination)):this.gain.disconnect(this.context.destination),this.filter=t,this.gain.connect(this.filter),this.filter.connect(this.context.destination),this}getMasterVolume(){return this.gain.gain.value}setMasterVolume(t){return this.gain.gain.setTargetAtTime(t,this.context.currentTime,.01),this}updateMatrixWorld(t){super.updateMatrixWorld(t);let e=this.context.listener,n=this.up;if(this.timeDelta=this._clock.getDelta(),this.matrixWorld.decompose(Hd,rH,qle),Gd.set(0,0,-1).applyQuaternion(rH),e.positionX){let r=this.context.currentTime+this.timeDelta;e.positionX.linearRampToValueAtTime(Hd.x,r),e.positionY.linearRampToValueAtTime(Hd.y,r),e.positionZ.linearRampToValueAtTime(Hd.z,r),e.forwardX.linearRampToValueAtTime(Gd.x,r),e.forwardY.linearRampToValueAtTime(Gd.y,r),e.forwardZ.linearRampToValueAtTime(Gd.z,r),e.upX.linearRampToValueAtTime(n.x,r),e.upY.linearRampToValueAtTime(n.y,r),e.upZ.linearRampToValueAtTime(n.z,r)}else e.setPosition(Hd.x,Hd.y,Hd.z),e.setOrientation(Gd.x,Gd.y,Gd.z,n.x,n.y,n.z)}},j_=class extends pn{constructor(t){super(),this.type="Audio",this.listener=t,this.context=t.context,this.gain=this.context.createGain(),this.gain.connect(t.getInput()),this.autoplay=!1,this.buffer=null,this.detune=0,this.loop=!1,this.loopStart=0,this.loopEnd=0,this.offset=0,this.duration=void 0,this.playbackRate=1,this.isPlaying=!1,this.hasPlaybackControl=!0,this.source=null,this.sourceType="empty",this._startedAt=0,this._progress=0,this._connected=!1,this.filters=[]}getOutput(){return this.gain}setNodeSource(t){return this.hasPlaybackControl=!1,this.sourceType="audioNode",this.source=t,this.connect(),this}setMediaElementSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaNode",this.source=this.context.createMediaElementSource(t),this.connect(),this}setMediaStreamSource(t){return this.hasPlaybackControl=!1,this.sourceType="mediaStreamNode",this.source=this.context.createMediaStreamSource(t),this.connect(),this}setBuffer(t){return this.buffer=t,this.sourceType="buffer",this.autoplay&&this.play(),this}play(t=0){if(this.isPlaying===!0){console.warn("THREE.Audio: Audio is already playing.");return}if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}this._startedAt=this.context.currentTime+t;let e=this.context.createBufferSource();return e.buffer=this.buffer,e.loop=this.loop,e.loopStart=this.loopStart,e.loopEnd=this.loopEnd,e.onended=this.onEnded.bind(this),e.start(this._startedAt,this._progress+this.offset,this.duration),this.isPlaying=!0,this.source=e,this.setDetune(this.detune),this.setPlaybackRate(this.playbackRate),this.connect()}pause(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this.isPlaying===!0&&(this._progress+=Math.max(this.context.currentTime-this._startedAt,0)*this.playbackRate,this.loop===!0&&(this._progress=this._progress%(this.duration||this.buffer.duration)),this.source.stop(),this.source.onended=null,this.isPlaying=!1),this}stop(){if(this.hasPlaybackControl===!1){console.warn("THREE.Audio: this Audio has no playback control.");return}return this._progress=0,this.source.stop(),this.source.onended=null,this.isPlaying=!1,this}connect(){if(this.filters.length>0){this.source.connect(this.filters[0]);for(let t=1,e=this.filters.length;t0){this.source.disconnect(this.filters[0]);for(let t=1,e=this.filters.length;t0&&this._mixBufferRegionAdditive(n,r,this._addIndex*e,1,e);for(let l=e,c=e+e;l!==c;++l)if(n[l]!==n[l+e]){a.setValue(n,r);break}}saveOriginalState(){let t=this.binding,e=this.buffer,n=this.valueSize,r=n*this._origIndex;t.getValue(e,r);for(let o=n,s=r;o!==s;++o)e[o]=e[r+o%n];this._setIdentity(),this.cumulativeWeight=0,this.cumulativeWeightAdditive=0}restoreOriginalState(){let t=this.valueSize*3;this.binding.setValue(this.buffer,t)}_setAdditiveIdentityNumeric(){let t=this._addIndex*this.valueSize,e=t+this.valueSize;for(let n=t;n=.5)for(let s=0;s!==o;++s)t[e+s]=t[n+s]}_slerp(t,e,n,r){Gi.slerpFlat(t,e,t,e,t,n,r)}_slerpAdditive(t,e,n,r,o){let s=this._workIndex*o;Gi.multiplyQuaternionsFlat(t,s,t,e,t,n),Gi.slerpFlat(t,e,t,e,t,s,r)}_lerp(t,e,n,r,o){let s=1-r;for(let a=0;a!==o;++a){let l=e+a;t[l]=t[l]*s+t[n+a]*r}}_lerpAdditive(t,e,n,r,o){for(let s=0;s!==o;++s){let a=e+s;t[a]=t[a]+t[n+s]*r}}},bP="\\[\\]\\.:\\/",Xle=new RegExp("["+bP+"]","g"),xP="[^"+bP+"]",Qle="[^"+bP.replace("\\.","")+"]",Zle=/((?:WC+[\/:])*)/.source.replace("WC",xP),Kle=/(WCOD+)?/.source.replace("WCOD",Qle),Jle=/(?:\.(WC+)(?:\[(.+)\])?)?/.source.replace("WC",xP),ece=/\.(WC+)(?:\[(.+)\])?/.source.replace("WC",xP),tce=new RegExp("^"+Zle+Kle+Jle+ece+"$"),nce=["material","materials","bones"],UO=class{constructor(t,e,n){let r=n||$n.parseTrackName(e);this._targetGroup=t,this._bindings=t.subscribe_(e,r)}getValue(t,e){this.bind();let n=this._targetGroup.nCachedObjects_,r=this._bindings[n];r!==void 0&&r.getValue(t,e)}setValue(t,e){let n=this._bindings;for(let r=this._targetGroup.nCachedObjects_,o=n.length;r!==o;++r)n[r].setValue(t,e)}bind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].bind()}unbind(){let t=this._bindings;for(let e=this._targetGroup.nCachedObjects_,n=t.length;e!==n;++e)t[e].unbind()}},$n=(()=>{class i{constructor(e,n,r){this.path=n,this.parsedPath=r||i.parseTrackName(n),this.node=i.findNode(e,this.parsedPath.nodeName)||e,this.rootNode=e,this.getValue=this._getValue_unbound,this.setValue=this._setValue_unbound}static create(e,n,r){return e&&e.isAnimationObjectGroup?new i.Composite(e,n,r):new i(e,n,r)}static sanitizeNodeName(e){return e.replace(/\s/g,"_").replace(Xle,"")}static parseTrackName(e){let n=tce.exec(e);if(!n)throw new Error("PropertyBinding: Cannot parse trackName: "+e);let r={nodeName:n[2],objectName:n[3],objectIndex:n[4],propertyName:n[5],propertyIndex:n[6]},o=r.nodeName&&r.nodeName.lastIndexOf(".");if(o!==void 0&&o!==-1){let s=r.nodeName.substring(o+1);nce.indexOf(s)!==-1&&(r.nodeName=r.nodeName.substring(0,o),r.objectName=s)}if(r.propertyName===null||r.propertyName.length===0)throw new Error("PropertyBinding: can not parse propertyName from trackName: "+e);return r}static findNode(e,n){if(!n||n===""||n==="."||n===-1||n===e.name||n===e.uuid)return e;if(e.skeleton){let r=e.skeleton.getBoneByName(n);if(r!==void 0)return r}if(e.children){let r=function(s){for(let a=0;a=o){let u=o++,h=t[u];e[h.uuid]=d,t[d]=h,e[c]=u,t[u]=l;for(let p=0,f=r;p!==f;++p){let m=n[p],b=m[u],g=m[d];m[d]=b,m[u]=g}}}this.nCachedObjects_=o}uncache(){let t=this._objects,e=this._indicesByUUID,n=this._bindings,r=n.length,o=this.nCachedObjects_,s=t.length;for(let a=0,l=arguments.length;a!==l;++a){let c=arguments[a],d=c.uuid,u=e[d];if(u!==void 0)if(delete e[d],u0&&(e[p.uuid]=u),t[u]=p,t.pop();for(let f=0,m=r;f!==m;++f){let b=n[f];b[u]=b[h],b.pop()}}}this.nCachedObjects_=o}subscribe_(t,e){let n=this._bindingsIndicesByPath,r=n[t],o=this._bindings;if(r!==void 0)return o[r];let s=this._paths,a=this._parsedPaths,l=this._objects,c=l.length,d=this.nCachedObjects_,u=new Array(c);r=o.length,n[t]=r,s.push(t),a.push(e),o.push(u);for(let h=d,p=l.length;h!==p;++h){let f=l[h];u[h]=new $n(f,t,e)}return u}unsubscribe_(t){let e=this._bindingsIndicesByPath,n=e[t];if(n!==void 0){let r=this._paths,o=this._parsedPaths,s=this._bindings,a=s.length-1,l=s[a],c=t[a];e[c]=n,s[n]=l,s.pop(),o[n]=o[a],o.pop(),r[n]=r[a],r.pop()}}};eC.prototype.isAnimationObjectGroup=!0;var HO=class{constructor(t,e,n=null,r=e.blendMode){this._mixer=t,this._clip=e,this._localRoot=n,this.blendMode=r;let o=e.tracks,s=o.length,a=new Array(s),l={endingStart:Yd,endingEnd:Yd};for(let c=0;c!==s;++c){let d=o[c].createInterpolant(null);a[c]=d,d.settings=l}this._interpolantSettings=l,this._interpolants=a,this._propertyBindings=new Array(s),this._cacheIndex=null,this._byClipCacheIndex=null,this._timeScaleInterpolant=null,this._weightInterpolant=null,this.loop=F4,this._loopCount=-1,this._startTime=null,this.time=0,this.timeScale=1,this._effectiveTimeScale=1,this.weight=1,this._effectiveWeight=1,this.repetitions=1/0,this.paused=!1,this.enabled=!0,this.clampWhenFinished=!1,this.zeroSlopeAtStart=!0,this.zeroSlopeAtEnd=!0}play(){return this._mixer._activateAction(this),this}stop(){return this._mixer._deactivateAction(this),this.reset()}reset(){return this.paused=!1,this.enabled=!0,this.time=0,this._loopCount=-1,this._startTime=null,this.stopFading().stopWarping()}isRunning(){return this.enabled&&!this.paused&&this.timeScale!==0&&this._startTime===null&&this._mixer._isActiveAction(this)}isScheduled(){return this._mixer._isActiveAction(this)}startAt(t){return this._startTime=t,this}setLoop(t,e){return this.loop=t,this.repetitions=e,this}setEffectiveWeight(t){return this.weight=t,this._effectiveWeight=this.enabled?t:0,this.stopFading()}getEffectiveWeight(){return this._effectiveWeight}fadeIn(t){return this._scheduleFading(t,0,1)}fadeOut(t){return this._scheduleFading(t,1,0)}crossFadeFrom(t,e,n){if(t.fadeOut(e),this.fadeIn(e),n){let r=this._clip.duration,o=t._clip.duration,s=o/r,a=r/o;t.warp(1,s,e),this.warp(a,1,e)}return this}crossFadeTo(t,e,n){return t.crossFadeFrom(this,e,n)}stopFading(){let t=this._weightInterpolant;return t!==null&&(this._weightInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}setEffectiveTimeScale(t){return this.timeScale=t,this._effectiveTimeScale=this.paused?0:t,this.stopWarping()}getEffectiveTimeScale(){return this._effectiveTimeScale}setDuration(t){return this.timeScale=this._clip.duration/t,this.stopWarping()}syncWith(t){return this.time=t.time,this.timeScale=t.timeScale,this.stopWarping()}halt(t){return this.warp(this._effectiveTimeScale,0,t)}warp(t,e,n){let r=this._mixer,o=r.time,s=this.timeScale,a=this._timeScaleInterpolant;a===null&&(a=r._lendControlInterpolant(),this._timeScaleInterpolant=a);let l=a.parameterPositions,c=a.sampleValues;return l[0]=o,l[1]=o+n,c[0]=t/s,c[1]=e/s,this}stopWarping(){let t=this._timeScaleInterpolant;return t!==null&&(this._timeScaleInterpolant=null,this._mixer._takeBackControlInterpolant(t)),this}getMixer(){return this._mixer}getClip(){return this._clip}getRoot(){return this._localRoot||this._mixer._root}_update(t,e,n,r){if(!this.enabled){this._updateWeight(t);return}let o=this._startTime;if(o!==null){let l=(t-o)*n;if(l<0||n===0)return;this._startTime=null,e=n*l}e*=this._updateTimeScale(t);let s=this._updateTime(e),a=this._updateWeight(t);if(a>0){let l=this._interpolants,c=this._propertyBindings;switch(this.blendMode){case dP:for(let d=0,u=l.length;d!==u;++d)l[d].evaluate(s),c[d].accumulateAdditive(a);break;case uC:default:for(let d=0,u=l.length;d!==u;++d)l[d].evaluate(s),c[d].accumulate(r,a)}}}_updateWeight(t){let e=0;if(this.enabled){e=this.weight;let n=this._weightInterpolant;if(n!==null){let r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopFading(),r===0&&(this.enabled=!1))}}return this._effectiveWeight=e,e}_updateTimeScale(t){let e=0;if(!this.paused){e=this.timeScale;let n=this._timeScaleInterpolant;if(n!==null){let r=n.evaluate(t)[0];e*=r,t>n.parameterPositions[1]&&(this.stopWarping(),e===0?this.paused=!0:this.timeScale=e)}}return this._effectiveTimeScale=e,e}_updateTime(t){let e=this._clip.duration,n=this.loop,r=this.time+t,o=this._loopCount,s=n===B4;if(t===0)return o===-1?r:s&&(o&1)===1?e-r:r;if(n===L4){o===-1&&(this._loopCount=0,this._setEndings(!0,!0,!1));e:{if(r>=e)r=e;else if(r<0)r=0;else{this.time=r;break e}this.clampWhenFinished?this.paused=!0:this.enabled=!1,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:t<0?-1:1})}}else{if(o===-1&&(t>=0?(o=0,this._setEndings(!0,this.repetitions===0,s)):this._setEndings(this.repetitions===0,!0,s)),r>=e||r<0){let a=Math.floor(r/e);r-=e*a,o+=Math.abs(a);let l=this.repetitions-o;if(l<=0)this.clampWhenFinished?this.paused=!0:this.enabled=!1,r=t>0?e:0,this.time=r,this._mixer.dispatchEvent({type:"finished",action:this,direction:t>0?1:-1});else{if(l===1){let c=t<0;this._setEndings(c,!c,s)}else this._setEndings(!1,!1,s);this._loopCount=o,this.time=r,this._mixer.dispatchEvent({type:"loop",action:this,loopDelta:a})}}else this.time=r;if(s&&(o&1)===1)return e-r}return r}_setEndings(t,e,n){let r=this._interpolantSettings;n?(r.endingStart=Xd,r.endingEnd=Xd):(t?r.endingStart=this.zeroSlopeAtStart?Xd:Yd:r.endingStart=Xg,e?r.endingEnd=this.zeroSlopeAtEnd?Xd:Yd:r.endingEnd=Xg)}_scheduleFading(t,e,n){let r=this._mixer,o=r.time,s=this._weightInterpolant;s===null&&(s=r._lendControlInterpolant(),this._weightInterpolant=s);let a=s.parameterPositions,l=s.sampleValues;return a[0]=o,l[0]=e,a[1]=o+t,l[1]=n,this}},tC=class extends ra{constructor(t){super(),this._root=t,this._initMemoryManager(),this._accuIndex=0,this.time=0,this.timeScale=1}_bindAction(t,e){let n=t._localRoot||this._root,r=t._clip.tracks,o=r.length,s=t._propertyBindings,a=t._interpolants,l=n.uuid,c=this._bindingsByRootAndName,d=c[l];d===void 0&&(d={},c[l]=d);for(let u=0;u!==o;++u){let h=r[u],p=h.name,f=d[p];if(f!==void 0)s[u]=f;else{if(f=s[u],f!==void 0){f._cacheIndex===null&&(++f.referenceCount,this._addInactiveBinding(f,l,p));continue}let m=e&&e._propertyBindings[u].binding.parsedPath;f=new Jw($n.create(n,p,m),h.ValueTypeName,h.getValueSize()),++f.referenceCount,this._addInactiveBinding(f,l,p),s[u]=f}a[u].resultBuffer=f.buffer}}_activateAction(t){if(!this._isActiveAction(t)){if(t._cacheIndex===null){let n=(t._localRoot||this._root).uuid,r=t._clip.uuid,o=this._actionsByClip[r];this._bindAction(t,o&&o.knownActions[0]),this._addInactiveAction(t,r,n)}let e=t._propertyBindings;for(let n=0,r=e.length;n!==r;++n){let o=e[n];o.useCount++===0&&(this._lendBinding(o),o.saveOriginalState())}this._lendAction(t)}}_deactivateAction(t){if(this._isActiveAction(t)){let e=t._propertyBindings;for(let n=0,r=e.length;n!==r;++n){let o=e[n];--o.useCount===0&&(o.restoreOriginalState(),this._takeBackBinding(o))}this._takeBackAction(t)}}_initMemoryManager(){this._actions=[],this._nActiveActions=0,this._actionsByClip={},this._bindings=[],this._nActiveBindings=0,this._bindingsByRootAndName={},this._controlInterpolants=[],this._nActiveControlInterpolants=0;let t=this;this.stats={actions:{get total(){return t._actions.length},get inUse(){return t._nActiveActions}},bindings:{get total(){return t._bindings.length},get inUse(){return t._nActiveBindings}},controlInterpolants:{get total(){return t._controlInterpolants.length},get inUse(){return t._nActiveControlInterpolants}}}}_isActiveAction(t){let e=t._cacheIndex;return e!==null&&e=0;--n)t[n].stop();return this}update(t){t*=this.timeScale;let e=this._actions,n=this._nActiveActions,r=this.time+=t,o=Math.sign(t),s=this._accuIndex^=1;for(let c=0;c!==n;++c)e[c]._update(r,t,o,s);let a=this._bindings,l=this._nActiveBindings;for(let c=0;c!==l;++c)a[c].apply(s);return this}setTime(t){this.time=0;for(let e=0;ethis.max.x||t.ythis.max.y)}containsBox(t){return this.min.x<=t.min.x&&t.max.x<=this.max.x&&this.min.y<=t.min.y&&t.max.y<=this.max.y}getParameter(t,e){return e.set((t.x-this.min.x)/(this.max.x-this.min.x),(t.y-this.min.y)/(this.max.y-this.min.y))}intersectsBox(t){return!(t.max.xthis.max.x||t.max.ythis.max.y)}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return aH.copy(t).clamp(this.min,this.max).sub(t).length()}intersect(t){return this.min.max(t.min),this.max.min(t.max),this}union(t){return this.min.min(t.min),this.max.max(t.max),this}translate(t){return this.min.add(t),this.max.add(t),this}equals(t){return t.min.equals(this.min)&&t.max.equals(this.max)}};gc.prototype.isBox2=!0;var lH=new P,lw=new P,oC=class{constructor(t=new P,e=new P){this.start=t,this.end=e}set(t,e){return this.start.copy(t),this.end.copy(e),this}copy(t){return this.start.copy(t.start),this.end.copy(t.end),this}getCenter(t){return t.addVectors(this.start,this.end).multiplyScalar(.5)}delta(t){return t.subVectors(this.end,this.start)}distanceSq(){return this.start.distanceToSquared(this.end)}distance(){return this.start.distanceTo(this.end)}at(t,e){return this.delta(e).multiplyScalar(t).add(this.start)}closestPointToPointParameter(t,e){lH.subVectors(t,this.start),lw.subVectors(this.end,this.start);let n=lw.dot(lw),o=lw.dot(lH)/n;return e&&(o=cr(o,0,1)),o}closestPointToPoint(t,e,n){let r=this.closestPointToPointParameter(t,e);return this.delta(n).multiplyScalar(r).add(this.start)}applyMatrix4(t){return this.start.applyMatrix4(t),this.end.applyMatrix4(t),this}equals(t){return t.start.equals(this.start)&&t.end.equals(this.end)}clone(){return new this.constructor().copy(this)}},cH=new P,qO=class extends pn{constructor(t,e){super(),this.light=t,this.light.updateMatrixWorld(),this.matrix=t.matrixWorld,this.matrixAutoUpdate=!1,this.color=e;let n=new Pt,r=[0,0,0,0,0,1,0,0,0,1,0,1,0,0,0,-1,0,1,0,0,0,0,1,1,0,0,0,0,-1,1];for(let s=0,a=1,l=32;s.99999)this.quaternion.set(0,0,0,1);else if(t.y<-.99999)this.quaternion.set(1,0,0,0);else{fH.set(t.z,0,-t.x).normalize();let e=Math.acos(t.y);this.quaternion.setFromAxisAngle(fH,e)}}setLength(t,e=t*.2,n=e*.2){this.line.scale.set(1,Math.max(1e-4,t-e),1),this.line.updateMatrix(),this.cone.scale.set(n,e,n),this.cone.position.y=t,this.cone.updateMatrix()}setColor(t){this.line.material.color.set(t),this.cone.material.color.set(t)}copy(t){return super.copy(t,!1),this.line.copy(t.line),this.cone.copy(t.cone),this}},cC=class extends Pr{constructor(t=1){let e=[0,0,0,t,0,0,0,0,0,0,t,0,0,0,0,0,0,t],n=[1,0,0,1,.6,0,0,1,0,.6,1,0,0,0,1,0,.6,1],r=new Pt;r.setAttribute("position",new st(e,3)),r.setAttribute("color",new st(n,3));let o=new ki({vertexColors:!0,toneMapped:!1});super(r,o),this.type="AxesHelper"}setColors(t,e,n){let r=new Xe,o=this.geometry.attributes.color.array;return r.set(t),r.toArray(o,0),r.toArray(o,3),r.set(e),r.toArray(o,6),r.toArray(o,9),r.set(n),r.toArray(o,12),r.toArray(o,15),this.geometry.attributes.color.needsUpdate=!0,this}dispose(){this.geometry.dispose(),this.material.dispose()}},nP=class{constructor(){this.type="ShapePath",this.color=new Xe,this.subPaths=[],this.currentPath=null}moveTo(t,e){return this.currentPath=new du,this.subPaths.push(this.currentPath),this.currentPath.moveTo(t,e),this}lineTo(t,e){return this.currentPath.lineTo(t,e),this}quadraticCurveTo(t,e,n,r){return this.currentPath.quadraticCurveTo(t,e,n,r),this}bezierCurveTo(t,e,n,r,o,s){return this.currentPath.bezierCurveTo(t,e,n,r,o,s),this}splineThru(t){return this.currentPath.splineThru(t),this}toShapes(t,e){function n(_){let x=[];for(let C=0,T=_.length;CNumber.EPSILON){if(z<0&&(A=x[E],F=-F,Q=x[D],z=-z),_.yQ.y)continue;if(_.y===A.y){if(_.x===A.x)return!0}else{let O=z*(_.x-A.x)-F*(_.y-A.y);if(O===0)return!0;if(O<0)continue;T=!T}}else{if(_.y!==A.y)continue;if(Q.x<=_.x&&_.x<=A.x||A.x<=_.x&&_.x<=Q.x)return!0}}return T}let o=ia.isClockWise,s=this.subPaths;if(s.length===0)return[];if(e===!0)return n(s);let a,l,c,d=[];if(s.length===1)return l=s[0],c=new Ko,c.curves=l.curves,d.push(c),d;let u=!o(s[0].getPoints());u=t?!u:u;let h=[],p=[],f=[],m=0,b;p[m]=void 0,f[m]=[];for(let _=0,x=s.length;_1){let _=!1,x=[];for(let C=0,T=p.length;C0&&(_||(f=h))}let g;for(let _=0,x=p.length;_65504&&(console.warn("THREE.DataUtils.toHalfFloat(): value exceeds 65504."),t=65504),pG[0]=t;let e=rce[0],n=e>>16&32768,r=e>>12&2047,o=e>>23&255;return o<103?n:o>142?(n|=31744,n|=(o==255?0:1)&&e&8388607,n):o<113?(r|=2048,n|=(r>>114-o)+(r>>113-o&1),n):(n|=o-112<<10|r>>1,n+=r&1,n)}},oce=0,sce=1,ace=0,lce=1,cce=2;function dce(i){return console.warn("THREE.MeshFaceMaterial has been removed. Use an Array instead."),i}function uce(i=[]){return console.warn("THREE.MultiMaterial has been removed. Use an Array instead."),i.isMultiMaterial=!0,i.materials=i,i.clone=function(){return i.slice()},i}function hce(i,t){return console.warn("THREE.PointCloud has been renamed to THREE.Points."),new su(i,t)}function pce(i){return console.warn("THREE.Particle has been renamed to THREE.Sprite."),new Hp(i)}function fce(i,t){return console.warn("THREE.ParticleSystem has been renamed to THREE.Points."),new su(i,t)}function mce(i){return console.warn("THREE.PointCloudMaterial has been renamed to THREE.PointsMaterial."),new rl(i)}function gce(i){return console.warn("THREE.ParticleBasicMaterial has been renamed to THREE.PointsMaterial."),new rl(i)}function _ce(i){return console.warn("THREE.ParticleSystemMaterial has been renamed to THREE.PointsMaterial."),new rl(i)}function vce(i,t,e){return console.warn("THREE.Vertex has been removed. Use THREE.Vector3 instead."),new P(i,t,e)}function yce(i,t){return console.warn("THREE.DynamicBufferAttribute has been removed. Use new THREE.BufferAttribute().setUsage( THREE.DynamicDrawUsage ) instead."),new hn(i,t).setUsage(Op)}function bce(i,t){return console.warn("THREE.Int8Attribute has been removed. Use new THREE.Int8BufferAttribute() instead."),new bw(i,t)}function xce(i,t){return console.warn("THREE.Uint8Attribute has been removed. Use new THREE.Uint8BufferAttribute() instead."),new xw(i,t)}function wce(i,t){return console.warn("THREE.Uint8ClampedAttribute has been removed. Use new THREE.Uint8ClampedBufferAttribute() instead."),new ww(i,t)}function Cce(i,t){return console.warn("THREE.Int16Attribute has been removed. Use new THREE.Int16BufferAttribute() instead."),new Cw(i,t)}function Sce(i,t){return console.warn("THREE.Uint16Attribute has been removed. Use new THREE.Uint16BufferAttribute() instead."),new Pp(i,t)}function Mce(i,t){return console.warn("THREE.Int32Attribute has been removed. Use new THREE.Int32BufferAttribute() instead."),new Sw(i,t)}function Ece(i,t){return console.warn("THREE.Uint32Attribute has been removed. Use new THREE.Uint32BufferAttribute() instead."),new Rp(i,t)}function Ice(i,t){return console.warn("THREE.Float32Attribute has been removed. Use new THREE.Float32BufferAttribute() instead."),new st(i,t)}function Tce(i,t){return console.warn("THREE.Float64Attribute has been removed. Use new THREE.Float64BufferAttribute() instead."),new Ew(i,t)}Kr.create=function(i,t){return console.log("THREE.Curve.create() has been deprecated"),i.prototype=Object.create(Kr.prototype),i.prototype.constructor=i,i.prototype.getPoint=t,i};du.prototype.fromPoints=function(i){return console.warn("THREE.Path: .fromPoints() has been renamed to .setFromPoints()."),this.setFromPoints(i)};function Dce(i){return console.warn("THREE.AxisHelper has been renamed to THREE.AxesHelper."),new cC(i)}function Oce(i,t){return console.warn("THREE.BoundingBoxHelper has been deprecated. Creating a THREE.BoxHelper instead."),new lC(i,t)}function Pce(i,t){return console.warn("THREE.EdgesHelper has been removed. Use THREE.EdgesGeometry instead."),new Pr(new c_(i.geometry),new ki({color:t!==void 0?t:16777215}))}aC.prototype.setColors=function(){console.error("THREE.GridHelper: setColors() has been deprecated, pass them in the constructor instead.")};sC.prototype.update=function(){console.error("THREE.SkeletonHelper: update() no longer needs to be called.")};function Rce(i,t){return console.warn("THREE.WireframeHelper has been removed. Use THREE.WireframeGeometry instead."),new Pr(new C_(i.geometry),new ki({color:t!==void 0?t:16777215}))}fr.prototype.extractUrlBase=function(i){return console.warn("THREE.Loader: .extractUrlBase() has been deprecated. Use THREE.LoaderUtils.extractUrlBase() instead."),Jp.extractUrlBase(i)};fr.Handlers={add:function(){console.error("THREE.Loader: Handlers.add() has been removed. Use LoadingManager.addHandler() instead.")},get:function(){console.error("THREE.Loader: Handlers.get() has been removed. Use LoadingManager.getHandler() instead.")}};function Ace(i){return console.warn("THREE.XHRLoader has been renamed to THREE.FileLoader."),new Jo(i)}function Nce(i){return console.warn("THREE.BinaryTextureLoader has been renamed to THREE.DataTextureLoader."),new zw(i)}gc.prototype.center=function(i){return console.warn("THREE.Box2: .center() has been renamed to .getCenter()."),this.getCenter(i)};gc.prototype.empty=function(){return console.warn("THREE.Box2: .empty() has been renamed to .isEmpty()."),this.isEmpty()};gc.prototype.isIntersectionBox=function(i){return console.warn("THREE.Box2: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(i)};gc.prototype.size=function(i){return console.warn("THREE.Box2: .size() has been renamed to .getSize()."),this.getSize(i)};Qr.prototype.center=function(i){return console.warn("THREE.Box3: .center() has been renamed to .getCenter()."),this.getCenter(i)};Qr.prototype.empty=function(){return console.warn("THREE.Box3: .empty() has been renamed to .isEmpty()."),this.isEmpty()};Qr.prototype.isIntersectionBox=function(i){return console.warn("THREE.Box3: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(i)};Qr.prototype.isIntersectionSphere=function(i){return console.warn("THREE.Box3: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(i)};Qr.prototype.size=function(i){return console.warn("THREE.Box3: .size() has been renamed to .getSize()."),this.getSize(i)};oa.prototype.empty=function(){return console.warn("THREE.Sphere: .empty() has been renamed to .isEmpty()."),this.isEmpty()};ru.prototype.setFromMatrix=function(i){return console.warn("THREE.Frustum: .setFromMatrix() has been renamed to .setFromProjectionMatrix()."),this.setFromProjectionMatrix(i)};oC.prototype.center=function(i){return console.warn("THREE.Line3: .center() has been renamed to .getCenter()."),this.getCenter(i)};Di.prototype.flattenToArrayOffset=function(i,t){return console.warn("THREE.Matrix3: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(i,t)};Di.prototype.multiplyVector3=function(i){return console.warn("THREE.Matrix3: .multiplyVector3() has been removed. Use vector.applyMatrix3( matrix ) instead."),i.applyMatrix3(this)};Di.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix3: .multiplyVector3Array() has been removed.")};Di.prototype.applyToBufferAttribute=function(i){return console.warn("THREE.Matrix3: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix3( matrix ) instead."),i.applyMatrix3(this)};Di.prototype.applyToVector3Array=function(){console.error("THREE.Matrix3: .applyToVector3Array() has been removed.")};Di.prototype.getInverse=function(i){return console.warn("THREE.Matrix3: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(i).invert()};ut.prototype.extractPosition=function(i){return console.warn("THREE.Matrix4: .extractPosition() has been renamed to .copyPosition()."),this.copyPosition(i)};ut.prototype.flattenToArrayOffset=function(i,t){return console.warn("THREE.Matrix4: .flattenToArrayOffset() has been deprecated. Use .toArray() instead."),this.toArray(i,t)};ut.prototype.getPosition=function(){return console.warn("THREE.Matrix4: .getPosition() has been removed. Use Vector3.setFromMatrixPosition( matrix ) instead."),new P().setFromMatrixColumn(this,3)};ut.prototype.setRotationFromQuaternion=function(i){return console.warn("THREE.Matrix4: .setRotationFromQuaternion() has been renamed to .makeRotationFromQuaternion()."),this.makeRotationFromQuaternion(i)};ut.prototype.multiplyToArray=function(){console.warn("THREE.Matrix4: .multiplyToArray() has been removed.")};ut.prototype.multiplyVector3=function(i){return console.warn("THREE.Matrix4: .multiplyVector3() has been removed. Use vector.applyMatrix4( matrix ) instead."),i.applyMatrix4(this)};ut.prototype.multiplyVector4=function(i){return console.warn("THREE.Matrix4: .multiplyVector4() has been removed. Use vector.applyMatrix4( matrix ) instead."),i.applyMatrix4(this)};ut.prototype.multiplyVector3Array=function(){console.error("THREE.Matrix4: .multiplyVector3Array() has been removed.")};ut.prototype.rotateAxis=function(i){console.warn("THREE.Matrix4: .rotateAxis() has been removed. Use Vector3.transformDirection( matrix ) instead."),i.transformDirection(this)};ut.prototype.crossVector=function(i){return console.warn("THREE.Matrix4: .crossVector() has been removed. Use vector.applyMatrix4( matrix ) instead."),i.applyMatrix4(this)};ut.prototype.translate=function(){console.error("THREE.Matrix4: .translate() has been removed.")};ut.prototype.rotateX=function(){console.error("THREE.Matrix4: .rotateX() has been removed.")};ut.prototype.rotateY=function(){console.error("THREE.Matrix4: .rotateY() has been removed.")};ut.prototype.rotateZ=function(){console.error("THREE.Matrix4: .rotateZ() has been removed.")};ut.prototype.rotateByAxis=function(){console.error("THREE.Matrix4: .rotateByAxis() has been removed.")};ut.prototype.applyToBufferAttribute=function(i){return console.warn("THREE.Matrix4: .applyToBufferAttribute() has been removed. Use attribute.applyMatrix4( matrix ) instead."),i.applyMatrix4(this)};ut.prototype.applyToVector3Array=function(){console.error("THREE.Matrix4: .applyToVector3Array() has been removed.")};ut.prototype.makeFrustum=function(i,t,e,n,r,o){return console.warn("THREE.Matrix4: .makeFrustum() has been removed. Use .makePerspective( left, right, top, bottom, near, far ) instead."),this.makePerspective(i,t,n,e,r,o)};ut.prototype.getInverse=function(i){return console.warn("THREE.Matrix4: .getInverse() has been removed. Use matrixInv.copy( matrix ).invert(); instead."),this.copy(i).invert()};Zo.prototype.isIntersectionLine=function(i){return console.warn("THREE.Plane: .isIntersectionLine() has been renamed to .intersectsLine()."),this.intersectsLine(i)};Gi.prototype.multiplyVector3=function(i){return console.warn("THREE.Quaternion: .multiplyVector3() has been removed. Use is now vector.applyQuaternion( quaternion ) instead."),i.applyQuaternion(this)};Gi.prototype.inverse=function(){return console.warn("THREE.Quaternion: .inverse() has been renamed to invert()."),this.invert()};sa.prototype.isIntersectionBox=function(i){return console.warn("THREE.Ray: .isIntersectionBox() has been renamed to .intersectsBox()."),this.intersectsBox(i)};sa.prototype.isIntersectionPlane=function(i){return console.warn("THREE.Ray: .isIntersectionPlane() has been renamed to .intersectsPlane()."),this.intersectsPlane(i)};sa.prototype.isIntersectionSphere=function(i){return console.warn("THREE.Ray: .isIntersectionSphere() has been renamed to .intersectsSphere()."),this.intersectsSphere(i)};hr.prototype.area=function(){return console.warn("THREE.Triangle: .area() has been renamed to .getArea()."),this.getArea()};hr.prototype.barycoordFromPoint=function(i,t){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),this.getBarycoord(i,t)};hr.prototype.midpoint=function(i){return console.warn("THREE.Triangle: .midpoint() has been renamed to .getMidpoint()."),this.getMidpoint(i)};hr.prototypenormal=function(i){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),this.getNormal(i)};hr.prototype.plane=function(i){return console.warn("THREE.Triangle: .plane() has been renamed to .getPlane()."),this.getPlane(i)};hr.barycoordFromPoint=function(i,t,e,n,r){return console.warn("THREE.Triangle: .barycoordFromPoint() has been renamed to .getBarycoord()."),hr.getBarycoord(i,t,e,n,r)};hr.normal=function(i,t,e,n){return console.warn("THREE.Triangle: .normal() has been renamed to .getNormal()."),hr.getNormal(i,t,e,n)};Ko.prototype.extractAllPoints=function(i){return console.warn("THREE.Shape: .extractAllPoints() has been removed. Use .extractPoints() instead."),this.extractPoints(i)};Ko.prototype.extrude=function(i){return console.warn("THREE.Shape: .extrude() has been removed. Use ExtrudeGeometry() instead."),new sl(this,i)};Ko.prototype.makeGeometry=function(i){return console.warn("THREE.Shape: .makeGeometry() has been removed. Use ShapeGeometry() instead."),new Qp(this,i)};xe.prototype.fromAttribute=function(i,t,e){return console.warn("THREE.Vector2: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(i,t,e)};xe.prototype.distanceToManhattan=function(i){return console.warn("THREE.Vector2: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(i)};xe.prototype.lengthManhattan=function(){return console.warn("THREE.Vector2: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};P.prototype.setEulerFromRotationMatrix=function(){console.error("THREE.Vector3: .setEulerFromRotationMatrix() has been removed. Use Euler.setFromRotationMatrix() instead.")};P.prototype.setEulerFromQuaternion=function(){console.error("THREE.Vector3: .setEulerFromQuaternion() has been removed. Use Euler.setFromQuaternion() instead.")};P.prototype.getPositionFromMatrix=function(i){return console.warn("THREE.Vector3: .getPositionFromMatrix() has been renamed to .setFromMatrixPosition()."),this.setFromMatrixPosition(i)};P.prototype.getScaleFromMatrix=function(i){return console.warn("THREE.Vector3: .getScaleFromMatrix() has been renamed to .setFromMatrixScale()."),this.setFromMatrixScale(i)};P.prototype.getColumnFromMatrix=function(i,t){return console.warn("THREE.Vector3: .getColumnFromMatrix() has been renamed to .setFromMatrixColumn()."),this.setFromMatrixColumn(t,i)};P.prototype.applyProjection=function(i){return console.warn("THREE.Vector3: .applyProjection() has been removed. Use .applyMatrix4( m ) instead."),this.applyMatrix4(i)};P.prototype.fromAttribute=function(i,t,e){return console.warn("THREE.Vector3: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(i,t,e)};P.prototype.distanceToManhattan=function(i){return console.warn("THREE.Vector3: .distanceToManhattan() has been renamed to .manhattanDistanceTo()."),this.manhattanDistanceTo(i)};P.prototype.lengthManhattan=function(){return console.warn("THREE.Vector3: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};Mn.prototype.fromAttribute=function(i,t,e){return console.warn("THREE.Vector4: .fromAttribute() has been renamed to .fromBufferAttribute()."),this.fromBufferAttribute(i,t,e)};Mn.prototype.lengthManhattan=function(){return console.warn("THREE.Vector4: .lengthManhattan() has been renamed to .manhattanLength()."),this.manhattanLength()};pn.prototype.getChildByName=function(i){return console.warn("THREE.Object3D: .getChildByName() has been renamed to .getObjectByName()."),this.getObjectByName(i)};pn.prototype.renderDepth=function(){console.warn("THREE.Object3D: .renderDepth has been removed. Use .renderOrder, instead.")};pn.prototype.translate=function(i,t){return console.warn("THREE.Object3D: .translate() has been removed. Use .translateOnAxis( axis, distance ) instead."),this.translateOnAxis(t,i)};pn.prototype.getWorldRotation=function(){console.error("THREE.Object3D: .getWorldRotation() has been removed. Use THREE.Object3D.getWorldQuaternion( target ) instead.")};pn.prototype.applyMatrix=function(i){return console.warn("THREE.Object3D: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(i)};Object.defineProperties(pn.prototype,{eulerOrder:{get:function(){return console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order},set:function(i){console.warn("THREE.Object3D: .eulerOrder is now .rotation.order."),this.rotation.order=i}},useQuaternion:{get:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")},set:function(){console.warn("THREE.Object3D: .useQuaternion has been removed. The library now uses quaternions by default.")}}});yi.prototype.setDrawMode=function(){console.error("THREE.Mesh: .setDrawMode() has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")};Object.defineProperties(yi.prototype,{drawMode:{get:function(){return console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode."),V4},set:function(){console.error("THREE.Mesh: .drawMode has been removed. The renderer now always assumes THREE.TrianglesDrawMode. Transform your geometry via BufferGeometryUtils.toTrianglesDrawMode() if necessary.")}}});Gp.prototype.initBones=function(){console.error("THREE.SkinnedMesh: initBones() has been removed.")};Ri.prototype.setLens=function(i,t){console.warn("THREE.PerspectiveCamera.setLens is deprecated. Use .setFocalLength and .filmGauge for a photographic setup."),t!==void 0&&(this.filmGauge=t),this.setFocalLength(i)};Object.defineProperties(Ro.prototype,{onlyShadow:{set:function(){console.warn("THREE.Light: .onlyShadow has been removed.")}},shadowCameraFov:{set:function(i){console.warn("THREE.Light: .shadowCameraFov is now .shadow.camera.fov."),this.shadow.camera.fov=i}},shadowCameraLeft:{set:function(i){console.warn("THREE.Light: .shadowCameraLeft is now .shadow.camera.left."),this.shadow.camera.left=i}},shadowCameraRight:{set:function(i){console.warn("THREE.Light: .shadowCameraRight is now .shadow.camera.right."),this.shadow.camera.right=i}},shadowCameraTop:{set:function(i){console.warn("THREE.Light: .shadowCameraTop is now .shadow.camera.top."),this.shadow.camera.top=i}},shadowCameraBottom:{set:function(i){console.warn("THREE.Light: .shadowCameraBottom is now .shadow.camera.bottom."),this.shadow.camera.bottom=i}},shadowCameraNear:{set:function(i){console.warn("THREE.Light: .shadowCameraNear is now .shadow.camera.near."),this.shadow.camera.near=i}},shadowCameraFar:{set:function(i){console.warn("THREE.Light: .shadowCameraFar is now .shadow.camera.far."),this.shadow.camera.far=i}},shadowCameraVisible:{set:function(){console.warn("THREE.Light: .shadowCameraVisible has been removed. Use new THREE.CameraHelper( light.shadow.camera ) instead.")}},shadowBias:{set:function(i){console.warn("THREE.Light: .shadowBias is now .shadow.bias."),this.shadow.bias=i}},shadowDarkness:{set:function(){console.warn("THREE.Light: .shadowDarkness has been removed.")}},shadowMapWidth:{set:function(i){console.warn("THREE.Light: .shadowMapWidth is now .shadow.mapSize.width."),this.shadow.mapSize.width=i}},shadowMapHeight:{set:function(i){console.warn("THREE.Light: .shadowMapHeight is now .shadow.mapSize.height."),this.shadow.mapSize.height=i}}});Object.defineProperties(hn.prototype,{length:{get:function(){return console.warn("THREE.BufferAttribute: .length has been deprecated. Use .count instead."),this.array.length}},dynamic:{get:function(){return console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.usage===Op},set:function(){console.warn("THREE.BufferAttribute: .dynamic has been deprecated. Use .usage instead."),this.setUsage(Op)}}});hn.prototype.setDynamic=function(i){return console.warn("THREE.BufferAttribute: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(i===!0?Op:Dp),this};hn.prototype.copyIndicesArray=function(){console.error("THREE.BufferAttribute: .copyIndicesArray() has been removed.")},hn.prototype.setArray=function(){console.error("THREE.BufferAttribute: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")};Pt.prototype.addIndex=function(i){console.warn("THREE.BufferGeometry: .addIndex() has been renamed to .setIndex()."),this.setIndex(i)};Pt.prototype.addAttribute=function(i,t){return console.warn("THREE.BufferGeometry: .addAttribute() has been renamed to .setAttribute()."),!(t&&t.isBufferAttribute)&&!(t&&t.isInterleavedBufferAttribute)?(console.warn("THREE.BufferGeometry: .addAttribute() now expects ( name, attribute )."),this.setAttribute(i,new hn(arguments[1],arguments[2]))):i==="index"?(console.warn("THREE.BufferGeometry.addAttribute: Use .setIndex() for index attribute."),this.setIndex(t),this):this.setAttribute(i,t)};Pt.prototype.addDrawCall=function(i,t,e){e!==void 0&&console.warn("THREE.BufferGeometry: .addDrawCall() no longer supports indexOffset."),console.warn("THREE.BufferGeometry: .addDrawCall() is now .addGroup()."),this.addGroup(i,t)};Pt.prototype.clearDrawCalls=function(){console.warn("THREE.BufferGeometry: .clearDrawCalls() is now .clearGroups()."),this.clearGroups()};Pt.prototype.computeOffsets=function(){console.warn("THREE.BufferGeometry: .computeOffsets() has been removed.")};Pt.prototype.removeAttribute=function(i){return console.warn("THREE.BufferGeometry: .removeAttribute() has been renamed to .deleteAttribute()."),this.deleteAttribute(i)};Pt.prototype.applyMatrix=function(i){return console.warn("THREE.BufferGeometry: .applyMatrix() has been renamed to .applyMatrix4()."),this.applyMatrix4(i)};Object.defineProperties(Pt.prototype,{drawcalls:{get:function(){return console.error("THREE.BufferGeometry: .drawcalls has been renamed to .groups."),this.groups}},offsets:{get:function(){return console.warn("THREE.BufferGeometry: .offsets has been renamed to .groups."),this.groups}}});nl.prototype.setDynamic=function(i){return console.warn("THREE.InterleavedBuffer: .setDynamic() has been deprecated. Use .setUsage() instead."),this.setUsage(i===!0?Op:Dp),this};nl.prototype.setArray=function(){console.error("THREE.InterleavedBuffer: .setArray has been removed. Use BufferGeometry .setAttribute to replace/resize attribute buffers")};sl.prototype.getArrays=function(){console.error("THREE.ExtrudeGeometry: .getArrays() has been removed.")};sl.prototype.addShapeList=function(){console.error("THREE.ExtrudeGeometry: .addShapeList() has been removed.")};sl.prototype.addShape=function(){console.error("THREE.ExtrudeGeometry: .addShape() has been removed.")};zp.prototype.dispose=function(){console.error("THREE.Scene: .dispose() has been removed.")};nC.prototype.onUpdate=function(){return console.warn("THREE.Uniform: .onUpdate() has been removed. Use object.onBeforeRender() instead."),this};Object.defineProperties(Ni.prototype,{wrapAround:{get:function(){console.warn("THREE.Material: .wrapAround has been removed.")},set:function(){console.warn("THREE.Material: .wrapAround has been removed.")}},overdraw:{get:function(){console.warn("THREE.Material: .overdraw has been removed.")},set:function(){console.warn("THREE.Material: .overdraw has been removed.")}},wrapRGB:{get:function(){return console.warn("THREE.Material: .wrapRGB has been removed."),new Xe}},shading:{get:function(){console.error("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead.")},set:function(i){console.warn("THREE."+this.type+": .shading has been removed. Use the boolean .flatShading instead."),this.flatShading=i===sP}},stencilMask:{get:function(){return console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask},set:function(i){console.warn("THREE."+this.type+": .stencilMask has been removed. Use .stencilFuncMask instead."),this.stencilFuncMask=i}},vertexTangents:{get:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")},set:function(){console.warn("THREE."+this.type+": .vertexTangents has been removed.")}}});Object.defineProperties(Es.prototype,{derivatives:{get:function(){return console.warn("THREE.ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives},set:function(i){console.warn("THREE. ShaderMaterial: .derivatives has been moved to .extensions.derivatives."),this.extensions.derivatives=i}}});Vn.prototype.clearTarget=function(i,t,e,n){console.warn("THREE.WebGLRenderer: .clearTarget() has been deprecated. Use .setRenderTarget() and .clear() instead."),this.setRenderTarget(i),this.clear(t,e,n)};Vn.prototype.animate=function(i){console.warn("THREE.WebGLRenderer: .animate() is now .setAnimationLoop()."),this.setAnimationLoop(i)};Vn.prototype.getCurrentRenderTarget=function(){return console.warn("THREE.WebGLRenderer: .getCurrentRenderTarget() is now .getRenderTarget()."),this.getRenderTarget()};Vn.prototype.getMaxAnisotropy=function(){return console.warn("THREE.WebGLRenderer: .getMaxAnisotropy() is now .capabilities.getMaxAnisotropy()."),this.capabilities.getMaxAnisotropy()};Vn.prototype.getPrecision=function(){return console.warn("THREE.WebGLRenderer: .getPrecision() is now .capabilities.precision."),this.capabilities.precision};Vn.prototype.resetGLState=function(){return console.warn("THREE.WebGLRenderer: .resetGLState() is now .state.reset()."),this.state.reset()};Vn.prototype.supportsFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsFloatTextures() is now .extensions.get( 'OES_texture_float' )."),this.extensions.get("OES_texture_float")};Vn.prototype.supportsHalfFloatTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsHalfFloatTextures() is now .extensions.get( 'OES_texture_half_float' )."),this.extensions.get("OES_texture_half_float")};Vn.prototype.supportsStandardDerivatives=function(){return console.warn("THREE.WebGLRenderer: .supportsStandardDerivatives() is now .extensions.get( 'OES_standard_derivatives' )."),this.extensions.get("OES_standard_derivatives")};Vn.prototype.supportsCompressedTextureS3TC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTextureS3TC() is now .extensions.get( 'WEBGL_compressed_texture_s3tc' )."),this.extensions.get("WEBGL_compressed_texture_s3tc")};Vn.prototype.supportsCompressedTexturePVRTC=function(){return console.warn("THREE.WebGLRenderer: .supportsCompressedTexturePVRTC() is now .extensions.get( 'WEBGL_compressed_texture_pvrtc' )."),this.extensions.get("WEBGL_compressed_texture_pvrtc")};Vn.prototype.supportsBlendMinMax=function(){return console.warn("THREE.WebGLRenderer: .supportsBlendMinMax() is now .extensions.get( 'EXT_blend_minmax' )."),this.extensions.get("EXT_blend_minmax")};Vn.prototype.supportsVertexTextures=function(){return console.warn("THREE.WebGLRenderer: .supportsVertexTextures() is now .capabilities.vertexTextures."),this.capabilities.vertexTextures};Vn.prototype.supportsInstancedArrays=function(){return console.warn("THREE.WebGLRenderer: .supportsInstancedArrays() is now .extensions.get( 'ANGLE_instanced_arrays' )."),this.extensions.get("ANGLE_instanced_arrays")};Vn.prototype.enableScissorTest=function(i){console.warn("THREE.WebGLRenderer: .enableScissorTest() is now .setScissorTest()."),this.setScissorTest(i)};Vn.prototype.initMaterial=function(){console.warn("THREE.WebGLRenderer: .initMaterial() has been removed.")};Vn.prototype.addPrePlugin=function(){console.warn("THREE.WebGLRenderer: .addPrePlugin() has been removed.")};Vn.prototype.addPostPlugin=function(){console.warn("THREE.WebGLRenderer: .addPostPlugin() has been removed.")};Vn.prototype.updateShadowMap=function(){console.warn("THREE.WebGLRenderer: .updateShadowMap() has been removed.")};Vn.prototype.setFaceCulling=function(){console.warn("THREE.WebGLRenderer: .setFaceCulling() has been removed.")};Vn.prototype.allocTextureUnit=function(){console.warn("THREE.WebGLRenderer: .allocTextureUnit() has been removed.")};Vn.prototype.setTexture=function(){console.warn("THREE.WebGLRenderer: .setTexture() has been removed.")};Vn.prototype.setTexture2D=function(){console.warn("THREE.WebGLRenderer: .setTexture2D() has been removed.")};Vn.prototype.setTextureCube=function(){console.warn("THREE.WebGLRenderer: .setTextureCube() has been removed.")};Vn.prototype.getActiveMipMapLevel=function(){return console.warn("THREE.WebGLRenderer: .getActiveMipMapLevel() is now .getActiveMipmapLevel()."),this.getActiveMipmapLevel()};Object.defineProperties(Vn.prototype,{shadowMapEnabled:{get:function(){return this.shadowMap.enabled},set:function(i){console.warn("THREE.WebGLRenderer: .shadowMapEnabled is now .shadowMap.enabled."),this.shadowMap.enabled=i}},shadowMapType:{get:function(){return this.shadowMap.type},set:function(i){console.warn("THREE.WebGLRenderer: .shadowMapType is now .shadowMap.type."),this.shadowMap.type=i}},shadowMapCullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMapCullFace has been removed. Set Material.shadowSide instead.")}},context:{get:function(){return console.warn("THREE.WebGLRenderer: .context has been removed. Use .getContext() instead."),this.getContext()}},vr:{get:function(){return console.warn("THREE.WebGLRenderer: .vr has been renamed to .xr"),this.xr}},gammaInput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead."),!1},set:function(){console.warn("THREE.WebGLRenderer: .gammaInput has been removed. Set the encoding for textures via Texture.encoding instead.")}},gammaOutput:{get:function(){return console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),!1},set:function(i){console.warn("THREE.WebGLRenderer: .gammaOutput has been removed. Set WebGLRenderer.outputEncoding instead."),this.outputEncoding=i===!0?_c:pr}},toneMappingWhitePoint:{get:function(){return console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed."),1},set:function(){console.warn("THREE.WebGLRenderer: .toneMappingWhitePoint has been removed.")}}});Object.defineProperties(oG.prototype,{cullFace:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.cullFace has been removed. Set Material.shadowSide instead.")}},renderReverseSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderReverseSided has been removed. Set Material.shadowSide instead.")}},renderSingleSided:{get:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")},set:function(){console.warn("THREE.WebGLRenderer: .shadowMap.renderSingleSided has been removed. Set Material.shadowSide instead.")}}});function kce(i,t,e){return console.warn("THREE.WebGLRenderTargetCube( width, height, options ) is now WebGLCubeRenderTarget( size, options )."),new kp(i,e)}Object.defineProperties(Oo.prototype,{wrapS:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS},set:function(i){console.warn("THREE.WebGLRenderTarget: .wrapS is now .texture.wrapS."),this.texture.wrapS=i}},wrapT:{get:function(){return console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT},set:function(i){console.warn("THREE.WebGLRenderTarget: .wrapT is now .texture.wrapT."),this.texture.wrapT=i}},magFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter},set:function(i){console.warn("THREE.WebGLRenderTarget: .magFilter is now .texture.magFilter."),this.texture.magFilter=i}},minFilter:{get:function(){return console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter},set:function(i){console.warn("THREE.WebGLRenderTarget: .minFilter is now .texture.minFilter."),this.texture.minFilter=i}},anisotropy:{get:function(){return console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy},set:function(i){console.warn("THREE.WebGLRenderTarget: .anisotropy is now .texture.anisotropy."),this.texture.anisotropy=i}},offset:{get:function(){return console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset},set:function(i){console.warn("THREE.WebGLRenderTarget: .offset is now .texture.offset."),this.texture.offset=i}},repeat:{get:function(){return console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat},set:function(i){console.warn("THREE.WebGLRenderTarget: .repeat is now .texture.repeat."),this.texture.repeat=i}},format:{get:function(){return console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format},set:function(i){console.warn("THREE.WebGLRenderTarget: .format is now .texture.format."),this.texture.format=i}},type:{get:function(){return console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type},set:function(i){console.warn("THREE.WebGLRenderTarget: .type is now .texture.type."),this.texture.type=i}},generateMipmaps:{get:function(){return console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps},set:function(i){console.warn("THREE.WebGLRenderTarget: .generateMipmaps is now .texture.generateMipmaps."),this.texture.generateMipmaps=i}}});j_.prototype.load=function(i){console.warn("THREE.Audio: .load has been deprecated. Use THREE.AudioLoader instead.");let t=this;return new Yw().load(i,function(n){t.setBuffer(n)}),this};Kw.prototype.getData=function(){return console.warn("THREE.AudioAnalyser: .getData() is now .getFrequencyData()."),this.getFrequencyData()};Np.prototype.updateCubeMap=function(i,t){return console.warn("THREE.CubeCamera: .updateCubeMap() is now .update()."),this.update(i,t)};Np.prototype.clear=function(i,t,e,n){return console.warn("THREE.CubeCamera: .clear() is now .renderTarget.clear()."),this.renderTarget.clear(i,t,e,n)};tl.crossOrigin=void 0;tl.loadTexture=function(i,t,e,n){console.warn("THREE.ImageUtils.loadTexture has been deprecated. Use THREE.TextureLoader() instead.");let r=new Uw;r.setCrossOrigin(this.crossOrigin);let o=r.load(i,e,void 0,n);return t&&(o.mapping=t),o};tl.loadTextureCube=function(i,t,e,n){console.warn("THREE.ImageUtils.loadTextureCube has been deprecated. Use THREE.CubeTextureLoader() instead.");let r=new Vw;r.setCrossOrigin(this.crossOrigin);let o=r.load(i,e,void 0,n);return t&&(o.mapping=t),o};tl.loadCompressedTexture=function(){console.error("THREE.ImageUtils.loadCompressedTexture has been removed. Use THREE.DDSLoader instead.")};tl.loadCompressedTextureCube=function(){console.error("THREE.ImageUtils.loadCompressedTextureCube has been removed. Use THREE.DDSLoader instead.")};function Lce(){console.error("THREE.CanvasRenderer has been removed")}function Fce(){console.error("THREE.JSONLoader has been removed.")}var Bce={createMultiMaterialObject:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},detach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")},attach:function(){console.error("THREE.SceneUtils has been moved to /examples/jsm/utils/SceneUtils.js")}};function Vce(){console.error("THREE.LensFlare has been moved to /examples/jsm/objects/Lensflare.js")}function zce(){return console.error("THREE.ParametricGeometry has been moved to /examples/jsm/geometries/ParametricGeometry.js"),new Pt}function Uce(){return console.error("THREE.TextGeometry has been moved to /examples/jsm/geometries/TextGeometry.js"),new Pt}function Hce(){console.error("THREE.FontLoader has been moved to /examples/jsm/loaders/FontLoader.js")}function Gce(){console.error("THREE.Font has been moved to /examples/jsm/loaders/FontLoader.js")}function jce(){console.error("THREE.ImmediateRenderObject has been removed.")}typeof __THREE_DEVTOOLS__<"u"&&__THREE_DEVTOOLS__.dispatchEvent(new CustomEvent("register",{detail:{revision:rP}}));typeof window<"u"&&(window.__THREE__?console.warn("WARNING: Multiple instances of Three.js being imported."):window.__THREE__=rP);var nf=(()=>{class i{linearGradientId=Math.random().toString(36).slice(-6);fillUrl=`url(#${this.linearGradientId})`;static \u0275fac=function(n){return new(n||i)};static \u0275cmp=oe({type:i,selectors:[["me-logo"]],standalone:!0,features:[se],decls:19,vars:2,consts:[["width","24","height","24","viewBox","0 0 256 256","fill","none","xmlns","http://www.w3.org/2000/svg"],["width","256","height","256","fill","none"],["d","M229 64.5V192.5L128 248.5L127.5 115.5L229 64.5Z"],["d","M208 76V99L128 141.5V116L208 76Z","fill","white"],["d","M208 122.5V141.5L128 182.5V161.5L208 122.5Z","fill","white"],["d","M208 164.5V183L128 225.5V206L208 164.5Z","fill","white"],["d","M149 106V214.5L127 226V117.5L149 106Z","fill","white"],["d","M26 61L47.5 72.5V200L26 187V61Z","fill","#FBBC04"],["d","M125.5 10.5L145.5 21V60.5L125.5 56.5V10.5Z","fill","#DCA810"],["d","M164 31L184 41.5V81L164 78V31Z","fill","#309C4D"],["d","M164 31L184 41.5L87 94L65 82L164 31Z","fill","#11792D"],["d","M208 54.5L229 64.5L128 116L107 105L208 54.5Z","fill","#2C5CAC"],["d","M125.5 10.5L145.5 21L47.5 72.5L26 61L125.5 10.5Z","fill","#C78B15"],["d","M65 82L87 94V224L65 210.5V82Z","fill","#34A853"],["d","M107 105L128 116V248.5L107 236V105Z","fill","#4285F4"],["x1","144.5","y1","232","x2","219","y2","69.5","gradientUnits","userSpaceOnUse"],["stop-color","#4285F4"],["offset","1","stop-color","#2C5CAC"]],template:function(n,r){n&1&&(mo(),v(0,"svg",0),ee(1,"rect",1)(2,"path",2)(3,"path",3)(4,"path",4)(5,"path",5)(6,"path",6)(7,"path",7)(8,"path",8)(9,"path",9)(10,"path",10)(11,"path",11)(12,"path",12)(13,"path",13)(14,"path",14),v(15,"defs")(16,"linearGradient",15),ee(17,"stop",16)(18,"stop",17),y()()()),n&2&&(w(2),qe("fill",r.fillUrl),w(14),qe("id",r.linearGradientId))},styles:["[_nghost-%COMP%]{display:flex;align-items:center;justify-content:center}"]})}return i})();var vc=(()=>{class i{hiddenInputOpNodeIds=et({});hiddenOutputIds=et({});toggleInputOpNodeVisibility(e){this.hiddenInputOpNodeIds.update(n=>(n[e]===!0?delete n[e]:n[e]=!0,X({},n)))}setInputOpNodeVisible(e,n){let r=this.hiddenInputOpNodeIds()[e]!==!0;for(let o of n)o!==e&&(this.hiddenInputOpNodeIds()[o]||(r=!1));if(r)this.hiddenInputOpNodeIds.set({});else{let o={};for(let s of n)s!==e&&(o[s]=!0);this.hiddenInputOpNodeIds.set(o)}}toggleOutputVisibility(e){this.hiddenOutputIds.update(n=>(n[e]===!0?delete n[e]:n[e]=!0,X({},n)))}setOutputVisible(e,n){let r=this.hiddenOutputIds()[e]!==!0;for(let o of n)o!==e&&(this.hiddenOutputIds()[o]||(r=!1));if(r)this.hiddenOutputIds.set({});else{let o={};for(let s of n)s!==e&&(o[s]=!0);this.hiddenOutputIds.set(o)}}getInputOpNodeVisible(e){return!this.hiddenInputOpNodeIds()[e]}getOutputVisible(e){return!this.hiddenOutputIds()[e]}resetInputOutputHiddenIds(){this.hiddenInputOpNodeIds.set({}),this.hiddenOutputIds.set({})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var es=(()=>{class i{appService;selectedNodeIds=et({});hasSelectedNodes=Ot(()=>Object.keys(this.selectedNodeIds()).length>0);selectedNodeCount=Ot(()=>Object.keys(this.selectedNodeIds()).length);paneId="";constructor(e){this.appService=e}toggleNode(e){this.selectedNodeIds.update(n=>{if(!this.modelGraph)return n;let r=this.modelGraph.nodesById[e];if(wt(r)){let o=r.descendantsOpNodeIds||[],s=o.some(a=>n[a]);for(let a of o)Et(this.modelGraph.nodesById[a])&&(s?delete n[a]:n[a]=!0)}else n[e]?delete n[e]:n[e]=!0;return X({},n)})}toggleNodes(e){if(e.length===0||!this.modelGraph)return;let n=X({},this.selectedNodeIds());for(let r of e){let o=this.modelGraph.nodesById[r];if(Et(o))n[r]?delete n[r]:n[r]=!0;else if(wt(o)&&!o.expanded)for(let s of o.descendantsOpNodeIds||[])n[s]?delete n[s]:n[s]=!0}this.selectedNodeIds.set(n)}clearSelection(){this.selectedNodeIds.set({})}isHiddenFromSelection(e){return e.label==="pseudo_const"}getSelectedSubgraph(){if(!this.modelGraph)return;let e=this.appService.getGraphById(this.modelGraph.id);if(!e)return;e=JSON.parse(JSON.stringify(e));let n={};for(let h of e.nodes)n[h.id]=h;let r=this.selectedNodeIds(),o=e.nodes.filter(h=>r[h.id]===!0),s=o.find(h=>h.label==="GraphInputs");if(!s){let h=e.nodes.find(p=>p.label==="GraphInputs");if(!h)throw new Error("GraphInputs node not found in the original graph.");s=structuredClone(h),s.outputsMetadata=[],o.push(s)}s.outputsMetadata=s.outputsMetadata||[];let a=new Map,l=s.outputsMetadata.length;for(let h of o){let p=(h.incomingEdges||[]).filter(f=>!r[f.sourceNodeId]);for(let f of p){let m=n[f.sourceNodeId];if(this.isHiddenFromSelection(m)){o.push(m);continue}let b=(m.outputsMetadata||[]).find(_=>_.id===f.sourceNodeOutputId);if(!b)continue;let g=(b.attrs||[]).find(_=>_.key==="tensor_index")?.value;g&&(a.has(g)||(a.set(g,l.toString()),s.outputsMetadata.push({id:l.toString(),attrs:b.attrs}),l++),f.sourceNodeId=s.id,f.sourceNodeOutputId=a.get(g))}}let c=o.find(h=>h.label==="GraphOutputs");if(!c){let h=e.nodes.find(p=>p.label==="GraphOutputs");if(!h)throw new Error("GraphOutputs node not found in the original graph.");c=structuredClone(h),c.incomingEdges=[],o.push(c)}c.incomingEdges=c.incomingEdges||[];let d=new Set,u=c.incomingEdges.length;for(let h of e.nodes){if(r[h.id])continue;let p=(h.incomingEdges||[]).filter(f=>r[f.sourceNodeId]);for(let f of p){let b=(n[f.sourceNodeId].outputsMetadata||[]).find(_=>_.id===f.sourceNodeOutputId);if(!b)continue;let g=(b.attrs||[]).find(_=>_.key==="tensor_index")?.value;if(g&&!d.has(g)){d.add(g);let _=structuredClone(f);_.targetNodeInputId=u.toString(),c.incomingEdges.push(_),u++}}}return{id:`${e.id}_subgraph`,collectionLabel:e.collectionLabel,nodes:o}}get modelGraph(){return this.appService.getCurrentModelGraphFromPane(this.paneId)}static \u0275fac=function(n){return new(n||i)(Le(nt))};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var _C=class{};function mG(i){return i&&typeof i.connect=="function"&&!(i instanceof ml)}var xu=class{get selected(){return this._selected||(this._selected=Array.from(this._selection.values())),this._selected}constructor(t=!1,e,n=!0,r){this._multiple=t,this._emitChanges=n,this.compareWith=r,this._selection=new Set,this._deselectedToEmit=[],this._selectedToEmit=[],this.changed=new ce,e&&e.length&&(t?e.forEach(o=>this._markSelected(o)):this._markSelected(e[0]),this._selectedToEmit.length=0)}select(...t){this._verifyValueAssignment(t),t.forEach(n=>this._markSelected(n));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}deselect(...t){this._verifyValueAssignment(t),t.forEach(n=>this._unmarkSelected(n));let e=this._hasQueuedChanges();return this._emitChangeEvent(),e}setSelection(...t){this._verifyValueAssignment(t);let e=this.selected,n=new Set(t);t.forEach(o=>this._markSelected(o)),e.filter(o=>!n.has(this._getConcreteValue(o,n))).forEach(o=>this._unmarkSelected(o));let r=this._hasQueuedChanges();return this._emitChangeEvent(),r}toggle(t){return this.isSelected(t)?this.deselect(t):this.select(t)}clear(t=!0){this._unmarkAll();let e=this._hasQueuedChanges();return t&&this._emitChangeEvent(),e}isSelected(t){return this._selection.has(this._getConcreteValue(t))}isEmpty(){return this._selection.size===0}hasValue(){return!this.isEmpty()}sort(t){this._multiple&&this.selected&&this._selected.sort(t)}isMultipleSelection(){return this._multiple}_emitChangeEvent(){this._selected=null,(this._selectedToEmit.length||this._deselectedToEmit.length)&&(this.changed.next({source:this,added:this._selectedToEmit,removed:this._deselectedToEmit}),this._deselectedToEmit=[],this._selectedToEmit=[])}_markSelected(t){t=this._getConcreteValue(t),this.isSelected(t)||(this._multiple||this._unmarkAll(),this.isSelected(t)||this._selection.add(t),this._emitChanges&&this._selectedToEmit.push(t))}_unmarkSelected(t){t=this._getConcreteValue(t),this.isSelected(t)&&(this._selection.delete(t),this._emitChanges&&this._deselectedToEmit.push(t))}_unmarkAll(){this.isEmpty()||this._selection.forEach(t=>this._unmarkSelected(t))}_verifyValueAssignment(t){t.length>1&&this._multiple}_hasQueuedChanges(){return!!(this._deselectedToEmit.length||this._selectedToEmit.length)}_getConcreteValue(t,e){if(this.compareWith){e=e??this._selection;for(let n of e)if(this.compareWith(t,n))return n;return t}else return t}};var gG=(()=>{class i{constructor(){this._listeners=[]}notify(e,n){for(let r of this._listeners)r(e,n)}listen(e){return this._listeners.push(e),()=>{this._listeners=this._listeners.filter(n=>e!==n)}}ngOnDestroy(){this._listeners=[]}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Wce=20,wu=(()=>{class i{constructor(){this._ngZone=S(Ue),this._platform=S(Rn),this._document=S(ft,{optional:!0}),this._scrolled=new ce,this._globalSubscription=null,this._scrolledCount=0,this.scrollContainers=new Map}register(e){this.scrollContainers.has(e)||this.scrollContainers.set(e,e.elementScrolled().subscribe(()=>this._scrolled.next(e)))}deregister(e){let n=this.scrollContainers.get(e);n&&(n.unsubscribe(),this.scrollContainers.delete(e))}scrolled(e=Wce){return this._platform.isBrowser?new Dt(n=>{this._globalSubscription||this._addGlobalListener();let r=e>0?this._scrolled.pipe(jv(e)).subscribe(n):this._scrolled.subscribe(n);return this._scrolledCount++,()=>{r.unsubscribe(),this._scrolledCount--,this._scrolledCount||this._removeGlobalListener()}}):ke()}ngOnDestroy(){this._removeGlobalListener(),this.scrollContainers.forEach((e,n)=>this.deregister(n)),this._scrolled.complete()}ancestorScrolled(e,n){let r=this.getAncestorScrollContainers(e);return this.scrolled(n).pipe(qt(o=>!o||r.indexOf(o)>-1))}getAncestorScrollContainers(e){let n=[];return this.scrollContainers.forEach((r,o)=>{this._scrollableContainsElement(o,e)&&n.push(o)}),n}_getWindow(){return this._document.defaultView||window}_scrollableContainsElement(e,n){let r=ar(n),o=e.getElementRef().nativeElement;do if(r==o)return!0;while(r=r.parentElement);return!1}_addGlobalListener(){this._globalSubscription=this._ngZone.runOutsideAngular(()=>{let e=this._getWindow();return wn(e.document,"scroll").subscribe(()=>this._scrolled.next())})}_removeGlobalListener(){this._globalSubscription&&(this._globalSubscription.unsubscribe(),this._globalSubscription=null)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),wP=(()=>{class i{constructor(){this.elementRef=S(Fe),this.scrollDispatcher=S(wu),this.ngZone=S(Ue),this.dir=S(oi,{optional:!0}),this._destroyed=new ce,this._elementScrolled=new Dt(e=>this.ngZone.runOutsideAngular(()=>wn(this.elementRef.nativeElement,"scroll").pipe(Ke(this._destroyed)).subscribe(e)))}ngOnInit(){this.scrollDispatcher.register(this)}ngOnDestroy(){this.scrollDispatcher.deregister(this),this._destroyed.next(),this._destroyed.complete()}elementScrolled(){return this._elementScrolled}getElementRef(){return this.elementRef}scrollTo(e){let n=this.elementRef.nativeElement,r=this.dir&&this.dir.value=="rtl";e.left==null&&(e.left=r?e.end:e.start),e.right==null&&(e.right=r?e.start:e.end),e.bottom!=null&&(e.top=n.scrollHeight-n.clientHeight-e.bottom),r&&Dh()!=vs.NORMAL?(e.left!=null&&(e.right=n.scrollWidth-n.clientWidth-e.left),Dh()==vs.INVERTED?e.left=e.right:Dh()==vs.NEGATED&&(e.left=e.right?-e.right:e.right)):e.right!=null&&(e.left=n.scrollWidth-n.clientWidth-e.right),this._applyScrollToOptions(e)}_applyScrollToOptions(e){let n=this.elementRef.nativeElement;Eb()?n.scrollTo(e):(e.top!=null&&(n.scrollTop=e.top),e.left!=null&&(n.scrollLeft=e.left))}measureScrollOffset(e){let n="left",r="right",o=this.elementRef.nativeElement;if(e=="top")return o.scrollTop;if(e=="bottom")return o.scrollHeight-o.clientHeight-o.scrollTop;let s=this.dir&&this.dir.value=="rtl";return e=="start"?e=s?r:n:e=="end"&&(e=s?n:r),s&&Dh()==vs.INVERTED?e==n?o.scrollWidth-o.clientWidth-o.scrollLeft:o.scrollLeft:s&&Dh()==vs.NEGATED?e==n?o.scrollLeft+o.scrollWidth-o.clientWidth:-o.scrollLeft:e==n?o.scrollLeft:o.scrollWidth-o.clientWidth-o.scrollLeft}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["","cdk-scrollable",""],["","cdkScrollable",""]],standalone:!0})}}return i})(),$ce=20,aa=(()=>{class i{constructor(){this._platform=S(Rn),this._change=new ce,this._changeListener=n=>{this._change.next(n)},this._document=S(ft,{optional:!0}),S(Ue).runOutsideAngular(()=>{if(this._platform.isBrowser){let n=this._getWindow();n.addEventListener("resize",this._changeListener),n.addEventListener("orientationchange",this._changeListener)}this.change().subscribe(()=>this._viewportSize=null)})}ngOnDestroy(){if(this._platform.isBrowser){let e=this._getWindow();e.removeEventListener("resize",this._changeListener),e.removeEventListener("orientationchange",this._changeListener)}this._change.complete()}getViewportSize(){this._viewportSize||this._updateViewportSize();let e={width:this._viewportSize.width,height:this._viewportSize.height};return this._platform.isBrowser||(this._viewportSize=null),e}getViewportRect(){let e=this.getViewportScrollPosition(),{width:n,height:r}=this.getViewportSize();return{top:e.top,left:e.left,bottom:e.top+r,right:e.left+n,height:r,width:n}}getViewportScrollPosition(){if(!this._platform.isBrowser)return{top:0,left:0};let e=this._document,n=this._getWindow(),r=e.documentElement,o=r.getBoundingClientRect(),s=-o.top||e.body.scrollTop||n.scrollY||r.scrollTop||0,a=-o.left||e.body.scrollLeft||n.scrollX||r.scrollLeft||0;return{top:s,left:a}}change(e=$ce){return e>0?this._change.pipe(jv(e)):this._change}_getWindow(){return this._document.defaultView||window}_updateViewportSize(){let e=this._getWindow();this._viewportSize=this._platform.isBrowser?{width:e.innerWidth,height:e.innerHeight}:{width:0,height:0}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var ts=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({})}}return i})(),CP=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({imports:[ql,ts,ql,ts]})}}return i})();var q_=class{attach(t){return this._attachedHost=t,t.attach(this)}detach(){let t=this._attachedHost;t!=null&&(this._attachedHost=null,t.detach())}get isAttached(){return this._attachedHost!=null}setAttachedHost(t){this._attachedHost=t}},Li=class extends q_{constructor(t,e,n,r,o){super(),this.component=t,this.viewContainerRef=e,this.injector=n,this.projectableNodes=o}},Jr=class extends q_{constructor(t,e,n,r){super(),this.templateRef=t,this.viewContainerRef=e,this.context=n,this.injector=r}get origin(){return this.templateRef.elementRef}attach(t,e=this.context){return this.context=e,super.attach(t)}detach(){return this.context=void 0,super.detach()}},SP=class extends q_{constructor(t){super(),this.element=t instanceof Fe?t.nativeElement:t}},la=class{constructor(){this._isDisposed=!1,this.attachDomPortal=null}hasAttached(){return!!this._attachedPortal}attach(t){if(t instanceof Li)return this._attachedPortal=t,this.attachComponentPortal(t);if(t instanceof Jr)return this._attachedPortal=t,this.attachTemplatePortal(t);if(this.attachDomPortal&&t instanceof SP)return this._attachedPortal=t,this.attachDomPortal(t)}detach(){this._attachedPortal&&(this._attachedPortal.setAttachedHost(null),this._attachedPortal=null),this._invokeDisposeFn()}dispose(){this.hasAttached()&&this.detach(),this._invokeDisposeFn(),this._isDisposed=!0}setDisposeFn(t){this._disposeFn=t}_invokeDisposeFn(){this._disposeFn&&(this._disposeFn(),this._disposeFn=null)}};var Y_=class extends la{constructor(t,e,n,r,o){super(),this.outletElement=t,this._appRef=n,this._defaultInjector=r,this.attachDomPortal=s=>{let a=s.element;a.parentNode;let l=this._document.createComment("dom-portal");a.parentNode.insertBefore(l,a),this.outletElement.appendChild(a),this._attachedPortal=s,super.setDisposeFn(()=>{l.parentNode&&l.parentNode.replaceChild(a,l)})},this._document=o}attachComponentPortal(t){let e;if(t.viewContainerRef){let n=t.injector||t.viewContainerRef.injector,r=n.get(fs,null,{optional:!0})||void 0;e=t.viewContainerRef.createComponent(t.component,{index:t.viewContainerRef.length,injector:n,ngModuleRef:r,projectableNodes:t.projectableNodes||void 0}),this.setDisposeFn(()=>e.destroy())}else e=u0(t.component,{elementInjector:t.injector||this._defaultInjector||pt.NULL,environmentInjector:this._appRef.injector,projectableNodes:t.projectableNodes||void 0}),this._appRef.attachView(e.hostView),this.setDisposeFn(()=>{this._appRef.viewCount>0&&this._appRef.detachView(e.hostView),e.destroy()});return this.outletElement.appendChild(this._getComponentRootNode(e)),this._attachedPortal=t,e}attachTemplatePortal(t){let e=t.viewContainerRef,n=e.createEmbeddedView(t.templateRef,t.context,{injector:t.injector});return n.rootNodes.forEach(r=>this.outletElement.appendChild(r)),n.detectChanges(),this.setDisposeFn(()=>{let r=e.indexOf(n);r!==-1&&e.remove(r)}),this._attachedPortal=t,n}dispose(){super.dispose(),this.outletElement.remove()}_getComponentRootNode(t){return t.hostView.rootNodes[0]}};var ns=(()=>{class i extends la{constructor(){super(),this._moduleRef=S(fs,{optional:!0}),this._document=S(ft),this._viewContainerRef=S(Kt),this._isInitialized=!1,this.attached=new Ie,this.attachDomPortal=e=>{let n=e.element;n.parentNode;let r=this._document.createComment("dom-portal");e.setAttachedHost(this),n.parentNode.insertBefore(r,n),this._getRootNode().appendChild(n),this._attachedPortal=e,super.setDisposeFn(()=>{r.parentNode&&r.parentNode.replaceChild(n,r)})}}get portal(){return this._attachedPortal}set portal(e){this.hasAttached()&&!e&&!this._isInitialized||(this.hasAttached()&&super.detach(),e&&super.attach(e),this._attachedPortal=e||null)}get attachedRef(){return this._attachedRef}ngOnInit(){this._isInitialized=!0}ngOnDestroy(){super.dispose(),this._attachedRef=this._attachedPortal=null}attachComponentPortal(e){e.setAttachedHost(this);let n=e.viewContainerRef!=null?e.viewContainerRef:this._viewContainerRef,r=n.createComponent(e.component,{index:n.length,injector:e.injector||n.injector,projectableNodes:e.projectableNodes||void 0,ngModuleRef:this._moduleRef||void 0});return n!==this._viewContainerRef&&this._getRootNode().appendChild(r.hostView.rootNodes[0]),super.setDisposeFn(()=>r.destroy()),this._attachedPortal=e,this._attachedRef=r,this.attached.emit(r),r}attachTemplatePortal(e){e.setAttachedHost(this);let n=this._viewContainerRef.createEmbeddedView(e.templateRef,e.context,{injector:e.injector});return super.setDisposeFn(()=>this._viewContainerRef.clear()),this._attachedPortal=e,this._attachedRef=n,this.attached.emit(n),n}_getRootNode(){let e=this._viewContainerRef.element.nativeElement;return e.nodeType===e.ELEMENT_NODE?e:e.parentNode}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["","cdkPortalOutlet",""]],inputs:{portal:[0,"cdkPortalOutlet","portal"]},outputs:{attached:"attached"},exportAs:["cdkPortalOutlet"],standalone:!0,features:[sn]})}}return i})();var Ds=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({})}}return i})();var _G=Eb(),MP=class{constructor(t,e){this._viewportRuler=t,this._previousHTMLStyles={top:"",left:""},this._isEnabled=!1,this._document=e}attach(){}enable(){if(this._canBeEnabled()){let t=this._document.documentElement;this._previousScrollPosition=this._viewportRuler.getViewportScrollPosition(),this._previousHTMLStyles.left=t.style.left||"",this._previousHTMLStyles.top=t.style.top||"",t.style.left=Mi(-this._previousScrollPosition.left),t.style.top=Mi(-this._previousScrollPosition.top),t.classList.add("cdk-global-scrollblock"),this._isEnabled=!0}}disable(){if(this._isEnabled){let t=this._document.documentElement,e=this._document.body,n=t.style,r=e.style,o=n.scrollBehavior||"",s=r.scrollBehavior||"";this._isEnabled=!1,n.left=this._previousHTMLStyles.left,n.top=this._previousHTMLStyles.top,t.classList.remove("cdk-global-scrollblock"),_G&&(n.scrollBehavior=r.scrollBehavior="auto"),window.scroll(this._previousScrollPosition.left,this._previousScrollPosition.top),_G&&(n.scrollBehavior=o,r.scrollBehavior=s)}}_canBeEnabled(){if(this._document.documentElement.classList.contains("cdk-global-scrollblock")||this._isEnabled)return!1;let e=this._document.body,n=this._viewportRuler.getViewportSize();return e.scrollHeight>n.height||e.scrollWidth>n.width}};var EP=class{constructor(t,e,n,r){this._scrollDispatcher=t,this._ngZone=e,this._viewportRuler=n,this._config=r,this._scrollSubscription=null,this._detach=()=>{this.disable(),this._overlayRef.hasAttached()&&this._ngZone.run(()=>this._overlayRef.detach())}}attach(t){this._overlayRef,this._overlayRef=t}enable(){if(this._scrollSubscription)return;let t=this._scrollDispatcher.scrolled(0).pipe(qt(e=>!e||!this._overlayRef.overlayElement.contains(e.getElementRef().nativeElement)));this._config&&this._config.threshold&&this._config.threshold>1?(this._initialScrollPosition=this._viewportRuler.getViewportScrollPosition().top,this._scrollSubscription=t.subscribe(()=>{let e=this._viewportRuler.getViewportScrollPosition().top;Math.abs(e-this._initialScrollPosition)>this._config.threshold?this._detach():this._overlayRef.updatePosition()})):this._scrollSubscription=t.subscribe(this._detach)}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},vC=class{enable(){}disable(){}attach(){}};function IP(i,t){return t.some(e=>{let n=i.bottome.bottom,o=i.righte.right;return n||r||o||s})}function vG(i,t){return t.some(e=>{let n=i.tope.bottom,o=i.lefte.right;return n||r||o||s})}var TP=class{constructor(t,e,n,r){this._scrollDispatcher=t,this._viewportRuler=e,this._ngZone=n,this._config=r,this._scrollSubscription=null}attach(t){this._overlayRef,this._overlayRef=t}enable(){if(!this._scrollSubscription){let t=this._config?this._config.scrollThrottle:0;this._scrollSubscription=this._scrollDispatcher.scrolled(t).subscribe(()=>{if(this._overlayRef.updatePosition(),this._config&&this._config.autoClose){let e=this._overlayRef.overlayElement.getBoundingClientRect(),{width:n,height:r}=this._viewportRuler.getViewportSize();IP(e,[{width:n,height:r,bottom:r,right:n,top:0,left:0}])&&(this.disable(),this._ngZone.run(()=>this._overlayRef.detach()))}})}}disable(){this._scrollSubscription&&(this._scrollSubscription.unsubscribe(),this._scrollSubscription=null)}detach(){this.disable(),this._overlayRef=null}},Xce=(()=>{class i{constructor(){this._scrollDispatcher=S(wu),this._viewportRuler=S(aa),this._ngZone=S(Ue),this._document=S(ft),this.noop=()=>new vC,this.close=e=>new EP(this._scrollDispatcher,this._ngZone,this._viewportRuler,e),this.block=()=>new MP(this._viewportRuler,this._document),this.reposition=e=>new TP(this._scrollDispatcher,this._viewportRuler,this._ngZone,e)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),bi=class{constructor(t){if(this.scrollStrategy=new vC,this.panelClass="",this.hasBackdrop=!1,this.backdropClass="cdk-overlay-dark-backdrop",this.disposeOnNavigation=!1,t){let e=Object.keys(t);for(let n of e)t[n]!==void 0&&(this[n]=t[n])}}};var DP=class{constructor(t,e){this.connectionPair=t,this.scrollableViewProperties=e}};var SG=(()=>{class i{constructor(){this._attachedOverlays=[],this._document=S(ft)}ngOnDestroy(){this.detach()}add(e){this.remove(e),this._attachedOverlays.push(e)}remove(e){let n=this._attachedOverlays.indexOf(e);n>-1&&this._attachedOverlays.splice(n,1),this._attachedOverlays.length===0&&this.detach()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),Qce=(()=>{class i extends SG{constructor(){super(...arguments),this._ngZone=S(Ue,{optional:!0}),this._keydownListener=e=>{let n=this._attachedOverlays;for(let r=n.length-1;r>-1;r--)if(n[r]._keydownEvents.observers.length>0){let o=n[r]._keydownEvents;this._ngZone?this._ngZone.run(()=>o.next(e)):o.next(e);break}}}add(e){super.add(e),this._isAttached||(this._ngZone?this._ngZone.runOutsideAngular(()=>this._document.body.addEventListener("keydown",this._keydownListener)):this._document.body.addEventListener("keydown",this._keydownListener),this._isAttached=!0)}detach(){this._isAttached&&(this._document.body.removeEventListener("keydown",this._keydownListener),this._isAttached=!1)}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Zn(i)))(r||i)}})()}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),Zce=(()=>{class i extends SG{constructor(){super(...arguments),this._platform=S(Rn),this._ngZone=S(Ue,{optional:!0}),this._cursorStyleIsSet=!1,this._pointerDownListener=e=>{this._pointerDownEventTarget=Pi(e)},this._clickListener=e=>{let n=Pi(e),r=e.type==="click"&&this._pointerDownEventTarget?this._pointerDownEventTarget:n;this._pointerDownEventTarget=null;let o=this._attachedOverlays.slice();for(let s=o.length-1;s>-1;s--){let a=o[s];if(a._outsidePointerEvents.observers.length<1||!a.hasAttached())continue;if(yG(a.overlayElement,n)||yG(a.overlayElement,r))break;let l=a._outsidePointerEvents;this._ngZone?this._ngZone.run(()=>l.next(e)):l.next(e)}}}add(e){if(super.add(e),!this._isAttached){let n=this._document.body;this._ngZone?this._ngZone.runOutsideAngular(()=>this._addEventListeners(n)):this._addEventListeners(n),this._platform.IOS&&!this._cursorStyleIsSet&&(this._cursorOriginalValue=n.style.cursor,n.style.cursor="pointer",this._cursorStyleIsSet=!0),this._isAttached=!0}}detach(){if(this._isAttached){let e=this._document.body;e.removeEventListener("pointerdown",this._pointerDownListener,!0),e.removeEventListener("click",this._clickListener,!0),e.removeEventListener("auxclick",this._clickListener,!0),e.removeEventListener("contextmenu",this._clickListener,!0),this._platform.IOS&&this._cursorStyleIsSet&&(e.style.cursor=this._cursorOriginalValue,this._cursorStyleIsSet=!1),this._isAttached=!1}}_addEventListeners(e){e.addEventListener("pointerdown",this._pointerDownListener,!0),e.addEventListener("click",this._clickListener,!0),e.addEventListener("auxclick",this._clickListener,!0),e.addEventListener("contextmenu",this._clickListener,!0)}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Zn(i)))(r||i)}})()}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function yG(i,t){let e=typeof ShadowRoot<"u"&&ShadowRoot,n=t;for(;n;){if(n===i)return!0;n=e&&n instanceof ShadowRoot?n.host:n.parentNode}return!1}var MG=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["ng-component"]],hostAttrs:["cdk-overlay-style-loader",""],standalone:!0,features:[se],decls:0,vars:0,template:function(n,r){},styles:[".cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed}@layer cdk-overlay{.cdk-overlay-container{z-index:1000}}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute}@layer cdk-overlay{.cdk-global-overlay-wrapper{z-index:1000}}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;display:flex;max-width:100%;max-height:100%}@layer cdk-overlay{.cdk-overlay-pane{z-index:1000}}.cdk-overlay-backdrop{position:absolute;top:0;bottom:0;left:0;right:0;pointer-events:auto;-webkit-tap-highlight-color:rgba(0,0,0,0);opacity:0}@layer cdk-overlay{.cdk-overlay-backdrop{z-index:1000;transition:opacity 400ms cubic-bezier(0.25, 0.8, 0.25, 1)}}.cdk-overlay-backdrop-showing{opacity:1}@media(forced-colors: active){.cdk-overlay-backdrop-showing{opacity:.6}}@layer cdk-overlay{.cdk-overlay-dark-backdrop{background:rgba(0,0,0,.32)}}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing,.cdk-high-contrast-active .cdk-overlay-transparent-backdrop{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;display:flex;flex-direction:column;min-width:1px;min-height:1px}@layer cdk-overlay{.cdk-overlay-connected-position-bounding-box{z-index:1000}}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}"],encapsulation:2,changeDetection:0})}}return i})(),yC=(()=>{class i{constructor(){this._platform=S(Rn),this._document=S(ft),this._styleLoader=S(mi)}ngOnDestroy(){this._containerElement?.remove()}getContainerElement(){return this._loadStyles(),this._containerElement||this._createContainer(),this._containerElement}_createContainer(){let e="cdk-overlay-container";if(this._platform.isBrowser||ET()){let r=this._document.querySelectorAll(`.${e}[platform="server"], .${e}[platform="test"]`);for(let o=0;othis._backdropClick.next(h),this._backdropTransitionendHandler=h=>{this._disposeBackdrop(h.target)},this._keydownEvents=new ce,this._outsidePointerEvents=new ce,this._renders=new ce,r.scrollStrategy&&(this._scrollStrategy=r.scrollStrategy,this._scrollStrategy.attach(this)),this._positionStrategy=r.positionStrategy,this._afterRenderRef=jr(()=>im(()=>{this._renders.next()},{injector:this._injector}))}get overlayElement(){return this._pane}get backdropElement(){return this._backdropElement}get hostElement(){return this._host}attach(t){!this._host.parentElement&&this._previousHostParent&&this._previousHostParent.appendChild(this._host);let e=this._portalOutlet.attach(t);return this._positionStrategy&&this._positionStrategy.attach(this),this._updateStackingOrder(),this._updateElementSize(),this._updateElementDirection(),this._scrollStrategy&&this._scrollStrategy.enable(),this._afterNextRenderRef?.destroy(),this._afterNextRenderRef=zi(()=>{this.hasAttached()&&this.updatePosition()},{injector:this._injector}),this._togglePointerEvents(!0),this._config.hasBackdrop&&this._attachBackdrop(),this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!0),this._attachments.next(),this._keyboardDispatcher.add(this),this._config.disposeOnNavigation&&(this._locationChanges=this._location.subscribe(()=>this.dispose())),this._outsideClickDispatcher.add(this),typeof e?.onDestroy=="function"&&e.onDestroy(()=>{this.hasAttached()&&this._ngZone.runOutsideAngular(()=>Promise.resolve().then(()=>this.detach()))}),e}detach(){if(!this.hasAttached())return;this.detachBackdrop(),this._togglePointerEvents(!1),this._positionStrategy&&this._positionStrategy.detach&&this._positionStrategy.detach(),this._scrollStrategy&&this._scrollStrategy.disable();let t=this._portalOutlet.detach();return this._detachments.next(),this._keyboardDispatcher.remove(this),this._detachContentWhenEmpty(),this._locationChanges.unsubscribe(),this._outsideClickDispatcher.remove(this),t}dispose(){let t=this.hasAttached();this._positionStrategy&&this._positionStrategy.dispose(),this._disposeScrollStrategy(),this._disposeBackdrop(this._backdropElement),this._locationChanges.unsubscribe(),this._keyboardDispatcher.remove(this),this._portalOutlet.dispose(),this._attachments.complete(),this._backdropClick.complete(),this._keydownEvents.complete(),this._outsidePointerEvents.complete(),this._outsideClickDispatcher.remove(this),this._host?.remove(),this._afterNextRenderRef?.destroy(),this._previousHostParent=this._pane=this._host=null,t&&this._detachments.next(),this._detachments.complete(),this._afterRenderRef.destroy(),this._renders.complete()}hasAttached(){return this._portalOutlet.hasAttached()}backdropClick(){return this._backdropClick}attachments(){return this._attachments}detachments(){return this._detachments}keydownEvents(){return this._keydownEvents}outsidePointerEvents(){return this._outsidePointerEvents}getConfig(){return this._config}updatePosition(){this._positionStrategy&&this._positionStrategy.apply()}updatePositionStrategy(t){t!==this._positionStrategy&&(this._positionStrategy&&this._positionStrategy.dispose(),this._positionStrategy=t,this.hasAttached()&&(t.attach(this),this.updatePosition()))}updateSize(t){this._config=X(X({},this._config),t),this._updateElementSize()}setDirection(t){this._config=at(X({},this._config),{direction:t}),this._updateElementDirection()}addPanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!0)}removePanelClass(t){this._pane&&this._toggleClasses(this._pane,t,!1)}getDirection(){let t=this._config.direction;return t?typeof t=="string"?t:t.value:"ltr"}updateScrollStrategy(t){t!==this._scrollStrategy&&(this._disposeScrollStrategy(),this._scrollStrategy=t,this.hasAttached()&&(t.attach(this),t.enable()))}_updateElementDirection(){this._host.setAttribute("dir",this.getDirection())}_updateElementSize(){if(!this._pane)return;let t=this._pane.style;t.width=Mi(this._config.width),t.height=Mi(this._config.height),t.minWidth=Mi(this._config.minWidth),t.minHeight=Mi(this._config.minHeight),t.maxWidth=Mi(this._config.maxWidth),t.maxHeight=Mi(this._config.maxHeight)}_togglePointerEvents(t){this._pane.style.pointerEvents=t?"":"none"}_attachBackdrop(){let t="cdk-overlay-backdrop-showing";this._backdropElement=this._document.createElement("div"),this._backdropElement.classList.add("cdk-overlay-backdrop"),this._animationsDisabled&&this._backdropElement.classList.add("cdk-overlay-backdrop-noop-animation"),this._config.backdropClass&&this._toggleClasses(this._backdropElement,this._config.backdropClass,!0),this._host.parentElement.insertBefore(this._backdropElement,this._host),this._backdropElement.addEventListener("click",this._backdropClickHandler),!this._animationsDisabled&&typeof requestAnimationFrame<"u"?this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>{this._backdropElement&&this._backdropElement.classList.add(t)})}):this._backdropElement.classList.add(t)}_updateStackingOrder(){this._host.nextSibling&&this._host.parentNode.appendChild(this._host)}detachBackdrop(){let t=this._backdropElement;if(t){if(this._animationsDisabled){this._disposeBackdrop(t);return}t.classList.remove("cdk-overlay-backdrop-showing"),this._ngZone.runOutsideAngular(()=>{t.addEventListener("transitionend",this._backdropTransitionendHandler)}),t.style.pointerEvents="none",this._backdropTimeout=this._ngZone.runOutsideAngular(()=>setTimeout(()=>{this._disposeBackdrop(t)},500))}}_toggleClasses(t,e,n){let r=xd(e||[]).filter(o=>!!o);r.length&&(n?t.classList.add(...r):t.classList.remove(...r))}_detachContentWhenEmpty(){this._ngZone.runOutsideAngular(()=>{let t=this._renders.pipe(Ke(Xn(this._attachments,this._detachments))).subscribe(()=>{(!this._pane||!this._host||this._pane.children.length===0)&&(this._pane&&this._config.panelClass&&this._toggleClasses(this._pane,this._config.panelClass,!1),this._host&&this._host.parentElement&&(this._previousHostParent=this._host.parentElement,this._host.remove()),t.unsubscribe())})})}_disposeScrollStrategy(){let t=this._scrollStrategy;t&&(t.disable(),t.detach&&t.detach())}_disposeBackdrop(t){t&&(t.removeEventListener("click",this._backdropClickHandler),t.removeEventListener("transitionend",this._backdropTransitionendHandler),t.remove(),this._backdropElement===t&&(this._backdropElement=null)),this._backdropTimeout&&(clearTimeout(this._backdropTimeout),this._backdropTimeout=void 0)}},bG="cdk-overlay-connected-position-bounding-box",Kce=/([A-Za-z%]+)$/,OP=class{get positions(){return this._preferredPositions}constructor(t,e,n,r,o){this._viewportRuler=e,this._document=n,this._platform=r,this._overlayContainer=o,this._lastBoundingBoxSize={width:0,height:0},this._isPushed=!1,this._canPush=!0,this._growAfterOpen=!1,this._hasFlexibleDimensions=!0,this._positionLocked=!1,this._viewportMargin=0,this._scrollables=[],this._preferredPositions=[],this._positionChanges=new ce,this._resizeSubscription=St.EMPTY,this._offsetX=0,this._offsetY=0,this._appliedPanelClasses=[],this.positionChanges=this._positionChanges,this.setOrigin(t)}attach(t){this._overlayRef&&this._overlayRef,this._validatePositions(),t.hostElement.classList.add(bG),this._overlayRef=t,this._boundingBox=t.hostElement,this._pane=t.overlayElement,this._isDisposed=!1,this._isInitialRender=!0,this._lastPosition=null,this._resizeSubscription.unsubscribe(),this._resizeSubscription=this._viewportRuler.change().subscribe(()=>{this._isInitialRender=!0,this.apply()})}apply(){if(this._isDisposed||!this._platform.isBrowser)return;if(!this._isInitialRender&&this._positionLocked&&this._lastPosition){this.reapplyLastPosition();return}this._clearPanelClasses(),this._resetOverlayElementStyles(),this._resetBoundingBoxStyles(),this._viewportRect=this._getNarrowedViewportRect(),this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let t=this._originRect,e=this._overlayRect,n=this._viewportRect,r=this._containerRect,o=[],s;for(let a of this._preferredPositions){let l=this._getOriginPoint(t,r,a),c=this._getOverlayPoint(l,e,a),d=this._getOverlayFit(c,e,n,a);if(d.isCompletelyWithinViewport){this._isPushed=!1,this._applyPosition(a,l);return}if(this._canFitWithFlexibleDimensions(d,c,n)){o.push({position:a,origin:l,overlayRect:e,boundingBoxRect:this._calculateBoundingBoxRect(l,a)});continue}(!s||s.overlayFit.visibleAreal&&(l=d,a=c)}this._isPushed=!1,this._applyPosition(a.position,a.origin);return}if(this._canPush){this._isPushed=!0,this._applyPosition(s.position,s.originPoint);return}this._applyPosition(s.position,s.originPoint)}detach(){this._clearPanelClasses(),this._lastPosition=null,this._previousPushAmount=null,this._resizeSubscription.unsubscribe()}dispose(){this._isDisposed||(this._boundingBox&&Cu(this._boundingBox.style,{top:"",left:"",right:"",bottom:"",height:"",width:"",alignItems:"",justifyContent:""}),this._pane&&this._resetOverlayElementStyles(),this._overlayRef&&this._overlayRef.hostElement.classList.remove(bG),this.detach(),this._positionChanges.complete(),this._overlayRef=this._boundingBox=null,this._isDisposed=!0)}reapplyLastPosition(){if(this._isDisposed||!this._platform.isBrowser)return;let t=this._lastPosition;if(t){this._originRect=this._getOriginRect(),this._overlayRect=this._pane.getBoundingClientRect(),this._viewportRect=this._getNarrowedViewportRect(),this._containerRect=this._overlayContainer.getContainerElement().getBoundingClientRect();let e=this._getOriginPoint(this._originRect,this._containerRect,t);this._applyPosition(t,e)}else this.apply()}withScrollableContainers(t){return this._scrollables=t,this}withPositions(t){return this._preferredPositions=t,t.indexOf(this._lastPosition)===-1&&(this._lastPosition=null),this._validatePositions(),this}withViewportMargin(t){return this._viewportMargin=t,this}withFlexibleDimensions(t=!0){return this._hasFlexibleDimensions=t,this}withGrowAfterOpen(t=!0){return this._growAfterOpen=t,this}withPush(t=!0){return this._canPush=t,this}withLockedPosition(t=!0){return this._positionLocked=t,this}setOrigin(t){return this._origin=t,this}withDefaultOffsetX(t){return this._offsetX=t,this}withDefaultOffsetY(t){return this._offsetY=t,this}withTransformOriginOn(t){return this._transformOriginSelector=t,this}_getOriginPoint(t,e,n){let r;if(n.originX=="center")r=t.left+t.width/2;else{let s=this._isRtl()?t.right:t.left,a=this._isRtl()?t.left:t.right;r=n.originX=="start"?s:a}e.left<0&&(r-=e.left);let o;return n.originY=="center"?o=t.top+t.height/2:o=n.originY=="top"?t.top:t.bottom,e.top<0&&(o-=e.top),{x:r,y:o}}_getOverlayPoint(t,e,n){let r;n.overlayX=="center"?r=-e.width/2:n.overlayX==="start"?r=this._isRtl()?-e.width:0:r=this._isRtl()?0:-e.width;let o;return n.overlayY=="center"?o=-e.height/2:o=n.overlayY=="top"?0:-e.height,{x:t.x+r,y:t.y+o}}_getOverlayFit(t,e,n,r){let o=wG(e),{x:s,y:a}=t,l=this._getOffset(r,"x"),c=this._getOffset(r,"y");l&&(s+=l),c&&(a+=c);let d=0-s,u=s+o.width-n.width,h=0-a,p=a+o.height-n.height,f=this._subtractOverflows(o.width,d,u),m=this._subtractOverflows(o.height,h,p),b=f*m;return{visibleArea:b,isCompletelyWithinViewport:o.width*o.height===b,fitsInViewportVertically:m===o.height,fitsInViewportHorizontally:f==o.width}}_canFitWithFlexibleDimensions(t,e,n){if(this._hasFlexibleDimensions){let r=n.bottom-e.y,o=n.right-e.x,s=xG(this._overlayRef.getConfig().minHeight),a=xG(this._overlayRef.getConfig().minWidth),l=t.fitsInViewportVertically||s!=null&&s<=r,c=t.fitsInViewportHorizontally||a!=null&&a<=o;return l&&c}return!1}_pushOverlayOnScreen(t,e,n){if(this._previousPushAmount&&this._positionLocked)return{x:t.x+this._previousPushAmount.x,y:t.y+this._previousPushAmount.y};let r=wG(e),o=this._viewportRect,s=Math.max(t.x+r.width-o.width,0),a=Math.max(t.y+r.height-o.height,0),l=Math.max(o.top-n.top-t.y,0),c=Math.max(o.left-n.left-t.x,0),d=0,u=0;return r.width<=o.width?d=c||-s:d=t.xf&&!this._isInitialRender&&!this._growAfterOpen&&(s=t.y-f/2)}let l=e.overlayX==="start"&&!r||e.overlayX==="end"&&r,c=e.overlayX==="end"&&!r||e.overlayX==="start"&&r,d,u,h;if(c)h=n.width-t.x+this._viewportMargin*2,d=t.x-this._viewportMargin;else if(l)u=t.x,d=n.right-t.x;else{let p=Math.min(n.right-t.x+n.left,t.x),f=this._lastBoundingBoxSize.width;d=p*2,u=t.x-p,d>f&&!this._isInitialRender&&!this._growAfterOpen&&(u=t.x-f/2)}return{top:s,left:u,bottom:a,right:h,width:d,height:o}}_setBoundingBoxStyles(t,e){let n=this._calculateBoundingBoxRect(t,e);!this._isInitialRender&&!this._growAfterOpen&&(n.height=Math.min(n.height,this._lastBoundingBoxSize.height),n.width=Math.min(n.width,this._lastBoundingBoxSize.width));let r={};if(this._hasExactPosition())r.top=r.left="0",r.bottom=r.right=r.maxHeight=r.maxWidth="",r.width=r.height="100%";else{let o=this._overlayRef.getConfig().maxHeight,s=this._overlayRef.getConfig().maxWidth;r.height=Mi(n.height),r.top=Mi(n.top),r.bottom=Mi(n.bottom),r.width=Mi(n.width),r.left=Mi(n.left),r.right=Mi(n.right),e.overlayX==="center"?r.alignItems="center":r.alignItems=e.overlayX==="end"?"flex-end":"flex-start",e.overlayY==="center"?r.justifyContent="center":r.justifyContent=e.overlayY==="bottom"?"flex-end":"flex-start",o&&(r.maxHeight=Mi(o)),s&&(r.maxWidth=Mi(s))}this._lastBoundingBoxSize=n,Cu(this._boundingBox.style,r)}_resetBoundingBoxStyles(){Cu(this._boundingBox.style,{top:"0",left:"0",right:"0",bottom:"0",height:"",width:"",alignItems:"",justifyContent:""})}_resetOverlayElementStyles(){Cu(this._pane.style,{top:"",left:"",bottom:"",right:"",position:"",transform:""})}_setOverlayElementStyles(t,e){let n={},r=this._hasExactPosition(),o=this._hasFlexibleDimensions,s=this._overlayRef.getConfig();if(r){let d=this._viewportRuler.getViewportScrollPosition();Cu(n,this._getExactOverlayY(e,t,d)),Cu(n,this._getExactOverlayX(e,t,d))}else n.position="static";let a="",l=this._getOffset(e,"x"),c=this._getOffset(e,"y");l&&(a+=`translateX(${l}px) `),c&&(a+=`translateY(${c}px)`),n.transform=a.trim(),s.maxHeight&&(r?n.maxHeight=Mi(s.maxHeight):o&&(n.maxHeight="")),s.maxWidth&&(r?n.maxWidth=Mi(s.maxWidth):o&&(n.maxWidth="")),Cu(this._pane.style,n)}_getExactOverlayY(t,e,n){let r={top:"",bottom:""},o=this._getOverlayPoint(e,this._overlayRect,t);if(this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,n)),t.overlayY==="bottom"){let s=this._document.documentElement.clientHeight;r.bottom=`${s-(o.y+this._overlayRect.height)}px`}else r.top=Mi(o.y);return r}_getExactOverlayX(t,e,n){let r={left:"",right:""},o=this._getOverlayPoint(e,this._overlayRect,t);this._isPushed&&(o=this._pushOverlayOnScreen(o,this._overlayRect,n));let s;if(this._isRtl()?s=t.overlayX==="end"?"left":"right":s=t.overlayX==="end"?"right":"left",s==="right"){let a=this._document.documentElement.clientWidth;r.right=`${a-(o.x+this._overlayRect.width)}px`}else r.left=Mi(o.x);return r}_getScrollVisibility(){let t=this._getOriginRect(),e=this._pane.getBoundingClientRect(),n=this._scrollables.map(r=>r.getElementRef().nativeElement.getBoundingClientRect());return{isOriginClipped:vG(t,n),isOriginOutsideView:IP(t,n),isOverlayClipped:vG(e,n),isOverlayOutsideView:IP(e,n)}}_subtractOverflows(t,...e){return e.reduce((n,r)=>n-Math.max(r,0),t)}_getNarrowedViewportRect(){let t=this._document.documentElement.clientWidth,e=this._document.documentElement.clientHeight,n=this._viewportRuler.getViewportScrollPosition();return{top:n.top+this._viewportMargin,left:n.left+this._viewportMargin,right:n.left+t-this._viewportMargin,bottom:n.top+e-this._viewportMargin,width:t-2*this._viewportMargin,height:e-2*this._viewportMargin}}_isRtl(){return this._overlayRef.getDirection()==="rtl"}_hasExactPosition(){return!this._hasFlexibleDimensions||this._isPushed}_getOffset(t,e){return e==="x"?t.offsetX==null?this._offsetX:t.offsetX:t.offsetY==null?this._offsetY:t.offsetY}_validatePositions(){}_addPanelClasses(t){this._pane&&xd(t).forEach(e=>{e!==""&&this._appliedPanelClasses.indexOf(e)===-1&&(this._appliedPanelClasses.push(e),this._pane.classList.add(e))})}_clearPanelClasses(){this._pane&&(this._appliedPanelClasses.forEach(t=>{this._pane.classList.remove(t)}),this._appliedPanelClasses=[])}_getOriginRect(){let t=this._origin;if(t instanceof Fe)return t.nativeElement.getBoundingClientRect();if(t instanceof Element)return t.getBoundingClientRect();let e=t.width||0,n=t.height||0;return{top:t.y,bottom:t.y+n,left:t.x,right:t.x+e,height:n,width:e}}};function Cu(i,t){for(let e in t)t.hasOwnProperty(e)&&(i[e]=t[e]);return i}function xG(i){if(typeof i!="number"&&i!=null){let[t,e]=i.split(Kce);return!e||e==="px"?parseFloat(t):null}return i||null}function wG(i){return{top:Math.floor(i.top),right:Math.floor(i.right),bottom:Math.floor(i.bottom),left:Math.floor(i.left),width:Math.floor(i.width),height:Math.floor(i.height)}}function Jce(i,t){return i===t?!0:i.isOriginClipped===t.isOriginClipped&&i.isOriginOutsideView===t.isOriginOutsideView&&i.isOverlayClipped===t.isOverlayClipped&&i.isOverlayOutsideView===t.isOverlayOutsideView}var CG="cdk-global-overlay-wrapper",PP=class{constructor(){this._cssPosition="static",this._topOffset="",this._bottomOffset="",this._alignItems="",this._xPosition="",this._xOffset="",this._width="",this._height="",this._isDisposed=!1}attach(t){let e=t.getConfig();this._overlayRef=t,this._width&&!e.width&&t.updateSize({width:this._width}),this._height&&!e.height&&t.updateSize({height:this._height}),t.hostElement.classList.add(CG),this._isDisposed=!1}top(t=""){return this._bottomOffset="",this._topOffset=t,this._alignItems="flex-start",this}left(t=""){return this._xOffset=t,this._xPosition="left",this}bottom(t=""){return this._topOffset="",this._bottomOffset=t,this._alignItems="flex-end",this}right(t=""){return this._xOffset=t,this._xPosition="right",this}start(t=""){return this._xOffset=t,this._xPosition="start",this}end(t=""){return this._xOffset=t,this._xPosition="end",this}width(t=""){return this._overlayRef?this._overlayRef.updateSize({width:t}):this._width=t,this}height(t=""){return this._overlayRef?this._overlayRef.updateSize({height:t}):this._height=t,this}centerHorizontally(t=""){return this.left(t),this._xPosition="center",this}centerVertically(t=""){return this.top(t),this._alignItems="center",this}apply(){if(!this._overlayRef||!this._overlayRef.hasAttached())return;let t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement.style,n=this._overlayRef.getConfig(),{width:r,height:o,maxWidth:s,maxHeight:a}=n,l=(r==="100%"||r==="100vw")&&(!s||s==="100%"||s==="100vw"),c=(o==="100%"||o==="100vh")&&(!a||a==="100%"||a==="100vh"),d=this._xPosition,u=this._xOffset,h=this._overlayRef.getConfig().direction==="rtl",p="",f="",m="";l?m="flex-start":d==="center"?(m="center",h?f=u:p=u):h?d==="left"||d==="end"?(m="flex-end",p=u):(d==="right"||d==="start")&&(m="flex-start",f=u):d==="left"||d==="start"?(m="flex-start",p=u):(d==="right"||d==="end")&&(m="flex-end",f=u),t.position=this._cssPosition,t.marginLeft=l?"0":p,t.marginTop=c?"0":this._topOffset,t.marginBottom=this._bottomOffset,t.marginRight=l?"0":f,e.justifyContent=m,e.alignItems=c?"flex-start":this._alignItems}dispose(){if(this._isDisposed||!this._overlayRef)return;let t=this._overlayRef.overlayElement.style,e=this._overlayRef.hostElement,n=e.style;e.classList.remove(CG),n.justifyContent=n.alignItems=t.marginTop=t.marginBottom=t.marginLeft=t.marginRight=t.position="",this._overlayRef=null,this._isDisposed=!0}},ede=(()=>{class i{constructor(){this._viewportRuler=S(aa),this._document=S(ft),this._platform=S(Rn),this._overlayContainer=S(yC)}global(){return new PP}flexibleConnectedTo(e){return new OP(e,this._viewportRuler,this._document,this._platform,this._overlayContainer)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),tde=0,on=(()=>{class i{constructor(){this.scrollStrategies=S(Xce),this._overlayContainer=S(yC),this._positionBuilder=S(ede),this._keyboardDispatcher=S(Qce),this._injector=S(pt),this._ngZone=S(Ue),this._document=S(ft),this._directionality=S(oi),this._location=S(nd),this._outsideClickDispatcher=S(Zce),this._animationsModuleType=S(Kn,{optional:!0}),this._styleLoader=S(mi)}create(e){this._styleLoader.load(MG);let n=this._createHostElement(),r=this._createPaneElement(n),o=this._createPortalOutlet(r),s=new bi(e);return s.direction=s.direction||this._directionality.value,new rf(o,n,r,s,this._ngZone,this._keyboardDispatcher,this._document,this._location,this._outsideClickDispatcher,this._animationsModuleType==="NoopAnimations",this._injector.get(tr))}position(){return this._positionBuilder}_createPaneElement(e){let n=this._document.createElement("div");return n.id=`cdk-overlay-${tde++}`,n.classList.add("cdk-overlay-pane"),e.appendChild(n),n}_createHostElement(){let e=this._document.createElement("div");return this._overlayContainer.getContainerElement().appendChild(e),e}_createPortalOutlet(e){return this._appRef||(this._appRef=this._injector.get(zo)),new Y_(e,null,this._appRef,this._injector,this._document)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),nde=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],EG=new pe("cdk-connected-overlay-scroll-strategy",{providedIn:"root",factory:()=>{let i=S(on);return()=>i.scrollStrategies.reposition()}}),X_=(()=>{class i{constructor(){this.elementRef=S(Fe)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["","cdk-overlay-origin",""],["","overlay-origin",""],["","cdkOverlayOrigin",""]],exportAs:["cdkOverlayOrigin"],standalone:!0})}}return i})(),RP=(()=>{class i{get offsetX(){return this._offsetX}set offsetX(e){this._offsetX=e,this._position&&this._updatePositionStrategy(this._position)}get offsetY(){return this._offsetY}set offsetY(e){this._offsetY=e,this._position&&this._updatePositionStrategy(this._position)}get disposeOnNavigation(){return this._disposeOnNavigation}set disposeOnNavigation(e){this._disposeOnNavigation=e}constructor(){this._overlay=S(on),this._dir=S(oi,{optional:!0}),this._backdropSubscription=St.EMPTY,this._attachSubscription=St.EMPTY,this._detachSubscription=St.EMPTY,this._positionSubscription=St.EMPTY,this._scrollStrategyFactory=S(EG),this._disposeOnNavigation=!1,this._ngZone=S(Ue),this.viewportMargin=0,this.open=!1,this.disableClose=!1,this.hasBackdrop=!1,this.lockPosition=!1,this.flexibleDimensions=!1,this.growAfterOpen=!1,this.push=!1,this.backdropClick=new Ie,this.positionChange=new Ie,this.attach=new Ie,this.detach=new Ie,this.overlayKeydown=new Ie,this.overlayOutsideClick=new Ie;let e=S(Qn),n=S(Kt);this._templatePortal=new Jr(e,n),this.scrollStrategy=this._scrollStrategyFactory()}get overlayRef(){return this._overlayRef}get dir(){return this._dir?this._dir.value:"ltr"}ngOnDestroy(){this._attachSubscription.unsubscribe(),this._detachSubscription.unsubscribe(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this._overlayRef&&this._overlayRef.dispose()}ngOnChanges(e){this._position&&(this._updatePositionStrategy(this._position),this._overlayRef.updateSize({width:this.width,minWidth:this.minWidth,height:this.height,minHeight:this.minHeight}),e.origin&&this.open&&this._position.apply()),e.open&&(this.open?this._attachOverlay():this._detachOverlay())}_createOverlay(){(!this.positions||!this.positions.length)&&(this.positions=nde);let e=this._overlayRef=this._overlay.create(this._buildConfig());this._attachSubscription=e.attachments().subscribe(()=>this.attach.emit()),this._detachSubscription=e.detachments().subscribe(()=>this.detach.emit()),e.keydownEvents().subscribe(n=>{this.overlayKeydown.next(n),n.keyCode===27&&!this.disableClose&&!Si(n)&&(n.preventDefault(),this._detachOverlay())}),this._overlayRef.outsidePointerEvents().subscribe(n=>{let r=this._getOriginElement(),o=Pi(n);(!r||r!==o&&!r.contains(o))&&this.overlayOutsideClick.next(n)})}_buildConfig(){let e=this._position=this.positionStrategy||this._createPositionStrategy(),n=new bi({direction:this._dir||"ltr",positionStrategy:e,scrollStrategy:this.scrollStrategy,hasBackdrop:this.hasBackdrop,disposeOnNavigation:this.disposeOnNavigation});return(this.width||this.width===0)&&(n.width=this.width),(this.height||this.height===0)&&(n.height=this.height),(this.minWidth||this.minWidth===0)&&(n.minWidth=this.minWidth),(this.minHeight||this.minHeight===0)&&(n.minHeight=this.minHeight),this.backdropClass&&(n.backdropClass=this.backdropClass),this.panelClass&&(n.panelClass=this.panelClass),n}_updatePositionStrategy(e){let n=this.positions.map(r=>({originX:r.originX,originY:r.originY,overlayX:r.overlayX,overlayY:r.overlayY,offsetX:r.offsetX||this.offsetX,offsetY:r.offsetY||this.offsetY,panelClass:r.panelClass||void 0}));return e.setOrigin(this._getOrigin()).withPositions(n).withFlexibleDimensions(this.flexibleDimensions).withPush(this.push).withGrowAfterOpen(this.growAfterOpen).withViewportMargin(this.viewportMargin).withLockedPosition(this.lockPosition).withTransformOriginOn(this.transformOriginSelector)}_createPositionStrategy(){let e=this._overlay.position().flexibleConnectedTo(this._getOrigin());return this._updatePositionStrategy(e),e}_getOrigin(){return this.origin instanceof X_?this.origin.elementRef:this.origin}_getOriginElement(){return this.origin instanceof X_?this.origin.elementRef.nativeElement:this.origin instanceof Fe?this.origin.nativeElement:typeof Element<"u"&&this.origin instanceof Element?this.origin:null}_attachOverlay(){this._overlayRef?this._overlayRef.getConfig().hasBackdrop=this.hasBackdrop:this._createOverlay(),this._overlayRef.hasAttached()||this._overlayRef.attach(this._templatePortal),this.hasBackdrop?this._backdropSubscription=this._overlayRef.backdropClick().subscribe(e=>{this.backdropClick.emit(e)}):this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe(),this.positionChange.observers.length>0&&(this._positionSubscription=this._position.positionChanges.pipe(ZS(()=>this.positionChange.observers.length>0)).subscribe(e=>{this._ngZone.run(()=>this.positionChange.emit(e)),this.positionChange.observers.length===0&&this._positionSubscription.unsubscribe()}))}_detachOverlay(){this._overlayRef&&this._overlayRef.detach(),this._backdropSubscription.unsubscribe(),this._positionSubscription.unsubscribe()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["","cdk-connected-overlay",""],["","connected-overlay",""],["","cdkConnectedOverlay",""]],inputs:{origin:[0,"cdkConnectedOverlayOrigin","origin"],positions:[0,"cdkConnectedOverlayPositions","positions"],positionStrategy:[0,"cdkConnectedOverlayPositionStrategy","positionStrategy"],offsetX:[0,"cdkConnectedOverlayOffsetX","offsetX"],offsetY:[0,"cdkConnectedOverlayOffsetY","offsetY"],width:[0,"cdkConnectedOverlayWidth","width"],height:[0,"cdkConnectedOverlayHeight","height"],minWidth:[0,"cdkConnectedOverlayMinWidth","minWidth"],minHeight:[0,"cdkConnectedOverlayMinHeight","minHeight"],backdropClass:[0,"cdkConnectedOverlayBackdropClass","backdropClass"],panelClass:[0,"cdkConnectedOverlayPanelClass","panelClass"],viewportMargin:[0,"cdkConnectedOverlayViewportMargin","viewportMargin"],scrollStrategy:[0,"cdkConnectedOverlayScrollStrategy","scrollStrategy"],open:[0,"cdkConnectedOverlayOpen","open"],disableClose:[0,"cdkConnectedOverlayDisableClose","disableClose"],transformOriginSelector:[0,"cdkConnectedOverlayTransformOriginOn","transformOriginSelector"],hasBackdrop:[2,"cdkConnectedOverlayHasBackdrop","hasBackdrop",Ye],lockPosition:[2,"cdkConnectedOverlayLockPosition","lockPosition",Ye],flexibleDimensions:[2,"cdkConnectedOverlayFlexibleDimensions","flexibleDimensions",Ye],growAfterOpen:[2,"cdkConnectedOverlayGrowAfterOpen","growAfterOpen",Ye],push:[2,"cdkConnectedOverlayPush","push",Ye],disposeOnNavigation:[2,"cdkConnectedOverlayDisposeOnNavigation","disposeOnNavigation",Ye]},outputs:{backdropClick:"backdropClick",positionChange:"positionChange",attach:"attach",detach:"detach",overlayKeydown:"overlayKeydown",overlayOutsideClick:"overlayOutsideClick"},exportAs:["cdkConnectedOverlay"],standalone:!0,features:[nn,un]})}}return i})();function ide(i){return()=>i.scrollStrategies.reposition()}var rde={provide:EG,deps:[on],useFactory:ide},so=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({providers:[on,rde],imports:[ql,Ds,CP,CP]})}}return i})();var ode=["*"],bC;function sde(){if(bC===void 0&&(bC=null,typeof window<"u")){let i=window;i.trustedTypes!==void 0&&(bC=i.trustedTypes.createPolicy("angular#components",{createHTML:t=>t}))}return bC}function Q_(i){return sde()?.createHTML(i)||i}function IG(i){return Error(`Unable to find icon with the name "${i}"`)}function ade(){return Error("Could not find HttpClient for use with Angular Material icons. Please add provideHttpClient() to your providers.")}function TG(i){return Error(`The URL provided to MatIconRegistry was not trusted as a resource URL via Angular's DomSanitizer. Attempted URL was "${i}".`)}function DG(i){return Error(`The literal provided to MatIconRegistry was not trusted as safe HTML by Angular's DomSanitizer. Attempted literal was "${i}".`)}var cl=class{constructor(t,e,n){this.url=t,this.svgText=e,this.options=n}},lde=(()=>{class i{constructor(e,n,r,o){this._httpClient=e,this._sanitizer=n,this._errorHandler=o,this._svgIconConfigs=new Map,this._iconSetConfigs=new Map,this._cachedIconsByUrl=new Map,this._inProgressUrlFetches=new Map,this._fontCssClassesByAlias=new Map,this._resolvers=[],this._defaultFontSetClass=["material-icons","mat-ligature-font"],this._document=r}addSvgIcon(e,n,r){return this.addSvgIconInNamespace("",e,n,r)}addSvgIconLiteral(e,n,r){return this.addSvgIconLiteralInNamespace("",e,n,r)}addSvgIconInNamespace(e,n,r,o){return this._addSvgIconConfig(e,n,new cl(r,null,o))}addSvgIconResolver(e){return this._resolvers.push(e),this}addSvgIconLiteralInNamespace(e,n,r,o){let s=this._sanitizer.sanitize(Ur.HTML,r);if(!s)throw DG(r);let a=Q_(s);return this._addSvgIconConfig(e,n,new cl("",a,o))}addSvgIconSet(e,n){return this.addSvgIconSetInNamespace("",e,n)}addSvgIconSetLiteral(e,n){return this.addSvgIconSetLiteralInNamespace("",e,n)}addSvgIconSetInNamespace(e,n,r){return this._addSvgIconSetConfig(e,new cl(n,null,r))}addSvgIconSetLiteralInNamespace(e,n,r){let o=this._sanitizer.sanitize(Ur.HTML,n);if(!o)throw DG(n);let s=Q_(o);return this._addSvgIconSetConfig(e,new cl("",s,r))}registerFontClassAlias(e,n=e){return this._fontCssClassesByAlias.set(e,n),this}classNameForFontAlias(e){return this._fontCssClassesByAlias.get(e)||e}setDefaultFontSetClass(...e){return this._defaultFontSetClass=e,this}getDefaultFontSetClass(){return this._defaultFontSetClass}getSvgIconFromUrl(e){let n=this._sanitizer.sanitize(Ur.RESOURCE_URL,e);if(!n)throw TG(e);let r=this._cachedIconsByUrl.get(n);return r?ke(xC(r)):this._loadSvgIconFromConfig(new cl(e,null)).pipe(gn(o=>this._cachedIconsByUrl.set(n,o)),We(o=>xC(o)))}getNamedSvgIcon(e,n=""){let r=OG(n,e),o=this._svgIconConfigs.get(r);if(o)return this._getSvgFromConfig(o);if(o=this._getIconConfigFromResolvers(n,e),o)return this._svgIconConfigs.set(r,o),this._getSvgFromConfig(o);let s=this._iconSetConfigs.get(n);return s?this._getSvgFromIconSetConfigs(e,s):vl(IG(r))}ngOnDestroy(){this._resolvers=[],this._svgIconConfigs.clear(),this._iconSetConfigs.clear(),this._cachedIconsByUrl.clear()}_getSvgFromConfig(e){return e.svgText?ke(xC(this._svgElementFromConfig(e))):this._loadSvgIconFromConfig(e).pipe(We(n=>xC(n)))}_getSvgFromIconSetConfigs(e,n){let r=this._extractIconWithNameFromAnySet(e,n);if(r)return ke(r);let o=n.filter(s=>!s.svgText).map(s=>this._loadSvgIconSetFromConfig(s).pipe(As(a=>{let c=`Loading icon set URL: ${this._sanitizer.sanitize(Ur.RESOURCE_URL,s.url)} failed: ${a.message}`;return this._errorHandler.handleError(new Error(c)),ke(null)})));return Pf(o).pipe(We(()=>{let s=this._extractIconWithNameFromAnySet(e,n);if(!s)throw IG(e);return s}))}_extractIconWithNameFromAnySet(e,n){for(let r=n.length-1;r>=0;r--){let o=n[r];if(o.svgText&&o.svgText.toString().indexOf(e)>-1){let s=this._svgElementFromConfig(o),a=this._extractSvgIconFromSet(s,e,o.options);if(a)return a}}return null}_loadSvgIconFromConfig(e){return this._fetchIcon(e).pipe(gn(n=>e.svgText=n),We(()=>this._svgElementFromConfig(e)))}_loadSvgIconSetFromConfig(e){return e.svgText?ke(null):this._fetchIcon(e).pipe(gn(n=>e.svgText=n))}_extractSvgIconFromSet(e,n,r){let o=e.querySelector(`[id="${n}"]`);if(!o)return null;let s=o.cloneNode(!0);if(s.removeAttribute("id"),s.nodeName.toLowerCase()==="svg")return this._setSvgAttributes(s,r);if(s.nodeName.toLowerCase()==="symbol")return this._setSvgAttributes(this._toSvgElement(s),r);let a=this._svgElementFromString(Q_(""));return a.appendChild(s),this._setSvgAttributes(a,r)}_svgElementFromString(e){let n=this._document.createElement("DIV");n.innerHTML=e;let r=n.querySelector("svg");if(!r)throw Error(" tag not found");return r}_toSvgElement(e){let n=this._svgElementFromString(Q_("")),r=e.attributes;for(let o=0;oQ_(c)),xl(()=>this._inProgressUrlFetches.delete(s)),Nf());return this._inProgressUrlFetches.set(s,l),l}_addSvgIconConfig(e,n,r){return this._svgIconConfigs.set(OG(e,n),r),this}_addSvgIconSetConfig(e,n){let r=this._iconSetConfigs.get(e);return r?r.push(n):this._iconSetConfigs.set(e,[n]),this}_svgElementFromConfig(e){if(!e.svgElement){let n=this._svgElementFromString(e.svgText);this._setSvgAttributes(n,e.options),e.svgElement=n}return e.svgElement}_getIconConfigFromResolvers(e,n){for(let r=0;rt?t.pathname+t.search:""}}var PG=["clip-path","color-profile","src","cursor","fill","filter","marker","marker-start","marker-mid","marker-end","mask","stroke"],pde=PG.map(i=>`[${i}]`).join(", "),fde=/^url\(['"]?#(.*?)['"]?\)$/,dt=(()=>{class i{get color(){return this._color||this._defaultColor}set color(e){this._color=e}get svgIcon(){return this._svgIcon}set svgIcon(e){e!==this._svgIcon&&(e?this._updateSvgIcon(e):this._svgIcon&&this._clearSvgElement(),this._svgIcon=e)}get fontSet(){return this._fontSet}set fontSet(e){let n=this._cleanupFontValue(e);n!==this._fontSet&&(this._fontSet=n,this._updateFontIconClasses())}get fontIcon(){return this._fontIcon}set fontIcon(e){let n=this._cleanupFontValue(e);n!==this._fontIcon&&(this._fontIcon=n,this._updateFontIconClasses())}constructor(){this._elementRef=S(Fe),this._iconRegistry=S(lde),this._location=S(ude),this._errorHandler=S(io),this.inline=!1,this._previousFontSetClass=[],this._currentIconFetch=St.EMPTY;let e=S(new zr("aria-hidden"),{optional:!0}),n=S(dde,{optional:!0});n&&(n.color&&(this.color=this._defaultColor=n.color),n.fontSet&&(this.fontSet=n.fontSet)),e||this._elementRef.nativeElement.setAttribute("aria-hidden","true")}_splitIconName(e){if(!e)return["",""];let n=e.split(":");switch(n.length){case 1:return["",n[0]];case 2:return n;default:throw Error(`Invalid icon name: "${e}"`)}}ngOnInit(){this._updateFontIconClasses()}ngAfterViewChecked(){let e=this._elementsWithExternalReferences;if(e&&e.size){let n=this._location.getPathname();n!==this._previousPath&&(this._previousPath=n,this._prependPathToReferences(n))}}ngOnDestroy(){this._currentIconFetch.unsubscribe(),this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear()}_usingFontIcon(){return!this.svgIcon}_setSvgElement(e){this._clearSvgElement();let n=this._location.getPathname();this._previousPath=n,this._cacheChildrenWithExternalReferences(e),this._prependPathToReferences(n),this._elementRef.nativeElement.appendChild(e)}_clearSvgElement(){let e=this._elementRef.nativeElement,n=e.childNodes.length;for(this._elementsWithExternalReferences&&this._elementsWithExternalReferences.clear();n--;){let r=e.childNodes[n];(r.nodeType!==1||r.nodeName.toLowerCase()==="svg")&&r.remove()}}_updateFontIconClasses(){if(!this._usingFontIcon())return;let e=this._elementRef.nativeElement,n=(this.fontSet?this._iconRegistry.classNameForFontAlias(this.fontSet).split(/ +/):this._iconRegistry.getDefaultFontSetClass()).filter(r=>r.length>0);this._previousFontSetClass.forEach(r=>e.classList.remove(r)),n.forEach(r=>e.classList.add(r)),this._previousFontSetClass=n,this.fontIcon!==this._previousFontIconClass&&!n.includes("mat-ligature-font")&&(this._previousFontIconClass&&e.classList.remove(this._previousFontIconClass),this.fontIcon&&e.classList.add(this.fontIcon),this._previousFontIconClass=this.fontIcon)}_cleanupFontValue(e){return typeof e=="string"?e.trim().split(" ")[0]:e}_prependPathToReferences(e){let n=this._elementsWithExternalReferences;n&&n.forEach((r,o)=>{r.forEach(s=>{o.setAttribute(s.name,`url('${e}#${s.value}')`)})})}_cacheChildrenWithExternalReferences(e){let n=e.querySelectorAll(pde),r=this._elementsWithExternalReferences=this._elementsWithExternalReferences||new Map;for(let o=0;o{let a=n[o],l=a.getAttribute(s),c=l?l.match(fde):null;if(c){let d=r.get(a);d||(d=[],r.set(a,d)),d.push({name:s,value:c[1]})}})}_updateSvgIcon(e){if(this._svgNamespace=null,this._svgName=null,this._currentIconFetch.unsubscribe(),e){let[n,r]=this._splitIconName(e);n&&(this._svgNamespace=n),r&&(this._svgName=r),this._currentIconFetch=this._iconRegistry.getNamedSvgIcon(r,n).pipe(tn(1)).subscribe(o=>this._setSvgElement(o),o=>{let s=`Error retrieving icon ${n}:${r}! ${o.message}`;this._errorHandler.handleError(new Error(s))})}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["mat-icon"]],hostAttrs:["role","img",1,"mat-icon","notranslate"],hostVars:10,hostBindings:function(n,r){n&2&&(qe("data-mat-icon-type",r._usingFontIcon()?"font":"svg")("data-mat-icon-name",r._svgName||r.fontIcon)("data-mat-icon-namespace",r._svgNamespace||r.fontSet)("fontIcon",r._usingFontIcon()?r.fontIcon:null),Gr(r.color?"mat-"+r.color:""),ne("mat-icon-inline",r.inline)("mat-icon-no-color",r.color!=="primary"&&r.color!=="accent"&&r.color!=="warn"))},inputs:{color:"color",inline:[2,"inline","inline",Ye],svgIcon:"svgIcon",fontSet:"fontSet",fontIcon:"fontIcon"},exportAs:["matIcon"],standalone:!0,features:[nn,se],ngContentSelectors:ode,decls:1,vars:0,template:function(n,r){n&1&&(Dn(),Wt(0))},styles:["mat-icon,mat-icon.mat-primary,mat-icon.mat-accent,mat-icon.mat-warn{color:var(--mat-icon-color, inherit)}.mat-icon{-webkit-user-select:none;user-select:none;background-repeat:no-repeat;display:inline-block;fill:currentColor;height:24px;width:24px;overflow:hidden}.mat-icon.mat-icon-inline{font-size:inherit;height:inherit;line-height:inherit;width:inherit}.mat-icon.mat-ligature-font[fontIcon]::before{content:attr(fontIcon)}[dir=rtl] .mat-icon-rtl-mirror{transform:scale(-1, 1)}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon{display:block}.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-prefix .mat-icon-button .mat-icon,.mat-form-field:not(.mat-form-field-appearance-legacy) .mat-form-field-suffix .mat-icon-button .mat-icon{margin:auto}"],encapsulation:2,changeDetection:0})}}return i})(),Je=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({imports:[Ht,Ht]})}}return i})();var mde=["mat-menu-item",""],gde=[[["mat-icon"],["","matMenuItemIcon",""]],"*"],_de=["mat-icon, [matMenuItemIcon]","*"];function vde(i,t){i&1&&(mo(),v(0,"svg",2),ee(1,"polygon",3),y())}var yde=["*"];function bde(i,t){if(i&1){let e=te();v(0,"div",0),H("keydown",function(r){B(e);let o=I();return V(o._handleKeydown(r))})("click",function(){B(e);let r=I();return V(r.closed.emit("click"))})("@transformMenu.start",function(r){B(e);let o=I();return V(o._onAnimationStart(r))})("@transformMenu.done",function(r){B(e);let o=I();return V(o._onAnimationDone(r))}),v(1,"div",1),Wt(2),y()()}if(i&2){let e=I();Gr(e._classList),R("id",e.panelId)("@transformMenu",e._panelAnimationState),qe("aria-label",e.ariaLabel||null)("aria-labelledby",e.ariaLabelledby||null)("aria-describedby",e.ariaDescribedby||null)}}var AP=new pe("MAT_MENU_PANEL"),Z_=(()=>{class i{constructor(){this._elementRef=S(Fe),this._document=S(ft),this._focusMonitor=S(So),this._parentMenu=S(AP,{optional:!0}),this._changeDetectorRef=S(Re),this.role="menuitem",this.disabled=!1,this.disableRipple=!1,this._hovered=new ce,this._focused=new ce,this._highlighted=!1,this._triggersSubmenu=!1,S(mi).load(ys),this._parentMenu?.addItem?.(this)}focus(e,n){this._focusMonitor&&e?this._focusMonitor.focusVia(this._getHostElement(),e,n):this._getHostElement().focus(n),this._focused.next(this)}ngAfterViewInit(){this._focusMonitor&&this._focusMonitor.monitor(this._elementRef,!1)}ngOnDestroy(){this._focusMonitor&&this._focusMonitor.stopMonitoring(this._elementRef),this._parentMenu&&this._parentMenu.removeItem&&this._parentMenu.removeItem(this),this._hovered.complete(),this._focused.complete()}_getTabIndex(){return this.disabled?"-1":"0"}_getHostElement(){return this._elementRef.nativeElement}_checkDisabled(e){this.disabled&&(e.preventDefault(),e.stopPropagation())}_handleMouseEnter(){this._hovered.next(this)}getLabel(){let e=this._elementRef.nativeElement.cloneNode(!0),n=e.querySelectorAll("mat-icon, .material-icons");for(let r=0;r enter",Ln("120ms cubic-bezier(0, 0, 0.2, 1)",en({opacity:1,transform:"scale(1)"}))),Fn("* => void",Ln("100ms 25ms linear",en({opacity:0})))]),fadeInItems:pi("fadeInItems",[Ci("showing",en({opacity:1})),Fn("void => *",[en({opacity:0}),Ln("400ms 100ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},x5e=wC.fadeInItems,w5e=wC.transformMenu,wde=0,Cde=new pe("mat-menu-default-options",{providedIn:"root",factory:Sde});function Sde(){return{overlapTrigger:!1,xPosition:"after",yPosition:"below",backdropClass:"cdk-overlay-transparent-backdrop"}}var is=(()=>{class i{get xPosition(){return this._xPosition}set xPosition(e){this._xPosition=e,this.setPositionClasses()}get yPosition(){return this._yPosition}set yPosition(e){this._yPosition=e,this.setPositionClasses()}set panelClass(e){let n=this._previousPanelClass,r=X({},this._classList);n&&n.length&&n.split(" ").forEach(o=>{r[o]=!1}),this._previousPanelClass=e,e&&e.length&&(e.split(" ").forEach(o=>{r[o]=!0}),this._elementRef.nativeElement.className=""),this._classList=r}get classList(){return this.panelClass}set classList(e){this.panelClass=e}constructor(){this._elementRef=S(Fe),this._changeDetectorRef=S(Re),this._elevationPrefix="mat-elevation-z",this._baseElevation=null,this._directDescendantItems=new Wi,this._classList={},this._panelAnimationState="void",this._animationDone=new ce,this.closed=new Ie,this.close=this.closed,this.panelId=`mat-menu-panel-${wde++}`,this._injector=S(pt);let e=S(Cde);this.overlayPanelClass=e.overlayPanelClass||"",this._xPosition=e.xPosition,this._yPosition=e.yPosition,this.backdropClass=e.backdropClass,this.overlapTrigger=e.overlapTrigger,this.hasBackdrop=e.hasBackdrop}ngOnInit(){this.setPositionClasses()}ngAfterContentInit(){this._updateDirectDescendants(),this._keyManager=new Lb(this._directDescendantItems).withWrap().withTypeAhead().withHomeAndEnd(),this._keyManager.tabOut.subscribe(()=>this.closed.emit("tab")),this._directDescendantItems.changes.pipe(ni(this._directDescendantItems),Tn(e=>Xn(...e.map(n=>n._focused)))).subscribe(e=>this._keyManager.updateActiveItem(e)),this._directDescendantItems.changes.subscribe(e=>{let n=this._keyManager;if(this._panelAnimationState==="enter"&&n.activeItem?._hasFocus()){let r=e.toArray(),o=Math.max(0,Math.min(r.length-1,n.activeItemIndex||0));r[o]&&!r[o].disabled?n.setActiveItem(o):n.setNextItemActive()}})}ngOnDestroy(){this._keyManager?.destroy(),this._directDescendantItems.destroy(),this.closed.complete(),this._firstItemFocusRef?.destroy()}_hovered(){return this._directDescendantItems.changes.pipe(ni(this._directDescendantItems),Tn(n=>Xn(...n.map(r=>r._hovered))))}addItem(e){}removeItem(e){}_handleKeydown(e){let n=e.keyCode,r=this._keyManager;switch(n){case 27:Si(e)||(e.preventDefault(),this.closed.emit("keydown"));break;case 37:this.parentMenu&&this.direction==="ltr"&&this.closed.emit("keydown");break;case 39:this.parentMenu&&this.direction==="rtl"&&this.closed.emit("keydown");break;default:(n===38||n===40)&&r.setFocusOrigin("keyboard"),r.onKeydown(e);return}e.stopPropagation()}focusFirstItem(e="program"){this._firstItemFocusRef?.destroy(),this._firstItemFocusRef=zi(()=>{let n=null;if(this._directDescendantItems.length&&(n=this._directDescendantItems.first._getHostElement().closest('[role="menu"]')),!n||!n.contains(document.activeElement)){let r=this._keyManager;r.setFocusOrigin(e).setFirstItemActive(),!r.activeItem&&n&&n.focus()}},{injector:this._injector})}resetActiveItem(){this._keyManager.setActiveItem(-1)}setElevation(e){if(this._baseElevation===null){let a=(typeof getComputedStyle=="function"?getComputedStyle(this._elementRef.nativeElement):null)?.getPropertyValue("--mat-menu-base-elevation-level")||"8";this._baseElevation=parseInt(a)}let n=Math.min(this._baseElevation+e,24),r=`${this._elevationPrefix}${n}`,o=Object.keys(this._classList).find(s=>s.startsWith(this._elevationPrefix));if(!o||o===this._previousElevation){let s=X({},this._classList);this._previousElevation&&(s[this._previousElevation]=!1),s[r]=!0,this._previousElevation=r,this._classList=s}}setPositionClasses(e=this.xPosition,n=this.yPosition){this._classList=at(X({},this._classList),{"mat-menu-before":e==="before","mat-menu-after":e==="after","mat-menu-above":n==="above","mat-menu-below":n==="below"}),this._changeDetectorRef.markForCheck()}_startAnimation(){this._panelAnimationState="enter"}_resetAnimation(){this._panelAnimationState="void"}_onAnimationDone(e){this._animationDone.next(e),this._isAnimating=!1}_onAnimationStart(e){this._isAnimating=!0,e.toState==="enter"&&this._keyManager.activeItemIndex===0&&(e.element.scrollTop=0)}_updateDirectDescendants(){this._allItems.changes.pipe(ni(this._allItems)).subscribe(e=>{this._directDescendantItems.reset(e.filter(n=>n._parentMenu===this)),this._directDescendantItems.notifyOnChanges()})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["mat-menu"]],contentQueries:function(n,r,o){if(n&1&&(wi(o,xde,5),wi(o,Z_,5),wi(o,Z_,4)),n&2){let s;_e(s=ve())&&(r.lazyContent=s.first),_e(s=ve())&&(r._allItems=s),_e(s=ve())&&(r.items=s)}},viewQuery:function(n,r){if(n&1&&Me(Qn,5),n&2){let o;_e(o=ve())&&(r.templateRef=o.first)}},hostVars:3,hostBindings:function(n,r){n&2&&qe("aria-label",null)("aria-labelledby",null)("aria-describedby",null)},inputs:{backdropClass:"backdropClass",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],xPosition:"xPosition",yPosition:"yPosition",overlapTrigger:[2,"overlapTrigger","overlapTrigger",Ye],hasBackdrop:[2,"hasBackdrop","hasBackdrop",e=>e==null?null:Ye(e)],panelClass:[0,"class","panelClass"],classList:"classList"},outputs:{closed:"closed",close:"close"},exportAs:["matMenu"],standalone:!0,features:[Bt([{provide:AP,useExisting:i}]),nn,se],ngContentSelectors:yde,decls:1,vars:0,consts:[["tabindex","-1","role","menu",1,"mat-mdc-menu-panel","mat-mdc-elevation-specific",3,"keydown","click","id"],[1,"mat-mdc-menu-content"]],template:function(n,r){n&1&&(Dn(),W(0,bde,3,7,"ng-template"))},styles:['mat-menu{display:none}.mat-mdc-menu-content{margin:0;padding:8px 0;outline:0}.mat-mdc-menu-content,.mat-mdc-menu-content .mat-mdc-menu-item .mat-mdc-menu-item-text{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;flex:1;white-space:normal;font-family:var(--mat-menu-item-label-text-font, var(--mat-sys-label-large-font));line-height:var(--mat-menu-item-label-text-line-height, var(--mat-sys-label-large-line-height));font-size:var(--mat-menu-item-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-menu-item-label-text-tracking, var(--mat-sys-label-large-tracking));font-weight:var(--mat-menu-item-label-text-weight, var(--mat-sys-label-large-weight))}.mat-mdc-menu-panel{min-width:112px;max-width:280px;overflow:auto;-webkit-overflow-scrolling:touch;box-sizing:border-box;outline:0;border-radius:var(--mat-menu-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mat-menu-container-color, var(--mat-sys-surface-container));will-change:transform,opacity}.mat-mdc-menu-panel.ng-animating{pointer-events:none}.mat-mdc-menu-panel.ng-animating:has(.mat-mdc-menu-content:empty){display:none}@media(forced-colors: active){.mat-mdc-menu-panel{outline:solid 1px}}.mat-mdc-menu-panel .mat-divider{color:var(--mat-menu-divider-color, var(--mat-sys-surface-variant));margin-bottom:var(--mat-menu-divider-bottom-spacing, 8px);margin-top:var(--mat-menu-divider-top-spacing, 8px)}.mat-mdc-menu-item{display:flex;position:relative;align-items:center;justify-content:flex-start;overflow:hidden;padding:0;cursor:pointer;width:100%;text-align:left;box-sizing:border-box;color:inherit;font-size:inherit;background:none;text-decoration:none;margin:0;min-height:48px;padding-left:var(--mat-menu-item-leading-spacing, 12px);padding-right:var(--mat-menu-item-trailing-spacing, 12px);-webkit-user-select:none;user-select:none;cursor:pointer;outline:none;border:none;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-menu-item::-moz-focus-inner{border:0}[dir=rtl] .mat-mdc-menu-item{padding-left:var(--mat-menu-item-trailing-spacing, 12px);padding-right:var(--mat-menu-item-leading-spacing, 12px)}.mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-leading-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-trailing-spacing, 12px)}[dir=rtl] .mat-mdc-menu-item:has(.material-icons,mat-icon,[matButtonIcon]){padding-left:var(--mat-menu-item-with-icon-trailing-spacing, 12px);padding-right:var(--mat-menu-item-with-icon-leading-spacing, 12px)}.mat-mdc-menu-item,.mat-mdc-menu-item:visited,.mat-mdc-menu-item:link{color:var(--mat-menu-item-label-text-color, var(--mat-sys-on-surface))}.mat-mdc-menu-item .mat-icon-no-color,.mat-mdc-menu-item .mat-mdc-menu-submenu-icon{color:var(--mat-menu-item-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-menu-item[disabled]{cursor:default;opacity:.38}.mat-mdc-menu-item[disabled]::after{display:block;position:absolute;content:"";top:0;left:0;bottom:0;right:0}.mat-mdc-menu-item:focus{outline:0}.mat-mdc-menu-item .mat-icon{flex-shrink:0;margin-right:var(--mat-menu-item-spacing, 12px);height:var(--mat-menu-item-icon-size, 24px);width:var(--mat-menu-item-icon-size, 24px)}[dir=rtl] .mat-mdc-menu-item{text-align:right}[dir=rtl] .mat-mdc-menu-item .mat-icon{margin-right:0;margin-left:var(--mat-menu-item-spacing, 12px)}.mat-mdc-menu-item:not([disabled]):hover{background-color:var(--mat-menu-item-hover-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-hover-state-layer-opacity) * 100%), transparent))}.mat-mdc-menu-item:not([disabled]).cdk-program-focused,.mat-mdc-menu-item:not([disabled]).cdk-keyboard-focused,.mat-mdc-menu-item:not([disabled]).mat-mdc-menu-item-highlighted{background-color:var(--mat-menu-item-focus-state-layer-color, color-mix(in srgb, var(--mat-sys-on-surface) calc(var(--mat-sys-focus-state-layer-opacity) * 100%), transparent))}@media(forced-colors: active){.mat-mdc-menu-item{margin-top:1px}}.mat-mdc-menu-submenu-icon{width:var(--mat-menu-item-icon-size, 24px);height:10px;fill:currentColor;padding-left:var(--mat-menu-item-spacing, 12px)}[dir=rtl] .mat-mdc-menu-submenu-icon{padding-right:var(--mat-menu-item-spacing, 12px);padding-left:0}[dir=rtl] .mat-mdc-menu-submenu-icon polygon{transform:scaleX(-1);transform-origin:center}@media(forced-colors: active){.mat-mdc-menu-submenu-icon{fill:CanvasText}}.mat-mdc-menu-item .mat-mdc-menu-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}'],encapsulation:2,data:{animation:[wC.transformMenu,wC.fadeInItems]},changeDetection:0})}}return i})(),AG=new pe("mat-menu-scroll-strategy",{providedIn:"root",factory:()=>{let i=S(on);return()=>i.scrollStrategies.reposition()}});function Mde(i){return()=>i.scrollStrategies.reposition()}var Ede={provide:AG,deps:[on],useFactory:Mde},RG=Wr({passive:!0});var yc=(()=>{class i{get _deprecatedMatMenuTriggerFor(){return this.menu}set _deprecatedMatMenuTriggerFor(e){this.menu=e}get menu(){return this._menu}set menu(e){e!==this._menu&&(this._menu=e,this._menuCloseSubscription.unsubscribe(),e&&(this._parentMaterialMenu,this._menuCloseSubscription=e.close.subscribe(n=>{this._destroyMenu(n),(n==="click"||n==="tab")&&this._parentMaterialMenu&&this._parentMaterialMenu.closed.emit(n)})),this._menuItemInstance?._setTriggersSubmenu(this.triggersSubmenu()))}constructor(){this._overlay=S(on),this._element=S(Fe),this._viewContainerRef=S(Kt),this._menuItemInstance=S(Z_,{optional:!0,self:!0}),this._dir=S(oi,{optional:!0}),this._focusMonitor=S(So),this._ngZone=S(Ue),this._scrollStrategy=S(AG),this._changeDetectorRef=S(Re),this._overlayRef=null,this._menuOpen=!1,this._closingActionsSubscription=St.EMPTY,this._hoverSubscription=St.EMPTY,this._menuCloseSubscription=St.EMPTY,this._handleTouchStart=n=>{Md(n)||(this._openedBy="touch")},this._openedBy=void 0,this.restoreFocus=!0,this.menuOpened=new Ie,this.onMenuOpen=this.menuOpened,this.menuClosed=new Ie,this.onMenuClose=this.menuClosed;let e=S(AP,{optional:!0});this._parentMaterialMenu=e instanceof is?e:void 0,this._element.nativeElement.addEventListener("touchstart",this._handleTouchStart,RG)}ngAfterContentInit(){this._handleHover()}ngOnDestroy(){this._overlayRef&&(this._overlayRef.dispose(),this._overlayRef=null),this._element.nativeElement.removeEventListener("touchstart",this._handleTouchStart,RG),this._menuCloseSubscription.unsubscribe(),this._closingActionsSubscription.unsubscribe(),this._hoverSubscription.unsubscribe()}get menuOpen(){return this._menuOpen}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}triggersSubmenu(){return!!(this._menuItemInstance&&this._parentMaterialMenu&&this.menu)}toggleMenu(){return this._menuOpen?this.closeMenu():this.openMenu()}openMenu(){let e=this.menu;if(this._menuOpen||!e)return;let n=this._createOverlay(e),r=n.getConfig(),o=r.positionStrategy;this._setPosition(e,o),r.hasBackdrop=e.hasBackdrop==null?!this.triggersSubmenu():e.hasBackdrop,n.attach(this._getPortal(e)),e.lazyContent&&e.lazyContent.attach(this.menuData),this._closingActionsSubscription=this._menuClosingActions().subscribe(()=>this.closeMenu()),this._initMenu(e),e instanceof is&&(e._startAnimation(),e._directDescendantItems.changes.pipe(Ke(e.close)).subscribe(()=>{o.withLockedPosition(!1).reapplyLastPosition(),o.withLockedPosition(!0)}))}closeMenu(){this.menu?.close.emit()}focus(e,n){this._focusMonitor&&e?this._focusMonitor.focusVia(this._element,e,n):this._element.nativeElement.focus(n)}updatePosition(){this._overlayRef?.updatePosition()}_destroyMenu(e){if(!this._overlayRef||!this.menuOpen)return;let n=this.menu;this._closingActionsSubscription.unsubscribe(),this._overlayRef.detach(),this.restoreFocus&&(e==="keydown"||!this._openedBy||!this.triggersSubmenu())&&this.focus(this._openedBy),this._openedBy=void 0,n instanceof is?(n._resetAnimation(),n.lazyContent?n._animationDone.pipe(qt(r=>r.toState==="void"),tn(1),Ke(n.lazyContent._attached)).subscribe({next:()=>n.lazyContent.detach(),complete:()=>this._setIsMenuOpen(!1)}):this._setIsMenuOpen(!1)):(this._setIsMenuOpen(!1),n?.lazyContent?.detach())}_initMenu(e){e.parentMenu=this.triggersSubmenu()?this._parentMaterialMenu:void 0,e.direction=this.dir,this._setMenuElevation(e),e.focusFirstItem(this._openedBy||"program"),this._setIsMenuOpen(!0)}_setMenuElevation(e){if(e.setElevation){let n=0,r=e.parentMenu;for(;r;)n++,r=r.parentMenu;e.setElevation(n)}}_setIsMenuOpen(e){e!==this._menuOpen&&(this._menuOpen=e,this._menuOpen?this.menuOpened.emit():this.menuClosed.emit(),this.triggersSubmenu()&&this._menuItemInstance._setHighlighted(e),this._changeDetectorRef.markForCheck())}_createOverlay(e){if(!this._overlayRef){let n=this._getOverlayConfig(e);this._subscribeToPositions(e,n.positionStrategy),this._overlayRef=this._overlay.create(n),this._overlayRef.keydownEvents().subscribe()}return this._overlayRef}_getOverlayConfig(e){return new bi({positionStrategy:this._overlay.position().flexibleConnectedTo(this._element).withLockedPosition().withGrowAfterOpen().withTransformOriginOn(".mat-menu-panel, .mat-mdc-menu-panel"),backdropClass:e.backdropClass||"cdk-overlay-transparent-backdrop",panelClass:e.overlayPanelClass,scrollStrategy:this._scrollStrategy(),direction:this._dir||"ltr"})}_subscribeToPositions(e,n){e.setPositionClasses&&n.positionChanges.subscribe(r=>{this._ngZone.run(()=>{let o=r.connectionPair.overlayX==="start"?"after":"before",s=r.connectionPair.overlayY==="top"?"below":"above";e.setPositionClasses(o,s)})})}_setPosition(e,n){let[r,o]=e.xPosition==="before"?["end","start"]:["start","end"],[s,a]=e.yPosition==="above"?["bottom","top"]:["top","bottom"],[l,c]=[s,a],[d,u]=[r,o],h=0;if(this.triggersSubmenu()){if(u=r=e.xPosition==="before"?"start":"end",o=d=r==="end"?"start":"end",this._parentMaterialMenu){if(this._parentInnerPadding==null){let p=this._parentMaterialMenu.items.first;this._parentInnerPadding=p?p._getHostElement().offsetTop:0}h=s==="bottom"?this._parentInnerPadding:-this._parentInnerPadding}}else e.overlapTrigger||(l=s==="top"?"bottom":"top",c=a==="top"?"bottom":"top");n.withPositions([{originX:r,originY:l,overlayX:d,overlayY:s,offsetY:h},{originX:o,originY:l,overlayX:u,overlayY:s,offsetY:h},{originX:r,originY:c,overlayX:d,overlayY:a,offsetY:-h},{originX:o,originY:c,overlayX:u,overlayY:a,offsetY:-h}])}_menuClosingActions(){let e=this._overlayRef.backdropClick(),n=this._overlayRef.detachments(),r=this._parentMaterialMenu?this._parentMaterialMenu.closed:ke(),o=this._parentMaterialMenu?this._parentMaterialMenu._hovered().pipe(qt(s=>s!==this._menuItemInstance),qt(()=>this._menuOpen)):ke();return Xn(e,r,o,n)}_handleMousedown(e){Sd(e)||(this._openedBy=e.button===0?"mouse":void 0,this.triggersSubmenu()&&e.preventDefault())}_handleKeydown(e){let n=e.keyCode;(n===13||n===32)&&(this._openedBy="keyboard"),this.triggersSubmenu()&&(n===39&&this.dir==="ltr"||n===37&&this.dir==="rtl")&&(this._openedBy="keyboard",this.openMenu())}_handleClick(e){this.triggersSubmenu()?(e.stopPropagation(),this.openMenu()):this.toggleMenu()}_handleHover(){!this.triggersSubmenu()||!this._parentMaterialMenu||(this._hoverSubscription=this._parentMaterialMenu._hovered().pipe(qt(e=>e===this._menuItemInstance&&!e.disabled),Vu(0,Df)).subscribe(()=>{this._openedBy="mouse",this.menu instanceof is&&this.menu._isAnimating?this.menu._animationDone.pipe(tn(1),Vu(0,Df),Ke(this._parentMaterialMenu._hovered())).subscribe(()=>this.openMenu()):this.openMenu()}))}_getPortal(e){return(!this._portal||this._portal.templateRef!==e.templateRef)&&(this._portal=new Jr(e.templateRef,this._viewContainerRef)),this._portal}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["","mat-menu-trigger-for",""],["","matMenuTriggerFor",""]],hostAttrs:[1,"mat-mdc-menu-trigger"],hostVars:3,hostBindings:function(n,r){n&1&&H("click",function(s){return r._handleClick(s)})("mousedown",function(s){return r._handleMousedown(s)})("keydown",function(s){return r._handleKeydown(s)}),n&2&&qe("aria-haspopup",r.menu?"menu":null)("aria-expanded",r.menuOpen)("aria-controls",r.menuOpen?r.menu.panelId:null)},inputs:{_deprecatedMatMenuTriggerFor:[0,"mat-menu-trigger-for","_deprecatedMatMenuTriggerFor"],menu:[0,"matMenuTriggerFor","menu"],menuData:[0,"matMenuTriggerData","menuData"],restoreFocus:[0,"matMenuTriggerRestoreFocus","restoreFocus"]},outputs:{menuOpened:"menuOpened",onMenuOpen:"onMenuOpen",menuClosed:"menuClosed",onMenuClose:"onMenuClose"},exportAs:["matMenuTrigger"],standalone:!0})}}return i})(),ca=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({providers:[Ede],imports:[Oe,Id,Ht,so,ts,Ht]})}}return i})();var Ide=["tooltip"],LG=20;var FG=new pe("mat-tooltip-scroll-strategy",{providedIn:"root",factory:()=>{let i=S(on);return()=>i.scrollStrategies.reposition({scrollThrottle:LG})}});function Tde(i){return()=>i.scrollStrategies.reposition({scrollThrottle:LG})}var Dde={provide:FG,deps:[on],useFactory:Tde};function Ode(){return{showDelay:0,hideDelay:0,touchendHideDelay:1500}}var Pde=new pe("mat-tooltip-default-options",{providedIn:"root",factory:Ode});var NG="tooltip-panel",kG=Wr({passive:!0}),Rde=8,Ade=8,Nde=24,kde=200,qn=(()=>{class i{get position(){return this._position}set position(e){e!==this._position&&(this._position=e,this._overlayRef&&(this._updatePosition(this._overlayRef),this._tooltipInstance?.show(0),this._overlayRef.updatePosition()))}get positionAtOrigin(){return this._positionAtOrigin}set positionAtOrigin(e){this._positionAtOrigin=Xm(e),this._detach(),this._overlayRef=null}get disabled(){return this._disabled}set disabled(e){let n=Xm(e);this._disabled!==n&&(this._disabled=n,n?this.hide(0):this._setupPointerEnterEventsIfNeeded(),this._syncAriaDescription(this.message))}get showDelay(){return this._showDelay}set showDelay(e){this._showDelay=Va(e)}get hideDelay(){return this._hideDelay}set hideDelay(e){this._hideDelay=Va(e),this._tooltipInstance&&(this._tooltipInstance._mouseLeaveHideDelay=this._hideDelay)}get message(){return this._message}set message(e){let n=this._message;this._message=e!=null?String(e).trim():"",!this._message&&this._isTooltipVisible()?this.hide(0):(this._setupPointerEnterEventsIfNeeded(),this._updateTooltipMessage()),this._syncAriaDescription(n)}get tooltipClass(){return this._tooltipClass}set tooltipClass(e){this._tooltipClass=e,this._tooltipInstance&&this._setTooltipClass(this._tooltipClass)}constructor(){this._overlay=S(on),this._elementRef=S(Fe),this._scrollDispatcher=S(wu),this._viewContainerRef=S(Kt),this._ngZone=S(Ue),this._platform=S(Rn),this._ariaDescriber=S(tB),this._focusMonitor=S(So),this._dir=S(oi),this._injector=S(pt),this._defaultOptions=S(Pde,{optional:!0}),this._position="below",this._positionAtOrigin=!1,this._disabled=!1,this._scrollStrategy=S(FG),this._viewInitialized=!1,this._pointerExitEventsInitialized=!1,this._tooltipComponent=Lde,this._viewportMargin=8,this._cssClassPrefix="mat-mdc",this.touchGestures="auto",this._message="",this._passiveListeners=[],this._document=S(ft),this._touchstartTimeout=null,this._destroyed=new ce;let e=this._defaultOptions;e&&(this._showDelay=e.showDelay,this._hideDelay=e.hideDelay,e.position&&(this.position=e.position),e.positionAtOrigin&&(this.positionAtOrigin=e.positionAtOrigin),e.touchGestures&&(this.touchGestures=e.touchGestures),e.tooltipClass&&(this.tooltipClass=e.tooltipClass)),this._dir.change.pipe(Ke(this._destroyed)).subscribe(()=>{this._overlayRef&&this._updatePosition(this._overlayRef)}),this._viewportMargin=Rde}ngAfterViewInit(){this._viewInitialized=!0,this._setupPointerEnterEventsIfNeeded(),this._focusMonitor.monitor(this._elementRef).pipe(Ke(this._destroyed)).subscribe(e=>{e?e==="keyboard"&&this._ngZone.run(()=>this.show()):this._ngZone.run(()=>this.hide(0))})}ngOnDestroy(){let e=this._elementRef.nativeElement;this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this._overlayRef&&(this._overlayRef.dispose(),this._tooltipInstance=null),this._passiveListeners.forEach(([n,r])=>{e.removeEventListener(n,r,kG)}),this._passiveListeners.length=0,this._destroyed.next(),this._destroyed.complete(),this._ariaDescriber.removeDescription(e,this.message,"tooltip"),this._focusMonitor.stopMonitoring(e)}show(e=this.showDelay,n){if(this.disabled||!this.message||this._isTooltipVisible()){this._tooltipInstance?._cancelPendingAnimations();return}let r=this._createOverlay(n);this._detach(),this._portal=this._portal||new Li(this._tooltipComponent,this._viewContainerRef);let o=this._tooltipInstance=r.attach(this._portal).instance;o._triggerElement=this._elementRef.nativeElement,o._mouseLeaveHideDelay=this._hideDelay,o.afterHidden().pipe(Ke(this._destroyed)).subscribe(()=>this._detach()),this._setTooltipClass(this._tooltipClass),this._updateTooltipMessage(),o.show(e)}hide(e=this.hideDelay){let n=this._tooltipInstance;n&&(n.isVisible()?n.hide(e):(n._cancelPendingAnimations(),this._detach()))}toggle(e){this._isTooltipVisible()?this.hide():this.show(void 0,e)}_isTooltipVisible(){return!!this._tooltipInstance&&this._tooltipInstance.isVisible()}_createOverlay(e){if(this._overlayRef){let o=this._overlayRef.getConfig().positionStrategy;if((!this.positionAtOrigin||!e)&&o._origin instanceof Fe)return this._overlayRef;this._detach()}let n=this._scrollDispatcher.getAncestorScrollContainers(this._elementRef),r=this._overlay.position().flexibleConnectedTo(this.positionAtOrigin?e||this._elementRef:this._elementRef).withTransformOriginOn(`.${this._cssClassPrefix}-tooltip`).withFlexibleDimensions(!1).withViewportMargin(this._viewportMargin).withScrollableContainers(n);return r.positionChanges.pipe(Ke(this._destroyed)).subscribe(o=>{this._updateCurrentPositionClass(o.connectionPair),this._tooltipInstance&&o.scrollableViewProperties.isOverlayClipped&&this._tooltipInstance.isVisible()&&this._ngZone.run(()=>this.hide(0))}),this._overlayRef=this._overlay.create({direction:this._dir,positionStrategy:r,panelClass:`${this._cssClassPrefix}-${NG}`,scrollStrategy:this._scrollStrategy()}),this._updatePosition(this._overlayRef),this._overlayRef.detachments().pipe(Ke(this._destroyed)).subscribe(()=>this._detach()),this._overlayRef.outsidePointerEvents().pipe(Ke(this._destroyed)).subscribe(()=>this._tooltipInstance?._handleBodyInteraction()),this._overlayRef.keydownEvents().pipe(Ke(this._destroyed)).subscribe(o=>{this._isTooltipVisible()&&o.keyCode===27&&!Si(o)&&(o.preventDefault(),o.stopPropagation(),this._ngZone.run(()=>this.hide(0)))}),this._defaultOptions?.disableTooltipInteractivity&&this._overlayRef.addPanelClass(`${this._cssClassPrefix}-tooltip-panel-non-interactive`),this._overlayRef}_detach(){this._overlayRef&&this._overlayRef.hasAttached()&&this._overlayRef.detach(),this._tooltipInstance=null}_updatePosition(e){let n=e.getConfig().positionStrategy,r=this._getOrigin(),o=this._getOverlayPosition();n.withPositions([this._addOffset(X(X({},r.main),o.main)),this._addOffset(X(X({},r.fallback),o.fallback))])}_addOffset(e){let n=Ade,r=!this._dir||this._dir.value=="ltr";return e.originY==="top"?e.offsetY=-n:e.originY==="bottom"?e.offsetY=n:e.originX==="start"?e.offsetX=r?-n:n:e.originX==="end"&&(e.offsetX=r?n:-n),e}_getOrigin(){let e=!this._dir||this._dir.value=="ltr",n=this.position,r;n=="above"||n=="below"?r={originX:"center",originY:n=="above"?"top":"bottom"}:n=="before"||n=="left"&&e||n=="right"&&!e?r={originX:"start",originY:"center"}:(n=="after"||n=="right"&&e||n=="left"&&!e)&&(r={originX:"end",originY:"center"});let{x:o,y:s}=this._invertPosition(r.originX,r.originY);return{main:r,fallback:{originX:o,originY:s}}}_getOverlayPosition(){let e=!this._dir||this._dir.value=="ltr",n=this.position,r;n=="above"?r={overlayX:"center",overlayY:"bottom"}:n=="below"?r={overlayX:"center",overlayY:"top"}:n=="before"||n=="left"&&e||n=="right"&&!e?r={overlayX:"end",overlayY:"center"}:(n=="after"||n=="right"&&e||n=="left"&&!e)&&(r={overlayX:"start",overlayY:"center"});let{x:o,y:s}=this._invertPosition(r.overlayX,r.overlayY);return{main:r,fallback:{overlayX:o,overlayY:s}}}_updateTooltipMessage(){this._tooltipInstance&&(this._tooltipInstance.message=this.message,this._tooltipInstance._markForCheck(),zi(()=>{this._tooltipInstance&&this._overlayRef.updatePosition()},{injector:this._injector}))}_setTooltipClass(e){this._tooltipInstance&&(this._tooltipInstance.tooltipClass=e,this._tooltipInstance._markForCheck())}_invertPosition(e,n){return this.position==="above"||this.position==="below"?n==="top"?n="bottom":n==="bottom"&&(n="top"):e==="end"?e="start":e==="start"&&(e="end"),{x:e,y:n}}_updateCurrentPositionClass(e){let{overlayY:n,originX:r,originY:o}=e,s;if(n==="center"?this._dir&&this._dir.value==="rtl"?s=r==="end"?"left":"right":s=r==="start"?"left":"right":s=n==="bottom"&&o==="top"?"above":"below",s!==this._currentPosition){let a=this._overlayRef;if(a){let l=`${this._cssClassPrefix}-${NG}-`;a.removePanelClass(l+this._currentPosition),a.addPanelClass(l+s)}this._currentPosition=s}}_setupPointerEnterEventsIfNeeded(){this._disabled||!this.message||!this._viewInitialized||this._passiveListeners.length||(this._platformSupportsMouseEvents()?this._passiveListeners.push(["mouseenter",e=>{this._setupPointerExitEventsIfNeeded();let n;e.x!==void 0&&e.y!==void 0&&(n=e),this.show(void 0,n)}]):this.touchGestures!=="off"&&(this._disableNativeGesturesIfNecessary(),this._passiveListeners.push(["touchstart",e=>{let n=e.targetTouches?.[0],r=n?{x:n.clientX,y:n.clientY}:void 0;this._setupPointerExitEventsIfNeeded(),this._touchstartTimeout&&clearTimeout(this._touchstartTimeout);let o=500;this._touchstartTimeout=setTimeout(()=>{this._touchstartTimeout=null,this.show(void 0,r)},this._defaultOptions?.touchLongPressShowDelay??o)}])),this._addListeners(this._passiveListeners))}_setupPointerExitEventsIfNeeded(){if(this._pointerExitEventsInitialized)return;this._pointerExitEventsInitialized=!0;let e=[];if(this._platformSupportsMouseEvents())e.push(["mouseleave",n=>{let r=n.relatedTarget;(!r||!this._overlayRef?.overlayElement.contains(r))&&this.hide()}],["wheel",n=>this._wheelListener(n)]);else if(this.touchGestures!=="off"){this._disableNativeGesturesIfNecessary();let n=()=>{this._touchstartTimeout&&clearTimeout(this._touchstartTimeout),this.hide(this._defaultOptions?.touchendHideDelay)};e.push(["touchend",n],["touchcancel",n])}this._addListeners(e),this._passiveListeners.push(...e)}_addListeners(e){e.forEach(([n,r])=>{this._elementRef.nativeElement.addEventListener(n,r,kG)})}_platformSupportsMouseEvents(){return!this._platform.IOS&&!this._platform.ANDROID}_wheelListener(e){if(this._isTooltipVisible()){let n=this._document.elementFromPoint(e.clientX,e.clientY),r=this._elementRef.nativeElement;n!==r&&!r.contains(n)&&this.hide()}}_disableNativeGesturesIfNecessary(){let e=this.touchGestures;if(e!=="off"){let n=this._elementRef.nativeElement,r=n.style;(e==="on"||n.nodeName!=="INPUT"&&n.nodeName!=="TEXTAREA")&&(r.userSelect=r.msUserSelect=r.webkitUserSelect=r.MozUserSelect="none"),(e==="on"||!n.draggable)&&(r.webkitUserDrag="none"),r.touchAction="none",r.webkitTapHighlightColor="transparent"}}_syncAriaDescription(e){this._ariaDescriptionPending||(this._ariaDescriptionPending=!0,this._ariaDescriber.removeDescription(this._elementRef.nativeElement,e,"tooltip"),this._ngZone.runOutsideAngular(()=>{Promise.resolve().then(()=>{this._ariaDescriptionPending=!1,this.message&&!this.disabled&&this._ariaDescriber.describe(this._elementRef.nativeElement,this.message,"tooltip")})}))}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["","matTooltip",""]],hostAttrs:[1,"mat-mdc-tooltip-trigger"],hostVars:2,hostBindings:function(n,r){n&2&&ne("mat-mdc-tooltip-disabled",r.disabled)},inputs:{position:[0,"matTooltipPosition","position"],positionAtOrigin:[0,"matTooltipPositionAtOrigin","positionAtOrigin"],disabled:[0,"matTooltipDisabled","disabled"],showDelay:[0,"matTooltipShowDelay","showDelay"],hideDelay:[0,"matTooltipHideDelay","hideDelay"],touchGestures:[0,"matTooltipTouchGestures","touchGestures"],message:[0,"matTooltip","message"],tooltipClass:[0,"matTooltipClass","tooltipClass"]},exportAs:["matTooltip"],standalone:!0})}}return i})(),Lde=(()=>{class i{constructor(){this._changeDetectorRef=S(Re),this._elementRef=S(Fe),this._isMultiline=!1,this._closeOnInteraction=!1,this._isVisible=!1,this._onHide=new ce,this._showAnimation="mat-mdc-tooltip-show",this._hideAnimation="mat-mdc-tooltip-hide";let e=S(Kn,{optional:!0});this._animationsDisabled=e==="NoopAnimations"}show(e){this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=setTimeout(()=>{this._toggleVisibility(!0),this._showTimeoutId=void 0},e)}hide(e){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId=setTimeout(()=>{this._toggleVisibility(!1),this._hideTimeoutId=void 0},e)}afterHidden(){return this._onHide}isVisible(){return this._isVisible}ngOnDestroy(){this._cancelPendingAnimations(),this._onHide.complete(),this._triggerElement=null}_handleBodyInteraction(){this._closeOnInteraction&&this.hide(0)}_markForCheck(){this._changeDetectorRef.markForCheck()}_handleMouseLeave({relatedTarget:e}){(!e||!this._triggerElement.contains(e))&&(this.isVisible()?this.hide(this._mouseLeaveHideDelay):this._finalizeAnimation(!1))}_onShow(){this._isMultiline=this._isTooltipMultiline(),this._markForCheck()}_isTooltipMultiline(){let e=this._elementRef.nativeElement.getBoundingClientRect();return e.height>Nde&&e.width>=kde}_handleAnimationEnd({animationName:e}){(e===this._showAnimation||e===this._hideAnimation)&&this._finalizeAnimation(e===this._showAnimation)}_cancelPendingAnimations(){this._showTimeoutId!=null&&clearTimeout(this._showTimeoutId),this._hideTimeoutId!=null&&clearTimeout(this._hideTimeoutId),this._showTimeoutId=this._hideTimeoutId=void 0}_finalizeAnimation(e){e?this._closeOnInteraction=!0:this.isVisible()||this._onHide.next()}_toggleVisibility(e){let n=this._tooltip.nativeElement,r=this._showAnimation,o=this._hideAnimation;if(n.classList.remove(e?o:r),n.classList.add(e?r:o),this._isVisible!==e&&(this._isVisible=e,this._changeDetectorRef.markForCheck()),e&&!this._animationsDisabled&&typeof getComputedStyle=="function"){let s=getComputedStyle(n);(s.getPropertyValue("animation-duration")==="0s"||s.getPropertyValue("animation-name")==="none")&&(this._animationsDisabled=!0)}e&&this._onShow(),this._animationsDisabled&&(n.classList.add("_mat-animation-noopable"),this._finalizeAnimation(e))}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["mat-tooltip-component"]],viewQuery:function(n,r){if(n&1&&Me(Ide,7),n&2){let o;_e(o=ve())&&(r._tooltip=o.first)}},hostAttrs:["aria-hidden","true"],hostBindings:function(n,r){n&1&&H("mouseleave",function(s){return r._handleMouseLeave(s)})},standalone:!0,features:[se],decls:4,vars:4,consts:[["tooltip",""],[1,"mdc-tooltip","mat-mdc-tooltip",3,"animationend","ngClass"],[1,"mat-mdc-tooltip-surface","mdc-tooltip__surface"]],template:function(n,r){if(n&1){let o=te();v(0,"div",1,0),H("animationend",function(a){return B(o),V(r._handleAnimationEnd(a))}),v(2,"div",2),M(3),y()()}n&2&&(ne("mdc-tooltip--multiline",r._isMultiline),R("ngClass",r.tooltipClass),w(3),lt(r.message))},dependencies:[g0],styles:['.mat-mdc-tooltip{position:relative;transform:scale(0);display:inline-flex}.mat-mdc-tooltip::before{content:"";top:0;right:0;bottom:0;left:0;z-index:-1;position:absolute}.mat-mdc-tooltip-panel-below .mat-mdc-tooltip::before{top:-8px}.mat-mdc-tooltip-panel-above .mat-mdc-tooltip::before{bottom:-8px}.mat-mdc-tooltip-panel-right .mat-mdc-tooltip::before{left:-8px}.mat-mdc-tooltip-panel-left .mat-mdc-tooltip::before{right:-8px}.mat-mdc-tooltip._mat-animation-noopable{animation:none;transform:scale(1)}.mat-mdc-tooltip-surface{word-break:normal;overflow-wrap:anywhere;padding:4px 8px;min-width:40px;max-width:200px;min-height:24px;max-height:40vh;box-sizing:border-box;overflow:hidden;text-align:center;will-change:transform,opacity;background-color:var(--mdc-plain-tooltip-container-color, var(--mat-sys-inverse-surface));color:var(--mdc-plain-tooltip-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mdc-plain-tooltip-container-shape, var(--mat-sys-corner-extra-small));font-family:var(--mdc-plain-tooltip-supporting-text-font, var(--mat-sys-body-small-font));font-size:var(--mdc-plain-tooltip-supporting-text-size, var(--mat-sys-body-small-size));font-weight:var(--mdc-plain-tooltip-supporting-text-weight, var(--mat-sys-body-small-weight));line-height:var(--mdc-plain-tooltip-supporting-text-line-height, var(--mat-sys-body-small-line-height));letter-spacing:var(--mdc-plain-tooltip-supporting-text-tracking, var(--mat-sys-body-small-tracking))}.mat-mdc-tooltip-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:1px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:left}[dir=rtl] .mdc-tooltip--multiline .mat-mdc-tooltip-surface{text-align:right}.mat-mdc-tooltip-panel.mat-mdc-tooltip-panel-non-interactive{pointer-events:none}@keyframes mat-mdc-tooltip-show{0%{opacity:0;transform:scale(0.8)}100%{opacity:1;transform:scale(1)}}@keyframes mat-mdc-tooltip-hide{0%{opacity:1;transform:scale(1)}100%{opacity:0;transform:scale(0.8)}}.mat-mdc-tooltip-show{animation:mat-mdc-tooltip-show 150ms cubic-bezier(0, 0, 0.2, 1) forwards}.mat-mdc-tooltip-hide{animation:mat-mdc-tooltip-hide 75ms cubic-bezier(0.4, 0, 1, 1) forwards}'],encapsulation:2,changeDetection:0})}}return i})();var $t=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({providers:[Dde],imports:[zb,Oe,so,Ht,Ht,ts]})}}return i})();var Fde=/^\s*(?!javascript:)(?:[\w+.-]+:|[^:/?#]*(?:[/?#]|$))/i;function Bde(i){let t=!Fde.test(i);return t}function Vde(i){if(!Bde(i))return i}function da(i){return Vde(i)}function dl(i,t){let e=da(t);e!==void 0&&(i.href=e)}var tje=typeof window<"u"?window.TrustedScriptURL:void 0;var hje=typeof window<"u"?window.TrustedHTML:void 0;var Oje=typeof window<"u"?window.TrustedScript:void 0;function kP(i,t){let e=da(t);e!==void 0&&(i.href=e)}function fue(i,t){if(i&1&&ee(0,"div",1),i&2){let e=I();an("top",e.top,"px")("left",e.left,"px")("width",e.width,"px")("height",e.height,"px")("border-color",e.borderColor)("background-color",e.bgColor)}}var zG=(()=>{class i{changeDetectorRef;borderColor;bgColor;startX=-1;startY=-1;endX=-1;endY=-1;isMac=typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);constructor(e){this.changeDetectorRef=e}start(e,n){e.preventDefault(),e.stopPropagation(),this.startX=e.offsetX,this.startY=e.offsetY,this.endX=this.startX,this.endY=this.startY;let r=wn(document,"mousemove"),o=wn(window,"mouseup"),s=0,a=0;ji([r]).pipe(Ke(o)).subscribe({next:([l])=>{s=l.offsetX-this.startX,a=l.offsetY-this.startY,this.endX=this.startX+s,this.endY=this.startY+a,this.changeDetectorRef.detectChanges()},complete:()=>{let l=Math.abs(s)<5&&Math.abs(a)<5;n(l,this.startX,this.startY,this.endX,this.endY),this.startX=-1,this.startY=-1,this.endX=-1,this.endY=-1,this.changeDetectorRef.detectChanges()}})}get top(){return Math.min(this.startY,this.endY)}get left(){return Math.min(this.startX,this.endX)}get width(){return Math.abs(this.endX-this.startX)}get height(){return Math.abs(this.endY-this.startY)}static \u0275fac=function(n){return new(n||i)(q(Re))};static \u0275cmp=oe({type:i,selectors:[["drag-area"]],inputs:{borderColor:"borderColor",bgColor:"bgColor"},standalone:!0,features:[se],decls:1,vars:1,consts:[[1,"container",3,"top","left","width","height","border-color","background-color"],[1,"container"]],template:function(n,r){n&1&&W(0,fue,1,12,"div",0),n&2&&re(r.startX>0?0:-1)},dependencies:[Oe],styles:[`.container[_ngcontent-%COMP%]{position:absolute;z-index:5000;box-sizing:border-box;border-width:1px;border-style:solid;pointer-events:none} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();var LP=class{constructor(){this.expansionModel=new xu(!0)}toggle(t){this.expansionModel.toggle(this._trackByValue(t))}expand(t){this.expansionModel.select(this._trackByValue(t))}collapse(t){this.expansionModel.deselect(this._trackByValue(t))}isExpanded(t){return this.expansionModel.isSelected(this._trackByValue(t))}toggleDescendants(t){this.expansionModel.isSelected(this._trackByValue(t))?this.collapseDescendants(t):this.expandDescendants(t)}collapseAll(){this.expansionModel.clear()}expandDescendants(t){let e=[t];e.push(...this.getDescendants(t)),this.expansionModel.select(...e.map(n=>this._trackByValue(n)))}collapseDescendants(t){let e=[t];e.push(...this.getDescendants(t)),this.expansionModel.deselect(...e.map(n=>this._trackByValue(n)))}_trackByValue(t){return this.trackBy?this.trackBy(t):t}},EC=class extends LP{constructor(t,e,n){super(),this.getLevel=t,this.isExpandable=e,this.options=n,this.options&&(this.trackBy=this.options.trackBy)}getDescendants(t){let e=this.dataNodes.indexOf(t),n=[];for(let r=e+1;rthis._trackByValue(t)))}};var BP=new pe("CDK_TREE_NODE_OUTLET_NODE"),IC=(()=>{class i{constructor(){this.viewContainer=S(Kt),this._node=S(BP,{optional:!0})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["","cdkTreeNodeOutlet",""]],standalone:!0})}}return i})(),FP=class{constructor(t){this.$implicit=t}},TC=(()=>{class i{constructor(){this.template=S(Qn)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["","cdkTreeNodeDef",""]],inputs:{when:[0,"cdkTreeNodeDefWhen","when"]},standalone:!0})}}return i})();function UG(){return Error("Could not find a tree control, levelAccessor, or childrenAccessor for the tree.")}var sf=(()=>{class i{get dataSource(){return this._dataSource}set dataSource(e){this._dataSource!==e&&this._switchDataSource(e)}constructor(){this._differs=S(ah),this._changeDetectorRef=S(Re),this._elementRef=S(Fe),this._dir=S(oi),this._onDestroy=new ce,this._levels=new Map,this._parents=new Map,this._ariaSets=new Map,this.viewChange=new yn({start:0,end:Number.MAX_VALUE}),this._flattenedNodes=new yn([]),this._nodeType=new yn(null),this._nodes=new yn(new Map),this._keyManagerNodes=new yn([]),this._keyManagerFactory=S(nB),this._viewInit=!1}ngAfterContentInit(){this._initializeKeyManager()}ngAfterContentChecked(){this._updateDefaultNodeDefinition(),this._subscribeToDataChanges()}ngOnDestroy(){this._nodeOutlet.viewContainer.clear(),this.viewChange.complete(),this._onDestroy.next(),this._onDestroy.complete(),this._dataSource&&typeof this._dataSource.disconnect=="function"&&this.dataSource.disconnect(this),this._dataSubscription&&(this._dataSubscription.unsubscribe(),this._dataSubscription=null),this._keyManager?.destroy()}ngOnInit(){this._checkTreeControlUsage(),this._initializeDataDiffer()}ngAfterViewInit(){this._viewInit=!0}_updateDefaultNodeDefinition(){let e=this._nodeDefs.filter(n=>!n.when);e.length>1,this._defaultNodeDef=e[0]}_setNodeTypeIfUnset(e){this._nodeType.value===null&&this._nodeType.next(e)}_switchDataSource(e){this._dataSource&&typeof this._dataSource.disconnect=="function"&&this.dataSource.disconnect(this),this._dataSubscription&&(this._dataSubscription.unsubscribe(),this._dataSubscription=null),e||this._nodeOutlet.viewContainer.clear(),this._dataSource=e,this._nodeDefs&&this._subscribeToDataChanges()}_getExpansionModel(){return this.treeControl?this.treeControl.expansionModel:(this._expansionModel??=new xu(!0),this._expansionModel)}_subscribeToDataChanges(){if(this._dataSubscription)return;let e;mG(this._dataSource)?e=this._dataSource.connect(this):cs(this._dataSource)?e=this._dataSource:Array.isArray(this._dataSource)&&(e=ke(this._dataSource)),e&&(this._dataSubscription=this._getRenderData(e).pipe(Ke(this._onDestroy)).subscribe(n=>{this._renderDataChanges(n)}))}_getRenderData(e){let n=this._getExpansionModel();return ji([e,this._nodeType,n.changed.pipe(ni(null),gn(r=>{this._emitExpansionChanges(r)}))]).pipe(Tn(([r,o])=>o===null?ke({renderNodes:r,flattenedNodes:null,nodeType:o}):this._computeRenderingData(r,o).pipe(We(s=>at(X({},s),{nodeType:o})))))}_renderDataChanges(e){if(e.nodeType===null){this.renderNodeChanges(e.renderNodes);return}this._updateCachedData(e.flattenedNodes),this.renderNodeChanges(e.renderNodes),this._updateKeyManagerItems(e.flattenedNodes)}_emitExpansionChanges(e){if(!e)return;let n=this._nodes.value;for(let r of e.added)n.get(r)?._emitExpansionState(!0);for(let r of e.removed)n.get(r)?._emitExpansionState(!1)}_initializeKeyManager(){let e=ji([this._keyManagerNodes,this._nodes]).pipe(We(([r,o])=>r.reduce((s,a)=>{let l=o.get(this._getExpansionKey(a));return l&&s.push(l),s},[]))),n={trackBy:r=>this._getExpansionKey(r.data),skipPredicate:r=>!!r.isDisabled,typeAheadDebounceInterval:!0,horizontalOrientation:this._dir.value};this._keyManager=this._keyManagerFactory(e,n)}_initializeDataDiffer(){let e=this.trackBy??((n,r)=>this._getExpansionKey(r));this._dataDiffer=this._differs.find([]).create(e)}_checkTreeControlUsage(){}renderNodeChanges(e,n=this._dataDiffer,r=this._nodeOutlet.viewContainer,o){let s=n.diff(e);!s&&!this._viewInit||(s?.forEachOperation((a,l,c)=>{if(a.previousIndex==null)this.insertNode(e[c],c,r,o);else if(c==null)r.remove(l);else{let d=r.get(l);r.move(d,c)}}),s?.forEachIdentityChange(a=>{let l=a.item;if(a.currentIndex!=null){let c=r.get(a.currentIndex);c.context.$implicit=l}}),o?this._changeDetectorRef.markForCheck():this._changeDetectorRef.detectChanges())}_getNodeDef(e,n){if(this._nodeDefs.length===1)return this._nodeDefs.first;let r=this._nodeDefs.find(o=>o.when&&o.when(n,e))||this._defaultNodeDef;return r}insertNode(e,n,r,o){let s=this._getLevelAccessor(),a=this._getNodeDef(e,n),l=this._getExpansionKey(e),c=new FP(e);o??=this._parents.get(l)??void 0,s?c.level=s(e):o!==void 0&&this._levels.has(this._getExpansionKey(o))?c.level=this._levels.get(this._getExpansionKey(o))+1:c.level=0,this._levels.set(l,c.level),(r||this._nodeOutlet.viewContainer).createEmbeddedView(a.template,c,n),Su.mostRecentTreeNode&&(Su.mostRecentTreeNode.data=e)}isExpanded(e){return!!(this.treeControl?.isExpanded(e)||this._expansionModel?.isSelected(this._getExpansionKey(e)))}toggle(e){this.treeControl?this.treeControl.toggle(e):this._expansionModel&&this._expansionModel.toggle(this._getExpansionKey(e))}expand(e){this.treeControl?this.treeControl.expand(e):this._expansionModel&&this._expansionModel.select(this._getExpansionKey(e))}collapse(e){this.treeControl?this.treeControl.collapse(e):this._expansionModel&&this._expansionModel.deselect(this._getExpansionKey(e))}toggleDescendants(e){this.treeControl?this.treeControl.toggleDescendants(e):this._expansionModel&&(this.isExpanded(e)?this.collapseDescendants(e):this.expandDescendants(e))}expandDescendants(e){if(this.treeControl)this.treeControl.expandDescendants(e);else if(this._expansionModel){let n=this._expansionModel;n.select(this._getExpansionKey(e)),this._getDescendants(e).pipe(tn(1),Ke(this._onDestroy)).subscribe(r=>{n.select(...r.map(o=>this._getExpansionKey(o)))})}}collapseDescendants(e){if(this.treeControl)this.treeControl.collapseDescendants(e);else if(this._expansionModel){let n=this._expansionModel;n.deselect(this._getExpansionKey(e)),this._getDescendants(e).pipe(tn(1),Ke(this._onDestroy)).subscribe(r=>{n.deselect(...r.map(o=>this._getExpansionKey(o)))})}}expandAll(){this.treeControl?this.treeControl.expandAll():this._expansionModel&&this._expansionModel.select(...this._flattenedNodes.value.map(n=>this._getExpansionKey(n)))}collapseAll(){this.treeControl?this.treeControl.collapseAll():this._expansionModel&&this._expansionModel.deselect(...this._flattenedNodes.value.map(n=>this._getExpansionKey(n)))}_getLevelAccessor(){return this.treeControl?.getLevel?.bind(this.treeControl)??this.levelAccessor}_getChildrenAccessor(){return this.treeControl?.getChildren?.bind(this.treeControl)??this.childrenAccessor}_getDirectChildren(e){let n=this._getLevelAccessor(),r=this._expansionModel??this.treeControl?.expansionModel;if(!r)return ke([]);let o=this._getExpansionKey(e),s=r.changed.pipe(Tn(l=>l.added.includes(o)?ke(!0):l.removed.includes(o)?ke(!1):Ji),ni(this.isExpanded(e)));if(n)return ji([s,this._flattenedNodes]).pipe(We(([l,c])=>l?this._findChildrenByLevel(n,c,e,1):[]));let a=this._getChildrenAccessor();if(a)return bd(a(e)??[]);throw UG()}_findChildrenByLevel(e,n,r,o){let s=this._getExpansionKey(r),a=n.findIndex(u=>this._getExpansionKey(u)===s),l=e(r),c=l+o,d=[];for(let u=a+1;uthis._getExpansionKey(o)===r)+1}_getNodeParent(e){let n=this._parents.get(this._getExpansionKey(e.data));return n&&this._nodes.value.get(this._getExpansionKey(n))}_getNodeChildren(e){return this._getDirectChildren(e.data).pipe(We(n=>n.reduce((r,o)=>{let s=this._nodes.value.get(this._getExpansionKey(o));return s&&r.push(s),r},[])))}_sendKeydownToKeyManager(e){if(e.target===this._elementRef.nativeElement)this._keyManager.onKeydown(e);else{let n=this._nodes.getValue();for(let[,r]of n)if(e.target===r._elementRef.nativeElement){this._keyManager.onKeydown(e);break}}}_getDescendants(e){if(this.treeControl)return ke(this.treeControl.getDescendants(e));if(this.levelAccessor){let n=this._findChildrenByLevel(this.levelAccessor,this._flattenedNodes.value,e,1/0);return ke(n)}if(this.childrenAccessor)return this._getAllChildrenRecursively(e).pipe($v((n,r)=>(n.push(...r),n),[]));throw UG()}_getAllChildrenRecursively(e){return this.childrenAccessor?bd(this.childrenAccessor(e)).pipe(tn(1),Tn(n=>{for(let r of n)this._parents.set(this._getExpansionKey(r),e);return ke(...n).pipe(ds(r=>ho(ke([r]),this._getAllChildrenRecursively(r))))})):ke([])}_getExpansionKey(e){return this.expansionKey?.(e)??e}_getAriaSet(e){let n=this._getExpansionKey(e),r=this._parents.get(n),o=r?this._getExpansionKey(r):null;return this._ariaSets.get(o)??[e]}_findParentForNode(e,n,r){if(!r.length)return null;let o=this._levels.get(this._getExpansionKey(e))??0;for(let s=n-1;s>=0;s--){let a=r[s];if((this._levels.get(this._getExpansionKey(a))??0){let s=this._getExpansionKey(o);this._parents.has(s)||this._parents.set(s,null),this._levels.set(s,n);let a=bd(r(o));return ho(ke([o]),a.pipe(tn(1),gn(l=>{this._ariaSets.set(s,[...l??[]]);for(let c of l??[]){let d=this._getExpansionKey(c);this._parents.set(d,o),this._levels.set(d,n+1)}}),Tn(l=>l?this._flattenNestedNodesWithExpansion(l,n+1).pipe(We(c=>this.isExpanded(o)?c:[])):ke([]))))}),$v((o,s)=>(o.push(...s),o),[])):ke([...e])}_computeRenderingData(e,n){if(this.childrenAccessor&&n==="flat")return this._ariaSets.set(null,[...e]),this._flattenNestedNodesWithExpansion(e).pipe(We(r=>({renderNodes:r,flattenedNodes:r})));if(this.levelAccessor&&n==="nested"){let r=this.levelAccessor;return ke(e.filter(o=>r(o)===0)).pipe(We(o=>({renderNodes:o,flattenedNodes:e})),gn(({flattenedNodes:o})=>{this._calculateParents(o)}))}else return n==="flat"?ke({renderNodes:e,flattenedNodes:e}).pipe(gn(({flattenedNodes:r})=>{this._calculateParents(r)})):(this._ariaSets.set(null,[...e]),this._flattenNestedNodesWithExpansion(e).pipe(We(r=>({renderNodes:e,flattenedNodes:r}))))}_updateCachedData(e){this._flattenedNodes.next(e)}_updateKeyManagerItems(e){this._keyManagerNodes.next(e)}_calculateParents(e){let n=this._getLevelAccessor();if(n){this._parents.clear(),this._ariaSets.clear();for(let r=0;r{class i{get role(){return"treeitem"}set role(e){}get isExpandable(){return this._isExpandable()}set isExpandable(e){this._inputIsExpandable=e,!(this.data&&!this._isExpandable||!this._inputIsExpandable)&&(this._inputIsExpanded?this.expand():this._inputIsExpanded===!1&&this.collapse())}get isExpanded(){return this._tree.isExpanded(this._data)}set isExpanded(e){this._inputIsExpanded=e,e?this.expand():this.collapse()}getLabel(){return this.typeaheadLabel||this._elementRef.nativeElement.textContent?.trim()||""}static{this.mostRecentTreeNode=null}get data(){return this._data}set data(e){e!==this._data&&(this._data=e,this._dataChanges.next())}get isLeafNode(){return this._tree.treeControl?.isExpandable!==void 0&&!this._tree.treeControl.isExpandable(this._data)?!0:this._tree.treeControl?.isExpandable===void 0&&this._tree.treeControl?.getDescendants(this._data).length===0}get level(){return this._tree._getLevel(this._data)??this._parentNodeAriaLevel}_isExpandable(){return this._tree.treeControl?!this.isLeafNode:this._inputIsExpandable}_getAriaExpanded(){return this._isExpandable()?String(this.isExpanded):null}_getSetSize(){return this._tree._getSetSize(this._data)}_getPositionInSet(){return this._tree._getPositionInSet(this._data)}constructor(){this._elementRef=S(Fe),this._tree=S(sf),this._tabindex=-1,this.activation=new Ie,this.expandedChange=new Ie,this._destroyed=new ce,this._dataChanges=new ce,this._inputIsExpandable=!1,this._inputIsExpanded=void 0,this._shouldFocus=!0,this._changeDetectorRef=S(Re),i.mostRecentTreeNode=this}ngOnInit(){this._parentNodeAriaLevel=mue(this._elementRef.nativeElement),this._tree._getExpansionModel().changed.pipe(We(()=>this.isExpanded),bl()).subscribe(()=>{this._changeDetectorRef.markForCheck()}),this._tree._setNodeTypeIfUnset("flat"),this._tree._registerNode(this)}ngOnDestroy(){i.mostRecentTreeNode===this&&(i.mostRecentTreeNode=null),this._dataChanges.complete(),this._destroyed.next(),this._destroyed.complete()}getParent(){return this._tree._getNodeParent(this)??null}getChildren(){return this._tree._getNodeChildren(this)}focus(){this._tabindex=0,this._shouldFocus&&this._elementRef.nativeElement.focus(),this._changeDetectorRef.markForCheck()}unfocus(){this._tabindex=-1,this._changeDetectorRef.markForCheck()}activate(){this.isDisabled||this.activation.next(this._data)}collapse(){this.isExpandable&&this._tree.collapse(this._data)}expand(){this.isExpandable&&this._tree.expand(this._data)}makeFocusable(){this._tabindex=0,this._changeDetectorRef.markForCheck()}_focusItem(){this.isDisabled||this._tree._keyManager.focusItem(this)}_setActiveItem(){this.isDisabled||(this._shouldFocus=!1,this._tree._keyManager.focusItem(this),this._shouldFocus=!0)}_emitExpansionState(e){this.expandedChange.emit(e)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["cdk-tree-node"]],hostAttrs:["role","treeitem",1,"cdk-tree-node"],hostVars:5,hostBindings:function(n,r){n&1&&H("click",function(){return r._setActiveItem()})("focus",function(){return r._focusItem()}),n&2&&(Cr("tabindex",r._tabindex),qe("aria-expanded",r._getAriaExpanded())("aria-level",r.level+1)("aria-posinset",r._getPositionInSet())("aria-setsize",r._getSetSize()))},inputs:{role:"role",isExpandable:[2,"isExpandable","isExpandable",Ye],isExpanded:"isExpanded",isDisabled:[2,"isDisabled","isDisabled",Ye],typeaheadLabel:[0,"cdkTreeNodeTypeaheadLabel","typeaheadLabel"]},outputs:{activation:"activation",expandedChange:"expandedChange"},exportAs:["cdkTreeNode"],standalone:!0,features:[nn]})}}return i})();function mue(i){let t=i.parentElement;for(;t&&!gue(t);)t=t.parentElement;return t?t.classList.contains("cdk-nested-tree-node")?Jn(t.getAttribute("aria-level")):0:-1}function gue(i){let t=i.classList;return!!(t?.contains("cdk-nested-tree-node")||t?.contains("cdk-tree"))}var _ue=/([A-Za-z%]+)$/,VP=(()=>{class i{get level(){return this._level}set level(e){this._setLevelInput(e)}get indent(){return this._indent}set indent(e){this._setIndentInput(e)}constructor(){this._treeNode=S(Su),this._tree=S(sf),this._element=S(Fe),this._dir=S(oi,{optional:!0}),this._destroyed=new ce,this.indentUnits="px",this._indent=40,this._setPadding(),this._dir?.change.pipe(Ke(this._destroyed)).subscribe(()=>this._setPadding(!0)),this._treeNode._dataChanges.subscribe(()=>this._setPadding())}ngOnDestroy(){this._destroyed.next(),this._destroyed.complete()}_paddingIndent(){let e=(this._treeNode.data&&this._tree._getLevel(this._treeNode.data))??null,n=this._level==null?e:this._level;return typeof n=="number"?`${n*this._indent}${this.indentUnits}`:null}_setPadding(e=!1){let n=this._paddingIndent();if(n!==this._currentPadding||e){let r=this._element.nativeElement,o=this._dir&&this._dir.value==="rtl"?"paddingRight":"paddingLeft",s=o==="paddingLeft"?"paddingRight":"paddingLeft";r.style[o]=n||"",r.style[s]="",this._currentPadding=n}}_setLevelInput(e){this._level=isNaN(e)?null:e,this._setPadding()}_setIndentInput(e){let n=e,r="px";if(typeof e=="string"){let o=e.split(_ue);n=o[0],r=o[1]||r}this.indentUnits=r,this._indent=Jn(n),this._setPadding()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["","cdkTreeNodePadding",""]],inputs:{level:[2,"cdkTreeNodePadding","level",Jn],indent:[0,"cdkTreeNodePaddingIndent","indent"]},standalone:!0,features:[nn]})}}return i})(),zP=(()=>{class i{constructor(){this._tree=S(sf),this._treeNode=S(Su),this.recursive=!1}_toggle(){this.recursive?this._tree.toggleDescendants(this._treeNode.data):this._tree.toggle(this._treeNode.data),this._tree._keyManager.focusItem(this._treeNode)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["","cdkTreeNodeToggle",""]],hostAttrs:["tabindex","-1"],hostBindings:function(n,r){n&1&&H("click",function(s){return r._toggle(),s.stopPropagation()})("keydown.Enter",function(s){return r._toggle(),s.preventDefault()})("keydown.Space",function(s){return r._toggle(),s.preventDefault()})},inputs:{recursive:[2,"cdkTreeNodeToggleRecursive","recursive",Ye]},standalone:!0,features:[nn]})}}return i})();var HG=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({})}}return i})();function vue(i){return!!i._isNoopTreeKeyManager}var jG=(()=>{class i extends Su{get tabIndexInputBinding(){return this._tabIndexInputBinding}set tabIndexInputBinding(e){this._tabIndexInputBinding=e}_getTabindexAttribute(){return vue(this._tree._keyManager)?this.tabIndexInputBinding:this._tabindex}get disabled(){return this.isDisabled}set disabled(e){this.isDisabled=e}constructor(){super(),this.defaultTabIndex=0;let e=S(new zr("tabindex"),{optional:!0});this.tabIndexInputBinding=Number(e)||this.defaultTabIndex}ngOnInit(){super.ngOnInit()}ngOnDestroy(){super.ngOnDestroy()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["mat-tree-node"]],hostAttrs:[1,"mat-tree-node"],hostVars:5,hostBindings:function(n,r){n&1&&H("click",function(){return r._focusItem()}),n&2&&(Cr("tabindex",r._getTabindexAttribute()),qe("aria-expanded",r._getAriaExpanded())("aria-level",r.level+1)("aria-posinset",r._getPositionInSet())("aria-setsize",r._getSetSize()))},inputs:{tabIndexInputBinding:[2,"tabIndex","tabIndexInputBinding",e=>e==null?0:Jn(e)],disabled:[2,"disabled","disabled",Ye]},outputs:{activation:"activation",expandedChange:"expandedChange"},exportAs:["matTreeNode"],standalone:!0,features:[Bt([{provide:Su,useExisting:i}]),nn,sn]})}}return i})(),WG=(()=>{class i extends TC{static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Zn(i)))(r||i)}})()}static{this.\u0275dir=Ve({type:i,selectors:[["","matTreeNodeDef",""]],inputs:{when:[0,"matTreeNodeDefWhen","when"],data:[0,"matTreeNode","data"]},standalone:!0,features:[Bt([{provide:TC,useExisting:i}]),sn]})}}return i})();var $G=(()=>{class i extends VP{get level(){return this._level}set level(e){this._setLevelInput(e)}get indent(){return this._indent}set indent(e){this._setIndentInput(e)}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Zn(i)))(r||i)}})()}static{this.\u0275dir=Ve({type:i,selectors:[["","matTreeNodePadding",""]],inputs:{level:[2,"matTreeNodePadding","level",Jn],indent:[0,"matTreeNodePaddingIndent","indent"]},standalone:!0,features:[Bt([{provide:VP,useExisting:i}]),nn,sn]})}}return i})(),GG=(()=>{class i{constructor(){this.viewContainer=S(Kt),this._node=S(BP,{optional:!0})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["","matTreeNodeOutlet",""]],standalone:!0,features:[Bt([{provide:IC,useExisting:i}])]})}}return i})(),qG=(()=>{class i extends sf{constructor(){super(...arguments),this._nodeOutlet=void 0}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Zn(i)))(r||i)}})()}static{this.\u0275cmp=oe({type:i,selectors:[["mat-tree"]],viewQuery:function(n,r){if(n&1&&Me(GG,7),n&2){let o;_e(o=ve())&&(r._nodeOutlet=o.first)}},hostAttrs:[1,"mat-tree"],exportAs:["matTree"],standalone:!0,features:[Bt([{provide:sf,useExisting:i}]),sn,se],decls:1,vars:0,consts:[["matTreeNodeOutlet",""]],template:function(n,r){n&1&&nr(0,0)},dependencies:[GG],styles:[".mat-tree{display:block;background-color:var(--mat-tree-container-background-color, var(--mat-sys-surface))}.mat-tree-node,.mat-nested-tree-node{color:var(--mat-tree-node-text-color, var(--mat-sys-on-surface));font-family:var(--mat-tree-node-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-tree-node-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-tree-node-text-weight, var(--mat-sys-body-large-weight))}.mat-tree-node{display:flex;align-items:center;flex:1;word-wrap:break-word;min-height:var(--mat-tree-node-min-height, 48px)}.mat-nested-tree-node{border-bottom-width:0}"],encapsulation:2})}}return i})(),YG=(()=>{class i extends zP{static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Zn(i)))(r||i)}})()}static{this.\u0275dir=Ve({type:i,selectors:[["","matTreeNodeToggle",""]],inputs:{recursive:[0,"matTreeNodeToggleRecursive","recursive"]},standalone:!0,features:[Bt([{provide:zP,useExisting:i}]),sn]})}}return i})();var XG=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({imports:[HG,Ht,Ht]})}}return i})(),DC=class{constructor(t,e,n,r){this.transformFunction=t,this.getLevel=e,this.isExpandable=n,this.getChildren=r}_flattenNode(t,e,n,r){let o=this.transformFunction(t,e);if(n.push(o),this.isExpandable(o)){let s=this.getChildren(t);s&&(Array.isArray(s)?this._flattenChildren(s,e,n,r):s.pipe(tn(1)).subscribe(a=>{this._flattenChildren(a,e,n,r)}))}return n}_flattenChildren(t,e,n,r){t.forEach((o,s)=>{let a=r.slice();a.push(s!=t.length-1),this._flattenNode(o,e+1,n,a)})}flattenNodes(t){let e=[];return t.forEach(n=>this._flattenNode(n,0,e,[])),e}expandFlattenedNodes(t,e){let n=[],r=[];return r[0]=!0,t.forEach(o=>{let s=!0;for(let a=0;a<=this.getLevel(o);a++)s=s&&r[a];s&&n.push(o),this.isExpandable(o)&&(r[this.getLevel(o)+1]=e.isExpanded(o))}),n}},OC=class extends _C{get data(){return this._data.value}set data(t){this._data.next(t),this._flattenedData.next(this._treeFlattener.flattenNodes(this.data)),this._treeControl.dataNodes=this._flattenedData.value}constructor(t,e,n){super(),this._treeControl=t,this._treeFlattener=e,this._flattenedData=new yn([]),this._expandedData=new yn([]),this._data=new yn([]),n&&(this.data=n)}connect(t){return Xn(t.viewChange,this._treeControl.expansionModel.changed,this._flattenedData).pipe(We(()=>(this._expandedData.next(this._treeFlattener.expandFlattenedNodes(this._flattenedData.value,this._treeControl)),this._expandedData.value)))}disconnect(){}};var K_=200,QG=en({opacity:0}),ZG=en({opacity:1}),bue=`${K_}ms ${UT.DECELERATION_CURVE}`,xue=`${K_}ms ${UT.STANDARD_CURVE}`,KG={bubbleContainer:pi("bubbleContainer",[Ci("void, hidden",QG),Ci("visible",ZG),Fn("void => *, * => visible",Ln(bue,ZG)),Fn("* => void, * => hidden",Ln(xue,QG))])};function wue(i,t){i&1&&ee(0,"a",1)}var JG=(()=>{class i extends la{portalOutlet;animationState="hidden";changeDetector=S(Re);attachComponentPortal(e){return this.portalOutlet.attachComponentPortal(e)}attachTemplatePortal(e){return this.portalOutlet.attachTemplatePortal(e)}toggleAnimation(e){this.animationState=e?"visible":"hidden",this.changeDetector.markForCheck()}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Zn(i)))(r||i)}})();static \u0275cmp=oe({type:i,selectors:[["bubble-container"]],viewQuery:function(n,r){if(n&1&&Me(ns,7),n&2){let o;_e(o=ve())&&(r.portalOutlet=o.first)}},hostAttrs:["role","dialog",1,"bubble-container"],hostVars:1,hostBindings:function(n,r){n&2&&rm("@bubbleContainer",r.animationState)},standalone:!0,features:[sn,se],decls:2,vars:0,consts:[["cdkPortalOutlet",""],["cdkFocusInitial","","tabindex","0"]],template:function(n,r){n&1&&(v(0,"div"),W(1,wue,1,0,"ng-template",0),y())},dependencies:[Ds,ns],styles:[`.bubble-container{box-shadow:0 1px 2px #3c40434d,0 1px 3px 1px #3c404326;border-radius:8px;overflow:auto;background:#fff;color:#000000de;font-family:Google Sans Text,Arial,Helvetica,sans-serif;font-size:.875rem;font-weight:400;line-height:1.25rem;letter-spacing:normal} +/** + * @license + * Copyright 2024 The Model Explorer Authors. All Rights Reserved. + * + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + * ============================================================================== + */ +`],encapsulation:2,data:{animation:[KG.bubbleContainer]},changeDetection:0})}return i})();var Cue=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top",offsetY:8},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",offsetY:-8},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",offsetY:-8},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top",offsetY:8}],Sue={minWidth:220,maxWidth:420,minHeight:64,maxHeight:420},PC=(()=>{class i{ngZone;overlay;elementRef;viewContainerRef;document;focusTrapFactory;injector;overlayRef;portal;disabledInternal=!1;panelClassInternal;set dialog(e){e&&(e instanceof Qn?this.setPortal(new Jr(e,this.viewContainerRef)):this.setPortal(new Li(e,this.viewContainerRef)))}set disabled(e){this.disabledInternal=e,this.disabledInternal&&this.closeDialog()}get disabled(){return this.disabledInternal}overlaySize;overlayPositions;overlayDimensions=Sue;set panelClass(e){this.panelClassInternal!==e&&(this.panelClassInternal&&this.overlayRef?.removePanelClass(this.panelClassInternal),e&&this.overlayRef?.addPanelClass(e),this.panelClassInternal=e)}opened=new Ie;closed=new Ie;destroyed=new ya;openStatusChange=new yn(!1);openings=this.openStatusChange.pipe(qt(e=>e&&!this.disabled));bubbleContainerRef;focusTrap;elementFocusedBeforeDialogWasOpened=void 0;constructor(e,n,r,o,s,a,l){this.ngZone=e,this.overlay=n,this.elementRef=r,this.viewContainerRef=o,this.document=s,this.focusTrapFactory=a,this.injector=l,this.attachKeyboardCloseEventListeners(r.nativeElement)}ngOnInit(){}ngOnDestroy(){this.closeDialog(),this.openStatusChange.complete(),this.destroyed.next(),this.destroyed.complete(),this.overlayRef&&this.overlayRef.dispose()}setPortal(e){this.portal=e}openDialog(){if(this.disabled||this.overlayRef?.hasAttached())return;let e=this.portal;e!=null&&this.ngZone.run(()=>{this.bubbleContainerRef=this.createAndAttachBubbleContainer(),this.bubbleContainerRef.instance.attach(e);let n=this.bubbleContainerRef.location.nativeElement;this.attachMouseEventListeners(n),this.attachKeyboardCloseEventListeners(n),this.trapFocus(n),this.bubbleContainerRef.instance.toggleAnimation(!0),this.opened.observers.length&&setTimeout(()=>{this.opened.emit()},K_)})}closeDialog(){this.overlayRef?.hasAttached()&&(this.bubbleContainerRef.instance.toggleAnimation(!1),setTimeout(()=>{this.ngZone.run(()=>{this.overlayRef&&this.overlayRef.detach(),this.cleanupFocusTrap(),this.restoreFocus(),this.cleanupBubbleContainer(),this.closed.emit()})},K_))}trapFocus(e){let n=this.document.activeElement,r=this.elementRef.nativeElement;n&&n===r&&(this.document&&(this.elementFocusedBeforeDialogWasOpened=this.document.activeElement),this.focusTrap=this.focusTrapFactory.create(e),this.focusTrap.attachAnchors())}focusInitialElement(){this.focusTrap&&this.focusTrap.focusInitialElementWhenReady()}cleanupFocusTrap(){this.focusTrap&&(this.focusTrap.destroy(),this.focusTrap=void 0)}restoreFocus(){let e=this.elementFocusedBeforeDialogWasOpened;if(!e||typeof e.focus!="function")return;let n=this.bubbleContainerRef?.location.nativeElement,r=this.document.activeElement;!r||!n?.contains(r)||(e.focus(),this.elementFocusedBeforeDialogWasOpened=void 0)}cleanupBubbleContainer(){this.bubbleContainerRef&&(this.bubbleContainerRef.destroy(),this.bubbleContainerRef=void 0)}createPositionStrategy(e){return this.overlay.position().flexibleConnectedTo(this.elementRef).withPositions(e).setOrigin(this.elementRef)}createScrollStrategy(){return this.overlay.scrollStrategies.close()}createAndAttachBubbleContainer(){let e=pt.create({parent:this.injector,providers:[]}),n=new Li(JG,null,e);return this.overlayRef==null&&(this.overlayRef=this.overlay.create(this.createOverlayConfig(Cue))),this.overlaySize&&this.overlayRef.updateSize(this.overlaySize),this.overlayPositions&&this.overlayPositions.length>0&&this.overlayRef.updatePositionStrategy(this.createPositionStrategy(this.overlayPositions)),this.overlayRef.attach(n)}static \u0275fac=function(n){return new(n||i)(q(Ue),q(on),q(Fe),q(Kt),q(Document),q(Fh),q(pt))};static \u0275dir=Ve({type:i,inputs:{overlaySize:"overlaySize",overlayPositions:"overlayPositions",overlayDimensions:"overlayDimensions",panelClass:"panelClass"},outputs:{opened:"opened",closed:"closed"},standalone:!0})}return i})();var Mue=500,Nn=(()=>{class i extends PC{hoverDelayMs=Mue;activity=new ce;constructor(e,n,r,o,s,a,l){super(e,n,r,o,s,a,l),this.attachMouseEventListeners(r.nativeElement)}ngOnInit(){super.ngOnInit(),this.listenForOpenEvents(this.hoverDelayMs)}listenForOpenEvents(e){this.openStatusChange.pipe(Rf(()=>this.activity.pipe(Lo(e)))).pipe(Ke(this.destroyed)).subscribe(r=>{r?this.openDialog():this.closeDialog()})}attachMouseEventListeners(e){this.ngZone.runOutsideAngular(()=>{wn(e,"mouseenter").pipe(Ke(this.destroyed)).subscribe(()=>{this.openingDialog()}),wn(e,"click").pipe(Ke(this.destroyed)).subscribe(n=>{n.target.closest("[bubbleClose]")?this.closingDialog():(this.openingDialog(),this.openDialog())}),wn(e,"mouseleave").pipe(Ke(this.destroyed)).subscribe(()=>{this.closingDialog()}),wn(e,"mousemove").pipe(Ke(this.destroyed)).subscribe(()=>{this.activity.next()})})}attachKeyboardCloseEventListeners(e){this.ngZone.runOutsideAngular(()=>{wn(e,"keydown").pipe(Ke(this.destroyed)).subscribe(n=>{switch(n.keyCode){case 27:this.overlayRef?.hasAttached()&&n.stopPropagation(),this.closeDialog();return;default:return}})})}openingDialog(){this.disabled||(this.openStatusChange.next(!0),this.activity.next())}closingDialog(){this.openStatusChange.next(!1),this.activity.next()}createOverlayConfig(e){return new bi(at(X({},this.overlayDimensions),{positionStrategy:super.createPositionStrategy(e),scrollStrategy:this.createScrollStrategy(),panelClass:this.panelClassInternal}))}static \u0275fac=function(n){return new(n||i)(q(Ue),q(on),q(Fe),q(Kt),q(ft),q(Fh),q(pt))};static \u0275dir=Ve({type:i,selectors:[["","bubble",""]],hostAttrs:[1,"bubble"],inputs:{dialog:[0,"bubble","dialog"],disabled:[0,"bubbleDisabled","disabled"],hoverDelayMs:"hoverDelayMs"},exportAs:["bubble"],standalone:!0,features:[sn]})}return i})();var RC=[pi("transformPanel",[Ci("void",en({opacity:0,transform:"scale(1, 0.8)"})),Fn("void => showing",Ln("120ms cubic-bezier(0, 0, 0.2, 1)",en({opacity:1,transform:"scale(1, 1)"}))),Fn("* => void",Ln("100ms linear",en({opacity:0})))])];var Eue=["tree"],t5=i=>({node:i});function Iue(i,t){if(i&1&&M(0),i&2){let e=I().$implicit;hI(" ",e.boldLabel," (",e.label,") ")}}function Tue(i,t){if(i&1&&M(0),i&2){let e=I().$implicit;we(" ",e.label," ")}}function Due(i,t){i&1&&nr(0)}function Oue(i,t){if(i&1&&W(0,Due,1,0,"ng-container",14),i&2){let e=I().$implicit;I();let n=fe(5);R("ngTemplateOutlet",n)("ngTemplateOutletContext",Pl(2,t5,e))}}function Pue(i,t){if(i&1&&(v(0,"tr")(1,"td",17)(2,"mat-icon",18),M(3,"circle"),y(),M(4),y(),v(5,"td",19),M(6),y()()),i&2){let e=t.$implicit,n=I(2).$implicit,r=I();ne("search-match",r.isSearchMatched(n.metadata[e])),w(4),we(" ",e,""),w(2),lt(n.metadata[e])}}function Rue(i,t){if(i&1&&(v(0,"table",15),W(1,Pue,7,4,"tr",16),y()),i&2){let e=I().$implicit,n=I();w(),R("ngForOf",n.getSortedMetadataKeys(e))}}function Aue(i,t){if(i&1&&(v(0,"div",20)(1,"mat-icon",21),M(2,"my_location"),y()()),i&2){let e=I(2);R("matTooltip",e.locatorTooltip)("matTooltipPosition",e.tooltipPosition)}}function Nue(i,t){if(i&1&&(v(0,"div",23),M(1),y()),i&2){let e=I(3);w(),we(" Showing at most ",e.getMaxConstValueCount()," elements ")}}function kue(i,t){if(i&1&&(v(0,"div",22),W(1,Nue,2,1,"div",23),v(2,"div",24),M(3),y()()),i&2){let e=I().$implicit,n=I();w(),re(n.getMaxConstValueCount()!==0?1:-1),w(2),lt(n.getConstValues(e))}}function Lue(i,t){if(i&1){let e=te();v(0,"mat-tree-node",6)(1,"div",7),H("click",function(r){let o=B(e).$implicit,s=I();return V(s.handleLocateNode(o,r.altKey))}),v(2,"div",8)(3,"div",9)(4,"div",10)(5,"span",11),W(6,Iue,1,2)(7,Tue,1,1),y(),W(8,Oue,1,4,"ng-container"),y()(),W(9,Rue,2,1,"table",12),y(),W(10,Aue,3,2,"div",13),y(),W(11,kue,4,2,"ng-template",null,2,Mt),y()}if(i&2){let e=t.$implicit,n=fe(12),r=I();ne("has-locator",e.showLocator)("has-values",r.showHoverForValuesLabel(e))("highlight",e.highlight)("has-metadata",r.hasMetadata(e)),R("bubble",n)("overlaySize",r.constValuesPopupSize)("overlayPositions",r.constValuesPopupPosition)("hoverDelayMs",50)("bubbleDisabled",!r.showHoverForValuesLabel(e))("matTreeNodePaddingIndent",r.treeItemPadding),qe("data-id",e.nodeId),w(2),ne("has-extra-data",e.extraData!=null),w(3),ne("color-bold",r.colorBoldNodeLabel)("search-match",r.isSearchMatched(e.label,e.boldLabel)),w(),re(e.boldLabel?6:7),w(2),re(e.extraData?8:-1),w(),R("ngIf",r.hasMetadata(e)),w(),R("ngIf",e.showLocator&&r.showLocator)}}function Fue(i,t){i&1&&nr(0)}function Bue(i,t){if(i&1&&W(0,Fue,1,0,"ng-container",14),i&2){let e=I().$implicit;I();let n=fe(5);R("ngTemplateOutlet",n)("ngTemplateOutletContext",Pl(2,t5,e))}}function Vue(i,t){if(i&1&&(v(0,"div",20)(1,"mat-icon",21),M(2,"my_location"),y()()),i&2){let e=I(2);R("matTooltip",e.locatorTooltip)("matTooltipPosition",e.tooltipPosition)}}function zue(i,t){if(i&1){let e=te();v(0,"mat-tree-node",25)(1,"div",26),H("click",function(r){let o=B(e).$implicit,s=I();return V(s.handleLocateNode(o,r.altKey))}),v(2,"div",9)(3,"button",27)(4,"mat-icon",28),M(5),y()(),v(6,"div",10),M(7),W(8,Bue,1,4,"ng-container"),y()(),W(9,Vue,3,2,"div",13),y()()}if(i&2){let e=t.$implicit,n=I();ne("has-locator",e.showLocator),R("matTreeNodePaddingIndent",n.treeItemPadding),qe("data-id",e.nodeId),w(),ne("highlight",e.highlightGroupLabel),w(),ne("has-extra-data",e.extraData!=null),w(),qe("aria-label","Toggle "+e.label),w(2),we(" ",n.treeControl.isExpanded(e)?"keyboard_arrow_down":"chevron_right"," "),w(2),we(" ",e.label," "),w(),re(e.extraData?8:-1),w(),R("ngIf",e.showLocator&&n.showLocator)}}function Uue(i,t){if(i&1&&(v(0,"div",30)(1,"mat-icon"),M(2),y()()),i&2){let e=t.$implicit,n=I(2);R("matTooltip",n.getExtraLabelTooltip(e)),w(2),lt(e)}}function Hue(i,t){if(i&1&&(v(0,"div",29),Xt(1,Uue,3,2,"div",30,wr),y()),i&2){let e=t.node;w(),Qt(e.extraData.matchTypes)}}var xc=(()=>{class i{appService;changeDetectorRef;data;solidBackground=!1;rendererId="";tooltipPosition="left";showLocator=!0;colorBoldNodeLabel=!1;onClose=new Ie;tree;constValuesPopupSize={minWidth:100};constValuesPopupPosition=[{originX:"start",originY:"top",overlayX:"end",overlayY:"top"}];locatorTooltip=`Click: locate +Alt+click: select`;transformer=(e,n)=>({nodeId:e.nodeId,node:e.node,expandable:!!e.children&&e.children.length>0,label:e.label,boldLabel:e.boldLabel,level:n,showLocator:e.showLocator,highlight:e.highlight,metadata:e.metadata,extraData:e.extraData});curSearchMatches=[];treeItemPadding=8;treeControl=new EC(e=>e.level,e=>e.expandable);treeFlattener=new DC(this.transformer,e=>e.level,e=>e.expandable,e=>e.children);dataSource=new OC(this.treeControl,this.treeFlattener);constructor(e,n){this.appService=e,this.changeDetectorRef=n}ngOnChanges(e){this.data!=null&&(this.dataSource.data=this.data,this.treeControl.expandAll())}updateData(e){this.data=e,this.dataSource.data=this.data,this.treeControl.expandAll(),this.changeDetectorRef.markForCheck()}updateSearchResults(e){this.curSearchMatches=e,this.changeDetectorRef.markForCheck()}handleLocateNode(e,n){e.showLocator&&(this.appService.curToLocateNodeInfo.set({nodeId:e.nodeId||"",rendererId:this.rendererId,isGroupNode:e.expandable,select:n}),this.onClose.emit({}))}hasChild(e,n){return n.expandable}hasMetadata(e){return e.metadata!=null&&Object.keys(e.metadata).length>0}getSortedMetadataKeys(e){return Object.keys(e.metadata||{}).filter(n=>!n.startsWith("__")).sort()}showHoverForValuesLabel(e){let n=e.node;if(!n)return!1;if(Et(n)){let r=n.attrs||{};if(r[La])return r[La]!=="DATA_ELIDED"}return!1}getMaxConstValueCount(){return this.appService.config()?.maxConstValueCount??0}getConstValues(e){let n=e.node;return n&&Et(n)?(n.attrs||{})[La]||"":""}getExtraLabelTooltip(e){switch(e){case xt.NODE_LABEL:return"Node label matched";case xt.ATTRIBUTE:return"Node attribute(s) matched";case xt.INPUT_METADATA:return"Input(s) matched";case xt.OUTPUT_METADATA:return"Output(s) matched";default:return""}}isSearchMatched(e,n){return this.curSearchMatches?this.curSearchMatches.find(r=>r.matchedText===e||r.matchedText===n)!=null:!1}static \u0275fac=function(n){return new(n||i)(q(nt),q(Re))};static \u0275cmp=oe({type:i,selectors:[["io-tree"]],viewQuery:function(n,r){if(n&1&&Me(Eue,5),n&2){let o;_e(o=ve())&&(r.tree=o.first)}},inputs:{data:"data",solidBackground:"solidBackground",rendererId:"rendererId",tooltipPosition:"tooltipPosition",showLocator:"showLocator",colorBoldNodeLabel:"colorBoldNodeLabel"},outputs:{onClose:"onClose"},standalone:!0,features:[un,se],decls:6,vars:7,consts:[["tree",""],["matchTypes",""],["constValuesPopup",""],[1,"io-tree",3,"dataSource","treeControl"],["class","leaf","matTreeNodePadding","",3,"has-locator","has-values","highlight","has-metadata","bubble","overlaySize","overlayPositions","hoverDelayMs","bubbleDisabled","matTreeNodePaddingIndent",4,"matTreeNodeDef"],["matTreeNodePadding","",3,"has-locator","matTreeNodePaddingIndent",4,"matTreeNodeDef","matTreeNodeDefWhen"],["matTreeNodePadding","",1,"leaf",3,"bubble","overlaySize","overlayPositions","hoverDelayMs","bubbleDisabled","matTreeNodePaddingIndent"],[1,"edge-node",3,"click"],[1,"label-and-metadata"],[1,"label-container"],[1,"label"],[1,"node-label"],["class","metadata-table",4,"ngIf"],["class","locator-container","matTooltipClass","multiline-tooltip-left",3,"matTooltip","matTooltipPosition",4,"ngIf"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"metadata-table"],[3,"search-match",4,"ngFor","ngForOf"],[1,"key"],[1,"bullet"],[1,"value"],["matTooltipClass","multiline-tooltip-left",1,"locator-container",3,"matTooltip","matTooltipPosition"],[1,"locator-icon"],[1,"model-explorer-const-values-popup"],[1,"values-count-msg"],[1,"content"],["matTreeNodePadding","",3,"matTreeNodePaddingIndent"],[1,"expandable-tree-node",3,"click"],["mat-icon-button","","matTreeNodeToggle","",1,"expand-icon-button"],[1,"expander"],[1,"match-types-container"],[1,"extra-label-container",3,"matTooltip"]],template:function(n,r){n&1&&(v(0,"mat-tree",3,0),W(2,Lue,13,25,"mat-tree-node",4)(3,zue,10,13,"mat-tree-node",5),y(),W(4,Hue,3,0,"ng-template",null,1,Mt)),n&2&&(ne("solid-background",r.solidBackground),R("dataSource",r.dataSource)("treeControl",r.treeControl)("@transformPanel","showing")("@.disabled",!r.solidBackground),w(3),R("matTreeNodeDefWhen",r.hasChild))},dependencies:[Nn,Oe,Oi,On,Gs,vn,qo,Je,dt,$t,qn,XG,WG,$G,YG,qG,jG],styles:[`.io-tree[_ngcontent-%COMP%]{background-color:transparent;padding-top:4px}.io-tree.solid-background[_ngcontent-%COMP%]{transform-origin:top center;background-color:#fff;border:1px solid #ccc;border-radius:4px;padding-bottom:8px;min-width:270px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.io-tree[_ngcontent-%COMP%] mat-tree-node.has-locator[_ngcontent-%COMP%], .io-tree[_ngcontent-%COMP%] mat-tree-node.has-values[_ngcontent-%COMP%]{cursor:pointer}.io-tree[_ngcontent-%COMP%] mat-tree-node.has-locator[_ngcontent-%COMP%]:hover, .io-tree[_ngcontent-%COMP%] mat-tree-node.has-values[_ngcontent-%COMP%]:hover{background-color:#f3f3f3}.io-tree[_ngcontent-%COMP%] mat-tree-node.highlight[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:#00639b;font-weight:500}.io-tree[_ngcontent-%COMP%] mat-tree-node[_ngcontent-%COMP%]:not(:last-child).has-metadata.leaf{margin-bottom:6px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%]{display:flex;align-items:flex-start;justify-content:space-between;width:100%;box-sizing:border-box;padding-right:12px;padding-left:27px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%]:hover .locator-container[_ngcontent-%COMP%]{opacity:.8}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata.has-extra-data[_ngcontent-%COMP%]{width:100%}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata.has-extra-data[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{width:100%;justify-content:space-between}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%], .io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%] .node-label.color-bold[_ngcontent-%COMP%]{color:#00639b;font-weight:500}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%] .node-label.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .hover-for-values-label[_ngcontent-%COMP%]{text-decoration:underline;text-decoration-style:dotted;color:#999;margin-left:8px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%]{border-spacing:0;border-collapse:collapse;padding:0;font-size:11px;margin-top:2px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{vertical-align:text-top}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] mat-icon.bullet[_ngcontent-%COMP%]{font-size:4px;width:5px;height:5px;color:#bbb;margin-right:2px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.key[_ngcontent-%COMP%]{color:#999;padding-right:4px;white-space:nowrap;line-height:12px}.io-tree[_ngcontent-%COMP%] .edge-node[_ngcontent-%COMP%] .label-and-metadata[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.value[_ngcontent-%COMP%]{line-height:12px}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%], .io-tree[_ngcontent-%COMP%] mat-tree-node[_ngcontent-%COMP%]{font-size:13px;min-height:22px;word-break:break-word}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%]{color:#999;display:flex;align-items:center;justify-content:space-between;width:100%;box-sizing:border-box;padding-right:12px;padding-left:4px}.io-tree[_ngcontent-%COMP%] .expandable-tree-node.highlight[_ngcontent-%COMP%]{color:#000000de}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%]:hover .locator-container[_ngcontent-%COMP%]{opacity:.8}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%] mat-icon.expander[_ngcontent-%COMP%]{color:#999}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%]{display:flex;align-items:center}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%] .label-container.has-extra-data[_ngcontent-%COMP%]{width:100%}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%] .label-container.has-extra-data[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{flex-grow:1;justify-content:space-between}.io-tree[_ngcontent-%COMP%] .expandable-tree-node[_ngcontent-%COMP%] .label-container[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{display:flex;align-items:center}.io-tree[_ngcontent-%COMP%] .expand-icon-button[_ngcontent-%COMP%]{padding:0;width:24px;height:24px;display:flex;align-items:center;justify-content:center}.io-tree[_ngcontent-%COMP%] .expand-icon-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;margin-top:6px}.io-tree[_ngcontent-%COMP%] .locator-container[_ngcontent-%COMP%]{height:18px;opacity:.5;cursor:pointer;display:flex;align-items:center}.io-tree[_ngcontent-%COMP%] .locator-container[_ngcontent-%COMP%] mat-icon.locator-icon[_ngcontent-%COMP%]{color:#333;font-size:16px;width:16px;height:16px}.io-tree[_ngcontent-%COMP%] .locator-container[_ngcontent-%COMP%]:hover{opacity:.8}.io-tree[_ngcontent-%COMP%] .match-types-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-self:center;gap:2px;margin-left:8px}.io-tree[_ngcontent-%COMP%] .extra-label-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-self:center;padding:4px;border-radius:99px;background-color:#e8f0fe;box-sizing:border-box}.io-tree[_ngcontent-%COMP%] .extra-label-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:12px;width:12px;height:12px;color:#9da3a9}.io-tree[_ngcontent-%COMP%] .mat-mdc-button-touch-target{width:24px;height:24px}.io-tree-invisible[_ngcontent-%COMP%]{display:none}.io-tree[_ngcontent-%COMP%] ul[_ngcontent-%COMP%], .io-tree[_ngcontent-%COMP%] li[_ngcontent-%COMP%]{margin-top:0;margin-bottom:0;list-style-type:none}.io-tree[_ngcontent-%COMP%] .mat-nested-tree-node[_ngcontent-%COMP%] div[role=group][_ngcontent-%COMP%]{padding-left:8px}.io-tree[_ngcontent-%COMP%] div[role=group][_ngcontent-%COMP%] > .mat-tree-node[_ngcontent-%COMP%]{padding-left:16px} bubble-container:has(.model-explorer-const-values-popup){width:100%} .model-explorer-const-values-popup{padding:8px;font-size:11px;line-height:12px;background-color:#fff} .model-explorer-const-values-popup .values-count-msg{margin-bottom:8px;color:#999} .model-explorer-const-values-popup .content{white-space:pre-wrap;font-family:monospace} + + + + + + + + + + + + + + + + + +`],data:{animation:RC},changeDetection:0})}return i})();function ul(i,t,e,n,r=[]){let o={label:"",children:[],type:e,isGroupNode:!0},s=[];for(let l=0;lf.label===c.label&&f.isGroupNode);if(p==null){let f={label:c.label,boldLabel:e5(d),nodeId:c.id,node:c,type:e,showLocator:!0,highlight:c.id===n,isGroupNode:c.nodeType===Ys.GROUP_NODE,metadata:d};u!=null&&(f.extraData=u),h.children.push(f)}else p.nodeId=c.id,p.showLocator=!0,p.extraData=u}}}o=jue(o);let a=[o];if(s.length>0){let l="weights";for(let c of s)if(!c.node.label.toLowerCase().includes("const")){l="";break}a.push({label:l,children:s.map(c=>({label:c.node.label,boldLabel:e5(c.metadata),nodeId:c.node.id,node:c.node,type:e,showLocator:!1,highlight:c.node.id===n,isGroupNode:!1,metadata:t[c.index]})),type:e,isGroupNode:!1})}return a}function e5(i){if(i)return i[jo]}function Gue(i,t){let e=i?["",...i.split("/")]:[""],n,r=[];for(let o of e)if(o!==""&&r.push(o),o==="")n=t;else{n&&!n.children&&(n.children=[]);let s=n.children.find(a=>a.label===o);if(s==null){let a={label:o,children:[],type:t.type,isGroupNode:!0};n.children.push(a),n=a}else n=s}return n}function jue(i){let t=i,e=[];for(;e.push(t.label),t?.children&&t.children.length===1&&(t.children[0].children||[]).length>0&&!t.showLocator;)t=t.children[0];return t!==i&&(t.label=e.join(" / ")),t}var Wue=En,Zi=(()=>{class i{charsInfoRegular={};charsInfoMedium={};charsInfoBold={};charsInfoIcons={};textureRegular;textureMedium;textureBold;textureIcons;fontInfoRegular;fontInfoMedium;fontInfoBold;fontInfoIcons;depsLoadedPromise;constructor(){this.depsLoadedPromise=new Promise(e=>Ct(this,null,function*(){yield this.loadDeps(),e()}))}loadDeps(){return Ct(this,null,function*(){let e="/static_files",n=yield Promise.all([this.loadFontAtals(`${e}/GoogleSansTextRegular.png`),this.loadFontAtals(`${e}/GoogleSansTextMedium.png`),this.loadFontAtals(`${e}/GoogleSansTextBold.png`),this.loadFontAtals(`${e}/icons_20240521.png`),this.loadFontInfo(`${e}/GoogleSansTextRegular.json`),this.loadFontInfo(`${e}/GoogleSansTextMedium.json`),this.loadFontInfo(`${e}/GoogleSansTextBold.json`),this.loadFontInfo(`${e}/icons_20240521.json`)]);this.textureRegular=n[0],this.textureMedium=n[1],this.textureBold=n[2],this.textureIcons=n[3],this.charsInfoRegular=n[4].charsInfo,this.charsInfoMedium=n[5].charsInfo,this.charsInfoBold=n[6].charsInfo,this.charsInfoIcons=n[7].charsInfo,this.fontInfoRegular=n[4].fontInfo,this.fontInfoMedium=n[5].fontInfo,this.fontInfoBold=n[6].fontInfo,this.fontInfoIcons=n[7].fontInfo})}getCharsInfo(e){switch(e){case _n.REGULAR:return this.charsInfoRegular;case _n.MEDIUM:return this.charsInfoMedium;case _n.BOLD:return this.charsInfoBold;case _n.ICONS:return this.charsInfoIcons;default:return this.charsInfoRegular}}getFontInfo(e){switch(e){case _n.REGULAR:return this.fontInfoRegular;case _n.MEDIUM:return this.fontInfoMedium;case _n.BOLD:return this.fontInfoBold;case _n.ICONS:return this.fontInfoIcons;default:return this.fontInfoRegular}}loadFontAtals(e){return Ct(this,null,function*(){return new Promise(n=>{new Wue.TextureLoader().load(e,r=>{n(r)})})})}loadFontInfo(e){return Ct(this,null,function*(){let r=yield(yield fetch(e)).json(),o={};for(let s of r.chars)o[s.char]=s;return{fontInfo:r,charsInfo:o}})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var mr=En,$ue=` +precision highp float; + +#define PI 3.1415926535897932384626433832795 + +uniform float edgeWidth; +uniform float animationProgress; + +attribute vec4 endPoints; +attribute vec4 targetEndPoints; +attribute vec3 color; +attribute float yOffset; + +varying vec3 vColor; + +float atan2(in float y, in float x) { + bool s = (abs(x) > abs(y)); + return mix(PI/2.0 - atan(x,y), atan(y,x), s); +} + +void main() { + vColor = color; + + vec3 pos = position; + + float curStartX = endPoints.x; + float curStartY = endPoints.y; + float curEndX = endPoints.z; + float curEndY = endPoints.w; + float targetStartX = targetEndPoints.x; + float targetStartY = targetEndPoints.y; + float targetEndX = targetEndPoints.z; + float targetEndY = targetEndPoints.w; + + float progress = animationProgress * step(0.0, animationProgress); + float startX = curStartX + (targetStartX - curStartX) * progress; + float startY = curStartY + (targetStartY - curStartY) * progress; + float endX = curEndX + (targetEndX - curEndX) * progress; + float endY = curEndY + (targetEndY - curEndY) * progress; + + float length = distance(vec2(startX, startY), vec2(endX, endY)); + pos.x = (step(0.0, pos.x) * 2.0 - 1.0) * (edgeWidth / 2.0); + pos.z = (step(0.0, pos.z) * 2.0 - 1.0) * (length / 2.0); + + float angle = PI / 2.0 - atan2(endY - startY, endX - startX); + float c = cos(angle); + float s = sin(angle); + + float posX = pos.x; + float posZ = pos.z; + pos.x = posX * c + posZ * s; + pos.z = posZ * c - posX * s; + + float centerX = (startX + endX) / 2.0; + float centerZ = (startY + endY) / 2.0; + + gl_Position = projectionMatrix * modelViewMatrix * + vec4(pos.x + centerX, yOffset, pos.z + centerZ, 1.0); +} +`,que=` +precision highp float; + +varying vec3 vColor; + +void main() { + gl_FragColor = vec4(vColor, 1.0); +} +`,Yue=` +precision highp float; + +#define PI 3.1415926535897932384626433832795 + +uniform float animationProgress; + +// End points of the last segment of the edge. +attribute vec4 endPoints; +attribute vec4 targetEndPoints; +attribute vec3 color; +attribute float yOffset; + +varying vec3 vColor; + +float atan2(in float y, in float x) { + bool s = (abs(x) > abs(y)); + return mix(PI/2.0 - atan(x,y), atan(y,x), s); +} + +void main() { + vColor = color; + + vec3 pos = position; + + float curStartX = endPoints.x; + float curStartY = endPoints.y; + float curEndX = endPoints.z; + float curEndY = endPoints.w; + float targetStartX = targetEndPoints.x; + float targetStartY = targetEndPoints.y; + float targetEndX = targetEndPoints.z; + float targetEndY = targetEndPoints.w; + + float progress = animationProgress * step(0.0, animationProgress); + float startX = curStartX + (targetStartX - curStartX) * progress; + float startY = curStartY + (targetStartY - curStartY) * progress; + float endX = curEndX + (targetEndX - curEndX) * progress; + float endY = curEndY + (targetEndY - curEndY) * progress; + + float angle = PI - atan2(endY - startY, endX - startX) + PI / 2.0; + float c = cos(angle); + float s = sin(angle); + + float posX = pos.x; + float posZ = pos.z; + pos.x = posX * c + posZ * s; + pos.z = posZ * c - posX * s; + + gl_Position = projectionMatrix * modelViewMatrix * + vec4(pos.x + endX, yOffset, pos.z + endY, 1.0); +} +`,Xue=` +precision highp float; + +varying vec3 vColor; + +void main() { + gl_FragColor = vec4(vColor, 1.0); +} +`,Que=6,UP=6,Zue=4,hl=class{color;edgeWidth;arrowScale;edgesMesh;material;arrowHeadMat;arrowHeadsMesh;planeGeo;arrowHeadGeometry;savedEdgeSegments={};savedEdges={};savedArrowHeads={};curAnimationProgrssUniform={value:-1};originalColors=[];originalYOffsets=[];originalArrowHeadYOffsets=[];lastColorUpdateEdgeSegments=[];lastColorUpdateArrowHeads=[];lastYOffsetsUpdateEdgeSegments=[];lastYOffsetsUpdateArrowHeads=[];constructor(t,e,n=1){this.color=t,this.edgeWidth=e,this.arrowScale=n,this.planeGeo=new mr.PlaneGeometry(1,1),this.planeGeo.rotateX(-Math.PI/2),this.material=new mr.ShaderMaterial({uniforms:{edgeWidth:{value:this.edgeWidth},animationProgress:this.curAnimationProgrssUniform},vertexShader:$ue,fragmentShader:que,transparent:!0});let r=new mr.Shape,o=Que*n,s=UP*n,a=Zue*n;r.moveTo(-o/2,-s).lineTo(0,-a).lineTo(o/2,-s).lineTo(0,0).lineTo(-o/2,-s),this.arrowHeadGeometry=new mr.ShapeGeometry(r),this.arrowHeadGeometry.rotateX(-Math.PI/2),this.arrowHeadMat=new mr.ShaderMaterial({uniforms:{animationProgress:this.curAnimationProgrssUniform},vertexShader:Yue,fragmentShader:Xue,transparent:!0})}generateMesh(t,e,n=!1){if(t.length===0){this.edgesMesh=void 0,this.arrowHeadsMesh=void 0;return}let r=[],o=[],s=[],a=[],l=[],c=[],d=[],u=[],h={},p={};this.savedEdges={};let f=0,m=0;for(let{edge:_,index:x}of t){let C=_.curvePoints||[],T=e.nodesById[_.fromNodeId],D=e.nodesById[_.toNodeId],E=T.globalX||0,A=T.globalY||0;for(let Q=0;Q=2){let k=Math.atan2(z.y-F.y,z.x-F.x);G[2]-=Math.cos(k)*UP*this.arrowScale/2,G[3]-=Math.sin(k)*UP*this.arrowScale/2}let Y=this.savedEdgeSegments[O];if(n?r.push(...G):Y?r.push(...Y.endPoints):r.push(...G),o.push(...G),c.push(x*Zt),l.push(this.color.r,this.color.g,this.color.b),h[O]={endPoints:G,index:f},this.savedEdges[_.id]==null&&(this.savedEdges[_.id]=[]),this.savedEdges[_.id].push(h[O]),Q===C.length-2){let k=_.id,j=$,K=this.savedArrowHeads[k];n?s.push(...j):K?s.push(...K.lastSegmentEndPoints):s.push(...j),a.push(...j),d.push(x*Zt+Zt/2),u.push(this.color.r,this.color.g,this.color.b),p[k]={index:m,lastSegmentEndPoints:j}}f++}m++}this.savedEdgeSegments=h,this.savedArrowHeads=p,this.originalColors=l,this.originalYOffsets=c,this.originalArrowHeadYOffsets=d;let b=new mr.InstancedBufferGeometry().copy(this.planeGeo);b.instanceCount=c.length,b.setAttribute("endPoints",new mr.InstancedBufferAttribute(new Float32Array(r),4)),b.setAttribute("targetEndPoints",new mr.InstancedBufferAttribute(new Float32Array(o),4)),b.setAttribute("color",new mr.InstancedBufferAttribute(new Float32Array(l),3)),b.setAttribute("yOffset",new mr.InstancedBufferAttribute(new Float32Array(c),1)),this.edgesMesh=new mr.Mesh(b,this.material),this.edgesMesh.frustumCulled=!1;let g=new mr.InstancedBufferGeometry().copy(this.arrowHeadGeometry);g.instanceCount=d.length,g.setAttribute("endPoints",new mr.InstancedBufferAttribute(new Float32Array(s),4)),g.setAttribute("targetEndPoints",new mr.InstancedBufferAttribute(new Float32Array(a),4)),g.setAttribute("color",new mr.InstancedBufferAttribute(new Float32Array(u),3)),g.setAttribute("yOffset",new mr.InstancedBufferAttribute(new Float32Array(d),1)),this.arrowHeadsMesh=new mr.Mesh(g,this.arrowHeadMat),this.arrowHeadsMesh.frustumCulled=!1}updateColors(t,e){if(this.edgesMesh){let n=this.edgesMesh.geometry.getAttribute("color");if(t.length>0)for(let r of t)for(let o of this.savedEdges[r]||[]){let s=o.index;n.setXYZ(s,e.r,e.g,e.b),this.lastColorUpdateEdgeSegments.push(o)}n.needsUpdate=!0}if(this.arrowHeadsMesh){let n=this.arrowHeadsMesh.geometry.getAttribute("color");if(t.length>0)for(let r of t){let o=this.savedArrowHeads[r],s=o.index;n.setXYZ(s,e.r,e.g,e.b),this.lastColorUpdateArrowHeads.push(o)}n.needsUpdate=!0}}updateYOffsets(t,e){if(this.edgesMesh){let n=this.edgesMesh.geometry.getAttribute("yOffset");if(t.length>0)for(let r of t)for(let o of this.savedEdges[r]||[]){let s=o.index;n.setX(s,e),this.lastYOffsetsUpdateEdgeSegments.push(o)}n.needsUpdate=!0}if(this.arrowHeadsMesh){let n=this.arrowHeadsMesh.geometry.getAttribute("yOffset");if(t.length>0)for(let r of t){let o=this.savedArrowHeads[r],s=o.index;n.setX(s,e),this.lastYOffsetsUpdateArrowHeads.push(o)}n.needsUpdate=!0}}restoreColors(){if(this.edgesMesh){let t=this.edgesMesh.geometry.getAttribute("color");if(this.lastColorUpdateEdgeSegments.length>0){for(let e of this.lastColorUpdateEdgeSegments){let n=e.index;t.setXYZ(n,this.originalColors[n*3],this.originalColors[n*3+1],this.originalColors[n*3+2])}t.needsUpdate=!0}this.lastColorUpdateEdgeSegments=[]}if(this.arrowHeadsMesh){let t=this.arrowHeadsMesh.geometry.getAttribute("color");if(this.lastColorUpdateArrowHeads.length>0){for(let e of this.lastColorUpdateArrowHeads){let n=e.index;t.setXYZ(n,this.originalColors[n*3],this.originalColors[n*3+1],this.originalColors[n*3+2])}t.needsUpdate=!0}this.lastColorUpdateArrowHeads=[]}}restoreYOffsets(){if(this.edgesMesh){let t=this.edgesMesh.geometry.getAttribute("yOffset");if(this.lastYOffsetsUpdateEdgeSegments.length>0){for(let e of this.lastYOffsetsUpdateEdgeSegments){let n=e.index;t.setX(n,this.originalYOffsets[n])}t.needsUpdate=!0}this.lastYOffsetsUpdateEdgeSegments=[]}if(this.arrowHeadsMesh){let t=this.arrowHeadsMesh.geometry.getAttribute("yOffset");if(this.lastYOffsetsUpdateArrowHeads.length>0){for(let e of this.lastYOffsetsUpdateArrowHeads){let n=e.index;t.setX(n,this.originalArrowHeadYOffsets[n])}t.needsUpdate=!0}this.lastYOffsetsUpdateArrowHeads=[]}}clear(){this.edgesMesh&&this.edgesMesh.removeFromParent(),this.arrowHeadsMesh&&this.arrowHeadsMesh.removeFromParent()}clearSavedDataForAnimation(){this.savedEdgeSegments={},this.savedEdges={},this.savedArrowHeads={}}updateAnimationProgress(t){this.edgesMesh&&(this.curAnimationProgrssUniform.value=t)}};var Ki=En,Kue=` +precision highp float; + +uniform float borderRadius; +// Set this to <0 to disable animation. +uniform float animationProgress; +uniform vec4 bgColorWhenFar; + +attribute vec4 bound; +attribute vec4 targetBound; +attribute float yOffset; +attribute float isRounded; +attribute float borderWidth; +attribute vec3 bgColor; +attribute vec3 borderColor; +attribute float angle; +attribute float opacity; +attribute float changeColorWhenFar; + +varying vec2 vUv; +varying vec2 vSize; +varying float vIsRounded; +varying float vBorderWidth; +varying vec3 vBgColor; +varying vec3 vBorderColor; +varying float vOpacity; +varying float vChangeColorWhenFar; + +void main() { + vUv = uv; + vIsRounded = isRounded; + vBorderWidth = borderWidth; + vBgColor = bgColor; + vBorderColor = borderColor; + vOpacity = opacity; + vChangeColorWhenFar = changeColorWhenFar; + + vec3 pos = position; + float curX = bound.x; + float curY = bound.y; + float curW = bound.z; + float curH = bound.w; + + float progress = animationProgress * step(0.0, animationProgress); + float x = curX + (targetBound.x - curX) * progress; + float y = curY + (targetBound.y - curY) * progress; + float w = curW + (targetBound.z - curW) * progress; + float h = curH + (targetBound.w - curH) * progress; + vSize = vec2(w, h); + + // For each vertex, move it by delta calculated below so that the final + // rectangle's width and height match the width and height stored in "bound". + // + // pos.x < 0: the first () below returns -1. + // pos.x > 0: the first () below returns 1. + pos.x = (step(0.0, pos.x) * 2.0 - 1.0) * (w / 2.0); + pos.z = (step(0.0, pos.z) * 2.0 - 1.0) * (h / 2.0); + + // Rotate. + // + float c = cos(angle); + float s = sin(angle); + float posX = pos.x * c + pos.z * s; + float posZ = pos.z * c - pos.x * s; + + gl_Position = projectionMatrix * modelViewMatrix * + vec4(posX + x, yOffset, posZ + y, 1.0); +} +`,Jue=` +precision highp float; + +uniform float borderRadius; +uniform vec4 bgColorWhenFar; + +varying vec2 vUv; +varying vec2 vSize; +varying float vIsRounded; +varying float vBorderWidth; +varying vec3 vBgColor; +varying vec3 vBorderColor; +varying float vOpacity; +varying float vChangeColorWhenFar; + +// See: +// https://www.shadertoy.com/view/4tc3DX# + +// Clamp [0..1] range +#define saturate(a) clamp(a, 0.0, 1.0) + +// This function will make a signed distance field that says how far you are +// from the edge of the line at any point U,V. +// Pass it UVs, line end points, line thickness (x is along the line and y is +// perpendicular), How rounded the end points should be (0.0 is rectangular, +// setting rounded to thick.y will be circular). +float LineDistField(vec2 uv, vec2 pA, vec2 pB, vec2 thick, float rounded, float dashOn) { + // Don't let it get more round than circular. + rounded = min(thick.y, rounded); + // midpoint + vec2 mid = (pB + pA) * 0.5; + // vector from point A to B + vec2 delta = pB - pA; + // Distance between endpoints + float lenD = length(delta); + // unit vector pointing in the line's direction + vec2 unit = delta / lenD; + // Check for when line endpoints are the same + if (lenD < 0.0001) unit = vec2(1.0, 0.0); // if pA and pB are same + // Perpendicular vector to unit - also length 1.0 + vec2 perp = unit.yx * vec2(-1.0, 1.0); + // position along line from midpoint + float dpx = dot(unit, uv - mid); + // distance away from line at a right angle + float dpy = dot(perp, uv - mid); + // Make a distance function that is 0 at the transition from black to white + float disty = abs(dpy) - thick.y + rounded; + float distx = abs(dpx) - lenD * 0.5 - thick.x + rounded; + + // Too tired to remember what this does. Something like rounded endpoints for distance function. + float dist = length(vec2(max(0.0, distx), max(0.0,disty))) - rounded; + dist = min(dist, max(distx, disty)); + + return dist; +} + +// This makes a line in UV units. A 1.0 thick line will span a whole 0..1 in +// UV space. +float FillLine(vec2 uv, vec2 pA, vec2 pB, vec2 thick, float rounded) { + float df = LineDistField(uv, pA, pB, vec2(thick), rounded, 0.0); + return saturate(df / abs(dFdy(uv).y)); +} + +void main() { + // Normalize uv. + vec2 uv = vUv; + uv -= 0.5; + float aspect = vSize.x / vSize.y; + uv.x *= aspect; + + vec4 finalColor = vec4(1.0); + + float radius = mix(1.0 / vSize.y, borderRadius / vSize.y, step(0.5, vIsRounded)); + float borderWidth = vBorderWidth / vSize.y; + + // Border. + float c = FillLine(uv, + vec2(-0.5 * aspect, 0.0), vec2(0.5 * aspect, 0.0), vec2(0.0, 0.5), radius); + finalColor = mix(vec4(vBorderColor.rgb, 1.0), vec4(1.0, 1.0, 1.0, 0.0), c); + + // Body. + float c2 = FillLine(uv, + vec2(-0.5 * aspect + borderWidth, 0.0), + vec2(0.5 * aspect - borderWidth, 0.0), vec2(0.0, 0.5 - borderWidth), + radius - 1.0 / vSize.y); + finalColor = mix(vec4(vBgColor.rgb, 1.0), finalColor, c2); + finalColor = saturate(finalColor); + finalColor.rgb = mix(finalColor.rgb, bgColorWhenFar.rgb, bgColorWhenFar.a * vChangeColorWhenFar); + + float alpha = finalColor.w * vOpacity; + if (alpha < 0.00001) { + discard; + } + gl_FragColor = vec4(finalColor.rgb, alpha); +} +`,Fi=class{radius;mesh;meshForRayCasting;material;materialForRayCasting;planeGeo;hoveredRectangelId="";curRectangles=[];savedRectangles={};curAnimationProgrssUniform={value:-1};dummy=new Ki.Object3D;originalBorderColors=[];originalBgColors=[];originalBorderWidths=[];originalOpacities=[];lastBorderColorUpdateRectangles=[];lastBgColorUpdateRectangles=[];lastBorderWidthUpdateRectangles=[];lastOpacityUpdateRectangles=[];constructor(t){this.radius=t,this.planeGeo=new Ki.PlaneGeometry(1,1),this.planeGeo.rotateX(-Math.PI/2),this.material=new Ki.ShaderMaterial({extensions:{derivatives:!0},uniforms:{borderRadius:{value:this.radius},animationProgress:this.curAnimationProgrssUniform,bgColorWhenFar:{value:[0,0,0,0]}},vertexShader:Kue,fragmentShader:Jue,transparent:!0}),this.materialForRayCasting=new Ki.MeshBasicMaterial({opacity:0,transparent:!0})}generateMesh(t,e=!1,n=!1,r=!1,o=!1){if(t.length===0){this.savedRectangles={},this.mesh=void 0,this.meshForRayCasting=void 0;return}this.curRectangles=t;let s=[],a=[],l=[],c=[],d=[],u=[],h=[],p=[],f=[],m=[],b=Object.keys(this.savedRectangles).length>0,g=X({},this.savedRectangles);this.savedRectangles={};let _=0;for(let C=0;C0){let a=r[r.length-1].instanceId;a!=null&&(o=this.getRectangleId(a))}if(this.hoveredRectangelId!==o){this.hoveredRectangelId=o,n&&(document.body.style.cursor=this.hoveredRectangelId===""?"default":"pointer");let s=this.savedRectangles[this.hoveredRectangelId];e(this.hoveredRectangelId,s)}}updateBorderColor(t,e){if(!this.mesh)return;t=t.filter(r=>r!=="");let n=this.mesh.geometry.getAttribute("borderColor");if(t.length>0)for(let r of t){let o=this.savedRectangles[r];if(!o)continue;let s=o.index;n.setXYZ(s,e.r,e.g,e.b),o.borderColor.r=e.r,o.borderColor.g=e.g,o.borderColor.b=e.b,this.lastBorderColorUpdateRectangles.push(o)}n.needsUpdate=!0}restoreBorderColors(){if(!this.mesh)return;let t=this.mesh.geometry.getAttribute("borderColor");if(this.lastBorderColorUpdateRectangles.length>=0){for(let e of this.lastBorderColorUpdateRectangles){let n=e.index;t.setXYZ(n,this.originalBorderColors[n*3],this.originalBorderColors[n*3+1],this.originalBorderColors[n*3+2]),e.borderColor.r=this.originalBorderColors[n*3],e.borderColor.g=this.originalBorderColors[n*3+1],e.borderColor.b=this.originalBorderColors[n*3+2]}t.needsUpdate=!0}this.lastBorderColorUpdateRectangles=[]}updateBgColor(t,e,n=!1){if(!this.mesh)return;t=t.filter(o=>o!=="");let r=this.mesh.geometry.getAttribute("bgColor");if(t.length>0)for(let o of t){let s=this.savedRectangles[o];if(!s)continue;let a=s.index;if(n){let l=this.originalBgColors[a*3],c=this.originalBgColors[a*3+1],d=this.originalBgColors[a*3+2];if(l!==1||c!==1||d!==1)continue}r.setXYZ(a,e.r,e.g,e.b),s.bgColor.r=e.r,s.bgColor.g=e.g,s.bgColor.b=e.b,this.lastBgColorUpdateRectangles.push(s)}r.needsUpdate=!0}restoreBgColors(){if(!this.mesh)return;let t=this.mesh.geometry.getAttribute("bgColor");if(this.lastBgColorUpdateRectangles.length>=0){for(let e of this.lastBgColorUpdateRectangles){let n=e.index;t.setXYZ(n,this.originalBgColors[n*3],this.originalBgColors[n*3+1],this.originalBgColors[n*3+2]),e.bgColor.r=this.originalBgColors[n*3],e.bgColor.g=this.originalBgColors[n*3+1],e.bgColor.b=this.originalBgColors[n*3+2]}t.needsUpdate=!0}this.lastBgColorUpdateRectangles=[]}updateBorderWidth(t,e){if(!this.mesh)return;t=t.filter(r=>r!=="");let n=this.mesh.geometry.getAttribute("borderWidth");if(t.length>0)for(let r of t){let o=this.savedRectangles[r];if(!o)continue;let s=o.index;n.setX(s,e),o.borderWidth=e,this.lastBorderWidthUpdateRectangles.push(o)}n.needsUpdate=!0}restoreBorderWidths(){if(!this.mesh)return;let t=this.mesh.geometry.getAttribute("borderWidth");if(this.lastBorderWidthUpdateRectangles.length>=0){for(let e of this.lastBorderWidthUpdateRectangles){let n=e.index;t.setX(n,this.originalBorderWidths[n]),e.borderWidth=this.originalBorderWidths[n]}t.needsUpdate=!0}this.lastBorderWidthUpdateRectangles=[]}updateOpacity(t,e){if(!this.mesh)return;t=t.filter(r=>r!=="");let n=this.mesh.geometry.getAttribute("opacity");if(t.length>0)for(let r of t){let o=this.savedRectangles[r];if(!o)continue;let s=o.index;n.setX(s,e),o.opacity=e,this.lastOpacityUpdateRectangles.push(o)}n.needsUpdate=!0}restoreOpacities(){if(!this.mesh)return;let t=this.mesh.geometry.getAttribute("opacity");if(this.lastOpacityUpdateRectangles.length>=0){for(let e of this.lastOpacityUpdateRectangles){let n=e.index;t.setX(n,this.originalOpacities[n]),e.opacity=this.originalOpacities[n]}t.needsUpdate=!0}this.lastOpacityUpdateRectangles=[]}updateAngle(t,e){if(!this.mesh)return;let n=this.mesh.geometry.getAttribute("angle"),r=this.savedRectangles[t];if(!r)return;let o=e/180*Math.PI;n.setX(r.index,o),n.needsUpdate=!0}updateAnimationProgress(t){this.mesh&&(this.curAnimationProgrssUniform.value=t)}getRectangleId(t){return this.curRectangles[t].id}getNodeIndex(t){return this.savedRectangles[t]?.index??-1}setBgColorWhenFar(t,e){this.mesh&&(this.material.uniforms.bgColorWhenFar.value=[t.r,t.g,t.b,e])}clearSavedDataForAnimation(){this.savedRectangles={}}setInstancePositionAndScale(t,e,n,r,o,s,a){this.dummy.position.set(n,r,o),this.dummy.scale.set(s,1,a),this.dummy.updateMatrix(),t.setMatrixAt(e,this.dummy.matrix),t.instanceMatrix.needsUpdate=!0}};var ao=En,ehe=` +precision highp float; + +// Set this to <0 to disable animation. +uniform float animationProgress; + +// 0: regular. 1: medium. 2: bold. +attribute float weight; +attribute vec3 color; +attribute vec4 bound; +attribute vec4 targetBound; +attribute vec4 uvBound; +attribute float yOffset; +attribute float opacity; +attribute float angle; +attribute vec3 borderColor; +attribute float weightLevel; + +varying vec2 vUv; +varying vec3 vColor; +varying float vWeight; +varying float vOpacity; +varying vec3 vBorderColor; +varying float vWeightLevel; + +void main() { + vUv = vec2(0.0, 0.0); + vec3 pos = position; + if (pos.x < 0.0 && pos.z < 0.0) { + vUv = vec2(uvBound.x, uvBound.y + uvBound.w); + } else if (pos.x > 0.0 && pos.z < 0.0) { + vUv = vec2(uvBound.x + uvBound.z, uvBound.y + uvBound.w); + } else if (pos.x > 0.0 && pos.z > 0.0) { + vUv = vec2(uvBound.x + uvBound.z, uvBound.y); + } else { + vUv = vec2(uvBound.x, uvBound.y); + } + + vColor = color; + vWeight = weight; + vOpacity = opacity; + vBorderColor = borderColor; + vWeightLevel = weightLevel; + + float curX = bound.x; + float curY = bound.y; + float curW = bound.z; + float curH = bound.w; + + float x = curX; + float y = curY; + float w = curW; + float h = curH; + + if (animationProgress >= 0.0) { + x = curX + (targetBound.x - curX) * animationProgress; + y = curY + (targetBound.y - curY) * animationProgress; + w = curW + (targetBound.z - curW) * animationProgress; + h = curH + (targetBound.w - curH) * animationProgress; + } + + // For each vertex, move it by delta calculated below so that the final + // rectangle's width and height match the width and height stored in "bound". + // + if (pos.x < 0.0) { + pos.x = - w / 2.0; + } else if (pos.x > 0.0) { + pos.x = w / 2.0; + } + + if (pos.z < 0.0) { + pos.z = - h / 2.0; + } else if (pos.z > 0.0) { + pos.z = h / 2.0; + } + + // Rotate. + // + float c = cos(angle); + float s = sin(angle); + float posX = pos.x * c + pos.z * s; + float posZ = pos.z * c - pos.x * s; + + gl_Position = projectionMatrix * modelViewMatrix * + vec4(posX + x, yOffset, posZ + y, 1.0); +} +`,the=` +precision highp float; + +uniform sampler2D textureRegular; +uniform sampler2D textureMedium; +uniform sampler2D textureBold; +uniform sampler2D textureIcons; +uniform float distanceRange; +varying vec2 vUv; +varying float vWeight; +varying vec3 vColor; +varying float vOpacity; +varying vec3 vBorderColor; +varying float vWeightLevel; + +vec3 getSampleColor() { + if (vWeight < 0.5) { + return texture2D(textureRegular, vUv).rgb; + } + if (vWeight < 1.5) { + return texture2D(textureMedium, vUv).rgb; + } + if (vWeight < 2.5) { + return texture2D(textureBold, vUv).rgb; + } + return texture2D(textureIcons, vUv).rgb; +} + +float median(float r, float g, float b) { + return max(min(r, g), min(max(r, g), b)); +} + +float screenPxRange() { + vec2 unitRange = vec2(distanceRange) / vec2(textureSize(textureRegular, 0)); + vec2 screenTexSize = vec2(1.0) / fwidth(vUv); + return max(0.5 * dot(unitRange, screenTexSize), 1.0); +} + +void main() { + vec3 sampleColor = getSampleColor(); + + float dist = median(sampleColor.r, sampleColor.g, sampleColor.b); + vec3 color = vColor; + float threshold = step(0.0, vBorderColor.r) * 0.35; + float pxDist = screenPxRange() * (dist - 0.5 + threshold) + vWeightLevel - threshold; + + // Has border. + if (vBorderColor.r >= 0.0) { + float blur = fwidth(dist) / 2.0; + color = mix(vBorderColor, vColor, smoothstep(0.5 - blur, 0.5 + blur, dist)); + } + + float opacity = clamp(pxDist, 0.0, 1.0); + if (opacity > 0.001) { + opacity *= vOpacity; + } + gl_FragColor = vec4(color, opacity); +} +`,Bi=class{threejsService;mesh;material;planeGeo;labelCharSizesCache={};fontSize;distanceRange;savedBounds={};nodeIdToOpacityIndexRanges={};nodeIdToColorIndexRanges={};lastOpacityUpdateIndexRanges=[];lastColorUpdateIndexRanges=[];originalColors=[];curAnimationProgrssUniform={value:-1};constructor(t){this.threejsService=t,this.planeGeo=new ao.PlaneGeometry(1,1),this.planeGeo.rotateX(-Math.PI/2),this.fontSize=this.threejsService.fontInfoRegular.info.size,this.distanceRange=this.threejsService.fontInfoRegular.distanceField.distanceRange,this.material=new ao.ShaderMaterial({uniforms:{textureRegular:{value:this.threejsService.textureRegular},textureMedium:{value:this.threejsService.textureMedium},textureBold:{value:this.threejsService.textureBold},textureIcons:{value:this.threejsService.textureIcons},distanceRange:{value:this.distanceRange},animationProgress:this.curAnimationProgrssUniform},extensions:{derivatives:!0},vertexShader:ehe,fragmentShader:the,transparent:!0,alphaToCoverage:!0})}generateMesh(t,e=!1,n=!1,r=!1){let o=0;this.nodeIdToOpacityIndexRanges={},this.nodeIdToColorIndexRanges={};let s=[],a=[],l=[],c=[],d=[],u=[],h=[],p=[],f=[],m=[],b=Object.keys(this.savedBounds).length>0,g=X({},this.savedBounds);this.savedBounds={};for(let x of t){let C=this.threejsService.getCharsInfo(x.weight),D=this.threejsService.getFontInfo(x.weight).common.scaleW,E=this.getLabelSizes(x.label,x.weight,x.height,x.maxWidth,x.treatLabelAsAWhole,x.angle,x.edgeTextMode).sizes,A=x.height/this.fontSize,Q=x.x,F=x.z,O=(x.treatLabelAsAWhole?{rects:[{x:0,y:0,width:20,height:x.height}]}:this.getLabelSizes("a",x.weight,x.height).sizes).rects[0].height*A;switch(x.vAlign){case"top":F-=E.minZ*A;break;case"bottom":F-=E.maxZ*A;break;case"center":F-=(E.minZ+E.maxZ)/2*A+O/2;break;default:break}switch(x.hAlign){case"left":Q-=E.minX*A;break;case"right":Q-=E.maxX*A;break;case"center":Q-=(E.minX+E.maxX)/2*A;break;default:break}let G=x.y,$=u.length;for(let Y=0;Y0){for(let r of t)if(this.nodeIdToOpacityIndexRanges[r])for(let{minIndex:o,maxIndex:s}of this.nodeIdToOpacityIndexRanges[r]){for(let a=o;a<=s;a++)n.setX(a,e);this.lastOpacityUpdateIndexRanges.push({minIndex:o,maxIndex:s})}}n.needsUpdate=!0}updateColorInNode(t,e){if(!this.mesh)return;let n=this.mesh.geometry.getAttribute("color");if(t.length>0){for(let r of t)if(this.nodeIdToColorIndexRanges[r])for(let{minIndex:o,maxIndex:s}of this.nodeIdToColorIndexRanges[r]){for(let a=o;a<=s;a++)n.setXYZ(a,e.r,e.g,e.b);this.lastColorUpdateIndexRanges.push({minIndex:o,maxIndex:s})}}n.needsUpdate=!0}restoreOpacities(){if(!this.mesh)return;let t=this.mesh.geometry.getAttribute("opacity");if(this.lastOpacityUpdateIndexRanges.length>=0){for(let{minIndex:e,maxIndex:n}of this.lastOpacityUpdateIndexRanges)for(let r=e;r<=n;r++)t.setX(r,1);t.needsUpdate=!0}this.lastOpacityUpdateIndexRanges=[]}restoreColors(){if(!this.mesh)return;let t=this.mesh.geometry.getAttribute("color");if(this.lastColorUpdateIndexRanges.length>=0){for(let{minIndex:e,maxIndex:n}of this.lastColorUpdateIndexRanges)for(let r=e;r<=n;r++)t.setXYZ(r,this.originalColors[r*3],this.originalColors[r*3+1],this.originalColors[r*3+2]);t.needsUpdate=!0}this.lastColorUpdateIndexRanges=[]}updateAnimationProgress(t){this.curAnimationProgrssUniform.value=t}getLabelSizes(t,e,n,r,o,s,a){let l=this.getLabelCharSizesKey(t,e,s),c=this.labelCharSizesCache[l],d;if(c==null){if(c=this.getLabelSizesInternal(t,e,o,s,a),r!=null){let u=n/this.fontSize,h=t;for(let p=0;pr){h=h.substring(0,p-1),h+="...";break}}d=h,c=this.getLabelSizesInternal(h,e,o),l=this.getLabelCharSizesKey(h,e)}this.labelCharSizesCache[l]=c}return{sizes:this.labelCharSizesCache[l],updatedLabel:d}}updateLabelSizesCache(t,e,n){let r=this.getLabelCharSizesKey(t,e);this.labelCharSizesCache[r]=n}getFontSize(){return this.fontSize}clearSavedDataForAnimation(){this.savedBounds={}}getLabelCharSizesKey(t,e,n){return`${t}__${e}__${n}`}getLabelSizesInternal(t,e,n,r,o){let s=this.threejsService.getCharsInfo(e),a=[],l=0,c=Number.MAX_VALUE,d=Number.MAX_VALUE,u=Number.NEGATIVE_INFINITY,h=Number.NEGATIVE_INFINITY;for(let p of n?[t]:t){let f=s[p];f||(f=s["?"]);let m=f.yoffset;o?(l+=Math.sin(r||0)*(f.yoffset+f.height/2),m=Math.cos(r||0)*(f.yoffset+f.height/2)):l+=f.xoffset;let b=f.width,g=f.height,_={x:l,y:m,width:b,height:g};a.push(_),c=Math.min(c,_.x),d=Math.min(d,_.y),u=Math.max(u,_.x+_.width),h=Math.max(h,_.y+_.height),l+=f.xadvance*.98}return{rects:a,minX:c,minZ:0,maxX:u,maxZ:this.fontSize}}};var i5=26;var nhe=Zt*.2,r5=Zt*.4,o5=En,AC=(()=>{class i{ATTRS_TABLE_KEY_COLOR=new o5.Color("#808080");ATTRS_TABLE_VALUE_COLOR=new o5.Color("#0d0d0d");threejsService=S(Zi);attrsTableTexts=new Bi(this.threejsService);webglRenderer;webglRendererThreejsService;attrsTableBgs=new Fi(4);init(e){this.webglRenderer=e,this.webglRendererThreejsService=e.webglRendererThreejsService}renderAttrsTable(){if(Object.keys(this.webglRenderer.curShowOnNodeItemTypes).filter(s=>this.webglRenderer.curShowOnNodeItemTypes[s].selected).length===0)return;let e=[],r=9/this.attrsTableTexts.getFontSize(),o=[];for(let{node:s,index:a}of this.webglRenderer.nodesToRender){let l=[],c=i5+Q1-4+dT(s.label),d=0,u=0,h=[];if(Et(s)){let m=tT(this.webglRenderer.curShowOnNodeItemTypes);for(let b of m){let g=lb(s,b);h.push({key:b,value:g})}this.webglRenderer.curShowOnNodeItemTypes[Bn.OP_ATTRS]?.selected&&h.push(...iT(s,this.webglRenderer.curShowOnNodeItemTypes[Bn.OP_ATTRS]?.filterRegex||"")),this.webglRenderer.curShowOnNodeItemTypes[Bn.OP_INPUTS]?.selected&&h.push(...oT(s,this.webglRenderer.curModelGraph)),this.webglRenderer.curShowOnNodeItemTypes[Bn.OP_OUTPUTS]?.selected&&h.push(...sT(s)),h.push(...aT(s,this.webglRenderer.curModelGraph.id,this.webglRenderer.curShowOnNodeItemTypes,this.webglRenderer.curNodeDataProviderRuns))}else if(wt(s)){let m=nT(this.webglRenderer.curShowOnNodeItemTypes);for(let b of m){let g=lb(s,b);h.push({key:b,value:g})}this.webglRenderer.curShowOnNodeItemTypes[Bn.LAYER_NODE_ATTRS]?.selected&&h.push(...rT(s,this.webglRenderer.curModelGraph,this.webglRenderer.curShowOnNodeItemTypes[Bn.LAYER_NODE_ATTRS]?.filterRegex||""))}for(let{key:m,value:b}of h){let{keyLabelData:g,keyLabelWidth:_,valueLabelData:x,valueLabelWidth:C}=this.createAttrsTableKeyValueLabels(s,a,m,b,c,r);e.push(g,x),d=Math.max(_,d),u=Math.max(C,u),l.push({keyLabelData:g,valueLabelData:x}),c+=km}let p=d+u+nb,f=(this.webglRenderer.getNodeWidth(s)-p)/2;for(let m of l)m.keyLabelData.x=this.webglRenderer.getNodeX(s)+d,m.valueLabelData.x=this.webglRenderer.getNodeX(s)+d+nb,m.keyLabelData.x+=f,m.valueLabelData.x+=f;if(l.length>0&&Et(s)){let b=this.webglRenderer.getNodeWidth(s)-16,g=l.length*km;o.push({id:s.id,index:o.length,bound:{x:this.webglRenderer.getNodeX(s)+16/2+b/2,y:l[0].keyLabelData.z+g/2-km/2,width:b,height:g},yOffset:Zt*a+nhe,isRounded:!0,borderColor:{r:1,g:1,b:1},bgColor:{r:1,g:1,b:1},borderWidth:1,opacity:1})}}e.length>0&&(this.attrsTableTexts.generateMesh(e),this.webglRendererThreejsService.addToScene(this.attrsTableTexts.mesh),this.attrsTableBgs.generateMesh(o),this.webglRendererThreejsService.addToScene(this.attrsTableBgs.mesh))}updateAnimationProgress(e){this.attrsTableTexts.updateAnimationProgress(e),this.attrsTableBgs.updateAnimationProgress(e)}createAttrsTableKeyValueLabels(e,n,r,o,s,a){let l={id:`${e.id}_attrs_table_${r}_key`,nodeId:e.id,label:`${r}:`,height:9,hAlign:"right",vAlign:"center",weight:_n.MEDIUM,x:this.webglRenderer.getNodeX(e),y:n*Zt+r5,z:this.webglRenderer.getNodeY(e)+s,color:this.ATTRS_TABLE_KEY_COLOR},c=this.attrsTableTexts.getLabelSizes(l.label,l.weight,l.height).sizes,d=(c.maxX-c.minX)*a,u={id:`${e.id}_attrs_table_${r}_value`,nodeId:e.id,label:o,height:9,hAlign:"left",vAlign:"center",weight:_n.REGULAR,x:this.webglRenderer.getNodeX(e),y:n*Zt+r5,z:this.webglRenderer.getNodeY(e)+s,color:this.ATTRS_TABLE_VALUE_COLOR,maxWidth:Z1},{sizes:h,updatedLabel:p}=this.attrsTableTexts.getLabelSizes(u.label,u.weight,u.height,u.maxWidth);p!=null&&(u.label=p);let f=(h.maxX-h.minX)*a;return{keyLabelData:l,keyLabelWidth:d,valueLabelData:u,valueLabelWidth:f}}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var wc=(()=>{class i{remoteSourceLoading=et(!1);loadedEdgeOverlays=et([]);selectedOverlayIds=et([]);selectedOverlays=Ot(()=>{let e=[];for(let n of this.loadedEdgeOverlays())for(let r of n.processedOverlays)this.selectedOverlayIds().includes(r.id)&&e.push(r);return e});addOverlay(e){this.loadedEdgeOverlays.update(n=>[...n,rhe(e)])}deleteOverlayData(e){let n=this.loadedEdgeOverlays().find(r=>r.id===e);if(this.loadedEdgeOverlays.update(r=>r.filter(o=>o.id!==e)),n){let r=new Set(n.processedOverlays.map(o=>o.id));this.selectedOverlayIds.update(o=>o.filter(s=>!r.has(s)))}}toggleOverlaySelection(e){this.selectedOverlayIds.update(n=>{let r=[...n];return n.includes(e)?r=r.filter(o=>o!==e):r.push(e),r})}addEdgeOverlayData(e){this.addOverlay(e),this.selectedOverlayIds.update(n=>{let r=this.loadedEdgeOverlays(),s=r[r.length-1].processedOverlays.map(a=>a.id);return[...n,...s]})}addEdgeOverlayDataFromJsonData(e){try{let n=JSON.parse(e);this.addEdgeOverlayData(n)}catch(n){return`Failed to parse JSON file. ${n}`}return""}loadFromCns(e){return Ct(this,null,function*(){this.remoteSourceLoading.set(!0);let n=`/read_file?path=${e}`,r=yield fetch(n);if(!r.ok)return this.remoteSourceLoading.set(!1),`Failed to load JSON file "${e}"`;let o=JSON.parse((yield r.text()).replace(`)]}' +`,"")),s=this.addEdgeOverlayDataFromJsonData(o.content);return this.remoteSourceLoading.set(!1),s})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();function rhe(i){let t=X({id:qi(),processedOverlays:[]},i);for(let e of i.overlays){let n=X({id:qi(),nodeIds:new Set},e);t.processedOverlays.push(n);for(let r of e.edges)n.nodeIds.add(r.sourceNodeId),n.nodeIds.add(r.targetNodeId)}return t}var s5=En,a5=1.5,NC=(()=>{class i{threejsService=S(Zi);webglRenderer;webglRendererThreejsService;overlaysEdgesList=[];overlaysEdgeTextsList=[];edgeOverlaysService=S(wc);curOverlays=[];init(e){this.webglRenderer=e,this.webglRendererThreejsService=e.webglRendererThreejsService}updateOverlaysData(){this.clearOverlaysData();let e=this.webglRenderer.selectedNodeId;if(!e)return;let n=this.edgeOverlaysService.selectedOverlays();for(let r of n)r.nodeIds.has(e)&&this.curOverlays.push(r)}clearOverlaysData(){this.curOverlays=[]}updateOverlaysEdges(){if(this.clearOverlaysEdges(),this.curOverlays.length===0)return;let e={},n={};for(let r=0;r{let o=this.webglRenderer.curModelGraph.nodesById[r];if(o.nsParentId){let s=this.webglRenderer.curModelGraph.nodesById[o.nsParentId];(!s.expanded||!this.webglRenderer.isNodeRendered(s.id))&&e.add(o.nsParentId)}};for(let r of this.curOverlays)for(let{sourceNodeId:o,targetNodeId:s}of r.edges)n(o),n(s);return[...e]}addToEdgePairs(e,n,r){let o=this.getEdgeKey(e,n);return r[o]===void 0&&(r[o]=0),r[o]++,r[o]}getEdgeKey(e,n){return e.localeCompare(n)<0?`${e}___${n}`:`${n}___${e}`}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var J_=En,kC=(()=>{class i{appService;EDGE_TEXT_COLOR=new J_.Color("#041E49");threejsService=S(Zi);edgeTexts=new Bi(this.threejsService);webglRenderer;webglRendererThreejsService;constructor(e){this.appService=e}init(e){this.webglRenderer=e,this.webglRendererThreejsService=e.webglRendererThreejsService}renderEdgeTexts(){let e=this.genLabelsOnEdges(this.webglRenderer.edgesToRender,this.EDGE_TEXT_COLOR);this.edgeTexts.generateMesh(e),this.webglRendererThreejsService.addToScene(this.edgeTexts.mesh)}genLabelsOnEdges(e,n,r=0,o=95,s){let a=s??this.appService.config()?.edgeLabelFontSize??sb,l=this.appService.config()?.disallowVerticalEdgeLabels||!1,c=[],d=this.threejsService.getCharsInfo(_n.MEDIUM);for(let{edge:u}of e){let h=this.webglRenderer.curModelGraph.nodesById[u.fromNodeId],p=this.webglRenderer.curModelGraph.nodesById[u.toNodeId];if(!Et(h)||!Et(p))continue;let f="?";if(u.label!=null){if(f=u.label,f==="")continue}else{let E=h.outputsMetadata||{};for(let A of Object.keys(E))if((h.outgoingEdges||[]).find(F=>F.sourceNodeOutputId===A&&F.targetNodeId===u.toNodeId)!=null){f=E[A].shape||"?",f=f.split("").map(F=>(F==="x"&&(F="x"),F==="\u2217"&&(F="*"),F===""&&(F=""),d[F]==null?"?":F)).join("");break}}let m=u.curvePoints||[],b=h.globalX||0,g=h.globalY||0,_=new J_.CurvePath;for(let E=0;E1,D=()=>{let E=_.getPointAt(.5),A=E.x,Q=m[0].y===m[m.length-1].y?E.y-10-r:E.y;c.push({id:`${u.id}_${f}`,nodeId:u.toNodeId,label:f,height:a,hAlign:"center",vAlign:"center",weight:_n.MEDIUM,x:A,y:o,z:Q,color:n,borderColor:{r:1,g:1,b:1}})};if(T)D();else{let E=[],A=Math.max(0,Math.min(.25,1-f.length*C-5/x)),Q=Math.max(.05,1-5/x-A-C*f.length),F=.05,z=!0,O=a/this.edgeTexts.getFontSize();for(let G=0;G=Math.PI/4&&Ee<=Math.PI*1.75){z=!1;break}if(E.push({pos:de,position:Math.min(k,1),angle:Ee,tan:Te,char:K}),Y!=null){let je=Math.abs(Ee-Y);if(Math.min(je,Math.abs(je-Math.PI))>.15&&(z=!1,G+.05=E[E.length-1].pos.x;if(G){let $=[],Y=E[0].position;for(let k=f.length-1;k>=0;k--){let j=f[k],K=_.getPointAt(Math.min(1,Y)),de=_.getTangentAt(Math.min(1,Y)),Te=(Math.PI*2-Math.atan(de.y/de.x))%(Math.PI*2);Te<0&&(Te+=Math.PI*2),$.push({pos:K,angle:Te,tan:de,position:Y,char:j});let Ee=d[j],Ge=0;k>=1&&(Ge=d[f[k-1]].xadvance);let he=(Ee.xadvance/2+Ge/2)*O/x;Y+=he}E=$}for(let $=0;${class i{EDGE_COLOR_INCOMING=new af.Color("#009e73");EDGE_TEXT_COLOR_INCOMING=new af.Color("#125341");EDGE_COLOR_OUTGOING=new af.Color("#d55e00");EDGE_TEXT_COLOR_OUTGOING=new af.Color("#994d11");inputsRenderedEdges=[];outputsRenderedEdges=[];inputsByHighlightedNode={};outputsByHighlightedNode={};webglRenderer;webglRendererThreejsService;threejsService=S(Zi);ioPickerBgs=new Fi(99);ioPickerTexts=new Bi(this.threejsService);incomingHighlightedEdges=new hl(this.EDGE_COLOR_INCOMING,l5);outgoingHighlightedEdges=new hl(this.EDGE_COLOR_OUTGOING,l5);incomingHighlightedEdgeTexts=new Bi(this.threejsService);outgoingHighlightedEdgeTexts=new Bi(this.threejsService);init(e){this.webglRenderer=e,this.webglRendererThreejsService=e.webglRendererThreejsService}updateIncomingAndOutgoingHighlights(){if(!this.webglRenderer.curModelGraph)return;if(this.clearIncomingAndOutgoingHighlights(),!this.shouldUpdateIncomingAndOutgoingEdgesHighlights()){this.incomingHighlightedEdges.clearSavedDataForAnimation(),this.outgoingHighlightedEdges.clearSavedDataForAnimation(),this.incomingHighlightedEdgeTexts.clearSavedDataForAnimation(),this.outgoingHighlightedEdgeTexts.clearSavedDataForAnimation(),this.ioPickerBgs.clearSavedDataForAnimation(),this.ioPickerTexts.clearSavedDataForAnimation();return}let e=this.webglRenderer.appService.config()?.showOpNodeOutOfLayerEdgesWithoutSelecting,n=this.getHighlightedIncomingNodesAndEdges(this.webglRenderer.curHiddenInputOpNodeIds,void 0,{reuseRenderedEdgeCurvePoints:e});if(n.overlayEdges.length>0){let a=n.overlayEdges.map(l=>e?{edge:l,index:95/Zt}:{edge:at(X({},l),{curvePoints:wh(l.points,Qh,Zh,af)}),index:95/Zt});if(this.incomingHighlightedEdges.generateMesh(a,this.webglRenderer.curModelGraph),this.webglRendererThreejsService.addToScene(this.incomingHighlightedEdges.edgesMesh),this.webglRendererThreejsService.addToScene(this.incomingHighlightedEdges.arrowHeadsMesh),this.webglRenderer.curShowOnEdgeItemTypes[Bl.TENSOR_SHAPE]?.selected){let l=this.webglRenderer.webglRendererEdgeTextsService.genLabelsOnEdges(a,this.EDGE_TEXT_COLOR_INCOMING);this.incomingHighlightedEdgeTexts.generateMesh(l,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.incomingHighlightedEdgeTexts.mesh)}}this.inputsByHighlightedNode=n.inputsByHighlightedNode,this.inputsRenderedEdges=n.renderedEdges;let r=this.getHighlightedOutgoingNodesAndEdges(this.webglRenderer.curHiddenOutputIds,void 0,{reuseRenderedEdgeCurvePoints:e});if(r.overlayEdges.length>0){let a=r.overlayEdges.map(l=>e?{edge:l,index:95/Zt}:{edge:at(X({},l),{curvePoints:wh(l.points,Qh,Zh,af)}),index:95/Zt});if(this.outgoingHighlightedEdges.generateMesh(a,this.webglRenderer.curModelGraph),this.webglRendererThreejsService.addToScene(this.outgoingHighlightedEdges.edgesMesh),this.webglRendererThreejsService.addToScene(this.outgoingHighlightedEdges.arrowHeadsMesh),this.webglRenderer.curShowOnEdgeItemTypes[Bl.TENSOR_SHAPE]?.selected){let l=this.webglRenderer.webglRendererEdgeTextsService.genLabelsOnEdges(a,this.EDGE_TEXT_COLOR_OUTGOING);this.outgoingHighlightedEdgeTexts.generateMesh(l,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.outgoingHighlightedEdgeTexts.mesh)}}this.outputsByHighlightedNode=r.outputsByHighlightedNode,this.outputsRenderedEdges=r.renderedEdges;let o=[],s=[];for(let a of Object.keys(X(X({},this.inputsByHighlightedNode),this.outputsByHighlightedNode))){let l=this.webglRenderer.curModelGraph.nodesById[a];if(wt(l)){let c=lhe,d=HP,u=this.inputsByHighlightedNode[a]!=null,h=u?this.inputsByHighlightedNode[a].length:this.outputsByHighlightedNode[a].length;o.push({id:`${a}${LC}${u?"input":"output"}`,index:o.length,bound:{x:this.webglRenderer.getNodeX(l)+c/2,y:this.webglRenderer.getNodeY(l)-d/4,width:c,height:d},yOffset:95,isRounded:!0,borderColor:{r:1,g:1,b:1},bgColor:u?this.EDGE_COLOR_INCOMING:this.EDGE_COLOR_OUTGOING,borderWidth:0,opacity:1}),s.push({id:`${a}${LC}${u?"input":"output"}`,nodeId:a,label:`${h} ${u?"input":"output"}${h!==1?"s":""}`,height:8,hAlign:"center",vAlign:"center",weight:_n.MEDIUM,color:{r:1,g:1,b:1},x:this.webglRenderer.getNodeX(l)+c/2,y:96,z:this.webglRenderer.getNodeY(l)-d/4+1})}}this.ioPickerTexts.generateMesh(s,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.ioPickerTexts.mesh),this.ioPickerBgs.generateMesh(o,!0,!1,!1,!0),this.webglRendererThreejsService.addToScene(this.ioPickerBgs.mesh),this.webglRendererThreejsService.addToScene(this.ioPickerBgs.meshForRayCasting),this.webglRenderer.animateIntoPositions(a=>{this.incomingHighlightedEdges.updateAnimationProgress(a),this.outgoingHighlightedEdges.updateAnimationProgress(a),this.incomingHighlightedEdgeTexts.updateAnimationProgress(a),this.outgoingHighlightedEdgeTexts.updateAnimationProgress(a),this.ioPickerBgs.updateAnimationProgress(a),this.ioPickerTexts.updateAnimationProgress(a)})}handleClickIoPicker(e,n){e?this.inputsByHighlightedNode[n].length===1?this.webglRenderer.sendLocateNodeRequest(this.inputsByHighlightedNode[n][0].id,this.webglRenderer.rendererId):this.webglRenderer.showIoTree(this.webglRenderer.ioPicker.nativeElement,this.inputsByHighlightedNode[n],"incoming"):this.outputsByHighlightedNode[n].length===1?this.webglRenderer.sendLocateNodeRequest(this.outputsByHighlightedNode[n][0].id,this.webglRenderer.rendererId):this.webglRenderer.showIoTree(this.webglRenderer.ioPicker.nativeElement,this.outputsByHighlightedNode[n],"outgoing")}getHighlightedIncomingNodesAndEdges(e,n,r){let o=r?.ignoreEdgesWithinSameNamespace??!1,s=r?.reuseRenderedEdgeCurvePoints??!1;n||(n=this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.selectedNodeId]);let a=[],l=[],c={},d=[];for(let u of n.incomingEdges||[]){if(e[u.sourceNodeId])continue;let h=this.webglRenderer.curModelGraph.nodesById[u.sourceNodeId];if(!h||o&&h.namespace===n.namespace)continue;let p=lT(h.namespace,n.namespace),f=this.getLastCollapsedAncestorNode(h,p);l.push(f),c[f.id]==null&&(c[f.id]=[]),c[f.id].push(h);let m=this.findEdgeConnectingTwoNodesInNamespace(p,h.id,n.id),b=[],g=[];if(m){a.push(m);let _=m.curvePoints||[],x=this.webglRenderer.curModelGraph.nodesById[m.fromNodeId];if(m.fromNodeId!==f.id){let D=m.points[0].x+(x.globalX||0),E=m.points[0].y+(x.globalY||0),A=this.getBestAnchorPointOnNode(D,E,f);b.push({x:A.x-(f.globalX||0),y:A.y-(f.globalY||0)}),s&&g.push({x:A.x-(f.globalX||0),y:A.y-(f.globalY||0)},{x:_[0].x-(f.globalX||0)+(x.globalX||0),y:_[0].y-(f.globalY||0)+(x.globalY||0)})}let C=b,T=m.points;if(s&&(C=g,T=_),C.push(...T.map(D=>({x:D.x-(f.globalX||0)+(x.globalX||0),y:D.y-(f.globalY||0)+(x.globalY||0)}))),m.toNodeId!==n?.id){let D=m.points[m.points.length-1].x+(x.globalX||0),E=m.points[m.points.length-1].y+(x.globalY||0),A=this.getBestAnchorPointOnNode(D,E,n);s?g.push({x:_[_.length-1].x-(f.globalX||0)+(x.globalX||0),y:_[_.length-1].y-(f.globalY||0)+(x.globalY||0)},{x:A.x-(f.globalX||0),y:A.y-(f.globalY||0)}):b.push({x:A.x-(f.globalX||0),y:A.y-(f.globalY||0)})}}else(wt(f)||Et(f)&&!f.hideInLayout)&&(s?g:b).push(...this.getDirectEdgeBetweenNodes(f,n));s?g.length>0&&d.push({id:`overlay_${f.id}___${n.id}`,fromNodeId:f.id,toNodeId:n.id,points:[],curvePoints:g,type:"incoming"}):b.length>0&&d.push({id:`overlay_${f.id}___${n.id}`,fromNodeId:f.id,toNodeId:n.id,points:b,type:"incoming"})}return{renderedEdges:a,highlightedNodes:l,inputsByHighlightedNode:c,overlayEdges:d}}getHighlightedOutgoingNodesAndEdges(e,n,r){let o=r?.ignoreEdgesWithinSameNamespace??!1,s=r?.reuseRenderedEdgeCurvePoints??!1;n||(n=this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.selectedNodeId]);let a=[],l=[],c={},d=[];for(let u of n.outgoingEdges||[]){if(e[u.sourceNodeOutputId])continue;let h=this.webglRenderer.curModelGraph.nodesById[u.targetNodeId];if(!h||o&&h.namespace===n.namespace)continue;let p=lT(h.namespace,n.namespace),f=this.getLastCollapsedAncestorNode(h,p);l.push(f),c[f.id]==null&&(c[f.id]=[]),c[f.id].push(h);let m=this.findEdgeConnectingTwoNodesInNamespace(p,n.id,h.id),b=[],g=[];if(m){a.push(m);let _=m.curvePoints||[],x=this.webglRenderer.curModelGraph.nodesById[m.fromNodeId];if(m.fromNodeId!==n?.id){let D=m.points[0].x+(x.globalX||0),E=m.points[0].y+(x.globalY||0),A=this.getBestAnchorPointOnNode(D,E,n);b.push({x:A.x-(n.globalX||0),y:A.y-(n.globalY||0)}),s&&g.push({x:A.x-(n.globalX||0),y:A.y-(n.globalY||0)},{x:_[0].x-(n.globalX||0)+(x.globalX||0),y:_[0].y-(n.globalY||0)+(x.globalY||0)})}let C=b,T=m.points;if(s&&(C=g,T=_),C.push(...T.map(D=>({x:D.x-(n.globalX||0)+(x.globalX||0),y:D.y-(n.globalY||0)+(x.globalY||0)}))),m.toNodeId!==f.id){let D=m.points[m.points.length-1].x+(x.globalX||0),E=m.points[m.points.length-1].y+(x.globalY||0),A=this.getBestAnchorPointOnNode(D,E,f);s?g.push({x:_[_.length-1].x-(n.globalX||0)+(x.globalX||0),y:_[_.length-1].y-(n.globalY||0)+(x.globalY||0)},{x:A.x-(n.globalX||0),y:A.y-(n.globalY||0)}):b.push({x:A.x-(n.globalX||0),y:A.y-(n.globalY||0)})}}else(wt(f)||Et(f)&&!f.hideInLayout)&&(s?g:b).push(...this.getDirectEdgeBetweenNodes(n,f));s?g.length>0&&d.push({id:`overlay_${n.id}___${f.id}`,fromNodeId:n.id,toNodeId:f.id,points:[],curvePoints:g,type:"outgoing"}):b.length>0&&d.push({id:`overlay_${n.id}___${f.id}`,fromNodeId:n.id,toNodeId:f.id,points:b,type:"outgoing"})}return{renderedEdges:a,highlightedNodes:l,outputsByHighlightedNode:c,overlayEdges:d}}getLastCollapsedAncestorNode(e,n){let r=e,o=[];for(;r&&(wt(r)&&!r.expanded&&o.push(r),r.namespace!==n);)r=this.webglRenderer.curModelGraph.nodesById[r.nsParentId||""];return o.length>0?o[o.length-1]:e}shouldUpdateIncomingAndOutgoingEdgesHighlights(){if(!this.webglRenderer.selectedNodeId)return!1;let e=this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.selectedNodeId];if(wt(e))return!1;let n=this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.rootNodeId||""];return!(n&&wt(n)&&!(n.descendantsOpNodeIds||[]).includes(this.webglRenderer.selectedNodeId)||!this.webglRenderer.isNodeRendered(this.webglRenderer.selectedNodeId))}clearIncomingAndOutgoingHighlights(){this.incomingHighlightedEdges.clear(),this.outgoingHighlightedEdges.clear(),this.inputsByHighlightedNode={},this.outputsByHighlightedNode={},this.inputsRenderedEdges=[],this.outputsRenderedEdges=[];for(let e of[this.ioPickerBgs.mesh,this.ioPickerBgs.meshForRayCasting,this.ioPickerTexts.mesh,this.incomingHighlightedEdgeTexts.mesh,this.outgoingHighlightedEdgeTexts.mesh])e&&(e.geometry&&e.geometry.dispose(),this.webglRendererThreejsService.removeFromScene(e));this.ioPickerBgs.meshForRayCasting=void 0}findEdgeConnectingTwoNodesInNamespace(e,n,r){let o=e===""?"":`${e}___group___`;return(this.webglRenderer.curModelGraph.edgesByGroupNodeIds[o]??[]).find(s=>{let a=this.webglRenderer.curModelGraph.nodesById[s.fromNodeId],l=this.webglRenderer.curModelGraph.nodesById[s.toNodeId],c=this.containNode(a,n),d=this.containNode(l,r);return c&&d})}containNode(e,n){return Et(e)&&e.id===n||wt(e)&&(e.descendantsOpNodeIds||[]).includes(n)}getDirectEdgeBetweenNodes(e,n){let r=[],o=e.globalX||0,s=e.globalY||0,a=e.width||0,l=e.height||0,c=n.globalX||0,d=n.globalY||0,u=n.width||0,h=n.height||0,p=o+a/2,f=d>s?s+l:s,m=c+u/2,b=d>s?d:d+h;return r.push({x:p+(e.x||0)-o,y:f+(e.y||0)-s},{x:m+(n.x||0)-o,y:b+(n.y||0)-s}),r}getBestAnchorPointOnNode(e,n,r){let o=this.webglRenderer.getNodeX(r),s=this.webglRenderer.getNodeY(r),a=this.webglRenderer.getNodeWidth(r),l=this.webglRenderer.getNodeHeight(r),c=[{point:{x:o+a/2,y:s},distance:0,direction:"horizontal"},{point:{x:o+a,y:s+l/2},distance:0,direction:"vertical"},{point:{x:o+a/2,y:s+l},distance:0,direction:"horizontal"},{point:{x:o,y:s+l/2},distance:0,direction:"vertical"}];for(let d of c)d.distance=this.getDistanceSquared(e,n,d.point.x,d.point.y);if(c.sort((d,u)=>d.distance-u.distance),c[0].direction!==c[1].direction){let d=this.getAngle(e,n,c[0].point.x,c[0].point.y,c[0].direction),u=this.getAngle(e,n,c[1].point.x,c[1].point.y,c[1].direction);return d>=u?c[0].point:c[1].point}return c[0].point}getAngle(e,n,r,o,s){return Math.atan(s==="horizontal"?Math.abs(o-n)/Math.abs(r-e):Math.abs(r-e)/Math.abs(o-n))}getDistanceSquared(e,n,r,o){return Math.pow(e-r,2)+Math.pow(n-o,2)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var GP=HP,c5=68,jP=En,BC=(()=>{class i{IDENTICAL_GROUPS_BG_COLOR=new jP.Color("#e2edff");IDENTICAL_GROUPS_INDICATOR_BG_COLOR=new jP.Color("#e3e3e3");IDENTICAL_GROUPS_INDICATOR_BORDER_COLOR=new jP.Color("#ccc");webglRenderer;webglRendererThreejsService;threejsService=S(Zi);identicalLayerIndicatorBgs=new Fi(99);identicalLayerIndicatorTexts=new Bi(this.threejsService);init(e){this.webglRenderer=e,this.webglRendererThreejsService=e.webglRendererThreejsService}updateIdenticalLayerIndicators(){if(!this.webglRenderer.curModelGraph)return;this.clearIdenticalLayerIndicators();let e=this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.selectedNodeId],n=[],r=[];if(wt(e)&&e?.identicalGroupIndex!=null){let o=e.identicalGroupIndex,s=this.webglRenderer.nodesToRender.filter(({node:a})=>wt(a)&&a.identicalGroupIndex===o).map(({node:a})=>this.webglRenderer.curModelGraph.nodesById[a.id]);for(let a of s){if(a.id===e.id)continue;let l=this.webglRenderer.getNodeX(a)+c5/2,c=this.webglRenderer.getNodeY(a)-GP/2+GP/4;n.push({id:a.id,index:n.length,bound:{x:l,y:c,width:c5,height:GP},yOffset:95,isRounded:!0,borderColor:this.IDENTICAL_GROUPS_INDICATOR_BORDER_COLOR,bgColor:this.IDENTICAL_GROUPS_INDICATOR_BG_COLOR,borderWidth:1,opacity:1}),r.push({id:a.id,label:"Identical layer",height:8,hAlign:"center",vAlign:"center",weight:_n.MEDIUM,color:{r:0,g:0,b:0},x:l,y:96,z:c})}}this.identicalLayerIndicatorBgs.generateMesh(n,!1,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.identicalLayerIndicatorBgs.mesh),this.identicalLayerIndicatorTexts.generateMesh(r,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.identicalLayerIndicatorTexts.mesh),this.webglRenderer.animateIntoPositions(o=>{this.identicalLayerIndicatorBgs.updateAnimationProgress(o),this.identicalLayerIndicatorTexts.updateAnimationProgress(o)})}clearIdenticalLayerIndicators(){for(let e of[this.identicalLayerIndicatorBgs.mesh,this.identicalLayerIndicatorTexts.mesh])e&&(e.geometry&&e.geometry.dispose(),this.webglRendererThreejsService.removeFromScene(e))}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var VC=(()=>{class i{curIoTracingData;webglRenderer;init(e){this.webglRenderer=e}genTracingData(){if(!this.webglRenderer.selectedNodeId||!Et(this.webglRenderer.curModelGraph.nodesById[this.webglRenderer.selectedNodeId]))return;let e=new Set,n=new Set,r=[this.webglRenderer.selectedNodeId];for(;r.length>0;){let s=r.shift();if(n.has(s))continue;n.add(s);let a=this.webglRenderer.curModelGraph.nodesById[s];a.hideInLayout||e.add(s);for(let l of a.incomingEdges||[])r.push(l.sourceNodeId)}let o=new Set;for(r=[this.webglRenderer.selectedNodeId];r.length>0;){let s=r.shift();if(o.has(s))continue;o.add(s);let a=this.webglRenderer.curModelGraph.nodesById[s];a.hideInLayout||e.add(s);for(let l of a.outgoingEdges||[])r.push(l.targetNodeId)}for(let s of[...e]){let a=s;for(;;){let l=this.webglRenderer.curModelGraph.nodesById[a];if(!l.nsParentId||e.has(l.nsParentId))break;a=l.nsParentId,e.add(a)}}this.curIoTracingData={tracedNodeId:this.webglRenderer.selectedNodeId,visibleNodeIds:e}}clearTracingData(){this.curIoTracingData=void 0}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var hhe="/api/v1/read_text_file",phe="/api/v1/load_node_data",Rr=(()=>{class i{appService;runs=et({});remoteSourceLoading=et(!1);leftPaneModelGraph$=tb(Ot(()=>this.appService.panes()[0].modelGraph));rightPaneModelGraph$=tb(Ot(()=>{let e=this.appService.panes();if(!(e.length<=1))return e[1].modelGraph}));constructor(e){this.appService=e,this.leftPaneModelGraph$.subscribe(n=>{n!=null&&this.handleModelGraphInPaneChanged(n,0)}),this.rightPaneModelGraph$.subscribe(n=>{n!=null&&this.handleModelGraphInPaneChanged(n,1)})}addRun(e,n,r,o,s,a=!1,l){let c=o.collectionLabel;this.runs.update(d=>{if(a){let h=[];for(let[p,f]of Object.entries(d))a&&f.collectionId===c&&h.push(p);for(let p of h)delete d[p]}d[e]={runId:e,runName:n,done:s!=null,results:s==null?void 0:{[o.id]:this.processNodeDataProviderDataForGraph(o,s)},extensionId:r,collectionId:c,remotePath:l,nodeDataProviderData:s};let u=this.appService.panes();for(let h of u)h.modelGraph?.id===o.id&&h.modelGraph?.collectionLabel===o.collectionLabel&&this.appService.setSelectedNodeDataProviderRunId(h.id,e);return X({},d)})}updateRunResults(e,n,r,o){this.runs.update(s=>{let a=s[e];return a.done=!0,a.nodeDataProviderData=n,a.results==null&&(a.results={}),a.results[r.id]=this.processNodeDataProviderDataForGraph(r,n),o&&(a.error=o),X({},s)})}addRunFromRemoteSource(e,n){return Ct(this,null,function*(){this.remoteSourceLoading.set(!0);let r=e.split("/"),o=r[r.length-1],s=`/read_file?path=${e}`;if(!0)if(e.startsWith("node_data://")){let d=e.replace("node_data://","").split("/");o=d[0];let u=Number(d[1]);s=`${phe}?node_data_index=${u}`}else s=`${hhe}?path=${e}`;let a=qi();this.addRun(a,o,"",n,void 0,!1,e);let l=yield fetch(s);if(!l.ok){this.updateRunResults(a,{[n.id]:{results:{}}},n,`Failed to load JSON file "${e}"`),this.remoteSourceLoading.set(!1);return}if(!0){let c=JSON.parse(yield l.text());if(c.error)this.updateRunResults(a,{[n.id]:{results:{}}},n,`Failed to process JSON file. ${c.error}`);else try{this.updateRunResults(a,this.getNodeDataProviderData(c.content,n),n),this.notifyRemoteNodeDataChanges()}catch(d){this.updateRunResults(a,{[n.id]:{results:{}}},n,`Failed to process JSON file. ${d}`)}}else{let c=JSON.parse((yield l.text()).replace(`)]}' +`,""));try{this.updateRunResults(a,this.getNodeDataProviderData(c.content,n),n),this.notifyRemoteNodeDataChanges()}catch(d){this.updateRunResults(a,{[n.id]:{results:{}}},n,`Failed to process JSON file. ${d}`)}}this.remoteSourceLoading.set(!1)})}deleteRun(e){this.runs.update(n=>(delete n[e],X({},n))),this.notifyRemoteNodeDataChanges();for(let n of this.appService.panes())if(n.selectedNodeDataProviderRunId===e){let r=this.getRunsForModelGraph(n.modelGraph);this.appService.setSelectedNodeDataProviderRunId(n.id,r.length>0?r[0].runId:void 0)}}getSelectedRunForModelGraph(e,n){let r=this.appService.getSelectedNodeDataProviderRunId(e);return r?this.getRunsForModelGraph(n).find(s=>s.runId===r):void 0}getRunsForModelGraph(e){let n=[],r=this.runs();for(let o of Object.values(r)){if(o.collectionId!==e.collectionLabel)continue;let s=o.nodeDataProviderData;s&&s[e.id]!=null&&n.push(o)}return n}processNodeDataProviderDataForGraph(e,n){this.genOutputTensorIdToNodeIdMap(e);let r={},o=n[e.id];if(!o)return{};let s=[];for(let c of o.gradient||[]){let d={stop:c.stop};c.bgColor!=null&&(d.bgColor=this.getRgbFromColor(c.bgColor,"#ffffff")),c.textColor!=null&&(d.textColor=this.getRgbFromColor(c.textColor,"#000000")),s.push(d)}s.sort((c,d)=>c.stop-d.stop);let a=Number.POSITIVE_INFINITY,l=Number.NEGATIVE_INFINITY;if(s.length>0)for(let{value:c}of Object.values(o.results))typeof c=="number"&&(a=Math.min(a,c),l=Math.max(l,c));for(let c of Object.keys(o.results)){let d=o.results[c];if(typeof d.value=="number"&&d.bgColor==null&&(d.bgColor=this.getBgColor(d.value,o.thresholds||[],s,a,l)),typeof d.value=="number"&&d.textColor==null&&(d.textColor=this.getTextColor(d.value,o.thresholds||[],s,a,l)),(d.textColor==null||d.textColor==="")&&d.bgColor!=null){let b=this.getRgbFromColor(d.bgColor,"#ffffff");b!=null&&Math.pow(b.r/255,2.2)*.2126+Math.pow(b.g/255,2.2)*.7152+Math.pow(b.b/255,2.2)*.0722<.38&&(d.textColor="#ffffff")}let u="-",h=d.value;typeof h=="number"||typeof h=="boolean"||typeof h=="string"?u=`${h}`:u=JSON.stringify(h),u=u;let f=`${(e.outputTensorIdToNodeId||{})[c]??c}`,m=r[f];if(!m)r[f]=at(X({},d),{strValue:u,allValues:{[c]:d.value}});else{let b=m.allValues;b[c]=d.value,r[f]={value:d.value,bgColor:d.bgColor,textColor:d.textColor,allValues:b,strValue:`${m.strValue}, ${u}`}}}return r}getBgColor(e,n,r,o,s){if(r.length>0)return this.getColorFromGradient(e,r,o,s,!0,"transparent");for(let a of n)if(e<=a.value)return a.bgColor;return"transparent"}getTextColor(e,n,r,o,s){if(r.length>0)return this.getColorFromGradient(e,r,o,s,!1,"");for(let a of n)if(e<=a.value)return a.textColor||"";return""}getColorFromGradient(e,n,r,o,s,a){let l=(e-r)/(o-r);for(let c=0;c=d.stop&&l<=u.stop){if(h==null||p==null)return a;let f=(l-d.stop)/(u.stop-d.stop),m=Math.floor(h.r+(p.r-h.r)*f),b=Math.floor(h.g+(p.g-h.g)*f),g=Math.floor(h.b+(p.b-h.b)*f);return`#${this.numToHex(m)}${this.numToHex(b)}${this.numToHex(g)}`}}return a}genOutputTensorIdToNodeIdMap(e){if(e.outputTensorIdToNodeId==null){e.outputTensorIdToNodeId={};for(let n of e.nodes)if(Et(n)){let r=n.outputsMetadata||{};for(let o of Object.keys(r)){let a=r[o].tensor_name;a!=null&&(e.outputTensorIdToNodeId[a]=n.id)}}}}handleModelGraphInPaneChanged(e,n){let r=this.getRunsForModelGraph(e);if(r.length>0){for(let o of r)o.results==null&&(o.results={}),o.results[e.id]==null&&o.nodeDataProviderData!=null&&(o.results[e.id]=this.processNodeDataProviderDataForGraph(e,o.nodeDataProviderData));this.appService.setSelectedNodeDataProviderRunId(this.appService.panes()[n].id,r[0].runId)}}getRgbFromColor(e,n){let r=e;return e.startsWith("#")||(r=ab[e]),r||(r=n),r=r.replace("#",""),{r:this.hexStrToInt(r.substring(0,2)),g:this.hexStrToInt(r.substring(2,4)),b:this.hexStrToInt(r.substring(4,6))}}numToHex(e){let n=e.toString(16);return n.length===1?`0${n}`:n}hexStrToInt(e){return/^[a-fA-F0-9]+$/.test(e)?parseInt(e,16):255}getNodeDataProviderData(e,n){let r=JSON.parse(e),o={};return r.results!=null&&r.results.results==null?n&&(o[n.id]=r):o=r,o}notifyRemoteNodeDataChanges(){let e=Object.values(this.runs()).filter(n=>n.remotePath!=null).map(n=>n.remotePath);this.appService.remoteNodeDataPaths.set(e)}static \u0275fac=function(n){return new(n||i)(Le(nt))};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var fhe=Zt*.5,mhe=En,zC=(()=>{class i{nodeDataProviderExtensionService;curNodeDataProviderResults=Ot(()=>this.webglRenderer?(this.nodeDataProviderExtensionService.getSelectedRunForModelGraph(this.webglRenderer.paneId,this.webglRenderer.curModelGraph)?.results||{})[this.webglRenderer.curModelGraph.id]:void 0);webglRenderer;webglRendererThreejsService;nodeDataProviderDistributionBars=new Fi(0);constructor(e){this.nodeDataProviderExtensionService=e}init(e){this.webglRenderer=e,this.webglRendererThreejsService=e.webglRendererThreejsService}renderNodeDataProviderDistributionBars(){let e=this.curNodeDataProviderResults()||{};if(Object.keys(e).length===0)return;let{groupIdToDescendantsBgColorCounts:n,sortedBgColors:r}=this.genGroupIdToDescendantsBgColorCounts(),o=[];for(let{node:s,index:a}of this.webglRenderer.nodesToRender){if(!n[s.id])continue;let l=s,c=l.width||0,d=n[s.id],u=0;for(let f of Object.values(d))u+=f;let h=0,p=0;for(let f of r){if(d[f]==null||f==="transparent")continue;let b=d[f]/u*c,g=J1,_=h;o.push({id:`${s.id}_${p}`,index:o.length,bound:{x:this.webglRenderer.getNodeX(l)+_+b/2,y:this.webglRenderer.getNodeY(l)+this.webglRenderer.getNodeHeight(l)-J1+g/2,width:b,height:g},yOffset:Zt*a+fhe,isRounded:!1,borderColor:{r:1,g:1,b:1},bgColor:new mhe.Color(f),borderWidth:0,opacity:1}),h+=b,p++}}this.nodeDataProviderDistributionBars.generateMesh(o),this.webglRendererThreejsService.addToScene(this.nodeDataProviderDistributionBars.mesh)}updateAnimationProgress(e){this.nodeDataProviderDistributionBars.updateAnimationProgress(e)}genGroupIdToDescendantsBgColorCounts(){let e=this.curNodeDataProviderResults()||{},n={},r=new Set;for(let{node:o}of this.webglRenderer.nodesToRender)if(wt(o)&&!o.expanded){let s={};for(let a of o.descendantsOpNodeIds||[]){let l=this.webglRenderer.curModelGraph.nodesById[a],c=e[l.id]?.bgColor||"";c&&(s[c]==null&&(s[c]=0),s[c]++,r.add(c))}n[o.id]=s}return{groupIdToDescendantsBgColorCounts:n,sortedBgColors:[...r].sort((o,s)=>o.localeCompare(s))}}static \u0275fac=function(n){return new(n||i)(Le(Rr))};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var _he=-Zt*.3,vhe=Zt*.3,yhe=En,UC=(()=>{class i{appService;SEARCH_RESULTS_HIGHLIGHT_COLOR=new yhe.Color("#f5d55a");searchResultsHighlightBorders=new Fi(8);searchResultsNodeLabelHighlightBg=new Fi(4);webglRenderer;webglRendererThreejsService;curSearchResults=void 0;constructor(e){this.appService=e}init(e){this.webglRenderer=e,this.webglRendererThreejsService=e.webglRendererThreejsService,ct(()=>{let n=this.appService.getPaneById(this.webglRenderer.paneId);!n||!n.modelGraph||this.curSearchResults!==n.searchResults&&(this.curSearchResults=n.searchResults,this.renderSearchResults(),this.webglRendererThreejsService.render())})}renderSearchResults(){if(!this.curSearchResults)return;this.clearSearchResults();let e=new Set;for(let s of Object.keys(this.curSearchResults.results)){let a=this.webglRenderer.curModelGraph.nodesById[s];if(this.webglRenderer.isNodeRendered(s))e.add(s);else{let l=a;for(;l&&(l=this.webglRenderer.curModelGraph.nodesById[l.nsParentId||""],!(!l||this.webglRenderer.isNodeRendered(l.id))););e.add(l.id)}}let n=[];for(let s of e){let a=this.webglRenderer.curModelGraph.nodesById[s],l=this.webglRenderer.nodesToRenderMap[s].index,c=this.webglRenderer.getNodeX(a)-2,d=this.webglRenderer.getNodeY(a)-2,u=this.webglRenderer.getNodeWidth(a)+4,h=this.webglRenderer.getNodeHeight(a)+4;n.push({id:s,index:n.length,bound:{x:c+u/2,y:d+h/2,width:u,height:h},yOffset:Zt*l+_he,isRounded:!0,borderColor:{r:1,g:1,b:1},bgColor:this.SEARCH_RESULTS_HIGHLIGHT_COLOR,borderWidth:0,opacity:1})}this.searchResultsHighlightBorders.generateMesh(n),this.webglRendererThreejsService.addToScene(this.searchResultsHighlightBorders.mesh);let r=[],o=Go/this.webglRenderer.texts.getFontSize();for(let s of Object.keys(this.curSearchResults.results)){if(!this.webglRenderer.isNodeRendered(s))continue;let a=this.curSearchResults.results[s];for(let l of a)if(l.type===xt.NODE_LABEL){let c=this.webglRenderer.curModelGraph.nodesById[s],d=this.webglRenderer.nodesToRenderMap[s].index,u=this.webglRenderer.getNodeX(c)+this.webglRenderer.getNodeWidth(c)/2,h=0,p=0,f=0,m=md(c.label);if(m.length===1){let b=this.webglRenderer.texts.getLabelSizes(c.label,wt(c)?_n.BOLD:_n.MEDIUM,Go).sizes;f=(b.maxX-b.minX)*o+4,p=(b.maxZ-b.minZ)*o+4,h=this.webglRenderer.getNodeY(c)+this.webglRenderer.getNodeLabelRelativeY(c)-2*o}else{let{minX:b,maxX:g}=this.webglRenderer.getNodeLabelSizes(c);f=(g-b)*o+4,p=m.length*xh+4,h=this.webglRenderer.getNodeY(c)+p/2+4.5-2*o}r.push({id:s,index:n.length,bound:{x:u,y:h,width:f,height:p},yOffset:Zt*d+vhe,isRounded:!0,borderColor:{r:1,g:1,b:1},bgColor:this.SEARCH_RESULTS_HIGHLIGHT_COLOR,borderWidth:0,opacity:1})}}this.searchResultsNodeLabelHighlightBg.generateMesh(r),this.webglRendererThreejsService.addToScene(this.searchResultsNodeLabelHighlightBg.mesh),this.webglRenderer.animateIntoPositions(s=>{this.searchResultsHighlightBorders.updateAnimationProgress(s),this.searchResultsNodeLabelHighlightBg.updateAnimationProgress(s)})}clearSearchResults(){for(let e of[this.searchResultsHighlightBorders.mesh,this.searchResultsNodeLabelHighlightBg.mesh])e&&(e.geometry&&e.geometry.dispose(),this.webglRendererThreejsService.removeFromScene(e))}static \u0275fac=function(n){return new(n||i)(Le(nt))};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var d5=320,HC=(()=>{class i{appService;destroyRef;webglRenderer;webglRendererThreejsService;constructor(e,n){this.appService=e,this.destroyRef=n}init(e){this.webglRenderer=e,this.webglRendererThreejsService=e.webglRendererThreejsService,this.appService.addSnapshotClicked.pipe(fi(this.destroyRef)).subscribe(n=>{n.rendererId===this.webglRenderer.rendererId&&this.addSnapshot()}),this.appService.curSnapshotToRestore.pipe(fi(this.destroyRef)).subscribe(n=>{n.rendererId===this.webglRenderer.rendererId&&this.restoreSnapshot(n.snapshot)})}addSnapshot(){return Ct(this,null,function*(){this.webglRenderer.flash();let e=yield this.takeSnapshot();this.webglRenderer.appService.addSnapshot(e,this.webglRenderer.curModelGraph.id,this.webglRenderer.paneId)})}takeSnapshot(){return Ct(this,null,function*(){let e=this.webglRenderer.container.nativeElement,n=this.webglRendererThreejsService.convertScreenPosToScene(0,0),r=this.webglRendererThreejsService.convertScreenPosToScene(e.clientWidth,e.clientHeight),o={x:n.x,y:n.y,width:r.x-n.x,height:r.y-n.y},s=[];Bm(void 0,this.webglRenderer.curModelGraph,s);let a=this.webglRenderer.canvas.nativeElement,l=this.webglRenderer.snapshotCanvas.nativeElement,c=d5,d=d5/a.width*a.height;this.webglRendererThreejsService.renderSnapshot(c,d);let u=window.devicePixelRatio,h=new OffscreenCanvas(c*u,d*u),p=h.getContext("2d");p.imageSmoothingQuality="high",p.drawImage(l,0,0,l.width,l.height,0,0,h.width,h.height);let f=yield createImageBitmap(h),m=this.webglRenderer.appService.getFlattenLayers(this.webglRenderer.paneId);return{id:qi(),rect:o,imageBitmap:f,selectedNodeId:this.webglRenderer.selectedNodeId,deepestExpandedGroupNodeIds:s,showOnNodeItemTypes:X({},this.webglRenderer.curShowOnNodeItemTypes),showOnEdgeItemTypes:X({},this.webglRenderer.curShowOnEdgeItemTypes),flattenLayers:m}})}restoreSnapshot(e){e.showOnNodeItemTypes&&(this.webglRenderer.curShowOnNodeItemTypes=X({},e.showOnNodeItemTypes),this.webglRenderer.appService.setShowOnNode(this.webglRenderer.paneId,this.webglRenderer.rendererId,this.webglRenderer.curShowOnNodeItemTypes)),e.showOnEdgeItemTypes&&(this.webglRenderer.curShowOnEdgeItemTypes=X({},e.showOnEdgeItemTypes),this.webglRenderer.appService.setShowOnEdge(this.webglRenderer.paneId,this.webglRenderer.rendererId,this.webglRenderer.curShowOnEdgeItemTypes));let n=this.webglRenderer.appService.getFlattenLayers(this.webglRenderer.paneId),r=e.flattenLayers===!0;n!==r?(this.webglRenderer.appService.processGraph(this.webglRenderer.paneId,r,e),this.webglRenderer.appService.setFlattenLayersInCurrentPane(r)):this.webglRenderer.sendRelayoutGraphRequest(e.selectedNodeId||"",e.deepestExpandedGroupNodeIds||[],!1,e.rect,!0,e.showOnNodeItemTypes)}static \u0275fac=function(n){return new(n||i)(Le(nt),Le(hi))};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var u5={r:1,g:1,b:1},GC=14,whe=En,jC=(()=>{class i{appService;subgraphSelectionService;SUBGRAPH_SELECTED_NODE_MARKER_BG_COLOR=new whe.Color("#09B83E");webglRenderer;webglRendererThreejsService;threejsService=S(Zi);curSubgraphSelectedNodeIds={};subgraphsSelectedNodeMarkerBgs=new Fi(99);subgraphSelectedNodeMarkerTexts=new Bi(this.threejsService);constructor(e,n){this.appService=e,this.subgraphSelectionService=n}init(e){this.webglRenderer=e,this.webglRendererThreejsService=e.webglRendererThreejsService,ct(()=>{this.curSubgraphSelectedNodeIds=this.subgraphSelectionService.selectedNodeIds(),this.renderSubgraphSelectedNodeMarkers()})}renderSubgraphSelectedNodeMarkers(){if(!this.enableSubgraphSelection)return;let e=Object.keys(this.curSubgraphSelectedNodeIds),n=new Set(e);if(this.clearSubgraphSelectedNodeMarkers(),e.length===0){this.webglRendererThreejsService.render();return}let r=[],o=new Set;for(let a of e){let c=this.webglRenderer.curModelGraph.nodesById[a];for(;;){let d=this.webglRenderer.curModelGraph.nodesById[c.nsParentId||""];if(d)o.add(d.id),c=d;else break}}let s=[];for(let a of o){if(!this.webglRenderer.isNodeRendered(a))continue;let l=this.webglRenderer.curModelGraph.nodesById[a],c=this.webglRenderer.getNodeX(l)+this.webglRenderer.getNodeWidth(l),d=this.webglRenderer.getNodeY(l),u=(l.descendantsOpNodeIds||[]).filter(f=>{let m=this.webglRenderer.curModelGraph.nodesById[f];return n.has(m.id)}).length;s.push({id:`${a}_subgraph_count_label`,nodeId:a,label:`${u}`,height:8,hAlign:"center",vAlign:"center",weight:_n.MEDIUM,color:this.webglRenderer.NODE_LABEL_COLOR,x:c,y:96,z:d+1});let h=GC*(u>=1e3?2:1.5),p=GC;r.push({id:a,index:r.length,bound:{x:c,y:d,width:h,height:p},yOffset:95.5,isRounded:!0,borderColor:this.SUBGRAPH_SELECTED_NODE_MARKER_BG_COLOR,bgColor:u5,borderWidth:1.5,opacity:1})}for(let a of e){if(!this.webglRenderer.isNodeRendered(a))continue;let l=this.webglRenderer.curModelGraph.nodesById[a],c=this.webglRenderer.getNodeX(l)+this.webglRenderer.getNodeWidth(l),d=this.webglRenderer.getNodeY(l),u=GC,h=GC;r.push({id:a,index:r.length,bound:{x:c,y:d,width:u,height:h},yOffset:95.5,isRounded:!0,borderColor:this.SUBGRAPH_SELECTED_NODE_MARKER_BG_COLOR,bgColor:u5,borderWidth:1.5,opacity:1}),s.push({id:`${l.id}_checkmark`,nodeId:l.id,label:"0xe876",height:24,hAlign:"center",vAlign:"center",weight:_n.ICONS,color:this.SUBGRAPH_SELECTED_NODE_MARKER_BG_COLOR,x:c,y:96,z:d+14,treatLabelAsAWhole:!0,weightLevel:.9})}this.subgraphsSelectedNodeMarkerBgs.generateMesh(r,!1,!1,!1,!0),this.webglRendererThreejsService.addToScene(this.subgraphsSelectedNodeMarkerBgs.mesh),this.subgraphSelectedNodeMarkerTexts.generateMesh(s,!1,!0,!0),this.webglRendererThreejsService.addToScene(this.subgraphSelectedNodeMarkerTexts.mesh),this.webglRenderer.animateIntoPositions(a=>{this.subgraphsSelectedNodeMarkerBgs.updateAnimationProgress(a),this.subgraphSelectedNodeMarkerTexts.updateAnimationProgress(a)})}get enableSubgraphSelection(){return this.appService.config()?.enableSubgraphSelection===!0}clearSubgraphSelectedNodeMarkers(){for(let e of[this.subgraphsSelectedNodeMarkerBgs.mesh,this.subgraphSelectedNodeMarkerTexts.mesh])e&&(e.geometry&&e.geometry.dispose(),this.webglRendererThreejsService.removeFromScene(e))}static \u0275fac=function(n){return new(n||i)(Le(nt),Le(es))};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var Ar=500,h5=200,rs=En,WC=(()=>{class i{curScale=1;fps="";camera;raycaster;zoom=DD();webglRenderer;curTranslateX=0;curTranslateY=0;scene;renderer;snapshotRenderer;pngDownloaderRenderer;savedCenterX=null;savedCenterY=null;resizeTimeoutRef=-1;fpsStartTime=-1;frames=0;init(e){this.webglRenderer=e}setupZoomAndPan(e,n=.1,r=10){let o=Yo(e),s=0,a=0;this.zoom.scaleExtent([n,r]).wheelDelta(()=>-mt.deltaY*(mt.deltaMode?120:1)/150).filter(()=>{if(mt.type==="mousedown"&&(s=this.curTranslateX,a=this.curTranslateY),mt.button===2||Fm&&mt.ctrlKey&&mt.button===0&&mt.type==="mousedown")return!1;if(mt.type==="dblclick")return mt.stopPropagation(),this.webglRenderer.handleDoubleClickOnGraph(mt.altKey,mt.shiftKey),!1;if(mt.type==="wheel"&&!mt.ctrlKey){let l=.5/this.curScale;return this.zoom.translateBy(o,-Number(mt.deltaX)*l,-Number(mt.deltaY)*l),mt.preventDefault(),!1}return!0}).on("zoom",()=>{this.handleZoom()}).on("end",()=>{this.handleZoomEnd(s,a)}),this.zoom.interpolate(Od),o.call(this.zoom)}setupThreeJs(){let e=this.webglRenderer.canvas.nativeElement;this.scene=new rs.Scene,this.scene.background=new rs.Color(16777215);let n=e.clientWidth/e.clientHeight;this.camera=new rs.OrthographicCamera(0,2*Ar*n,0,-2*Ar,.001,1e3),this.camera.position.y=h5,this.camera.lookAt(new rs.Vector3(0,0,0)),this.camera.updateMatrixWorld(),this.camera.updateProjectionMatrix(),this.renderer=new rs.WebGLRenderer({canvas:e,powerPreference:"high-performance",precision:"highp",antialias:!0,alpha:!0});let r=pd();this.renderer.setPixelRatio(r),this.renderer.setSize(e.clientWidth,e.clientHeight);let o=this.webglRenderer.snapshotCanvas.nativeElement;this.snapshotRenderer=new rs.WebGLRenderer({canvas:o,powerPreference:"high-performance",precision:"highp",antialias:!0,alpha:!0,preserveDrawingBuffer:!0}),this.snapshotRenderer.setPixelRatio(r),this.render(),new ResizeObserver(()=>{requestAnimationFrame(()=>{this.resizeRendererToDisplaySize()})}).observe(this.webglRenderer.container.nativeElement),this.raycaster=new rs.Raycaster,this.raycaster.params.Points.threshold=5.5}clearScene(e=[]){for(let n=this.scene.children.length-1;n>=0;n--){let r=this.scene.children[n];e.includes(r)||(r.geometry&&r.geometry.dispose(),this.scene.remove(r))}}setupPngDownloaderRenderer(e,n,r,o){this.pngDownloaderRenderer||(this.pngDownloaderRenderer=new rs.WebGLRenderer({canvas:e,powerPreference:"high-performance",precision:"highp",antialias:!0,alpha:!0,preserveDrawingBuffer:!0}),this.pngDownloaderRenderer.setPixelRatio(pd())),n&&(this.scene.background=null,this.pngDownloaderRenderer.setClearColor(0,0)),this.pngDownloaderRenderer.setSize(r,o,!1)}renderPngDownloader(e){this.pngDownloaderRenderer.render(this.scene,e)}renderSnapshot(e,n){this.snapshotRenderer.setSize(e,n,!1),this.snapshotRenderer.render(this.scene,this.camera)}setSceneBackground(e){this.scene.background=e}createOrthographicCamera(e,n,r,o){let s=new rs.OrthographicCamera(e,n,r,o,.001,1e3);return s.position.y=h5,s.lookAt(new rs.Vector3(0,0,0)),s.updateMatrixWorld(),s.updateProjectionMatrix(),s}dispose(){this.renderer&&(this.renderer.dispose(),this.renderer.forceContextLoss()),this.snapshotRenderer&&(this.snapshotRenderer.dispose(),this.snapshotRenderer.forceContextLoss()),this.pngDownloaderRenderer&&(this.pngDownloaderRenderer.dispose(),this.pngDownloaderRenderer.forceContextLoss())}render(e=!1){if(!(!this.renderer||!this.scene||!this.camera)&&(this.renderer.render(this.scene,this.camera),this.webglRenderer.benchmark&&e)){this.fpsStartTime<0&&(this.fpsStartTime=performance.now()),this.frames+=1;let n=performance.now()-this.fpsStartTime;n>1e3&&(this.fps=(this.frames/n*1e3).toFixed(1),this.fpsStartTime=-1,this.frames=0,this.webglRenderer.changeDetectorRef.markForCheck())}}zoomFitGraph(e=.9,n=200){this.zoomFit({x:this.webglRenderer.currentMinX,y:this.webglRenderer.currentMinZ,width:this.webglRenderer.currentMaxX-this.webglRenderer.currentMinX,height:this.webglRenderer.currentMaxZ-this.webglRenderer.currentMinZ},e,n)}zoomFit(e,n=.9,r=300,o=!1,s=!0,a=!1){if(!this.webglRenderer.container)return;let l=this.webglRenderer.container.nativeElement,c=l.clientWidth*n,d=l.clientHeight*n,u=e.width/e.height,h=c/d,p=o?this.curScale:Math.abs(u>h?this.convertXFromScreenToScene(c)/e.width:this.convertZFromScreenToScene(d)/e.height),f=e.x+e.width/2,m=e.y+e.height/2;if(!o&&s){let b=this.convertZFromScreenToScene(45)/30;if(p=Math.min(b,p),a){let g=this.convertZFromScreenToScene(20)/30;p{let o=n.nodesById[e];this.zoomFit({x:this.webglRenderer.getNodeX(o),y:this.webglRenderer.getNodeY(o),width:this.webglRenderer.getNodeWidth(o),height:this.webglRenderer.getNodeHeight(o)},.9,r,!1,!0,!0)},0):setTimeout(()=>{this.zoomFitGraph(.9,r)})}addToScene(e){e&&this.scene.add(e)}removeFromScene(e){e&&this.scene.remove(e)}convertXFromSceneToScreen(e){if(!this.webglRenderer.container)return 0;let n=this.webglRenderer.container.nativeElement,r=n.clientWidth,o=r/n.clientHeight;return e/(Ar/1*o)/-2*r}convertZFromSceneToScreen(e){if(!this.webglRenderer.container)return 0;let r=this.webglRenderer.container.nativeElement.clientHeight;return e*1*r/Ar/2}convertXFromScreenToScene(e){if(!this.webglRenderer.container)return 0;let n=this.webglRenderer.container.nativeElement,r=n.clientWidth,o=r/n.clientHeight;return e/r*-2*(Ar/1*o)}convertZFromScreenToScene(e,n=1){if(!this.webglRenderer.container)return 0;let o=this.webglRenderer.container.nativeElement.clientHeight;return e*Ar*2/n/o}convertScenePosToScreen(e,n){let r=this.webglRenderer.container.nativeElement,o=r.clientWidth,s=r.clientHeight,a=new rs.Vector3(e,0,n);return a.project(this.camera),{x:a.x*o/2+o/2,y:-(a.y*s/2)+s/2}}convertScreenPosToScene(e,n){let r=new rs.Vector3;r.set(e/this.webglRenderer.canvas.nativeElement.offsetWidth*2-1,-(n/this.webglRenderer.canvas.nativeElement.offsetHeight)*2+1,-1);let o=r.unproject(this.camera);return{x:o.x,y:o.z}}handleZoom(){this.curScale=mt.transform.k,this.curTranslateX=mt.transform.x,this.curTranslateY=mt.transform.y,requestAnimationFrame(()=>{this.camera&&(this.setCameraFrustum(),this.webglRenderer.updateNodeBgColorWhenFar(),this.render(),this.webglRenderer.handleHoveredGroupNodeIconChanged())})}handleZoomEnd(e,n){if(mt.sourceEvent&&mt.sourceEvent.type==="mouseup"){let r=Math.abs(this.curTranslateX-e),o=Math.abs(this.curTranslateY-n);r>=0&&r<=3&&o>=0&&o<=3&&this.webglRenderer.handleClickOnGraph(mt.sourceEvent.shiftKey)}}setCameraFrustum(){let e=this.webglRenderer.container.nativeElement,n=e.clientWidth,r=e.clientHeight,o=n/r,s=this.curTranslateX-n/2,a=this.curTranslateY-r/2;this.camera.left=-Ar/this.curScale*o-s/n*2*Ar/this.curScale*o,this.camera.right=Ar/this.curScale*o-s/n*2*Ar/this.curScale*o,this.camera.top=Ar/this.curScale+a*Ar/this.curScale/r*2,this.camera.bottom=-Ar/this.curScale+a*Ar/this.curScale/r*2,this.camera.updateProjectionMatrix()}resizeRendererToDisplaySize(e=!0){let n=this.webglRenderer.container.nativeElement,r=this.renderer.domElement,o=n.clientWidth,s=n.clientHeight;if(o===0||s===0)return;if(r.width!==o||r.height!==s){if(this.savedCenterX==null&&this.savedCenterY==null){let{x:l,y:c}=this.convertScreenPosToScene(o/2,s/2);this.savedCenterX=l,this.savedCenterY=c}this.renderer.setSize(o,s,!1),this.webglRenderer.canvas.nativeElement.style.width="100%",this.webglRenderer.canvas.nativeElement.style.height="100%",this.setCameraFrustum(),this.render(),this.zoomFit({x:this.savedCenterX,y:this.savedCenterY,width:1e-7,height:1e-7},.9,0,!0),this.resizeTimeoutRef>=0&&window.clearTimeout(this.resizeTimeoutRef),this.resizeTimeoutRef=window.setTimeout(()=>{this.savedCenterX=null,this.savedCenterY=null},500)}}centerViewAt(e,n,r,o=300){if(!this.webglRenderer.container)return;let s=this.webglRenderer.container.nativeElement,a=s.clientWidth,l=s.clientHeight,c=a/l,d=-2*Ar*c/2/r+e,u=-n+Ar/r,h=Bd.scale(r).translate(this.convertXFromSceneToScreen(d),this.convertZFromSceneToScreen(u)),p=Yo(s);o===0?p.call(this.zoom.transform,h):p.transition().duration(this.webglRenderer.appService.testMode?0:o).ease(dD).call(this.zoom.transform,h)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var lf=function(i){return i.COLOR="COLOR",i.NUMBER="NUMBER",i}(lf||{}),Mhe={type:lf.COLOR,label:"Bg color",id:qs.NODE_BG_COLOR,defaultValue:"#ffffff"},Ehe={type:lf.COLOR,label:"Border color",id:qs.NODE_BORDER_COLOR,defaultValue:"#777777"},Ihe={type:lf.COLOR,label:"Text color",id:qs.NODE_TEXT_COLOR,defaultValue:"#041e49"},f5=[Mhe,Ehe,Ihe],p5="model_explorer_node_styler_rules",ua=(()=>{class i{appService;localStorageService;rules=et([]);matchedNodes=et({});hasNonEmptyNodeStylerRules=Ot(()=>this.rules().filter(e=>Ch(e.queries)&&Object.keys(e.styles).length>0).length>0);constructor(e,n){if(this.appService=e,this.localStorageService=n,ct(()=>{let r=this.rules();this.appService.testMode||this.localStorageService.setItem(p5,JSON.stringify(r)),this.computeMatchedNodes(r)}),this.appService.testMode){let r=new URLSearchParams(document.location.search),o=decodeURIComponent(r.get("test_node_styler_rules")||"");this.updateRules(o===""?[]:JSON.parse(o))}else{let r=this.localStorageService.getItem(p5)||"",o=r===""?[]:JSON.parse(r);this.updateRules(o)}}addNewRule(){this.rules.update(e=>{let n=[...e];return n.push({queries:[{type:Un.NODE_TYPE,nodeType:Sr.OP_NODES},{type:Un.REGEX,queryRegex:"",matchTypes:[xt.NODE_LABEL]}],nodeType:Sr.OP_NODES,styles:{},version:eb.V2}),n})}moveUpRule(e){this.rules.update(n=>{let r=[...n],o=n[e];return r.splice(e,1),r.splice(e-1,0,o),r})}moveDownRule(e){this.rules.update(n=>{let r=[...n],o=n[e];return r.splice(e,1),r.splice(e+1,0,o),r})}duplicateRule(e){this.rules.update(n=>{let r=JSON.parse(JSON.stringify(n[e]));return[...n.slice(0,e),r,...n.slice(e)]})}updateRules(e){this.rules.set(this.convertOldRulesIfNecessary(e))}updateQueries(e,n){this.rules.update(r=>{let o=r[e];return o.queries=n,[...r]})}toggleStyle(e,n,r){this.rules.update(o=>{let s=o[e];return r==null?s.styles[n.id]==null?s.styles[n.id]={id:n.id,value:n.defaultValue}:delete s.styles[n.id]:r?s.styles[n.id]={id:n.id,value:n.defaultValue}:delete s.styles[n.id],[...o]})}updateStyleValue(e,n,r){this.rules.update(o=>{let s=o[e],a=s.styles[n.id];return a&&(typeof a=="string"?s.styles[n.id]=r:a.value=r),[...o]})}deleteRule(e){this.rules.update(n=>{let r=[...n];return r.splice(e,1),r})}convertOldRulesIfNecessary(e){return e.map(n=>{if(n.version==null&&n.nodeType){let r={type:Un.NODE_TYPE,nodeType:n.nodeType};n.queries.unshift(r),n.version=eb.V2}return n})}computeMatchedNodes(e){let n=db(e),r={};if(e.length>0&&e.some(o=>Ch(o.queries))){let o=this.appService.panes();for(let s=0;sthis._finishDismiss())}dismiss(){this._afterDismissed.closed||this.containerInstance.exit(),clearTimeout(this._durationTimeoutId)}dismissWithAction(){this._onAction.closed||(this._dismissedByAction=!0,this._onAction.next(),this._onAction.complete(),this.dismiss()),clearTimeout(this._durationTimeoutId)}closeWithAction(){this.dismissWithAction()}_dismissAfter(t){this._durationTimeoutId=setTimeout(()=>this.dismiss(),Math.min(t,Phe))}_open(){this._afterOpened.closed||(this._afterOpened.next(),this._afterOpened.complete())}_finishDismiss(){this._overlayRef.dispose(),this._onAction.closed||this._onAction.complete(),this._afterDismissed.next({dismissedByAction:this._dismissedByAction}),this._afterDismissed.complete(),this._dismissedByAction=!1}afterDismissed(){return this._afterDismissed}afterOpened(){return this.containerInstance._onEnter}onAction(){return this._onAction}},m5=new pe("MatSnackBarData"),cf=class{constructor(){this.politeness="assertive",this.announcementMessage="",this.duration=0,this.data=null,this.horizontalPosition="center",this.verticalPosition="bottom"}},Rhe=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["","matSnackBarLabel",""]],hostAttrs:[1,"mat-mdc-snack-bar-label","mdc-snackbar__label"],standalone:!0})}}return i})(),Ahe=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["","matSnackBarActions",""]],hostAttrs:[1,"mat-mdc-snack-bar-actions","mdc-snackbar__actions"],standalone:!0})}}return i})(),Nhe=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["","matSnackBarAction",""]],hostAttrs:[1,"mat-mdc-snack-bar-action","mdc-snackbar__action"],standalone:!0})}}return i})(),g5=(()=>{class i{constructor(){this.snackBarRef=S(ev),this.data=S(m5)}action(){this.snackBarRef.dismissWithAction()}get hasAction(){return!!this.data.action}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["simple-snack-bar"]],hostAttrs:[1,"mat-mdc-simple-snack-bar"],exportAs:["matSnackBar"],standalone:!0,features:[se],decls:3,vars:2,consts:[["matSnackBarLabel",""],["matSnackBarActions",""],["mat-button","","matSnackBarAction","",3,"click"]],template:function(n,r){n&1&&(v(0,"div",0),M(1),y(),W(2,The,3,1,"div",1)),n&2&&(w(),we(" ",r.data.message,` +`),w(),re(r.hasAction?2:-1))},dependencies:[gi,Rhe,Ahe,Nhe],styles:[".mat-mdc-simple-snack-bar{display:flex}"],encapsulation:2,changeDetection:0})}}return i})(),khe={snackBarState:pi("state",[Ci("void, hidden",en({transform:"scale(0.8)",opacity:0})),Ci("visible",en({transform:"scale(1)",opacity:1})),Fn("* => visible",Ln("150ms cubic-bezier(0, 0, 0.2, 1)")),Fn("* => void, * => hidden",Ln("75ms cubic-bezier(0.4, 0.0, 1, 1)",en({opacity:0})))])},Lhe=0,Fhe=(()=>{class i extends la{constructor(){super(),this._ngZone=S(Ue),this._elementRef=S(Fe),this._changeDetectorRef=S(Re),this._platform=S(Rn),this.snackBarConfig=S(cf),this._document=S(ft),this._trackedModals=new Set,this._announceDelay=150,this._destroyed=!1,this._onAnnounce=new ce,this._onExit=new ce,this._onEnter=new ce,this._animationState="void",this._liveElementId=`mat-snack-bar-container-live-${Lhe++}`,this.attachDomPortal=n=>{this._assertNotAttached();let r=this._portalOutlet.attachDomPortal(n);return this._afterPortalAttached(),r};let e=this.snackBarConfig;e.politeness==="assertive"&&!e.announcementMessage?this._live="assertive":e.politeness==="off"?this._live="off":this._live="polite",this._platform.FIREFOX&&(this._live==="polite"&&(this._role="status"),this._live==="assertive"&&(this._role="alert"))}attachComponentPortal(e){this._assertNotAttached();let n=this._portalOutlet.attachComponentPortal(e);return this._afterPortalAttached(),n}attachTemplatePortal(e){this._assertNotAttached();let n=this._portalOutlet.attachTemplatePortal(e);return this._afterPortalAttached(),n}onAnimationEnd(e){let{fromState:n,toState:r}=e;if((r==="void"&&n!=="void"||r==="hidden")&&this._completeExit(),r==="visible"){let o=this._onEnter;this._ngZone.run(()=>{o.next(),o.complete()})}}enter(){this._destroyed||(this._animationState="visible",this._changeDetectorRef.markForCheck(),this._changeDetectorRef.detectChanges(),this._screenReaderAnnounce())}exit(){return this._ngZone.run(()=>{this._animationState="hidden",this._changeDetectorRef.markForCheck(),this._elementRef.nativeElement.setAttribute("mat-exit",""),clearTimeout(this._announceTimeoutId)}),this._onExit}ngOnDestroy(){this._destroyed=!0,this._clearFromModals(),this._completeExit()}_completeExit(){queueMicrotask(()=>{this._onExit.next(),this._onExit.complete()})}_afterPortalAttached(){let e=this._elementRef.nativeElement,n=this.snackBarConfig.panelClass;n&&(Array.isArray(n)?n.forEach(s=>e.classList.add(s)):e.classList.add(n)),this._exposeToModals();let r=this._label.nativeElement,o="mdc-snackbar__label";r.classList.toggle(o,!r.querySelector(`.${o}`))}_exposeToModals(){let e=this._liveElementId,n=this._document.querySelectorAll('body > .cdk-overlay-container [aria-modal="true"]');for(let r=0;r{let n=e.getAttribute("aria-owns");if(n){let r=n.replace(this._liveElementId,"").trim();r.length>0?e.setAttribute("aria-owns",r):e.removeAttribute("aria-owns")}}),this._trackedModals.clear()}_assertNotAttached(){this._portalOutlet.hasAttached()}_screenReaderAnnounce(){this._announceTimeoutId||this._ngZone.runOutsideAngular(()=>{this._announceTimeoutId=setTimeout(()=>{let e=this._elementRef.nativeElement.querySelector("[aria-hidden]"),n=this._elementRef.nativeElement.querySelector("[aria-live]");if(e&&n){let r=null;this._platform.isBrowser&&document.activeElement instanceof HTMLElement&&e.contains(document.activeElement)&&(r=document.activeElement),e.removeAttribute("aria-hidden"),n.appendChild(e),r?.focus(),this._onAnnounce.next(),this._onAnnounce.complete()}},this._announceDelay)})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["mat-snack-bar-container"]],viewQuery:function(n,r){if(n&1&&(Me(ns,7),Me(Dhe,7)),n&2){let o;_e(o=ve())&&(r._portalOutlet=o.first),_e(o=ve())&&(r._label=o.first)}},hostAttrs:[1,"mdc-snackbar","mat-mdc-snack-bar-container"],hostVars:1,hostBindings:function(n,r){n&1&&uI("@state.done",function(s){return r.onAnimationEnd(s)}),n&2&&rm("@state",r._animationState)},standalone:!0,features:[sn,se],decls:6,vars:3,consts:[["label",""],[1,"mdc-snackbar__surface","mat-mdc-snackbar-surface"],[1,"mat-mdc-snack-bar-label"],["aria-hidden","true"],["cdkPortalOutlet",""]],template:function(n,r){n&1&&(v(0,"div",1)(1,"div",2,0)(3,"div",3),W(4,Ohe,0,0,"ng-template",4),y(),ee(5,"div"),y()()),n&2&&(w(5),qe("aria-live",r._live)("role",r._role)("id",r._liveElementId))},dependencies:[ns],styles:[".mat-mdc-snack-bar-container{display:flex;align-items:center;justify-content:center;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0);margin:8px}.mat-mdc-snack-bar-handset .mat-mdc-snack-bar-container{width:100vw}.mat-mdc-snackbar-surface{box-shadow:0px 3px 5px -1px rgba(0, 0, 0, 0.2), 0px 6px 10px 0px rgba(0, 0, 0, 0.14), 0px 1px 18px 0px rgba(0, 0, 0, 0.12);display:flex;align-items:center;justify-content:flex-start;box-sizing:border-box;padding-left:0;padding-right:8px}[dir=rtl] .mat-mdc-snackbar-surface{padding-right:0;padding-left:8px}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{min-width:344px;max-width:672px}.mat-mdc-snack-bar-handset .mat-mdc-snackbar-surface{width:100%;min-width:0}@media(forced-colors: active){.mat-mdc-snackbar-surface{outline:solid 1px}}.mat-mdc-snack-bar-container .mat-mdc-snackbar-surface{color:var(--mdc-snackbar-supporting-text-color, var(--mat-sys-inverse-on-surface));border-radius:var(--mdc-snackbar-container-shape, var(--mat-sys-corner-extra-small));background-color:var(--mdc-snackbar-container-color, var(--mat-sys-inverse-surface))}.mdc-snackbar__label{width:100%;flex-grow:1;box-sizing:border-box;margin:0;padding:14px 8px 14px 16px}[dir=rtl] .mdc-snackbar__label{padding-left:8px;padding-right:16px}.mat-mdc-snack-bar-container .mdc-snackbar__label{font-family:var(--mdc-snackbar-supporting-text-font, var(--mat-sys-body-medium-font));font-size:var(--mdc-snackbar-supporting-text-size, var(--mat-sys-body-medium-size));font-weight:var(--mdc-snackbar-supporting-text-weight, var(--mat-sys-body-medium-weight));line-height:var(--mdc-snackbar-supporting-text-line-height, var(--mat-sys-body-medium-line-height))}.mat-mdc-snack-bar-actions{display:flex;flex-shrink:0;align-items:center;box-sizing:border-box}.mat-mdc-snack-bar-handset,.mat-mdc-snack-bar-container,.mat-mdc-snack-bar-label{flex:1 1 auto}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){color:var(--mat-snack-bar-button-color, var(--mat-sys-inverse-primary))}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled){--mat-text-button-state-layer-color:currentColor;--mat-text-button-ripple-color:currentColor}.mat-mdc-snack-bar-container .mat-mdc-button.mat-mdc-snack-bar-action:not(:disabled) .mat-ripple-element{opacity:.1}"],encapsulation:2,data:{animation:[khe.snackBarState]}})}}return i})();function Bhe(){return new cf}var Vhe=new pe("mat-snack-bar-default-options",{providedIn:"root",factory:Bhe}),Os=(()=>{class i{get _openedSnackBarRef(){let e=this._parentSnackBar;return e?e._openedSnackBarRef:this._snackBarRefAtThisLevel}set _openedSnackBarRef(e){this._parentSnackBar?this._parentSnackBar._openedSnackBarRef=e:this._snackBarRefAtThisLevel=e}constructor(){this._overlay=S(on),this._live=S(Vb),this._injector=S(pt),this._breakpointObserver=S(Ph),this._parentSnackBar=S(i,{optional:!0,skipSelf:!0}),this._defaultConfig=S(Vhe),this._snackBarRefAtThisLevel=null,this.simpleSnackBarComponent=g5,this.snackBarContainerComponent=Fhe,this.handsetCssClass="mat-mdc-snack-bar-handset"}openFromComponent(e,n){return this._attach(e,n)}openFromTemplate(e,n){return this._attach(e,n)}open(e,n="",r){let o=X(X({},this._defaultConfig),r);return o.data={message:e,action:n},o.announcementMessage===e&&(o.announcementMessage=void 0),this.openFromComponent(this.simpleSnackBarComponent,o)}dismiss(){this._openedSnackBarRef&&this._openedSnackBarRef.dismiss()}ngOnDestroy(){this._snackBarRefAtThisLevel&&this._snackBarRefAtThisLevel.dismiss()}_attachSnackBarContainer(e,n){let r=n&&n.viewContainerRef&&n.viewContainerRef.injector,o=pt.create({parent:r||this._injector,providers:[{provide:cf,useValue:n}]}),s=new Li(this.snackBarContainerComponent,n.viewContainerRef,o),a=e.attach(s);return a.instance.snackBarConfig=n,a.instance}_attach(e,n){let r=X(X(X({},new cf),this._defaultConfig),n),o=this._createOverlay(r),s=this._attachSnackBarContainer(o,r),a=new ev(s,o);if(e instanceof Qn){let l=new Jr(e,null,{$implicit:r.data,snackBarRef:a});a.instance=s.attachTemplatePortal(l)}else{let l=this._createInjector(r,a),c=new Li(e,void 0,l),d=s.attachComponentPortal(c);a.instance=d.instance}return this._breakpointObserver.observe(Db.HandsetPortrait).pipe(Ke(o.detachments())).subscribe(l=>{o.overlayElement.classList.toggle(this.handsetCssClass,l.matches)}),r.announcementMessage&&s._onAnnounce.subscribe(()=>{this._live.announce(r.announcementMessage,r.politeness)}),this._animateSnackBar(a,r),this._openedSnackBarRef=a,this._openedSnackBarRef}_animateSnackBar(e,n){e.afterDismissed().subscribe(()=>{this._openedSnackBarRef==e&&(this._openedSnackBarRef=null),n.announcementMessage&&this._live.clear()}),this._openedSnackBarRef?(this._openedSnackBarRef.afterDismissed().subscribe(()=>{e.containerInstance.enter()}),this._openedSnackBarRef.dismiss()):e.containerInstance.enter(),n.duration&&n.duration>0&&e.afterOpened().subscribe(()=>e._dismissAfter(n.duration))}_createOverlay(e){let n=new bi;n.direction=e.direction;let r=this._overlay.position().global(),o=e.direction==="rtl",s=e.horizontalPosition==="left"||e.horizontalPosition==="start"&&!o||e.horizontalPosition==="end"&&o,a=!s&&e.horizontalPosition!=="center";return s?r.left("0"):a?r.right("0"):r.centerHorizontally(),e.verticalPosition==="top"?r.top("0"):r.bottom("0"),n.positionStrategy=r,this._overlay.create(n)}_createInjector(e,n){let r=e&&e.viewContainerRef&&e.viewContainerRef.injector;return pt.create({parent:r||this._injector,providers:[{provide:ev,useValue:n},{provide:m5,useValue:e.data}]})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var _5=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({providers:[Os],imports:[so,Ds,vn,Ht,g5,Ht]})}}return i})();var In=function(i){return i.DISABLED="disabled",i.MATCH_NODE_ID="match_node_id",i.VISUALIZER_CONFIG="visualizer_config",i.UPLOAD_MAPPING_FROM_COMPUTER="from_computer",i.LOAD_MAPPING_FROM_CNS="from_cns",i}(In||{}),v5={[In.DISABLED]:"Disabled",[In.MATCH_NODE_ID]:"Match node id",[In.UPLOAD_MAPPING_FROM_COMPUTER]:"Upload mapping from computer",[In.LOAD_MAPPING_FROM_CNS]:"Load mapping from CNS",[In.VISUALIZER_CONFIG]:"From Visualizer Config"};var ha=(()=>{class i{mode=et(In.DISABLED);navigationSourceChanged$=new ce;loadingFromCns=et(!1);syncNavigationModeChanged$=new ce;showNoMappedNodeMessageTrigger$=new ce;savedProcessedSyncNavigationData={};updateNavigationSource(e){this.mode()!==In.DISABLED&&this.navigationSourceChanged$.next(e)}updateSyncNavigationData(e,n){let r=at(X({},n),{inversedMapping:{}});for(let o of Object.keys(n.mapping))r.inversedMapping[n.mapping[o]]=o;this.savedProcessedSyncNavigationData[e]=r}getMappedNodeId(e,n){let r=this.mode(),o=this.savedProcessedSyncNavigationData[r];switch(r){case In.MATCH_NODE_ID:return n;case In.VISUALIZER_CONFIG:case In.UPLOAD_MAPPING_FROM_COMPUTER:case In.LOAD_MAPPING_FROM_CNS:{let s=o?.mapping??{},a=o?.inversedMapping??{},c=(e===0?s:a)[n];return c||(o?.disableMappingFallback?"":n)}default:return n}}loadFromCns(e){return Ct(this,null,function*(){this.loadingFromCns.set(!0);let n=`/read_file?path=${e}`,r=yield fetch(n);if(!r.ok)return this.loadingFromCns.set(!1),`Failed to load JSON file "${e}"`;let o=JSON.parse((yield r.text()).replace(`)]}' +`,"")),s=this.processJsonData(o.content,In.LOAD_MAPPING_FROM_CNS);return this.loadingFromCns.set(!1),s})}loadSyncNavigationDataFromEvent(e){return Ct(this,null,function*(){this.mode.set(e.mode)})}processJsonData(e,n){try{let r=JSON.parse(e);this.updateSyncNavigationData(n,r)}catch(r){return`Failed to parse JSON file. ${r}`}return""}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var zhe=["container"],Uhe=["canvas"],Hhe=["snapshotCanvas"],Ghe=["pngDownloaderCanvas"],jhe=["hoverToolbar"],Whe=["ioPicker"],$he=["subgraphMenuTrigger"],qhe=["groupNodeIconMatTooltip"],Yhe=["ioPickerMatTooltip"],Xhe=["moreActionsMenuTrigger"],Qhe=["rangeZoomDragArea"],Zhe=["dragToSelectDragArea"];function Khe(i,t){if(i&1){let e=te();v(0,"div",33),H("click",function(){B(e);let r=I();return V(r.handleClickCollapseAll(r.hoveredNodeIdWhenClickingMoreActions))}),v(1,"mat-icon"),M(2,"unfold_less_double"),y(),M(3," Collapse layer & all sub-layers "),y()}}function Jhe(i,t){if(i&1){let e=te();v(0,"div",34),H("click",function(r){B(e);let o=I();return V(o.handleClickOpenGroupNodeInPopup(r,o.hoveredNodeIdWhenClickingMoreActions))}),v(1,"mat-icon"),M(2,"open_in_new"),y(),M(3," Open layer in popup "),y()}}function epe(i,t){if(i&1){let e=te();v(0,"div",35),H("click",function(){let r=B(e).$implicit,o=I();return V(o.handleClickSubgraphId(r))}),v(1,"mat-icon"),M(2,"subdirectory_arrow_right"),y(),M(3),y()}if(i&2){let e=t.$implicit;w(3),we(" ",e," ")}}function tpe(i,t){if(i&1&&(v(0,"div",32),M(1),y()),i&2){let e=I();w(),we("FPS: ",e.fps,"")}}var npe=1.2,ipe=2,y5=1.5,rpe=200,qP=400,ope=1,b5=14,spe=5e3,ape=-Zt*.5,YP=Zt*.4,x5=Zt*.3,lpe=Zt*.4,cpe="______",bn=En,qC=function(i){return i[i.NODE=0]="NODE",i[i.EDGE=1]="EDGE",i}(qC||{}),YC=(()=>{class i{changeDetectorRef;destroyRef;ngZone;nodeDataProviderExtensionService;nodeStylerService;overlay;snackBar;splitPaneService;subgraphSelectionService;syncNavigationService;uiStateService;viewContainerRef;webglRendererAttrsTableService;webglRendererEdgeTextsService;webglRendererEdgeOverlaysService;webglRendererIdenticalLayerService;webglRendererIoHighlightService;webglRendererIoTracingService;webglRendererNdpService;webglRendererSearchResultsService;webglRendererSnapshotService;webglRendererSubgraphSelectionService;webglRendererThreejsService;workerService;modelGraph;rendererId;paneId;rootNodeId;inPopup=!1;benchmark=!1;openInPopupClicked=new Ie;container;canvas;snapshotCanvas;pngDownloaderCanvas;hoverToolbar;ioPicker;subgraphMenuTrigger;groupNodeIconMatTooltip;ioPickerMatTooltip;moreActionsMenuTrigger;rangeZoomDragArea;dragToSelectDragArea;appService=S(nt);threejsService=S(Zi);SELECTED_NODE_BORDER_COLOR=new bn.Color("#1A73E8");SELECTED_NODE_BG_COLOR=new bn.Color("#C2E7FF");HOVERED_NODE_BORDER_COLOR=new bn.Color("#000");HOVERED_GROUP_NODE_BORDER_COLOR=new bn.Color("#666");IDENTICAL_GROUPS_BG_COLOR=new bn.Color("#e2edff");NODE_LABEL_COLOR=new bn.Color("#041E49");OP_NODE_BORDER_COLOR=new bn.Color("#777");GROUP_NODE_BORDER_COLOR=new bn.Color("#aaa");GROUP_NODE_LABEL_SEPARATOR_COLOR=new bn.Color("#DADCE0");GROUP_NODE_ICON_COLOR=new bn.Color("#444746");GROUP_NODE_PIN_TO_TOP_SEPARATOR_COLOR=new bn.Color("#bbb");EDGE_COLOR=new bn.Color(this.appService.config()?.edgeColor||"#aaa");EDGE_COLOR_INCOMING=new bn.Color("#009e73");EDGE_TEXT_COLOR_INCOMING=new bn.Color("#125341");EDGE_COLOR_OUTGOING=new bn.Color("#d55e00");EDGE_TEXT_COLOR_OUTGOING=new bn.Color("#994d11");ARTIFCIAL_GROUPS_BORDER_COLOR=new bn.Color("#800080");SUBGRAPH_INDICATOR_BORDER_COLOR=new bn.Color("#135cbb");SUBGRAPH_INDICATOR_BG_COLOR=new bn.Color("#d5e7ff");GROUP_NODE_BG_COLORS=(()=>{let s=[];for(let a=0;a<6;a++){let l=96+a*-2.4;s.push(new bn.Color(`hsl(212, 40%, ${Math.round(l)}%)`))}return s})();graphId="";curModelGraph;tracing=!1;showBusySpinner=!1;selectedNodeId="";flashing=!1;hoveredNodeIdWhenClickingMoreActions="";currentMinX=0;currentMaxX=0;currentMinZ=0;currentMaxZ=0;groupNodeIcon={top:-1e3,left:-1e3,width:0,height:0};ioPickerTop=-1e3;ioPickerLeft=-1e3;ioPickerWidth=0;ioPickerHeight=0;ioPickerTooltip="";subgraphIndicatorTop=-1e3;subgraphIndicatorLeft=-1e3;subgraphIndicatorWidth=0;subgraphIndicatorHeight=0;curSubgraphIdsForMenu=[];curShowOnNodeItemTypes={};curShowOnEdgeItemTypes={};nodesToRender=[];nodesToRenderMap={};edgesToRender=[];curNodeDataProviderRuns={};curHiddenInputOpNodeIds={};curHiddenOutputIds={};elementsToRender=[];updateNodesStylesSavedSelectedNodeId="";updateNodesStylesSavedIoTracingData;curSelectedRenderer;portal=null;showBusySpinnerTimeoutRef=-1;prevNodeDataProviderData=void 0;nodeBodies=new Fi(6);groupNodeIcons=new Bi(this.threejsService);groupNodeIconBgs=new Fi(99);artificialGroupBorders=new Fi(6);subgraphIndicatorBgs=new Fi(3);subgraphIndicatorIcons=new Bi(this.threejsService);edges=new hl(this.EDGE_COLOR,ope);texts=new Bi(this.threejsService);mousePos=new bn.Vector2;draggingArea=!1;hoveredNodeId="";hoveredGroupNodeIconId="";nodeIdForHoveredGroupNodeIcon="";hoveredIoPickerId="";hoveredSubgraphIndicatorId="";savedUpdateNodeBgWhenFarProgress=-1;curNodeStylerRules=[];curProcessedNodeStylerRules=[];renderedEdgeIdsToHide=[];selectedNodeInfo=Ot(()=>{let e=this.appService.getPaneById(this.paneId);if(e)return e.selectedNodeInfo});messageEventListener=e=>{this.hideBusySpinner();let n=e.data;switch(n.eventType){case sr.EXPAND_OR_COLLAPSE_GROUP_NODE_RESP:this.rendererId===n.rendererId&&this.handleExpandOrCollapseGroupNodeDone(n.modelGraph,n.rendererId,n.groupNodeId,n.expanded,n.deepestExpandedGroupNodeIds);break;case sr.RELAYOUT_GRAPH_RESP:this.rendererId===n.rendererId&&this.handleReLayoutGraphDone(n.rendererId,n.modelGraph,n.selectedNodeId,n.forRestoringUiState,n.rectToZoomFit,n.forRestoringSnapshotAfterTogglingFlattenLayers,n.targetDeepestGroupNodeIdsToExpand,n.triggerNavigationSync);break;case sr.LOCATE_NODE_RESP:this.rendererId===n.rendererId&&this.handleLocateNodeDone(n.rendererId,n.modelGraph,n.nodeId,n.deepestExpandedGroupNodeIds,n.noNodeShake===!0,n.select===!0);break;case sr.PREPARE_POPUP_RESP:this.paneId===n.paneId&&this.openInPopupClicked.emit({id:n.rendererId,groupNode:n.modelGraph.nodesById[n.groupNodeId],initialPosition:n.initialPosition,curModelGraph:n.modelGraph});break;default:break}};constructor(e,n,r,o,s,a,l,c,d,u,h,p,f,m,b,g,_,x,C,T,D,E,A,Q){this.changeDetectorRef=e,this.destroyRef=n,this.ngZone=r,this.nodeDataProviderExtensionService=o,this.nodeStylerService=s,this.overlay=a,this.snackBar=l,this.splitPaneService=c,this.subgraphSelectionService=d,this.syncNavigationService=u,this.uiStateService=h,this.viewContainerRef=p,this.webglRendererAttrsTableService=f,this.webglRendererEdgeTextsService=m,this.webglRendererEdgeOverlaysService=b,this.webglRendererIdenticalLayerService=g,this.webglRendererIoHighlightService=_,this.webglRendererIoTracingService=x,this.webglRendererNdpService=C,this.webglRendererSearchResultsService=T,this.webglRendererSnapshotService=D,this.webglRendererSubgraphSelectionService=E,this.webglRendererThreejsService=A,this.workerService=Q,this.webglRendererAttrsTableService.init(this),this.webglRendererEdgeTextsService.init(this),this.webglRendererEdgeOverlaysService.init(this),this.webglRendererIdenticalLayerService.init(this),this.webglRendererIoHighlightService.init(this),this.webglRendererIoTracingService.init(this),this.webglRendererNdpService.init(this),this.webglRendererSearchResultsService.init(this),this.webglRendererSnapshotService.init(this),this.webglRendererSubgraphSelectionService.init(this),this.webglRendererThreejsService.init(this),this.workerService.worker.addEventListener("message",this.messageEventListener),ct(()=>{this.curSelectedRenderer=this.appService.curSelectedRenderer()}),this.appService.spaceKeyToZoomFitClicked.pipe(fi(this.destroyRef)).subscribe(F=>{this.rendererId===this.curSelectedRenderer?.id&&this.webglRendererThreejsService.zoomFitGraph()}),ct(()=>{let F=this.appService.curToLocateNodeInfo();F?.rendererId===this.rendererId&&(F&&this.sendLocateNodeRequest(F.nodeId,F.rendererId,F.noNodeShake,F.select),this.appService.curToLocateNodeInfo.set(void 0))}),ct(()=>{let F=this.appService.getPaneById(this.paneId);if(!F||!F.modelGraph)return;let z=F.nodeIdToReveal;if(!z)return;this.revealNode(z)&&this.appService.setNodeToReveal(this.paneId,void 0)}),ct(()=>{let F=this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph);this.curNodeDataProviderRuns={};for(let z of F)this.curNodeDataProviderRuns[z.runId]=z}),ct(()=>{let F=this.webglRendererNdpService.curNodeDataProviderResults();F!==this.prevNodeDataProviderData&&(this.handleCurNodeDataProviderResultsChanged(),this.prevNodeDataProviderData=F)}),ct(()=>{if(!this.appService.getPaneById(this.paneId))return;let z=this.appService.getShowOnNodeItemTypes(this.paneId,this.rendererId);JSON.stringify(z)!==JSON.stringify(this.curShowOnNodeItemTypes)&&(this.curShowOnNodeItemTypes=z,this.sendRelayoutGraphRequest(this.selectedNodeId))}),this.appService.expandOrCollapseAllGraphLayersClicked.pipe(fi(this.destroyRef)).subscribe(F=>{F.rendererId===this.rendererId&&this.sendExpandOrCollapseGroupNodeRequest(void 0,!0,F.expandOrCollapse)}),ct(()=>{let F=this.selectedNodeInfo();if(F?.rendererId!==this.rendererId)return;let z=F?.nodeId||"",O=this.selectedNodeId!==z;if(this.selectedNodeId=z,this.tracing&&(this.selectedNodeId&&Et(this.curModelGraph.nodesById[this.selectedNodeId])?this.webglRendererIoTracingService.genTracingData():this.webglRendererIoTracingService.clearTracingData()),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.webglRendererIdenticalLayerService.updateIdenticalLayerIndicators(),this.webglRendererEdgeOverlaysService.updateOverlaysData(),this.updateNodesStyles(),this.webglRendererThreejsService.render(),O&&F.triggerNavigationSync&&this.syncNavigationService.updateNavigationSource({paneIndex:this.appService.getPaneIndexById(this.paneId)||0,nodeId:this.selectedNodeId}),this.webglRendererEdgeOverlaysService.curOverlays.length>0){let G=this.webglRendererEdgeOverlaysService.getDeepestExpandedGroupNodeIds();G.length>0?this.sendRelayoutGraphRequest(this.selectedNodeId,G):(this.webglRendererEdgeOverlaysService.updateOverlaysEdges(),this.webglRendererThreejsService.render())}else this.webglRendererEdgeOverlaysService.clearOverlaysEdges(),this.webglRendererThreejsService.render()}),ct(()=>{if(this.webglRendererEdgeOverlaysService.edgeOverlaysService.selectedOverlayIds(),this.webglRendererEdgeOverlaysService.updateOverlaysData(),this.selectedNodeId!=="")if(this.webglRendererEdgeOverlaysService.curOverlays.length>0){let F=this.webglRendererEdgeOverlaysService.getDeepestExpandedGroupNodeIds();F.length>0?this.sendRelayoutGraphRequest(this.selectedNodeId,F):(this.webglRendererEdgeOverlaysService.updateOverlaysEdges(),this.webglRendererThreejsService.render())}else this.webglRendererEdgeOverlaysService.clearOverlaysEdges(),this.webglRendererThreejsService.render()}),this.appService.downloadAsPngClicked.pipe(fi(this.destroyRef)).subscribe(F=>{F.rendererId===this.rendererId&&this.handleDownloadAsPng(F.fullGraph,F.transparentBackground)}),ct(()=>{let F=this.nodeStylerService.rules().filter(O=>Ch(O.queries)&&Object.keys(O.styles).length>0),z=JSON.stringify(F);JSON.stringify(this.curNodeStylerRules)!==z&&(this.curNodeStylerRules=JSON.parse(z),this.curProcessedNodeStylerRules=db(this.curNodeStylerRules),this.renderGraph(),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.webglRendererIdenticalLayerService.updateIdenticalLayerIndicators(),this.updateNodesStyles(),this.webglRendererThreejsService.render())}),ct(()=>{if(!this.appService.getPaneById(this.paneId))return;let z=this.appService.getShowOnEdgeItemTypes(this.paneId,this.rendererId);JSON.stringify(z)!==JSON.stringify(this.curShowOnEdgeItemTypes)&&(this.curShowOnEdgeItemTypes=z,this.renderGraph(),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.webglRendererIdenticalLayerService.updateIdenticalLayerIndicators(),this.updateNodesStyles(),this.webglRendererThreejsService.render())}),ct(()=>{this.curHiddenInputOpNodeIds=this.splitPaneService.hiddenInputOpNodeIds(),this.curHiddenOutputIds=this.splitPaneService.hiddenOutputIds(),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.updateNodesStyles(),this.webglRendererThreejsService.render()}),this.syncNavigationService.navigationSourceChanged$.pipe(fi(this.destroyRef)).subscribe(F=>{if(F&&F.paneIndex!==this.appService.getPaneIndexById(this.paneId))if(F.nodeId==="")this.syncNavigationService.showNoMappedNodeMessageTrigger$.next(void 0);else{let z=this.syncNavigationService.getMappedNodeId(F.paneIndex,F.nodeId),O=this.curModelGraph.nodesById[z],G=Et(O)&&O.hideInLayout;O&&O.id!==this.selectedNodeId&&!G?(this.revealNode(z,!1),this.syncNavigationService.showNoMappedNodeMessageTrigger$.next(void 0)):!O||G?this.syncNavigationService.showNoMappedNodeMessageTrigger$.next({}):this.syncNavigationService.showNoMappedNodeMessageTrigger$.next(void 0)}})}ngOnInit(){this.graphId=this.modelGraph.id,this.curModelGraph=this.modelGraph,this.appService.updateCurrentModelGraph(this.paneId,this.curModelGraph),this.inPopup||(this.curShowOnNodeItemTypes=this.appService.getSavedShowOnNodeItemTypes(),this.curShowOnEdgeItemTypes=this.appService.getSavedShowOnEdgeItemTypes()),this.webglRendererThreejsService.setupZoomAndPan(this.container.nativeElement,1e-4,20),this.webglRendererThreejsService.setupThreeJs(),this.ngZone.runOutsideAngular(()=>{this.canvas.nativeElement.addEventListener("mousemove",s=>{this.handleMouseMove(s)})});let e=this.appService.curInitialUiState(),n=s=>{this.updateNodesAndEdgesToRender(),this.renderGraph(),this.webglRendererThreejsService.zoomFitGraph(.9,0);let a=this.appService.getPaneById(this.paneId);if(a?.snapshotToRestore!=null){let l=a.snapshotToRestore;this.curShowOnNodeItemTypes=a.snapshotToRestore.showOnNodeItemTypes||{},this.appService.setShowOnNode(this.paneId,this.rendererId,this.curShowOnNodeItemTypes),this.sendRelayoutGraphRequest(l.selectedNodeId||"",l.deepestExpandedGroupNodeIds||[],!1,l.rect,!0,l.showOnNodeItemTypes,!0,!1),a.snapshotToRestore=void 0}else s!=null&&s!==""&&setTimeout(()=>{this.appService.curToLocateNodeInfo.set({nodeId:s,rendererId:this.rendererId,isGroupNode:!1,noNodeShake:!0})});this.sendExpandGroupNodeRequest(this.rootNodeId||"")};if(!e||e.paneStates.length===0||this.inPopup){let s=this.inPopup?void 0:this.appService.getPaneById(this.paneId)?.selectedNodeInfo?.nodeId;n(s)}else{let s=this.appService.getPaneIndexById(this.paneId),a=e.paneStates[s];if(!a)n();else{let l=a.deepestExpandedGroupNodeIds;if(l.length===1&&l[0]==="___all___"){let c=[];Bm(void 0,this.curModelGraph,c,!0),l=c}else{let c=this.curModelGraph.nodesById[a.selectedNodeId],d=c?.nsParentId||"";c&&d&&!l.includes(d)&&l.push(d)}a.selectedNodeId!==""||l.length>0?this.sendRelayoutGraphRequest(a.selectedNodeId,l,!0,void 0,!1,void 0,!1,!1):n(),this.uiStateService.setDeepestExpandedGroupNodeIds(a.deepestExpandedGroupNodeIds,s)}}let r=window;r[ib]==null&&(r[ib]={renderers:{}});let o=this.inPopup?-1:this.appService.getPaneIndexById(this.paneId);r[ib].renderers[o]=this,this.benchmark&&this.startBenchmark()}ngOnDestroy(){this.workerService.worker.removeEventListener("message",this.messageEventListener),this.webglRendererThreejsService.dispose(),document.body.style.cursor="default"}getActiveSelectedNodeInfo(){if(this.selectedNodeId)return{nodeId:this.selectedNodeId,rendererId:this.rendererId,isGroupNode:wt(this.curModelGraph.nodesById[this.selectedNodeId])}}toggleIoTrace(){this.tracing=!this.tracing,this.tracing?this.webglRendererIoTracingService.genTracingData():this.webglRendererIoTracingService.clearTracingData(),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.updateNodesStyles(),this.webglRendererThreejsService.render()}setZoomFactor(e){let n=this.container.nativeElement,r=this.webglRendererThreejsService.convertScreenPosToScene(0,0),o=this.webglRendererThreejsService.convertScreenPosToScene(n.offsetWidth,n.offsetHeight),s=Math.min(r.x,o.x),a=Math.max(r.x,o.x),l=Math.min(r.y,o.y),c=Math.max(r.y,o.y),d=a-s,u=c-l,h=(s+a)/2,p=(l+c)/2,f=h-d/2/e,m=h+d/2/e,b=p-u/2/e,g=p+u/2/e;this.webglRendererThreejsService.zoomFit({x:f,y:b,width:m-f,height:g-b},.9,0,!1,!1)}handleMouseDownCanvas(e){Fm&&(e.metaKey||e.ctrlKey)||!Fm&&e.ctrlKey?(this.draggingArea=!0,this.rangeZoomDragArea.start(e,(n,r,o,s,a)=>{let l=this.webglRendererThreejsService.convertScreenPosToScene(r,o),c=this.webglRendererThreejsService.convertScreenPosToScene(s,a),d=Math.min(l.x,c.x),u=Math.max(l.x,c.x),h=Math.min(l.y,c.y),p=Math.max(l.y,c.y);this.webglRendererThreejsService.zoomFit({x:d,y:h,width:u-d,height:p-h},.9,200,!1,!1),this.draggingArea=!1})):e.shiftKey&&this.webglRendererSubgraphSelectionService.enableSubgraphSelection&&(this.draggingArea=!0,this.dragToSelectDragArea.start(e,(n,r,o,s,a)=>{if(this.draggingArea=!1,n)this.hoveredNodeId?this.curModelGraph.nodesById[this.hoveredNodeId]&&this.handleShiftSelectNode(this.hoveredNodeId):this.handleClearSubgraphSelectedNodes();else{let l=this.webglRendererThreejsService.convertScreenPosToScene(r,o),c=this.webglRendererThreejsService.convertScreenPosToScene(s,a),d=Math.min(l.x,c.x),u=Math.max(l.x,c.x),h=Math.min(l.y,c.y),p=Math.max(l.y,c.y),f=[];for(let{node:m}of this.nodesToRender){let b=this.getNodeX(m),g=this.getNodeY(m),_=this.getNodeWidth(m),x=this.getNodeHeight(m),C=b,T=g,D=b+_,E=g+x,A=uD,F=h>E,z=p1&&(this.curSubgraphIdsForMenu=n,this.subgraphMenuTrigger.openMenu())}handleClickSubgraphId(e){this.openSubgraph(e)}handleDoubleClickOnGraph(e,n){if(this.selectedNodeId!==""&&!n){let r=this.curModelGraph.nodesById[this.selectedNodeId];this.appService.updateDoubleClickedNode(this.selectedNodeId,this.curModelGraph.id,this.curModelGraph.collectionLabel||"",r),this.handleToggleExpandCollapse(r,e)}}handleClickOnGraph(e){this.hoveredNodeId?this.curModelGraph.nodesById[this.hoveredNodeId]&&(e||this.handleSelectNode(this.hoveredNodeId)):this.handleSelectNode("")}handleMouseEnterGroupNodeIcon(){this.groupNodeIconMatTooltip.show()}handleMouseLeaveGroupNodeIcon(){this.groupNodeIconMatTooltip.hide()}handleMouseEnterIoPicker(){this.ioPickerMatTooltip.show()}handleMouseLeaveIoPicker(){this.ioPickerMatTooltip.hide()}handleHoveredGroupNodeIconChanged(e){if(this.groupNodeIcon.top=-1e3,this.groupNodeIcon.left=-1e3,this.groupNodeIcon.width=0,this.groupNodeIcon.height=0,this.groupNodeIcon.tooltip=void 0,this.hoveredGroupNodeIconId!==""&&e!=null){let{x:n,y:r}=this.webglRendererThreejsService.convertScenePosToScreen(e.bound.x-e.bound.width/2,e.bound.y-e.bound.height/2),{x:o,y:s}=this.webglRendererThreejsService.convertScenePosToScreen(e.bound.x+e.bound.width/2,e.bound.y+e.bound.height/2);if(this.groupNodeIcon.top=r,this.groupNodeIcon.left=n,this.groupNodeIcon.width=o-n,this.groupNodeIcon.height=s-r,e.id.includes("_left")){let a=this.curModelGraph.nodesById[e.nodeId];this.groupNodeIcon.tooltip=a.expanded?"Collapse layer":"Expand layer"}else e.id.includes("_right")&&(this.groupNodeIcon.tooltip="More actions")}this.changeDetectorRef.detectChanges()}isNodeRendered(e){return this.nodesToRenderMap[e]!=null}sendLocateNodeRequest(e,n,r=!1,o=!1){if(this.showBusySpinnerWithDelay(),this.isNodeRendered(e))this.hideBusySpinner(),this.handleLocateNodeDone(n,this.curModelGraph,e,[],r,o,!0);else{let s={eventType:sr.LOCATE_NODE_REQ,modelGraphId:this.curModelGraph.id,showOnNodeItemTypes:this.curShowOnNodeItemTypes,nodeDataProviderRuns:this.curNodeDataProviderRuns,nodeId:e,rendererId:n,noNodeShake:r,select:o};this.workerService.worker.postMessage(s)}}sendRelayoutGraphRequest(e,n,r=!1,o,s=!1,a,l,c=!0){this.showBusySpinnerWithDelay();let d={eventType:sr.RELAYOUT_GRAPH_REQ,modelGraphId:this.curModelGraph.id,showOnNodeItemTypes:a||this.curShowOnNodeItemTypes,nodeDataProviderRuns:this.curNodeDataProviderRuns,selectedNodeId:e,targetDeepestGroupNodeIdsToExpand:n,rendererId:this.rendererId,forRestoringUiState:r,rectToZoomFit:o,clearAllExpandStates:s,forRestoringSnapshotAfterTogglingFlattenLayers:l,triggerNavigationSync:c};this.workerService.worker.postMessage(d)}animateIntoPositions(e=n=>{this.updateAnimatinProgress(n)}){let n=Date.now(),r=()=>{let o=Date.now()-n,s=this.appService.testMode?1:Math.min(1,o/rpe);if(s=Math.sin(s*Math.PI/2),e(s),this.webglRendererThreejsService.render(),s>=1){e(s),this.webglRendererThreejsService.render();return}requestAnimationFrame(r)};r()}flash(){this.flashing=!0,this.changeDetectorRef.detectChanges(),setTimeout(()=>{this.flashing=!1,this.changeDetectorRef.detectChanges()},300)}updateNodeBgColorWhenFar(){let e=this.webglRendererThreejsService.convertZFromSceneToScreen(30)*this.webglRendererThreejsService.curScale,n=7.5,o=Math.max(0,Math.min(1,(n-e)/(n-7)));Math.abs(o-this.savedUpdateNodeBgWhenFarProgress)<1e-5||(this.savedUpdateNodeBgWhenFarProgress=o,this.nodeBodies.setBgColorWhenFar(this.NODE_LABEL_COLOR,o/3))}showIoTree(e,n,r){let o=this.createOverlay(e),s=o.attach(this.portal),a=ul(n,[],r);s.instance.solidBackground=!0,s.instance.rendererId=this.rendererId,s.instance.updateData(a),s.instance.onClose.subscribe(()=>{o.dispose()})}getNodeX(e){return(e.x||0)+(e.globalX||0)}getNodeY(e){return(e.y||0)+(e.globalY||0)}getNodeWidth(e){return e.width||0}getNodeHeight(e){return e.height||0}getNodeRect(e){return{x:this.getNodeX(e),y:this.getNodeY(e),width:this.getNodeWidth(e),height:this.getNodeHeight(e)}}getNodeLabelRelativeY(e){return 14}getNodeLabelSizes(e){let n=Go/this.texts.getFontSize(),r=Number.POSITIVE_INFINITY,o=Number.NEGATIVE_INFINITY,s=0,a=md(this.getNodeLabel(e));for(let l=0;l{this.webglRendererThreejsService.zoomFit(s,1,200,!1,!1)};a?setTimeout(()=>{d()}):d()}else r!==cpe&&this.webglRendererThreejsService.zoomFitOnNode(r,n,o?0:qP);this.selectedNodeId!==r&&this.handleSelectNode(r||"",c),this.inPopup||this.uiStateService.setDeepestExpandedGroupNodeIds(l||[],this.appService.getPaneIndexById(this.paneId))}handleCurNodeDataProviderResultsChanged(){this.renderGraph(),this.updateNodesStyles(),this.webglRendererThreejsService.render()}handleLocateNodeDone(e,n,r,o,s,a,l=!1){this.updateCurModelGraph(n),this.updateNodesAndEdgesToRender(),a&&this.appService.selectNode(this.paneId,{nodeId:r,rendererId:e,isGroupNode:wt(this.curModelGraph.nodesById[r])}),this.webglRendererThreejsService.zoomFitOnNode(r,n,qP),l||(this.renderGraph(),this.webglRendererIoHighlightService.updateIncomingAndOutgoingHighlights(),this.webglRendererIdenticalLayerService.updateIdenticalLayerIndicators(),this.updateNodesStyles(),this.webglRendererThreejsService.render(),this.inPopup||this.uiStateService.setDeepestExpandedGroupNodeIds(o,this.appService.getPaneIndexById(this.paneId))),s||setTimeout(()=>{this.shakeNode(r)},250)}sendExpandGroupNodeRequest(e){let n=this.curModelGraph.nodesById[e];n!=null&&!n.expanded&&this.sendExpandOrCollapseGroupNodeRequest(n,!1,!0)}sendExpandOrCollapseGroupNodeRequest(e,n=!1,r){this.showBusySpinnerWithDelay();let o={eventType:sr.EXPAND_OR_COLLAPSE_GROUP_NODE_REQ,modelGraphId:this.curModelGraph.id,groupNodeId:e?.id,expand:r??!e?.expanded,showOnNodeItemTypes:this.curShowOnNodeItemTypes,nodeDataProviderRuns:this.curNodeDataProviderRuns,rendererId:this.rendererId,paneId:this.paneId,all:n,ts:Date.now()};this.workerService.worker.postMessage(o)}renderGraph(){this.clearScene(),this.renderEdges(),this.renderTexts(),this.curShowOnEdgeItemTypes[Bl.TENSOR_SHAPE]?.selected&&this.webglRendererEdgeTextsService.renderEdgeTexts(),this.webglRendererAttrsTableService.renderAttrsTable(),this.renderNodes(),this.webglRendererNdpService.renderNodeDataProviderDistributionBars(),this.renderArtificialGroupBorders(),this.webglRendererSearchResultsService.renderSearchResults(),this.webglRendererSubgraphSelectionService.renderSubgraphSelectedNodeMarkers(),this.updateNodeBgColorWhenFar(),this.animateIntoPositions()}renderNodes(){this.currentMinX=Number.POSITIVE_INFINITY,this.currentMinZ=Number.POSITIVE_INFINITY,this.currentMaxX=Number.NEGATIVE_INFINITY,this.currentMaxZ=Number.NEGATIVE_INFINITY;let e=this.nodesToRender.length,n=[],r=[],o=[],s=[],a=[],l=Go/this.texts.getFontSize();for(let c=0;c0){if(this.appService.config()?.showOpNodeOutOfLayerEdgesWithoutSelecting){for(let{node:e}of this.nodesToRender)if(Et(e)&&e.nsParentId){let{overlayEdges:n,renderedEdges:r}=this.webglRendererIoHighlightService.getHighlightedIncomingNodesAndEdges(this.curHiddenInputOpNodeIds,e,{ignoreEdgesWithinSameNamespace:!0,reuseRenderedEdgeCurvePoints:!0});if(n.length>0){this.renderedEdgeIdsToHide.push(...r.map(a=>a.id));for(let a of n)this.edgesToRender.push({edge:a,index:92/Zt})}let{overlayEdges:o,renderedEdges:s}=this.webglRendererIoHighlightService.getHighlightedOutgoingNodesAndEdges(this.curHiddenOutputIds,e,{ignoreEdgesWithinSameNamespace:!0,reuseRenderedEdgeCurvePoints:!0});if(o.length>0){this.renderedEdgeIdsToHide.push(...s.map(a=>a.id));for(let a of o)this.edgesToRender.push({edge:a,index:92/Zt})}}}this.edges.generateMesh(this.edgesToRender,this.curModelGraph),this.webglRendererThreejsService.addToScene(this.edges.edgesMesh),this.webglRendererThreejsService.addToScene(this.edges.arrowHeadsMesh)}}renderTexts(){let e=[];for(let{node:n,index:r}of this.nodesToRender){let o=this.NODE_LABEL_COLOR;for(let a of this.curProcessedNodeStylerRules)if(Vm(n,a.queries,this.curModelGraph)){let l=fd(a,qs.NODE_TEXT_COLOR);l!==""&&(o=new bn.Color(l));break}let s=md(this.getNodeLabel(n));for(let a=0;a{this.setHoveredNodeId(r),this.updateNodesStyles(),this.webglRendererThreejsService.render()}),this.groupNodeIconBgs.raycast(this.webglRendererThreejsService.raycaster,(r,o)=>{this.hoveredGroupNodeIconId=r,this.nodeIdForHoveredGroupNodeIcon=o?.nodeId||"",this.updateNodesStyles(),this.handleHoveredGroupNodeIconChanged(o),this.webglRendererThreejsService.render()},!1),this.webglRendererIoHighlightService.ioPickerBgs.raycast(this.webglRendererThreejsService.raycaster,(r,o)=>{this.hoveredIoPickerId=r,this.handleHoveredIoPickerChanged(o)}),this.subgraphIndicatorBgs.raycast(this.webglRendererThreejsService.raycaster,(r,o)=>{this.hoveredSubgraphIndicatorId=r,this.handleHoveredSubgraphIndicatorChanged(o)})}handleHoveredIoPickerChanged(e){this.ioPickerTop=-1e3,this.ioPickerLeft=-1e3,this.ioPickerTooltip="";let n=this.hoveredIoPickerId.endsWith("input");if(this.hoveredIoPickerId!==""){let{x:r,y:o}=this.webglRendererThreejsService.convertScenePosToScreen(e.bound.x-e.bound.width/2,e.bound.y-e.bound.height/2),{x:s,y:a}=this.webglRendererThreejsService.convertScenePosToScreen(e.bound.x+e.bound.width/2,e.bound.y+e.bound.height/2);this.ioPickerTop=o,this.ioPickerLeft=r,this.ioPickerWidth=s-r,this.ioPickerHeight=a-o,this.ioPickerTooltip=`Click to reveal ${n?"input":"output"} node(s)`}this.changeDetectorRef.detectChanges()}handleHoveredSubgraphIndicatorChanged(e){if(this.subgraphIndicatorTop=-1e3,this.subgraphIndicatorLeft=-1e3,this.hoveredSubgraphIndicatorId!==""){let{x:n,y:r}=this.webglRendererThreejsService.convertScenePosToScreen(e.bound.x-e.bound.width/2,e.bound.y-e.bound.height/2),{x:o,y:s}=this.webglRendererThreejsService.convertScenePosToScreen(e.bound.x+e.bound.width/2,e.bound.y+e.bound.height/2);this.subgraphIndicatorTop=r,this.subgraphIndicatorLeft=n,this.subgraphIndicatorWidth=o-n,this.subgraphIndicatorHeight=s-r}this.changeDetectorRef.detectChanges()}updateNodesStyles(){let e=!1;this.selectedNodeId!==this.updateNodesStylesSavedSelectedNodeId&&(this.updateNodesStylesSavedSelectedNodeId=this.selectedNodeId,e=!0);let n=!1;this.webglRendererIoTracingService.curIoTracingData!==this.updateNodesStylesSavedIoTracingData&&(this.updateNodesStylesSavedIoTracingData=this.webglRendererIoTracingService.curIoTracingData,n=!0),this.nodeBodies.restoreBorderColors(),this.nodeBodies.restoreBgColors(),this.nodeBodies.restoreBorderWidths(),this.nodeBodies.restoreOpacities(),this.groupNodeIconBgs.restoreOpacities(),this.texts.restoreOpacities(),this.texts.restoreColors(),this.webglRendererEdgeTextsService.edgeTexts.restoreOpacities(),this.groupNodeIcons.restoreOpacities(),this.webglRendererAttrsTableService.attrsTableTexts.restoreOpacities(),(e||n)&&this.edges.restoreColors(),this.edges.restoreYOffsets();let r=this.curModelGraph.nodesById[this.selectedNodeId];if(r!=null&&wt(r)){let u=r.identicalGroupIndex;if(u!=null){let h=this.nodesToRender.filter(({node:p})=>wt(p)&&p.identicalGroupIndex===u).map(({node:p})=>p.id);this.nodeBodies.updateBgColor(h,this.IDENTICAL_GROUPS_BG_COLOR)}}let o=this.curModelGraph.nodesById[this.hoveredNodeId],s=wt(o)?this.HOVERED_GROUP_NODE_BORDER_COLOR:this.HOVERED_NODE_BORDER_COLOR;Et(o)&&o.style?.hoveredBorderColor&&(s=new bn.Color(o.style.hoveredBorderColor)),this.nodeBodies.updateBorderColor([this.hoveredNodeId],s),this.selectedNodeId&&r!=null&&(this.nodeBodies.updateBorderColor([this.selectedNodeId],this.SELECTED_NODE_BORDER_COLOR),this.nodeBodies.updateBorderWidth([this.selectedNodeId],ipe),this.nodeBodies.updateBgColor([this.selectedNodeId],this.SELECTED_NODE_BG_COLOR,Et(r))),this.groupNodeIconBgs.updateOpacity([this.hoveredGroupNodeIconId],.07);let a=Object.keys(this.webglRendererIoHighlightService.inputsByHighlightedNode);if(a.length>0){this.nodeBodies.updateBorderColor(a,new bn.Color(this.EDGE_COLOR_INCOMING.r,this.EDGE_COLOR_INCOMING.g,this.EDGE_COLOR_INCOMING.b));for(let u of a)this.nodeBodies.updateBorderWidth([u],y5)}let l=Object.keys(this.webglRendererIoHighlightService.outputsByHighlightedNode);if(l.length>0){this.nodeBodies.updateBorderColor(l,new bn.Color(this.EDGE_COLOR_OUTGOING.r,this.EDGE_COLOR_OUTGOING.g,this.EDGE_COLOR_OUTGOING.b));for(let u of l)this.nodeBodies.updateBorderWidth([u],y5)}let c=[...this.webglRendererIoHighlightService.inputsRenderedEdges,...this.webglRendererIoHighlightService.outputsRenderedEdges].map(u=>u.id);c.push(...this.renderedEdgeIdsToHide),this.edges.updateYOffsets(c,1e3);let d=this.webglRendererNdpService.curNodeDataProviderResults()||{};for(let u of Object.keys(d)){if(!this.isNodeRendered(u)||!Et(this.curModelGraph.nodesById[u]))continue;let h=d[u].bgColor;h&&h!=="transparent"&&this.nodeBodies.updateBgColor([u],new bn.Color(h));let p=d[u].textColor;p&&this.texts.updateColorInNode([u],new bn.Color(p))}if(this.webglRendererIoTracingService.curIoTracingData!=null){let u=Object.keys(this.curModelGraph.nodesById).filter(p=>!this.webglRendererIoTracingService.curIoTracingData.visibleNodeIds.has(p)&&this.isNodeRendered(p));this.nodeBodies.updateOpacity(u,.2),this.texts.updateOpacityInNode(u,.3),this.groupNodeIcons.updateOpacityInNode(u,.3),this.webglRendererAttrsTableService.attrsTableTexts.updateOpacityInNode(u,.3),this.webglRendererEdgeTextsService.edgeTexts.updateOpacityInNode(u,.3);let h=this.edgesToRender.filter(({edge:p})=>!this.webglRendererIoTracingService.curIoTracingData.visibleNodeIds.has(p.fromNodeId)||!this.webglRendererIoTracingService.curIoTracingData.visibleNodeIds.has(p.toNodeId)).map(({edge:p})=>p.id);this.edges.updateColors(h,{r:.92,g:.92,b:.92})}}shakeNode(e){if(this.appService.testMode)return;let n=Date.now(),r=()=>{let o=Date.now()-n,s=Math.min(1,o/1100);s=-(Math.cos(Math.PI*s)-1)/2;let a=Math.sin(s*Math.PI*9)*8;if(this.nodeBodies.updateAngle(e,a),this.webglRendererSearchResultsService.searchResultsHighlightBorders.updateAngle(e,a),this.webglRendererThreejsService.render(),s>=1){this.nodeBodies.updateAngle(e,0),this.webglRendererSearchResultsService.searchResultsHighlightBorders.updateAngle(e,0),this.webglRendererThreejsService.render();return}requestAnimationFrame(r)};r()}clearScene(){let e=[this.webglRendererSearchResultsService.searchResultsHighlightBorders.mesh,this.webglRendererSearchResultsService.searchResultsNodeLabelHighlightBg.mesh];this.webglRendererThreejsService.clearScene(e),this.updateNodesStylesSavedSelectedNodeId="",this.updateNodesStylesSavedIoTracingData=void 0}handleDownloadAsPng(e,n){return Ct(this,null,function*(){let r=this.container.nativeElement.offsetWidth/pd(),o=this.container.nativeElement.offsetHeight/pd(),s=this.webglRendererThreejsService.camera;if(e){let d=this.currentMaxX+20,u=this.currentMinX-20,h=this.currentMaxZ+20,p=this.currentMinZ-20;r=d-u,o=h-p;let f=spe/pd();r>f&&(o=o*f/r,r=f),o>f&&(r=r*f/o,o=f),s=this.webglRendererThreejsService.createOrthographicCamera(u,d,-p,-h)}let a=this.pngDownloaderCanvas.nativeElement;this.webglRendererThreejsService.setupPngDownloaderRenderer(a,n,r,o),this.nodeBodies.setBgColorWhenFar(this.NODE_LABEL_COLOR,0),this.webglRendererThreejsService.renderPngDownloader(s),this.nodeBodies.setBgColorWhenFar(this.NODE_LABEL_COLOR,this.savedUpdateNodeBgWhenFarProgress/3);let l=document.createElement("a");l.download="model_explorer_graph.png",dl(l,a.toDataURL()),l.click(),this.webglRendererThreejsService.setSceneBackground(new bn.Color(16777215))})}openSubgraph(e){return Ct(this,null,function*(){this.appService.addSubgraphBreadcrumbItem(this.paneId,this.curModelGraph.id,e,yield this.webglRendererSnapshotService.takeSnapshot());let n=this.appService.getGraphById(e);n&&(this.appService.selectNode(this.paneId,void 0),this.appService.setFlattenLayersInCurrentPane(!1),this.appService.curInitialUiState.set(void 0),this.appService.curToLocateNodeInfo.set(void 0),this.appService.selectGraphInCurrentPane(n))})}getGroupNodeLabelSeparatorId(e,n){return`${e}_${n}`}getGroupNodeBgColor(e){let r=(e.namespace||"").split("/").filter(s=>s!=="").length,o=this.GROUP_NODE_BG_COLORS[Math.min(this.GROUP_NODE_BG_COLORS.length-1,r)];return this.threeColorToRgb(o)}threeColorToRgb(e){return{r:e.r,g:e.g,b:e.b}}startBenchmark(){let e=()=>{this.webglRendererThreejsService.render(!0),requestAnimationFrame(e)};e()}handleShiftSelectNode(e){this.webglRendererSubgraphSelectionService.enableSubgraphSelection&&this.subgraphSelectionService.toggleNode(e)}handleClearSubgraphSelectedNodes(){this.webglRendererSubgraphSelectionService.enableSubgraphSelection&&this.subgraphSelectionService.clearSelection()}createOverlay(e){let n=new bi({positionStrategy:this.overlay.position().flexibleConnectedTo(e).withPositions([{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom"}]).withDefaultOffsetX(e.clientWidth).withViewportMargin(20),hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",maxHeight:"400px",panelClass:"io-tree-popup-container"}),r=this.overlay.create(n);return this.portal=new Li(xc,this.viewContainerRef),r.backdropClick().subscribe(()=>{r.dispose()}),r}showBusySpinnerWithDelay(){this.hideBusySpinner(),this.showBusySpinnerTimeoutRef=window.setTimeout(()=>{this.showBusySpinnerTimeoutRef<0||(this.snackBar.open("Processing. Please wait..."),this.showBusySpinner=!0,this.changeDetectorRef.detectChanges())},1e3)}hideBusySpinner(){this.showBusySpinnerTimeoutRef>=0&&(clearTimeout(this.showBusySpinnerTimeoutRef),this.showBusySpinnerTimeoutRef=-1),this.snackBar.dismiss(),this.showBusySpinner=!1,this.changeDetectorRef.detectChanges()}revealNode(e,n=!0){let r=this.curModelGraph.nodesById[e];return r?(this.sendRelayoutGraphRequest(e,r.nsParentId?[r.nsParentId]:[],!1,void 0,!1,void 0,!1,n),!0):!1}updateCurModelGraph(e){let n=this.curModelGraph.edgesByGroupNodeIds;this.curModelGraph=at(X({},e),{edgesByGroupNodeIds:X(X({},n),e.edgesByGroupNodeIds)}),this.appService.updateCurrentModelGraph(this.paneId,this.curModelGraph)}updateNodesAndEdgesToRender(){if(!this.curModelGraph)return;this.elementsToRender=[],this.nodesToRender=[],this.nodesToRenderMap={},this.edgesToRender=[];let e=!0,n=!1,r=o=>{let s=this.curModelGraph.nodesById[o||""];if(e&&s){this.elementsToRender.push({type:qC.NODE,id:s.id,node:s});let l={node:s,index:this.elementsToRender.length-1};this.nodesToRender.push(l),this.nodesToRenderMap[l.node.id]=l,wt(s)&&s.sectionContainer&&(n=!0)}if(e=!1,o&&s&&s.expanded||!o)for(let l of this.curModelGraph.edgesByGroupNodeIds[o||""]||[])this.elementsToRender.push({type:qC.EDGE,id:l.id,edge:l}),this.edgesToRender.push({edge:l,index:this.elementsToRender.length-1});let a=[];o?s.expanded&&(a=(s.nsChildrenIds||[]).map(l=>this.curModelGraph.nodesById[l])):a=this.curModelGraph.rootNodes;for(let l of a){let c={type:qC.NODE,id:l.id,node:l};!n&&wt(l)&&l.sectionContainer&&(n=!0),this.elementsToRender.push(c);let d={node:l,index:this.elementsToRender.length-1};this.nodesToRender.push(d),this.nodesToRenderMap[d.node.id]=d,wt(l)&&l.expanded&&r(l.id)}};r(this.rootNodeId),this.appService.setPaneHasArtificialLayers(this.paneId,n)}getNodeLabel(e){return Et(e)?e.label==="Placeholder"?e.id:e.label:wt(e)?e.label:"-"}setHoveredNodeId(e){this.hoveredNodeId=e,this.appService.updateHoveredNode(e,this.curModelGraph.id,this.curModelGraph.collectionLabel||"",this.curModelGraph.nodesById[e])}static \u0275fac=function(n){return new(n||i)(q(Re),q(hi),q(Ue),q(Rr),q(ua),q(on),q(Os),q(vc),q(es),q(ha),q(Ul),q(Kt),q(AC),q(kC),q(NC),q(BC),q(FC),q(VC),q(zC),q(UC),q(HC),q(jC),q(WC),q(Hl))};static \u0275cmp=oe({type:i,selectors:[["webgl-renderer"]],viewQuery:function(n,r){if(n&1&&(Me(zhe,7),Me(Uhe,7),Me(Hhe,7),Me(Ghe,7),Me(jhe,7),Me(Whe,7),Me($he,7),Me(qhe,5),Me(Yhe,5),Me(Xhe,7),Me(Qhe,7),Me(Zhe,7)),n&2){let o;_e(o=ve())&&(r.container=o.first),_e(o=ve())&&(r.canvas=o.first),_e(o=ve())&&(r.snapshotCanvas=o.first),_e(o=ve())&&(r.pngDownloaderCanvas=o.first),_e(o=ve())&&(r.hoverToolbar=o.first),_e(o=ve())&&(r.ioPicker=o.first),_e(o=ve())&&(r.subgraphMenuTrigger=o.first),_e(o=ve())&&(r.groupNodeIconMatTooltip=o.first),_e(o=ve())&&(r.ioPickerMatTooltip=o.first),_e(o=ve())&&(r.moreActionsMenuTrigger=o.first),_e(o=ve())&&(r.rangeZoomDragArea=o.first),_e(o=ve())&&(r.dragToSelectDragArea=o.first)}},inputs:{modelGraph:"modelGraph",rendererId:"rendererId",paneId:"paneId",rootNodeId:"rootNodeId",inPopup:"inPopup",benchmark:"benchmark"},outputs:{openInPopupClicked:"openInPopupClicked"},standalone:!0,features:[Bt([AC,kC,NC,BC,FC,VC,zC,UC,HC,jC,WC]),se],decls:39,vars:59,consts:[["container",""],["canvas",""],["snapshotCanvas",""],["pngDownloaderCanvas",""],["groupNodeIconMatTooltip","matTooltip"],["moreActionsMenuTrigger","matMenuTrigger"],["moreActionsMenu","matMenu"],["ioPicker",""],["ioPickerMatTooltip","matTooltip"],["subgraphIndicator",""],["subgraphMenuTrigger","matMenuTrigger"],["menu","matMenu"],["rangeZoomDragArea",""],["dragToSelectDragArea",""],[1,"container",3,"mouseleave"],[1,"main",3,"mousedown","contextmenu"],[1,"snapshot"],[1,"download-png"],[1,"group-node-icon",3,"mouseenter","mouseleave","mousedown"],["matTooltipPosition","above",1,"group-node-icon-tooltip",3,"matTooltip","matTooltipShowDelay","matTooltipDisabled"],[1,"more-actions-menu-trigger",3,"matMenuTriggerFor"],[1,"model-explorer-menu-item-with-icon","expand-all",3,"click"],["class","model-explorer-menu-item-with-icon collapse-all",3,"click",4,"ngIf"],["class","model-explorer-menu-item-with-icon open-in-popup",3,"click",4,"ngIf"],[1,"io-picker",3,"mousedown","mouseenter","mouseleave"],["matTooltipPosition","above",1,"io-picker-tooltip",3,"matTooltip"],["matTooltip","Jump to subgraph","matTooltipPosition","above",1,"subgraph-indicator",3,"mousedown","click"],[1,"subgraph-indicator-menu-trigger",3,"matMenuTriggerFor"],[1,"model-explorer-menu-item-with-icon"],["bgColor","rgba(97, 175, 252, 0.2)","borderColor","#1976d2"],["bgColor","rgba(9, 184, 62, 0.2)","borderColor","#09b83e"],[1,"flash"],[1,"fps"],[1,"model-explorer-menu-item-with-icon","collapse-all",3,"click"],[1,"model-explorer-menu-item-with-icon","open-in-popup",3,"click"],[1,"model-explorer-menu-item-with-icon",3,"click"]],template:function(n,r){if(n&1){let o=te();v(0,"div",14,0),H("mouseleave",function(a){return B(o),V(r.handleMouseLeaveRenderer(a))}),v(2,"canvas",15,1),H("mousedown",function(a){return B(o),V(r.handleMouseDownCanvas(a))})("contextmenu",function(a){return B(o),V(a.preventDefault())}),y(),ee(4,"canvas",16,2)(6,"canvas",17,3),v(8,"div",18),H("mouseenter",function(){return B(o),V(r.handleMouseEnterGroupNodeIcon())})("mouseleave",function(){return B(o),V(r.handleMouseLeaveGroupNodeIcon())})("mousedown",function(a){return B(o),V(r.handleClickGroupNodeIcon(a))}),y(),ee(9,"div",19,4)(11,"div",20,5),v(13,"mat-menu",null,6)(15,"div",21),H("click",function(){return B(o),V(r.handleClickExpandAll(r.hoveredNodeIdWhenClickingMoreActions))}),v(16,"mat-icon"),M(17,"unfold_more_double"),y(),M(18," Expand layer & all sub-layers "),y(),W(19,Khe,4,0,"div",22)(20,Jhe,4,0,"div",23),y(),v(21,"div",24,7),H("mousedown",function(a){return B(o),V(r.handleClickIoPicker(a))})("mouseenter",function(){return B(o),V(r.handleMouseEnterIoPicker())})("mouseleave",function(){return B(o),V(r.handleMouseLeaveIoPicker())}),y(),ee(23,"div",25,8),v(25,"div",26,9),H("mousedown",function(a){return B(o),V(a.stopPropagation())})("click",function(){return B(o),V(r.handleClickSubgraphIndicator())}),y(),ee(27,"div",27,10),v(29,"mat-menu",null,11),Xt(31,epe,4,1,"div",28,wr),y(),ee(33,"drag-area",29,12)(35,"drag-area",30,13)(37,"div",31),W(38,tpe,2,1,"div",32),y()}if(n&2){let o=fe(14),s=fe(30);w(8),an("top",r.groupNodeIcon.top,"px")("left",r.groupNodeIcon.left,"px")("width",r.groupNodeIcon.width,"px")("height",r.groupNodeIcon.height,"px"),w(),an("top",r.groupNodeIcon.top,"px")("left",r.groupNodeIcon.left,"px")("width",r.groupNodeIcon.width,"px")("height",r.groupNodeIcon.height,"px"),R("matTooltip",r.groupNodeIcon.tooltip||"")("matTooltipShowDelay",200)("matTooltipDisabled",r.groupNodeIcon.tooltip==null),w(2),an("top",r.groupNodeIcon.top+r.groupNodeIcon.height,"px")("left",r.groupNodeIcon.left,"px"),R("matMenuTriggerFor",o),w(8),R("ngIf",r.getShowCollapseAllButton(r.hoveredNodeIdWhenClickingMoreActions)),w(),R("ngIf",r.showOpenInPopupButton),w(),an("top",r.ioPickerTop,"px")("left",r.ioPickerLeft,"px")("width",r.ioPickerWidth,"px")("height",r.ioPickerHeight,"px"),w(2),an("top",r.ioPickerTop,"px")("left",r.ioPickerLeft,"px")("width",r.ioPickerWidth,"px")("height",r.ioPickerHeight,"px"),R("matTooltip",r.ioPickerTooltip),w(2),an("top",r.subgraphIndicatorTop,"px")("left",r.subgraphIndicatorLeft,"px")("width",r.subgraphIndicatorWidth,"px")("height",r.subgraphIndicatorHeight,"px"),w(2),an("top",r.subgraphIndicatorTop+r.subgraphIndicatorHeight,"px")("left",r.subgraphIndicatorLeft,"px"),R("matMenuTriggerFor",s),w(4),Qt(r.curSubgraphIdsForMenu),w(6),ne("flashing",r.flashing),w(),re(r.benchmark?38:-1)}},dependencies:[Oe,On,zG,Je,dt,ca,is,yc,$t,qn],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;overflow:hidden;position:relative}.container[_ngcontent-%COMP%] canvas.main[_ngcontent-%COMP%]{width:100%!important;height:100%!important;box-sizing:border-box}.container[_ngcontent-%COMP%] canvas.snapshot[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] canvas.download-png[_ngcontent-%COMP%]{position:absolute;left:0;bottom:0;width:400px;height:300px;border:1px solid red;box-sizing:border-box;background-color:#fff;display:none}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%]{position:absolute;width:50px;height:40px;box-sizing:border-box;display:flex;transition:opacity .15s;opacity:1;pointer-events:none}.container[_ngcontent-%COMP%] .hover-toolbar.hide[_ngcontent-%COMP%]{transition:none;opacity:0}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .main-content-wrapper[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;justify-content:center;pointer-events:all}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%]{font-size:12px;border:1px solid #ccc;background-color:#fafafae6;border-radius:99px;padding:0 8px;box-sizing:border-box;box-shadow:0 1px 3px #0000001a,0 1px 2px -1px #0000001a;display:flex;align-items:center}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:.8;width:24px;padding:4px 0}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1;background-color:#eee}.container[_ngcontent-%COMP%] .hover-toolbar[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .main-content[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;font-weight:700;width:16px;height:16px;line-height:16px;color:#ea8600}.container[_ngcontent-%COMP%] .io-picker[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .group-node-icon[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .subgraph-indicator[_ngcontent-%COMP%]{position:absolute;box-sizing:border-box;display:flex;background-color:transparent}.container[_ngcontent-%COMP%] .group-node-icon[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .io-picker[_ngcontent-%COMP%]{z-index:100}.container[_ngcontent-%COMP%] .group-node-icon-tooltip[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .io-picker-tooltip[_ngcontent-%COMP%]{position:absolute;z-index:50}.container[_ngcontent-%COMP%] .subgraph-indicator-menu-trigger[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .more-actions-menu-trigger[_ngcontent-%COMP%]{position:absolute;visibility:hidden}.container[_ngcontent-%COMP%] .flash[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:5000;box-sizing:border-box;border:5px solid #1976d2;pointer-events:none;opacity:0}@keyframes _ngcontent-%COMP%_flashing{5%{opacity:1}to{opacity:0}}.container[_ngcontent-%COMP%] .flashing[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_flashing .3s ease-out}.container[_ngcontent-%COMP%] .fps[_ngcontent-%COMP%]{position:absolute;top:12px;left:12px;z-index:100;font-size:32px;border:1px solid #777;padding:8px;border-radius:4px;background-color:#fff} .multiline-tooltip{white-space:pre-line} .multiline-tooltip-left{white-space:pre-line} .multiline-tooltip-left>div{text-align:left} .model-explorer-menu-item-with-icon{font-family:Google Sans Text,Arial,Helvetica,sans-serif;display:flex;align-items:center;font-size:12px;padding:5px 8px;line-height:15px;letter-spacing:normal} .model-explorer-menu-item-with-icon mat-icon{font-size:16px;width:16px;height:16px;margin-right:4px;color:#999} .model-explorer-menu-item-with-icon:hover{background-color:#0000000a} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();function dpe(i,t){if(i&1){let e=te();v(0,"button",10),H("click",function(){B(e);let r=I(2);return V(r.handleClickStart())}),M(1," Start "),y()}}function upe(i,t){i&1&&(v(0,"div",9),M(1,"Generating graph. Please wait..."),y())}function hpe(i,t){if(i&1&&(v(0,"div",2)(1,"div",4)(2,"div",5),M(3,"Node count"),y(),ee(4,"input",6),y(),v(5,"div",4)(6,"div",5),M(7,"Edge count"),y(),ee(8,"input",6),y(),v(9,"div",4)(10,"div",5),M(11,"Colorize"),y(),ee(12,"input",7),y(),W(13,dpe,2,0,"button",8)(14,upe,2,0,"div",9),y()),i&2){let e=I();w(4),R("formControl",e.curNodeCount),w(4),R("formControl",e.curEdgeCount),w(4),R("formControl",e.curColorize),w(),re(e.generating?14:13)}}function ppe(i,t){if(i&1&&ee(0,"webgl-renderer",3),i&2){let e=I();R("modelGraph",e.modelGraph)("benchmark",!0)}}var fpe=En,w5=(()=>{class i{changeDetectorRef;curNodeCount=new Er(1e4);curEdgeCount=new Er(5e3);curColorize=new Er(!1);generating=!1;modelGraph;constructor(e){this.changeDetectorRef=e}handleClickStart(){this.generating=!0,this.changeDetectorRef.detectChanges(),setTimeout(()=>{this.genModelGraph()},100)}genModelGraph(){let e=this.curNodeCount.value,n=this.curEdgeCount.value,r=Math.max(500,Math.floor(Math.sqrt(e)*300)),o=[];for(let l=0;l{class i{extensionServerAddress=mpe;extensions={};loadExtensions(){return Ct(this,null,function*(){let e=(yield this.sendGetRequest("api_list_extensions"))||[];e.sort((n,r)=>n.name.localeCompare(r.name));for(let n of e)this.extensions[n.id]=n;return e})}sendCommandToExtension(e){return Ct(this,null,function*(){return yield this.sendGetRequest("api_cmd",e)})}updateExtensionServerAddress(e){this.extensionServerAddress=e}sendGetRequest(e,n){return Ct(this,null,function*(){let r=`${this.extensionServerAddress}/${e}`;n&&(r=`${r}?cmd=${encodeURIComponent(JSON.stringify(n))}`);try{let o=yield fetch(r,{credentials:"include"});return o.ok?yield o.json():void 0}catch(o){console.warn(o);return}})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var gpe=["determinateSpinner"];function _pe(i,t){if(i&1&&(mo(),v(0,"svg",11),ee(1,"circle",12),y()),i&2){let e=I();qe("viewBox",e._viewBox()),w(),an("stroke-dasharray",e._strokeCircumference(),"px")("stroke-dashoffset",e._strokeCircumference()/2,"px")("stroke-width",e._circleStrokeWidth(),"%"),qe("r",e._circleRadius())}}var vpe=new pe("mat-progress-spinner-default-options",{providedIn:"root",factory:ype});function ype(){return{diameter:S5}}var S5=100,bpe=10,pa=(()=>{class i{get color(){return this._color||this._defaultColor}set color(e){this._color=e}constructor(){this._elementRef=S(Fe),this._defaultColor="primary",this._value=0,this._diameter=S5;let e=S(Kn,{optional:!0}),n=S(vpe);this._noopAnimations=e==="NoopAnimations"&&!!n&&!n._forceAnimations,this.mode=this._elementRef.nativeElement.nodeName.toLowerCase()==="mat-spinner"?"indeterminate":"determinate",n&&(n.color&&(this.color=this._defaultColor=n.color),n.diameter&&(this.diameter=n.diameter),n.strokeWidth&&(this.strokeWidth=n.strokeWidth))}get value(){return this.mode==="determinate"?this._value:0}set value(e){this._value=Math.max(0,Math.min(100,e||0))}get diameter(){return this._diameter}set diameter(e){this._diameter=e||0}get strokeWidth(){return this._strokeWidth??this.diameter/10}set strokeWidth(e){this._strokeWidth=e||0}_circleRadius(){return(this.diameter-bpe)/2}_viewBox(){let e=this._circleRadius()*2+this.strokeWidth;return`0 0 ${e} ${e}`}_strokeCircumference(){return 2*Math.PI*this._circleRadius()}_strokeDashOffset(){return this.mode==="determinate"?this._strokeCircumference()*(100-this._value)/100:null}_circleStrokeWidth(){return this.strokeWidth/this.diameter*100}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["mat-progress-spinner"],["mat-spinner"]],viewQuery:function(n,r){if(n&1&&Me(gpe,5),n&2){let o;_e(o=ve())&&(r._determinateCircle=o.first)}},hostAttrs:["role","progressbar","tabindex","-1",1,"mat-mdc-progress-spinner","mdc-circular-progress"],hostVars:18,hostBindings:function(n,r){n&2&&(qe("aria-valuemin",0)("aria-valuemax",100)("aria-valuenow",r.mode==="determinate"?r.value:null)("mode",r.mode),Gr("mat-"+r.color),an("width",r.diameter,"px")("height",r.diameter,"px")("--mdc-circular-progress-size",r.diameter+"px")("--mdc-circular-progress-active-indicator-width",r.diameter+"px"),ne("_mat-animation-noopable",r._noopAnimations)("mdc-circular-progress--indeterminate",r.mode==="indeterminate"))},inputs:{color:"color",mode:"mode",value:[2,"value","value",Jn],diameter:[2,"diameter","diameter",Jn],strokeWidth:[2,"strokeWidth","strokeWidth",Jn]},exportAs:["matProgressSpinner"],standalone:!0,features:[nn,se],decls:14,vars:11,consts:[["circle",""],["determinateSpinner",""],["aria-hidden","true",1,"mdc-circular-progress__determinate-container"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__determinate-circle-graphic"],["cx","50%","cy","50%",1,"mdc-circular-progress__determinate-circle"],["aria-hidden","true",1,"mdc-circular-progress__indeterminate-container"],[1,"mdc-circular-progress__spinner-layer"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-left"],[3,"ngTemplateOutlet"],[1,"mdc-circular-progress__gap-patch"],[1,"mdc-circular-progress__circle-clipper","mdc-circular-progress__circle-right"],["xmlns","http://www.w3.org/2000/svg","focusable","false",1,"mdc-circular-progress__indeterminate-circle-graphic"],["cx","50%","cy","50%"]],template:function(n,r){if(n&1&&(W(0,_pe,2,8,"ng-template",null,0,Mt),v(2,"div",2,1),mo(),v(4,"svg",3),ee(5,"circle",4),y()(),Yy(),v(6,"div",5)(7,"div",6)(8,"div",7),nr(9,8),y(),v(10,"div",9),nr(11,8),y(),v(12,"div",10),nr(13,8),y()()()),n&2){let o=fe(1);w(4),qe("viewBox",r._viewBox()),w(),an("stroke-dasharray",r._strokeCircumference(),"px")("stroke-dashoffset",r._strokeDashOffset(),"px")("stroke-width",r._circleStrokeWidth(),"%"),qe("r",r._circleRadius()),w(4),R("ngTemplateOutlet",o),w(2),R("ngTemplateOutlet",o),w(2),R("ngTemplateOutlet",o)}},dependencies:[Gs],styles:[".mat-mdc-progress-spinner{display:block;overflow:hidden;line-height:0;position:relative;direction:ltr;transition:opacity 250ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-progress-spinner circle{stroke-width:var(--mdc-circular-progress-active-indicator-width, 4px)}.mat-mdc-progress-spinner._mat-animation-noopable,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__determinate-circle{transition:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__spinner-layer,.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container{animation:none !important}.mat-mdc-progress-spinner._mat-animation-noopable .mdc-circular-progress__indeterminate-container circle{stroke-dasharray:0 !important}@media(forced-colors: active){.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic,.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle{stroke:currentColor;stroke:CanvasText}}.mdc-circular-progress__determinate-container,.mdc-circular-progress__indeterminate-circle-graphic,.mdc-circular-progress__indeterminate-container,.mdc-circular-progress__spinner-layer{position:absolute;width:100%;height:100%}.mdc-circular-progress__determinate-container{transform:rotate(-90deg)}.mdc-circular-progress--indeterminate .mdc-circular-progress__determinate-container{opacity:0}.mdc-circular-progress__indeterminate-container{font-size:0;letter-spacing:0;white-space:nowrap;opacity:0}.mdc-circular-progress--indeterminate .mdc-circular-progress__indeterminate-container{opacity:1;animation:mdc-circular-progress-container-rotate 1568.2352941176ms linear infinite}.mdc-circular-progress__determinate-circle-graphic,.mdc-circular-progress__indeterminate-circle-graphic{fill:rgba(0,0,0,0)}.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:var(--mdc-circular-progress-active-indicator-color, var(--mat-sys-primary))}@media(forced-colors: active){.mat-mdc-progress-spinner .mdc-circular-progress__determinate-circle,.mat-mdc-progress-spinner .mdc-circular-progress__indeterminate-circle-graphic{stroke:CanvasText}}.mdc-circular-progress__determinate-circle{transition:stroke-dashoffset 500ms cubic-bezier(0, 0, 0.2, 1)}.mdc-circular-progress__gap-patch{position:absolute;top:0;left:47.5%;box-sizing:border-box;width:5%;height:100%;overflow:hidden}.mdc-circular-progress__gap-patch .mdc-circular-progress__indeterminate-circle-graphic{left:-900%;width:2000%;transform:rotate(180deg)}.mdc-circular-progress__circle-clipper .mdc-circular-progress__indeterminate-circle-graphic{width:200%}.mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{left:-100%}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-left .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-left-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress--indeterminate .mdc-circular-progress__circle-right .mdc-circular-progress__indeterminate-circle-graphic{animation:mdc-circular-progress-right-spin 1333ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}.mdc-circular-progress__circle-clipper{display:inline-flex;position:relative;width:50%;height:100%;overflow:hidden}.mdc-circular-progress--indeterminate .mdc-circular-progress__spinner-layer{animation:mdc-circular-progress-spinner-layer-rotate 5332ms cubic-bezier(0.4, 0, 0.2, 1) infinite both}@keyframes mdc-circular-progress-container-rotate{to{transform:rotate(360deg)}}@keyframes mdc-circular-progress-spinner-layer-rotate{12.5%{transform:rotate(135deg)}25%{transform:rotate(270deg)}37.5%{transform:rotate(405deg)}50%{transform:rotate(540deg)}62.5%{transform:rotate(675deg)}75%{transform:rotate(810deg)}87.5%{transform:rotate(945deg)}100%{transform:rotate(1080deg)}}@keyframes mdc-circular-progress-left-spin{from{transform:rotate(265deg)}50%{transform:rotate(130deg)}to{transform:rotate(265deg)}}@keyframes mdc-circular-progress-right-spin{from{transform:rotate(-265deg)}50%{transform:rotate(-130deg)}to{transform:rotate(-265deg)}}"],encapsulation:2,changeDetection:0})}}return i})();var lo=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({imports:[Oe,Ht]})}}return i})();function xpe(i,t){i&1&&(v(0,"tr")(1,"td"),ee(2,"div",9),y(),v(3,"td")(4,"div",2),M(5,"Artificial layer to reduce layout load"),y()()())}function wpe(i,t){if(i&1&&(v(0,"tr")(1,"td"),ee(2,"div",10),y(),v(3,"td")(4,"div",2),M(5),y()()()),i&2){let e=I();w(2),ne("group",e.isSelectedNodeGroup),w(3),we(" Selected ",e.isSelectedNodeGroup?"layer":"op"," ")}}function Cpe(i,t){i&1&&(v(0,"tr")(1,"td"),ee(2,"div",11),y(),v(3,"td")(4,"div",2),M(5,"Identical layer (if any)"),y()()())}function Spe(i,t){i&1&&(_o(0),v(1,"tr")(2,"td"),ee(3,"div",12),y(),v(4,"td")(5,"div",2),M(6,"Inputs (if any)"),y()()(),v(7,"tr")(8,"td"),ee(9,"div",13),y(),v(10,"td")(11,"div",2),M(12,"Outputs (if any)"),y()()(),vo())}var M5=(()=>{class i{appService;changeDetectorRef;paneId;showSelectedNodeKey=!1;isSelectedNodeGroup=!1;hasArtificialLayers=!1;constructor(e,n){this.appService=e,this.changeDetectorRef=n,ct(()=>{let r=this.appService.getPaneById(this.paneId);if(!r)return;this.hasArtificialLayers=r.hasArtificialLayers===!0;let o=r.selectedNodeInfo;if(!o){this.showSelectedNodeKey=!1,this.changeDetectorRef.markForCheck();return}this.showSelectedNodeKey=o.nodeId!=="",this.isSelectedNodeGroup=o.isGroupNode,this.changeDetectorRef.markForCheck()})}static \u0275fac=function(n){return new(n||i)(q(nt),q(Re))};static \u0275cmp=oe({type:i,selectors:[["legends-panel"]],inputs:{paneId:"paneId"},standalone:!0,features:[se],decls:35,vars:4,consts:[[1,"container"],[1,"key","op-node-key"],[1,"label"],[1,"key","group-node-key"],[4,"ngIf"],["colspan","2"],[1,"divider"],[1,"key","shortcut"],[1,"label","shortcut"],[1,"key","artificial-layer-key"],[1,"key","selected-node-key"],[1,"key","identical-group-key"],[1,"key","input-key"],[1,"key","output-key"]],template:function(n,r){n&1&&(v(0,"div",0)(1,"table")(2,"tr")(3,"td"),ee(4,"div",1),y(),v(5,"td")(6,"div",2),M(7,"Op"),y()()(),v(8,"tr")(9,"td"),ee(10,"div",3),y(),v(11,"td")(12,"div",2),M(13,"Layer"),y()()(),W(14,xpe,6,0,"tr",4)(15,wpe,6,3,"tr",4)(16,Cpe,6,0,"tr",4)(17,Spe,13,0,"ng-container",4),v(18,"tr")(19,"td",5),ee(20,"div",6),y()(),v(21,"tr")(22,"td")(23,"div",7),M(24,"Zoom"),y()(),v(25,"td")(26,"div",8),M(27,"Ctrl+Scroll"),y()()(),v(28,"tr")(29,"td")(30,"div",7),M(31,"Pan"),y()(),v(32,"td")(33,"div",8),M(34,"Drag or scroll"),y()()()()()),n&2&&(w(14),R("ngIf",r.hasArtificialLayers),w(),R("ngIf",r.showSelectedNodeKey),w(),R("ngIf",r.showSelectedNodeKey&&r.isSelectedNodeGroup),w(),R("ngIf",r.showSelectedNodeKey&&!r.isSelectedNodeGroup))},dependencies:[Oe,On,Je],styles:[`.container[_ngcontent-%COMP%]{height:fit-content;background-color:#ffffffe6;padding:8px}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border-spacing:0;border-collapse:collapse;padding:0;font-size:11px}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .key[_ngcontent-%COMP%]{margin-right:4px;box-sizing:border-box}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .op-node-key[_ngcontent-%COMP%]{width:30px;height:14px;border-radius:5px;border:1px solid #666;background-color:#fff}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .group-node-key[_ngcontent-%COMP%]{width:30px;height:14px;border:1px solid #777;border-radius:5px;background-color:#eaeaf2}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .artificial-layer-key[_ngcontent-%COMP%]{border:1px solid #800080;width:30px;height:14px;background-color:#f1f1f1}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .selected-node-key[_ngcontent-%COMP%]{width:30px;height:14px;border:2px solid #1a73e8;border-radius:5px;background-color:#c2e7ff}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .identical-group-key[_ngcontent-%COMP%]{width:30px;height:14px;border:1px solid #777;background-color:#e2edff}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .input-key[_ngcontent-%COMP%]{width:30px;height:14px;border-radius:5px;border:2px solid #009e73}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .output-key[_ngcontent-%COMP%]{width:30px;height:14px;border-radius:5px;border:2px solid #d55e00}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .shortcut[_ngcontent-%COMP%]{color:#777;font-size:10px;line-height:10px}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{height:1px;border-top:1px solid #ccc;margin:8px 0 4px} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();var E5=48,I5=48,XC=class{rootEle;constructor(t){this.rootEle=t}drag(t){let e=t.clientX,n=t.clientY,r=t.offsetX,o=Number(this.rootEle.style.top.replace("px","")),s=Number(this.rootEle.style.left.replace("px","")),a=Number(this.rootEle.style.width.replace("px","")),l=Number(this.rootEle.style.height.replace("px","")),c=wn(document,"mousemove"),d=wn(window,"mouseup"),u=t.target.dataset.position,h=this.rootEle.parentElement.offsetHeight,p=this.rootEle.parentElement.offsetWidth;ji([c]).pipe(Ke(d)).subscribe({next:([f])=>{f.preventDefault();let m=f.clientX-e,b=f.clientY-n;if(!(m===0&&b===0))if(u==null)this.rootEle.style.top=`${Math.min(h-28,Math.max(o+b,0))}px`,this.rootEle.style.left=`${Math.min(p-r,Math.max(-r,s+m))}px`;else{if(u.includes("right")&&(this.rootEle.style.width=`${Math.max(E5,a+m)}px`),u.includes("bottom")&&(this.rootEle.style.height=`${Math.max(I5,l+b)}px`),u.includes("left")){let g=Math.max(E5,a-m);this.rootEle.style.width=`${g}px`,this.rootEle.style.left=`${s+(a-g)}px`}if(u.includes("top")){let g=Math.max(I5,l-b);this.rootEle.style.height=`${g}px`,this.rootEle.style.top=`${o+(l-g)}px`}}},complete:()=>{}})}};var co=(()=>{class i extends PC{constructor(e,n,r,o,s,a,l){super(e,n,r,o,s,a,l),this.attachMouseEventListeners(r.nativeElement)}ngOnInit(){super.ngOnInit(),this.listenForOpenEvents()}listenForOpenEvents(){this.openStatusChange.pipe(Ke(this.destroyed)).subscribe(e=>{e?this.openDialog():this.closeDialog()})}attachMouseEventListeners(e){this.ngZone.runOutsideAngular(()=>{wn(e,"click").pipe(Ke(this.destroyed)).subscribe(n=>{n.target.closest("[bubbleClose]")?this.closingDialog():this.openingDialog()}),this.overlayRef?.backdropClick().pipe(Ke(this.destroyed)).subscribe(()=>{this.closingDialog()})})}attachKeyboardCloseEventListeners(e){this.ngZone.runOutsideAngular(()=>{wn(e,"keyup").pipe(Ke(this.destroyed)).subscribe(n=>{let r=n.keyCode,o=n.target;switch(r){case 27:this.closingDialog();return;case 32:o.closest("[bubbleClose]")&&this.closingDialog();return;default:return}}),wn(e,"keydown").pipe(Ke(this.destroyed)).subscribe(n=>{let r=n.keyCode,o=n.target;switch(r){case 13:o.closest("[bubbleClose]")&&this.closingDialog();return;default:return}})})}openingDialog(){this.disabled||this.openStatusChange.next(!0)}closingDialog(){this.openStatusChange.next(!1)}createOverlayConfig(e){return new bi(at(X({},this.overlayDimensions),{positionStrategy:super.createPositionStrategy(e),scrollStrategy:this.createScrollStrategy(),hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",panelClass:this.panelClassInternal}))}static \u0275fac=function(n){return new(n||i)(q(Ue),q(on),q(Fe),q(Kt),q(ft),q(Fh),q(pt))};static \u0275dir=Ve({type:i,selectors:[["","bubbleClick",""]],hostAttrs:[1,"bubble-click"],inputs:{dialog:[0,"bubbleClick","dialog"],disabled:[0,"bubbleDisabled","disabled"]},exportAs:["bubbleClick"],standalone:!0,features:[sn]})}return i})();var T5=(i,t)=>t.id;function Mpe(i,t){i&1&&(v(0,"div",6),M(1," Show custom edge overlays on graph "),y())}function Epe(i,t){i&1&&(v(0,"div",13),M(1," No loaded edge overlays "),y())}function Ipe(i,t){if(i&1){let e=te();v(0,"div",24),H("click",function(){B(e);let r=I().$implicit,o=I(4);return V(o.handleClickViewOverlay(r))}),M(1," View "),y()}}function Tpe(i,t){if(i&1){let e=te();v(0,"div",21)(1,"label")(2,"input",22),H("change",function(){let r=B(e).$implicit,o=I(4);return V(o.toggleOverlaySelection(r))}),y(),M(3),y(),W(4,Ipe,2,0,"div",23),y()}if(i&2){let e=t.$implicit;w(2),R("checked",e.selected),w(),we(" ",e.name," "),w(),re(e.selected?4:-1)}}function Dpe(i,t){if(i&1){let e=te();v(0,"div",18)(1,"div",19),M(2),v(3,"div",20),H("click",function(){let r=B(e).$implicit,o=I(3);return V(o.handleDeleteOverlaySet(r))}),v(4,"mat-icon"),M(5,"delete"),y()()(),Xt(6,Tpe,5,3,"div",21,T5),y()}if(i&2){let e=t.$implicit;w(2),we(" ",e.name," "),w(4),Qt(e.overlays)}}function Ope(i,t){if(i&1&&Xt(0,Dpe,8,1,"div",18,T5),i&2){let e=I(2);Qt(e.overlaysSets())}}function Ppe(i,t){if(i&1){let e=te();v(0,"div",7)(1,"div",8)(2,"div"),M(3,"Edge overlays"),y(),v(4,"div",9)(5,"a",10),M(6," Guide "),y(),v(7,"div",11)(8,"mat-icon"),M(9,"close"),y()()()(),v(10,"div",12),W(11,Epe,2,0,"div",13)(12,Ope,2,0),y(),v(13,"div",14)(14,"div",15),M(15,"Load from computer"),y(),v(16,"button",16),H("click",function(){B(e);let r=fe(19);return V(r.click())}),M(17," Upload "),y()(),v(18,"input",17,2),H("change",function(){B(e);let r=fe(19),o=I();return V(o.handleClickUpload(r))}),y()()}if(i&2){let e=I();w(11),re(e.overlaysSets().length===0?11:12)}}var D5=(()=>{class i{paneId;rendererId;popup;appService=S(nt);localStorageService=S(Mr);changeDetectorRef=S(Re);edgeOverlaysService=S(wc);snackBar=S(Os);overlaysSets=Ot(()=>this.edgeOverlaysService.loadedEdgeOverlays().map(n=>({id:n.id,name:n.name,overlays:n.processedOverlays.map(r=>({id:r.id,name:r.name,selected:this.edgeOverlaysService.selectedOverlayIds().includes(r.id),processedOverlay:r}))})));helpPopupSize={minWidth:0,minHeight:0};edgeOverlaysPopupSize={minWidth:280,minHeight:0};remoteSourceLoading=this.edgeOverlaysService.remoteSourceLoading;opened=!1;constructor(){}handleClickOnEdgeOverlaysButton(){this.opened&&this.popup.closeDialog()}handleClickUpload(e){let n=e.files;if(!n||n.length===0)return;let r=n[0],o=new FileReader;o.onload=s=>{let a=this.edgeOverlaysService.addEdgeOverlayDataFromJsonData(s.target?.result);a&&this.showError(a)},o.readAsText(r),e.value=""}handleDeleteOverlaySet(e){this.edgeOverlaysService.deleteOverlayData(e.id)}toggleOverlaySelection(e){this.edgeOverlaysService.toggleOverlaySelection(e.id)}handleClickViewOverlay(e){let n=e.processedOverlay.edges;if(n.length===0)return;let r=n[0].sourceNodeId;this.appService.setNodeToReveal(this.paneId,r)}showError(e){console.error(e),this.snackBar.open(e,"Dismiss",{duration:5e3})}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=oe({type:i,selectors:[["edge-overlays-dropdown"]],viewQuery:function(n,r){if(n&1&&Me(co,5),n&2){let o;_e(o=ve())&&(r.popup=o.first)}},inputs:{paneId:"paneId",rendererId:"rendererId"},standalone:!0,features:[se],decls:8,vars:5,consts:[["help",""],["edgeOverlaysPopup",""],["input",""],[1,"container",3,"bubble","overlaySize","hoverDelayMs"],[1,"mat-icon-container","view",3,"opened","closed","click","bubbleClick","overlaySize"],[1,"toolbar-icon"],[1,"model-explorer-help-popup"],[1,"model-explorer-edge-overlays-popup"],[1,"label"],[1,"right-wrapper"],["href","https://github.com/google-ai-edge/model-explorer/wiki/2.-User-Guide#edge-overlays","target","_blank"],["bubbleClose","",1,"icon-container","close"],[1,"loaded-overlays-container"],[1,"no-overlays-label"],[1,"upload-container"],[1,"description"],["mat-flat-button","","color","primary",1,"upload-json-file-button","upload",3,"click"],["type","file","multiple","","accept",".json",1,"upload-json-file-input",3,"change"],[1,"overlay-set-container"],[1,"overlay-set-label"],[1,"icon-container","delete",3,"click"],[1,"overlay-item"],["type","checkbox",3,"change","checked"],[1,"view-label"],[1,"view-label",3,"click"]],template:function(n,r){if(n&1){let o=te();v(0,"div",3)(1,"div",4),H("opened",function(){return B(o),V(r.opened=!0)})("closed",function(){return B(o),V(r.opened=!1)})("click",function(){return B(o),V(r.handleClickOnEdgeOverlaysButton())}),v(2,"mat-icon",5),M(3,"polyline"),y()()(),W(4,Mpe,2,0,"ng-template",null,0,Mt)(6,Ppe,20,1,"ng-template",null,1,Mt)}if(n&2){let o=fe(5),s=fe(7);R("bubble",o)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(),R("bubbleClick",s)("overlaySize",r.edgeOverlaysPopupSize)}},dependencies:[Nn,co,Oe,vn,gi,Je,dt,$t],styles:[`.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]{width:20px;height:20px;display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:.6}.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]:hover{opacity:.9}.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px} bubble-container:has(.model-explorer-edge-overlays-popup){border-top-left-radius:0;border-top-right-radius:0} .model-explorer-edge-overlays-popup{padding:10px 12px 12px;font-size:12px;background-color:#fff;display:flex;flex-direction:column} .model-explorer-edge-overlays-popup .icon-container{cursor:pointer;opacity:.8;display:flex;align-items:center;justify-content:center} .model-explorer-edge-overlays-popup .icon-container:hover{opacity:1} .model-explorer-edge-overlays-popup .icon-container mat-icon{font-size:16px;width:16px;height:16px;color:#777} .model-explorer-edge-overlays-popup .label{font-weight:500;font-size:11px;text-transform:uppercase;letter-spacing:.0727em;margin-bottom:6px;display:flex;align-items:center;justify-content:space-between;min-width:170px} .model-explorer-edge-overlays-popup .label:not(:first-child){margin-top:12px} .model-explorer-edge-overlays-popup .label .right-wrapper{display:flex;align-items:center;gap:4px} .model-explorer-edge-overlays-popup .loaded-overlays-container{display:flex;flex-direction:column;padding-bottom:8px;border-bottom:1px solid #ccc;gap:8px} .model-explorer-edge-overlays-popup .loaded-overlays-container .no-overlays-label{color:#999} .model-explorer-edge-overlays-popup .loaded-overlays-container .overlay-set-label{display:flex;align-items:center;justify-content:space-between;font-weight:700;line-height:15px;word-break:break-all;margin-bottom:4px} .model-explorer-edge-overlays-popup .loaded-overlays-container .overlay-item{display:flex;align-items:center;justify-content:space-between} .model-explorer-edge-overlays-popup .loaded-overlays-container .overlay-item label{display:flex;align-items:center;cursor:pointer;line-height:15px;word-break:break-all;gap:4px;-webkit-user-select:none;user-select:none} .model-explorer-edge-overlays-popup .loaded-overlays-container .overlay-item label input{cursor:pointer} .model-explorer-edge-overlays-popup .loaded-overlays-container .overlay-item .view-label{cursor:pointer;color:#00639b;opacity:.8;-webkit-user-select:none;user-select:none;line-height:15px} .model-explorer-edge-overlays-popup .loaded-overlays-container .overlay-item .view-label:hover{opacity:1} .model-explorer-edge-overlays-popup .upload-container{display:flex;flex-direction:column;align-items:flex-start;padding:0 16px 0 0;margin-top:12px} .model-explorer-edge-overlays-popup .upload-json-file-button{margin:4px 0;width:90px;height:30px;font-size:12px!important;letter-spacing:normal!important} .model-explorer-edge-overlays-popup .upload-json-file-button.upload{margin-top:2px} .model-explorer-edge-overlays-popup .upload-json-file-button .mat-mdc-button-touch-target{display:none} .model-explorer-edge-overlays-popup .or-divider{height:1px;border-top:1px solid #eee;position:relative;margin-top:12px} .model-explorer-edge-overlays-popup .or-divider .or-label{font-size:10px;top:-12px;color:#aaa;position:absolute;padding:2px;background-color:#fff;display:flex;align-items:center;justify-content:center;width:16px;left:calc(50% - 8px)} .model-explorer-edge-overlays-popup .upload-json-file-input{display:none} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();var Ape=["input"],Npe=["label"],kpe=["*"],Lpe=new pe("mat-checkbox-default-options",{providedIn:"root",factory:P5});function P5(){return{color:"accent",clickAction:"check-indeterminate",disabledInteractive:!1}}var Nr=function(i){return i[i.Init=0]="Init",i[i.Checked=1]="Checked",i[i.Unchecked=2]="Unchecked",i[i.Indeterminate=3]="Indeterminate",i}(Nr||{}),Fpe={provide:Ba,useExisting:xr(()=>QC),multi:!0},XP=class{},Bpe=0,O5=P5(),QC=(()=>{class i{focus(){this._inputElement.nativeElement.focus()}_createChangeEvent(e){let n=new XP;return n.source=this,n.checked=e,n}_getAnimationTargetElement(){return this._inputElement?.nativeElement}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(){this._elementRef=S(Fe),this._changeDetectorRef=S(Re),this._ngZone=S(Ue),this._animationMode=S(Kn,{optional:!0}),this._options=S(Lpe,{optional:!0}),this._animationClasses={uncheckedToChecked:"mdc-checkbox--anim-unchecked-checked",uncheckedToIndeterminate:"mdc-checkbox--anim-unchecked-indeterminate",checkedToUnchecked:"mdc-checkbox--anim-checked-unchecked",checkedToIndeterminate:"mdc-checkbox--anim-checked-indeterminate",indeterminateToChecked:"mdc-checkbox--anim-indeterminate-checked",indeterminateToUnchecked:"mdc-checkbox--anim-indeterminate-unchecked"},this.ariaLabel="",this.ariaLabelledby=null,this.labelPosition="after",this.name=null,this.change=new Ie,this.indeterminateChange=new Ie,this._onTouched=()=>{},this._currentAnimationClass="",this._currentCheckState=Nr.Init,this._controlValueAccessorChangeFn=()=>{},this._validatorChangeFn=()=>{},this._checked=!1,this._disabled=!1,this._indeterminate=!1,S(mi).load(ys);let e=S(new zr("tabindex"),{optional:!0});this._options=this._options||O5,this.color=this._options.color||O5.color,this.tabIndex=e==null?0:parseInt(e)||0,this.id=this._uniqueId=`mat-mdc-checkbox-${++Bpe}`,this.disabledInteractive=this._options?.disabledInteractive??!1}ngOnChanges(e){e.required&&this._validatorChangeFn()}ngAfterViewInit(){this._syncIndeterminate(this._indeterminate)}get checked(){return this._checked}set checked(e){e!=this.checked&&(this._checked=e,this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled}set disabled(e){e!==this.disabled&&(this._disabled=e,this._changeDetectorRef.markForCheck())}get indeterminate(){return this._indeterminate}set indeterminate(e){let n=e!=this._indeterminate;this._indeterminate=e,n&&(this._indeterminate?this._transitionCheckState(Nr.Indeterminate):this._transitionCheckState(this.checked?Nr.Checked:Nr.Unchecked),this.indeterminateChange.emit(this._indeterminate)),this._syncIndeterminate(this._indeterminate)}_isRippleDisabled(){return this.disableRipple||this.disabled}_onLabelTextChange(){this._changeDetectorRef.detectChanges()}writeValue(e){this.checked=!!e}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}validate(e){return this.required&&e.value!==!0?{required:!0}:null}registerOnValidatorChange(e){this._validatorChangeFn=e}_transitionCheckState(e){let n=this._currentCheckState,r=this._getAnimationTargetElement();if(!(n===e||!r)&&(this._currentAnimationClass&&r.classList.remove(this._currentAnimationClass),this._currentAnimationClass=this._getAnimationClassForCheckStateTransition(n,e),this._currentCheckState=e,this._currentAnimationClass.length>0)){r.classList.add(this._currentAnimationClass);let o=this._currentAnimationClass;this._ngZone.runOutsideAngular(()=>{setTimeout(()=>{r.classList.remove(o)},1e3)})}}_emitChangeEvent(){this._controlValueAccessorChangeFn(this.checked),this.change.emit(this._createChangeEvent(this.checked)),this._inputElement&&(this._inputElement.nativeElement.checked=this.checked)}toggle(){this.checked=!this.checked,this._controlValueAccessorChangeFn(this.checked)}_handleInputClick(){let e=this._options?.clickAction;!this.disabled&&e!=="noop"?(this.indeterminate&&e!=="check"&&Promise.resolve().then(()=>{this._indeterminate=!1,this.indeterminateChange.emit(this._indeterminate)}),this._checked=!this._checked,this._transitionCheckState(this._checked?Nr.Checked:Nr.Unchecked),this._emitChangeEvent()):(this.disabled&&this.disabledInteractive||!this.disabled&&e==="noop")&&(this._inputElement.nativeElement.checked=this.checked,this._inputElement.nativeElement.indeterminate=this.indeterminate)}_onInteractionEvent(e){e.stopPropagation()}_onBlur(){Promise.resolve().then(()=>{this._onTouched(),this._changeDetectorRef.markForCheck()})}_getAnimationClassForCheckStateTransition(e,n){if(this._animationMode==="NoopAnimations")return"";switch(e){case Nr.Init:if(n===Nr.Checked)return this._animationClasses.uncheckedToChecked;if(n==Nr.Indeterminate)return this._checked?this._animationClasses.checkedToIndeterminate:this._animationClasses.uncheckedToIndeterminate;break;case Nr.Unchecked:return n===Nr.Checked?this._animationClasses.uncheckedToChecked:this._animationClasses.uncheckedToIndeterminate;case Nr.Checked:return n===Nr.Unchecked?this._animationClasses.checkedToUnchecked:this._animationClasses.checkedToIndeterminate;case Nr.Indeterminate:return n===Nr.Checked?this._animationClasses.indeterminateToChecked:this._animationClasses.indeterminateToUnchecked}return""}_syncIndeterminate(e){let n=this._inputElement;n&&(n.nativeElement.indeterminate=e)}_onInputClick(){this._handleInputClick()}_onTouchTargetClick(){this._handleInputClick(),this.disabled||this._inputElement.nativeElement.focus()}_preventBubblingFromLabel(e){e.target&&this._labelElement.nativeElement.contains(e.target)&&e.stopPropagation()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["mat-checkbox"]],viewQuery:function(n,r){if(n&1&&(Me(Ape,5),Me(Npe,5)),n&2){let o;_e(o=ve())&&(r._inputElement=o.first),_e(o=ve())&&(r._labelElement=o.first)}},hostAttrs:[1,"mat-mdc-checkbox"],hostVars:16,hostBindings:function(n,r){n&2&&(Cr("id",r.id),qe("tabindex",null)("aria-label",null)("aria-labelledby",null),Gr(r.color?"mat-"+r.color:"mat-accent"),ne("_mat-animation-noopable",r._animationMode==="NoopAnimations")("mdc-checkbox--disabled",r.disabled)("mat-mdc-checkbox-disabled",r.disabled)("mat-mdc-checkbox-checked",r.checked)("mat-mdc-checkbox-disabled-interactive",r.disabledInteractive))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],ariaExpanded:[2,"aria-expanded","ariaExpanded",Ye],ariaControls:[0,"aria-controls","ariaControls"],ariaOwns:[0,"aria-owns","ariaOwns"],id:"id",required:[2,"required","required",Ye],labelPosition:"labelPosition",name:"name",value:"value",disableRipple:[2,"disableRipple","disableRipple",Ye],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?void 0:Jn(e)],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",Ye],checked:[2,"checked","checked",Ye],disabled:[2,"disabled","disabled",Ye],indeterminate:[2,"indeterminate","indeterminate",Ye]},outputs:{change:"change",indeterminateChange:"indeterminateChange"},exportAs:["matCheckbox"],standalone:!0,features:[Bt([Fpe,{provide:vd,useExisting:i,multi:!0}]),nn,un,se],ngContentSelectors:kpe,decls:15,vars:23,consts:[["checkbox",""],["input",""],["label",""],["mat-internal-form-field","",3,"click","labelPosition"],[1,"mdc-checkbox"],[1,"mat-mdc-checkbox-touch-target",3,"click"],["type","checkbox",1,"mdc-checkbox__native-control",3,"blur","click","change","checked","indeterminate","disabled","id","required","tabIndex"],[1,"mdc-checkbox__ripple"],[1,"mdc-checkbox__background"],["focusable","false","viewBox","0 0 24 24","aria-hidden","true",1,"mdc-checkbox__checkmark"],["fill","none","d","M1.73,12.91 8.1,19.28 22.79,4.59",1,"mdc-checkbox__checkmark-path"],[1,"mdc-checkbox__mixedmark"],["mat-ripple","",1,"mat-mdc-checkbox-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-label",3,"for"]],template:function(n,r){if(n&1){let o=te();Dn(),v(0,"div",3),H("click",function(a){return B(o),V(r._preventBubblingFromLabel(a))}),v(1,"div",4,0)(3,"div",5),H("click",function(){return B(o),V(r._onTouchTargetClick())}),y(),v(4,"input",6,1),H("blur",function(){return B(o),V(r._onBlur())})("click",function(){return B(o),V(r._onInputClick())})("change",function(a){return B(o),V(r._onInteractionEvent(a))}),y(),ee(6,"div",7),v(7,"div",8),mo(),v(8,"svg",9),ee(9,"path",10),y(),Yy(),ee(10,"div",11),y(),ee(11,"div",12),y(),v(12,"label",13,2),Wt(14),y()()}if(n&2){let o=fe(2);R("labelPosition",r.labelPosition),w(4),ne("mdc-checkbox--selected",r.checked),R("checked",r.checked)("indeterminate",r.indeterminate)("disabled",r.disabled&&!r.disabledInteractive)("id",r.inputId)("required",r.required)("tabIndex",r.disabled&&!r.disabledInteractive?-1:r.tabIndex),qe("aria-label",r.ariaLabel||null)("aria-labelledby",r.ariaLabelledby)("aria-describedby",r.ariaDescribedby)("aria-checked",r.indeterminate?"mixed":null)("aria-controls",r.ariaControls)("aria-disabled",r.disabled&&r.disabledInteractive?!0:null)("aria-expanded",r.ariaExpanded)("aria-owns",r.ariaOwns)("name",r.name)("value",r.value),w(7),R("matRippleTrigger",o)("matRippleDisabled",r.disableRipple||r.disabled)("matRippleCentered",!0),w(),R("for",r.inputId)}},dependencies:[Ha,Uh],styles:['.mdc-checkbox{display:inline-block;position:relative;flex:0 0 18px;box-sizing:content-box;width:18px;height:18px;line-height:0;white-space:nowrap;cursor:pointer;vertical-align:bottom;padding:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2);margin:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox:hover .mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity));background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:hover .mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity));background-color:var(--mdc-checkbox-unselected-focus-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control:focus~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-focus-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:active .mdc-checkbox__native-control~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-unselected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:active .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-unselected-pressed-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity));background-color:var(--mdc-checkbox-selected-hover-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-hover-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity));background-color:var(--mdc-checkbox-selected-focus-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox .mdc-checkbox__native-control:focus:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-focus-state-layer-color, var(--mat-sys-primary))}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mdc-checkbox__ripple{opacity:var(--mdc-checkbox-selected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));background-color:var(--mdc-checkbox-selected-pressed-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox:active .mdc-checkbox__native-control:checked~.mat-mdc-checkbox-ripple .mat-ripple-element{background-color:var(--mdc-checkbox-selected-pressed-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control~.mat-mdc-checkbox-ripple .mat-ripple-element,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control~.mdc-checkbox__ripple{background-color:var(--mdc-checkbox-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-checkbox .mdc-checkbox__native-control{position:absolute;margin:0;padding:0;opacity:0;cursor:inherit;width:var(--mdc-checkbox-state-layer-size, 40px);height:var(--mdc-checkbox-state-layer-size, 40px);top:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2);right:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - var(--mdc-checkbox-state-layer-size, 40px))/2)}.mdc-checkbox--disabled{cursor:default;pointer-events:none}@media(forced-colors: active){.mdc-checkbox--disabled{opacity:.5}}.mdc-checkbox__background{display:inline-flex;position:absolute;align-items:center;justify-content:center;box-sizing:border-box;width:18px;height:18px;border:2px solid currentColor;border-radius:2px;background-color:rgba(0,0,0,0);pointer-events:none;will-change:background-color,border-color;transition:background-color 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1);-webkit-print-color-adjust:exact;color-adjust:exact;border-color:var(--mdc-checkbox-unselected-icon-color, var(--mat-sys-on-surface-variant));top:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2);left:calc((var(--mdc-checkbox-state-layer-size, 40px) - 18px)/2)}.mdc-checkbox__native-control:enabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:enabled:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-icon-color, var(--mat-sys-primary));background-color:var(--mdc-checkbox-selected-icon-color, var(--mat-sys-primary))}.mdc-checkbox--disabled .mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-checkbox__native-control:disabled:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:disabled:indeterminate~.mdc-checkbox__background{background-color:var(--mdc-checkbox-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:rgba(0,0,0,0)}.mdc-checkbox:hover .mdc-checkbox__native-control:not(:checked)~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-hover-icon-color, var(--mat-sys-on-surface));background-color:rgba(0,0,0,0)}.mdc-checkbox:hover .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox:hover .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mat-sys-primary));background-color:var(--mdc-checkbox-selected-hover-icon-color, var(--mat-sys-primary))}.mdc-checkbox__native-control:focus:focus:not(:checked)~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:not(:indeterminate)~.mdc-checkbox__background{border-color:var(--mdc-checkbox-unselected-focus-icon-color, var(--mat-sys-on-surface))}.mdc-checkbox__native-control:focus:focus:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:focus:focus:indeterminate~.mdc-checkbox__background{border-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mat-sys-primary));background-color:var(--mdc-checkbox-selected-focus-icon-color, var(--mat-sys-primary))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox:hover .mdc-checkbox__native-control~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox .mdc-checkbox__native-control:focus~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__background{border-color:var(--mdc-checkbox-disabled-unselected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{background-color:var(--mdc-checkbox-disabled-selected-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:rgba(0,0,0,0)}.mdc-checkbox__checkmark{position:absolute;top:0;right:0;bottom:0;left:0;width:100%;opacity:0;transition:opacity 180ms cubic-bezier(0.4, 0, 0.6, 1);color:var(--mdc-checkbox-selected-checkmark-color, var(--mat-sys-on-primary))}@media(forced-colors: active){.mdc-checkbox__checkmark{color:CanvasText}}.mdc-checkbox--disabled .mdc-checkbox__checkmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:var(--mdc-checkbox-disabled-selected-checkmark-color, var(--mat-sys-surface))}@media(forced-colors: active){.mdc-checkbox--disabled .mdc-checkbox__checkmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__checkmark{color:CanvasText}}.mdc-checkbox__checkmark-path{transition:stroke-dashoffset 180ms cubic-bezier(0.4, 0, 0.6, 1);stroke:currentColor;stroke-width:3.12px;stroke-dashoffset:29.7833385;stroke-dasharray:29.7833385}.mdc-checkbox__mixedmark{width:100%;height:0;transform:scaleX(0) rotate(0deg);border-width:1px;border-style:solid;opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);border-color:var(--mdc-checkbox-selected-checkmark-color, var(--mat-sys-on-primary))}@media(forced-colors: active){.mdc-checkbox__mixedmark{margin:0 1px}}.mdc-checkbox--disabled .mdc-checkbox__mixedmark,.mdc-checkbox--disabled.mat-mdc-checkbox-disabled-interactive .mdc-checkbox__mixedmark{border-color:var(--mdc-checkbox-disabled-selected-checkmark-color, var(--mat-sys-surface))}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__background,.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__background,.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__background,.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__background{animation-duration:180ms;animation-timing-function:linear}.mdc-checkbox--anim-unchecked-checked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-unchecked-checked-checkmark-path 180ms linear;transition:none}.mdc-checkbox--anim-unchecked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-unchecked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-unchecked .mdc-checkbox__checkmark-path{animation:mdc-checkbox-checked-unchecked-checkmark-path 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__checkmark{animation:mdc-checkbox-checked-indeterminate-checkmark 90ms linear;transition:none}.mdc-checkbox--anim-checked-indeterminate .mdc-checkbox__mixedmark{animation:mdc-checkbox-checked-indeterminate-mixedmark 90ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__checkmark{animation:mdc-checkbox-indeterminate-checked-checkmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-checked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-checked-mixedmark 500ms linear;transition:none}.mdc-checkbox--anim-indeterminate-unchecked .mdc-checkbox__mixedmark{animation:mdc-checkbox-indeterminate-unchecked-mixedmark 300ms linear;transition:none}.mdc-checkbox__native-control:checked~.mdc-checkbox__background,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1),background-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark-path,.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark-path{stroke-dashoffset:0}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__checkmark{transition:opacity 180ms cubic-bezier(0, 0, 0.2, 1),transform 180ms cubic-bezier(0, 0, 0.2, 1);opacity:1}.mdc-checkbox__native-control:checked~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(-45deg)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__checkmark{transform:rotate(45deg);opacity:0;transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mdc-checkbox__native-control:indeterminate~.mdc-checkbox__background .mdc-checkbox__mixedmark{transform:scaleX(1) rotate(0deg);opacity:1}@keyframes mdc-checkbox-unchecked-checked-checkmark-path{0%,50%{stroke-dashoffset:29.7833385}50%{animation-timing-function:cubic-bezier(0, 0, 0.2, 1)}100%{stroke-dashoffset:0}}@keyframes mdc-checkbox-unchecked-indeterminate-mixedmark{0%,68.2%{transform:scaleX(0)}68.2%{animation-timing-function:cubic-bezier(0, 0, 0, 1)}100%{transform:scaleX(1)}}@keyframes mdc-checkbox-checked-unchecked-checkmark-path{from{animation-timing-function:cubic-bezier(0.4, 0, 1, 1);opacity:1;stroke-dashoffset:0}to{opacity:0;stroke-dashoffset:-29.7833385}}@keyframes mdc-checkbox-checked-indeterminate-checkmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(45deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-checked-checkmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(45deg);opacity:0}to{transform:rotate(360deg);opacity:1}}@keyframes mdc-checkbox-checked-indeterminate-mixedmark{from{animation-timing-function:cubic-bezier(0, 0, 0.2, 1);transform:rotate(-45deg);opacity:0}to{transform:rotate(0deg);opacity:1}}@keyframes mdc-checkbox-indeterminate-checked-mixedmark{from{animation-timing-function:cubic-bezier(0.14, 0, 0, 1);transform:rotate(0deg);opacity:1}to{transform:rotate(315deg);opacity:0}}@keyframes mdc-checkbox-indeterminate-unchecked-mixedmark{0%{animation-timing-function:linear;transform:scaleX(1);opacity:1}32.8%,100%{transform:scaleX(0);opacity:0}}.mat-mdc-checkbox{display:inline-block;position:relative;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-checkbox._mat-animation-noopable .mdc-checkbox *,.mat-mdc-checkbox._mat-animation-noopable .mdc-checkbox *::before{transition:none !important;animation:none !important}.mat-mdc-checkbox label{cursor:pointer}.mat-mdc-checkbox .mat-internal-form-field{color:var(--mat-checkbox-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-checkbox-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-checkbox-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-checkbox-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-checkbox-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-checkbox-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-checkbox.mat-mdc-checkbox-disabled.mat-mdc-checkbox-disabled-interactive{pointer-events:auto}.mat-mdc-checkbox.mat-mdc-checkbox-disabled.mat-mdc-checkbox-disabled-interactive input{cursor:default}.mat-mdc-checkbox.mat-mdc-checkbox-disabled label{cursor:default;color:var(--mat-checkbox-disabled-label-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-checkbox label:empty{display:none}.mat-mdc-checkbox .mdc-checkbox__ripple{opacity:0}.mat-mdc-checkbox .mat-mdc-checkbox-ripple,.mdc-checkbox__ripple{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-checkbox .mat-mdc-checkbox-ripple:not(:empty),.mdc-checkbox__ripple:not(:empty){transform:translateZ(0)}.mat-mdc-checkbox-ripple .mat-ripple-element{opacity:.1}.mat-mdc-checkbox-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-checkbox-touch-target-display, block)}.mat-mdc-checkbox-ripple::before{border-radius:50%}.mdc-checkbox__native-control:focus~.mat-focus-indicator::before{content:""}'],encapsulation:2,changeDetection:0})}}return i})();var ZC=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({imports:[QC,Ht,Ht]})}}return i})();var QP=class{constructor(t){this._box=t,this._destroyed=new ce,this._resizeSubject=new ce,this._elementObservables=new Map,typeof ResizeObserver<"u"&&(this._resizeObserver=new ResizeObserver(e=>this._resizeSubject.next(e)))}observe(t){return this._elementObservables.has(t)||this._elementObservables.set(t,new Dt(e=>{let n=this._resizeSubject.subscribe(e);return this._resizeObserver?.observe(t,{box:this._box}),()=>{this._resizeObserver?.unobserve(t),n.unsubscribe(),this._elementObservables.delete(t)}}).pipe(qt(e=>e.some(n=>n.target===t)),Yv({bufferSize:1,refCount:!0}),Ke(this._destroyed))),this._elementObservables.get(t)}destroy(){this._destroyed.next(),this._destroyed.complete(),this._resizeSubject.complete(),this._elementObservables.clear()}},R5=(()=>{class i{constructor(){this._observers=new Map,this._ngZone=S(Ue),typeof ResizeObserver<"u"}ngOnDestroy(){for(let[,e]of this._observers)e.destroy();this._observers.clear(),typeof ResizeObserver<"u"}observe(e,n){let r=n?.box||"content-box";return this._observers.has(r)||this._observers.set(r,new QP(r)),this._observers.get(r).observe(e)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var zpe=["notch"],Upe=["matFormFieldNotchedOutline",""],Hpe=["*"],Gpe=["textField"],jpe=["iconPrefixContainer"],Wpe=["textPrefixContainer"],$pe=["iconSuffixContainer"],qpe=["textSuffixContainer"],Ype=["*",[["mat-label"]],[["","matPrefix",""],["","matIconPrefix",""]],[["","matTextPrefix",""]],[["","matTextSuffix",""]],[["","matSuffix",""],["","matIconSuffix",""]],[["mat-error"],["","matError",""]],[["mat-hint",3,"align","end"]],[["mat-hint","align","end"]]],Xpe=["*","mat-label","[matPrefix], [matIconPrefix]","[matTextPrefix]","[matTextSuffix]","[matSuffix], [matIconSuffix]","mat-error, [matError]","mat-hint:not([align='end'])","mat-hint[align='end']"];function Qpe(i,t){i&1&&ee(0,"span",21)}function Zpe(i,t){if(i&1&&(v(0,"label",20),Wt(1,1),W(2,Qpe,1,0,"span",21),y()),i&2){let e=I(2);R("floating",e._shouldLabelFloat())("monitorResize",e._hasOutline())("id",e._labelId),qe("for",e._control.disableAutomaticLabeling?null:e._control.id),w(2),re(!e.hideRequiredMarker&&e._control.required?2:-1)}}function Kpe(i,t){if(i&1&&W(0,Zpe,3,5,"label",20),i&2){let e=I();re(e._hasFloatingLabel()?0:-1)}}function Jpe(i,t){i&1&&ee(0,"div",7)}function efe(i,t){}function tfe(i,t){if(i&1&&W(0,efe,0,0,"ng-template",13),i&2){I(2);let e=fe(1);R("ngTemplateOutlet",e)}}function nfe(i,t){if(i&1&&(v(0,"div",9),W(1,tfe,1,1,null,13),y()),i&2){let e=I();R("matFormFieldNotchedOutlineOpen",e._shouldLabelFloat()),w(),re(e._forceDisplayInfixLabel()?-1:1)}}function ife(i,t){i&1&&(v(0,"div",10,2),Wt(2,2),y())}function rfe(i,t){i&1&&(v(0,"div",11,3),Wt(2,3),y())}function ofe(i,t){}function sfe(i,t){if(i&1&&W(0,ofe,0,0,"ng-template",13),i&2){I();let e=fe(1);R("ngTemplateOutlet",e)}}function afe(i,t){i&1&&(v(0,"div",14,4),Wt(2,4),y())}function lfe(i,t){i&1&&(v(0,"div",15,5),Wt(2,5),y())}function cfe(i,t){i&1&&ee(0,"div",16)}function dfe(i,t){if(i&1&&(v(0,"div",18),Wt(1,6),y()),i&2){let e=I();R("@transitionMessages",e._subscriptAnimationState)}}function ufe(i,t){if(i&1&&(v(0,"mat-hint",22),M(1),y()),i&2){let e=I(2);R("id",e._hintLabelId),w(),lt(e.hintLabel)}}function hfe(i,t){if(i&1&&(v(0,"div",19),W(1,ufe,2,2,"mat-hint",22),Wt(2,7),ee(3,"div",23),Wt(4,8),y()),i&2){let e=I();R("@transitionMessages",e._subscriptAnimationState),w(),re(e.hintLabel?1:-1)}}var JC=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["mat-label"]],standalone:!0})}}return i})();var pfe=new pe("MatError");var ffe=0,A5=(()=>{class i{constructor(){this.align="start",this.id=`mat-mdc-hint-${ffe++}`}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["mat-hint"]],hostAttrs:[1,"mat-mdc-form-field-hint","mat-mdc-form-field-bottom-align"],hostVars:4,hostBindings:function(n,r){n&2&&(Cr("id",r.id),qe("align",null),ne("mat-mdc-form-field-hint-end",r.align==="end"))},inputs:{align:"align",id:"id"},standalone:!0})}}return i})(),mfe=new pe("MatPrefix");var gfe=new pe("MatSuffix");var U5=new pe("FloatingLabelParent"),N5=(()=>{class i{get floating(){return this._floating}set floating(e){this._floating=e,this.monitorResize&&this._handleResize()}get monitorResize(){return this._monitorResize}set monitorResize(e){this._monitorResize=e,this._monitorResize?this._subscribeToResize():this._resizeSubscription.unsubscribe()}constructor(){this._elementRef=S(Fe),this._floating=!1,this._monitorResize=!1,this._resizeObserver=S(R5),this._ngZone=S(Ue),this._parent=S(U5),this._resizeSubscription=new St}ngOnDestroy(){this._resizeSubscription.unsubscribe()}getWidth(){return _fe(this._elementRef.nativeElement)}get element(){return this._elementRef.nativeElement}_handleResize(){setTimeout(()=>this._parent._handleLabelResized())}_subscribeToResize(){this._resizeSubscription.unsubscribe(),this._ngZone.runOutsideAngular(()=>{this._resizeSubscription=this._resizeObserver.observe(this._elementRef.nativeElement,{box:"border-box"}).subscribe(()=>this._handleResize())})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["label","matFormFieldFloatingLabel",""]],hostAttrs:[1,"mdc-floating-label","mat-mdc-floating-label"],hostVars:2,hostBindings:function(n,r){n&2&&ne("mdc-floating-label--float-above",r.floating)},inputs:{floating:"floating",monitorResize:"monitorResize"},standalone:!0})}}return i})();function _fe(i){let t=i;if(t.offsetParent!==null)return t.scrollWidth;let e=t.cloneNode(!0);e.style.setProperty("position","absolute"),e.style.setProperty("transform","translate(-9999px, -9999px)"),document.documentElement.appendChild(e);let n=e.scrollWidth;return e.remove(),n}var k5="mdc-line-ripple--active",KC="mdc-line-ripple--deactivating",L5=(()=>{class i{constructor(){this._elementRef=S(Fe),this._handleTransitionEnd=n=>{let r=this._elementRef.nativeElement.classList,o=r.contains(KC);n.propertyName==="opacity"&&o&&r.remove(k5,KC)},S(Ue).runOutsideAngular(()=>{this._elementRef.nativeElement.addEventListener("transitionend",this._handleTransitionEnd)})}activate(){let e=this._elementRef.nativeElement.classList;e.remove(KC),e.add(k5)}deactivate(){this._elementRef.nativeElement.classList.add(KC)}ngOnDestroy(){this._elementRef.nativeElement.removeEventListener("transitionend",this._handleTransitionEnd)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["div","matFormFieldLineRipple",""]],hostAttrs:[1,"mdc-line-ripple"],standalone:!0})}}return i})(),F5=(()=>{class i{constructor(){this._elementRef=S(Fe),this._ngZone=S(Ue),this.open=!1}ngAfterViewInit(){let e=this._elementRef.nativeElement.querySelector(".mdc-floating-label");e?(this._elementRef.nativeElement.classList.add("mdc-notched-outline--upgraded"),typeof requestAnimationFrame=="function"&&(e.style.transitionDuration="0s",this._ngZone.runOutsideAngular(()=>{requestAnimationFrame(()=>e.style.transitionDuration="")}))):this._elementRef.nativeElement.classList.add("mdc-notched-outline--no-label")}_setNotchWidth(e){!this.open||!e?this._notch.nativeElement.style.width="":this._notch.nativeElement.style.width=`calc(${e}px * var(--mat-mdc-form-field-floating-label-scale, 0.75) + 9px)`}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["div","matFormFieldNotchedOutline",""]],viewQuery:function(n,r){if(n&1&&Me(zpe,5),n&2){let o;_e(o=ve())&&(r._notch=o.first)}},hostAttrs:[1,"mdc-notched-outline"],hostVars:2,hostBindings:function(n,r){n&2&&ne("mdc-notched-outline--notched",r.open)},inputs:{open:[0,"matFormFieldNotchedOutlineOpen","open"]},standalone:!0,features:[se],attrs:Upe,ngContentSelectors:Hpe,decls:5,vars:0,consts:[["notch",""],[1,"mat-mdc-notch-piece","mdc-notched-outline__leading"],[1,"mat-mdc-notch-piece","mdc-notched-outline__notch"],[1,"mat-mdc-notch-piece","mdc-notched-outline__trailing"]],template:function(n,r){n&1&&(Dn(),ee(0,"div",1),v(1,"div",2,0),Wt(3),y(),ee(4,"div",3))},encapsulation:2,changeDetection:0})}}return i})(),vfe={transitionMessages:pi("transitionMessages",[Ci("enter",en({opacity:1,transform:"translateY(0%)"})),Fn("void => enter",[en({opacity:0,transform:"translateY(-5px)"}),Ln("300ms cubic-bezier(0.55, 0, 0.55, 0.2)")])])},ZP=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,standalone:!0})}}return i})();var nv=new pe("MatFormField"),yfe=new pe("MAT_FORM_FIELD_DEFAULT_OPTIONS"),B5=0,V5="fill",bfe="auto",z5="fixed",xfe="translateY(-50%)",H5=(()=>{class i{get hideRequiredMarker(){return this._hideRequiredMarker}set hideRequiredMarker(e){this._hideRequiredMarker=Xm(e)}get floatLabel(){return this._floatLabel||this._defaults?.floatLabel||bfe}set floatLabel(e){e!==this._floatLabel&&(this._floatLabel=e,this._changeDetectorRef.markForCheck())}get appearance(){return this._appearance}set appearance(e){let n=this._appearance,r=e||this._defaults?.appearance||V5;this._appearance=r,this._appearance==="outline"&&this._appearance!==n&&(this._needsOutlineLabelOffsetUpdate=!0)}get subscriptSizing(){return this._subscriptSizing||this._defaults?.subscriptSizing||z5}set subscriptSizing(e){this._subscriptSizing=e||this._defaults?.subscriptSizing||z5}get hintLabel(){return this._hintLabel}set hintLabel(e){this._hintLabel=e,this._processHints()}get _control(){return this._explicitFormFieldControl||this._formFieldControl}set _control(e){this._explicitFormFieldControl=e}constructor(){this._elementRef=S(Fe),this._changeDetectorRef=S(Re),this._dir=S(oi),this._platform=S(Rn),this._defaults=S(yfe,{optional:!0}),this._animationMode=S(Kn,{optional:!0}),this._labelChild=V2(JC),this._hideRequiredMarker=!1,this.color="primary",this._appearance=V5,this._subscriptSizing=null,this._hintLabel="",this._hasIconPrefix=!1,this._hasTextPrefix=!1,this._hasIconSuffix=!1,this._hasTextSuffix=!1,this._labelId=`mat-mdc-form-field-label-${B5++}`,this._hintLabelId=`mat-mdc-hint-${B5++}`,this._subscriptAnimationState="",this._destroyed=new ce,this._isFocused=null,this._needsOutlineLabelOffsetUpdate=!1,this._previousControl=null,this._injector=S(pt),this.getLabelId=Ot(()=>this._hasFloatingLabel()?this._labelId:null),this._hasFloatingLabel=Ot(()=>!!this._labelChild());let e=this._defaults;e&&(e.appearance&&(this.appearance=e.appearance),this._hideRequiredMarker=!!e?.hideRequiredMarker,e.color&&(this.color=e.color))}ngAfterViewInit(){this._updateFocusState(),this._subscriptAnimationState="enter",this._changeDetectorRef.detectChanges()}ngAfterContentInit(){this._assertFormFieldControl(),this._initializeSubscript(),this._initializePrefixAndSuffix(),this._initializeOutlineLabelOffsetSubscriptions()}ngAfterContentChecked(){this._assertFormFieldControl(),this._control!==this._previousControl&&(this._initializeControl(this._previousControl),this._previousControl=this._control)}ngOnDestroy(){this._stateChanges?.unsubscribe(),this._valueChanges?.unsubscribe(),this._destroyed.next(),this._destroyed.complete()}getConnectedOverlayOrigin(){return this._textField||this._elementRef}_animateAndLockLabel(){this._hasFloatingLabel()&&(this.floatLabel="always")}_initializeControl(e){let n=this._control,r="mat-mdc-form-field-type-";e&&this._elementRef.nativeElement.classList.remove(r+e.controlType),n.controlType&&this._elementRef.nativeElement.classList.add(r+n.controlType),this._stateChanges?.unsubscribe(),this._stateChanges=n.stateChanges.subscribe(()=>{this._updateFocusState(),this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._valueChanges?.unsubscribe(),n.ngControl&&n.ngControl.valueChanges&&(this._valueChanges=n.ngControl.valueChanges.pipe(Ke(this._destroyed)).subscribe(()=>this._changeDetectorRef.markForCheck()))}_checkPrefixAndSuffixTypes(){this._hasIconPrefix=!!this._prefixChildren.find(e=>!e._isText),this._hasTextPrefix=!!this._prefixChildren.find(e=>e._isText),this._hasIconSuffix=!!this._suffixChildren.find(e=>!e._isText),this._hasTextSuffix=!!this._suffixChildren.find(e=>e._isText)}_initializePrefixAndSuffix(){this._checkPrefixAndSuffixTypes(),Xn(this._prefixChildren.changes,this._suffixChildren.changes).subscribe(()=>{this._checkPrefixAndSuffixTypes(),this._changeDetectorRef.markForCheck()})}_initializeSubscript(){this._hintChildren.changes.subscribe(()=>{this._processHints(),this._changeDetectorRef.markForCheck()}),this._errorChildren.changes.subscribe(()=>{this._syncDescribedByIds(),this._changeDetectorRef.markForCheck()}),this._validateHints(),this._syncDescribedByIds()}_assertFormFieldControl(){this._control}_updateFocusState(){this._control.focused&&!this._isFocused?(this._isFocused=!0,this._lineRipple?.activate()):!this._control.focused&&(this._isFocused||this._isFocused===null)&&(this._isFocused=!1,this._lineRipple?.deactivate()),this._textField?.nativeElement.classList.toggle("mdc-text-field--focused",this._control.focused)}_initializeOutlineLabelOffsetSubscriptions(){this._prefixChildren.changes.subscribe(()=>this._needsOutlineLabelOffsetUpdate=!0),im(()=>{this._needsOutlineLabelOffsetUpdate&&(this._needsOutlineLabelOffsetUpdate=!1,this._updateOutlineLabelOffset())},{injector:this._injector}),this._dir.change.pipe(Ke(this._destroyed)).subscribe(()=>this._needsOutlineLabelOffsetUpdate=!0)}_shouldAlwaysFloat(){return this.floatLabel==="always"}_hasOutline(){return this.appearance==="outline"}_forceDisplayInfixLabel(){return!this._platform.isBrowser&&this._prefixChildren.length&&!this._shouldLabelFloat()}_shouldLabelFloat(){return this._hasFloatingLabel()?this._control.shouldLabelFloat||this._shouldAlwaysFloat():!1}_shouldForward(e){let n=this._control?this._control.ngControl:null;return n&&n[e]}_getDisplayedMessages(){return this._errorChildren&&this._errorChildren.length>0&&this._control.errorState?"error":"hint"}_handleLabelResized(){this._refreshOutlineNotchWidth()}_refreshOutlineNotchWidth(){!this._hasOutline()||!this._floatingLabel||!this._shouldLabelFloat()?this._notchedOutline?._setNotchWidth(0):this._notchedOutline?._setNotchWidth(this._floatingLabel.getWidth())}_processHints(){this._validateHints(),this._syncDescribedByIds()}_validateHints(){this._hintChildren}_syncDescribedByIds(){if(this._control){let e=[];if(this._control.userAriaDescribedBy&&typeof this._control.userAriaDescribedBy=="string"&&e.push(...this._control.userAriaDescribedBy.split(" ")),this._getDisplayedMessages()==="hint"){let n=this._hintChildren?this._hintChildren.find(o=>o.align==="start"):null,r=this._hintChildren?this._hintChildren.find(o=>o.align==="end"):null;n?e.push(n.id):this._hintLabel&&e.push(this._hintLabelId),r&&e.push(r.id)}else this._errorChildren&&e.push(...this._errorChildren.map(n=>n.id));this._control.setDescribedByIds(e)}}_updateOutlineLabelOffset(){if(!this._hasOutline()||!this._floatingLabel)return;let e=this._floatingLabel.element;if(!(this._iconPrefixContainer||this._textPrefixContainer)){e.style.transform="";return}if(!this._isAttachedToDom()){this._needsOutlineLabelOffsetUpdate=!0;return}let n=this._iconPrefixContainer?.nativeElement,r=this._textPrefixContainer?.nativeElement,o=this._iconSuffixContainer?.nativeElement,s=this._textSuffixContainer?.nativeElement,a=n?.getBoundingClientRect().width??0,l=r?.getBoundingClientRect().width??0,c=o?.getBoundingClientRect().width??0,d=s?.getBoundingClientRect().width??0,u=this._dir.value==="rtl"?"-1":"1",h=`${a+l}px`,f=`calc(${u} * (${h} + var(--mat-mdc-form-field-label-offset-x, 0px)))`;e.style.transform=`var( + --mat-mdc-form-field-label-transform, + ${xfe} translateX(${f}) + )`;let m=a+l+c+d;this._elementRef.nativeElement.style.setProperty("--mat-form-field-notch-max-width",`calc(100% - ${m}px)`)}_isAttachedToDom(){let e=this._elementRef.nativeElement;if(e.getRootNode){let n=e.getRootNode();return n&&n!==e}return document.documentElement.contains(e)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["mat-form-field"]],contentQueries:function(n,r,o){if(n&1&&(dL(o,r._labelChild,JC,5),wi(o,ZP,5),wi(o,mfe,5),wi(o,gfe,5),wi(o,pfe,5),wi(o,A5,5)),n&2){uL();let s;_e(s=ve())&&(r._formFieldControl=s.first),_e(s=ve())&&(r._prefixChildren=s),_e(s=ve())&&(r._suffixChildren=s),_e(s=ve())&&(r._errorChildren=s),_e(s=ve())&&(r._hintChildren=s)}},viewQuery:function(n,r){if(n&1&&(Me(Gpe,5),Me(jpe,5),Me(Wpe,5),Me($pe,5),Me(qpe,5),Me(N5,5),Me(F5,5),Me(L5,5)),n&2){let o;_e(o=ve())&&(r._textField=o.first),_e(o=ve())&&(r._iconPrefixContainer=o.first),_e(o=ve())&&(r._textPrefixContainer=o.first),_e(o=ve())&&(r._iconSuffixContainer=o.first),_e(o=ve())&&(r._textSuffixContainer=o.first),_e(o=ve())&&(r._floatingLabel=o.first),_e(o=ve())&&(r._notchedOutline=o.first),_e(o=ve())&&(r._lineRipple=o.first)}},hostAttrs:[1,"mat-mdc-form-field"],hostVars:42,hostBindings:function(n,r){n&2&&ne("mat-mdc-form-field-label-always-float",r._shouldAlwaysFloat())("mat-mdc-form-field-has-icon-prefix",r._hasIconPrefix)("mat-mdc-form-field-has-icon-suffix",r._hasIconSuffix)("mat-form-field-invalid",r._control.errorState)("mat-form-field-disabled",r._control.disabled)("mat-form-field-autofilled",r._control.autofilled)("mat-form-field-no-animations",r._animationMode==="NoopAnimations")("mat-form-field-appearance-fill",r.appearance=="fill")("mat-form-field-appearance-outline",r.appearance=="outline")("mat-form-field-hide-placeholder",r._hasFloatingLabel()&&!r._shouldLabelFloat())("mat-focused",r._control.focused)("mat-primary",r.color!=="accent"&&r.color!=="warn")("mat-accent",r.color==="accent")("mat-warn",r.color==="warn")("ng-untouched",r._shouldForward("untouched"))("ng-touched",r._shouldForward("touched"))("ng-pristine",r._shouldForward("pristine"))("ng-dirty",r._shouldForward("dirty"))("ng-valid",r._shouldForward("valid"))("ng-invalid",r._shouldForward("invalid"))("ng-pending",r._shouldForward("pending"))},inputs:{hideRequiredMarker:"hideRequiredMarker",color:"color",floatLabel:"floatLabel",appearance:"appearance",subscriptSizing:"subscriptSizing",hintLabel:"hintLabel"},exportAs:["matFormField"],standalone:!0,features:[Bt([{provide:nv,useExisting:i},{provide:U5,useExisting:i}]),se],ngContentSelectors:Xpe,decls:18,vars:21,consts:[["labelTemplate",""],["textField",""],["iconPrefixContainer",""],["textPrefixContainer",""],["textSuffixContainer",""],["iconSuffixContainer",""],[1,"mat-mdc-text-field-wrapper","mdc-text-field",3,"click"],[1,"mat-mdc-form-field-focus-overlay"],[1,"mat-mdc-form-field-flex"],["matFormFieldNotchedOutline","",3,"matFormFieldNotchedOutlineOpen"],[1,"mat-mdc-form-field-icon-prefix"],[1,"mat-mdc-form-field-text-prefix"],[1,"mat-mdc-form-field-infix"],[3,"ngTemplateOutlet"],[1,"mat-mdc-form-field-text-suffix"],[1,"mat-mdc-form-field-icon-suffix"],["matFormFieldLineRipple",""],[1,"mat-mdc-form-field-subscript-wrapper","mat-mdc-form-field-bottom-align"],[1,"mat-mdc-form-field-error-wrapper"],[1,"mat-mdc-form-field-hint-wrapper"],["matFormFieldFloatingLabel","",3,"floating","monitorResize","id"],["aria-hidden","true",1,"mat-mdc-form-field-required-marker","mdc-floating-label--required"],[3,"id"],[1,"mat-mdc-form-field-hint-spacer"]],template:function(n,r){if(n&1){let o=te();Dn(Ype),W(0,Kpe,1,1,"ng-template",null,0,Mt),v(2,"div",6,1),H("click",function(a){return B(o),V(r._control.onContainerClick(a))}),W(4,Jpe,1,0,"div",7),v(5,"div",8),W(6,nfe,2,2,"div",9)(7,ife,3,0,"div",10)(8,rfe,3,0,"div",11),v(9,"div",12),W(10,sfe,1,1,null,13),Wt(11),y(),W(12,afe,3,0,"div",14)(13,lfe,3,0,"div",15),y(),W(14,cfe,1,0,"div",16),y(),v(15,"div",17),W(16,dfe,2,1,"div",18)(17,hfe,5,2,"div",19),y()}if(n&2){let o;w(2),ne("mdc-text-field--filled",!r._hasOutline())("mdc-text-field--outlined",r._hasOutline())("mdc-text-field--no-label",!r._hasFloatingLabel())("mdc-text-field--disabled",r._control.disabled)("mdc-text-field--invalid",r._control.errorState),w(2),re(!r._hasOutline()&&!r._control.disabled?4:-1),w(2),re(r._hasOutline()?6:-1),w(),re(r._hasIconPrefix?7:-1),w(),re(r._hasTextPrefix?8:-1),w(2),re(!r._hasOutline()||r._forceDisplayInfixLabel()?10:-1),w(2),re(r._hasTextSuffix?12:-1),w(),re(r._hasIconSuffix?13:-1),w(),re(r._hasOutline()?-1:14),w(),ne("mat-mdc-form-field-subscript-dynamic-size",r.subscriptSizing==="dynamic"),w(),re((o=r._getDisplayedMessages())==="error"?16:o==="hint"?17:-1)}},dependencies:[N5,F5,Gs,L5,A5],styles:['.mdc-text-field{display:inline-flex;align-items:baseline;padding:0 16px;position:relative;box-sizing:border-box;overflow:hidden;will-change:opacity,transform,color;border-top-left-radius:4px;border-top-right-radius:4px;border-bottom-right-radius:0;border-bottom-left-radius:0}.mdc-text-field__input{width:100%;min-width:0;border:none;border-radius:0;background:none;padding:0;-moz-appearance:none;-webkit-appearance:none;height:28px}.mdc-text-field__input::-webkit-calendar-picker-indicator{display:none}.mdc-text-field__input::-ms-clear{display:none}.mdc-text-field__input:focus{outline:none}.mdc-text-field__input:invalid{box-shadow:none}.mdc-text-field__input::placeholder{opacity:0}.mdc-text-field__input::-moz-placeholder{opacity:0}.mdc-text-field__input::-webkit-input-placeholder{opacity:0}.mdc-text-field__input:-ms-input-placeholder{opacity:0}.mdc-text-field--no-label .mdc-text-field__input::placeholder,.mdc-text-field--focused .mdc-text-field__input::placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{opacity:1}.mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{opacity:1}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-moz-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive::-webkit-input-placeholder{opacity:0}.mdc-text-field--disabled:not(.mdc-text-field--no-label) .mdc-text-field__input.mat-mdc-input-disabled-interactive:-ms-input-placeholder{opacity:0}.mdc-text-field--outlined .mdc-text-field__input,.mdc-text-field--filled.mdc-text-field--no-label .mdc-text-field__input{height:100%}.mdc-text-field--outlined .mdc-text-field__input{display:flex;border:none !important;background-color:rgba(0,0,0,0)}.mdc-text-field--disabled .mdc-text-field__input{pointer-events:auto}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-filled-text-field-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mdc-filled-text-field-caret-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-filled-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-filled-text-field-error-caret-color)}.mdc-text-field--filled.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-filled-text-field-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input{color:var(--mdc-outlined-text-field-input-text-color, var(--mat-sys-on-surface));caret-color:var(--mdc-outlined-text-field-caret-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-moz-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input::-webkit-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-text-field__input:-ms-input-placeholder{color:var(--mdc-outlined-text-field-input-text-placeholder-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-text-field__input{caret-color:var(--mdc-outlined-text-field-error-caret-color)}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-text-field__input{color:var(--mdc-outlined-text-field-disabled-input-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}@media(forced-colors: active){.mdc-text-field--disabled .mdc-text-field__input{background-color:Window}}.mdc-text-field--filled{height:56px;border-bottom-right-radius:0;border-bottom-left-radius:0;border-top-left-radius:var(--mdc-filled-text-field-container-shape, var(--mat-sys-corner-extra-small-top));border-top-right-radius:var(--mdc-filled-text-field-container-shape, var(--mat-sys-corner-extra-small-top))}.mdc-text-field--filled:not(.mdc-text-field--disabled){background-color:var(--mdc-filled-text-field-container-color, var(--mat-sys-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled{background-color:var(--mdc-filled-text-field-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 4%, transparent))}.mdc-text-field--outlined{height:56px;overflow:visible;padding-right:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)));padding-left:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)) + 4px)}[dir=rtl] .mdc-text-field--outlined{padding-right:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)) + 4px);padding-left:max(16px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)))}.mdc-floating-label{position:absolute;left:0;transform-origin:left top;line-height:1.15rem;text-align:left;text-overflow:ellipsis;white-space:nowrap;cursor:text;overflow:hidden;will-change:transform}[dir=rtl] .mdc-floating-label{right:0;left:auto;transform-origin:right top;text-align:right}.mdc-text-field .mdc-floating-label{top:50%;transform:translateY(-50%);pointer-events:none}.mdc-notched-outline .mdc-floating-label{display:inline-block;position:relative;max-width:100%}.mdc-text-field--outlined .mdc-floating-label{left:4px;right:auto}[dir=rtl] .mdc-text-field--outlined .mdc-floating-label{left:auto;right:4px}.mdc-text-field--filled .mdc-floating-label{left:16px;right:auto}[dir=rtl] .mdc-text-field--filled .mdc-floating-label{left:auto;right:16px}.mdc-text-field--disabled .mdc-floating-label{cursor:default}@media(forced-colors: active){.mdc-text-field--disabled .mdc-floating-label{z-index:1}}.mdc-text-field--filled.mdc-text-field--no-label .mdc-floating-label{display:none}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-filled-text-field-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-filled-text-field-hover-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-filled-text-field-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-filled-text-field-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-filled-text-field-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-filled-text-field-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--filled .mdc-floating-label{font-family:var(--mdc-filled-text-field-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mdc-filled-text-field-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mdc-filled-text-field-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mdc-filled-text-field-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mdc-floating-label{color:var(--mdc-outlined-text-field-label-text-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-focus-label-text-color, var(--mat-sys-primary))}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-hover-label-text-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined.mdc-text-field--disabled .mdc-floating-label{color:var(--mdc-outlined-text-field-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-floating-label{color:var(--mdc-outlined-text-field-error-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mdc-floating-label{color:var(--mdc-outlined-text-field-error-focus-label-text-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--disabled):hover .mdc-floating-label{color:var(--mdc-outlined-text-field-error-hover-label-text-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined .mdc-floating-label{font-family:var(--mdc-outlined-text-field-label-text-font, var(--mat-sys-body-large-font));font-size:var(--mdc-outlined-text-field-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mdc-outlined-text-field-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mdc-outlined-text-field-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-floating-label--float-above{cursor:auto;transform:translateY(-106%) scale(0.75)}.mdc-text-field--filled .mdc-floating-label--float-above{transform:translateY(-106%) scale(0.75)}.mdc-text-field--outlined .mdc-floating-label--float-above{transform:translateY(-37.25px) scale(1);font-size:.75rem}.mdc-notched-outline .mdc-floating-label--float-above{text-overflow:clip}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:133.3333333333%}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{transform:translateY(-34.75px) scale(0.75)}.mdc-text-field--outlined.mdc-notched-outline--upgraded .mdc-floating-label--float-above,.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:1rem}.mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:1px;margin-right:0;content:"*"}[dir=rtl] .mdc-floating-label--required:not(.mdc-floating-label--hide-required-marker)::after{margin-left:0;margin-right:1px}.mdc-notched-outline{display:flex;position:absolute;top:0;right:0;left:0;box-sizing:border-box;width:100%;max-width:100%;height:100%;text-align:left;pointer-events:none}[dir=rtl] .mdc-notched-outline{text-align:right}.mdc-text-field--outlined .mdc-notched-outline{z-index:1}.mat-mdc-notch-piece{box-sizing:border-box;height:100%;pointer-events:none;border-top:1px solid;border-bottom:1px solid}.mdc-text-field--focused .mat-mdc-notch-piece{border-width:2px}.mdc-text-field--outlined:not(.mdc-text-field--disabled) .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-outline-color, var(--mat-sys-outline));border-width:var(--mdc-outlined-text-field-outline-width, 1px)}.mdc-text-field--outlined:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-hover-outline-color, var(--mat-sys-on-surface))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-focus-outline-color, var(--mat-sys-primary))}.mdc-text-field--outlined.mdc-text-field--disabled .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-disabled-outline-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-notched-outline .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-hover-outline-color, var(--mat-sys-on-error-container))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--invalid.mdc-text-field--focused .mat-mdc-notch-piece{border-color:var(--mdc-outlined-text-field-error-focus-outline-color, var(--mat-sys-error))}.mdc-text-field--outlined:not(.mdc-text-field--disabled).mdc-text-field--focused .mdc-notched-outline .mat-mdc-notch-piece{border-width:var(--mdc-outlined-text-field-focus-outline-width, 2px)}.mdc-notched-outline__leading{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__leading{width:max(12px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)))}[dir=rtl] .mdc-notched-outline__leading{border-left:none;border-right:1px solid;border-bottom-left-radius:0;border-top-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__trailing{flex-grow:1;border-left:none;border-right:1px solid;border-top-left-radius:0;border-bottom-left-radius:0;border-top-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-right-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}[dir=rtl] .mdc-notched-outline__trailing{border-left:1px solid;border-right:none;border-top-right-radius:0;border-bottom-right-radius:0;border-top-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small));border-bottom-left-radius:var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small))}.mdc-notched-outline__notch{flex:0 0 auto;width:auto}.mdc-text-field--outlined .mdc-notched-outline .mdc-notched-outline__notch{max-width:min(var(--mat-form-field-notch-max-width, 100%),100% - max(12px,var(--mdc-outlined-text-field-container-shape, var(--mat-sys-corner-extra-small)))*2)}.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:1px}.mdc-text-field--focused.mdc-text-field--outlined .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-top:2px}.mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:0;padding-right:8px;border-top:none;--mat-form-field-notch-max-width: 100%}[dir=rtl] .mdc-notched-outline--notched .mdc-notched-outline__notch{padding-left:8px;padding-right:0}.mdc-notched-outline--no-label .mdc-notched-outline__notch{display:none}.mdc-line-ripple::before,.mdc-line-ripple::after{position:absolute;bottom:0;left:0;width:100%;border-bottom-style:solid;content:""}.mdc-line-ripple::before{z-index:1;border-bottom-width:var(--mdc-filled-text-field-active-indicator-height, 1px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-active-indicator-color, var(--mat-sys-on-surface-variant))}.mdc-text-field--filled:not(.mdc-text-field--disabled):not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-hover-active-indicator-color, var(--mat-sys-on-surface))}.mdc-text-field--filled.mdc-text-field--disabled .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-disabled-active-indicator-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-active-indicator-color, var(--mat-sys-error))}.mdc-text-field--filled:not(.mdc-text-field--disabled).mdc-text-field--invalid:not(.mdc-text-field--focused):hover .mdc-line-ripple::before{border-bottom-color:var(--mdc-filled-text-field-error-hover-active-indicator-color, var(--mat-sys-on-error-container))}.mdc-line-ripple::after{transform:scaleX(0);opacity:0;z-index:2}.mdc-text-field--filled .mdc-line-ripple::after{border-bottom-width:var(--mdc-filled-text-field-focus-active-indicator-height, 2px)}.mdc-text-field--filled:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-focus-active-indicator-color, var(--mat-sys-primary))}.mdc-text-field--filled.mdc-text-field--invalid:not(.mdc-text-field--disabled) .mdc-line-ripple::after{border-bottom-color:var(--mdc-filled-text-field-error-focus-active-indicator-color, var(--mat-sys-error))}.mdc-line-ripple--active::after{transform:scaleX(1);opacity:1}.mdc-line-ripple--deactivating::after{opacity:0}.mdc-text-field--disabled{pointer-events:none}.mat-mdc-form-field-textarea-control{vertical-align:middle;resize:vertical;box-sizing:border-box;height:auto;margin:0;padding:0;border:none;overflow:auto}.mat-mdc-form-field-input-control.mat-mdc-form-field-input-control{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font:inherit;letter-spacing:inherit;text-decoration:inherit;text-transform:inherit;border:none}.mat-mdc-form-field .mat-mdc-floating-label.mdc-floating-label{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;line-height:normal;pointer-events:all;will-change:auto}.mat-mdc-form-field:not(.mat-form-field-disabled) .mat-mdc-floating-label.mdc-floating-label{cursor:inherit}.mdc-text-field--no-label:not(.mdc-text-field--textarea) .mat-mdc-form-field-input-control.mdc-text-field__input,.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control{height:auto}.mat-mdc-text-field-wrapper .mat-mdc-form-field-input-control.mdc-text-field__input[type=color]{height:23px}.mat-mdc-text-field-wrapper{height:auto;flex:auto;will-change:auto}.mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-left:0;--mat-mdc-form-field-label-offset-x: -16px}.mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-right:0}[dir=rtl] .mat-mdc-text-field-wrapper{padding-left:16px;padding-right:16px}[dir=rtl] .mat-mdc-form-field-has-icon-suffix .mat-mdc-text-field-wrapper{padding-left:0}[dir=rtl] .mat-mdc-form-field-has-icon-prefix .mat-mdc-text-field-wrapper{padding-right:0}.mat-form-field-disabled .mdc-text-field__input::placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-moz-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input::-webkit-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-disabled .mdc-text-field__input:-ms-input-placeholder{color:var(--mat-form-field-disabled-input-text-placeholder-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-label-always-float .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms;opacity:1}.mat-mdc-text-field-wrapper .mat-mdc-form-field-infix .mat-mdc-floating-label{left:auto;right:auto}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-text-field__input{display:inline-block}.mat-mdc-form-field .mat-mdc-text-field-wrapper.mdc-text-field .mdc-notched-outline__notch{padding-top:0}.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:1px solid rgba(0,0,0,0)}[dir=rtl] .mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field.mat-mdc-form-field .mdc-notched-outline__notch{border-left:none;border-right:1px solid rgba(0,0,0,0)}.mat-mdc-form-field-infix{min-height:var(--mat-form-field-container-height, 56px);padding-top:var(--mat-form-field-filled-with-label-container-padding-top, 24px);padding-bottom:var(--mat-form-field-filled-with-label-container-padding-bottom, 8px)}.mdc-text-field--outlined .mat-mdc-form-field-infix,.mdc-text-field--no-label .mat-mdc-form-field-infix{padding-top:var(--mat-form-field-container-vertical-padding, 16px);padding-bottom:var(--mat-form-field-container-vertical-padding, 16px)}.mat-mdc-text-field-wrapper .mat-mdc-form-field-flex .mat-mdc-floating-label{top:calc(var(--mat-form-field-container-height, 56px)/2)}.mdc-text-field--filled .mat-mdc-floating-label{display:var(--mat-form-field-filled-label-display, block)}.mat-mdc-text-field-wrapper.mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{--mat-mdc-form-field-label-transform: translateY(calc(calc(6.75px + var(--mat-form-field-container-height, 56px) / 2) * -1)) scale(var(--mat-mdc-form-field-floating-label-scale, 0.75));transform:var(--mat-mdc-form-field-label-transform)}.mat-mdc-form-field-subscript-wrapper{box-sizing:border-box;width:100%;position:relative}.mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-error-wrapper{position:absolute;top:0;left:0;right:0;padding:0 16px}.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-hint-wrapper,.mat-mdc-form-field-subscript-dynamic-size .mat-mdc-form-field-error-wrapper{position:static}.mat-mdc-form-field-bottom-align::before{content:"";display:inline-block;height:16px}.mat-mdc-form-field-bottom-align.mat-mdc-form-field-subscript-dynamic-size::before{content:unset}.mat-mdc-form-field-hint-end{order:1}.mat-mdc-form-field-hint-wrapper{display:flex}.mat-mdc-form-field-hint-spacer{flex:1 0 1em}.mat-mdc-form-field-error{display:block;color:var(--mat-form-field-error-text-color, var(--mat-sys-error))}.mat-mdc-form-field-subscript-wrapper,.mat-mdc-form-field-bottom-align::before{-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-subscript-text-font, var(--mat-sys-body-small-font));line-height:var(--mat-form-field-subscript-text-line-height, var(--mat-sys-body-small-line-height));font-size:var(--mat-form-field-subscript-text-size, var(--mat-sys-body-small-size));letter-spacing:var(--mat-form-field-subscript-text-tracking, var(--mat-sys-body-small-tracking));font-weight:var(--mat-form-field-subscript-text-weight, var(--mat-sys-body-small-weight))}.mat-mdc-form-field-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;opacity:0;pointer-events:none;background-color:var(--mat-form-field-state-layer-color, var(--mat-sys-on-surface))}.mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-mdc-form-field.mat-focused .mat-mdc-form-field-focus-overlay{opacity:var(--mat-form-field-focus-state-layer-opacity, 0)}select.mat-mdc-form-field-input-control{-moz-appearance:none;-webkit-appearance:none;background-color:rgba(0,0,0,0);display:inline-flex;box-sizing:border-box}select.mat-mdc-form-field-input-control:not(:disabled){cursor:pointer}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option{color:var(--mat-form-field-select-option-text-color, var(--mat-sys-neutral10))}select.mat-mdc-form-field-input-control:not(.mat-mdc-native-select-inline) option:disabled{color:var(--mat-form-field-select-disabled-option-text-color, color-mix(in srgb, var(--mat-sys-neutral10) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{content:"";width:0;height:0;border-left:5px solid rgba(0,0,0,0);border-right:5px solid rgba(0,0,0,0);border-top:5px solid;position:absolute;right:0;top:50%;margin-top:-2.5px;pointer-events:none;color:var(--mat-form-field-enabled-select-arrow-color, var(--mat-sys-on-surface-variant))}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-infix::after{right:auto;left:0}.mat-mdc-form-field-type-mat-native-select.mat-focused .mat-mdc-form-field-infix::after{color:var(--mat-form-field-focus-select-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field-type-mat-native-select.mat-form-field-disabled .mat-mdc-form-field-infix::after{color:var(--mat-form-field-disabled-select-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:15px}[dir=rtl] .mat-mdc-form-field-type-mat-native-select .mat-mdc-form-field-input-control{padding-right:0;padding-left:15px}@media(forced-colors: active){.mat-form-field-appearance-fill .mat-mdc-text-field-wrapper{outline:solid 1px}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-form-field-disabled .mat-mdc-text-field-wrapper{outline-color:GrayText}}@media(forced-colors: active){.mat-form-field-appearance-fill.mat-focused .mat-mdc-text-field-wrapper{outline:dashed 3px}}@media(forced-colors: active){.mat-mdc-form-field.mat-focused .mdc-notched-outline{border:dashed 3px}}.mat-mdc-form-field-input-control[type=date],.mat-mdc-form-field-input-control[type=datetime],.mat-mdc-form-field-input-control[type=datetime-local],.mat-mdc-form-field-input-control[type=month],.mat-mdc-form-field-input-control[type=week],.mat-mdc-form-field-input-control[type=time]{line-height:1}.mat-mdc-form-field-input-control::-webkit-datetime-edit{line-height:1;padding:0;margin-bottom:-2px}.mat-mdc-form-field{--mat-mdc-form-field-floating-label-scale: 0.75;display:inline-flex;flex-direction:column;min-width:0;text-align:left;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;font-family:var(--mat-form-field-container-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-form-field-container-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-form-field-container-text-size, var(--mat-sys-body-large-size));letter-spacing:var(--mat-form-field-container-text-tracking, var(--mat-sys-body-large-tracking));font-weight:var(--mat-form-field-container-text-weight, var(--mat-sys-body-large-weight))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-floating-label--float-above{font-size:calc(var(--mat-form-field-outlined-label-text-populated-size)*var(--mat-mdc-form-field-floating-label-scale))}.mat-mdc-form-field .mdc-text-field--outlined .mdc-notched-outline--upgraded .mdc-floating-label--float-above{font-size:var(--mat-form-field-outlined-label-text-populated-size)}[dir=rtl] .mat-mdc-form-field{text-align:right}.mat-mdc-form-field-flex{display:inline-flex;align-items:baseline;box-sizing:border-box;width:100%}.mat-mdc-text-field-wrapper{width:100%;z-index:0}.mat-mdc-form-field-icon-prefix,.mat-mdc-form-field-icon-suffix{align-self:center;line-height:0;pointer-events:auto;position:relative;z-index:1}.mat-mdc-form-field-icon-prefix>.mat-icon,.mat-mdc-form-field-icon-suffix>.mat-icon{padding:0 12px;box-sizing:content-box}.mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-leading-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-prefix{color:var(--mat-form-field-disabled-leading-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-trailing-icon-color, var(--mat-sys-on-surface-variant))}.mat-form-field-disabled .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-disabled-trailing-icon-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-form-field-invalid .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-trailing-icon-color, var(--mat-sys-error))}.mat-form-field-invalid:not(.mat-focused):not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper:hover .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-hover-trailing-icon-color, var(--mat-sys-on-error-container))}.mat-form-field-invalid.mat-focused .mat-mdc-text-field-wrapper .mat-mdc-form-field-icon-suffix{color:var(--mat-form-field-error-focus-trailing-icon-color, var(--mat-sys-error))}.mat-mdc-form-field-icon-prefix,[dir=rtl] .mat-mdc-form-field-icon-suffix{padding:0 4px 0 0}.mat-mdc-form-field-icon-suffix,[dir=rtl] .mat-mdc-form-field-icon-prefix{padding:0 0 0 4px}.mat-mdc-form-field-subscript-wrapper .mat-icon,.mat-mdc-form-field label .mat-icon{width:1em;height:1em;font-size:inherit}.mat-mdc-form-field-infix{flex:auto;min-width:0;width:180px;position:relative;box-sizing:border-box}.mat-mdc-form-field-infix:has(textarea[cols]){width:auto}.mat-mdc-form-field .mdc-notched-outline__notch{margin-left:-1px;-webkit-clip-path:inset(-9em -999em -9em 1px);clip-path:inset(-9em -999em -9em 1px)}[dir=rtl] .mat-mdc-form-field .mdc-notched-outline__notch{margin-left:0;margin-right:-1px;-webkit-clip-path:inset(-9em 1px -9em -999em);clip-path:inset(-9em 1px -9em -999em)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-floating-label{transition:transform 150ms cubic-bezier(0.4, 0, 0.2, 1),color 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input{transition:opacity 150ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::-moz-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input::-webkit-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field__input:-ms-input-placeholder{transition:opacity 67ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::-moz-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::-moz-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input::-webkit-input-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input::-webkit-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--no-label .mdc-text-field__input:-ms-input-placeholder,.mat-mdc-form-field:not(.mat-form-field-no-animations).mdc-text-field--focused .mdc-text-field__input:-ms-input-placeholder{transition-delay:40ms;transition-duration:110ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-text-field--filled:not(.mdc-ripple-upgraded):focus .mdc-text-field__ripple::before{transition-duration:75ms}.mat-mdc-form-field:not(.mat-form-field-no-animations) .mdc-line-ripple::after{transition:transform 180ms cubic-bezier(0.4, 0, 0.2, 1),opacity 180ms cubic-bezier(0.4, 0, 0.2, 1)}.mdc-notched-outline .mdc-floating-label{max-width:calc(100% + 1px)}.mdc-notched-outline--upgraded .mdc-floating-label--float-above{max-width:calc(133.3333333333% + 1px)}'],encapsulation:2,data:{animation:[vfe.transitionMessages]},changeDetection:0})}}return i})(),fa=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({imports:[Ht,Oe,Tb,Ht]})}}return i})();var Cfe=["trigger"],Sfe=["panel"],Mfe=[[["mat-select-trigger"]],"*"],Efe=["mat-select-trigger","*"];function Ife(i,t){if(i&1&&(v(0,"span",4),M(1),y()),i&2){let e=I();w(),lt(e.placeholder)}}function Tfe(i,t){i&1&&Wt(0)}function Dfe(i,t){if(i&1&&(v(0,"span",11),M(1),y()),i&2){let e=I(2);w(),lt(e.triggerValue)}}function Ofe(i,t){if(i&1&&(v(0,"span",5),W(1,Tfe,1,0)(2,Dfe,2,1,"span",11),y()),i&2){let e=I();w(),re(e.customTrigger?1:2)}}function Pfe(i,t){if(i&1){let e=te();v(0,"div",12,1),H("@transformPanel.done",function(r){B(e);let o=I();return V(o._panelDoneAnimatingStream.next(r.toState))})("keydown",function(r){B(e);let o=I();return V(o._handleKeydown(r))}),Wt(2,1),y()}if(i&2){let e=I();lL("mat-mdc-select-panel mdc-menu-surface mdc-menu-surface--open ",e._getPanelTheme(),""),R("ngClass",e.panelClass)("@transformPanel","showing"),qe("id",e.id+"-panel")("aria-multiselectable",e.multiple)("aria-label",e.ariaLabel||null)("aria-labelledby",e._getPanelAriaLabelledby())}}var Rfe={transformPanelWrap:pi("transformPanelWrap",[Fn("* => void",VF("@transformPanel",[BF()],{optional:!0}))]),transformPanel:pi("transformPanel",[Ci("void",en({opacity:0,transform:"scale(1, 0.8)"})),Fn("void => showing",Ln("120ms cubic-bezier(0, 0, 0.2, 1)",en({opacity:1,transform:"scale(1, 1)"}))),Fn("* => void",Ln("100ms linear",en({opacity:0})))])};var G5=0,j5=new pe("mat-select-scroll-strategy",{providedIn:"root",factory:()=>{let i=S(on);return()=>i.scrollStrategies.reposition()}});function Afe(i){return()=>i.scrollStrategies.reposition()}var Nfe=new pe("MAT_SELECT_CONFIG"),kfe={provide:j5,deps:[on],useFactory:Afe},Lfe=new pe("MatSelectTrigger"),KP=class{constructor(t,e){this.source=t,this.value=e}},eS=(()=>{class i{_scrollOptionIntoView(e){let n=this.options.toArray()[e];if(n){let r=this.panel.nativeElement,o=Wb(e,this.options,this.optionGroups),s=n._getHostElement();e===0&&o===1?r.scrollTop=0:r.scrollTop=$b(s.offsetTop,s.offsetHeight,r.scrollTop,r.offsetHeight)}}_positioningSettled(){this._scrollOptionIntoView(this._keyManager.activeItemIndex||0)}_getChangeEvent(e){return new KP(this,e)}get focused(){return this._focused||this._panelOpen}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}get placeholder(){return this._placeholder}set placeholder(e){this._placeholder=e,this.stateChanges.next()}get required(){return this._required??this.ngControl?.control?.hasValidator(pb.required)??!1}set required(e){this._required=e,this.stateChanges.next()}get multiple(){return this._multiple}set multiple(e){this._selectionModel,this._multiple=e}get compareWith(){return this._compareWith}set compareWith(e){this._compareWith=e,this._selectionModel&&this._initializeSelection()}get value(){return this._value}set value(e){this._assignValue(e)&&this._onChange(e)}get errorStateMatcher(){return this._errorStateTracker.matcher}set errorStateMatcher(e){this._errorStateTracker.matcher=e}get id(){return this._id}set id(e){this._id=e||this._uid,this.stateChanges.next()}get errorState(){return this._errorStateTracker.errorState}set errorState(e){this._errorStateTracker.errorState=e}constructor(){this._viewportRuler=S(aa),this._changeDetectorRef=S(Re),this._elementRef=S(Fe),this._dir=S(oi,{optional:!0}),this._parentFormField=S(nv,{optional:!0}),this.ngControl=S(_d,{self:!0,optional:!0}),this._liveAnnouncer=S(Vb),this._defaultOptions=S(Nfe,{optional:!0}),this._positions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"},{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:"mat-mdc-select-panel-above"}],this._scrollStrategyFactory=S(j5),this._panelOpen=!1,this._compareWith=(s,a)=>s===a,this._uid=`mat-select-${G5++}`,this._triggerAriaLabelledBy=null,this._destroy=new ce,this.stateChanges=new ce,this.disableAutomaticLabeling=!0,this._onChange=()=>{},this._onTouched=()=>{},this._valueId=`mat-select-value-${G5++}`,this._panelDoneAnimatingStream=new ce,this._overlayPanelClass=this._defaultOptions?.overlayPanelClass||"",this._focused=!1,this.controlType="mat-select",this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this._hideSingleSelectionIndicator=this._defaultOptions?.hideSingleSelectionIndicator??!1,this._multiple=!1,this.disableOptionCentering=this._defaultOptions?.disableOptionCentering??!1,this.ariaLabel="",this.panelWidth=this._defaultOptions&&typeof this._defaultOptions.panelWidth<"u"?this._defaultOptions.panelWidth:"auto",this._initialized=new ce,this.optionSelectionChanges=ko(()=>{let s=this.options;return s?s.changes.pipe(ni(s),Tn(()=>Xn(...s.map(a=>a.onSelectionChange)))):this._initialized.pipe(Tn(()=>this.optionSelectionChanges))}),this.openedChange=new Ie,this._openedStream=this.openedChange.pipe(qt(s=>s),We(()=>{})),this._closedStream=this.openedChange.pipe(qt(s=>!s),We(()=>{})),this.selectionChange=new Ie,this.valueChange=new Ie,this._trackedModal=null,this._skipPredicate=s=>this.panelOpen?!1:s.disabled;let e=S(pB),n=S(wT,{optional:!0}),r=S(CT,{optional:!0}),o=S(new zr("tabindex"),{optional:!0});this.ngControl&&(this.ngControl.valueAccessor=this),this._defaultOptions?.typeaheadDebounceInterval!=null&&(this.typeaheadDebounceInterval=this._defaultOptions.typeaheadDebounceInterval),this._errorStateTracker=new Hb(e,this.ngControl,r,n,this.stateChanges),this._scrollStrategy=this._scrollStrategyFactory(),this.tabIndex=o==null?0:parseInt(o)||0,this.id=this.id}ngOnInit(){this._selectionModel=new xu(this.multiple),this.stateChanges.next(),this._panelDoneAnimatingStream.pipe(bl(),Ke(this._destroy)).subscribe(()=>this._panelDoneAnimating(this.panelOpen)),this._viewportRuler.change().pipe(Ke(this._destroy)).subscribe(()=>{this.panelOpen&&(this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._changeDetectorRef.detectChanges())})}ngAfterContentInit(){this._initialized.next(),this._initialized.complete(),this._initKeyManager(),this._selectionModel.changed.pipe(Ke(this._destroy)).subscribe(e=>{e.added.forEach(n=>n.select()),e.removed.forEach(n=>n.deselect())}),this.options.changes.pipe(ni(null),Ke(this._destroy)).subscribe(()=>{this._resetOptions(),this._initializeSelection()})}ngDoCheck(){let e=this._getTriggerAriaLabelledby(),n=this.ngControl;if(e!==this._triggerAriaLabelledBy){let r=this._elementRef.nativeElement;this._triggerAriaLabelledBy=e,e?r.setAttribute("aria-labelledby",e):r.removeAttribute("aria-labelledby")}n&&(this._previousControl!==n.control&&(this._previousControl!==void 0&&n.disabled!==null&&n.disabled!==this.disabled&&(this.disabled=n.disabled),this._previousControl=n.control),this.updateErrorState())}ngOnChanges(e){(e.disabled||e.userAriaDescribedBy)&&this.stateChanges.next(),e.typeaheadDebounceInterval&&this._keyManager&&this._keyManager.withTypeAhead(this.typeaheadDebounceInterval)}ngOnDestroy(){this._keyManager?.destroy(),this._destroy.next(),this._destroy.complete(),this.stateChanges.complete(),this._clearFromModal()}toggle(){this.panelOpen?this.close():this.open()}open(){this._canOpen()&&(this._parentFormField&&(this._preferredOverlayOrigin=this._parentFormField.getConnectedOverlayOrigin()),this._overlayWidth=this._getOverlayWidth(this._preferredOverlayOrigin),this._applyModalPanelOwnership(),this._panelOpen=!0,this._keyManager.withHorizontalOrientation(null),this._highlightCorrectOption(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_applyModalPanelOwnership(){let e=this._elementRef.nativeElement.closest('body > .cdk-overlay-container [aria-modal="true"]');if(!e)return;let n=`${this.id}-panel`;this._trackedModal&&$l(this._trackedModal,"aria-owns",n),Lh(e,"aria-owns",n),this._trackedModal=e}_clearFromModal(){if(!this._trackedModal)return;let e=`${this.id}-panel`;$l(this._trackedModal,"aria-owns",e),this._trackedModal=null}close(){this._panelOpen&&(this._panelOpen=!1,this._keyManager.withHorizontalOrientation(this._isRtl()?"rtl":"ltr"),this._changeDetectorRef.markForCheck(),this._onTouched(),this.stateChanges.next())}writeValue(e){this._assignValue(e)}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck(),this.stateChanges.next()}get panelOpen(){return this._panelOpen}get selected(){return this.multiple?this._selectionModel?.selected||[]:this._selectionModel?.selected[0]}get triggerValue(){if(this.empty)return"";if(this._multiple){let e=this._selectionModel.selected.map(n=>n.viewValue);return this._isRtl()&&e.reverse(),e.join(", ")}return this._selectionModel.selected[0].viewValue}updateErrorState(){this._errorStateTracker.updateErrorState()}_isRtl(){return this._dir?this._dir.value==="rtl":!1}_handleKeydown(e){this.disabled||(this.panelOpen?this._handleOpenKeydown(e):this._handleClosedKeydown(e))}_handleClosedKeydown(e){let n=e.keyCode,r=n===40||n===38||n===37||n===39,o=n===13||n===32,s=this._keyManager;if(!s.isTyping()&&o&&!Si(e)||(this.multiple||e.altKey)&&r)e.preventDefault(),this.open();else if(!this.multiple){let a=this.selected;s.onKeydown(e);let l=this.selected;l&&a!==l&&this._liveAnnouncer.announce(l.viewValue,1e4)}}_handleOpenKeydown(e){let n=this._keyManager,r=e.keyCode,o=r===40||r===38,s=n.isTyping();if(o&&e.altKey)e.preventDefault(),this.close();else if(!s&&(r===13||r===32)&&n.activeItem&&!Si(e))e.preventDefault(),n.activeItem._selectViaInteraction();else if(!s&&this._multiple&&r===65&&e.ctrlKey){e.preventDefault();let a=this.options.some(l=>!l.disabled&&!l.selected);this.options.forEach(l=>{l.disabled||(a?l.select():l.deselect())})}else{let a=n.activeItemIndex;n.onKeydown(e),this._multiple&&o&&e.shiftKey&&n.activeItem&&n.activeItemIndex!==a&&n.activeItem._selectViaInteraction()}}_onFocus(){this.disabled||(this._focused=!0,this.stateChanges.next())}_onBlur(){this._focused=!1,this._keyManager?.cancelTypeahead(),!this.disabled&&!this.panelOpen&&(this._onTouched(),this._changeDetectorRef.markForCheck(),this.stateChanges.next())}_onAttached(){this._overlayDir.positionChange.pipe(tn(1)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this._positioningSettled()})}_getPanelTheme(){return this._parentFormField?`mat-${this._parentFormField.color}`:""}get empty(){return!this._selectionModel||this._selectionModel.isEmpty()}_initializeSelection(){Promise.resolve().then(()=>{this.ngControl&&(this._value=this.ngControl.value),this._setSelectionByValue(this._value),this.stateChanges.next()})}_setSelectionByValue(e){if(this.options.forEach(n=>n.setInactiveStyles()),this._selectionModel.clear(),this.multiple&&e)Array.isArray(e),e.forEach(n=>this._selectOptionByValue(n)),this._sortValues();else{let n=this._selectOptionByValue(e);n?this._keyManager.updateActiveItem(n):this.panelOpen||this._keyManager.updateActiveItem(-1)}this._changeDetectorRef.markForCheck()}_selectOptionByValue(e){let n=this.options.find(r=>{if(this._selectionModel.isSelected(r))return!1;try{return r.value!=null&&this._compareWith(r.value,e)}catch{return!1}});return n&&this._selectionModel.select(n),n}_assignValue(e){return e!==this._value||this._multiple&&Array.isArray(e)?(this.options&&this._setSelectionByValue(e),this._value=e,!0):!1}_getOverlayWidth(e){return this.panelWidth==="auto"?(e instanceof X_?e.elementRef:e||this._elementRef).nativeElement.getBoundingClientRect().width:this.panelWidth===null?"":this.panelWidth}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}_initKeyManager(){this._keyManager=new Ah(this.options).withTypeAhead(this.typeaheadDebounceInterval).withVerticalOrientation().withHorizontalOrientation(this._isRtl()?"rtl":"ltr").withHomeAndEnd().withPageUpDown().withAllowedModifierKeys(["shiftKey"]).skipPredicate(this._skipPredicate),this._keyManager.tabOut.subscribe(()=>{this.panelOpen&&(!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction(),this.focus(),this.close())}),this._keyManager.change.subscribe(()=>{this._panelOpen&&this.panel?this._scrollOptionIntoView(this._keyManager.activeItemIndex||0):!this._panelOpen&&!this.multiple&&this._keyManager.activeItem&&this._keyManager.activeItem._selectViaInteraction()})}_resetOptions(){let e=Xn(this.options.changes,this._destroy);this.optionSelectionChanges.pipe(Ke(e)).subscribe(n=>{this._onSelect(n.source,n.isUserInput),n.isUserInput&&!this.multiple&&this._panelOpen&&(this.close(),this.focus())}),Xn(...this.options.map(n=>n._stateChanges)).pipe(Ke(e)).subscribe(()=>{this._changeDetectorRef.detectChanges(),this.stateChanges.next()})}_onSelect(e,n){let r=this._selectionModel.isSelected(e);e.value==null&&!this._multiple?(e.deselect(),this._selectionModel.clear(),this.value!=null&&this._propagateChanges(e.value)):(r!==e.selected&&(e.selected?this._selectionModel.select(e):this._selectionModel.deselect(e)),n&&this._keyManager.setActiveItem(e),this.multiple&&(this._sortValues(),n&&this.focus())),r!==this._selectionModel.isSelected(e)&&this._propagateChanges(),this.stateChanges.next()}_sortValues(){if(this.multiple){let e=this.options.toArray();this._selectionModel.sort((n,r)=>this.sortComparator?this.sortComparator(n,r,e):e.indexOf(n)-e.indexOf(r)),this.stateChanges.next()}}_propagateChanges(e){let n;this.multiple?n=this.selected.map(r=>r.value):n=this.selected?this.selected.value:e,this._value=n,this.valueChange.emit(n),this._onChange(n),this.selectionChange.emit(this._getChangeEvent(n)),this._changeDetectorRef.markForCheck()}_highlightCorrectOption(){if(this._keyManager)if(this.empty){let e=-1;for(let n=0;n0}focus(e){this._elementRef.nativeElement.focus(e)}_getPanelAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId()||null,n=e?e+" ":"";return this.ariaLabelledby?n+this.ariaLabelledby:e}_getAriaActiveDescendant(){return this.panelOpen&&this._keyManager&&this._keyManager.activeItem?this._keyManager.activeItem.id:null}_getTriggerAriaLabelledby(){if(this.ariaLabel)return null;let e=this._parentFormField?.getLabelId(),n=(e?e+" ":"")+this._valueId;return this.ariaLabelledby&&(n+=" "+this.ariaLabelledby),n}_panelDoneAnimating(e){this.openedChange.emit(e)}setDescribedByIds(e){e.length?this._elementRef.nativeElement.setAttribute("aria-describedby",e.join(" ")):this._elementRef.nativeElement.removeAttribute("aria-describedby")}onContainerClick(){this.focus(),this.open()}get shouldLabelFloat(){return this.panelOpen||!this.empty||this.focused&&!!this.placeholder}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["mat-select"]],contentQueries:function(n,r,o){if(n&1&&(wi(o,Lfe,5),wi(o,Yl,5),wi(o,Vh,5)),n&2){let s;_e(s=ve())&&(r.customTrigger=s.first),_e(s=ve())&&(r.options=s),_e(s=ve())&&(r.optionGroups=s)}},viewQuery:function(n,r){if(n&1&&(Me(Cfe,5),Me(Sfe,5),Me(RP,5)),n&2){let o;_e(o=ve())&&(r.trigger=o.first),_e(o=ve())&&(r.panel=o.first),_e(o=ve())&&(r._overlayDir=o.first)}},hostAttrs:["role","combobox","aria-haspopup","listbox",1,"mat-mdc-select"],hostVars:19,hostBindings:function(n,r){n&1&&H("keydown",function(s){return r._handleKeydown(s)})("focus",function(){return r._onFocus()})("blur",function(){return r._onBlur()}),n&2&&(qe("id",r.id)("tabindex",r.disabled?-1:r.tabIndex)("aria-controls",r.panelOpen?r.id+"-panel":null)("aria-expanded",r.panelOpen)("aria-label",r.ariaLabel||null)("aria-required",r.required.toString())("aria-disabled",r.disabled.toString())("aria-invalid",r.errorState)("aria-activedescendant",r._getAriaActiveDescendant()),ne("mat-mdc-select-disabled",r.disabled)("mat-mdc-select-invalid",r.errorState)("mat-mdc-select-required",r.required)("mat-mdc-select-empty",r.empty)("mat-mdc-select-multiple",r.multiple))},inputs:{userAriaDescribedBy:[0,"aria-describedby","userAriaDescribedBy"],panelClass:"panelClass",disabled:[2,"disabled","disabled",Ye],disableRipple:[2,"disableRipple","disableRipple",Ye],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:Jn(e)],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",Ye],placeholder:"placeholder",required:[2,"required","required",Ye],multiple:[2,"multiple","multiple",Ye],disableOptionCentering:[2,"disableOptionCentering","disableOptionCentering",Ye],compareWith:"compareWith",value:"value",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],errorStateMatcher:"errorStateMatcher",typeaheadDebounceInterval:[2,"typeaheadDebounceInterval","typeaheadDebounceInterval",Jn],sortComparator:"sortComparator",id:"id",panelWidth:"panelWidth"},outputs:{openedChange:"openedChange",_openedStream:"opened",_closedStream:"closed",selectionChange:"selectionChange",valueChange:"valueChange"},exportAs:["matSelect"],standalone:!0,features:[Bt([{provide:ZP,useExisting:i},{provide:Bh,useExisting:i}]),nn,un,se],ngContentSelectors:Efe,decls:11,vars:8,consts:[["fallbackOverlayOrigin","cdkOverlayOrigin","trigger",""],["panel",""],["cdk-overlay-origin","",1,"mat-mdc-select-trigger",3,"click"],[1,"mat-mdc-select-value"],[1,"mat-mdc-select-placeholder","mat-mdc-select-min-line"],[1,"mat-mdc-select-value-text"],[1,"mat-mdc-select-arrow-wrapper"],[1,"mat-mdc-select-arrow"],["viewBox","0 0 24 24","width","24px","height","24px","focusable","false","aria-hidden","true"],["d","M7 10l5 5 5-5z"],["cdk-connected-overlay","","cdkConnectedOverlayLockPosition","","cdkConnectedOverlayHasBackdrop","","cdkConnectedOverlayBackdropClass","cdk-overlay-transparent-backdrop",3,"backdropClick","attach","detach","cdkConnectedOverlayPanelClass","cdkConnectedOverlayScrollStrategy","cdkConnectedOverlayOrigin","cdkConnectedOverlayOpen","cdkConnectedOverlayPositions","cdkConnectedOverlayWidth"],[1,"mat-mdc-select-min-line"],["role","listbox","tabindex","-1",3,"keydown","ngClass"]],template:function(n,r){if(n&1){let o=te();Dn(Mfe),v(0,"div",2,0),H("click",function(){return B(o),V(r.open())}),v(3,"div",3),W(4,Ife,2,1,"span",4)(5,Ofe,3,1,"span",5),y(),v(6,"div",6)(7,"div",7),mo(),v(8,"svg",8),ee(9,"path",9),y()()()(),W(10,Pfe,3,9,"ng-template",10),H("backdropClick",function(){return B(o),V(r.close())})("attach",function(){return B(o),V(r._onAttached())})("detach",function(){return B(o),V(r.close())})}if(n&2){let o=fe(1);w(3),qe("id",r._valueId),w(),re(r.empty?4:5),w(6),R("cdkConnectedOverlayPanelClass",r._overlayPanelClass)("cdkConnectedOverlayScrollStrategy",r._scrollStrategy)("cdkConnectedOverlayOrigin",r._preferredOverlayOrigin||o)("cdkConnectedOverlayOpen",r.panelOpen)("cdkConnectedOverlayPositions",r._positions)("cdkConnectedOverlayWidth",r._overlayWidth)}},dependencies:[X_,RP,g0],styles:['.mat-mdc-select{display:inline-block;width:100%;outline:none;-moz-osx-font-smoothing:grayscale;-webkit-font-smoothing:antialiased;color:var(--mat-select-enabled-trigger-text-color, var(--mat-sys-on-surface));font-family:var(--mat-select-trigger-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-select-trigger-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-select-trigger-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-select-trigger-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-select-trigger-text-tracking, var(--mat-sys-body-large-tracking))}div.mat-mdc-select-panel{box-shadow:var(--mat-select-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12))}.mat-mdc-select-disabled{color:var(--mat-select-disabled-trigger-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-trigger{display:inline-flex;align-items:center;cursor:pointer;position:relative;box-sizing:border-box;width:100%}.mat-mdc-select-disabled .mat-mdc-select-trigger{-webkit-user-select:none;user-select:none;cursor:default}.mat-mdc-select-value{width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.mat-mdc-select-value-text{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.mat-mdc-select-arrow-wrapper{height:24px;flex-shrink:0;display:inline-flex;align-items:center}.mat-form-field-appearance-fill .mdc-text-field--no-label .mat-mdc-select-arrow-wrapper{transform:none}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-invalid .mat-mdc-select-arrow,.mat-form-field-invalid:not(.mat-form-field-disabled) .mat-mdc-form-field-infix::after{color:var(--mat-select-invalid-arrow-color, var(--mat-sys-error))}.mat-mdc-select-arrow{width:10px;height:5px;position:relative;color:var(--mat-select-enabled-arrow-color, var(--mat-sys-on-surface-variant))}.mat-mdc-form-field.mat-focused .mat-mdc-select-arrow{color:var(--mat-select-focused-arrow-color, var(--mat-sys-primary))}.mat-mdc-form-field .mat-mdc-select.mat-mdc-select-disabled .mat-mdc-select-arrow{color:var(--mat-select-disabled-arrow-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-select-arrow svg{fill:currentColor;position:absolute;top:50%;left:50%;transform:translate(-50%, -50%)}@media(forced-colors: active){.mat-mdc-select-arrow svg{fill:CanvasText}.mat-mdc-select-disabled .mat-mdc-select-arrow svg{fill:GrayText}}div.mat-mdc-select-panel{width:100%;max-height:275px;outline:0;overflow:auto;padding:8px 0;border-radius:4px;box-sizing:border-box;position:static;background-color:var(--mat-select-panel-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-select-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-select-panel-above) div.mat-mdc-select-panel{border-top-left-radius:0;border-top-right-radius:0;transform-origin:top center}.mat-mdc-select-panel-above div.mat-mdc-select-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:bottom center}div.mat-mdc-select-panel .mat-mdc-option{--mdc-list-list-item-container-color: var(--mat-select-panel-background-color)}.mat-mdc-select-placeholder{transition:color 400ms 133.3333333333ms cubic-bezier(0.25, 0.8, 0.25, 1);color:var(--mat-select-placeholder-text-color, var(--mat-sys-on-surface-variant))}._mat-animation-noopable .mat-mdc-select-placeholder{transition:none}.mat-form-field-hide-placeholder .mat-mdc-select-placeholder{color:rgba(0,0,0,0);-webkit-text-fill-color:rgba(0,0,0,0);transition:none;display:block}.mat-mdc-form-field-type-mat-select:not(.mat-form-field-disabled) .mat-mdc-text-field-wrapper{cursor:pointer}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mat-mdc-floating-label{max-width:calc(100% - 18px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-fill .mdc-floating-label--float-above{max-width:calc(100%/0.75 - 24px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-notched-outline__notch{max-width:calc(100% - 60px)}.mat-mdc-form-field-type-mat-select.mat-form-field-appearance-outline .mdc-text-field--label-floating .mdc-notched-outline__notch{max-width:calc(100% - 24px)}.mat-mdc-select-min-line:empty::before{content:" ";white-space:pre;width:1px;display:inline-block;visibility:hidden}.mat-form-field-appearance-fill .mat-mdc-select-arrow-wrapper{transform:var(--mat-select-arrow-transform, translateY(-8px))}'],encapsulation:2,data:{animation:[Rfe.transformPanel]},changeDetection:0})}}return i})();var ma=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({providers:[kfe],imports:[Oe,so,zh,Ht,ts,fa,zh,Ht]})}}return i})();var df=(()=>{class i{changeDetectorRef;pageSize;itemsCount;change=new Ie;curPageIndex=0;constructor(e){this.changeDetectorRef=e}reset(){this.curPageIndex=0,this.changeDetectorRef.markForCheck()}handleClickGoToPrevPage(){this.curPageIndex--,this.curPageIndex=Math.max(0,this.curPageIndex),this.change.emit(this.curPageIndex)}handleClickGoToNextPage(){this.curPageIndex++,this.curPageIndex=Math.min(Math.ceil(this.itemsCount/this.pageSize)-1,this.curPageIndex),this.change.emit(this.curPageIndex)}get disablePrevButton(){return this.curPageIndex===0}get disableNextButton(){return this.curPageIndex===Math.ceil(this.itemsCount/this.pageSize)-1}get curRangeText(){let e=Math.min(this.itemsCount,this.curPageIndex*this.pageSize+1),n=Math.min((this.curPageIndex+1)*this.pageSize,this.itemsCount);return e===n?`${e}`:`${e} - ${n}`}static \u0275fac=function(n){return new(n||i)(q(Re))};static \u0275cmp=oe({type:i,selectors:[["paginator"]],inputs:{pageSize:"pageSize",itemsCount:"itemsCount"},outputs:{change:"change"},standalone:!0,features:[se],decls:9,vars:5,consts:[[1,"container"],[1,"icon-container","prev-page",3,"click"],[1,"range-text"],[1,"icon-container","next-page",3,"click"]],template:function(n,r){n&1&&(v(0,"div",0)(1,"div",1),H("click",function(){return r.handleClickGoToPrevPage()}),v(2,"mat-icon"),M(3,"chevron_left"),y()(),v(4,"div",2),M(5),y(),v(6,"div",3),H("click",function(){return r.handleClickGoToNextPage()}),v(7,"mat-icon"),M(8,"chevron_right"),y()()()),n&2&&(w(),ne("disabled",r.disablePrevButton),w(4),we(" ",r.curRangeText," "),w(),ne("disabled",r.disableNextButton))},dependencies:[Oe,Je,dt],styles:[`.container[_ngcontent-%COMP%]{display:flex;align-items:center;-webkit-user-select:none;user-select:none}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:24px;height:24px;border-radius:99px;cursor:pointer}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{background-color:#ddd}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{opacity:1}.container[_ngcontent-%COMP%] .icon-container.disabled[_ngcontent-%COMP%]{pointer-events:none;opacity:.3}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{opacity:.7;color:#333;font-size:20px;width:20px;height:20px}.container[_ngcontent-%COMP%] .range-text[_ngcontent-%COMP%]{color:#333;font-size:12px;display:flex;align-items:center;justify-content:center} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();var Bfe=["searchInput"],Vfe=["content"];function zfe(i,t){if(i&1){let e=te();v(0,"div",11),H("click",function(){B(e);let r=I();return V(r.handleClickClearSearchText())}),v(1,"mat-icon",12),M(2,"close"),y()()}}function Ufe(i,t){if(i&1){let e=te();v(0,"paginator",25),H("change",function(r){B(e);let o=I(2);return V(o.handlePaginatorChanged(r))}),y()}if(i&2){let e=I(2);R("pageSize",e.pageSize)("itemsCount",e.resultsCount)}}function Hfe(i,t){if(i&1){let e=te();v(0,"div",26),H("click",function(){let r=B(e).$implicit,o=I(2);return V(o.updateSelectedResultTypes(r))}),v(1,"div",27)(2,"mat-icon"),M(3),y()(),v(4,"div",28),M(5),y()()}if(i&2){let e=t.$implicit;ne("selected",e.selected),w(3),lt(e.matchType),w(2),we(" ",e.label," ")}}function Gfe(i,t){if(i&1&&ee(0,"io-tree",22),i&2){let e=I(2);R("data",e.curSearchResultsData)("rendererId",e.rendererId)("tooltipPosition","right")("showLocator",!1)}}function jfe(i,t){i&1&&(v(0,"div",23),M(1," No matching results "),y())}function Wfe(i,t){if(i&1&&(v(0,"div",13)(1,"div",14)(2,"div",15)(3,"div",16),M(4),y(),W(5,Ufe,1,2,"paginator",17),y(),v(6,"div",18)(7,"div",19),Xt(8,Hfe,6,4,"div",20,wr),y()()(),v(10,"div",21,2),W(12,Gfe,1,4,"io-tree",22)(13,jfe,2,0,"div",23),y(),v(14,"div",24)(15,"mat-icon"),M(16,"tips_and_updates"),y(),M(17," Click to locate node. Alt+Click to locate and select node. "),y()()),i&2){let e=I();an("max-height",e.searchResultsContainerMaxHeight,"px"),w(4),we(" ",e.searchResultsTitle," "),w(),re(e.showPaginator?5:-1),w(3),Qt(e.searchResultTypes),w(4),re(e.resultsCount>0?12:13)}}function $fe(i,t){i&1&&(v(0,"div",29),M(1," No matching results "),y())}function qfe(i,t){i&1&&(v(0,"div",30),M(1," Use regex to match nodes by label, attributes, input/output node label, and input/output metadata. "),ee(2,"br")(3,"br"),M(4," For attributes and I/O metadata, regex will try to match "),v(5,"span",31),M(6),y(),M(7," or "),v(8,"span",31),M(9),y(),M(10,". "),ee(11,"br")(12,"br"),M(13," Examples:"),ee(14,"br"),v(15,"ul")(16,"li")(17,"span",32),M(18,"axis:"),y(),M(19," will match attributes whose key is "),v(20,"span",31),M(21,"axis"),y(),M(22,". "),y(),v(23,"li")(24,"span",32),M(25,"padding=[SAME|VALID]"),y(),M(26," will match attributes whose key is "),v(27,"span",31),M(28,"padding"),y(),M(29," and value is either "),v(30,"span",31),M(31,"SAME"),y(),M(32," or "),v(33,"span",31),M(34,"VALID"),y(),M(35,". "),y()()()),i&2&&(w(6),ed("","{","key","}",":","{","value","}",""),w(3),ed("","{","key","}","=","{","value","}",""))}var W5=(()=>{class i{appService;changeDetectorRef;destroyRef;curModelGraph;rendererId;searchInput;content;curSearchText=new Er("");searchResultTypes=[{matchType:xt.NODE_LABEL,label:"Label",selected:!0},{matchType:xt.ATTRIBUTE,label:"Attrs",selected:!0},{matchType:xt.INPUT_METADATA,label:"Inputs",selected:!0},{matchType:xt.OUTPUT_METADATA,label:"Outputs",selected:!0}];searchResultTypeSelectorOverlaySize={minWidth:0,minHeight:0};searchResultTypeSelectorOverlayPositions=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"}];pageSize;curSearchMatchedNodes=[];curSearchMatchData=[];curSearchResultsData;searching=!1;curPageIndex=0;constructor(e,n,r){this.appService=e,this.changeDetectorRef=n,this.destroyRef=r,this.pageSize=this.appService.testMode?12:50,this.curSearchText.valueChanges.pipe(gn(()=>{this.searching=!0,this.changeDetectorRef.markForCheck()}),Lo(300),fi(this.destroyRef)).subscribe(o=>{this.handleSearch((o?.toLowerCase()||"").trim())}),this.appService.searchKeyClicked.pipe(fi(this.destroyRef)).subscribe(()=>{this.rendererId===this.appService.curSelectedRenderer()?.id&&this.searchInput.nativeElement.focus()})}handleClickClearSearchText(){this.curSearchText.setValue(""),this.handleSearch("")}updateSelectedResultTypes(e){e.selected=!e.selected,this.changeDetectorRef.markForCheck(),this.handleSearch(this.curSearchText.value||""),setTimeout(()=>{this.content.nativeElement.scrollTop=0})}handlePaginatorChanged(e){this.curPageIndex=e,this.updatePagedResults()}getDisableSearchResultTypeOption(e){return this.searchResultTypes.filter(n=>n.selected).length===1&&e.selected}get searchResultsTitle(){let e=this.curSearchMatchedNodes?.length||0;return`${e} result${e===1?"":"s"}`}get showClearButton(){return(this.curSearchText.value||"").trim()!==""}get showResultsPanel(){return!this.searching&&(this.curSearchText.value||"").trim()!==""&&!this.showNoMatches}get showNoMatches(){return!this.searching&&(this.curSearchText.value||"").trim()!==""&&this.curSearchMatchedNodes.length===0&&this.searchResultTypes.every(e=>e.selected)}get resultsCount(){return this.curSearchMatchedNodes.length}get searchResultsContainerMaxHeight(){return document.body.offsetHeight-300}get showPaginator(){return this.resultsCount>this.pageSize}handleSearch(e){if(!e){this.curPageIndex=0,this.curSearchResultsData=void 0,this.curSearchMatchedNodes=[],this.changeDetectorRef.markForCheck(),this.searching=!1,this.appService.clearSearchResults(this.rendererId);return}let n=[],r=[],o={results:{}},s=new Set(this.searchResultTypes.filter(a=>a.selected).map(a=>a.matchType));try{let a=new RegExp(e,"i");for(let l of this.curModelGraph.nodes){if(Et(l)&&l.hideInLayout)continue;let{matches:c,matchTypes:d}=cT(s,a,l,this.curModelGraph);c.length>0&&(n.push(l),r.push({matches:c,matchTypes:d}),o.results[l.id]=c)}this.appService.setSearchResults(this.rendererId,o)}catch(a){console.warn("Failed to search",a)}this.curPageIndex=0,this.curSearchMatchedNodes=[...n],this.curSearchMatchData=r,this.updatePagedResults(),this.searching=!1,this.changeDetectorRef.markForCheck()}updatePagedResults(){this.curSearchResultsData=ul(this.curSearchMatchedNodes.slice(this.curPageIndex*this.pageSize,(this.curPageIndex+1)*this.pageSize),[],"incoming",void 0,this.curSearchMatchData.slice(this.curPageIndex*this.pageSize,(this.curPageIndex+1)*this.pageSize))}static \u0275fac=function(n){return new(n||i)(q(nt),q(Re),q(hi))};static \u0275cmp=oe({type:i,selectors:[["search-bar"]],viewQuery:function(n,r){if(n&1&&(Me(Bfe,5),Me(Vfe,5)),n&2){let o;_e(o=ve())&&(r.searchInput=o.first),_e(o=ve())&&(r.content=o.first)}},inputs:{curModelGraph:"curModelGraph",rendererId:"rendererId"},standalone:!0,features:[se],decls:14,vars:6,consts:[["searchInput",""],["helpPopup",""],["content",""],[1,"container"],[1,"input-container"],[1,"search"],["placeholder","Search nodes/layers by regex",3,"formControl"],["class","btn-clear-container",3,"click",4,"ngIf"],[1,"icon-container",3,"bubble","hoverDelayMs"],["class","search-results-container",3,"max-height",4,"ngIf"],["class","no-matches",4,"ngIf"],[1,"btn-clear-container",3,"click"],[1,"clear"],[1,"search-results-container"],[1,"title-container"],[1,"title"],[1,"title-label"],[3,"pageSize","itemsCount"],[1,"search-result-type-selector-container"],[1,"options-container"],[1,"option-container",3,"selected"],[1,"content"],[3,"data","rendererId","tooltipPosition","showLocator"],[1,"empty-results"],[1,"footer"],[3,"change","pageSize","itemsCount"],[1,"option-container",3,"click"],[1,"icon-container"],[1,"option-label"],[1,"no-matches"],[1,"model-explorer-search-help-popup"],[1,"code"],[1,"code","regex"]],template:function(n,r){if(n&1&&(v(0,"div",3)(1,"div",4)(2,"mat-icon",5),M(3,"search"),y(),ee(4,"input",6,0),W(6,zfe,3,0,"div",7),v(7,"div",8)(8,"mat-icon"),M(9,"help_outline"),y()()(),W(10,Wfe,18,5,"div",9)(11,$fe,2,0,"div",10),y(),W(12,qfe,36,8,"ng-template",null,1,Mt)),n&2){let o=fe(13);w(4),R("formControl",r.curSearchText),w(2),R("ngIf",r.showClearButton),w(),R("bubble",o)("hoverDelayMs",100),w(3),R("ngIf",r.showResultsPanel),w(),R("ngIf",r.showNoMatches)}},dependencies:[Nn,Oe,On,xc,ZC,Je,dt,ma,df,Ir,Xs,Wo,Co],styles:[`.container[_ngcontent-%COMP%]{position:relative;overflow:visible;background-color:#fff;border-radius:99px;height:30px;display:flex;align-items:center;padding:0 8px}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{display:flex;align-items:center;width:250px}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] mat-icon.search[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] mat-icon.clear[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] mat-icon.clear[_ngcontent-%COMP%]{opacity:.6;cursor:pointer}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] mat-icon.clear[_ngcontent-%COMP%]:hover{opacity:.9}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:24px;border:none;outline:none;box-sizing:border-box;padding:0 4px;font-size:12px;flex-grow:1}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .btn-clear-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;color:#999;opacity:.8}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px}.container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]:has(input:focus) mat-icon.search[_ngcontent-%COMP%]{color:#1a73e8}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%]{overflow:hidden;position:absolute;top:calc(100% + 12px);left:-4px;border:1px solid #ccc;border-radius:4px;width:380px;display:flex;flex-direction:column;background-color:#fff;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .title-container[_ngcontent-%COMP%]{background-color:#f6f6f6;border-bottom:1px solid #ddd;box-sizing:border-box;padding:0 10px 10px}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{height:28px;min-height:28px;font-size:12px;display:flex;align-items:center;justify-content:space-between}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .title-label[_ngcontent-%COMP%]{white-space:nowrap}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{flex-grow:1;min-height:0;overflow-y:auto;padding-bottom:6px}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .empty-results[_ngcontent-%COMP%]{padding:12px 8px 6px;display:flex;align-items:center;font-size:12px;color:#ccc}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:12px;margin-top:2px}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .options-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;-webkit-user-select:none;user-select:none;border:1px solid #ccc;padding:4px 14px;border-radius:6px;background-color:#fff;color:#474747}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container.selected[_ngcontent-%COMP%]{border-color:#a3c9ff;background-color:#a3c9ff;color:#001d35}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container.selected[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#001d35}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{width:18px;height:18px;display:flex;align-items:center;justify-content:center;box-sizing:border-box;margin-right:4px}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:#474747}.container[_ngcontent-%COMP%] .search-results-container[_ngcontent-%COMP%] .search-result-type-selector-container[_ngcontent-%COMP%] .option-container[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{font-size:12px;font-family:Google Sans Text,Arial,Helvetica,sans-serif;letter-spacing:normal}.container[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%]{height:32px;min-height:32px;background-color:#f6f6f6;border-top:1px solid #ddd;box-sizing:border-box;padding:0 10px;font-size:12px;display:flex;align-items:center;color:#777}.container[_ngcontent-%COMP%] .footer[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;height:16px;width:16px;color:#777;margin-right:4px}.container[_ngcontent-%COMP%] .no-matches[_ngcontent-%COMP%]{position:absolute;top:calc(100% + 12px);left:-4px;color:#999;padding:8px;border:1px solid #ccc;border-radius:4px;background-color:#fff;font-size:12px;box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a} .model-explorer-search-help-popup{padding:12px;font-size:12px;background-color:#fff} .model-explorer-search-help-popup ul{margin-block-end:0} .model-explorer-search-help-popup .code{display:inline-block;background-color:#fffdd0;font-family:monospace} .model-explorer-search-help-popup .code.regex{background-color:#e6d0ff} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();var Yfe=["dialog"],Xfe=["trigger"];function Qfe(i,t){i&1&&M(0," Maximum state count reached ")}function Zfe(i,t){i&1&&M(0," Save the current graph state ")}function Kfe(i,t){if(i&1&&(v(0,"div",7),W(1,Qfe,1,0)(2,Zfe,1,0),v(3,"div",8),M(4," The saved state can be restored by clicking the corresponding state number. You can save up to 9 states. "),y()()),i&2){let e=I();w(),re(e.disableAddSnapshotButton?1:2)}}function Jfe(i,t){if(i&1){let e=te();v(0,"div",12)(1,"div",13)(2,"div"),M(3),y(),v(4,"div",14),H("click",function(){B(e);let r=I().index,o=I(2);return V(o.handleClickDeleteSnapshot(r))}),v(5,"mat-icon"),M(6,"delete"),y(),M(7," Delete "),y()(),ee(8,"canvas"),y()}if(i&2){let e=I(),n=e.$implicit,r=e.index,o=I(2);w(3),we("Shortcut key: ",r+1,""),w(5),an("width",o.getSnapshotCanvasWidth(n,!0),"px")("height",o.getSnapshotCanvasHeight(n,!0),"px")}}function eme(i,t){if(i&1){let e=te();v(0,"div",11,1),H("opened",function(){let r=B(e).$implicit,o=I(2);return V(o.handleSnapshotPopupOpened(r))})("click",function(){let r=B(e).index,o=I(2);return V(o.handleClickSnapshot(r))}),M(3),W(4,Jfe,9,5,"ng-template",null,2,Mt),y()}if(i&2){let e=t.index,n=fe(5),r=I(2);R("bubble",n)("overlaySize",r.snapshotPopupSize)("overlayPositions",r.snapshotPopupPosition)("hoverDelayMs",150),w(3),we(" ",e+1," ")}}function tme(i,t){if(i&1&&(v(0,"div",9),W(1,eme,6,5,"div",10),y()),i&2){let e=I();w(),R("ngForOf",e.curSnapshots)("ngForTrackBy",e.trackBySnapshotId)}}var nme=new Set(["1","2","3","4","5","6","7","8","9"]),$5=(()=>{class i{appService;changeDetectorRef;paneId;rendererId;snapshotPopups=new Wi;snapshotTriggers=new Wi;helpPopupSize={minWidth:0,minHeight:0,maxWidth:340};snapshotPopupSize={maxWidth:1e3,maxHeight:1e3};snapshotPopupPosition=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top",offsetY:12}];curSnapshots=[];curModelGraph;constructor(e,n){this.appService=e,this.changeDetectorRef=n,ct(()=>{let r=this.appService.getPaneById(this.paneId);this.curModelGraph=r?.modelGraph,r?.modelGraph!=null&&(this.curSnapshots=(r?.snapshots||{})[r.modelGraph.id]||[],this.changeDetectorRef.markForCheck())})}handleKeyboardEvent(e){if(nme.has(e.key)&&this.appService.curSelectedRenderer()?.id===this.rendererId&&!cb()){let n=Number(e.key)-1;if(n<=this.curSnapshots.length-1){this.handleClickSnapshot(n);let r=this.snapshotTriggers.get(n)?.nativeElement;r&&(r.classList.add("clicked"),setTimeout(()=>{r.classList.remove("clicked")},50))}}}handleClickAddSnapshot(){this.disableAddSnapshotButton||this.appService.addSnapshotClicked.next({rendererId:this.rendererId})}handleClickSnapshot(e){let n=this.curSnapshots[e];this.snapshotPopups.get(e)?.closeDialog(),this.appService.curSnapshotToRestore.next({snapshot:n,rendererId:this.rendererId})}handleClickDeleteSnapshot(e){this.curModelGraph&&this.appService.deleteSnapshot(e,this.curModelGraph.id,this.paneId)}handleSnapshotPopupOpened(e){let n=document.querySelector(".model-explorer-snapshot-popup canvas"),r=this.getSnapshotCanvasWidth(e),o=this.getSnapshotCanvasHeight(e);n.width=r,n.height=o;let s=n.getContext("2d");s.imageSmoothingQuality="high",s.drawImage(e.imageBitmap,0,0,r,o),n.classList.add("show")}getSnapshotCanvasWidth(e,n=!1){return e.imageBitmap.width/(n?window.devicePixelRatio:1)}getSnapshotCanvasHeight(e,n=!1){return e.imageBitmap.height/(n?window.devicePixelRatio:1)}trackBySnapshotId(e,n){return n.id}get addSnapshotTooltip(){return this.disableAddSnapshotButton?"Maximum bookmark count reached":"Bookmark the current graph states to restore later"}get disableAddSnapshotButton(){return this.curSnapshots.length>=9}get hasSnapshots(){return this.curSnapshots.length>0}static \u0275fac=function(n){return new(n||i)(q(nt),q(Re))};static \u0275cmp=oe({type:i,selectors:[["snapshot-manager"]],viewQuery:function(n,r){if(n&1&&(Me(Yfe,5),Me(Xfe,5)),n&2){let o;_e(o=ve())&&(r.snapshotPopups=o),_e(o=ve())&&(r.snapshotTriggers=o)}},hostBindings:function(n,r){n&1&&H("keypress",function(s){return r.handleKeyboardEvent(s)},!1,t0)},inputs:{paneId:"paneId",rendererId:"rendererId"},standalone:!0,features:[se],decls:7,vars:6,consts:[["help",""],["dialog","bubble","trigger",""],["snapshotPopup",""],[1,"container"],[1,"mat-icon-container","take-snapshot",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon"],["class","snapshots-container",4,"ngIf"],[1,"model-explorer-help-popup"],[1,"description"],[1,"snapshots-container"],["class","snapshot",3,"bubble","overlaySize","overlayPositions","hoverDelayMs","opened","click",4,"ngFor","ngForOf","ngForTrackBy"],[1,"snapshot",3,"opened","click","bubble","overlaySize","overlayPositions","hoverDelayMs"],[1,"model-explorer-snapshot-popup"],[1,"info-row"],[1,"icon-container","delete",3,"click"]],template:function(n,r){if(n&1){let o=te();v(0,"div",3)(1,"div",4),H("click",function(){return B(o),V(r.handleClickAddSnapshot())}),v(2,"mat-icon",5),M(3,"bookmark_add"),y()(),W(4,Kfe,5,1,"ng-template",null,0,Mt)(6,tme,2,2,"div",6),y()}if(n&2){let o=fe(5);w(),ne("disabled",r.disableAddSnapshotButton),R("bubble",o)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(5),R("ngIf",r.hasSnapshots)}},dependencies:[Nn,Oe,Oi,On,Je,dt,$t],styles:[`.container[_ngcontent-%COMP%]{display:flex;align-items:center;margin-right:3px}.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]{width:24px;height:24px;display:flex;align-items:center;justify-content:center;cursor:pointer}.container[_ngcontent-%COMP%] .mat-icon-container.disabled[_ngcontent-%COMP%]{cursor:default;opacity:.5}.container[_ngcontent-%COMP%] .mat-icon-container.disabled[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]:hover{opacity:.6}.container[_ngcontent-%COMP%] mat-icon.toolbar-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;opacity:.6}.container[_ngcontent-%COMP%] mat-icon.toolbar-icon[_ngcontent-%COMP%]:hover{opacity:.9}.container[_ngcontent-%COMP%] .snapshots-container[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:11px;margin-left:6px;margin-right:6px;gap:2px}.container[_ngcontent-%COMP%] .snapshots-container[_ngcontent-%COMP%] .snapshot[_ngcontent-%COMP%]{width:16px;height:16px;border-radius:8px;background-color:#7cacf8;color:#fff;box-sizing:border-box;display:flex;align-items:center;justify-content:center;font-weight:500;cursor:pointer}.container[_ngcontent-%COMP%] .snapshots-container[_ngcontent-%COMP%] .snapshot[_ngcontent-%COMP%]:hover, .container[_ngcontent-%COMP%] .snapshots-container[_ngcontent-%COMP%] .snapshot.clicked[_ngcontent-%COMP%]{background-color:#0b57d0;color:#fff} .model-explorer-snapshot-popup{font-size:11px;line-height:12px;background-color:#fff} .model-explorer-snapshot-popup .info-row{color:#333;display:flex;align-items:center;justify-content:space-between;background-color:#f6f6f6;padding:4px 8px;border-bottom:1px solid #ddd} .model-explorer-snapshot-popup .info-row .icon-container{display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:.8} .model-explorer-snapshot-popup .info-row .icon-container:hover{opacity:1} .model-explorer-snapshot-popup .info-row .icon-container mat-icon{font-size:18px;width:18px;height:19px} .model-explorer-snapshot-popup canvas{opacity:0;transition:opacity .2s ease-out} .model-explorer-snapshot-popup canvas.show{opacity:1} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();function ime(i,t){i&1&&(v(0,"mat-icon",2),M(1,"chevron_right"),y())}function rme(i,t){if(i&1){let e=te();v(0,"div",1),H("click",function(){let r=B(e).$index,o=I();return V(o.handleClickItem(r))}),M(1),y(),W(2,ime,2,0,"mat-icon",2)}if(i&2){let e=t.$implicit,n=t.$index,r=I();ne("current",n===r.curSubgraphBreadcrumbs.length-1),w(),we(" ",e.graphId," "),w(),re(n!==r.curSubgraphBreadcrumbs.length-1?2:-1)}}var q5=(()=>{class i{appService;changeDetectorRef;paneId;curSubgraphBreadcrumbs=[];savedSubgraphBreadcrumbs;constructor(e,n){this.appService=e,this.changeDetectorRef=n,ct(()=>{let o=this.appService.getPaneById(this.paneId)?.subgraphBreadcrumbs;o!==this.savedSubgraphBreadcrumbs&&(this.savedSubgraphBreadcrumbs=o,this.curSubgraphBreadcrumbs=o||[],this.changeDetectorRef.markForCheck())})}handleClickItem(e){if(e===this.curSubgraphBreadcrumbs.length-1)return;this.appService.setCurrentSubgraphBreadcrumb(this.paneId,e);let n=this.curSubgraphBreadcrumbs[e],r=n.snapshot;if(r)if(n.graphId===this.appService.getPaneById(this.paneId)?.modelGraph?.id)this.appService.curSnapshotToRestore.next({rendererId:this.paneId,snapshot:r});else{let o=this.appService.getGraphById(n.graphId);o&&this.appService.selectGraphInCurrentPane(o,r.flattenLayers,r)}}static \u0275fac=function(n){return new(n||i)(q(nt),q(Re))};static \u0275cmp=oe({type:i,selectors:[["subgraph-breadcrumbs"]],inputs:{paneId:"paneId"},standalone:!0,features:[se],decls:3,vars:0,consts:[[1,"container"],[1,"item",3,"click"],[1,"separator"]],template:function(n,r){n&1&&(v(0,"div",0),Xt(1,rme,3,4,null,null,wr),y()),n&2&&(w(),Qt(r.curSubgraphBreadcrumbs))},dependencies:[Oe,Je,dt,$t],styles:[`.container[_ngcontent-%COMP%]{border:1px solid #3876c7;background-color:#d5e7ff;border-radius:4px;box-sizing:border-box;padding:4px 8px;display:flex;align-items:center;font-size:13px}.container[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]{display:flex;align-items:center;color:#777}.container[_ngcontent-%COMP%] .item[_ngcontent-%COMP%]:hover:not(.current){cursor:pointer;text-decoration:underline}.container[_ngcontent-%COMP%] .item.current[_ngcontent-%COMP%]{color:#000}.container[_ngcontent-%COMP%] .separator[_ngcontent-%COMP%]{color:#999;font-size:16px;width:16px;height:16px;margin:0 3px} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();var Y5=(i,t)=>t.type;function ome(i,t){i&1&&(v(0,"div",7),M(1," Select data to view on nodes / edges "),y())}function sme(i,t){if(i&1){let e=te();v(0,"div",14)(1,"input",15,3),H("keydown.enter",function(){B(e);let r=fe(2);return V(r.blur())})("input",function(){B(e);let r=fe(2),o=I().$implicit,s=I(2);return V(s.setAttrsFilterText(o,r.value))})("change",function(){B(e);let r=I().$implicit,o=I(2);return V(o.handleAttrsFilterChanged(r))}),y(),v(3,"div",16)(4,"mat-icon"),M(5,"help_outline"),y()(),v(6,"div",17),H("click",function(){B(e);let r=fe(2);return V(r.blur())}),v(7,"mat-icon"),M(8,"done"),y()()()}if(i&2){let e=I().$implicit,n=I(2),r=fe(9);w(),R("disabled",!e.selected)("value",n.getAttrsFilterText(e)),w(2),R("bubble",r)("hoverDelayMs",100)}}function ame(i,t){if(i&1){let e=te();v(0,"div",12),H("click",function(){let r=B(e).$implicit,o=I(2);return V(o.handleToggleShowOnNode(r))}),ee(1,"input",13),M(2),y(),W(3,sme,9,4,"div",14)}if(i&2){let e=t.$implicit,n=I(2);w(),R("checked",e.selected),w(),we(" ",e.type," "),w(),re(n.getIsAttrs(e)?3:-1)}}function lme(i,t){if(i&1){let e=te();v(0,"div",12),H("click",function(){let r=B(e).$implicit,o=I(2);return V(o.handleToggleShowOnEdge(r))}),ee(1,"input",13),M(2),y()}if(i&2){let e=t.$implicit;w(),R("checked",e.selected),w(),we(" ",e.type," ")}}function cme(i,t){if(i&1&&(v(0,"div",8)(1,"div",9)(2,"div"),M(3,"View on nodes"),y(),v(4,"div",10)(5,"mat-icon"),M(6,"close"),y()()(),Xt(7,ame,4,3,null,null,Y5),v(9,"div",9)(10,"div"),M(11,"View on edges"),y()(),Xt(12,lme,3,2,"div",11,Y5),y()),i&2){let e=I();w(7),Qt(e.showOnNodeItems),w(5),Qt(e.showOnEdgeItems)}}function dme(i,t){i&1&&(v(0,"div",18),M(1," Use regex to match "),v(2,"span",19),M(3),y(),M(4," or "),v(5,"span",19),M(6),y(),M(7,". "),ee(8,"br")(9,"br"),M(10," Examples:"),ee(11,"br"),v(12,"ul")(13,"li")(14,"span",20),M(15,"axis:"),y(),M(16," will match attributes whose key is "),v(17,"span",19),M(18,"axis"),y(),M(19,". "),y(),v(20,"li")(21,"span",20),M(22,"padding=[SAME|VALID]"),y(),M(23," will match attributes whose key is "),v(24,"span",19),M(25,"padding"),y(),M(26," and value is either "),v(27,"span",19),M(28,"SAME"),y(),M(29," or "),v(30,"span",19),M(31,"VALID"),y(),M(32,". "),y()()()),i&2&&(w(3),ed("","{","key","}",":","{","value","}",""),w(3),ed("","{","key","}","=","{","value","}",""))}var ume=[Bn.OP_NODE_ID,Bn.OP_ATTRS,Bn.OP_INPUTS,Bn.OP_OUTPUTS,Bn.LAYER_NODE_CHILDREN_COUNT,Bn.LAYER_NODE_DESCENDANTS_COUNT,Bn.LAYER_NODE_ATTRS],hme=[Bl.TENSOR_SHAPE],X5=(()=>{class i{appService;changeDetectorRef;localStorageService;nodeDataProviderExtensionService;rendererId;paneId;inPopup=!1;popup;savedShowOnNodeItemTypes;nodeDataProviderRunNames=Ot(()=>{let e=this.appService.getModelGraphFromPane(this.paneId);return(e?Object.values(this.nodeDataProviderExtensionService.getRunsForModelGraph(e)):[]).map(r=>Fa(r,e))});savedNodeDataProviderRunNames=[];savedShowOnEdgeItemTypes;helpPopupSize={minWidth:0,minHeight:0};viewPopupSize={minWidth:280,minHeight:0};showOnNodeItems=[];showOnEdgeItems=[];curOpAttrsFilterText="";curGroupAttrsFilterText="";opened=!1;constructor(e,n,r,o){this.appService=e,this.changeDetectorRef=n,this.localStorageService=r,this.nodeDataProviderExtensionService=o,ct(()=>{let a=this.appService.getPaneById(this.paneId)?.showOnNodeItemTypes||{},l=this.nodeDataProviderRunNames();if(a===this.savedShowOnNodeItemTypes&&JSON.stringify(l)===JSON.stringify(this.savedNodeDataProviderRunNames))return;this.savedNodeDataProviderRunNames=l,this.savedShowOnNodeItemTypes=a;let c=[];for(let d of ume){let u={type:d,selected:(a[this.rendererId]||{})[d]?.selected};c.push(u),d===Bn.OP_ATTRS?(u.filterRegex=(a[this.rendererId]||{})[d]?.filterRegex||"",this.curOpAttrsFilterText=u.filterRegex):d===Bn.LAYER_NODE_ATTRS&&(u.filterRegex=(a[this.rendererId]||{})[d]?.filterRegex||"",this.curGroupAttrsFilterText=u.filterRegex)}for(let d of this.savedNodeDataProviderRunNames){let u=`${ka}${d}`;c.push({type:u,selected:(a[this.rendererId]||{})[u]?.selected})}this.showOnNodeItems=c,this.changeDetectorRef.markForCheck()}),ct(()=>{let a=this.appService.getPaneById(this.paneId)?.showOnEdgeItemTypes||{};if(a===this.savedShowOnEdgeItemTypes)return;this.savedShowOnEdgeItemTypes=a;let l=[];for(let c of hme){let d={type:c,selected:(a[this.rendererId]||{})[c]?.selected};l.push(d)}this.showOnEdgeItems=l,this.changeDetectorRef.markForCheck()})}handleClickOnViewOnNode(e){this.opened&&this.popup.closeDialog()}handleToggleShowOnNode(e){this.appService.toggleShowOnNode(this.paneId,this.rendererId,e.type),this.saveShowOnNodeItemsToLocalStorage()}handleToggleShowOnEdge(e){this.appService.toggleShowOnEdge(this.paneId,this.rendererId,e.type),this.saveShowOnEdgeItemsToLocalStorage()}handleAttrsFilterChanged(e){this.appService.setShowOnNodeFilter(this.paneId,this.rendererId,e.type,this.getAttrsFilterText(e)),this.saveShowOnNodeItemsToLocalStorage()}getAttrsFilterText(e){switch(e.type){case Bn.OP_ATTRS:return this.curOpAttrsFilterText;case Bn.LAYER_NODE_ATTRS:return this.curGroupAttrsFilterText;default:return""}}setAttrsFilterText(e,n){switch(e.type){case Bn.OP_ATTRS:this.curOpAttrsFilterText=n;break;case Bn.LAYER_NODE_ATTRS:this.curGroupAttrsFilterText=n;break;default:break}}getIsAttrs(e){return e.type===Bn.OP_ATTRS||e.type===Bn.LAYER_NODE_ATTRS}saveShowOnNodeItemsToLocalStorage(){if(!this.inPopup&&!this.appService.testMode){let e=this.appService.getShowOnNodeItemTypes(this.paneId,this.rendererId),n=Object.keys(e).filter(r=>r.startsWith(ka));for(let r of n)delete e[r];this.localStorageService.setItem(rb,JSON.stringify(e))}}saveShowOnEdgeItemsToLocalStorage(){if(!this.inPopup&&!this.appService.testMode){let e=this.appService.getShowOnEdgeItemTypes(this.paneId,this.rendererId);this.localStorageService.setItem(ob,JSON.stringify(e))}}static \u0275fac=function(n){return new(n||i)(q(nt),q(Re),q(Mr),q(Rr))};static \u0275cmp=oe({type:i,selectors:[["view-on-node"]],viewQuery:function(n,r){if(n&1&&Me(co,5),n&2){let o;_e(o=ve())&&(r.popup=o.first)}},inputs:{rendererId:"rendererId",paneId:"paneId",inPopup:"inPopup"},standalone:!0,features:[se],decls:10,vars:5,consts:[["help",""],["viewPopup",""],["helpPopup",""],["input",""],[1,"container",3,"bubble","overlaySize","hoverDelayMs"],[1,"mat-icon-container","view",3,"opened","closed","click","bubbleClick","overlaySize"],[1,"toolbar-icon"],[1,"model-explorer-help-popup"],[1,"model-explorer-view-popup"],[1,"label"],["bubbleClose","",1,"icon-container","close"],[1,"show-on-node-item"],[1,"show-on-node-item",3,"click"],["type","checkbox",3,"checked"],[1,"show-on-node-filter"],["placeholder","Filter by regex",1,"input-attrs-filter",3,"keydown.enter","input","change","disabled","value"],[1,"icon-container",3,"bubble","hoverDelayMs"],[1,"icon-container","ok",3,"click"],[1,"model-explorer-view-on-node-help-popup"],[1,"code"],[1,"code","regex"]],template:function(n,r){if(n&1){let o=te();v(0,"div",4)(1,"div",5),H("opened",function(){return B(o),V(r.opened=!0)})("closed",function(){return B(o),V(r.opened=!1)})("click",function(a){return B(o),V(r.handleClickOnViewOnNode(a))}),v(2,"mat-icon",6),M(3,"visibility"),y()()(),W(4,ome,2,0,"ng-template",null,0,Mt)(6,cme,14,0,"ng-template",null,1,Mt)(8,dme,33,8,"ng-template",null,2,Mt)}if(n&2){let o=fe(5),s=fe(7);R("bubble",o)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(),R("bubbleClick",s)("overlaySize",r.viewPopupSize)}},dependencies:[Nn,co,Oe,Je,dt,$t],styles:[`.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]{width:20px;height:20px;display:flex;align-items:center;justify-content:center;cursor:pointer;opacity:.6}.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]:hover{opacity:.9}.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px} .model-explorer-view-popup{padding:10px 12px 12px;font-size:12px;background-color:#fff;display:flex;flex-direction:column} .model-explorer-view-popup .label{font-weight:500;font-size:11px;text-transform:uppercase;letter-spacing:.0727em;margin-bottom:6px;display:flex;align-items:center;justify-content:space-between} .model-explorer-view-popup .label:not(:first-child){margin-top:12px} .model-explorer-view-popup .label .icon-container{cursor:pointer;opacity:.7;display:flex;align-items:center;justify-content:center} .model-explorer-view-popup .label .icon-container:hover{opacity:1} .model-explorer-view-popup .label mat-icon{font-size:20px;width:20px;height:20px;color:#999} .model-explorer-view-popup .show-on-node-item{display:flex;align-items:center;gap:4px;cursor:pointer;color:#555;-webkit-user-select:none;user-select:none} .model-explorer-view-popup .show-on-node-item input{cursor:pointer} .model-explorer-view-popup .show-on-node-filter{margin:1px 0 4px 25px;display:flex;align-items:center;position:relative} .model-explorer-view-popup .show-on-node-filter:focus-within .icon-container.ok{visibility:visible} .model-explorer-view-popup .show-on-node-filter input{flex-grow:1;box-sizing:border-box;border:1px solid #aaa;border-radius:3px;padding:3px 26px 3px 4px;min-width:200px} .model-explorer-view-popup .show-on-node-filter input::placeholder{color:#aaa} .model-explorer-view-popup .show-on-node-filter .icon-container{display:flex;align-items:center;justify-content:center;opacity:.8;cursor:pointer;margin-left:4px} .model-explorer-view-popup .show-on-node-filter .icon-container:hover{opacity:1} .model-explorer-view-popup .show-on-node-filter .icon-container.ok{position:absolute;right:26px;visibility:hidden} .model-explorer-view-popup .show-on-node-filter .icon-container mat-icon{font-size:16px;width:16px;height:16px;color:#999} .model-explorer-view-on-node-help-popup{padding:12px;font-size:12px;background-color:#fff} .model-explorer-view-on-node-help-popup ul{margin-block-end:0} .model-explorer-view-on-node-help-popup .code{display:inline-block;background-color:#fffdd0;font-family:monospace} .model-explorer-view-on-node-help-popup .code.regex{background-color:#e6d0ff} .cdk-overlay-container:has(.model-explorer-view-popup) .cdk-overlay-backdrop{pointer-events:none} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();var pme=["webglRenderer"];function fme(i,t){if(i&1&&(_o(0),ee(1,"search-bar",21)(2,"div",15),vo()),i&2){let e=I(2);w(),R("curModelGraph",e.modelGraph)("rendererId",e.rendererId)}}function mme(i,t){i&1&&(v(0,"div",22),M(1," Zoom to fit "),v(2,"div",23)(3,"mat-icon"),M(4,"keyboard"),y(),M(5," Shortcut: SPACE "),y()())}function gme(i,t){i&1&&(v(0,"div",22),M(1," Expand all layers in the graph "),y())}function _me(i,t){i&1&&(v(0,"div",22),M(1," Collapse all layers in the graph "),y())}function vme(i,t){if(i&1){let e=te();v(0,"div",24),H("click",function(){B(e);let r=I(2);return V(r.handleClickExpandAllLayers())}),v(1,"mat-icon",25),M(2,"unfold_more_double"),y()(),W(3,gme,2,0,"ng-template",null,3,Mt),v(5,"div",26),H("click",function(){B(e);let r=I(2);return V(r.handleClickCollapseAllLayers())}),v(6,"mat-icon",27),M(7,"unfold_less_double"),y()(),W(8,_me,2,0,"ng-template",null,4,Mt),ee(10,"div",15)}if(i&2){let e=fe(4),n=fe(9),r=I(2);ne("disable",r.disableExpandCollapseAllButton),R("bubble",e)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(5),ne("disable",r.disableExpandCollapseAllButton),R("bubble",n)("overlaySize",r.helpPopupSize)("hoverDelayMs",10)}}function yme(i,t){i&1&&(v(0,"div",22),M(1," Flatten all layers in the graph "),v(2,"div",30),M(3," Nodes will be laid out without any layers data "),y()())}function bme(i,t){if(i&1){let e=te();v(0,"div",28),H("click",function(){B(e);let r=I(2);return V(r.handleClickFlattenAllLayers())}),v(1,"mat-icon",29),M(2,"layers_clear"),y()(),ee(3,"div",15),W(4,yme,4,0,"ng-template",null,5,Mt)}if(i&2){let e=fe(5),n=I(2);ne("enabled",n.flattenAllLayers()),R("bubble",e)("overlaySize",n.helpPopupSize)("hoverDelayMs",10)}}function xme(i,t){i&1&&(v(0,"span"),M(1,"Disable inputs/outputs tracing"),y())}function wme(i,t){i&1&&(v(0,"span"),M(1,"Enable inputs/outputs tracing"),y())}function Cme(i,t){if(i&1&&(v(0,"div",22),W(1,xme,2,0,"span")(2,wme,2,0,"span"),v(3,"div",30),M(4," Highlight selected op node's ancestors and descendants and dim the rest "),y()()),i&2){let e=I(2);w(),re(e.tracing?1:2)}}function Sme(i,t){if(i&1&&ee(0,"edge-overlays-dropdown",20),i&2){let e=I(2);R("rendererId",e.rendererId)("paneId",e.paneId)}}function Mme(i,t){i&1&&(v(0,"div",22),M(1," Download graph as PNG "),v(2,"div",30),M(3," The maximum PNG size is limited to 5000 x 5000 "),y()())}function Eme(i,t){if(i&1){let e=te();ee(0,"div",15),v(1,"div",31),H("menuOpened",function(){B(e);let r=I(2);return V(r.disableDownloadPngHelpPopup=!0)})("menuClosed",function(){B(e);let r=I(2);return V(r.disableDownloadPngHelpPopup=!1)}),v(2,"mat-icon",32),M(3," image "),y()(),W(4,Mme,4,0,"ng-template",null,6,Mt),v(6,"mat-menu",33,7)(8,"div",34),H("click",function(){B(e);let r=I(2);return V(r.handleClickDownloadAsPng(!1))}),M(9," Graph in current viewport "),y(),v(10,"div",34),H("click",function(){B(e);let r=I(2);return V(r.handleClickDownloadAsPng(!0))}),M(11," Full graph "),y(),v(12,"div",35),H("click",function(r){B(e);let o=I(2);return V(o.handleClickToggleTransparentPngBackground(r))}),ee(13,"input",36),M(14," Transparent background "),y()()}if(i&2){let e=fe(5),n=fe(7),r=I(2);w(),R("bubble",e)("overlaySize",r.helpPopupSize)("hoverDelayMs",10)("bubbleDisabled",r.disableDownloadPngHelpPopup)("matMenuTriggerFor",n),w(12),R("formControl",r.transparentPngBackground)}}function Ime(i,t){if(i&1&&(_o(0),ee(1,"div",15)(2,"snapshot-manager",20),vo()),i&2){let e=I(2);w(2),R("rendererId",e.rendererId)("paneId",e.paneId)}}function Tme(i,t){if(i&1){let e=te();v(0,"div",12),W(1,fme,3,2,"ng-container",13),ee(2,"view-on-node",14)(3,"div",15),v(4,"div",16),H("click",function(){B(e);let r=I();return V(r.handleClickZoomFitIcon())}),v(5,"mat-icon",17),M(6,"fit_screen"),y()(),ee(7,"div",15),W(8,mme,6,0,"ng-template",null,1,Mt)(10,vme,11,10)(11,bme,6,5),v(12,"div",18),H("click",function(){B(e);let r=I();return V(r.handleClickTrace())}),v(13,"mat-icon",19),M(14," multiple_stop "),y()(),W(15,Cme,5,1,"ng-template",null,2,Mt)(17,Sme,1,2,"edge-overlays-dropdown",20)(18,Eme,15,6)(19,Ime,3,2,"ng-container",13),y()}if(i&2){let e=fe(9),n=fe(16),r=I();ne("in-popup",r.inPopup)("pushed-down",r.showSubgraphBreadcrumbs),w(),R("ngIf",r.showSearchBar),w(),R("rendererId",r.rendererId)("paneId",r.paneId)("inPopup",r.inPopup),w(2),R("bubble",e)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(6),re(r.showExpandCollapseAllLayers?10:-1),w(),re(r.showFlattenLayers?11:-1),w(),ne("enabled",r.tracing),R("bubble",n)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(5),re(r.showEdgeOverlaysDropdown?17:-1),w(),re(r.showDownloadPng?18:-1),w(),R("ngIf",r.showSnapshotManager)}}function Dme(i,t){if(i&1&&ee(0,"subgraph-breadcrumbs",37),i&2){let e=I();R("paneId",e.paneId)}}var tS=(()=>{class i{appService;changeDetectorRef;modelGraph;rendererId;paneId;rootNodeId;inPopup=!1;openInPopupClicked=new Ie;webglRenderer;helpPopupSize={minWidth:0,minHeight:0,maxWidth:340};flattenAllLayers=Ot(()=>this.appService.getFlattenLayers(this.paneId));disableDownloadPngHelpPopup=!1;transparentPngBackground=new Er(!1);curSubgraphBreadcrumbs=[];constructor(e,n){this.appService=e,this.changeDetectorRef=n,ct(()=>{let r=this.appService.getPaneById(this.paneId);this.curSubgraphBreadcrumbs=r?.subgraphBreadcrumbs||[],this.changeDetectorRef.markForCheck()})}handleOpenOnPopupClicked(e){this.openInPopupClicked.emit(e)}handleClickZoomFitIcon(){this.appService.spaceKeyToZoomFitClicked.next({})}handleClickExpandAllLayers(){this.appService.expandOrCollapseAllGraphLayersClicked.next({expandOrCollapse:!0,rendererId:this.rendererId})}handleClickCollapseAllLayers(){this.appService.expandOrCollapseAllGraphLayersClicked.next({expandOrCollapse:!1,rendererId:this.rendererId})}handleClickFlattenAllLayers(){let e=this.appService.getPaneById(this.paneId)?.selectedNodeInfo?.nodeId;e!=null&&wt(this.modelGraph.nodesById[e])&&this.appService.selectNode(this.paneId,void 0),this.appService.toggleFlattenLayers(this.paneId),this.appService.processGraph(this.paneId,this.appService.getFlattenLayers(this.paneId)),this.appService.curInitialUiState.set(void 0)}handleClickDownloadAsPng(e){this.appService.downloadAsPngClicked.next({rendererId:this.rendererId,fullGraph:e,transparentBackground:this.transparentPngBackground.value===!0})}handleClickTrace(){this.webglRenderer?.toggleIoTrace()}handleClickToggleTransparentPngBackground(e){e.stopPropagation(),this.transparentPngBackground.setValue(!this.transparentPngBackground.value)}getActiveSelectedNodeInfo(){return this.webglRenderer?.getActiveSelectedNodeInfo()}get showSearchBar(){return!this.inPopup}get showExpandCollapseAllLayers(){return!this.inPopup}get showFlattenLayers(){return!this.inPopup}get showDownloadPng(){return!this.inPopup}get showSnapshotManager(){return!this.inPopup}get showSubgraphBreadcrumbs(){return!this.inPopup&&this.curSubgraphBreadcrumbs.length>1}get showEdgeOverlaysDropdown(){return!this.inPopup}get disableExpandCollapseAllButton(){return this.appService.getFlattenLayers(this.paneId)}get tracing(){return this.webglRenderer?.tracing===!0}get showToolBar(){return!this.appService.config()?.hideToolBar}get isTestMode(){return this.appService.testMode}static \u0275fac=function(n){return new(n||i)(q(nt),q(Re))};static \u0275cmp=oe({type:i,selectors:[["renderer-wrapper"]],viewQuery:function(n,r){if(n&1&&Me(pme,5),n&2){let o;_e(o=ve())&&(r.webglRenderer=o.first)}},inputs:{modelGraph:"modelGraph",rendererId:"rendererId",paneId:"paneId",rootNodeId:"rootNodeId",inPopup:"inPopup"},outputs:{openInPopupClicked:"openInPopupClicked"},standalone:!0,features:[se],decls:5,vars:7,consts:[["webglRenderer",""],["helpZoomToFit",""],["helpTraceIO",""],["helpExpandAll",""],["helpCollapseAll",""],["helpFlattenLayers",""],["helpDownloadPng",""],["menu","matMenu"],[1,"container"],[3,"openInPopupClicked","modelGraph","rendererId","paneId","rootNodeId","inPopup"],[1,"toolbar",3,"in-popup","pushed-down"],[3,"paneId",4,"ngIf"],[1,"toolbar"],[4,"ngIf"],[3,"rendererId","paneId","inPopup"],[1,"vertical-divider"],[1,"mat-icon-container","zoom-fit",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon"],[1,"mat-icon-container","trace-io",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon","trace"],[3,"rendererId","paneId"],[3,"curModelGraph","rendererId"],[1,"model-explorer-help-popup"],[1,"shortcut"],[1,"mat-icon-container","expand-all",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon","expand-all"],[1,"mat-icon-container","collapse-all",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon","collapse-all"],[1,"mat-icon-container","flatten-layers",3,"click","bubble","overlaySize","hoverDelayMs"],[1,"toolbar-icon","flatten-layers"],[1,"description"],[1,"mat-icon-container","download-png",3,"menuOpened","menuClosed","bubble","overlaySize","hoverDelayMs","bubbleDisabled","matMenuTriggerFor"],[1,"toolbar-icon","download-png"],[1,"model-explorer-download-png-menu"],[1,"menu-item",3,"click"],[1,"transparent-background-toggle",3,"click"],["type","checkbox",3,"formControl"],[3,"paneId"]],template:function(n,r){if(n&1){let o=te();v(0,"div",8)(1,"webgl-renderer",9,0),H("openInPopupClicked",function(a){return B(o),V(r.handleOpenOnPopupClicked(a))}),y(),W(3,Tme,20,21,"div",10)(4,Dme,1,1,"subgraph-breadcrumbs",11),y()}n&2&&(w(),R("modelGraph",r.modelGraph)("rendererId",r.rendererId)("paneId",r.paneId)("rootNodeId",r.rootNodeId)("inPopup",r.inPopup),w(2),re(r.showToolBar?3:-1),w(),R("ngIf",r.showSubgraphBreadcrumbs))},dependencies:[Nn,Oe,On,D5,vn,Je,dt,ca,is,yc,$t,Ir,Wm,Wo,Co,W5,$5,q5,X5,YC],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;overflow:hidden;position:relative}.container[_ngcontent-%COMP%] svg-rednerer[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] webgl-rednerer[_ngcontent-%COMP%]{width:100%;height:100%}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%]{position:absolute;top:8px;left:12px;padding:0 8px 0 6px;box-sizing:border-box;height:40px;display:flex;background-color:#edf2fa;border-radius:99px;align-items:center;outline:2px solid white}.container[_ngcontent-%COMP%] .toolbar.in-popup[_ngcontent-%COMP%]{padding-left:10px}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%]:has(search-bar input:focus){border-color:#1a73e8}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] search-bar[_ngcontent-%COMP%]{margin-right:4px}.container[_ngcontent-%COMP%] .toolbar.pushed-down[_ngcontent-%COMP%]{top:44px}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]{width:24px;height:24px;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] .mat-icon-container.enabled[_ngcontent-%COMP%]{background-color:#ffdeb1;outline:1px solid #ea8600;border-radius:4px}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] .mat-icon-container.disable[_ngcontent-%COMP%]{opacity:.2;pointer-events:none}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;cursor:pointer;opacity:.6}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon[_ngcontent-%COMP%]:hover{opacity:.9}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon.expand-all[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon.collapse-all[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon.flatten-layers[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;border:1px solid transparent}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] mat-icon.toolbar-icon.trace[_ngcontent-%COMP%]{transform:rotate(90deg);border:1px solid transparent}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] .vertical-divider[_ngcontent-%COMP%]{width:1px;border-left:1px solid #d0d0d0;margin:2px 5px;height:20px}.container[_ngcontent-%COMP%] .toolbar[_ngcontent-%COMP%] edge-overlays-dropdown[_ngcontent-%COMP%]{margin-left:4px}.container[_ngcontent-%COMP%] subgraph-breadcrumbs[_ngcontent-%COMP%]{position:absolute;top:8px;left:12px} bubble-container:has(.model-explorer-view-popup){border-top-left-radius:0;border-top-right-radius:0} .model-explorer-download-png-menu .menu-item{letter-spacing:normal!important;font-family:Google Sans Text,Arial,Helvetica,sans-serif!important;font-size:12px;padding:0 8px;cursor:pointer;display:flex;align-items:center} .model-explorer-download-png-menu .menu-item:hover{background-color:#eee} .model-explorer-download-png-menu .transparent-background-toggle{display:flex;align-items:center;font-size:12px;letter-spacing:normal;padding:6px 8px 0 4px;border-top:1px solid #ddd;margin-top:8px;cursor:pointer} .model-explorer-download-png-menu .transparent-background-toggle input{cursor:inherit} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();var Ome=["rendererWrapper"],Pme=400,Rme=400,Ame=26,Q5=(()=>{class i{appService;root;id;paneId;groupNode;initialPosition;curModelGraph;closeClicked=new Ie;rendererWrapper;selected=Ot(()=>this.appService.curSelectedRenderer()?.id===this.rendererWrapper?.rendererId&&this.appService.selectedPaneId()===this.paneId);minimized=!1;savedHeight="";mouseDownListener=e=>{this.rendererWrapper&&(this.appService.curSelectedRenderer.set({id:this.rendererWrapper.rendererId,ownerType:Fl.POPUP}),this.appService.selectNode(this.paneId,this.rendererWrapper.getActiveSelectedNodeInfo()),this.appService.selectPane(this.paneId))};constructor(e,n){this.appService=e,this.root=n}ngOnInit(){this.root.nativeElement.addEventListener("mousedown",this.mouseDownListener,!0);let e=this.root.nativeElement;e.style.left=`${this.initialPosition.x}px`,e.style.top=`${this.initialPosition.y}px`,e.style.width=`${Pme}px`,e.style.height=`${Rme}px`}ngOnDestroy(){this.root.nativeElement.removeEventListener("mousedown",this.mouseDownListener,!0)}toggleMinimize(){this.minimized=!this.minimized,this.minimized?(this.savedHeight=this.root.nativeElement.style.height,this.root.nativeElement.style.height=`${Ame}px`):this.root.nativeElement.style.height=this.savedHeight}handleMouseDown(e){e.stopPropagation(),e.button!==2&&new XC(this.root.nativeElement).drag(e)}handleMouseUp(e){}get title(){return this.groupNode.label}static \u0275fac=function(n){return new(n||i)(q(nt),q(Fe))};static \u0275cmp=oe({type:i,selectors:[["popup-panel"]],viewQuery:function(n,r){if(n&1&&Me(Ome,5),n&2){let o;_e(o=ve())&&(r.rendererWrapper=o.first)}},inputs:{id:"id",paneId:"paneId",groupNode:"groupNode",initialPosition:"initialPosition",curModelGraph:"curModelGraph"},outputs:{closeClicked:"closeClicked"},standalone:!0,features:[se],decls:22,vars:13,consts:[["rendererWrapper",""],[1,"container",3,"mousedown","mouseup"],[1,"title",3,"dblclick"],[1,"label"],[1,"icons-container"],[1,"mat-icon-container","minimize",3,"click"],[1,"mat-icon-container","close",3,"click"],[3,"modelGraph","rendererId","paneId","rootNodeId","inPopup"],[1,"resize-box",3,"mousedown","mouseup"],["data-position","top"],["data-position","bottom"],["data-position","left"],["data-position","right"],["data-position","top-right"],["data-position","top-left"],["data-position","bottom-right"],["data-position","bottom-left"]],template:function(n,r){if(n&1){let o=te();v(0,"div",1),H("mousedown",function(a){return B(o),V(r.handleMouseDown(a))})("mouseup",function(a){return B(o),V(r.handleMouseUp(a))}),v(1,"div",2),H("dblclick",function(){return B(o),V(r.toggleMinimize())}),v(2,"div",3),M(3),y(),v(4,"div",4)(5,"div",5),H("click",function(){return B(o),V(r.toggleMinimize())}),v(6,"mat-icon"),M(7),y()(),v(8,"div",6),H("click",function(){return B(o),V(r.closeClicked.emit(r.id))}),v(9,"mat-icon"),M(10,"close"),y()()()(),ee(11,"renderer-wrapper",7,0),y(),v(13,"div",8),H("mousedown",function(a){return B(o),V(r.handleMouseDown(a))})("mouseup",function(a){return B(o),V(r.handleMouseUp(a))}),ee(14,"div",9)(15,"div",10)(16,"div",11)(17,"div",12)(18,"div",13)(19,"div",14)(20,"div",15)(21,"div",16),y()}n&2&&(ne("selected",r.selected())("minimized",r.minimized),w(3),lt(r.title),w(4),lt(r.minimized?"unfold_more":"unfold_less"),w(4),R("modelGraph",r.curModelGraph)("rendererId",r.id)("paneId",r.paneId)("rootNodeId",r.groupNode.id)("inPopup",!0),w(2),ne("disabled",r.minimized))},dependencies:[Je,dt,tS],styles:[`[_nghost-%COMP%]{position:absolute;-webkit-user-select:none;user-select:none}.container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column;font-size:13px;outline:2px solid transparent;position:relative;background-color:#fff;border-radius:4px;overflow:hidden;border:2px solid #aaa;cursor:pointer}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{height:27px;border-bottom:1px solid #ccc;box-sizing:border-box;background-color:#e7f3ff;display:flex;align-items:center;justify-content:space-between;flex-shrink:0;overflow:hidden;border-top-left-radius:2px;border-top-right-radius:2px;white-space:nowrap}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{flex-grow:1;overflow:hidden;text-overflow:ellipsis;box-sizing:border-box;padding-left:8px;padding-right:4px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]{width:24px;display:flex;align-items:center;justify-content:center;opacity:.6;cursor:pointer}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;font-weight:700;width:16px;height:16px}.container[_ngcontent-%COMP%] renderer-wrapper[_ngcontent-%COMP%]{flex-grow:1;min-height:0}.container.selected[_ngcontent-%COMP%]{box-shadow:0 4px 6px -1px #0000001a,0 2px 4px -2px #0000001a}.container.selected[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{background-color:#ea8600;color:#fff}.container.minimized[_ngcontent-%COMP%] svg-renderer[_ngcontent-%COMP%]{display:none}.resize-box[_ngcontent-%COMP%]{position:absolute;inset:-4px;pointer-events:none;z-index:100}.resize-box.disabled[_ngcontent-%COMP%] [data-position][_ngcontent-%COMP%]{pointer-events:none}.resize-box[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{position:absolute;pointer-events:all;background-color:transparent}.resize-box[_ngcontent-%COMP%] [data-position=top][_ngcontent-%COMP%]{top:0;width:100%;height:8px;cursor:ns-resize}.resize-box[_ngcontent-%COMP%] [data-position=bottom][_ngcontent-%COMP%]{bottom:0;width:100%;height:8px;cursor:ns-resize}.resize-box[_ngcontent-%COMP%] [data-position=left][_ngcontent-%COMP%]{left:0;height:100%;width:8px;cursor:ew-resize}.resize-box[_ngcontent-%COMP%] [data-position=right][_ngcontent-%COMP%]{right:0;height:100%;width:8px;cursor:ew-resize}.resize-box[_ngcontent-%COMP%] [data-position=top-right][_ngcontent-%COMP%]{top:0;right:0;height:8px;width:8px;cursor:nesw-resize}.resize-box[_ngcontent-%COMP%] [data-position=top-left][_ngcontent-%COMP%]{top:0;left:0;height:8px;width:8px;cursor:nwse-resize}.resize-box[_ngcontent-%COMP%] [data-position=bottom-left][_ngcontent-%COMP%]{bottom:0;left:0;height:8px;width:8px;cursor:nesw-resize}.resize-box[_ngcontent-%COMP%] [data-position=bottom-right][_ngcontent-%COMP%]{bottom:0;right:0;height:8px;width:8px;cursor:nwse-resize} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();function Nme(i,t){if(i&1){let e=te();v(0,"button",5),H("click",function(){B(e);let r=I(2);return V(r.handleClickExportToResource())}),v(1,"mat-icon"),M(2,"drive_folder_upload"),y(),M(3," Export to resource "),y()}}function kme(i,t){if(i&1){let e=te();v(0,"div",0)(1,"div",1),M(2," Selection "),y(),v(3,"div",2),M(4),v(5,"div",3),H("click",function(){B(e);let r=I();return V(r.handleClickClear())}),M(6," Clear "),y()(),v(7,"div",4)(8,"button",5),H("click",function(){B(e);let r=I();return V(r.handleClickDownloadSubgraph())}),M(9," Download subgraph "),y(),W(10,Nme,4,0,"button",6),y()()}if(i&2){let e=I();w(4),we(" ",e.selectedNodeCountLabel()," "),w(6),re(e.enableExportToResource?10:-1)}}var Z5=(()=>{class i{appService;subgraphSelectionService;paneId;hasSelectedNodes;selectedNodeCountLabel=Ot(()=>{let e=this.subgraphSelectionService.selectedNodeCount();return`${e} node${e===1?"":"s"}`});constructor(e,n){this.appService=e,this.subgraphSelectionService=n,this.hasSelectedNodes=this.subgraphSelectionService.hasSelectedNodes}handleClickClear(){this.subgraphSelectionService.clearSelection()}handleClickDownloadSubgraph(){let e=this.subgraphSelectionService.getSelectedSubgraph();if(!e)return;let n=document.createElement("a");n.download=`${e.collectionLabel}_subgraph.json`;let r=`data:text/json;charset=utf-8, ${encodeURIComponent(JSON.stringify([e],null,2))}`;dl(n,r),n.click()}handleClickExportToResource(){let e=this.subgraphSelectionService.getSelectedSubgraph();e&&ub(`${e.collectionLabel??""}_subgraph.json`,[e])}get enableExportToResource(){return this.appService.config()?.enableExportToResource===!0}static \u0275fac=function(n){return new(n||i)(q(nt),q(es))};static \u0275cmp=oe({type:i,selectors:[["selection-panel"]],inputs:{paneId:"paneId"},standalone:!0,features:[se],decls:1,vars:1,consts:[[1,"container"],[1,"title"],[1,"content"],[1,"link-clear",3,"click"],[1,"btns-container"],["mat-flat-button","","color","primary",3,"click"],["mat-flat-button","","color","primary"]],template:function(n,r){n&1&&W(0,kme,11,2,"div",0),n&2&&re(r.hasSelectedNodes()?0:-1)},dependencies:[Oe,vn,gi,Je,dt],styles:[`.container[_ngcontent-%COMP%]{font-size:12px;border:2px solid #09b83e;overflow:hidden;border-radius:6px;background-color:#fff}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{padding:6px 8px;background-color:#09b83e;color:#fff;font-weight:500}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{padding:16px 8px 12px;display:flex;align-items:center;justify-content:space-between}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .link-clear[_ngcontent-%COMP%]{text-decoration:underline;color:#00639b;cursor:pointer;opacity:.8;-webkit-user-select:none;user-select:none}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .link-clear[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .btns-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:8px;gap:8px}.container[_ngcontent-%COMP%] .btns-container[_ngcontent-%COMP%] button[_ngcontent-%COMP%]{letter-spacing:normal;width:100%} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();var Lme=["popupPanel"];function Fme(i,t){if(i&1){let e=te();v(0,"renderer-wrapper",5),H("openInPopupClicked",function(r){B(e);let o=I();return V(o.handleOpenOnPopupClicked(r))}),y()}if(i&2){let e=I();R("modelGraph",e.modelGraph)("rendererId",e.rendererId)("paneId",e.paneId)}}function Bme(i,t){if(i&1){let e=te();v(0,"popup-panel",6,0),H("closeClicked",function(r){B(e);let o=I();return V(o.handleClickClosePanel(r))}),y()}if(i&2){let e=t.$implicit,n=I();R("id",e.id)("paneId",n.paneId)("groupNode",e.groupNode)("initialPosition",e.initialPosition)("curModelGraph",e.curModelGraph)}}function Vme(i,t){if(i&1&&ee(0,"legends-panel",4),i&2){let e=I();R("paneId",e.paneId)}}var K5=(()=>{class i{root;appService;changeDetectorRef;subgraphSelectionService;modelGraph;rendererId;paneId;popupPanelComponents=new Wi;popupPanels=[];showRenderer=!0;mouseDownListener=e=>{e.target.closest("popup-panel")==null&&this.appService.curSelectedRenderer.set({id:this.rendererId,ownerType:Fl.GRAPH_PANEL})};resizeObserver;constructor(e,n,r,o){this.root=e,this.appService=n,this.changeDetectorRef=r,this.subgraphSelectionService=o,ct(()=>{let s=this.appService.curSelectedRenderer(),a=this.root.nativeElement.querySelector("popup-panel.top");a&&a.classList.remove("top");let l=this.popupPanelComponents.find(c=>c.rendererWrapper?.rendererId===s?.id);l&&l.root.nativeElement.classList.add("top")})}ngOnInit(){this.root.nativeElement.addEventListener("mousedown",this.mouseDownListener,!0),this.subgraphSelectionService.paneId=this.paneId}ngOnChanges(e){e.modelGraph&&this.modelGraph&&(this.subgraphSelectionService.clearSelection(),this.showRenderer=!1,this.changeDetectorRef.detectChanges(),this.showRenderer=!0,this.changeDetectorRef.detectChanges())}ngAfterViewInit(){let e=this.root.nativeElement;this.resizeObserver=new ResizeObserver(n=>{this.handleResize()}),this.resizeObserver.observe(e)}ngOnDestroy(){this.root.nativeElement.removeEventListener("mousedown",this.mouseDownListener,!0),this.resizeObserver&&this.resizeObserver.unobserve(this.root.nativeElement)}trackByPopupPanelId(e,n){return n.id}handleOpenOnPopupClicked(e){this.popupPanels.push(e)}handleClickClosePanel(e){let n=this.popupPanels.findIndex(r=>r.id===e);n>=0&&this.popupPanels.splice(n,1)}get showLegends(){return!this.appService.config()?.hideLegends}handleResize(){let e=this.root.nativeElement;for(let n of this.popupPanelComponents){let r=n.root.nativeElement;if(!r)continue;let o=Number(r.style.width.replace("px","")),s=Number(r.style.height.replace("px","")),a=Number(r.style.left.replace("px",""))+o,l=Number(r.style.top.replace("px",""))+s;a>e.offsetWidth&&(r.style.left=`${e.offsetWidth-o}px`),l>e.offsetHeight&&(r.style.top=`${e.offsetHeight-s}px`)}}static \u0275fac=function(n){return new(n||i)(q(Fe),q(nt),q(Re),q(es))};static \u0275cmp=oe({type:i,selectors:[["graph-panel"]],viewQuery:function(n,r){if(n&1&&Me(Lme,5),n&2){let o;_e(o=ve())&&(r.popupPanelComponents=o)}},inputs:{modelGraph:"modelGraph",rendererId:"rendererId",paneId:"paneId"},standalone:!0,features:[un,se],decls:5,vars:5,consts:[["popupPanel",""],[1,"container"],[3,"modelGraph","rendererId","paneId","openInPopupClicked",4,"ngIf"],[3,"id","paneId","groupNode","initialPosition","curModelGraph","closeClicked",4,"ngFor","ngForOf","ngForTrackBy"],[3,"paneId"],[3,"openInPopupClicked","modelGraph","rendererId","paneId"],[3,"closeClicked","id","paneId","groupNode","initialPosition","curModelGraph"]],template:function(n,r){n&1&&(v(0,"div",1),W(1,Fme,1,3,"renderer-wrapper",2)(2,Bme,2,5,"popup-panel",3)(3,Vme,1,1,"legends-panel",4),ee(4,"selection-panel",4),y()),n&2&&(w(),R("ngIf",r.showRenderer),w(),R("ngForOf",r.popupPanels)("ngForTrackBy",r.trackByPopupPanelId),w(),re(r.showLegends?3:-1),w(),R("paneId",r.paneId))},dependencies:[Oe,Oi,On,M5,Q5,tS,Z5],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;position:relative;overflow:hidden}.container[_ngcontent-%COMP%] renderer-wrapper[_ngcontent-%COMP%]{width:100%;height:100%}.container[_ngcontent-%COMP%] popup-panel.top[_ngcontent-%COMP%]{z-index:100}.container[_ngcontent-%COMP%] legends-panel[_ngcontent-%COMP%]{position:absolute;left:8px;bottom:8px;border-radius:6px;border:1px solid #ddd;overflow:hidden}.container[_ngcontent-%COMP%] selection-panel[_ngcontent-%COMP%]{position:absolute;right:8px;top:8px;overflow:hidden} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();var zme=["switch"],Ume=["*"];function Hme(i,t){i&1&&(v(0,"span",10),mo(),v(1,"svg",12),ee(2,"path",13),y(),v(3,"svg",14),ee(4,"path",15),y()())}var Gme=new pe("mat-slide-toggle-default-options",{providedIn:"root",factory:()=>({disableToggleValue:!1,hideIcon:!1,disabledInteractive:!1})}),jme={provide:Ba,useExisting:xr(()=>iS),multi:!0},nS=class{constructor(t,e){this.source=t,this.checked=e}},Wme=0,iS=(()=>{class i{_createChangeEvent(e){return new nS(this,e)}get buttonId(){return`${this.id||this._uniqueId}-button`}focus(){this._switchElement.nativeElement.focus()}get checked(){return this._checked}set checked(e){this._checked=e,this._changeDetectorRef.markForCheck()}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(){this._elementRef=S(Fe),this._focusMonitor=S(So),this._changeDetectorRef=S(Re),this.defaults=S(Gme),this._onChange=o=>{},this._onTouched=()=>{},this._validatorOnChange=()=>{},this._checked=!1,this.name=null,this.labelPosition="after",this.ariaLabel=null,this.ariaLabelledby=null,this.disabled=!1,this.disableRipple=!1,this.tabIndex=0,this.change=new Ie,this.toggleChange=new Ie,S(mi).load(ys);let e=S(new zr("tabindex"),{optional:!0}),n=this.defaults,r=S(Kn,{optional:!0});this.tabIndex=e==null?0:parseInt(e)||0,this.color=n.color||"accent",this._noopAnimations=r==="NoopAnimations",this.id=this._uniqueId=`mat-mdc-slide-toggle-${++Wme}`,this.hideIcon=n.hideIcon??!1,this.disabledInteractive=n.disabledInteractive??!1,this._labelId=this._uniqueId+"-label"}ngAfterContentInit(){this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{e==="keyboard"||e==="program"?(this._focused=!0,this._changeDetectorRef.markForCheck()):e||Promise.resolve().then(()=>{this._focused=!1,this._onTouched(),this._changeDetectorRef.markForCheck()})})}ngOnChanges(e){e.required&&this._validatorOnChange()}ngOnDestroy(){this._focusMonitor.stopMonitoring(this._elementRef)}writeValue(e){this.checked=!!e}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}validate(e){return this.required&&e.value!==!0?{required:!0}:null}registerOnValidatorChange(e){this._validatorOnChange=e}setDisabledState(e){this.disabled=e,this._changeDetectorRef.markForCheck()}toggle(){this.checked=!this.checked,this._onChange(this.checked)}_emitChangeEvent(){this._onChange(this.checked),this.change.emit(this._createChangeEvent(this.checked))}_handleClick(){this.disabled||(this.toggleChange.emit(),this.defaults.disableToggleValue||(this.checked=!this.checked,this._onChange(this.checked),this.change.emit(new nS(this,this.checked))))}_getAriaLabelledBy(){return this.ariaLabelledby?this.ariaLabelledby:this.ariaLabel?null:this._labelId}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["mat-slide-toggle"]],viewQuery:function(n,r){if(n&1&&Me(zme,5),n&2){let o;_e(o=ve())&&(r._switchElement=o.first)}},hostAttrs:[1,"mat-mdc-slide-toggle"],hostVars:13,hostBindings:function(n,r){n&2&&(Cr("id",r.id),qe("tabindex",null)("aria-label",null)("name",null)("aria-labelledby",null),Gr(r.color?"mat-"+r.color:""),ne("mat-mdc-slide-toggle-focused",r._focused)("mat-mdc-slide-toggle-checked",r.checked)("_mat-animation-noopable",r._noopAnimations))},inputs:{name:"name",id:"id",labelPosition:"labelPosition",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],required:[2,"required","required",Ye],color:"color",disabled:[2,"disabled","disabled",Ye],disableRipple:[2,"disableRipple","disableRipple",Ye],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:Jn(e)],checked:[2,"checked","checked",Ye],hideIcon:[2,"hideIcon","hideIcon",Ye],disabledInteractive:[2,"disabledInteractive","disabledInteractive",Ye]},outputs:{change:"change",toggleChange:"toggleChange"},exportAs:["matSlideToggle"],standalone:!0,features:[Bt([jme,{provide:vd,useExisting:i,multi:!0}]),nn,un,se],ngContentSelectors:Ume,decls:13,vars:27,consts:[["switch",""],["mat-internal-form-field","",3,"labelPosition"],["role","switch","type","button",1,"mdc-switch",3,"click","tabIndex","disabled"],[1,"mdc-switch__track"],[1,"mdc-switch__handle-track"],[1,"mdc-switch__handle"],[1,"mdc-switch__shadow"],[1,"mdc-elevation-overlay"],[1,"mdc-switch__ripple"],["mat-ripple","",1,"mat-mdc-slide-toggle-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mdc-switch__icons"],[1,"mdc-label",3,"click","for"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--on"],["d","M19.69,5.23L8.96,15.96l-4.23-4.23L2.96,13.5l6,6L21.46,7L19.69,5.23z"],["viewBox","0 0 24 24","aria-hidden","true",1,"mdc-switch__icon","mdc-switch__icon--off"],["d","M20 13H4v-2h16v2z"]],template:function(n,r){if(n&1){let o=te();Dn(),v(0,"div",1)(1,"button",2,0),H("click",function(){return B(o),V(r._handleClick())}),ee(3,"span",3),v(4,"span",4)(5,"span",5)(6,"span",6),ee(7,"span",7),y(),v(8,"span",8),ee(9,"span",9),y(),W(10,Hme,5,0,"span",10),y()()(),v(11,"label",11),H("click",function(a){return B(o),V(a.stopPropagation())}),Wt(12),y()()}if(n&2){let o=fe(2);R("labelPosition",r.labelPosition),w(),ne("mdc-switch--selected",r.checked)("mdc-switch--unselected",!r.checked)("mdc-switch--checked",r.checked)("mdc-switch--disabled",r.disabled)("mat-mdc-slide-toggle-disabled-interactive",r.disabledInteractive),R("tabIndex",r.disabled&&!r.disabledInteractive?-1:r.tabIndex)("disabled",r.disabled&&!r.disabledInteractive),qe("id",r.buttonId)("name",r.name)("aria-label",r.ariaLabel)("aria-labelledby",r._getAriaLabelledBy())("aria-describedby",r.ariaDescribedby)("aria-required",r.required||null)("aria-checked",r.checked)("aria-disabled",r.disabled&&r.disabledInteractive?"true":null),w(8),R("matRippleTrigger",o)("matRippleDisabled",r.disableRipple||r.disabled)("matRippleCentered",!0),w(),re(r.hideIcon?-1:10),w(),R("for",r.buttonId),qe("id",r._labelId)}},dependencies:[Ha,Uh],styles:['.mdc-switch{align-items:center;background:none;border:none;cursor:pointer;display:inline-flex;flex-shrink:0;margin:0;outline:none;overflow:visible;padding:0;position:relative;width:var(--mdc-switch-track-width, 52px)}.mdc-switch.mdc-switch--disabled{cursor:default;pointer-events:none}.mdc-switch.mat-mdc-slide-toggle-disabled-interactive{pointer-events:auto}.mdc-switch__track{overflow:hidden;position:relative;width:100%;height:var(--mdc-switch-track-height, 32px);border-radius:var(--mdc-switch-track-shape, var(--mat-sys-corner-full))}.mdc-switch--disabled.mdc-switch .mdc-switch__track{opacity:var(--mdc-switch-disabled-track-opacity, 0.12)}.mdc-switch__track::before,.mdc-switch__track::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";height:100%;left:0;position:absolute;width:100%;border-width:var(--mat-switch-track-outline-width, 2px);border-color:var(--mat-switch-track-outline-color, var(--mat-sys-outline))}.mdc-switch--selected .mdc-switch__track::before,.mdc-switch--selected .mdc-switch__track::after{border-width:var(--mat-switch-selected-track-outline-width, 2px);border-color:var(--mat-switch-selected-track-outline-color, transparent)}.mdc-switch--disabled .mdc-switch__track::before,.mdc-switch--disabled .mdc-switch__track::after{border-width:var(--mat-switch-disabled-unselected-track-outline-width, 2px);border-color:var(--mat-switch-disabled-unselected-track-outline-color, var(--mat-sys-on-surface))}@media(forced-colors: active){.mdc-switch__track{border-color:currentColor}}.mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0, 0, 0.2, 1);transform:translateX(0);background:var(--mdc-switch-unselected-track-color, var(--mat-sys-surface-variant))}.mdc-switch--selected .mdc-switch__track::before{transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.6, 1);transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch--selected .mdc-switch__track::before{transform:translateX(-100%)}.mdc-switch--selected .mdc-switch__track::before{opacity:var(--mat-switch-hidden-track-opacity, 0);transition:var(--mat-switch-hidden-track-transition, opacity 75ms)}.mdc-switch--unselected .mdc-switch__track::before{opacity:var(--mat-switch-visible-track-opacity, 1);transition:var(--mat-switch-visible-track-transition, opacity 75ms)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-hover-track-color, var(--mat-sys-surface-variant))}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::before{background:var(--mdc-switch-unselected-focus-track-color, var(--mat-sys-surface-variant))}.mdc-switch:enabled:active .mdc-switch__track::before{background:var(--mdc-switch-unselected-pressed-track-color, var(--mat-sys-surface-variant))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__track::before,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__track::before,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__track::before,.mdc-switch.mdc-switch--disabled .mdc-switch__track::before{background:var(--mdc-switch-disabled-unselected-track-color, var(--mat-sys-surface-variant))}.mdc-switch__track::after{transform:translateX(-100%);background:var(--mdc-switch-selected-track-color, var(--mat-sys-primary))}[dir=rtl] .mdc-switch__track::after{transform:translateX(100%)}.mdc-switch--selected .mdc-switch__track::after{transform:translateX(0)}.mdc-switch--selected .mdc-switch__track::after{opacity:var(--mat-switch-visible-track-opacity, 1);transition:var(--mat-switch-visible-track-transition, opacity 75ms)}.mdc-switch--unselected .mdc-switch__track::after{opacity:var(--mat-switch-hidden-track-opacity, 0);transition:var(--mat-switch-hidden-track-transition, opacity 75ms)}.mdc-switch:enabled:hover:not(:focus):not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-hover-track-color, var(--mat-sys-primary))}.mdc-switch:enabled:focus:not(:active) .mdc-switch__track::after{background:var(--mdc-switch-selected-focus-track-color, var(--mat-sys-primary))}.mdc-switch:enabled:active .mdc-switch__track::after{background:var(--mdc-switch-selected-pressed-track-color, var(--mat-sys-primary))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__track::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__track::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__track::after,.mdc-switch.mdc-switch--disabled .mdc-switch__track::after{background:var(--mdc-switch-disabled-selected-track-color, var(--mat-sys-on-surface))}.mdc-switch__handle-track{height:100%;pointer-events:none;position:absolute;top:0;transition:transform 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);left:0;right:auto;transform:translateX(0);width:calc(100% - var(--mdc-switch-handle-width))}[dir=rtl] .mdc-switch__handle-track{left:auto;right:0}.mdc-switch--selected .mdc-switch__handle-track{transform:translateX(100%)}[dir=rtl] .mdc-switch--selected .mdc-switch__handle-track{transform:translateX(-100%)}.mdc-switch__handle{display:flex;pointer-events:auto;position:absolute;top:50%;transform:translateY(-50%);left:0;right:auto;transition:width 75ms cubic-bezier(0.4, 0, 0.2, 1),height 75ms cubic-bezier(0.4, 0, 0.2, 1),margin 75ms cubic-bezier(0.4, 0, 0.2, 1);width:var(--mdc-switch-handle-width);height:var(--mdc-switch-handle-height);border-radius:var(--mdc-switch-handle-shape, var(--mat-sys-corner-full))}[dir=rtl] .mdc-switch__handle{left:auto;right:0}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle{width:var(--mat-switch-unselected-handle-size, 16px);height:var(--mat-switch-unselected-handle-size, 16px);margin:var(--mat-switch-unselected-handle-horizontal-margin, 0 8px)}.mat-mdc-slide-toggle .mdc-switch--unselected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-unselected-with-icon-handle-horizontal-margin, 0 4px)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle{width:var(--mat-switch-selected-handle-size, 24px);height:var(--mat-switch-selected-handle-size, 24px);margin:var(--mat-switch-selected-handle-horizontal-margin, 0 24px)}.mat-mdc-slide-toggle .mdc-switch--selected .mdc-switch__handle:has(.mdc-switch__icons){margin:var(--mat-switch-selected-with-icon-handle-horizontal-margin, 0 24px)}.mat-mdc-slide-toggle .mdc-switch__handle:has(.mdc-switch__icons){width:var(--mat-switch-with-icon-handle-size, 24px);height:var(--mat-switch-with-icon-handle-size, 24px)}.mat-mdc-slide-toggle .mdc-switch:active:not(.mdc-switch--disabled) .mdc-switch__handle{width:var(--mat-switch-pressed-handle-size, 28px);height:var(--mat-switch-pressed-handle-size, 28px)}.mat-mdc-slide-toggle .mdc-switch--selected:active:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-selected-pressed-handle-horizontal-margin, 0 22px)}.mat-mdc-slide-toggle .mdc-switch--unselected:active:not(.mdc-switch--disabled) .mdc-switch__handle{margin:var(--mat-switch-unselected-pressed-handle-horizontal-margin, 0 2px)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-selected-handle-opacity, 1)}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__handle::after{opacity:var(--mat-switch-disabled-unselected-handle-opacity, 0.38)}.mdc-switch__handle::before,.mdc-switch__handle::after{border:1px solid rgba(0,0,0,0);border-radius:inherit;box-sizing:border-box;content:"";width:100%;height:100%;left:0;position:absolute;top:0;transition:background-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1),border-color 75ms 0ms cubic-bezier(0.4, 0, 0.2, 1);z-index:-1}@media(forced-colors: active){.mdc-switch__handle::before,.mdc-switch__handle::after{border-color:currentColor}}.mdc-switch--selected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-selected-handle-color, var(--mat-sys-on-primary))}.mdc-switch--selected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-hover-handle-color, var(--mat-sys-primary-container))}.mdc-switch--selected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-selected-focus-handle-color, var(--mat-sys-primary-container))}.mdc-switch--selected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-selected-pressed-handle-color, var(--mat-sys-primary-container))}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:hover:not(:focus):not(:active) .mdc-switch__handle::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:focus:not(:active) .mdc-switch__handle::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled.mdc-switch--selected:active .mdc-switch__handle::after,.mdc-switch--selected.mdc-switch--disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-selected-handle-color, var(--mat-sys-surface))}.mdc-switch--unselected:enabled .mdc-switch__handle::after{background:var(--mdc-switch-unselected-handle-color, var(--mat-sys-outline))}.mdc-switch--unselected:enabled:hover:not(:focus):not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-hover-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected:enabled:focus:not(:active) .mdc-switch__handle::after{background:var(--mdc-switch-unselected-focus-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected:enabled:active .mdc-switch__handle::after{background:var(--mdc-switch-unselected-pressed-handle-color, var(--mat-sys-on-surface-variant))}.mdc-switch--unselected.mdc-switch--disabled .mdc-switch__handle::after{background:var(--mdc-switch-disabled-unselected-handle-color, var(--mat-sys-on-surface))}.mdc-switch__handle::before{background:var(--mdc-switch-handle-surface-color)}.mdc-switch__shadow{border-radius:inherit;bottom:0;left:0;position:absolute;right:0;top:0}.mdc-switch:enabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-handle-elevation-shadow)}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:hover:not(:focus):not(:active) .mdc-switch__shadow,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:focus:not(:active) .mdc-switch__shadow,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:active .mdc-switch__shadow,.mdc-switch.mdc-switch--disabled .mdc-switch__shadow{box-shadow:var(--mdc-switch-disabled-handle-elevation-shadow)}.mdc-switch__ripple{left:50%;position:absolute;top:50%;transform:translate(-50%, -50%);z-index:-1;width:var(--mdc-switch-state-layer-size, 40px);height:var(--mdc-switch-state-layer-size, 40px)}.mdc-switch__ripple::after{content:"";opacity:0}.mdc-switch--disabled .mdc-switch__ripple::after{display:none}.mat-mdc-slide-toggle-disabled-interactive .mdc-switch__ripple::after{display:block}.mdc-switch:hover .mdc-switch__ripple::after{opacity:.04;transition:75ms opacity cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mdc-switch .mdc-switch__ripple::after{opacity:.12}.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:focus .mdc-switch__ripple::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:active .mdc-switch__ripple::after,.mat-mdc-slide-toggle-disabled-interactive.mdc-switch--disabled:enabled:hover:not(:focus) .mdc-switch__ripple::after,.mdc-switch--unselected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-hover-state-layer-color, var(--mat-sys-on-surface))}.mdc-switch--unselected:enabled:focus .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-focus-state-layer-color, var(--mat-sys-on-surface))}.mdc-switch--unselected:enabled:active .mdc-switch__ripple::after{background:var(--mdc-switch-unselected-pressed-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mdc-switch-unselected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));transition:opacity 75ms linear}.mdc-switch--selected:enabled:hover:not(:focus) .mdc-switch__ripple::after{background:var(--mdc-switch-selected-hover-state-layer-color, var(--mat-sys-primary))}.mdc-switch--selected:enabled:focus .mdc-switch__ripple::after{background:var(--mdc-switch-selected-focus-state-layer-color, var(--mat-sys-primary))}.mdc-switch--selected:enabled:active .mdc-switch__ripple::after{background:var(--mdc-switch-selected-pressed-state-layer-color, var(--mat-sys-primary));opacity:var(--mdc-switch-selected-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity));transition:opacity 75ms linear}.mdc-switch__icons{position:relative;height:100%;width:100%;z-index:1}.mdc-switch--disabled.mdc-switch--unselected .mdc-switch__icons{opacity:var(--mdc-switch-disabled-unselected-icon-opacity, 0.38)}.mdc-switch--disabled.mdc-switch--selected .mdc-switch__icons{opacity:var(--mdc-switch-disabled-selected-icon-opacity, 0.38)}.mdc-switch__icon{bottom:0;left:0;margin:auto;position:absolute;right:0;top:0;opacity:0;transition:opacity 30ms 0ms cubic-bezier(0.4, 0, 1, 1)}.mdc-switch--unselected .mdc-switch__icon{width:var(--mdc-switch-unselected-icon-size, 16px);height:var(--mdc-switch-unselected-icon-size, 16px);fill:var(--mdc-switch-unselected-icon-color, var(--mat-sys-surface-variant))}.mdc-switch--unselected.mdc-switch--disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-unselected-icon-color, var(--mat-sys-surface-variant))}.mdc-switch--selected .mdc-switch__icon{width:var(--mdc-switch-selected-icon-size, 16px);height:var(--mdc-switch-selected-icon-size, 16px);fill:var(--mdc-switch-selected-icon-color, var(--mat-sys-on-primary-container))}.mdc-switch--selected.mdc-switch--disabled .mdc-switch__icon{fill:var(--mdc-switch-disabled-selected-icon-color, var(--mat-sys-on-surface))}.mdc-switch--selected .mdc-switch__icon--on,.mdc-switch--unselected .mdc-switch__icon--off{opacity:1;transition:opacity 45ms 30ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-slide-toggle{-webkit-user-select:none;user-select:none;display:inline-block;-webkit-tap-highlight-color:rgba(0,0,0,0);outline:0}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple,.mat-mdc-slide-toggle .mdc-switch__ripple::after{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:50%;pointer-events:none}.mat-mdc-slide-toggle .mat-mdc-slide-toggle-ripple:not(:empty),.mat-mdc-slide-toggle .mdc-switch__ripple::after:not(:empty){transform:translateZ(0)}.mat-mdc-slide-toggle.mat-mdc-slide-toggle-focused .mat-focus-indicator::before{content:""}.mat-mdc-slide-toggle .mat-internal-form-field{color:var(--mat-switch-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-switch-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-switch-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-switch-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-switch-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-switch-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-slide-toggle .mat-ripple-element{opacity:.12}.mat-mdc-slide-toggle .mat-focus-indicator::before{border-radius:50%}.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle-track,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__icon,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__handle::after,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::before,.mat-mdc-slide-toggle._mat-animation-noopable .mdc-switch__track::after{transition:none}.mat-mdc-slide-toggle .mdc-switch:enabled+.mdc-label{cursor:pointer}.mat-mdc-slide-toggle .mdc-switch--disabled+label{color:var(--mdc-switch-disabled-label-text-color)}'],encapsulation:2,changeDetection:0})}}return i})();var rS=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({imports:[iS,Ht,Ht]})}}return i})();var qme=["container"],Yme=["oneLineText"];function Xme(i,t){if(i&1&&(v(0,"div",8),M(1," Showing at most "),v(2,"span",9),M(3),y()()),i&2){let e=I(2);w(2),R("matTooltipShowDelay",300),w(),we(" ",e.getMaxConstValueCount()," elements ")}}function Qme(i,t){i&1&&(v(0,"div",8),M(1," Showing "),v(2,"span",9),M(3," all elements "),y()()),i&2&&(w(2),R("matTooltipShowDelay",300))}function Zme(i,t){if(i&1&&(W(0,Xme,4,2,"div",8)(1,Qme,4,1,"div",8),v(2,"div",4),M(3),y()),i&2){let e=I();re(e.getMaxConstValueCount()>0?0:e.getMaxConstValueCount()<0?1:-1),w(3),lt(e.text)}}function Kme(i,t){if(i&1&&(v(0,"div",11)(1,"div",12),M(2),y(),v(3,"div",13),M(4),y()()),i&2){let e=t.$implicit,n=t.$index;w(2),lt(n),w(2),lt(e)}}function Jme(i,t){if(i&1&&(v(0,"div",8),M(1," Namespace hierarchy "),y(),v(2,"div",10),Xt(3,Kme,5,2,"div",11,c0),y()),i&2){let e=I();w(3),Qt(e.namespaceComponents)}}function ege(i,t){if(i&1&&(v(0,"div",4),M(1),y()),i&2){let e=I();w(),lt(e.formatQuantization)}}function tge(i,t){if(i&1&&(v(0,"div",5),M(1),y()),i&2){let e=I();w(),lt(e.text)}}var J5=(()=>{class i{appService;changeDetectorRef;text="";type="";bgColor="transparent";textColor="inherit";container;oneLineText;expanded=!1;hasOverflowInternal=!1;resizeObserver;constructor(e,n){this.appService=e,this.changeDetectorRef=n}get hostExpanded(){return this.expanded}ngAfterViewInit(){setTimeout(()=>{this.updateHasOverflow(),this.changeDetectorRef.markForCheck()}),this.container&&(this.resizeObserver=new ResizeObserver(()=>{this.updateHasOverflow(),this.changeDetectorRef.markForCheck()}),this.resizeObserver.observe(this.container.nativeElement))}ngOnChanges(){setTimeout(()=>{this.updateHasOverflow(),this.changeDetectorRef.markForCheck()})}ngOnDestroy(){this.resizeObserver&&this.resizeObserver.disconnect()}handleToggleExpand(e,n=!1){!this.hasOverflow&&!this.hasMultipleLines||(e.stopPropagation(),!(n&&this.expanded)&&(this.expanded=!this.expanded))}getMaxConstValueCount(){return this.appService.config()?.maxConstValueCount??0}get hasOverflow(){return this.updateHasOverflow(),this.hasOverflowInternal}get hasMultipleLines(){return this.type!=="namespace"&&this.text.includes(` +`)}get iconName(){return this.expanded?"unfold_less":"unfold_more"}get hasBgColor(){return this.bgColor!=="transparent"}get namespaceComponents(){let e=this.text.split("/");return this.text!==""&&e.unshift(""),e}get formatQuantization(){return this.text.replace("[","").replace("]","").split(",").map(n=>n.trim()).join(` +`)}updateHasOverflow(){if(!this.oneLineText){this.hasOverflowInternal=!1;return}this.hasOverflowInternal=this.oneLineText.nativeElement.scrollWidth>this.oneLineText.nativeElement.offsetWidth,this.expanded&&(this.type==="namespace"||this.type==="values")&&(this.hasOverflowInternal=!0)}static \u0275fac=function(n){return new(n||i)(q(nt),q(Re))};static \u0275cmp=oe({type:i,selectors:[["expandable-info-text"]],viewQuery:function(n,r){if(n&1&&(Me(qme,5),Me(Yme,5)),n&2){let o;_e(o=ve())&&(r.container=o.first),_e(o=ve())&&(r.oneLineText=o.first)}},hostVars:2,hostBindings:function(n,r){n&2&&ne("expanded",r.hostExpanded)},inputs:{text:"text",type:"type",bgColor:"bgColor",textColor:"textColor"},standalone:!0,features:[un,se],decls:13,vars:15,consts:[["container",""],["oneLineText",""],[1,"container",3,"click"],[1,"expanded-text"],[1,"monospace-content"],[1,"text-content"],[1,"one-line-text"],[1,"icon-container","toggle",3,"click"],[1,"info-msg"],["matTooltip","configurable in Settings in homepage","matTooltipPosition","above",1,"underline",3,"matTooltipShowDelay"],[1,"namespace-content"],[1,"namespace-row"],[1,"index"],[1,"namespace"]],template:function(n,r){if(n&1){let o=te();v(0,"div",2,0),H("click",function(a){return B(o),V(r.handleToggleExpand(a,!0))}),v(2,"div",3),W(3,Zme,4,2,"div",4)(4,Jme,5,0)(5,ege,2,1,"div",4)(6,tge,2,1,"div",5),y(),v(7,"div",6,1),M(9),y(),v(10,"div",7),H("click",function(a){return B(o),V(r.handleToggleExpand(a))}),v(11,"mat-icon"),M(12),y()()()}n&2&&(an("background-color",r.bgColor)("color",r.textColor),ne("has-bg-color",r.hasBgColor)("has-overflow",r.hasOverflow)("has-multiple-lines",r.hasMultipleLines)("expanded",r.expanded),w(3),re(r.type==="values"?3:r.type==="namespace"?4:r.type==="quantization"?5:6),w(6),we(" ",r.text," "),w(3),lt(r.iconName))},dependencies:[Oe,Je,dt,$t,qn],styles:[`[_nghost-%COMP%]{overflow:hidden}.container[_ngcontent-%COMP%]{overflow:hidden;display:flex;align-items:flex-start;position:relative}.container.has-overflow[_ngcontent-%COMP%], .container.has-multiple-lines[_ngcontent-%COMP%]{cursor:pointer}.container.has-overflow[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%], .container.has-multiple-lines[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex}.container.has-overflow[_ngcontent-%COMP%]:hover .icon-container[_ngcontent-%COMP%], .container.has-multiple-lines[_ngcontent-%COMP%]:hover .icon-container[_ngcontent-%COMP%]{opacity:1}.container.has-bg-color[_ngcontent-%COMP%]{border-radius:4px;padding-left:4px}.container.expanded[_ngcontent-%COMP%] .one-line-text[_ngcontent-%COMP%]{position:absolute;inset:0;visibility:hidden}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%]{display:block;flex-grow:1;cursor:text}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .info-msg[_ngcontent-%COMP%]{margin-bottom:2px;color:#999;font-size:12px}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .info-msg[_ngcontent-%COMP%] .underline[_ngcontent-%COMP%]{text-decoration:underline dashed}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .monospace-content[_ngcontent-%COMP%]{font-size:11px;white-space:pre-wrap;font-family:monospace;max-height:500px;overflow:auto}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .text-content[_ngcontent-%COMP%]{white-space:pre-wrap;max-height:500px;overflow:auto}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .namespace-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .namespace-row[_ngcontent-%COMP%]{font-size:12px;line-height:14px;display:flex;align-items:flex-start}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .namespace-row[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{width:16px;color:#999;flex-shrink:0;line-height:14px}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .namespace-row[_ngcontent-%COMP%] .namespace[_ngcontent-%COMP%]{line-height:14px}.container.expanded[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%] .namespace-row[_ngcontent-%COMP%] .namespace.hidden[_ngcontent-%COMP%]{color:#999}.container.expanded[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{background-color:#eee;border:1px solid #999}.container.expanded[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#999}.container[_ngcontent-%COMP%] .one-line-text[_ngcontent-%COMP%]{flex-grow:1;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.container[_ngcontent-%COMP%] .expanded-text[_ngcontent-%COMP%]{display:none}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{width:12px;height:12px;flex-shrink:0;display:none;background-color:#d7f1ff;border-radius:2px;margin-left:2px;cursor:pointer;align-items:center;justify-content:center;border:1px solid #4e90b5;opacity:.75}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#00639b;font-size:11px;width:11px;height:11px;font-weight:700} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();var nge=["container"];function ige(i,t){if(i&1&&(v(0,"div",3),M(1),y()),i&2){let e=I();w(),we(" ",e.label," ")}}var ej=(()=>{class i{changeDetectorRef;label="";container;showPopup=!1;popupSize={minWidth:0,minHeight:0};popupPosition=[{originX:"end",originY:"top",overlayX:"end",overlayY:"top",offsetY:-1}];constructor(e){this.changeDetectorRef=e}ngAfterViewInit(){setTimeout(()=>{let e=this.container.nativeElement;this.showPopup=e.scrollWidth>e.offsetWidth,this.changeDetectorRef.markForCheck()})}static \u0275fac=function(n){return new(n||i)(q(Re))};static \u0275cmp=oe({type:i,selectors:[["hoverable-label"]],viewQuery:function(n,r){if(n&1&&Me(nge,5),n&2){let o;_e(o=ve())&&(r.container=o.first)}},inputs:{label:"label"},standalone:!0,features:[se],decls:5,vars:6,consts:[["container",""],["popup",""],[1,"container",3,"bubble","overlaySize","overlayPositions","hoverDelayMs","bubbleDisabled"],[1,"model-explorer-hoverable-label-popup"]],template:function(n,r){if(n&1&&(v(0,"div",2,0),M(2),y(),W(3,ige,2,1,"ng-template",null,1,Mt)),n&2){let o=fe(4);R("bubble",o)("overlaySize",r.popupSize)("overlayPositions",r.popupPosition)("hoverDelayMs",10)("bubbleDisabled",!r.showPopup),w(2),we(" ",r.label,` +`)}},dependencies:[Nn],styles:["[_nghost-%COMP%]{overflow:hidden}.container[_ngcontent-%COMP%]{overflow:hidden;text-overflow:ellipsis} bubble-container:has(.model-explorer-hoverable-label-popup){width:100%;box-shadow:none;border:1px solid #ccc;border-radius:4px} .model-explorer-hoverable-label-popup{padding:2px;font-size:12px;line-height:12px;background-color:#fff;color:#999;font-family:Google Sans Text,Arial,Helvetica,sans-serif}"],changeDetection:0})}return i})();var uf=(()=>{class i{curSortingRunIndex=-2;curSortingDirection="asc";curChildrenStatSortingColIndex=-2;curChildrenStatSortingDirection="asc";statsTableCollapsed=!1;childrenStatsTableCollapsed=!1;nodeDataTableCollapsed=!1;collapsedSectionNames=new Set;static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac})}return i})();var rge=["paginator"],oge=["childrenStatsPaginator"],nj=i=>({$implicit:i});function sge(i,t){if(i&1&&(v(0,"div",26),M(1),y()),i&2){let e=I().index;w(),lt(e+1)}}function age(i,t){i&1&&ee(0,"mat-spinner",27)}function lge(i,t){if(i&1&&(v(0,"div",28)(1,"mat-icon"),M(2,"error"),y()()),i&2){let e=I().$implicit;R("matTooltip",e.error)("matTooltipDisabled",!e.error)}}function cge(i,t){if(i&1){let e=te();v(0,"div",29),H("click",function(r){B(e);let o=I().$implicit,s=I();return V(s.handleClickToggleVisibility(o,r))}),v(1,"mat-icon"),M(2),y()()}if(i&2){let e=I().$implicit,n=I();ne("selected",n.isRunItemSelected(e))("hide",!e.done),R("matTooltip",n.getVisibleToggleTooltip(e)),w(2),lt(n.getIconName(e))}}function dge(i,t){if(i&1){let e=te();v(0,"div",30),H("click",function(){B(e);let r=I().$implicit,o=I();return V(o.handleClickDelete(r))}),v(1,"mat-icon"),M(2,"delete"),y()()}i&2&&R("matTooltip","Delete")}function uge(i,t){if(i&1&&(v(0,"div",17)(1,"div",18),W(2,sge,2,1,"div",19)(3,age,1,0,"mat-spinner",20),y(),v(4,"div",21),M(5),y(),v(6,"div",22),W(7,lge,3,2,"div",23)(8,cge,3,6,"div",24)(9,dge,3,1,"div",25),y()()),i&2){let e=t.$implicit,n=I();ne("selected",n.isRunItemSelected(e)),w(2),R("ngIf",e.done),w(),R("ngIf",!e.done),w(2),lt(e.runName),w(2),R("ngIf",e.error),w(),R("ngIf",!e.error),w(),R("ngIf",e.done)}}function hge(i,t){if(i&1&&(v(0,"th",37)(1,"div",38)(2,"div",26),M(3),y(),v(4,"div",39),M(5),y()()()),i&2){let e=t.$implicit,n=t.index;ne("hidden",e.hideInAggregatedStatsTable),w(3),lt(n+1),w(2),lt(e.runName)}}function pge(i,t){if(i&1&&(v(0,"td",37),M(1),y()),i&2){let e=t.$implicit,n=t.index,r=I(4);ne("hidden",r.getHideStatsTableCol(n)),w(),we(" ",r.getStatValue(e)," ")}}function fge(i,t){if(i&1&&(v(0,"tr")(1,"td"),M(2),y(),W(3,pge,2,3,"td",35),y()),i&2){let e=t.$implicit;w(2),lt(e.stat),w(),R("ngForOf",e.values)}}function mge(i,t){if(i&1&&(v(0,"table",33)(1,"thead")(2,"tr")(3,"th",34),M(4," Stat "),y(),W(5,hge,6,4,"th",35),y()(),v(6,"tbody"),W(7,fge,4,2,"tr",36),y()()),i&2){let e=I(2);w(5),R("ngForOf",e.runItems),w(2),R("ngForOf",e.curStatRows)("ngForTrackBy",e.trackByStat)}}function gge(i,t){if(i&1){let e=te();v(0,"div",31,2)(2,"div",12)(3,"div",13),H("click",function(){B(e);let r=fe(1),o=I();return V(o.handleToggleExpandCollapseStatsTable(r))}),v(4,"mat-icon"),M(5),y(),M(6),y()(),W(7,mge,8,3,"table",32),y()}if(i&2){let e=I();ne("collapsed",e.statsTableCollapsed),w(5),lt(e.statsTableTitleIcon),w(),we(" ",e.statsTableTitle," "),w(),R("ngIf",e.showResults)}}function _ge(i,t){if(i&1){let e=te();v(0,"paginator",42,4),H("change",function(r){B(e);let o=I(2);return V(o.handleChildrenStatsTablePaginatorChanged(r))}),y()}if(i&2){let e=I(2);R("pageSize",e.tablePageSize)("itemsCount",e.childrenStatRowsCount)}}function vge(i,t){i&1&&nr(0)}function yge(i,t){if(i&1&&(v(0,"mat-icon",48),M(1),y()),i&2){let e=I(3);w(),we(" ",e.curChildrenStatSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function bge(i,t){if(i&1&&(v(0,"mat-icon",48),M(1),y()),i&2){let e=I(3);w(),we(" ",e.curChildrenStatSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function xge(i,t){if(i&1&&(v(0,"mat-icon",48),M(1),y()),i&2){let e=I(4);w(),we(" ",e.curChildrenStatSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function wge(i,t){if(i&1){let e=te();v(0,"th",49),H("click",function(){let r=B(e).$implicit,o=I(3);return V(o.handleClickChildrenStatsHeader(r.colIndex))}),v(1,"div",38)(2,"div",26),M(3),y(),v(4,"div",39),M(5),y(),W(6,xge,2,1,"mat-icon",45),y()()}if(i&2){let e=t.$implicit,n=I(3);ne("hidden",e.hideInChildrenStatsTable),w(3),lt(e.runIndex+1),w(2),lt(e.label),w(),R("ngIf",e.colIndex===n.curChildrenStatSortingColIndex)}}function Cge(i,t){if(i&1&&(v(0,"td",37),M(1),y()),i&2){let e=t.$implicit,n=t.index,r=I().$implicit;ne("hidden",r.colHidden[n]),w(),we(" ",e," ")}}function Sge(i,t){if(i&1){let e=te();v(0,"tr")(1,"td"),M(2),y(),v(3,"td",50),H("click",function(){let r=B(e).$implicit,o=I(3);return V(o.handleClickNodeLabel(r.id))}),M(4),y(),W(5,Cge,2,3,"td",35),y()}if(i&2){let e=t.$implicit;w(2),lt(e.index),w(2),we(" ",e.label," "),w(),R("ngForOf",e.colStrs)}}function Mge(i,t){if(i&1){let e=te();v(0,"table",43)(1,"thead")(2,"tr")(3,"th",44),H("click",function(){B(e);let r=I(2);return V(r.handleClickChildrenStatsHeader(-2))}),v(4,"div",38),M(5," # "),W(6,yge,2,1,"mat-icon",45),y()(),v(7,"th",46),H("click",function(){B(e);let r=I(2);return V(r.handleClickChildrenStatsHeader(-1))}),v(8,"div",38),M(9," Node "),W(10,bge,2,1,"mat-icon",45),y()(),W(11,wge,7,5,"th",47),y()(),v(12,"tbody"),W(13,Sge,6,3,"tr",36),y()()}if(i&2){let e=I(2);w(6),R("ngIf",e.curChildrenStatSortingColIndex===-2),w(4),R("ngIf",e.curChildrenStatSortingColIndex===-1),w(),R("ngForOf",e.childrenStatsCols),w(2),R("ngForOf",e.curPageChildrenStatRows)("ngForTrackBy",e.trackByNodeId)}}function Ege(i,t){if(i&1){let e=te();v(0,"div",40,3)(2,"div",12)(3,"div",13),H("click",function(){B(e);let r=fe(1),o=I();return V(o.handleToggleExpandCollapseChildrenStatsTable(r))}),v(4,"mat-icon"),M(5),y(),M(6),y(),W(7,_ge,2,2,"paginator",14),y(),W(8,vge,1,0,"ng-container",15)(9,Mge,14,5,"table",41),y()}if(i&2){let e=I(),n=fe(16);ne("collapsed",e.childrenStatsTableCollapsed),w(5),lt(e.childrenStatsTableTitleIcon),w(),we(" ",e.childrenStatsTableTitle," "),w(),re(e.childrenStatRowsCount>e.tablePageSize&&!e.childrenStatsTableCollapsed?7:-1),w(),R("ngTemplateOutlet",n)("ngTemplateOutletContext",Pl(8,nj,e.childrenStatsTableNodeFilter)),w(),R("ngIf",e.showResults)}}function Ige(i,t){if(i&1){let e=te();v(0,"paginator",42,5),H("change",function(r){B(e);let o=I();return V(o.handleTablePaginatorChanged(r))}),y()}if(i&2){let e=I();R("pageSize",e.tablePageSize)("itemsCount",e.rowsCount)}}function Tge(i,t){i&1&&nr(0)}function Dge(i,t){if(i&1&&(v(0,"mat-icon",48),M(1),y()),i&2){let e=I(2);w(),we(" ",e.curSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function Oge(i,t){if(i&1&&(v(0,"mat-icon",48),M(1),y()),i&2){let e=I(2);w(),we(" ",e.curSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function Pge(i,t){if(i&1){let e=te();v(0,"div",54),H("click",function(r){B(e);let o=I().$implicit,s=I(2);return V(s.handleClickToggleVisibility(o,r))}),v(1,"mat-icon"),M(2),y()()}if(i&2){let e=I().$implicit,n=I(2);ne("selected",n.isRunItemSelected(e))("hide",!e.done),R("matTooltip",n.getVisibleToggleTooltip(e)),w(2),lt(n.getIconName(e))}}function Rge(i,t){if(i&1&&(v(0,"mat-icon",48),M(1),y()),i&2){let e=I(3);w(),we(" ",e.curSortingDirection==="asc"?"arrow_upward":"arrow_downward"," ")}}function Age(i,t){if(i&1){let e=te();v(0,"th",49),H("click",function(){let r=B(e).index,o=I(2);return V(o.handleClickHeader(r))}),v(1,"div",38)(2,"div",26),M(3),y(),v(4,"div",39),M(5),y(),W(6,Pge,3,6,"div",53)(7,Rge,2,1,"mat-icon",45),y()()}if(i&2){let e=t.$implicit,n=t.index,r=I(2);w(3),lt(n+1),w(2),lt(e.runName),w(),R("ngIf",!e.error),w(),R("ngIf",n===r.curSortingRunIndex)}}function Nge(i,t){if(i&1&&(v(0,"td",37),M(1),y()),i&2){let e=t.$implicit;an("background-color",e.bgColor)("color",e.textColor),w(),we(" ",e.strValue," ")}}function kge(i,t){if(i&1){let e=te();v(0,"tr")(1,"td"),M(2),y(),v(3,"td",50),H("click",function(){let r=B(e).$implicit,o=I(2);return V(o.handleClickNodeLabel(r.id))}),M(4),y(),W(5,Nge,2,5,"td",55),y()}if(i&2){let e=t.$implicit;w(2),lt(e.index),w(),ne("input",e.isInput)("output",e.isOutput),w(),we(" ",e.label," "),w(),R("ngForOf",e.cols)}}function Lge(i,t){if(i&1){let e=te();v(0,"table",51)(1,"thead")(2,"tr")(3,"th",44),H("click",function(){B(e);let r=I();return V(r.handleClickHeader(-2))}),v(4,"div",38),M(5," # "),W(6,Dge,2,1,"mat-icon",45),y()(),v(7,"th",46),H("click",function(){B(e);let r=I();return V(r.handleClickHeader(-1))}),v(8,"div",38),M(9," Node "),W(10,Oge,2,1,"mat-icon",45),y()(),W(11,Age,8,4,"th",52),y()(),v(12,"tbody"),W(13,kge,6,7,"tr",36),y()()}if(i&2){let e=I();w(6),R("ngIf",e.curSortingRunIndex===-2),w(4),R("ngIf",e.curSortingRunIndex===-1),w(),R("ngForOf",e.runItems),w(2),R("ngForOf",e.curPageRows)("ngForTrackBy",e.trackByNodeId)}}function Fge(i,t){if(i&1){let e=te();v(0,"div",60),H("click",function(){B(e);let r=I().$implicit,o=I();return V(o.handleClearStatsTableFilter(r))}),v(1,"mat-icon",61),M(2,"close"),y()()}}function Bge(i,t){if(i&1&&(v(0,"div",56),ee(1,"input",57),v(2,"mat-icon",58),M(3,"filter_alt"),y(),W(4,Fge,3,0,"div",59),y()),i&2){let e=t.$implicit;w(),R("formControl",e),w(3),re(e.value?4:-1)}}var Vge=["Sum %"],ij=(()=>{class i{appService;destroyRef;infoPanelService;nodeDataProviderExtensionService;changeDetectorRef;paneId;rootGroupNodeId;paginator;childrenStatsPaginator;childrenStatsTableNodeFilter=new Er("");resultsTableNodeFilter=new Er("");curRows;curPageRows=[];savedCurRows;curStatRows=[];curChildrenStatRows=[];curPageChildrenStatRows=[];savedChildrenStatRows=[];runItems=[];curSelectedRunId="";orderedNodes=[];childrenStatsCols=[];tablePageSize=50;curModelGraph;prevModelGraph;prevRunsKey="";orderedNodesCache={};constructor(e,n,r,o,s){this.appService=e,this.destroyRef=n,this.infoPanelService=r,this.nodeDataProviderExtensionService=o,this.changeDetectorRef=s;let a=new URLSearchParams(document.location.search);a.has("nodeDataProviderDataSummaryTablePageSize")&&(this.tablePageSize=Number(a.get("nodeDataProviderDataSummaryTablePageSize"))),ct(()=>{let l=this.appService.getPaneById(this.paneId)?.modelGraph;if(!l)return;let c=this.nodeDataProviderExtensionService.getSelectedRunForModelGraph(this.paneId,l);this.curSelectedRunId=c?.runId||"",this.changeDetectorRef.markForCheck()}),ct(()=>{this.curModelGraph=this.appService.getPaneById(this.paneId)?.modelGraph;let l=this.curModelGraph?this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph):[],c=!1,d=!1;this.prevModelGraph!==this.curModelGraph&&(this.prevModelGraph=this.curModelGraph,c=!0);let u=this.getRunsKey(l);if(this.prevRunsKey!==u&&(this.prevRunsKey=u,d=!0),this.curModelGraph&&(c||d)){this.runItems=[];let h=this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph);for(let p of h)this.runItems.push({runId:p.runId,runName:this.getRunName(p),done:p.done,error:p.error,hideInAggregatedStatsTable:(p.nodeDataProviderData??{})[this.curModelGraph.id]?.hideInAggregatedStatsTable});this.changeDetectorRef.markForCheck(),this.infoPanelService.curSortingRunIndex=Math.min(this.infoPanelService.curSortingRunIndex,h.length-1),this.paginator?.reset(),this.genOrderedNodes(),this.populateResultsTable(),this.infoPanelService.curChildrenStatSortingColIndex=Math.min(this.infoPanelService.curChildrenStatSortingColIndex,this.childrenStatsCols.length-1),this.childrenStatsPaginator?.reset()}}),this.childrenStatsTableNodeFilter.valueChanges.pipe(Lo(150),fi(this.destroyRef)).subscribe(l=>{this.handleChildrenStatsTableFilterChanged()}),this.resultsTableNodeFilter.valueChanges.pipe(Lo(150),fi(this.destroyRef)).subscribe(l=>{this.handleResultsTableFilterChanged()})}ngOnChanges(e){e.rootGroupNodeId&&(this.paginator?.reset(),this.childrenStatsPaginator?.reset(),this.genOrderedNodes(),this.populateResultsTable())}getIconName(e){return this.isRunItemSelected(e)?"visibility":"visibility_off"}getVisibleToggleTooltip(e){return this.isRunItemSelected(e)?"Visualizing in graph":"Click to visualize in graph"}isRunItemSelected(e){return e.runId===this.curSelectedRunId}handleChildrenStatsTablePaginatorChanged(e){this.curPageChildrenStatRows=this.curChildrenStatRows.slice(e*this.tablePageSize,(e+1)*this.tablePageSize),this.changeDetectorRef.markForCheck()}handleTablePaginatorChanged(e){this.curRows==null?this.curPageRows=[]:this.curPageRows=this.curRows.slice(e*this.tablePageSize,(e+1)*this.tablePageSize),this.changeDetectorRef.markForCheck()}handleClickHeader(e){this.infoPanelService.curSortingRunIndex===e?this.infoPanelService.curSortingDirection=this.nextSortingDirection(this.curSortingDirection):this.infoPanelService.curSortingDirection=e<0?"asc":"desc",this.infoPanelService.curSortingRunIndex=e,this.sortAndFiltertRows(),this.paginator?.reset(),this.handleTablePaginatorChanged(0)}handleClickChildrenStatsHeader(e){this.infoPanelService.curChildrenStatSortingColIndex===e?this.infoPanelService.curChildrenStatSortingDirection=this.nextSortingDirection(this.infoPanelService.curChildrenStatSortingDirection):this.infoPanelService.curChildrenStatSortingDirection=e<0?"asc":"desc",this.infoPanelService.curChildrenStatSortingColIndex=e,this.sortAndFilterChildrenStatsRows(),this.childrenStatsPaginator?.reset(),this.handleChildrenStatsTablePaginatorChanged(0)}handleClickToggleVisibility(e,n){n.stopPropagation(),!this.isRunItemSelected(e)&&this.appService.setSelectedNodeDataProviderRunId(this.paneId,e.runId)}handleClickDelete(e){this.curModelGraph&&(this.nodeDataProviderExtensionService.deleteRun(e.runId),this.appService.deleteShowOnNodeItemType([`${ka}${e.runName}`]))}handleClickNodeLabel(e){this.appService.curToLocateNodeInfo.set({nodeId:e,rendererId:this.paneId,isGroupNode:!1})}handleToggleExpandCollapseStatsTable(e){this.infoPanelService.statsTableCollapsed?e.style.maxHeight=`${e.scrollHeight}px`:e.style.maxHeight=`${e.offsetHeight}px`,this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.infoPanelService.statsTableCollapsed=!this.infoPanelService.statsTableCollapsed,this.changeDetectorRef.markForCheck(),this.infoPanelService.statsTableCollapsed||setTimeout(()=>{e.style.maxHeight="fit-content"},150)})}handleToggleExpandCollapseChildrenStatsTable(e){this.infoPanelService.childrenStatsTableCollapsed?e.style.maxHeight=`${e.scrollHeight}px`:e.style.maxHeight=`${e.offsetHeight}px`,this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.infoPanelService.childrenStatsTableCollapsed=!this.infoPanelService.childrenStatsTableCollapsed,this.changeDetectorRef.markForCheck(),this.infoPanelService.childrenStatsTableCollapsed||setTimeout(()=>{e.style.maxHeight="fit-content"},150)})}handleToggleExpandCollapseNodeDataTable(e){this.infoPanelService.nodeDataTableCollapsed?e.style.maxHeight=`${e.scrollHeight}px`:e.style.maxHeight=`${e.offsetHeight}px`,this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.infoPanelService.nodeDataTableCollapsed=!this.infoPanelService.nodeDataTableCollapsed,this.changeDetectorRef.markForCheck(),this.infoPanelService.nodeDataTableCollapsed||setTimeout(()=>{e.style.maxHeight="fit-content"},150)})}handleChildrenStatsTableFilterChanged(){this.childrenStatsPaginator?.reset(),this.sortAndFilterChildrenStatsRows(),this.handleChildrenStatsTablePaginatorChanged(0)}handleResultsTableFilterChanged(){this.paginator?.reset(),this.sortAndFiltertRows(),this.handleTablePaginatorChanged(0)}handleClearStatsTableFilter(e){e===this.childrenStatsTableNodeFilter?this.childrenStatsPaginator?.reset():e===this.resultsTableNodeFilter&&this.paginator?.reset(),e.reset()}getStatValue(e){return e===Number.POSITIVE_INFINITY||e===Number.NEGATIVE_INFINITY||isNaN(e)?"-":`${e}`}getHideStatsTableCol(e){return this.runItems[e]?.hideInAggregatedStatsTable===!0}trackByRunId(e,n){return n.runId}trackByNodeId(e,n){return n.id}trackByStat(e,n){return n.stat}get showResults(){return this.runItems.some(e=>e.done)}get rowsCount(){return this.curRows==null?0:this.curRows.length}get childrenStatRowsCount(){return this.curChildrenStatRows.length}get statsTableTitleIcon(){return this.statsTableCollapsed?"arrow_right":"arrow_drop_down"}get statsTableTitle(){return this.rootGroupNodeId==null?"Aggregated stats":"Aggregated stats in selected layer"}get statsTableCollapsed(){return this.infoPanelService.statsTableCollapsed}get childrenStatsTableTitleIcon(){return this.childrenStatsTableCollapsed?"arrow_right":"arrow_drop_down"}get childrenStatsTableTitle(){return this.rootGroupNodeId==null?"Root-level nodes stats":"Child nodes stats in selected layer"}get childrenStatsTableCollapsed(){return this.infoPanelService.childrenStatsTableCollapsed}get nodeDataTableTitleIcon(){return this.nodeDataTableCollapsed?"arrow_right":"arrow_drop_down"}get nodeDataTableTitle(){return this.rootGroupNodeId==null?"Node data":"Node data in selected layer"}get nodeDataTableCollapsed(){return this.infoPanelService.nodeDataTableCollapsed}get curSortingDirection(){return this.infoPanelService.curSortingDirection}get curSortingRunIndex(){return this.infoPanelService.curSortingRunIndex}get curChildrenStatSortingDirection(){return this.infoPanelService.curChildrenStatSortingDirection}get curChildrenStatSortingColIndex(){return this.infoPanelService.curChildrenStatSortingColIndex}get showStatsTable(){if(!this.curModelGraph)return!1;let e=this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph),n=!0;for(let r of e){if(!r.nodeDataProviderData)continue;if(!r.nodeDataProviderData[this.curModelGraph.id].hideInAggregatedStatsTable){n=!1;break}}return!n}get showChildrenStatsTable(){if(!this.curModelGraph)return!1;let e=this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph),n=!0;for(let r of e){if(!r.nodeDataProviderData)continue;if(!r.nodeDataProviderData[this.curModelGraph.id].hideInChildrenStatsTable){n=!1;break}}return!n}genOrderedNodes(){if(!this.curModelGraph)return;let e=this.getOrderedNodesCacheKey(),n=this.orderedNodesCache[e];if(n!=null)this.orderedNodes=n;else{let r=this.rootGroupNodeId==null?void 0:this.curModelGraph.nodesById[this.rootGroupNodeId],o=new Set;r!=null&&(o=new Set(r.descendantsOpNodeIds||[])),this.orderedNodes=this.curModelGraph.nodes.filter(s=>Et(s)&&!s.hideInLayout&&s.id!=="GraphInputs"&&s.id!=="GraphOutputs"&&(r==null||o.has(s.id))),this.orderedNodesCache[e]=this.orderedNodes}}populateResultsTable(){if(!this.curModelGraph||this.orderedNodes.length===0)return;let e=this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph);this.curStatRows=[{stat:"Min",values:[]},{stat:"Max",values:[]},{stat:"Sum",values:[]},{stat:"Avg",values:[]}];let n=[];for(let a=0;am.sourceNodeId==="GraphInputs"),p=l.outgoingEdges||[],f=p.length===0||p.some(m=>m.targetNodeId==="GraphOutputs");this.curRows.push({id:c,index:a,isInput:h,isOutput:f,label:this.curModelGraph.nodesById[c].label||"?",cols:d})}this.savedCurRows=[...this.curRows],this.sortAndFiltertRows(),this.handleTablePaginatorChanged(0),this.curStatRows[0].values=n.map(a=>a.min),this.curStatRows[1].values=n.map(a=>a.max),this.curStatRows[2].values=n.map(a=>a.sum),this.curStatRows[3].values=n.map(a=>a.sum/a.count);let r=["min","max","sum","avg"];for(let a=0;aa.id);for(let a=0;an.test(r.label))}catch{return}this.curRows.sort((n,r)=>{let o=this.getCellValue(n,this.infoPanelService.curSortingRunIndex),s=this.getCellValue(r,this.infoPanelService.curSortingRunIndex);return this.compareValue(o,s,this.infoPanelService.curSortingDirection)})}sortAndFilterChildrenStatsRows(){this.curChildrenStatRows=[...this.savedChildrenStatRows||[]];let e=(this.childrenStatsTableNodeFilter.value||"").trim();if(e!=="")try{let n=new RegExp(e,"i");this.curChildrenStatRows=this.curChildrenStatRows.filter(r=>n.test(r.label))}catch{return}this.curChildrenStatRows.sort((n,r)=>{let o=this.getChildrenStatsColValue(n,this.infoPanelService.curChildrenStatSortingColIndex),s=this.getChildrenStatsColValue(r,this.infoPanelService.curChildrenStatSortingColIndex);return this.compareValue(o,s,this.infoPanelService.curChildrenStatSortingDirection)})}compareValue(e,n,r){if(e==null&&n==null)return 0;if(e==null&&n!=null)return r==="asc"?-1:1;if(e!=null&&n==null)return r==="asc"?1:-1;if(typeof e=="number"&&typeof n=="number")return r==="asc"?e-n:n-e;{let o=JSON.stringify(e),s=JSON.stringify(n);return r==="asc"?o.localeCompare(s):s.localeCompare(o)}}getCellValue(e,n){switch(n){case-2:return e.index;case-1:return e.label;default:return e.cols[n].value}}getChildrenStatsColValue(e,n){switch(n){case-2:return e.index;case-1:return e.label;default:return e.colValues[n]}}getOrderedNodesCacheKey(){return`${this.curModelGraph?.collectionLabel}___${this.curModelGraph?.id}___${this.rootGroupNodeId}`}getRunsKey(e){return e.map(n=>{let r=[];r.push(n.runId),r.push(String(n.done));let o=n.results||{};return r.push(String(Object.keys(o).length)),r.join("__")}).join(",")}getRunName(e){return Fa(e,this.curModelGraph)}static \u0275fac=function(n){return new(n||i)(q(nt),q(hi),q(uf),q(Rr),q(Re))};static \u0275cmp=oe({type:i,selectors:[["node-data-provider-summary-panel"]],viewQuery:function(n,r){if(n&1&&(Me(rge,5),Me(oge,5)),n&2){let o;_e(o=ve())&&(r.paginator=o.first),_e(o=ve())&&(r.childrenStatsPaginator=o.first)}},inputs:{paneId:"paneId",rootGroupNodeId:"rootGroupNodeId"},standalone:!0,features:[un,se],decls:17,vars:14,consts:[["nodeDataTableContainer",""],["nodeFilter",""],["statsTableContainer",""],["childrenStatsTableContainer",""],["childrenStatsPaginator",""],["paginator",""],[1,"container"],[1,"index-container"],["class","index-row",3,"selected",4,"ngFor","ngForOf","ngForTrackBy"],[1,"table-container",3,"collapsed"],[1,"table-container","children-stats",3,"collapsed"],[1,"table-container","results"],[1,"table-title-container"],[1,"title-label-container",3,"click"],[3,"pageSize","itemsCount"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],["class","results","border","0","cellspacing","0","cellpadding","0",4,"ngIf"],[1,"index-row"],[1,"index-number-container"],["class","index-number",4,"ngIf"],["color","primary","diameter","16",4,"ngIf"],[1,"run-name"],[1,"action-icons-container"],["class","error",3,"matTooltip","matTooltipDisabled",4,"ngIf"],["class","icon-container visibility",3,"selected","hide","matTooltip","click",4,"ngIf"],["class","icon-container action",3,"matTooltip","click",4,"ngIf"],[1,"index-number"],["color","primary","diameter","16"],[1,"error",3,"matTooltip","matTooltipDisabled"],[1,"icon-container","visibility",3,"click","matTooltip"],[1,"icon-container","action",3,"click","matTooltip"],[1,"table-container"],["border","0","cellspacing","0","cellpadding","0",4,"ngIf"],["border","0","cellspacing","0","cellpadding","0"],[1,"stats"],["class","value-col",3,"hidden",4,"ngFor","ngForOf"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"value-col"],[1,"header-content"],[1,"stat-label"],[1,"table-container","children-stats"],["class","children-stats-results","border","0","cellspacing","0","cellpadding","0",4,"ngIf"],[3,"change","pageSize","itemsCount"],["border","0","cellspacing","0","cellpadding","0",1,"children-stats-results"],[1,"index",3,"click"],["class","sort",4,"ngIf"],[1,"header","node-label",3,"click"],["class","value-col",3,"hidden","click",4,"ngFor","ngForOf"],[1,"sort"],[1,"value-col",3,"click"],[1,"node-label",3,"click"],["border","0","cellspacing","0","cellpadding","0",1,"results"],["class","value-col",3,"click",4,"ngFor","ngForOf"],["class","icon-container visibility","matTooltipPosition","above",3,"selected","hide","matTooltip","click",4,"ngIf"],["matTooltipPosition","above",1,"icon-container","visibility",3,"click","matTooltip"],["class","value-col",3,"background-color","color",4,"ngFor","ngForOf"],[1,"node-filter"],["placeholder","regex to filter nodes",3,"formControl"],[1,"filter"],[1,"clear-container"],[1,"clear-container",3,"click"],[1,"clear"]],template:function(n,r){if(n&1){let o=te();v(0,"div",6)(1,"div",7),W(2,uge,10,8,"div",8),y(),W(3,gge,8,5,"div",9)(4,Ege,10,10,"div",10),v(5,"div",11,0)(7,"div",12)(8,"div",13),H("click",function(){B(o);let a=fe(6);return V(r.handleToggleExpandCollapseNodeDataTable(a))}),v(9,"mat-icon"),M(10),y(),M(11),y(),W(12,Ige,2,2,"paginator",14),y(),W(13,Tge,1,0,"ng-container",15)(14,Lge,14,5,"table",16),y()(),W(15,Bge,5,2,"ng-template",null,1,Mt)}if(n&2){let o=fe(16);w(2),R("ngForOf",r.runItems)("ngForTrackBy",r.trackByRunId),w(),re(r.showStatsTable?3:-1),w(),re(r.showChildrenStatsTable?4:-1),w(),ne("collapsed",r.nodeDataTableCollapsed),w(5),lt(r.nodeDataTableTitleIcon),w(),we(" ",r.nodeDataTableTitle," "),w(),re(r.rowsCount>r.tablePageSize&&!r.nodeDataTableCollapsed?12:-1),w(),R("ngTemplateOutlet",o)("ngTemplateOutletContext",Pl(12,nj,r.resultsTableNodeFilter)),w(),R("ngIf",r.showResults)}},dependencies:[Oe,Oi,On,Gs,Je,dt,lo,pa,$t,qn,df,Ir,Xs,Wo,Co],styles:[`.container[_ngcontent-%COMP%]{padding-top:12px;box-sizing:border-box;display:flex;flex-direction:column;height:100%}.container[_ngcontent-%COMP%] .index-number[_ngcontent-%COMP%]{font-size:10px;width:16px;height:16px;border-radius:8px;box-sizing:border-box;border:1px solid #999;background-color:#eee;display:flex;align-items:center;justify-content:center;flex-shrink:0}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%]{margin-bottom:4px;position:relative}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:100%;border:1px solid #ccc;padding:3px 4px 3px 19px;border-radius:4px;box-sizing:border-box}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:12px;width:12px;height:12px;color:#999}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%] mat-icon.filter[_ngcontent-%COMP%]{position:absolute;top:6px;left:3px}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%] .clear-container[_ngcontent-%COMP%]{position:absolute;top:6px;right:3px;cursor:pointer;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .node-filter[_ngcontent-%COMP%] .clear-container[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{color:#555}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;width:16px;height:16px;opacity:.3;cursor:pointer}.container[_ngcontent-%COMP%] .icon-container.selected[_ngcontent-%COMP%]{opacity:1;cursor:default}.container[_ngcontent-%COMP%] .icon-container.selected[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#e1a011}.container[_ngcontent-%COMP%] .icon-container.hide[_ngcontent-%COMP%]{visibility:hidden}.container[_ngcontent-%COMP%] .icon-container.action[_ngcontent-%COMP%]{opacity:.7;margin-left:4px}.container[_ngcontent-%COMP%] .icon-container.action[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .icon-container.visibility[_ngcontent-%COMP%]{margin-left:4px}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;line-height:16px;color:#000}.container[_ngcontent-%COMP%] .index-container[_ngcontent-%COMP%] .index-row[_ngcontent-%COMP%]{display:flex;align-items:center;overflow:hidden;padding:2px 8px}.container[_ngcontent-%COMP%] .index-container[_ngcontent-%COMP%] .index-row.selected[_ngcontent-%COMP%]{background-color:#fff2d5}.container[_ngcontent-%COMP%] .index-container[_ngcontent-%COMP%] .index-row[_ngcontent-%COMP%] .index-number-container[_ngcontent-%COMP%]{width:16px;height:16px;flex-shrink:0;display:flex;align-items:center;justify-content:center;margin-right:6px}.container[_ngcontent-%COMP%] .index-container[_ngcontent-%COMP%] .index-row[_ngcontent-%COMP%] .run-name[_ngcontent-%COMP%]{flex-grow:1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.container[_ngcontent-%COMP%] .index-container[_ngcontent-%COMP%] .index-row[_ngcontent-%COMP%] .action-icons-container[_ngcontent-%COMP%]{display:flex;align-items:center;flex-shrink:0}.container[_ngcontent-%COMP%] select[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%] .running[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:16px}.container[_ngcontent-%COMP%] .running[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{margin-right:4px}.container[_ngcontent-%COMP%] .running[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{color:#777}.container[_ngcontent-%COMP%] .error[_ngcontent-%COMP%]{width:16px;height:16px}.container[_ngcontent-%COMP%] .error[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;height:16px;width:16px;color:#a00}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:8px;margin-top:2px;display:flex;flex-direction:column;transition:max-height .15s ease-out;overflow:hidden}.container[_ngcontent-%COMP%] .table-container.collapsed[_ngcontent-%COMP%]{max-height:30px!important}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .table-title-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;line-height:22px}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .table-title-container[_ngcontent-%COMP%] .title-label-container[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;line-height:15px}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] .table-title-container[_ngcontent-%COMP%] .title-label-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-left:-4px}.container[_ngcontent-%COMP%] .table-container[_ngcontent-%COMP%] paginator[_ngcontent-%COMP%]{align-self:flex-end}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{border:1px solid #ccc;border-radius:4px;width:100%;box-sizing:border-box;-webkit-user-select:none;user-select:none;background-color:#fdfdfd;overflow:hidden}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{height:24px;background-color:#f2f2f2;font-size:11px}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%]{font-size:11px;font-family:Arial,Helvetica,sans-serif}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover{outline:1px solid #999}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{padding:1px 4px;text-align:left}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.node-label[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th.node-label[_ngcontent-%COMP%]{border-left:1px solid #ddd}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.value-col[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th.value-col[_ngcontent-%COMP%]{border-left:1px solid #ddd;max-width:80px;text-overflow:ellipsis;overflow:hidden}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;font-size:11px}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%] mat-icon.sort[_ngcontent-%COMP%]{font-size:12px;width:12px;height:12px;color:#999;margin-left:4px;flex-shrink:0}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .header-content[_ngcontent-%COMP%] .stat-label[_ngcontent-%COMP%]{margin-left:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.node-label[_ngcontent-%COMP%]{cursor:pointer}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.node-label[_ngcontent-%COMP%]:hover{text-decoration:underline dotted #0085f2}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.input[_ngcontent-%COMP%]{color:#009e73;font-weight:500}.container[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td.output[_ngcontent-%COMP%]{color:#d55e00;font-weight:500}.container[_ngcontent-%COMP%] .hidden[_ngcontent-%COMP%]{display:none} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();var zge=["inputValueContent"],Uge=(i,t)=>t.id||t.label,Hge=(i,t)=>t.opNode.id,oj=(i,t)=>t.key,Gge=(i,t)=>t.outputId,jge=(i,t)=>t.id,Wge=i=>({value:i});function $ge(i,t){if(i&1&&(v(0,"tr")(1,"td",21),ee(2,"hoverable-label",22),y(),v(3,"td",23),ee(4,"expandable-info-text",24),y()()),i&2){let e=t.$implicit,n=I(2);ne("search-match",n.isSearchMatchedAttrId(e.label)),w(2),R("label",e.label),w(2),R("text",e.value)("type",e.label)("bgColor",e.bgColor||"transparent")("textColor",e.textColor||"black")}}function qge(i,t){if(i&1){let e=te();v(0,"div",15,1)(2,"div",16)(3,"button",17),H("click",function(){let r=B(e).$implicit,o=fe(1),s=I();return V(s.handleToggleSection(r.label,o))}),v(4,"mat-icon"),M(5),y()(),M(6),y(),v(7,"div",18)(8,"table",19),Xt(9,$ge,5,7,"tr",20,Uge),y()()()}if(i&2){let e=t.$implicit,n=I();ne("collapsed",n.isSectionCollapsed(e.label)),w(5),lt(n.getSectionToggleIcon(e.label)),w(),we(" ",e.label," "),w(3),Qt(e.items)}}function Yge(i,t){if(i&1){let e=te();v(0,"div",15,2)(2,"div",16)(3,"button",17),H("click",function(){B(e);let r=fe(1),o=I();return V(o.handleToggleSection(o.SectionLabel.NODE_DATA_PROVIDERS,r))}),v(4,"mat-icon"),M(5),y()(),M(6," Node data providers "),y(),ee(7,"node-data-provider-summary-panel",25),y()}if(i&2){let e=I();ne("collapsed",e.isSectionCollapsed(e.SectionLabel.NODE_DATA_PROVIDERS)),w(5),lt(e.getSectionToggleIcon(e.SectionLabel.NODE_DATA_PROVIDERS)),w(2),R("paneId",e.paneId)("rootGroupNodeId",e.curSelectedNodeId)}}function Xge(i,t){if(i&1){let e=te();v(0,"paginator",32),H("change",function(r){B(e);let o=I(2);return V(o.handleInputPaginatorChanged(r))}),y()}if(i&2){let e=I(2);R("pageSize",e.ioPageSize)("itemsCount",e.curInputsCount)}}function Qge(i,t){if(i&1&&(v(0,"div",35),M(1),y()),i&2){let e=I().$implicit,n=I(2);w(),lt(n.getInputName(e))}}function Zge(i,t){if(i&1){let e=te();v(0,"div",43),H("click",function(r){B(e);let o=I(2).$implicit,s=I(2);return V(s.handleToggleInputOpNodeVisibility(o.opNode.id,s.flatInputItems,r))}),v(1,"mat-icon"),M(2),y()()}if(i&2){let e=I(2).$implicit,n=I(2);ne("visible",n.getInputOpNodeToggleVisible(e.opNode.id)),R("matTooltip",n.getInputOpNodeToggleVisibilityTooltip(e.opNode.id)),w(2),we(" ",n.getInputOpNodeToggleVisibilityIcon(e.opNode.id)," ")}}function Kge(i,t){if(i&1){let e=te();v(0,"div",38),H("click",function(r){B(e);let o=I().$implicit,s=I(2);return V(s.handleLocateNode(o.opNode.id,r))}),M(1),v(2,"div",39)(3,"mat-icon",40),M(4,"my_location"),y()(),ee(5,"div",41),W(6,Zge,3,4,"div",42),y()}if(i&2){let e=I().$implicit,n=I(2);qe("data-id",e.opNode.id),w(),we(" ",n.getInputName(e)," "),w(),R("matTooltip",n.locatorTooltip),w(4),re(e.opNode.hideInLayout?-1:6)}}function Jge(i,t){if(i&1&&(v(0,"tr",null,4)(2,"td",21)(3,"div",44)(4,"mat-icon",45),M(5,"circle"),y(),ee(6,"hoverable-label",22),y()(),v(7,"td",23),ee(8,"expandable-info-text",46),y()()),i&2){let e=I().$implicit,n=I(3);ne("search-match",n.isSearchMatchedInputValue(e.value)),w(6),R("label",e.key),w(2),R("text",e.value)("type",e.key)}}function e_e(i,t){if(i&1&&W(0,Jge,9,5,"tr",20),i&2){let e=t.$implicit,n=I(3);re(n.getShowMetadata(e)?0:-1)}}function t_e(i,t){if(i&1&&(v(0,"div",31)(1,"div",33)(2,"div",34),M(3),y(),W(4,Qge,2,1,"div",35)(5,Kge,7,4,"div",36),y(),v(6,"table",37),Xt(7,e_e,1,1,null,null,oj),y()()),i&2){let e=t.$implicit,n=I(2);w(),ne("search-match",n.isSearchMatchedInputValue(n.getInputTensorTag(e))||n.isSearchMatchedInputValue(e.opNode.label)),w(2),lt(e.index),w(),re(e.opNode.hideInLayout?4:5),w(3),Qt(e.metadataList)}}function n_e(i,t){if(i&1){let e=te();v(0,"div",26,3)(2,"div",27)(3,"div",28)(4,"button",17),H("click",function(){B(e);let r=fe(1),o=I();return V(o.handleToggleSection(o.SectionLabel.INPUTS,r))}),v(5,"mat-icon"),M(6),y()(),M(7),y(),W(8,Xge,1,2,"paginator",29),y(),v(9,"div",30),Xt(10,t_e,9,4,"div",31,Hge),y()()}if(i&2){let e=I();ne("collapsed",e.isSectionCollapsed(e.SectionLabel.INPUTS)),w(6),lt(e.getSectionToggleIcon(e.SectionLabel.INPUTS)),w(),we(" inputs (",e.curInputsCount,") "),w(),re(e.showInputPaginator?8:-1),w(2),Qt(e.flatInputItems)}}function i_e(i,t){if(i&1){let e=te();v(0,"paginator",32),H("change",function(r){B(e);let o=I(2);return V(o.handleOutputPaginatorChanged(r))}),y()}if(i&2){let e=I(2);R("pageSize",e.ioPageSize)("itemsCount",e.outputItems.length)}}function r_e(i,t){if(i&1){let e=te();v(0,"div",50),H("click",function(r){B(e);let o=I().$implicit,s=I(2);return V(s.handleToggleOutputVisibility(o.outputId,s.outputItemsForCurPage,r))}),v(1,"mat-icon"),M(2),y()()}if(i&2){let e=I().$implicit,n=I(2);ne("visible",n.getOutputToggleVisible(e.outputId)),R("matTooltip",n.getOutputToggleVisibilityTooltip(e.outputId)),w(2),we(" ",n.getOutputToggleVisibilityIcon(e.outputId)," ")}}function o_e(i,t){i&1&&nr(0)}function s_e(i,t){if(i&1&&(v(0,"div",53),W(1,o_e,1,0,"ng-container",54),y()),i&2){let e=I().$implicit,n=I(6),r=fe(11);w(),R("ngTemplateOutlet",r)("ngTemplateOutletContext",Pl(2,Wge,n.getNamespaceLabel(e)))}}function a_e(i,t){if(i&1){let e=te();v(0,"div",52),H("click",function(r){let o=B(e).$implicit,s=I(6);return V(s.handleLocateNode(o.id,r))}),M(1),v(2,"div",39)(3,"mat-icon",40),M(4,"my_location"),y()()(),W(5,s_e,2,4,"ng-template",null,6,Mt)}if(i&2){let e=t.$implicit,n=fe(6),r=I(6);ne("search-match",r.isSearchMatchedOutputValue(e.label)),R("bubble",n)("overlaySize",r.constValuesPopupSize)("overlayPositions",r.outputConnectsToNamespacePopupPosition)("hoverDelayMs",50),qe("data-id",e.id),w(),we(" ",e.label," "),w(),R("matTooltip",r.locatorTooltip)}}function l_e(i,t){if(i&1&&Xt(0,a_e,7,9,null,null,jge),i&2){let e=I().$implicit;Qt(e.connectedNodes)}}function c_e(i,t){if(i&1&&ee(0,"expandable-info-text",51),i&2){let e=I().$implicit;R("text",e.value)}}function d_e(i,t){if(i&1&&(v(0,"tr")(1,"td",21)(2,"div",44)(3,"mat-icon",45),M(4,"circle"),y(),ee(5,"hoverable-label",22),y()(),v(6,"td",23),W(7,l_e,2,0)(8,c_e,1,1,"expandable-info-text",51),y()()),i&2){let e=t.$implicit,n=I(4);ne("search-match",n.isSearchMatchedOutputValue(e.value)),w(5),R("label",e.key),w(2),re(e.key===n.outputMetadataConnectedTo?7:8)}}function u_e(i,t){if(i&1&&(v(0,"table",37),Xt(1,d_e,9,4,"tr",20,oj),y()),i&2){let e=I().$implicit;w(),Qt(e.metadataList)}}function h_e(i,t){if(i&1&&(v(0,"div",31)(1,"div",33)(2,"div",34),M(3),y(),v(4,"div",35),M(5),y(),ee(6,"div",41),W(7,r_e,3,4,"div",49),y(),W(8,u_e,3,0,"table",37),y()),i&2){let e=t.$implicit,n=I(2);w(),ne("search-match",n.isSearchMatchedOutputValue(e.tensorTag)),w(2),lt(e.index),w(2),lt(n.getOutputName(e)),w(2),re(n.getHasConnectedToNodes(e)?7:-1),w(),re(e.metadataList.length>0?8:-1)}}function p_e(i,t){if(i&1){let e=te();v(0,"div",47,5)(2,"div",48)(3,"div",28)(4,"button",17),H("click",function(){B(e);let r=fe(1),o=I();return V(o.handleToggleSection(o.SectionLabel.OUTPUTS,r))}),v(5,"mat-icon"),M(6),y()(),M(7),y(),W(8,i_e,1,2,"paginator",29),y(),v(9,"div",30),Xt(10,h_e,9,6,"div",31,Gge),y()()}if(i&2){let e=I();ne("collapsed",e.isSectionCollapsed(e.SectionLabel.OUTPUTS)),w(6),lt(e.getSectionToggleIcon(e.SectionLabel.OUTPUTS)),w(),we(" outputs (",e.curOutputsCount,") "),w(),re(e.showOutputPaginator?8:-1),w(2),Qt(e.outputItemsForCurPage)}}function f_e(i,t){if(i&1){let e=te();v(0,"paginator",32),H("change",function(r){B(e);let o=I(2);return V(o.handleIdenticalGroupsPaginatorChanged(r))}),y()}if(i&2){let e=I(2);R("pageSize",e.ioPageSize)("itemsCount",e.identicalGroupNodes.length)}}function m_e(i,t){if(i&1){let e=te();v(0,"div",15,7)(2,"div",55)(3,"div",28)(4,"button",17),H("click",function(){B(e);let r=fe(1),o=I();return V(o.handleToggleSection(o.SectionLabel.IDENTICAL_GROUPS,r))}),v(5,"mat-icon"),M(6),y()(),M(7),y(),W(8,f_e,1,2,"paginator",29),y(),ee(9,"io-tree",56),y()}if(i&2){let e=I();ne("collapsed",e.isSectionCollapsed(e.SectionLabel.IDENTICAL_GROUPS)),w(6),lt(e.getSectionToggleIcon(e.SectionLabel.IDENTICAL_GROUPS)),w(),we(" Identical layers (",e.identicalGroupNodes.length,") "),w(),re(e.showIdenticalGroupsPaginator?8:-1),w(),R("data",e.identicalGroupsData)("rendererId",e.curRendererId)}}function g_e(i,t){if(i&1&&(v(0,"div",59),M(1),y()),i&2){let e=t.$implicit;w(),we(" ",e," ")}}function __e(i,t){if(i&1&&(v(0,"div",57),M(1," Namespace hierarchy "),y(),v(2,"div",58),Xt(3,g_e,2,1,"div",59,c0),y()),i&2){let e=t.value;w(3),Qt(e.split("/"))}}var Ps=function(i){return i.GRAPH_INFO="Graph info",i.NODE_INFO="Node info",i.LAYER_INFO="Layer info",i.LAYER_ATTRS="Layer attributes",i.ATTRIBUTES="Attributes",i.NODE_DATA_PROVIDERS="Node data providers",i.IDENTICAL_GROUPS="Identical groups",i.INPUTS="inputs",i.OUTPUTS="outputs",i}(Ps||{}),v_e=64,y_e=150,rj=370,sj=(()=>{class i{appService;nodeDataProviderExtensionService;changeDetectorRef;infoPanelService;splitPaneService;paneId;inputValueContents=new Wi;curModelGraph;curSelectedNode;curShowOnOpNodeInfoIds=new Set;curShowOnOpNodeAttrIds=new Set;curShowOnGroupNodeInfoIds=new Set;curShowOnNodeDataProviderRuns={};curSearchResults=void 0;width=rj;minWidth=rj;sections=[];flatInputItems=[];outputItems=[];outputItemsForCurPage=[];identicalGroupNodes=[];identicalGroupsData;curRendererId="";curInputsCount=0;curOutputsCount=0;resizing=!1;hide=!1;ioPageSize;SectionLabel=Ps;outputMetadataConnectedTo="connects to";inputMetadataValuesKey="values";inputMetadataNamespaceKey="namespace";locatorTooltip=`Click: locate +Alt+click: select`;getNamespaceLabel=hd;constValuesPopupSize={minWidth:100,minHeight:0,maxWidth:600};constValuesPopupPosition=[{originX:"start",originY:"top",overlayX:"end",overlayY:"top",offsetX:-32}];outputConnectsToNamespacePopupPosition=[{originX:"start",originY:"top",overlayX:"end",overlayY:"top",offsetX:-4}];curSearchAttrMatches=[];curSearchInputMatches=[];curSearchOutputMatches=[];inputSourceNodes=[];inputMetadataList=[];savedWidth=0;constructor(e,n,r,o,s){this.appService=e,this.nodeDataProviderExtensionService=n,this.changeDetectorRef=r,this.infoPanelService=o,this.splitPaneService=s,this.ioPageSize=this.appService.testMode?5:25,ct(()=>{let a=this.appService.getPaneById(this.paneId);if(!a||!a.modelGraph)return;this.curModelGraph=a.modelGraph,this.curRendererId=a.selectedNodeInfo?.rendererId||"";let l=a.selectedNodeInfo?.nodeId||"";this.curSelectedNodeId!==l&&(this.handleNodeSelected(l),setTimeout(()=>{this.splitPaneService.resetInputOutputHiddenIds(),this.handleSearchResultsChanged()}))}),ct(()=>{let a=this.appService.getPaneById(this.paneId);!a||!a.modelGraph||this.curSearchResults!==a.searchResults&&(this.curSearchResults=a.searchResults,this.handleSearchResultsChanged())}),ct(()=>{this.nodeDataProviderExtensionService.runs(),this.genInfoData(),this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.updateInputValueContentsExpandable()})})}isSearchMatchedAttrId(e){return this.curSearchAttrMatches.find(n=>n.matchedAttrId===e)!=null}isSearchMatchedInputValue(e){return this.curSearchInputMatches?this.curSearchInputMatches.find(n=>n.matchedText===e)!=null:!1}isSearchMatchedOutputValue(e){return this.curSearchOutputMatches?this.curSearchOutputMatches.find(n=>n.matchedText===e)!=null:!1}handleMouseDownResizer(e){e.preventDefault(),document.body.style.cursor="ew-resize";let n=wn(document,"mousemove"),r=wn(window,"mouseup"),o=this.width,s=e.clientX;this.resizing=!0,this.changeDetectorRef.markForCheck(),ji([n]).pipe(Ke(r)).subscribe({next:([a])=>{let l=a.clientX-s;this.width=Math.max(v_e,o-l),this.minWidth=this.width,this.changeDetectorRef.markForCheck()},complete:()=>{document.body.style.cursor="default",this.resizing=!1,this.changeDetectorRef.markForCheck()}})}handleInputPaginatorChanged(e){let n=this.inputSourceNodes.slice(e*this.ioPageSize,(e+1)*this.ioPageSize),r=this.inputMetadataList.slice(e*this.ioPageSize,(e+1)*this.ioPageSize);this.flatInputItems=this.genInputFlatItems(e*this.ioPageSize,n,r),this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.updateInputValueContentsExpandable()})}handleOutputPaginatorChanged(e){this.outputItemsForCurPage=this.outputItems.slice(e*this.ioPageSize,(e+1)*this.ioPageSize),this.changeDetectorRef.markForCheck()}handleIdenticalGroupsPaginatorChanged(e){this.identicalGroupsData=ul(this.identicalGroupNodes.slice(e*this.ioPageSize,(e+1)*this.ioPageSize),[],"incoming",this.curSelectedNode?.id||"")}toggleHideInfoPanel(){this.hide=!this.hide;let e=0;this.hide?this.savedWidth=this.width:e=this.savedWidth,this.animateSidePanelWidth(e)}handleToggleSection(e,n){if(!n)return;this.isSectionCollapsed(e)?n.style.maxHeight=`${n.scrollHeight}px`:(n.style.maxHeight=`${n.offsetHeight}px`,n.style.overflow="hidden"),this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.infoPanelService.collapsedSectionNames.has(e)?this.infoPanelService.collapsedSectionNames.delete(e):this.infoPanelService.collapsedSectionNames.add(e),this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.isSectionCollapsed(e)?n.style.overflow="hidden":(n.style.overflow="visible",n.style.maxHeight="fit-content")},150)})}isSectionCollapsed(e){return this.infoPanelService.collapsedSectionNames.has(e)}getSectionToggleIcon(e){return this.isSectionCollapsed(e)?"chevron_right":"expand_more"}handleLocateNode(e,n){this.appService.curToLocateNodeInfo.set({nodeId:e,rendererId:this.curRendererId,isGroupNode:!1,select:n.altKey})}handleToggleInputOpNodeVisibility(e,n,r){r.stopPropagation(),r.altKey?this.splitPaneService.setInputOpNodeVisible(e,n.map(o=>o.opNode.id)):this.splitPaneService.toggleInputOpNodeVisibility(e)}getInputOpNodeToggleVisible(e){return this.splitPaneService.getInputOpNodeVisible(e)}getInputOpNodeToggleVisibilityIcon(e){return this.getInputOpNodeToggleVisible(e)?"visibility":"visibility_off"}getInputOpNodeToggleVisibilityTooltip(e){return this.getInputOpNodeToggleVisible(e)?"Click to hide highlight":"Click to show highlight"}handleToggleOutputVisibility(e,n,r){r.stopPropagation(),r.altKey?this.splitPaneService.setOutputVisible(e,n.map(o=>o.outputId)):this.splitPaneService.toggleOutputVisibility(e)}getOutputToggleVisible(e){return this.splitPaneService.getOutputVisible(e)}getOutputToggleVisibilityIcon(e){return this.getOutputToggleVisible(e)?"visibility":"visibility_off"}getOutputToggleVisibilityTooltip(e){return this.getOutputToggleVisible(e)?"Click to hide highlight":"Click to show highlight"}getInputName(e){let n=e.metadataList.find(r=>r.key===jo);return n?`${n.value} (${e.opNode.label})`:e.opNode.label}getInputTensorTag(e){return e.metadataList.find(r=>r.key===jo)?.value??""}getOutputName(e){return e.tensorTag===""?"output":e.tensorTag}getShowMetadata(e){return!e.key.startsWith("__")}getHasConnectedToNodes(e){return(e.metadataList.find(r=>r.key===this.outputMetadataConnectedTo)?.connectedNodes||[]).length>0}trackBySectionLabel(e,n){return n.label}trackByItemIdOrLabel(e,n){return n.id||n.label}get canShowGraphInfo(){return this.curModelGraph!=null&&this.curSelectedNode==null}get showNodeDataProviderSummary(){return this.curModelGraph?(this.curSelectedNode==null||wt(this.curSelectedNode))&&this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph).length>0:!1}get curSelectedNodeId(){return this.curSelectedNode?this.curSelectedNode.id:void 0}get showInputPaginator(){return this.inputSourceNodes.length>this.ioPageSize&&!this.isSectionCollapsed(Ps.INPUTS)}get showOutputPaginator(){return this.outputItems.length>this.ioPageSize&&!this.isSectionCollapsed(Ps.OUTPUTS)}get showIdenticalGroupsPaginator(){return this.identicalGroupNodes.length>this.ioPageSize&&!this.isSectionCollapsed(Ps.IDENTICAL_GROUPS)}get hideToggleTooltip(){return this.hide?"Show info panel":"Hide info panel"}get hideToggleIconName(){return this.hide?"chevron_left":"chevron_right"}handleNodeSelected(e){!this.curModelGraph||!e?this.curSelectedNode=void 0:this.curSelectedNode=this.curModelGraph.nodesById[e],this.genInfoData(),this.changeDetectorRef.markForCheck(),setTimeout(()=>{this.updateInputValueContentsExpandable()})}genInfoData(){this.sections=[],this.flatInputItems=[],this.inputSourceNodes=[],this.inputMetadataList=[],this.outputItems=[],this.identicalGroupNodes=[],this.identicalGroupsData=void 0,this.canShowGraphInfo?this.genInfoDataForGraph():this.curSelectedNode&&(Et(this.curSelectedNode)?(this.genInfoDataForSelectedOpNode(),this.genInputsOutputsData()):wt(this.curSelectedNode)&&this.genInfoDataForSelectedGroupNode())}genInfoDataForGraph(){if(!this.curModelGraph)return;let e={label:Ps.GRAPH_INFO,sectionType:"graph",items:[]};this.sections.push(e);let n=this.curModelGraph.groupNodeAttributes?.[""];if(n)for(let s of Object.keys(n))e.items.push({section:e,label:s,value:n[s]});let r=0,o=0;for(let s of this.curModelGraph.nodes)Et(s)&&!s.hideInLayout?r++:wt(s)&&o++;e.items.push({section:e,label:"op node count",value:String(r)},{section:e,label:"layer count",value:String(o)})}genInfoDataForSelectedOpNode(){if(!this.curModelGraph||!this.curSelectedNode)return;let e=this.curSelectedNode,n={label:Ps.NODE_INFO,sectionType:"op",items:[]};this.sections.push(n),n.items.push({section:n,label:"op name",value:`${e.label}`});let r="id";if(n.items.push({section:n,label:r,value:e.id,canShowOnNode:!0,showOnNode:this.curShowOnOpNodeInfoIds.has(r)}),r="namespace",n.items.push({section:n,label:r,value:hd(e),canShowOnNode:!0,showOnNode:this.curShowOnOpNodeInfoIds.has(r)}),Object.keys(e.attrs||{}).length>0){let s={label:Ps.ATTRIBUTES,sectionType:"op",items:[]},a=e.attrs||{};for(let l of Object.keys(a))l.startsWith("__")||s.items.push({section:s,label:l,value:a[l],canShowOnNode:!0,showOnNode:this.curShowOnOpNodeAttrIds.has(l)});s.items.length>0&&this.sections.push(s)}let o=this.nodeDataProviderExtensionService.getRunsForModelGraph(this.curModelGraph);if(o.length>0){let s={label:Ps.NODE_DATA_PROVIDERS,sectionType:"op",items:[]};this.sections.push(s);for(let a of o){let l=((a.results||{})[this.curModelGraph.id]||{})[e.id],c=l?.strValue||"-",d=l?.bgColor||"transparent",u=l?.textColor||"black";s.items.push({id:a.runId,section:s,label:Fa(a,this.curModelGraph),value:c,canShowOnNode:a.done,showOnNode:this.curShowOnNodeDataProviderRuns[a.runId]!=null,bgColor:d,textColor:u,loading:!a.done})}}}genInputsOutputsData(){if(!this.curModelGraph||!this.curSelectedNode)return;let e=this.curSelectedNode,n=e.incomingEdges||[];this.inputMetadataList=[],this.inputSourceNodes=[],this.flatInputItems=[];for(let a of n){let l=this.curModelGraph?.nodesById[a.sourceNodeId];this.inputSourceNodes.push(l);let c=(e.inputsMetadata||{})[a.targetNodeInputId]||{},d=X({},(l.outputsMetadata||{})[a.sourceNodeOutputId]||{});for(let u of Object.keys(d))c[u]==null&&u!==jo&&(c[u]=d[u]);this.inputMetadataList.push(c)}if(this.curInputsCount=this.inputSourceNodes.length,n.length>0){let a=this.inputSourceNodes.slice(0,this.ioPageSize),l=this.inputMetadataList.slice(0,this.ioPageSize);this.flatInputItems=this.genInputFlatItems(0,a,l)}this.outputItems=[];let r=e.outputsMetadata||{},o=e.outgoingEdges||[],s=0;for(let a of Object.keys(r)){let l=[],c="";for(let u of Object.keys(r[a])){let h=r[a][u];u===jo&&(c=h),!u.startsWith("__")&&l.push({key:u,value:h})}l.sort((u,h)=>u.key.localeCompare(h.key));let d=o.filter(u=>u.sourceNodeOutputId===a).map(u=>this.curModelGraph.nodesById[u.targetNodeId]);l.push({key:this.outputMetadataConnectedTo,value:"",connectedNodes:d}),this.outputItems.push({index:s,tensorTag:c,outputId:a,metadataList:l}),s++}this.curOutputsCount=this.outputItems.length,this.outputItemsForCurPage=this.outputItems.slice(0,this.ioPageSize)}genInfoDataForSelectedGroupNode(){if(!this.curModelGraph||!this.curSelectedNode)return;let e=this.curSelectedNode,n={label:Ps.LAYER_INFO,sectionType:"group",items:[]};this.sections.push(n),n.items.push({section:n,label:"name",value:e.label});let r="namespace";n.items.push({section:n,label:r,value:hd(e),canShowOnNode:!0,showOnNode:this.curShowOnGroupNodeInfoIds.has(r)}),r="#children",n.items.push({section:n,label:r,value:String((e.nsChildrenIds||[]).length),canShowOnNode:!0,showOnNode:this.curShowOnGroupNodeInfoIds.has(r)}),r="#descendants",n.items.push({section:n,label:r,value:String((e.descendantsNodeIds||[]).length),canShowOnNode:!0,showOnNode:this.curShowOnGroupNodeInfoIds.has(r)});let o=this.curModelGraph.groupNodeAttributes?.[e.id.replace("___group___","")];if(o){let s={label:Ps.LAYER_ATTRS,sectionType:"group",items:[]};this.sections.push(s);for(let a of Object.keys(o))s.items.push({section:n,label:a,value:o[a]})}e.identicalGroupIndex!=null&&(this.identicalGroupNodes=this.curModelGraph.nodes.filter(s=>wt(s)&&s.identicalGroupIndex===e.identicalGroupIndex),this.identicalGroupsData=ul(this.identicalGroupNodes.slice(0,this.ioPageSize),[],"incoming",e.id))}handleSearchResultsChanged(){if(!this.curSelectedNode||!this.curSearchResults)return;let e=this.curSelectedNode.id,n=this.curSearchResults.results[e]||[],r=[],o=[],s=[];for(let a of n)switch(a.type){case xt.INPUT_METADATA:r.push(a);break;case xt.OUTPUT_METADATA:o.push(a);break;case xt.ATTRIBUTE:s.push(a);break;default:break}this.curSearchAttrMatches=s,this.curSearchOutputMatches=o,this.curSearchInputMatches=r,this.changeDetectorRef.markForCheck()}animateSidePanelWidth(e){let n=Date.now(),r=this.width,o=()=>{let s=Date.now()-n,a=this.appService.testMode?1:Math.min(1,s/y_e);a=Math.sin(a*Math.PI/2);let l=r+(e-r)*a;if(this.width=l,this.minWidth=l,this.changeDetectorRef.markForCheck(),a>=1){this.width=e,this.minWidth=e,this.changeDetectorRef.markForCheck();return}requestAnimationFrame(o)};o()}genInputFlatItems(e,n,r){let o=[];for(let s=0;s{l.push({key:d,value:u})}),l.sort((d,u)=>d.key.localeCompare(u.key)),l.push({key:this.inputMetadataNamespaceKey,value:hd(n[s])});let c=a.attrs||{};c[La]&&l.push({key:this.inputMetadataValuesKey,value:c[La]}),o.push({index:s+e,opNode:a,metadataList:l})}return o}updateInputValueContentsExpandable(){for(let e=0;en.offsetHeight&&n.classList.add("expandable")}}static \u0275fac=function(n){return new(n||i)(q(nt),q(Rr),q(Re),q(uf),q(vc))};static \u0275cmp=oe({type:i,selectors:[["info-panel"]],viewQuery:function(n,r){if(n&1&&Me(zge,5),n&2){let o;_e(o=ve())&&(r.inputValueContents=o)}},hostVars:4,hostBindings:function(n,r){n&2&&an("width",r.width,"px")("min-width",r.minWidth,"px")},inputs:{paneId:"paneId"},standalone:!0,features:[Bt([uf]),se],decls:12,vars:12,consts:[["namespaceHierarchy",""],["sectionEle",""],["ndpSectionEle",""],["inputsSectionEle",""],["rowEle",""],["outputsSectionEle",""],["namespacePopup",""],["identicalGroupsSectionEle",""],[1,"container"],["class","section",3,"collapsed",4,"ngFor","ngForOf","ngForTrackBy"],["class","section",3,"collapsed",4,"ngIf"],["class","section inputs",3,"collapsed",4,"ngIf"],["class","section outputs",3,"collapsed",4,"ngIf"],[1,"resizer",3,"mousedown"],[1,"hide-toggle",3,"click","matTooltip"],[1,"section"],[1,"header"],["mat-icon-button","",1,"toggle",3,"click"],[1,"items-container"],[1,"metadata-table","info-attrs"],[3,"search-match"],[1,"key"],[3,"label"],[1,"value"],[3,"text","type","bgColor","textColor"],[3,"paneId","rootGroupNodeId"],[1,"section","inputs"],[1,"header","input"],[1,"header-label-container"],[3,"pageSize","itemsCount"],[1,"flat-items-container"],[1,"flat-item"],[3,"change","pageSize","itemsCount"],[1,"name-row"],[1,"index"],[1,"name"],[1,"name","locator"],[1,"metadata-table"],[1,"name","locator",3,"click"],["matTooltipClass","multiline-tooltip-left","matTooltipPosition","right",1,"locator-icon-container",3,"matTooltip"],[1,"locator-icon"],[1,"filler"],["matTooltipPosition","left",1,"visibility-icon-container","input",3,"matTooltip","visible"],["matTooltipPosition","left",1,"visibility-icon-container","input",3,"click","matTooltip"],[1,"key-container"],[1,"bullet"],[3,"text","type"],[1,"section","outputs"],[1,"header","output"],["matTooltipPosition","left",1,"visibility-icon-container","output",3,"visible","matTooltip"],["matTooltipPosition","left",1,"visibility-icon-container","output",3,"click","matTooltip"],[3,"text"],[1,"target-node-container",3,"click","bubble","overlaySize","overlayPositions","hoverDelayMs"],[1,"model-explorer-const-values-popup"],[4,"ngTemplateOutlet","ngTemplateOutletContext"],[1,"header","identical-groups"],[3,"data","rendererId"],[1,"values-count-msg"],[1,"namespace-content"],[1,"namespace-row"]],template:function(n,r){if(n&1){let o=te();v(0,"div",8),W(1,qge,11,4,"div",9)(2,Yge,8,5,"div",10)(3,n_e,12,5,"div",11)(4,p_e,12,5,"div",12)(5,m_e,10,7,"div",10),y(),v(6,"div",13),H("mousedown",function(a){return B(o),V(r.handleMouseDownResizer(a))}),y(),v(7,"div",14),H("click",function(){return B(o),V(r.toggleHideInfoPanel())}),v(8,"mat-icon"),M(9),y()(),W(10,__e,5,0,"ng-template",null,0,Mt)}n&2&&(ne("graph-info",r.showNodeDataProviderSummary),w(),R("ngForOf",r.sections)("ngForTrackBy",r.trackBySectionLabel),w(),R("ngIf",r.showNodeDataProviderSummary),w(),R("ngIf",r.flatInputItems.length>0),w(),R("ngIf",r.outputItems.length>0),w(),R("ngIf",r.identicalGroupsData),w(),ne("resizing",r.resizing),w(),R("matTooltip",r.hideToggleTooltip),w(2),lt(r.hideToggleIconName))},dependencies:[Nn,Oe,Oi,On,Gs,J5,ej,vn,qo,Je,dt,lo,rS,$t,qn,df,xc,ij],styles:[`[_nghost-%COMP%]{position:relative;width:370px;min-width:370px}.container[_ngcontent-%COMP%]{width:100%;height:100%;box-sizing:border-box;border-left:1px solid #e1e3e1;background-color:#fff;font-size:12px;overflow-y:auto;position:relative}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]{transition:max-height .15s ease-out;padding-bottom:8px;box-sizing:border-box}.container[_ngcontent-%COMP%] .section.collapsed[_ngcontent-%COMP%]{max-height:32px!important;overflow:hidden}.container[_ngcontent-%COMP%] .section.inputs[_ngcontent-%COMP%]{padding-bottom:16px}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-items-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;margin-top:10px;gap:8px}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 2px 0 12px;font-size:12px}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%] .index[_ngcontent-%COMP%]{color:#999;min-width:14px;margin-right:2px}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{color:#00639b;font-weight:500;display:flex;align-items:center}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%] .name.locator[_ngcontent-%COMP%]{flex-grow:1;display:flex;align-items:center;cursor:pointer}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%] .name.locator[_ngcontent-%COMP%]:hover{background-color:#f6f6f6}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .name-row[_ngcontent-%COMP%] .name.locator[_ngcontent-%COMP%]:hover .locator-icon-container[_ngcontent-%COMP%]{opacity:.8}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%] .flat-item[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%]{margin-top:3px;margin-left:18px;margin-right:0}.container[_ngcontent-%COMP%] .section[_ngcontent-%COMP%]:not(:first-child){border-top:1px solid #dadce0}.container[_ngcontent-%COMP%] .filler[_ngcontent-%COMP%]{flex-grow:1}.container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:11px;font-weight:700;padding:4px 12px 0;text-transform:uppercase;letter-spacing:.0327em;position:sticky;top:0;z-index:100;flex-shrink:0;box-sizing:border-box;background-color:#fff;-webkit-user-select:none;user-select:none;color:#000000de}.container[_ngcontent-%COMP%] .header.input[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .header.output[_ngcontent-%COMP%], .container[_ngcontent-%COMP%] .header.identical-groups[_ngcontent-%COMP%]{justify-content:space-between}.container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] .header-label-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] button.toggle[_ngcontent-%COMP%]{padding:0;width:24px;height:24px;margin-left:-8px;margin-right:2px;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] button.toggle[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:inherit;font-size:20px;width:20px;height:20px}.container[_ngcontent-%COMP%] .header[_ngcontent-%COMP%] button.toggle[_ngcontent-%COMP%] .mat-mdc-button-touch-target{display:none}.container[_ngcontent-%COMP%] .output-item-container[_ngcontent-%COMP%]{font-family:Roboto,sans-serif}.container[_ngcontent-%COMP%] .output-item-container[_ngcontent-%COMP%]:not(.last){margin-top:8px}.container[_ngcontent-%COMP%] .output-item-label[_ngcontent-%COMP%]{font-size:13px;padding:4px 12px;color:#00639b;font-weight:500}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%]{border-spacing:0;border-collapse:collapse;font-size:12px;margin:0 12px;word-break:break-all;max-width:calc(100% - 28px)}.container[_ngcontent-%COMP%] .metadata-table.info-attrs[_ngcontent-%COMP%]{margin-left:30px}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{vertical-align:text-top}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:hover.has-hover-values{cursor:pointer;background-color:#f6f6f6}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] mat-icon.bullet[_ngcontent-%COMP%]{flex-shrink:0;font-size:4px;width:5px;height:5px;color:#bbb;margin-right:4px;margin-top:6px}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.key[_ngcontent-%COMP%]{color:#999;padding-right:6px;white-space:nowrap;min-width:100px;width:100px;max-width:100px;overflow:hidden;text-overflow:ellipsis;position:relative}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.key[_ngcontent-%COMP%] .key-container[_ngcontent-%COMP%]{display:flex;align-items:flex-start;overflow:hidden;position:absolute;inset:0}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.value[_ngcontent-%COMP%]{max-width:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] td.value[_ngcontent-%COMP%]:has(expandable-info-text.expanded){white-space:normal;max-width:inherit}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] .target-node-container[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] .target-node-container[_ngcontent-%COMP%]:hover .locator-icon-container[_ngcontent-%COMP%]{opacity:.8}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] .target-node-container.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.container[_ngcontent-%COMP%] .metadata-table[_ngcontent-%COMP%] .values-hover-trigger[_ngcontent-%COMP%]{box-sizing:border-box;border-radius:99px;display:flex;align-items:center;background-color:#d7f1ff;color:#00639b;width:fit-content;height:16px;padding:0 6px;font-size:10px}.container[_ngcontent-%COMP%] .items-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:4px;margin-top:10px;margin-bottom:6px}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:0 12px}.container[_ngcontent-%COMP%] .item-container.search-match[_ngcontent-%COMP%]{background-color:#f5e25a}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .label-row[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-weight:500;color:#aaa;font-size:12px;margin-bottom:1px}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .show-on-node-toggle[_ngcontent-%COMP%]{height:16px;display:flex;font-size:11px;align-items:center;justify-content:center;box-sizing:border-box;cursor:pointer;-webkit-user-select:none;user-select:none;transform:scale(.7);margin-right:-6px;margin-top:-1px}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .value[_ngcontent-%COMP%]{font-size:13px;word-break:break-word}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .value.big-text[_ngcontent-%COMP%]{font-size:14px;font-weight:500}.container[_ngcontent-%COMP%] .item-container[_ngcontent-%COMP%] .value.has-bg-color[_ngcontent-%COMP%]{padding:2px 4px;border-radius:4px;margin-top:2px}.container[_ngcontent-%COMP%] .locator-icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;opacity:.5;margin-left:4px}.container[_ngcontent-%COMP%] .locator-icon-container.left[_ngcontent-%COMP%]{margin-right:4px;margin-left:0;display:inline-block}.container[_ngcontent-%COMP%] .locator-icon-container.left[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-bottom:-2px}.container[_ngcontent-%COMP%] .locator-icon-container[_ngcontent-%COMP%]:hover{opacity:.8}.container[_ngcontent-%COMP%] .locator-icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#333;font-size:12px;width:12px;height:12px}.container[_ngcontent-%COMP%] .visibility-icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;opacity:.5;padding:0 11px 0 20px;cursor:pointer}.container[_ngcontent-%COMP%] .visibility-icon-container[_ngcontent-%COMP%]:hover{opacity:.8}.container[_ngcontent-%COMP%] .visibility-icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#333;font-size:14px;width:14px;height:14px}.container[_ngcontent-%COMP%] .visibility-icon-container.input.visible[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#009e73}.container[_ngcontent-%COMP%] .visibility-icon-container.output.visible[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#d55e00}.resizer[_ngcontent-%COMP%]{position:absolute;top:0;bottom:0;left:0;width:6px;cursor:ew-resize;background-color:transparent;z-index:200}.resizer[_ngcontent-%COMP%]:hover, .resizer.resizing[_ngcontent-%COMP%]{background-color:#0000000a}.hide-toggle[_ngcontent-%COMP%]{position:absolute;right:100%;bottom:2px;width:16px;height:20px;border:1px solid #ccc;border-right:none;box-sizing:border-box;border-radius:99px 0 0 99px;cursor:pointer;background-color:#fff}.hide-toggle[_ngcontent-%COMP%]:hover{background-color:#eee}.hide-toggle[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:18px;height:18px;font-size:18px;color:#999} bubble-container:has(.model-explorer-const-values-popup){width:100%} .model-explorer-const-values-popup{padding:8px;line-height:12px;background-color:#fff} .model-explorer-const-values-popup .values-count-msg{margin-bottom:8px;color:#999;font-size:12px} .model-explorer-const-values-popup .content{font-size:11px;white-space:pre-wrap;font-family:monospace} .model-explorer-const-values-popup .namespace-row{font-size:12px;padding:3px 0} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();function b_e(i,t){if(i&1&&ee(0,"graph-panel",3),i&2){let e=I();R("@showModelGraph",void 0)("@.disabled",e.disableAnimation)("modelGraph",e.pane.modelGraph)("paneId",e.pane.id)("rendererId",e.pane.id)}}function x_e(i,t){if(i&1&&ee(0,"info-panel",2),i&2){let e=I();R("paneId",e.pane.id)}}var aj=(()=>{class i{appService;changeDetectorRef;edgeOverlaysService;pane;constructor(e,n,r){this.appService=e,this.changeDetectorRef=n,this.edgeOverlaysService=r}ngOnInit(){let e=this.appService.config(),n=this.appService.panes();if(n.length>0&&n[0].id===this.pane.id&&e?.edgeOverlaysDataListLeftPane)for(let r of e.edgeOverlaysDataListLeftPane)this.edgeOverlaysService.addEdgeOverlayData(r);else if(n.length>1&&n[1].id===this.pane.id&&e?.edgeOverlaysDataListRightPane)for(let r of e.edgeOverlaysDataListRightPane)this.edgeOverlaysService.addEdgeOverlayData(r)}refresh(){this.changeDetectorRef.markForCheck()}get disableAnimation(){return this.appService.testMode}get showInfoPanel(){return!this.appService.config()?.hideInfoPanel}static \u0275fac=function(n){return new(n||i)(q(nt),q(Re),q(wc))};static \u0275cmp=oe({type:i,selectors:[["split-pane"]],inputs:{pane:"pane"},standalone:!0,features:[Bt([wc,es,vc]),se],decls:3,vars:2,consts:[[1,"container"],[3,"modelGraph","paneId","rendererId",4,"ngIf"],[3,"paneId"],[3,"modelGraph","paneId","rendererId"]],template:function(n,r){n&1&&(v(0,"div",0),W(1,b_e,1,5,"graph-panel",1)(2,x_e,1,1,"info-panel",2),y()),n&2&&(w(),R("ngIf",r.pane.modelGraph),w(),re(r.showInfoPanel?2:-1))},dependencies:[Oe,On,K5,sj],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;overflow:hidden}.container[_ngcontent-%COMP%] graph-panel[_ngcontent-%COMP%]{flex-grow:1} + + + + + + + + + + + + + + + + + +`],data:{animation:[pi("showModelGraph",[Ci("void",en({opacity:0,transform:"scale(1.03, 1.03)"})),Fn("void => *",Ln("150ms 100ms ease-out",en({opacity:1,transform:"scale(1, 1)"})))])]},changeDetection:0})}return i})();var w_e=["input"],C_e=["formField"],S_e=["*"],M_e=0,JP=class{constructor(t,e){this.source=t,this.value=e}};var E_e=new pe("MatRadioGroup"),I_e=new pe("mat-radio-default-options",{providedIn:"root",factory:T_e});function T_e(){return{color:"accent",disabledInteractive:!1}}var eR=(()=>{class i{get checked(){return this._checked}set checked(e){this._checked!==e&&(this._checked=e,e&&this.radioGroup&&this.radioGroup.value!==this.value?this.radioGroup.selected=this:!e&&this.radioGroup&&this.radioGroup.value===this.value&&(this.radioGroup.selected=null),e&&this._radioDispatcher.notify(this.id,this.name),this._changeDetector.markForCheck())}get value(){return this._value}set value(e){this._value!==e&&(this._value=e,this.radioGroup!==null&&(this.checked||(this.checked=this.radioGroup.value===e),this.checked&&(this.radioGroup.selected=this)))}get labelPosition(){return this._labelPosition||this.radioGroup&&this.radioGroup.labelPosition||"after"}set labelPosition(e){this._labelPosition=e}get disabled(){return this._disabled||this.radioGroup!==null&&this.radioGroup.disabled}set disabled(e){this._setDisabled(e)}get required(){return this._required||this.radioGroup&&this.radioGroup.required}set required(e){this._required=e}get color(){return this._color||this.radioGroup&&this.radioGroup.color||this._defaultOptions&&this._defaultOptions.color||"accent"}set color(e){this._color=e}get disabledInteractive(){return this._disabledInteractive||this.radioGroup!==null&&this.radioGroup.disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e}get inputId(){return`${this.id||this._uniqueId}-input`}constructor(){this._elementRef=S(Fe),this._changeDetector=S(Re),this._focusMonitor=S(So),this._radioDispatcher=S(gG),this._defaultOptions=S(I_e,{optional:!0}),this._ngZone=S(Ue),this._uniqueId=`mat-radio-${++M_e}`,this.id=this._uniqueId,this.disableRipple=!1,this.tabIndex=0,this.change=new Ie,this._checked=!1,this._value=null,this._removeUniqueSelectionListener=()=>{},this._injector=S(pt),this._onInputClick=o=>{this.disabled&&this.disabledInteractive&&o.preventDefault()},S(mi).load(ys);let e=S(E_e,{optional:!0}),n=S(Kn,{optional:!0}),r=S(new zr("tabindex"),{optional:!0});this.radioGroup=e,this._noopAnimations=n==="NoopAnimations",this._disabledInteractive=this._defaultOptions?.disabledInteractive??!1,r&&(this.tabIndex=Jn(r,0))}focus(e,n){n?this._focusMonitor.focusVia(this._inputElement,n,e):this._inputElement.nativeElement.focus(e)}_markForCheck(){this._changeDetector.markForCheck()}ngOnInit(){this.radioGroup&&(this.checked=this.radioGroup.value===this._value,this.checked&&(this.radioGroup.selected=this),this.name=this.radioGroup.name),this._removeUniqueSelectionListener=this._radioDispatcher.listen((e,n)=>{e!==this.id&&n===this.name&&(this.checked=!1)})}ngDoCheck(){this._updateTabIndex()}ngAfterViewInit(){this._updateTabIndex(),this._focusMonitor.monitor(this._elementRef,!0).subscribe(e=>{!e&&this.radioGroup&&this.radioGroup._touch()}),this._ngZone.runOutsideAngular(()=>{this._inputElement.nativeElement.addEventListener("click",this._onInputClick)})}ngOnDestroy(){this._inputElement?.nativeElement.removeEventListener("click",this._onInputClick),this._focusMonitor.stopMonitoring(this._elementRef),this._removeUniqueSelectionListener()}_emitChangeEvent(){this.change.emit(new JP(this,this._value))}_isRippleDisabled(){return this.disableRipple||this.disabled}_onInputInteraction(e){if(e.stopPropagation(),!this.checked&&!this.disabled){let n=this.radioGroup&&this.value!==this.radioGroup.value;this.checked=!0,this._emitChangeEvent(),this.radioGroup&&(this.radioGroup._controlValueAccessorChangeFn(this.value),n&&this.radioGroup._emitChangeEvent())}}_onTouchTargetClick(e){this._onInputInteraction(e),(!this.disabled||this.disabledInteractive)&&this._inputElement?.nativeElement.focus()}_setDisabled(e){this._disabled!==e&&(this._disabled=e,this._changeDetector.markForCheck())}_updateTabIndex(){let e=this.radioGroup,n;if(!e||!e.selected||this.disabled?n=this.tabIndex:n=e.selected===this?this.tabIndex:-1,n!==this._previousTabIndex){let r=this._inputElement?.nativeElement;r&&(r.setAttribute("tabindex",n+""),this._previousTabIndex=n,zi(()=>{queueMicrotask(()=>{e&&e.selected&&e.selected!==this&&document.activeElement===r&&(e.selected?._inputElement.nativeElement.focus(),document.activeElement===r&&this._inputElement.nativeElement.blur())})},{injector:this._injector}))}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["mat-radio-button"]],viewQuery:function(n,r){if(n&1&&(Me(w_e,5),Me(C_e,7,Fe)),n&2){let o;_e(o=ve())&&(r._inputElement=o.first),_e(o=ve())&&(r._rippleTrigger=o.first)}},hostAttrs:[1,"mat-mdc-radio-button"],hostVars:19,hostBindings:function(n,r){n&1&&H("focus",function(){return r._inputElement.nativeElement.focus()}),n&2&&(qe("id",r.id)("tabindex",null)("aria-label",null)("aria-labelledby",null)("aria-describedby",null),ne("mat-primary",r.color==="primary")("mat-accent",r.color==="accent")("mat-warn",r.color==="warn")("mat-mdc-radio-checked",r.checked)("mat-mdc-radio-disabled",r.disabled)("mat-mdc-radio-disabled-interactive",r.disabledInteractive)("_mat-animation-noopable",r._noopAnimations))},inputs:{id:"id",name:"name",ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],ariaDescribedby:[0,"aria-describedby","ariaDescribedby"],disableRipple:[2,"disableRipple","disableRipple",Ye],tabIndex:[2,"tabIndex","tabIndex",e=>e==null?0:Jn(e)],checked:[2,"checked","checked",Ye],value:"value",labelPosition:"labelPosition",disabled:[2,"disabled","disabled",Ye],required:[2,"required","required",Ye],color:"color",disabledInteractive:[2,"disabledInteractive","disabledInteractive",Ye]},outputs:{change:"change"},exportAs:["matRadioButton"],standalone:!0,features:[nn,se],ngContentSelectors:S_e,decls:13,vars:17,consts:[["formField",""],["input",""],["mat-internal-form-field","",3,"labelPosition"],[1,"mdc-radio"],[1,"mat-mdc-radio-touch-target",3,"click"],["type","radio",1,"mdc-radio__native-control",3,"change","id","checked","disabled","required"],[1,"mdc-radio__background"],[1,"mdc-radio__outer-circle"],[1,"mdc-radio__inner-circle"],["mat-ripple","",1,"mat-radio-ripple","mat-focus-indicator",3,"matRippleTrigger","matRippleDisabled","matRippleCentered"],[1,"mat-ripple-element","mat-radio-persistent-ripple"],[1,"mdc-label",3,"for"]],template:function(n,r){if(n&1){let o=te();Dn(),v(0,"div",2,0)(2,"div",3)(3,"div",4),H("click",function(a){return B(o),V(r._onTouchTargetClick(a))}),y(),v(4,"input",5,1),H("change",function(a){return B(o),V(r._onInputInteraction(a))}),y(),v(6,"div",6),ee(7,"div",7)(8,"div",8),y(),v(9,"div",9),ee(10,"div",10),y()(),v(11,"label",11),Wt(12),y()()}n&2&&(R("labelPosition",r.labelPosition),w(2),ne("mdc-radio--disabled",r.disabled),w(2),R("id",r.inputId)("checked",r.checked)("disabled",r.disabled&&!r.disabledInteractive)("required",r.required),qe("name",r.name)("value",r.value)("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledby)("aria-describedby",r.ariaDescribedby)("aria-disabled",r.disabled&&r.disabledInteractive?"true":null),w(5),R("matRippleTrigger",r._rippleTrigger.nativeElement)("matRippleDisabled",r._isRippleDisabled())("matRippleCentered",!0),w(2),R("for",r.inputId))},dependencies:[Ha,Uh],styles:['.mat-mdc-radio-button{-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-radio-button .mdc-radio{display:inline-block;position:relative;flex:0 0 auto;box-sizing:content-box;width:20px;height:20px;cursor:pointer;will-change:opacity,transform,border-color,color;padding:calc((var(--mdc-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled]):not(:focus)~.mdc-radio__background::before{opacity:.04;transform:scale(1)}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:not([disabled])~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-hover-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:hover .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-hover-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-pressed-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio:active .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-pressed-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__background{display:inline-block;position:relative;box-sizing:border-box;width:20px;height:20px}.mat-mdc-radio-button .mdc-radio__background::before{position:absolute;transform:scale(0, 0);border-radius:50%;opacity:0;pointer-events:none;content:"";transition:opacity 90ms cubic-bezier(0.4, 0, 0.6, 1),transform 90ms cubic-bezier(0.4, 0, 0.6, 1);width:var(--mdc-radio-state-layer-size, 40px);height:var(--mdc-radio-state-layer-size, 40px);top:calc(-1*(var(--mdc-radio-state-layer-size, 40px) - 20px)/2);left:calc(-1*(var(--mdc-radio-state-layer-size, 40px) - 20px)/2)}.mat-mdc-radio-button .mdc-radio__outer-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;border-width:2px;border-style:solid;border-radius:50%;transition:border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__inner-circle{position:absolute;top:0;left:0;box-sizing:border-box;width:100%;height:100%;transform:scale(0, 0);border-width:10px;border-style:solid;border-radius:50%;transition:transform 90ms cubic-bezier(0.4, 0, 0.6, 1),border-color 90ms cubic-bezier(0.4, 0, 0.6, 1)}.mat-mdc-radio-button .mdc-radio__native-control{position:absolute;margin:0;padding:0;opacity:0;top:0;right:0;left:0;cursor:inherit;z-index:1;width:var(--mdc-radio-state-layer-size, 40px);height:var(--mdc-radio-state-layer-size, 40px)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{transition:border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle{transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:focus+.mdc-radio__background::before{transform:scale(1);opacity:.12;transition:opacity 90ms cubic-bezier(0, 0, 0.2, 1),transform 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button .mdc-radio__native-control:disabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background{cursor:default}.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:disabled+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button .mdc-radio__native-control:enabled:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-icon-color, var(--mat-sys-on-surface-variant))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:checked+.mdc-radio__background .mdc-radio__inner-circle{border-color:var(--mdc-radio-selected-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button .mdc-radio__native-control:enabled:focus:checked+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-selected-focus-icon-color, var(--mat-sys-primary))}.mat-mdc-radio-button .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle{transform:scale(0.5);transition:transform 90ms cubic-bezier(0, 0, 0.2, 1),border-color 90ms cubic-bezier(0, 0, 0.2, 1)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled{pointer-events:auto}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:not(:checked)+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-unselected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-unselected-icon-opacity, 0.38)}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled:hover .mdc-radio__native-control:checked+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control:checked:focus+.mdc-radio__background .mdc-radio__outer-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background .mdc-radio__inner-circle,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__native-control+.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-disabled-selected-icon-color, var(--mat-sys-on-surface));opacity:var(--mdc-radio-disabled-selected-icon-opacity, 0.38)}.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__background::before,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__outer-circle,.mat-mdc-radio-button._mat-animation-noopable .mdc-radio__inner-circle{transition:none !important}.mat-mdc-radio-button .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.mat-mdc-radio-checked .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-checked .mdc-radio__background::before{background-color:var(--mat-radio-checked-ripple-color, var(--mat-sys-primary))}.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mat-ripple-element,.mat-mdc-radio-button.mat-mdc-radio-disabled-interactive .mdc-radio--disabled .mdc-radio__background::before{background-color:var(--mat-radio-ripple-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button .mat-internal-form-field{color:var(--mat-radio-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-radio-label-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-radio-label-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-radio-label-text-size, var(--mat-sys-body-medium-size));letter-spacing:var(--mat-radio-label-text-tracking, var(--mat-sys-body-medium-tracking));font-weight:var(--mat-radio-label-text-weight, var(--mat-sys-body-medium-weight))}.mat-mdc-radio-button .mdc-radio--disabled+label{color:var(--mat-radio-disabled-label-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-mdc-radio-button .mat-radio-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none;border-radius:50%}.mat-mdc-radio-button .mat-radio-ripple .mat-ripple-element{opacity:.14}.mat-mdc-radio-button .mat-radio-ripple::before{border-radius:50%}.mat-mdc-radio-button .mdc-radio .mdc-radio__native-control:focus:enabled:not(:checked)~.mdc-radio__background .mdc-radio__outer-circle{border-color:var(--mdc-radio-unselected-focus-icon-color, var(--mat-sys-on-surface))}.mat-mdc-radio-button.cdk-focused .mat-focus-indicator::before{content:""}.mat-mdc-radio-disabled{cursor:default;pointer-events:none}.mat-mdc-radio-disabled.mat-mdc-radio-disabled-interactive{pointer-events:auto}.mat-mdc-radio-touch-target{position:absolute;top:50%;left:50%;height:48px;width:48px;transform:translate(-50%, -50%);display:var(--mat-radio-touch-target-display, block)}[dir=rtl] .mat-mdc-radio-touch-target{left:auto;right:50%;transform:translate(50%, -50%)}'],encapsulation:2,changeDetection:0})}}return i})(),lj=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({imports:[Ht,Oe,Id,eR,Ht]})}}return i})();function O_e(i,t){i&1&&(v(0,"div",5),M(1," Synchronize the node selection across two panes by the given node id mapping. "),y())}function P_e(i,t){if(i&1){let e=te();v(0,"button",15),H("click",function(){B(e);let r=fe(3),o=I(3);return V(o.handleClickUpload(r))}),M(1," Upload "),y(),v(2,"input",16,2),H("change",function(){B(e);let r=fe(3),o=I(3);return V(o.handleUploadedFileChanged(r))}),y(),v(4,"div",17),M(5),y()}if(i&2){let e=I(3);w(5),we(" ",e.uploadedFileName," ")}}function R_e(i,t){if(i&1){let e=te();v(0,"div",12)(1,"div",13)(2,"mat-radio-button",14),H("change",function(){let r=B(e).$implicit,o=I(2);return V(o.setSyncMode(r))}),M(3),y(),W(4,P_e,6,1),y()()}if(i&2){let e,n=t.$implicit,r=I(2);w(2),ne("cns",n===r.SyncNavigationMode.LOAD_MAPPING_FROM_CNS),R("disableRipple",!0)("checked",r.syncMode()===n),w(),we(" ",r.getModeLabel(n)," "),w(),re((e=n)===r.SyncNavigationMode.UPLOAD_MAPPING_FROM_COMPUTER?4:-1)}}function A_e(i,t){if(i&1&&(v(0,"div",6)(1,"div",7)(2,"div"),M(3,"Select a sync mode"),y(),v(4,"div",8)(5,"a",9),M(6," Guide "),y(),v(7,"div",10)(8,"mat-icon",11),M(9,"close"),y()()()(),Xt(10,R_e,5,6,"div",12,wr),y()),i&2){let e=I();w(10),Qt(e.allSyncModes)}}var cj=(()=>{class i{dropdown;appService=S(nt);changeDetectorRef=S(Re);localStorageService=S(Mr);syncNavigationService=S(ha);snackBar=S(Os);SyncNavigationMode=In;allSyncModes;syncMode=this.syncNavigationService.mode;syncEnabled=Ot(()=>this.syncMode()!==In.DISABLED);syncIcon=Ot(()=>this.syncMode()===In.DISABLED&&!this.syncNavigationService.loadingFromCns()?"sync_disabled":"sync");loadingFromCns=this.syncNavigationService.loadingFromCns;helpPopupSize={minWidth:0,minHeight:0};dropdownSize={minWidth:0,minHeight:0,maxHeight:500};uploadedFileName="";constructor(){let e=this.appService.config()?.syncNavigationData;this.allSyncModes=e?[In.DISABLED,In.MATCH_NODE_ID,In.VISUALIZER_CONFIG,In.UPLOAD_MAPPING_FROM_COMPUTER]:[In.DISABLED,In.MATCH_NODE_ID,In.UPLOAD_MAPPING_FROM_COMPUTER],e&&(this.syncNavigationService.mode.set(In.VISUALIZER_CONFIG),this.syncNavigationService.updateSyncNavigationData(In.VISUALIZER_CONFIG,e))}setSyncMode(e){switch(this.syncNavigationService.mode.set(e),e){case In.DISABLED:case In.MATCH_NODE_ID:this.syncNavigationService.syncNavigationModeChanged$.next({mode:e});break;default:break}}getModeLabel(e){return v5[e]}handleClickUpload(e){this.syncNavigationService.mode.set(In.UPLOAD_MAPPING_FROM_COMPUTER),e.click()}handleUploadedFileChanged(e){let n=e.files;if(!n||n.length===0)return;let r=n[0];this.uploadedFileName="";let o=new FileReader;o.onload=s=>{this.syncNavigationService.processJsonData(s.target?.result,In.UPLOAD_MAPPING_FROM_COMPUTER)||(this.uploadedFileName=r.name,this.changeDetectorRef.markForCheck())},o.readAsText(r)}showError(e){console.error(e),this.snackBar.open(e,"Dismiss",{duration:5e3})}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=oe({type:i,selectors:[["sync-navigation-button"]],viewQuery:function(n,r){if(n&1&&Me(co,5),n&2){let o;_e(o=ve())&&(r.dropdown=o.first)}},standalone:!0,features:[se],decls:10,vars:10,consts:[["help",""],["dropdown",""],["input",""],[1,"container",3,"bubble","overlaySize","hoverDelayMs"],[1,"content",3,"bubbleClick","overlaySize"],[1,"model-explorer-help-popup"],[1,"model-explorer-sync-navigation-dropdown"],[1,"section-label"],[1,"right"],["href","https://github.com/google-ai-edge/model-explorer/wiki/2.-User-Guide#synchronize-navigation","target","_blank"],["bubbleClose","",1,"icon-container"],[1,"close"],[1,"section"],[1,"select-container"],["color","primary",3,"change","disableRipple","checked"],["mat-flat-button","","color","primary",1,"upload-mapping-button",3,"click"],["type","file","accept",".json",1,"upload-mapping-input",3,"change"],[1,"uploaded-file-name"]],template:function(n,r){if(n&1&&(v(0,"div",3)(1,"div",4)(2,"mat-icon"),M(3),y(),v(4,"div"),M(5,"Sync"),y()()(),W(6,O_e,2,0,"ng-template",null,0,Mt)(8,A_e,12,0,"ng-template",null,1,Mt)),n&2){let o=fe(7),s=fe(9);ne("enabled",r.syncEnabled()),R("bubble",o)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(),R("bubbleClick",s)("overlaySize",r.dropdownSize),w(),ne("loading",r.loadingFromCns()),w(),we(" ",r.syncIcon()," ")}},dependencies:[Nn,co,Oe,vn,gi,Je,dt,lo,lj,eR,$t],styles:[`@keyframes _ngcontent-%COMP%_rotating{0%{transform:rotate(0)}to{transform:rotate(360deg)}}.container[_ngcontent-%COMP%]{height:100%;display:flex;align-items:center;font-size:11px;cursor:pointer;color:#777;padding:0 5px;background-color:#fff;border-radius:99px;border:1px solid #ccc;box-sizing:border-box}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;opacity:.8}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]:hover{opacity:1}.container.enabled[_ngcontent-%COMP%]{background-color:#004fb8;color:#fff}.container.enabled[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff}.container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;height:18px;width:18px}.container[_ngcontent-%COMP%] mat-icon.loading[_ngcontent-%COMP%]{animation:_ngcontent-%COMP%_rotating 2s linear infinite} .model-explorer-sync-navigation-dropdown{font-size:12px;background-color:#fff;display:flex;flex-direction:column;padding-bottom:12px} .model-explorer-sync-navigation-dropdown .section-label{padding:8px 12px;margin-bottom:8px;font-size:11px;background:#f1f1f1;font-weight:500;text-transform:uppercase;display:flex;align-items:center;justify-content:space-between} .model-explorer-sync-navigation-dropdown .section-label .right{display:flex;align-items:center;gap:4px} .model-explorer-sync-navigation-dropdown .section-label .right .icon-container{display:flex;cursor:pointer;opacity:.8} .model-explorer-sync-navigation-dropdown .section-label .right .icon-container:hover{opacity:1} .model-explorer-sync-navigation-dropdown .section-label .right mat-icon{font-size:18px;height:18px;width:18px;color:#999} .model-explorer-sync-navigation-dropdown .section{padding-right:16px} .model-explorer-sync-navigation-dropdown mat-radio-button{cursor:pointer} .model-explorer-sync-navigation-dropdown mat-radio-button.cns{margin-top:8px} .model-explorer-sync-navigation-dropdown mat-radio-button>div[mat-internal-form-field]{height:24px} .model-explorer-sync-navigation-dropdown mat-radio-button div:has(>input[type=radio]){transform:scale(.7);margin-right:-8px} .model-explorer-sync-navigation-dropdown mat-radio-button label{letter-spacing:normal;cursor:pointer;font-size:12px;font-family:Google Sans Text,Google Sans,Arial,Helvetica,sans-serif} .model-explorer-sync-navigation-dropdown .select-container{display:flex;flex-direction:column} .model-explorer-sync-navigation-dropdown .upload-mapping-button{margin:2px 0 0 36px;width:90px;height:30px;font-size:12px!important;letter-spacing:normal!important} .model-explorer-sync-navigation-dropdown .upload-mapping-button.cns{margin-top:4px} .model-explorer-sync-navigation-dropdown .upload-mapping-button .mat-mdc-button-touch-target{display:none} .model-explorer-sync-navigation-dropdown .upload-mapping-input{display:none} .model-explorer-sync-navigation-dropdown .uploaded-file-name{margin-left:36px;color:#999;line-break:anywhere;line-height:14px} .model-explorer-sync-navigation-dropdown textarea{height:48px;box-sizing:border-box;margin:4px 0 0 36px;resize:none;border-radius:3px;font-family:Google Sans Text,Google Sans,Arial,Helvetica,sans-serif;font-size:11px;padding:2px;line-break:anywhere} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();var N_e=["panesContainer"],k_e=["noMappedNodeMessage"],L_e=["splitPane"],F_e=(i,t)=>t.label;function B_e(i,t){i&1&&(v(0,"div",12),M(1),y()),i&2&&(w(),we(" ",t," "))}function V_e(i,t){i&1&&(v(0,"mat-icon"),M(1,"error"),y())}function z_e(i,t){i&1&&ee(0,"mat-spinner",14)}function U_e(i,t){i&1&&ee(0,"mat-spinner",22)}function H_e(i,t){i&1&&(v(0,"mat-icon"),M(1,"check_circle"),y())}function G_e(i,t){if(i&1&&(v(0,"div",21),W(1,U_e,1,0,"mat-spinner",22)(2,H_e,2,0,"mat-icon"),v(3,"div",23),M(4),y()()),i&2){let e=t.$implicit;w(),re(e.processing?1:2),w(3),we(" ",e.label," ")}}function j_e(i,t){if(i&1&&(v(0,"div",20),Xt(1,G_e,5,2,"div",21,F_e),y()),i&2){let e=I(3).$implicit,n=I();w(),Qt(n.getProcessingTasksForPane(e.id))}}function W_e(i,t){if(i&1&&(v(0,"div",13),W(1,V_e,2,0,"mat-icon")(2,z_e,1,0,"mat-spinner",14),M(3," Processing graph... "),y(),v(4,"div",15),M(5," Please remain on this page while the model is being processed "),y(),v(6,"div",16)(7,"div",17),ee(8,"div",18),y(),v(9,"div",19)(10,"mat-icon"),M(11,"info"),y()(),W(12,j_e,3,0,"ng-template",null,2,Mt),y()),i&2){let e=fe(13),n=I(2).$implicit,r=I();w(),re(r.getProcessingError(n)?1:2),w(7),an("width",r.getProgressPct(n.id),"%"),w(),R("bubble",e)("hoverDelayMs",100)}}function $_e(i,t){if(i&1&&(v(0,"div",9),W(1,B_e,2,1,"div",12)(2,W_e,14,5),y()),i&2){let e,n=I().$implicit,r=I();R("@hideProcessingPanel",void 0)("@.disabled",r.disableAnimation),w(),re((e=r.getProcessingError(n))?1:2,e)}}function q_e(i,t){if(i&1){let e=te();v(0,"div",24)(1,"div",25),M(2),y(),v(3,"div",26)(4,"div",27),H("click",function(){B(e);let r=I(2);return V(r.handleClickSwapPane())})("mousedown",function(r){return B(e),V(r.stopPropagation())}),v(5,"mat-icon"),M(6,"swap_horiz"),y()(),v(7,"div",28),H("click",function(){B(e);let r=I().$implicit,o=I();return V(o.handleClickClosePane(r))})("mousedown",function(r){return B(e),V(r.stopPropagation())}),v(8,"mat-icon"),M(9,"close"),y()()()()}if(i&2){let e=I(),n=e.$implicit,r=e.index,o=I();ne("extra-left-padding",r===1)("extra-right-padding",r===0),w(2),we(" ",o.getPaneTitle(n)," ")}}function Y_e(i,t){if(i&1&&(v(0,"div",8),W(1,$_e,3,3,"div",9)(2,q_e,10,5,"div",10),ee(3,"split-pane",11,1),y()),i&2){let e=t.$implicit,n=t.index,r=I();an("width",r.getPaneWidthPct(n),"%"),ne("selected",r.isPaneSelected(e)),qe("data-pane-id",e.id),w(),re(r.getShowLoading(e)?1:-1),w(),R("ngIf",r.hasSplitPane),w(),R("pane",e)}}function X_e(i,t){if(i&1){let e=te();v(0,"div",29),H("mousedown",function(r){B(e);let o=I(),s=fe(1);return V(o.handleMouseDownResizer(r,s))}),ee(1,"div",30),y()}if(i&2){let e=I();an("left",e.resizerLeft)}}function Q_e(i,t){if(i&1&&(v(0,"div",31),ee(1,"sync-navigation-button"),v(2,"div",32,3),M(4," No mapped node found "),y()()),i&2){let e=I();an("left",e.resizerLeft)}}var dj=(()=>{class i{changeDetectorRef;appService;destroyRef;syncNavigationService;workerService;panesContainer;noMappedNodeMessage;splitPanes=new Wi;processingTasks={};allPanesLoaded;resizingSplitPane=!1;curLeftWidthFraction=1;panes;curUpdateProcessingProgressReq;hideNoMappedNodeMessageTimeoutId=-1;constructor(e,n,r,o,s){this.changeDetectorRef=e,this.appService=n,this.destroyRef=r,this.syncNavigationService=o,this.workerService=s,this.panes=this.appService.panes,this.allPanesLoaded=Ot(()=>this.panes().every(a=>a.modelGraph!=null)),ct(()=>{let a=this.panes();a.length>=1&&(this.curLeftWidthFraction=a[0].widthFraction);for(let l of a)l.modelGraph||(this.processingTasks[l.id]=w3.map(c=>({label:c,processing:!0})));this.changeDetectorRef.detectChanges();for(let l=0;l{switch(a.data.eventType){case sr.UPDATE_PROCESSING_PROGRESS:this.handleUpdateProcessingProgressRequest(a.data);break;default:break}}),this.syncNavigationService.showNoMappedNodeMessageTrigger$.pipe(fi(this.destroyRef)).subscribe(a=>{a===void 0?this.hideNoMappedNodeMessage():this.showNoMappedNodeMessage()})}ngAfterViewInit(){this.panesContainer.nativeElement.addEventListener("mousedown",e=>{let n=e.target.closest(".pane-container");if(!n)return;let r=n.dataset.paneId||"";this.appService.selectPane(r)},!0)}handleClickSwapPane(){this.appService.swapPane()}handleClickClosePane(e){this.appService.closePane(e.id)}getPaneTitle(e){let n=e.modelGraph;return n?`${n.collectionLabel} | ${n.id}`:"-"}handleMouseDownResizer(e,n){e.preventDefault(),document.body.style.cursor="ew-resize";let r=wn(document,"mousemove"),o=wn(window,"mouseup"),a=this.appService.panes()[0].widthFraction,l=n.offsetWidth,c=l*a,d=e.clientX;this.resizingSplitPane=!0,this.changeDetectorRef.markForCheck(),ji([r]).pipe(Ke(o)).subscribe({next:([u])=>{let h=u.clientX-d,p=Math.min(l-200,Math.max(200,c+h));this.curLeftWidthFraction=p/l,this.changeDetectorRef.markForCheck()},complete:()=>{document.body.style.cursor="default",this.resizingSplitPane=!1,this.appService.setPaneWidthFraction(this.curLeftWidthFraction),this.changeDetectorRef.markForCheck()}})}isPaneSelected(e){return e.id===this.appService.selectedPaneId()}getPaneWidthPct(e){return(e===0?this.curLeftWidthFraction:1-this.curLeftWidthFraction)*100}trackByPaneId(e,n){return n.id}getProcessingTasksForPane(e){return this.processingTasks[e]||[]}getProgressPct(e){let n=this.processingTasks[e];return n?n.filter(o=>!o.processing).length/n.length*100:0}getShowLoading(e){return e.modelGraph==null||this.getProcessingTasksForPane(e.id).some(n=>n.error!=null&&n.error!=="")}getProcessingError(e){return this.getProcessingTasksForPane(e.id).find(n=>n.error!=null&&n.error!=="")?.error??""}get hasSplitPane(){return this.appService.panes().length>1}get resizerLeft(){return`calc(${this.curLeftWidthFraction*100}% - 5px)`}get disableAnimation(){return this.appService.testMode}handleUpdateProcessingProgressRequest(e){let n=e.paneId;if(!this.appService.getPaneById(n))return;let s=this.processingTasks[n].find(a=>a.label===e.label);s!=null&&(s.processing=!1,s.error=e.error,this.changeDetectorRef.detectChanges())}hideNoMappedNodeMessage(){let e=this.noMappedNodeMessage?.nativeElement;e&&(this.hideNoMappedNodeMessageTimeoutId>=0&&(clearTimeout(this.hideNoMappedNodeMessageTimeoutId),this.hideNoMappedNodeMessageTimeoutId=-1),e.classList.remove("show"))}showNoMappedNodeMessage(){let e=this.noMappedNodeMessage?.nativeElement;e&&(this.hideNoMappedNodeMessageTimeoutId>=0&&(clearTimeout(this.hideNoMappedNodeMessageTimeoutId),this.hideNoMappedNodeMessageTimeoutId=-1),e.classList.add("show"),this.hideNoMappedNodeMessageTimeoutId=setTimeout(()=>{e.classList.remove("show")},3e3))}static \u0275fac=function(n){return new(n||i)(q(Re),q(nt),q(hi),q(ha),q(Hl))};static \u0275cmp=oe({type:i,selectors:[["split-panes-container"]],viewQuery:function(n,r){if(n&1&&(Me(N_e,5),Me(k_e,5),Me(L_e,5)),n&2){let o;_e(o=ve())&&(r.panesContainer=o.first),_e(o=ve())&&(r.noMappedNodeMessage=o.first),_e(o=ve())&&(r.splitPanes=o)}},standalone:!0,features:[se],decls:5,vars:4,consts:[["panesContainer",""],["splitPane",""],["progressPopup",""],["noMappedNodeMessage",""],[1,"container"],["class","pane-container",3,"selected","width",4,"ngFor","ngForOf","ngForTrackBy"],["class","resizer split-pane",3,"left","mousedown",4,"ngIf"],[1,"sync-navigation-container",3,"left"],[1,"pane-container"],[1,"loading"],["class","pane-title-container",3,"extra-left-padding","extra-right-padding",4,"ngIf"],[3,"pane"],[1,"error-msg"],[1,"processing-msg-container"],["color","primary","diameter","18"],[1,"stay-on-page-info"],[1,"progress-bar-wrapper"],[1,"progress-bar-container"],[1,"progress-bar-body"],[1,"icon-container",3,"bubble","hoverDelayMs"],[1,"model-explorer-processing-tasks-container"],[1,"processing-task-container"],["color","primary","diameter","16"],[1,"task-label"],[1,"pane-title-container"],[1,"pane-title"],[1,"buttons-container"],["matTooltip","Swap pane",1,"icon-container","swap",3,"click","mousedown"],["matTooltip","Close pane",1,"icon-container","close",3,"click","mousedown"],[1,"resizer","split-pane",3,"mousedown"],[1,"resizer-line"],[1,"sync-navigation-container"],[1,"no-mapped-node-message"]],template:function(n,r){n&1&&(v(0,"div",4,0),W(2,Y_e,5,8,"div",5)(3,X_e,2,2,"div",6)(4,Q_e,5,2,"div",7),y()),n&2&&(w(2),R("ngForOf",r.panes())("ngForTrackBy",r.trackByPaneId),w(),R("ngIf",r.hasSplitPane),w(),re(r.hasSplitPane&&r.allPanesLoaded()?4:-1))},dependencies:[Nn,Oe,Oi,On,Je,dt,lo,pa,$t,qn,aj,cj],styles:[`.container[_ngcontent-%COMP%]{flex-grow:1;display:flex;position:relative;width:100%;height:100%}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%]{position:relative;display:flex;flex-direction:column}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%]{height:24px;box-sizing:border-box;background-color:#eee;padding:0 12px;display:flex;align-items:center;justify-content:space-between;font-size:12px;color:#999;cursor:pointer;flex-shrink:0}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container.extra-left-padding[_ngcontent-%COMP%]{padding-left:36px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container.extra-right-padding[_ngcontent-%COMP%]{padding-right:36px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%] .buttons-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;color:#999;opacity:.8;margin-left:6px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;height:18px;width:18px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{width:1px;height:12px;background-color:#999;margin:0 4px 0 12px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] split-pane[_ngcontent-%COMP%]{width:100%;flex-grow:1;display:flex;overflow:hidden}.container[_ngcontent-%COMP%] .pane-container.selected[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#fff}.container[_ngcontent-%COMP%] .pane-container.selected[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%]{background-color:#ea8600;color:#fff}.container[_ngcontent-%COMP%] .pane-container.selected[_ngcontent-%COMP%] .pane-title-container[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{background-color:#fff}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:150;color:#999;background-color:#fff;display:flex;align-items:center;justify-content:center;flex-direction:column}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .processing-msg-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .processing-msg-container[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{margin-right:8px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;margin-top:18px;margin-right:-30px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-wrapper[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{cursor:pointer;opacity:.8;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-wrapper[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-wrapper[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{color:#ccc;font-size:18px;width:18px;height:18px;margin-left:6px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-container[_ngcontent-%COMP%]{height:7px;width:280px;border:1px solid #ccc;border-radius:99px;box-sizing:border-box;overflow:hidden}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .progress-bar-container[_ngcontent-%COMP%] .progress-bar-body[_ngcontent-%COMP%]{height:100%;transition:width .1s;background-color:#ccc}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .stay-on-page-info[_ngcontent-%COMP%]{font-size:12px;width:100%;display:flex;justify-content:center;margin-top:4px}.container[_ngcontent-%COMP%] .pane-container[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .error-msg[_ngcontent-%COMP%]{font-size:13px;padding:16px;color:#a00}.container[_ngcontent-%COMP%] .resizer[_ngcontent-%COMP%]{height:100%;width:10px;top:0;left:50%;display:flex;align-items:center;justify-content:center;position:absolute;padding-left:1px;cursor:ew-resize;z-index:200}.container[_ngcontent-%COMP%] .resizer[_ngcontent-%COMP%]:hover{background-color:#0000000a}.container[_ngcontent-%COMP%] .resizer[_ngcontent-%COMP%]:hover .resizer-line[_ngcontent-%COMP%]{border-color:#fcc986}.container[_ngcontent-%COMP%] .resizer[_ngcontent-%COMP%] .resizer-line[_ngcontent-%COMP%]{height:100%;width:1px;border-left:1px solid #999}.container[_ngcontent-%COMP%] .sync-navigation-container[_ngcontent-%COMP%]{position:absolute;transform:translate(-22px);top:0;height:24px;z-index:250}.container[_ngcontent-%COMP%] .sync-navigation-container[_ngcontent-%COMP%] .no-mapped-node-message[_ngcontent-%COMP%]{position:absolute;top:28px;width:140px;font-size:12px;left:-44px;background-color:#a00;color:#fff;padding:2px 4px;display:flex;align-items:center;justify-content:center;border-radius:99px;pointer-events:none;opacity:0;transition:opacity .1s}.container[_ngcontent-%COMP%] .sync-navigation-container[_ngcontent-%COMP%] .no-mapped-node-message.show[_ngcontent-%COMP%]{opacity:1} .model-explorer-processing-tasks-container{display:flex;flex-direction:column;padding:12px} .model-explorer-processing-tasks-container .processing-task-container{display:flex;align-items:center;font-size:13px;margin:2px 0} .model-explorer-processing-tasks-container .processing-task-container mat-spinner{margin-right:8px;width:16px} .model-explorer-processing-tasks-container .processing-task-container mat-icon{color:#0a0;font-size:16px;width:16px;height:16px;margin-right:8px} + + + + + + + + + + + + + + + + + +`],data:{animation:[pi("hideProcessingPanel",[Fn("* => void",Ln("150ms 100ms ease-out",en({opacity:0,transform:"scale(0.95, 0.95)"})))])]},changeDetection:0})}return i})();function Z_e(i,t){if(i&1){let e=te();v(0,"button",1),H("click",function(){B(e);let r=I();return V(r.handleClickOpenInNewTab())}),v(1,"mat-icon"),M(2,"open_in_new"),y(),M(3," Open in new tab "),y()}}var oS=(()=>{class i{showOpenInNewTab;isChrome=/Chrome/.test(navigator.userAgent);constructor(){let e=new URLSearchParams(window.location.search);this.showOpenInNewTab=e.get("show_open_in_new_tab")==="1"&&this.isChrome}handleClickOpenInNewTab(){let e=new URL(window.location.href),n=new URLSearchParams(e.search);n.delete("show_open_in_new_tab"),e.search=n.toString(),window.open(e.toString(),"_blank")}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=oe({type:i,selectors:[["open-in-new-tab-button"]],standalone:!0,features:[se],decls:1,vars:1,consts:[["mat-flat-button","","color","primary",1,"btn-open-in-tab"],["mat-flat-button","","color","primary",1,"btn-open-in-tab",3,"click"]],template:function(n,r){n&1&&W(0,Z_e,4,0,"button",0),n&2&&re(r.showOpenInNewTab?0:-1)},dependencies:[Oe,vn,gi,Je,dt],encapsulation:2})}return i})();function K_e(i,t){i&1&&(v(0,"mat-icon",15),M(1," turn_left "),y())}function J_e(i,t){if(i&1){let e=te();v(0,"div",16),H("click",function(r){B(e);let o=I().$implicit,s=I(2);return V(s.handleClickOpenInSplitPane(r,o))}),v(1,"div",17),ee(2,"div",18),y()()}}function eve(i,t){if(i&1){let e=te();v(0,"div",7)(1,"div",8)(2,"div",9),H("click",function(){let r=B(e).$implicit,o=I(2);return V(o.handleSelectGraph(r))}),v(3,"div",10),W(4,K_e,2,0,"mat-icon",11),v(5,"div",12),M(6),y()(),v(7,"div",13),M(8),y()(),W(9,J_e,3,0,"div",14),y()()}if(i&2){let e=t.$implicit,n=I(2);qe("data-id",e.id),w(),an("padding-left",n.getGraphItemPaddingLeft(e),"px"),ne("selected",e.id===n.selectedGraphId()),w(3),R("ngIf",n.showIndentSymbol(e)),w(2),we(" ",e.id," "),w(2),we(" ",n.getGraphNonHiddenNodeCountLabel(e.nonHiddenNodeCount)," "),w(),R("ngIf",n.showOpenInSplitPane)}}function tve(i,t){if(i&1&&(v(0,"div",4)(1,"div",5),M(2),y(),W(3,eve,10,9,"div",6),y()),i&2){let e=t.$implicit,n=I();w(2),we(" ",e.label," "),w(),R("ngForOf",e.graphs)("ngForTrackBy",n.trackByGraph)}}var uj=24,hj=(()=>{class i{appService;graphCollectionItems=[];onClose=new Ie;hasFilteredOutGraphs=!1;selectedGraphId=Ot(()=>{let e=this.appService.getSelectedPane();return!e||!e.modelGraph?"":e.modelGraph.id});curFilterText="";constructor(e){this.appService=e}getGraphNonHiddenNodeCountLabel(e){return`${e} node${e===1?"":"s"}`}handleSelectGraph(e){this.onClose.next({}),this.resetFilter(),this.appService.selectGraphInCurrentPane(e.graph),this.appService.curInitialUiState.set(void 0),this.appService.selectNode(this.appService.selectedPaneId(),void 0),this.appService.curToLocateNodeInfo.set(void 0),this.appService.setFlattenLayersInCurrentPane(!1)}handleFilterTextChanged(e){this.curFilterText=e.toLowerCase()}handleClickOpenInSplitPane(e,n){e.stopPropagation(),this.onClose.next({}),this.resetFilter(),this.appService.openGraphInSplitPane(n.graph)}showIndentSymbol(e){return!this.hasFilteredOutGraphs&&(e.graph.level??0)>0}getGraphItemPaddingLeft(e){return this.hasFilteredOutGraphs?uj:uj+(e.graph.level??0)*12}trackByCollection(e,n){return`${e}`}trackByGraph(e,n){return`${n.graph.collectionLabel}___${n.graph.id}`}get curGraphCollectionItems(){let e=[];this.hasFilteredOutGraphs=!1;for(let{label:n,collection:r,graphs:o}of this.graphCollectionItems){let s={label:n,collection:r,graphs:[]};for(let a of o){if(this.curFilterText!==""&&!a.id.toLowerCase().includes(this.curFilterText)){this.hasFilteredOutGraphs=!0;continue}s.graphs.push(a)}s.graphs.length>0&&e.push(s)}return e}get showOpenInSplitPane(){return this.appService.panes().length===1}resetFilter(){this.curFilterText="",this.hasFilteredOutGraphs=!1}static \u0275fac=function(n){return new(n||i)(q(nt))};static \u0275cmp=oe({type:i,selectors:[["graph-selector-panel"]],inputs:{graphCollectionItems:"graphCollectionItems"},outputs:{onClose:"onClose"},standalone:!0,features:[se],decls:4,vars:3,consts:[["input",""],[1,"container"],["placeholder","Filter graphs",3,"input"],["class","collection-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"collection-container"],[1,"collection-label"],["class","graph-item-container",4,"ngFor","ngForOf","ngForTrackBy"],[1,"graph-item-container"],[1,"graph-item"],[1,"graph-info-wrapper",3,"click"],[1,"graph-label-wrapper"],["class","indent-symbol",4,"ngIf"],[1,"graph-label"],[1,"node-count-label"],["class","action-button","matTooltip","Open in split pane","matTooltipPosition","right",3,"click",4,"ngIf"],[1,"indent-symbol"],["matTooltip","Open in split pane","matTooltipPosition","right",1,"action-button",3,"click"],[1,"block-container"],[1,"right-block"]],template:function(n,r){if(n&1){let o=te();v(0,"div",1)(1,"input",2,0),H("input",function(){B(o);let a=fe(2);return V(r.handleFilterTextChanged(a.value))}),y(),W(3,tve,4,3,"div",3),y()}n&2&&(R("@transformPanel","showing"),w(3),R("ngForOf",r.curGraphCollectionItems)("ngForTrackBy",r.trackByCollection))},dependencies:[Oe,Oi,On,fa,Je,dt,ma,$t,qn,Ir],styles:[`.container[_ngcontent-%COMP%]{box-shadow:0 3px 5px -1px #0003,0 6px 10px #00000024,0 1px 18px #0000001f;transform-origin:top center;font-size:12px;padding:8px 0;border-radius:0 0 4px 4px;max-height:100%;overflow-y:auto}.container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{font-size:12px;margin:4px 10px;width:calc(100% - 20px);box-sizing:border-box;pointer-events:all;border:1px solid #ccc;height:20px;border-radius:4px;padding:0 2px}.container[_ngcontent-%COMP%] .collection-container[_ngcontent-%COMP%] .collection-label[_ngcontent-%COMP%]{font-weight:700;padding:4px 12px}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;padding:4px 12px 4px 24px;cursor:pointer}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%]:hover{background-color:#0000000a}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item.selected[_ngcontent-%COMP%]{background-color:#c2e7ff}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .graph-info-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-grow:1}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .graph-label-wrapper[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .indent-symbol[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;color:#999;margin-right:4px;transform:rotate(-180deg)}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .graph-label[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .node-count-label[_ngcontent-%COMP%]{color:#999;margin-left:12px}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]{flex-shrink:0;width:16px;height:16px;display:flex;align-items:center;margin-left:6px;opacity:.8;cursor:pointer}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] .block-container[_ngcontent-%COMP%]{border-radius:3px;border:1px solid #999;height:100%;width:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:flex-end;padding:1px}.container[_ngcontent-%COMP%] .graph-item-container[_ngcontent-%COMP%] .graph-item[_ngcontent-%COMP%] .action-button[_ngcontent-%COMP%] .block-container[_ngcontent-%COMP%] .right-block[_ngcontent-%COMP%]{height:100%;width:50%;background-color:#999;border-top-right-radius:2px;border-bottom-right-radius:2px} + + + + + + + + + + + + + + + + + +`],data:{animation:RC},changeDetection:0})}return i})();var nve=["input"];function ive(i,t){if(i&1&&(v(0,"div",16),M(1),y()),i&2){let e=I();w(),we(" ",e.selectedGraphNodeCount," nodes ")}}function rve(i,t){if(i&1){let e=te();v(0,"div",17),H("click",function(){B(e);let r=I();return V(r.handleClickExportGraphJsonToResource())}),v(1,"mat-icon"),M(2,"drive_folder_upload"),y()()}}function ove(i,t){if(i&1){let e=te();v(0,"mat-optgroup",18)(1,"mat-option")(2,"input",19,1),H("click",function(r){return B(e),V(r.stopPropagation())})("keydown.space",function(r){return B(e),V(r.stopPropagation())})("input",function(){B(e);let r=fe(3),o=I();return V(o.handleFilterTextChanged(r.value))}),y()()()}}function sve(i,t){if(i&1){let e=te();v(0,"div",26),H("click",function(r){B(e);let o=I().$implicit,s=I(2);return V(s.handleClickOpenInSplitPane(r,o))}),v(1,"div",27),ee(2,"div",28),y()()}}function ave(i,t){if(i&1&&(v(0,"mat-option",22)(1,"div",23)(2,"div",24)(3,"div",7),M(4),y(),v(5,"div",16),M(6),y()(),W(7,sve,3,0,"div",25),y()()),i&2){let e=t.$implicit,n=I(2);ne("selected",e.graph===n.selectedGraph.value),R("value",e.graph),qe("data-id",e.id),w(4),lt(e.id),w(2),we(" ",e.nonHiddenNodeCount," nodes "),w(),R("ngIf",n.showOpenInSplitPane)}}function lve(i,t){if(i&1&&(v(0,"mat-optgroup",20),W(1,ave,8,7,"mat-option",21),y()),i&2){let e=t.$implicit;R("label",e.label),w(),R("ngForOf",e.graphs)}}var cve=new OffscreenCanvas(500,300),pj={},fj=(()=>{class i{appService;overlay;viewContainerRef;mySelector;filterInput;selectedGraph=new Er(void 0);selectedGraphNodeCount=0;selectedGraphCollectionLabel="";selectedCollection;maxGraphItemIdWidth=0;graphCollectionItems=Ot(()=>{let e=this.appService.config();if(!e)return[];let n=this.appService.curGraphCollections();this.nodeLabelsToHide=new Set((e.nodeLabelsToHide||[]).map(s=>s.toLowerCase()));let r=[],o=this.curFilterText().toLowerCase();for(let s of n){let a={label:s.label,collection:s,graphs:[]};for(let l of s.graphs){if(o!==""&&!l.id.toLowerCase().includes(o))continue;let c=l.nodes.filter(u=>!this.nodeLabelsToHide.has(u.label.toLowerCase())).length,d=this.getLabelWidth(` ${l.id} ${c} nodes`)+30;a.graphs.push({id:l.id,graph:l,nonHiddenNodeCount:c,width:d}),this.maxGraphItemIdWidth=Math.max(d+30,this.maxGraphItemIdWidth)}if(a.graphs.length>0){r.push(a);let l=this.getLabelWidth(s.label,12,!0)+30;this.maxGraphItemIdWidth=Math.max(l,this.maxGraphItemIdWidth)}}return r});graphsCount=Ot(()=>{let e=0,n=this.appService.curGraphCollections();for(let r of n)e+=r.graphs.length;return e});nodeLabelsToHide=new Set;curFilterText=et("");portal=null;selectedGraphId=Ot(()=>{let e=this.appService.getSelectedPane();return!e||!e.modelGraph?"":e.modelGraph.id});constructor(e,n,r){this.appService=e,this.overlay=n,this.viewContainerRef=r,ct(()=>{let o=this.selectedGraphId();o&&this.updateSelectedGraphInfo(o)})}handleFilterTextChanged(e){this.curFilterText.set(e)}handleClickOpenGraphDropdown(e){let n=this.createOverlay(e),r=n.attach(this.portal);r.instance.graphCollectionItems=this.graphCollectionItems(),r.instance.onClose.subscribe(()=>{n.dispose()})}handleGraphSelectorOpenedChanged(e){e||(this.filterInput.nativeElement.value="",this.curFilterText.set(""))}handleGraphSelected(){this.selectedGraph.value&&(this.updateSelectedGraphInfo(this.selectedGraph.value.id),this.appService.selectGraphInCurrentPane(this.selectedGraph.value),this.appService.curInitialUiState.set(void 0),this.appService.selectNode(this.appService.selectedPaneId(),void 0),this.appService.curToLocateNodeInfo.set(void 0),this.appService.setFlattenLayersInCurrentPane(!1))}handleClickOpenInSplitPane(e,n){e.stopPropagation(),this.mySelector.close(),this.appService.openGraphInSplitPane(n.graph)}handleClickDownloadGraphJson(){if(this.selectedCollection==null)return;let e=document.createElement("a");e.download=`${this.selectedGraphCollectionLabel}.json`;let n=`data:text/json;charset=utf-8, ${encodeURIComponent(JSON.stringify(this.selectedCollection,null,2))}`;dl(e,n),e.click()}handleClickExportGraphJsonToResource(){!this.selectedCollection!=null&&ub(`${this.selectedGraphCollectionLabel}.json`,this.selectedCollection)}getGraphLabel(e){return`${e.id} (${e.nodes.length} nodes)`}get graphSelectorDropdownWidth(){return this.maxGraphItemIdWidth}get showOpenInSplitPane(){return this.appService.panes().length===1}get enableExportToResource(){return this.appService.config()?.enableExportToResource===!0}getLabelWidth(e,n=12,r=!1){let o=e,s=pj[o];if(s==null){let a=cve.getContext("2d");a.font=`${n}px "Google Sans Text", Arial, Helvetica, sans-serif`,r&&(a.font=`bold ${a.font}`);let c=a.measureText(e).width;pj[o]=c,s=c}return s}updateSelectedGraphInfo(e){let n=!1;for(let r of this.graphCollectionItems()){for(let o of r.graphs)if(o.graph.id===e){this.selectedGraphNodeCount=o.nonHiddenNodeCount,this.selectedGraphCollectionLabel=r.label,this.selectedCollection=r.collection,this.selectedGraph.setValue(o.graph),n=!0;break}if(n)break}}createOverlay(e){let n=new bi({positionStrategy:this.overlay.position().flexibleConnectedTo(e).withPositions([{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}]),maxHeight:"calc(100% - 70px)",hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",scrollStrategy:this.overlay.scrollStrategies.reposition(),panelClass:"graph-selector-panel"}),r=this.overlay.create(n);return this.portal=new Li(hj,this.viewContainerRef),r.backdropClick().subscribe(()=>{r.dispose()}),r}static \u0275fac=function(n){return new(n||i)(q(nt),q(on),q(Kt))};static \u0275cmp=oe({type:i,selectors:[["graph-selector"]],viewQuery:function(n,r){if(n&1&&(Me(eS,5),Me(nve,5)),n&2){let o;_e(o=ve())&&(r.mySelector=o.first),_e(o=ve())&&(r.filterInput=o.first)}},standalone:!0,features:[se],decls:22,vars:7,consts:[["selector",""],["input",""],[1,"container"],[1,"collection-label"],[1,"graph-selector-label",3,"click"],[1,"selector-label-container"],[1,"selector-label-content"],[1,"option-label"],["class","node-count-label",4,"ngIf"],[1,"triangle"],["matTooltip","Download processed graphs json",1,"mat-icon-container",3,"click"],["matTooltip","Export to resource",1,"mat-icon-container"],[1,"select-form"],["color","primary","panelClass","graph-selector-panel",3,"selectionChange","openedChange","formControl"],["class","graph-search-optgroup",4,"ngIf"],[3,"label",4,"ngFor","ngForOf"],[1,"node-count-label"],["matTooltip","Export to resource",1,"mat-icon-container",3,"click"],[1,"graph-search-optgroup"],["placeholder","Filter graphs",3,"click","keydown.space","input"],[3,"label"],[3,"selected","value",4,"ngFor","ngForOf"],[3,"value"],[1,"option-wrapper"],[1,"option-container"],["class","action-button","matTooltip","Open in split pane","matTooltipPosition","right",3,"click",4,"ngIf"],["matTooltip","Open in split pane","matTooltipPosition","right",1,"action-button",3,"click"],[1,"block-container"],[1,"right-block"]],template:function(n,r){if(n&1){let o=te();v(0,"div",2)(1,"div",3),M(2),y(),v(3,"div",4,0),H("click",function(){B(o);let a=fe(4);return V(r.handleClickOpenGraphDropdown(a))}),v(5,"div",5)(6,"div",6)(7,"div",7),M(8),y(),W(9,ive,2,1,"div",8),y(),v(10,"div",9),M(11,"\u25BC"),y()()(),v(12,"div",10),H("click",function(){return B(o),V(r.handleClickDownloadGraphJson())}),v(13,"mat-icon"),M(14,"download"),y()(),W(15,rve,3,0,"div",11),v(16,"mat-form-field",12)(17,"mat-label"),M(18,"Select an option"),y(),v(19,"mat-select",13),H("selectionChange",function(){return B(o),V(r.handleGraphSelected())})("openedChange",function(a){return B(o),V(r.handleGraphSelectorOpenedChanged(a))}),W(20,ove,4,0,"mat-optgroup",14)(21,lve,2,2,"mat-optgroup",15),y()()()}n&2&&(w(2),we(" ",r.selectedGraphCollectionLabel," "),w(6),lt((r.selectedGraph.value==null?null:r.selectedGraph.value.id)||"-"),w(),R("ngIf",r.selectedGraph.value),w(6),re(r.enableExportToResource?15:-1),w(4),R("formControl",r.selectedGraph),w(),R("ngIf",r.graphsCount()>1),w(),R("ngForOf",r.graphCollectionItems()))},dependencies:[Oe,Oi,On,fa,H5,JC,Je,dt,ma,eS,Yl,mB,$t,qn,Ir,Wo,Co],styles:[`.container[_ngcontent-%COMP%]{font-size:12px;display:flex;align-items:center;line-height:14px;position:relative}.container[_ngcontent-%COMP%] .collection-label[_ngcontent-%COMP%]{font-weight:700;margin-right:6px}.container[_ngcontent-%COMP%] .select-form[_ngcontent-%COMP%]{height:0;max-height:0;position:absolute;top:26px;right:28px}.container[_ngcontent-%COMP%] .select-form[_ngcontent-%COMP%] >*{height:0}.container[_ngcontent-%COMP%] .selector-label-content[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-grow:1}.container[_ngcontent-%COMP%] .option-label[_ngcontent-%COMP%]{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;margin-right:2px}.container[_ngcontent-%COMP%] .node-count-label[_ngcontent-%COMP%]{color:#999;margin-left:12px}.container[_ngcontent-%COMP%] .triangle[_ngcontent-%COMP%]{font-size:10px;margin-left:8px}.container[_ngcontent-%COMP%] .graph-selector-label[_ngcontent-%COMP%]{font-size:12px;border:1px solid #aaa;border-radius:3px;padding:2px 4px;cursor:pointer;flex-grow:1;height:24px;display:flex;box-sizing:border-box}.container[_ngcontent-%COMP%] .graph-selector-label[_ngcontent-%COMP%] .selector-label-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;flex-grow:1}.container[_ngcontent-%COMP%] .graph-selector-label[_ngcontent-%COMP%]:hover{border-color:#ea8600}.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;margin-left:4px;cursor:pointer;opacity:.6}.container[_ngcontent-%COMP%] .mat-icon-container[_ngcontent-%COMP%]:hover{opacity:1} .graph-selector-panel{background-color:#fff} .graph-selector-panel mat-option{height:24px;font-size:12px;min-height:unset;padding:1px 0;padding-left:20px!important;background-color:none!important} .graph-selector-panel mat-option .option-wrapper{display:flex;align-items:center} .graph-selector-panel mat-option .option-container{display:flex;align-items:center;justify-content:space-between;letter-spacing:normal;font-family:Google Sans Text,Arial,Helvetica,sans-serif;flex-grow:1} .graph-selector-panel mat-option .option-container .option-label{overflow:hidden;white-space:nowrap;text-overflow:ellipsis;color:#000!important} .graph-selector-panel mat-option .option-container .node-count-label{color:#999} .graph-selector-panel mat-option .action-button{flex-shrink:0;width:16px;height:16px;display:flex;align-items:center;margin-left:4px;opacity:.8;cursor:pointer} .graph-selector-panel mat-option .action-button:hover{opacity:1} .graph-selector-panel mat-option .action-button .block-container{border-radius:3px;border:1px solid #999;height:100%;width:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:flex-end;padding:1px} .graph-selector-panel mat-option .action-button .block-container .right-block{height:100%;width:50%;background-color:#999;border-top-right-radius:2px;border-bottom-right-radius:2px} .graph-selector-panel mat-option span{white-space:break-spaces!important;word-break:break-all;line-height:14px!important;width:100%;box-sizing:border-box;padding-right:10px} .graph-selector-panel mat-option mat-pseudo-checkbox{display:none} .graph-selector-panel mat-option.selected{background-color:#fff1de!important} .graph-selector-panel mat-optgroup span{min-height:unset;font-size:12px;font-weight:700;padding-left:8px} .graph-selector-panel mat-optgroup.graph-search-optgroup{pointer-events:none} .graph-selector-panel mat-optgroup.graph-search-optgroup span{padding:0} .graph-selector-panel mat-optgroup.graph-search-optgroup mat-option{padding-left:16px!important;padding-right:12px!important;height:28px} .graph-selector-panel mat-optgroup.graph-search-optgroup input{font-size:12px;width:100%;box-sizing:border-box;pointer-events:all;border:1px solid #ccc;height:20px;border-radius:4px;padding:0 2px} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();var ii=function(i){return i[i.DT_INVALID=0]="DT_INVALID",i[i.DT_FLOAT=1]="DT_FLOAT",i[i.DT_DOUBLE=2]="DT_DOUBLE",i[i.DT_INT32=3]="DT_INT32",i[i.DT_UINT8=4]="DT_UINT8",i[i.DT_INT16=5]="DT_INT16",i[i.DT_INT8=6]="DT_INT8",i[i.DT_STRING=7]="DT_STRING",i[i.DT_COMPLEX64=8]="DT_COMPLEX64",i[i.DT_INT64=9]="DT_INT64",i[i.DT_BOOL=10]="DT_BOOL",i[i.DT_QINT8=11]="DT_QINT8",i[i.DT_QUINT8=12]="DT_QUINT8",i[i.DT_QINT32=13]="DT_QINT32",i[i.DT_BFLOAT16=14]="DT_BFLOAT16",i[i.DT_QINT16=15]="DT_QINT16",i[i.DT_QUINT16=16]="DT_QUINT16",i[i.DT_UINT16=17]="DT_UINT16",i[i.DT_COMPLEX128=18]="DT_COMPLEX128",i[i.DT_HALF=19]="DT_HALF",i[i.DT_RESOURCE=20]="DT_RESOURCE",i[i.DT_VARIANT=21]="DT_VARIANT",i[i.DT_UINT32=22]="DT_UINT32",i[i.DT_UINT64=23]="DT_UINT64",i}(ii||{}),dve=new Map([[ii.DT_FLOAT,"float"],[ii.DT_DOUBLE,"double"],[ii.DT_INT32,"int32"],[ii.DT_UINT8,"uint8"],[ii.DT_INT16,"int16"],[ii.DT_INT8,"int8"],[ii.DT_STRING,"string"],[ii.DT_COMPLEX64,"complex64"],[ii.DT_INT64,"int64"],[ii.DT_BOOL,"bool"],[ii.DT_QINT8,"qint8"],[ii.DT_QUINT8,"qint8"],[ii.DT_QINT32,"qint32"],[ii.DT_BFLOAT16,"bfloat16"],[ii.DT_QINT16,"qint16"],[ii.DT_QUINT16,"qint16"],[ii.DT_UINT16,"uint16"],[ii.DT_COMPLEX128,"complex128"],[ii.DT_HALF,"half"],[ii.DT_RESOURCE,"resource"],[ii.DT_VARIANT,"variant"],[ii.DT_UINT32,"uint32"],[ii.DT_UINT64,"uint64"]]);function mj(i,t){let e={};if(t.weightsManifest!=null)for(let s of t.weightsManifest)for(let a of s.weights)e[a.name]=a;let n={},r=t.modelTopology.node.map(s=>{let a={id:s.name,label:s.op,namespace:s.name,incomingEdges:uve(s),attrs:hve(s)};return n[a.id]=a,a});for(let s of t.modelTopology.node){if(!n[s.name])continue;let l=s.input||[];for(let c=0;c{let n=t.split(":");return{sourceNodeId:n.length===2?n[0]:t,sourceNodeOutputId:n.length===2?n[1]:"0",targetNodeInputId:`${e}`}})}function hve(i){let t=i.attr||{},e=[];for(let n of Object.keys(t)){let r=t[n],o="";r.list!=null?(r.list.s||[]).length>0?o=(r.list.s||[]).map(s=>iv({s})).join(", "):(r.list.b||[]).length>0?o=(r.list.b||[]).map(s=>iv({b:s})).join(", "):(r.list.f||[]).length>0?o=(r.list.f||[]).map(s=>iv({f:s})).join(", "):(r.list.i||[]).length>0?o=(r.list.i||[]).map(s=>iv({i:s})).join(", "):o="[]":o=iv(r),e.push({key:n,value:o})}return e}function iv(i){let t="";return i.s!=null?Array.isArray(i.s)?t=`${i.s.map(e=>typeof e=="number"?String.fromCharCode(e):`${e}`).join("")}`:t=atob(i.s):i.i!=null?t=`${i.i}`:i.f!=null?t=`${i.f}`:i.b!=null?t=i?"true":"false":i.type!=null&&(t=dve.get(i.type)||"unknown"),t}var hf=new URLSearchParams(window.location.search).get("internal_colab")==="1";function sS(i){return!1}function gj(i){return Ct(this,null,function*(){return new Promise((t,e)=>{let n=new FileReader;n.onload=r=>{let o=JSON.parse(n.result),{graphCollections:s,error:a}=tR(i.name,o);a?e(a):s&&t(s)},n.readAsText(i)})})}function tR(i,t){return t.modelTopology==null?pve(t,i):{graphCollections:[mj(i,t)]}}function pve(i,t){return i.label!=null&&i.graphs!=null?{graphCollections:[i]}:Array.isArray(i)&&i[0].subgraphs!=null?{graphCollections:fve(i,t)}:Array.isArray(i)&&(i.length===0||i.length>0&&i[0].id!=null&&i[0].nodes!=null)?{graphCollections:[{label:t,graphs:i}]}:{error:"Unsupported JSON format"}}function fve(i,t){return i.map(e=>({label:e.label===""?t:`${t} (${e.label})`,graphs:e.subgraphs}))}function aS(){return window.meElectronApi}function mve(i,t){i&1&&(v(0,"div",4),M(1," Run the following command in your console to upgrade: "),v(2,"div",10),M(3," pip install -U ai-edge-model-explorer "),y()())}function gve(i,t){if(i&1&&(v(0,"div",9)(1,"mat-icon",7),M(2,"get_app"),y(),v(3,"a",8),M(4," Download desktop app "),y()()),i&2){let e=I(3);w(3),R("href",e.info().desktopAppUrl,qE)}}function _ve(i,t){if(i&1&&(v(0,"div",2),M(1," Model Explorer "),v(2,"span",3),M(3),y(),M(4," is available. You are running "),v(5,"span",3),M(6),y(),M(7,". "),W(8,mve,4,0,"div",4),v(9,"div",5)(10,"div",6)(11,"mat-icon",7),M(12,"description"),y(),v(13,"a",8),M(14," Release notes "),y()(),W(15,gve,5,1,"div",9),y()()),i&2){let e=I(2);w(3),we("v",e.info().version,""),w(3),we("v",e.info().runningVersion,""),w(2),re(e.isElectron?-1:8),w(5),R("href",e.info().releaseUrl,qE),w(2),re(e.isElectron&&e.info().desktopAppUrl?15:-1)}}function vve(i,t){if(i&1&&(v(0,"div",1)(1,"mat-icon"),M(2,"upgrade"),y(),M(3," New version available "),y(),W(4,_ve,16,5,"ng-template",null,0,Mt)),i&2){let e=fe(5);R("bubble",e)("hoverDelayMs",100)}}var yve="/api/v1/check_new_version",nR=(()=>{class i{info=et({version:"",runningVersion:"",releaseUrl:"",desktopAppUrl:""});constructor(){this.checkNewVersion()}checkNewVersion(){return Ct(this,null,function*(){try{let e=yield fetch(yve);if(e.ok){let n=yield e.json();this.info.set(n)}}catch{}})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),lS=(()=>{class i{newVersionService;info;isElectron=aS()!=null;constructor(e){this.newVersionService=e,this.info=this.newVersionService.info}static \u0275fac=function(n){return new(n||i)(q(nR))};static \u0275cmp=oe({type:i,selectors:[["new-version-chip"]],standalone:!0,features:[se],decls:1,vars:1,consts:[["upgrade",""],[1,"container",3,"bubble","hoverDelayMs"],[1,"model-explorer-upgrade-popup"],[1,"bold"],[1,"upgrade-command"],[1,"items"],[1,"release-notes"],[1,"item-icon"],["target","_blank",3,"href"],[1,"download-desktop-app"],[1,"code"]],template:function(n,r){n&1&&W(0,vve,6,2),n&2&&re(r.info().version!==""?0:-1)},dependencies:[Nn,Oe,Je,dt],styles:[".container[_ngcontent-%COMP%]{font-size:12px;display:flex;align-items:center;color:#ab6c17;background-color:#ffefd9;line-height:18px;border-radius:99px;font-weight:500;padding:2px 10px 2px 4px;cursor:pointer}.container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px} .model-explorer-upgrade-popup{padding:8px;font-size:12px;background-color:#fff;line-height:normal} .model-explorer-upgrade-popup .bold{font-weight:500} .model-explorer-upgrade-popup .upgrade-command{margin-top:12px} .model-explorer-upgrade-popup .code{background-color:#f1f1f1;font-family:monospace;margin-top:4px;padding:4px;font-size:11px} .model-explorer-upgrade-popup .items{display:flex;flex-direction:column;gap:4px;margin-top:12px} .model-explorer-upgrade-popup .release-notes, .model-explorer-upgrade-popup .download-desktop-app{display:flex;align-items:center} .model-explorer-upgrade-popup .item-icon{font-size:16px;width:16px;height:16px;margin-right:4px;color:#777}"]})}return i})();function xve(i,t){i&1&&ee(0,"mat-spinner",5)}function wve(i,t){i&1&&(v(0,"mat-icon"),M(1,"add_circle_outline"),y())}function Cve(i,t){i&1&&(v(0,"div",7),M(1," Add custom data and styles to the nodes in the current model "),y())}function Sve(i,t){if(i&1){let e=te();v(0,"div",8)(1,"div",9)(2,"div"),M(3,"Load json data file"),y(),v(4,"a",10),M(5," Guide "),y()(),v(6,"div",11)(7,"div",12),M(8,"From computer"),y(),v(9,"button",13),H("click",function(){B(e);let r=fe(12);return V(r.click())}),M(10," Upload "),y()(),v(11,"input",14,2),H("change",function(){B(e);let r=fe(12),o=I();return V(o.handleClickUpload(r))}),y()()}}var _j=(()=>{class i{appService;changeDetectorRef;localStorageService;nodeDataProviderExtensionService;dropdown;extensions=[];loadingExtensions=!0;helpPopupSize={minWidth:0,minHeight:0};dropdownSize={minWidth:0,minHeight:0,maxHeight:500};remoteSourceLoading;constructor(e,n,r,o){this.appService=e,this.changeDetectorRef=n,this.localStorageService=r,this.nodeDataProviderExtensionService=o,this.remoteSourceLoading=this.nodeDataProviderExtensionService.remoteSourceLoading}handleClickUpload(e){let n=e.files;if(!n)return;let r=this.appService.getModelGraphFromSelectedPane();if(r){for(let o of Array.from(n)){let s=new FileReader;s.onload=a=>{let l=qi();try{let c=this.getNodeDataProviderData(a.target?.result,r);this.nodeDataProviderExtensionService.addRun(l,o.name,"",r,c)}catch(c){this.nodeDataProviderExtensionService.addRun(l,o.name,"",r),this.nodeDataProviderExtensionService.updateRunResults(l,{[r.id]:{results:{}}},r,`Failed to process JSON file. ${c}`)}finally{this.dropdown?.closeDialog()}},s.readAsText(o)}e.value=""}}getNodeDataProviderData(e,n){let r=JSON.parse(e),o={};return r.results!=null&&r.results.results==null?n&&(o[n.id]=r):o=r,o}static \u0275fac=function(n){return new(n||i)(q(nt),q(Re),q(Mr),q(Rr))};static \u0275cmp=oe({type:i,selectors:[["node-data-provider-dropdown"]],viewQuery:function(n,r){if(n&1&&Me(co,5),n&2){let o;_e(o=ve())&&(r.dropdown=o.first)}},standalone:!0,features:[se],decls:10,vars:6,consts:[["help",""],["dropdown",""],["input",""],[1,"container",3,"bubble","overlaySize","hoverDelayMs"],[1,"icon-container",3,"bubbleClick","overlaySize"],["color","primary","diameter","18"],[1,"label"],[1,"model-explorer-help-popup"],[1,"model-explorer-node-data-provider-dropdown"],[1,"section-label","upload"],["href","https://github.com/google-ai-edge/model-explorer/wiki/2.-User-Guide#custom-node-data","target","_blank"],[1,"upload-container"],[1,"description"],["mat-flat-button","","color","primary",1,"upload-json-file-button","upload",3,"click"],["type","file","multiple","","accept",".json",1,"upload-per-node-data-input",3,"change"]],template:function(n,r){if(n&1&&(v(0,"div",3)(1,"div",4),W(2,xve,1,0,"mat-spinner",5)(3,wve,2,0,"mat-icon"),v(4,"span",6),M(5,"Add per-node data"),y()()(),W(6,Cve,2,0,"ng-template",null,0,Mt)(8,Sve,13,0,"ng-template",null,1,Mt)),n&2){let o=fe(7),s=fe(9);R("bubble",o)("overlaySize",r.helpPopupSize)("hoverDelayMs",10),w(),R("bubbleClick",s)("overlaySize",r.dropdownSize),w(),re(r.remoteSourceLoading()?2:3)}},dependencies:[Nn,co,Oe,vn,gi,Je,dt,lo,pa,$t],styles:[`.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;cursor:pointer;color:#666;padding-bottom:12px;margin-bottom:-12px}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:4px}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{margin-right:6px}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{font-size:13px}.container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{color:#444} .model-explorer-node-data-provider-dropdown{font-size:12px;background-color:#fff;display:flex;flex-direction:column;padding-bottom:8px} .model-explorer-node-data-provider-dropdown .section-label{padding:8px 12px;font-size:11px;background:#f1f1f1;font-weight:500;text-transform:uppercase} .model-explorer-node-data-provider-dropdown .section-label .address-container{text-transform:none;font-weight:400;letter-spacing:normal;color:#777;line-height:12px;padding-bottom:5px;display:flex;align-items:flex-start;margin-top:-4px;margin-left:-2px} .model-explorer-node-data-provider-dropdown .section-label .address-container .address-label{overflow:hidden;line-break:anywhere;line-height:12px;flex-grow:1;padding-top:3px} .model-explorer-node-data-provider-dropdown .section-label .address-container .settings-icon-container{display:flex;align-items:center;justify-content:center;margin-right:4px;pointer-events:all;cursor:pointer;opacity:.7} .model-explorer-node-data-provider-dropdown .section-label .address-container .settings-icon-container:hover{opacity:1} .model-explorer-node-data-provider-dropdown .section-label .address-container .settings-icon-container mat-icon{font-size:16px;width:16px;height:16px} .model-explorer-node-data-provider-dropdown .section-label.upload{display:flex;align-items:center;justify-content:space-between;min-width:180px} .model-explorer-node-data-provider-dropdown .section-label.upload a{font-size:11px;letter-spacing:normal;text-transform:none;pointer-events:all} .model-explorer-node-data-provider-dropdown .description{font-size:12px;color:#777;line-height:18px;letter-spacing:normal} .model-explorer-node-data-provider-dropdown .upload-container{display:flex;flex-direction:column;align-items:flex-start;padding:0 16px;margin-top:12px} .model-explorer-node-data-provider-dropdown .upload-json-file-button{margin:4px 0;width:90px;height:30px;font-size:12px!important;letter-spacing:normal!important} .model-explorer-node-data-provider-dropdown .upload-json-file-button.upload{margin-top:2px} .model-explorer-node-data-provider-dropdown .upload-json-file-button .mat-mdc-button-touch-target{display:none} .model-explorer-node-data-provider-dropdown .or-divider{height:1px;border-top:1px solid #eee;position:relative;margin-top:12px} .model-explorer-node-data-provider-dropdown .or-divider .or-label{font-size:10px;top:-12px;color:#aaa;position:absolute;padding:2px;background-color:#fff;display:flex;align-items:center;justify-content:center;width:16px;left:calc(50% - 8px)} .model-explorer-node-data-provider-dropdown .upload-per-node-data-input{display:none} .model-explorer-node-data-provider-dropdown .no-extension, .model-explorer-node-data-provider-dropdown .loading-extension{padding:12px 0 4px 16px;color:#999;font-size:13px;letter-spacing:normal} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();function Mve(i,t){}var Cc=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.closeOnNavigation=!0,this.closeOnDestroy=!0,this.closeOnOverlayDetachments=!0}};var rR=(()=>{class i extends la{constructor(){super(),this._elementRef=S(Fe),this._focusTrapFactory=S(rB),this._interactivityChecker=S(Bb),this._ngZone=S(Ue),this._overlayRef=S(rf),this._focusMonitor=S(So),this._platform=S(Rn),this._document=S(ft,{optional:!0}),this._focusTrap=null,this._elementFocusedBeforeDialogWasOpened=null,this._closeInteractionType=null,this._ariaLabelledByQueue=[],this._changeDetectorRef=S(Re),this._injector=S(pt),this._isDestroyed=!1,this.attachDomPortal=e=>{this._portalOutlet.hasAttached();let n=this._portalOutlet.attachDomPortal(e);return this._contentAttached(),n},this._config=S(Cc,{optional:!0})||new Cc,this._config.ariaLabelledBy&&this._ariaLabelledByQueue.push(this._config.ariaLabelledBy)}_addAriaLabelledBy(e){this._ariaLabelledByQueue.push(e),this._changeDetectorRef.markForCheck()}_removeAriaLabelledBy(e){let n=this._ariaLabelledByQueue.indexOf(e);n>-1&&(this._ariaLabelledByQueue.splice(n,1),this._changeDetectorRef.markForCheck())}_contentAttached(){this._initializeFocusTrap(),this._handleBackdropClicks(),this._captureInitialFocus()}_captureInitialFocus(){this._trapFocus()}ngOnDestroy(){this._isDestroyed=!0,this._restoreFocus()}attachComponentPortal(e){this._portalOutlet.hasAttached();let n=this._portalOutlet.attachComponentPortal(e);return this._contentAttached(),n}attachTemplatePortal(e){this._portalOutlet.hasAttached();let n=this._portalOutlet.attachTemplatePortal(e);return this._contentAttached(),n}_recaptureFocus(){this._containsFocus()||this._trapFocus()}_forceFocus(e,n){this._interactivityChecker.isFocusable(e)||(e.tabIndex=-1,this._ngZone.runOutsideAngular(()=>{let r=()=>{e.removeEventListener("blur",r),e.removeEventListener("mousedown",r),e.removeAttribute("tabindex")};e.addEventListener("blur",r),e.addEventListener("mousedown",r)})),e.focus(n)}_focusByCssSelector(e,n){let r=this._elementRef.nativeElement.querySelector(e);r&&this._forceFocus(r,n)}_trapFocus(){this._isDestroyed||zi(()=>{let e=this._elementRef.nativeElement;switch(this._config.autoFocus){case!1:case"dialog":this._containsFocus()||e.focus();break;case!0:case"first-tabbable":this._focusTrap?.focusInitialElement()||this._focusDialogContainer();break;case"first-heading":this._focusByCssSelector('h1, h2, h3, h4, h5, h6, [role="heading"]');break;default:this._focusByCssSelector(this._config.autoFocus);break}},{injector:this._injector})}_restoreFocus(){let e=this._config.restoreFocus,n=null;if(typeof e=="string"?n=this._document.querySelector(e):typeof e=="boolean"?n=e?this._elementFocusedBeforeDialogWasOpened:null:e&&(n=e),this._config.restoreFocus&&n&&typeof n.focus=="function"){let r=qm(),o=this._elementRef.nativeElement;(!r||r===this._document.body||r===o||o.contains(r))&&(this._focusMonitor?(this._focusMonitor.focusVia(n,this._closeInteractionType),this._closeInteractionType=null):n.focus())}this._focusTrap&&this._focusTrap.destroy()}_focusDialogContainer(){this._elementRef.nativeElement.focus&&this._elementRef.nativeElement.focus()}_containsFocus(){let e=this._elementRef.nativeElement,n=qm();return e===n||e.contains(n)}_initializeFocusTrap(){this._platform.isBrowser&&(this._focusTrap=this._focusTrapFactory.create(this._elementRef.nativeElement),this._document&&(this._elementFocusedBeforeDialogWasOpened=qm()))}_handleBackdropClicks(){this._overlayRef.backdropClick().subscribe(()=>{this._config.disableClose&&this._recaptureFocus()})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["cdk-dialog-container"]],viewQuery:function(n,r){if(n&1&&Me(ns,7),n&2){let o;_e(o=ve())&&(r._portalOutlet=o.first)}},hostAttrs:["tabindex","-1",1,"cdk-dialog-container"],hostVars:6,hostBindings:function(n,r){n&2&&qe("id",r._config.id||null)("role",r._config.role)("aria-modal",r._config.ariaModal)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null)},standalone:!0,features:[sn,se],decls:1,vars:0,consts:[["cdkPortalOutlet",""]],template:function(n,r){n&1&&W(0,Mve,0,0,"ng-template",0)},dependencies:[ns],styles:[".cdk-dialog-container{display:block;width:100%;height:100%;min-height:inherit;max-height:inherit}"],encapsulation:2})}}return i})(),rv=class{constructor(t,e){this.overlayRef=t,this.config=e,this.closed=new ce,this.disableClose=e.disableClose,this.backdropClick=t.backdropClick(),this.keydownEvents=t.keydownEvents(),this.outsidePointerEvents=t.outsidePointerEvents(),this.id=e.id,this.keydownEvents.subscribe(n=>{n.keyCode===27&&!this.disableClose&&!Si(n)&&(n.preventDefault(),this.close(void 0,{focusOrigin:"keyboard"}))}),this.backdropClick.subscribe(()=>{this.disableClose||this.close(void 0,{focusOrigin:"mouse"})}),this._detachSubscription=t.detachments().subscribe(()=>{e.closeOnOverlayDetachments!==!1&&this.close()})}close(t,e){if(this.containerInstance){let n=this.closed;this.containerInstance._closeInteractionType=e?.focusOrigin||"program",this._detachSubscription.unsubscribe(),this.overlayRef.dispose(),n.next(t),n.complete(),this.componentInstance=this.containerInstance=null}}updatePosition(){return this.overlayRef.updatePosition(),this}updateSize(t="",e=""){return this.overlayRef.updateSize({width:t,height:e}),this}addPanelClass(t){return this.overlayRef.addPanelClass(t),this}removePanelClass(t){return this.overlayRef.removePanelClass(t),this}},Eve=new pe("DialogScrollStrategy",{providedIn:"root",factory:()=>{let i=S(on);return()=>i.scrollStrategies.block()}}),Ive=new pe("DialogData"),Tve=new pe("DefaultDialogConfig");var Dve=0,oR=(()=>{class i{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}constructor(){this._overlay=S(on),this._injector=S(pt),this._defaultOptions=S(Tve,{optional:!0}),this._parentDialog=S(i,{optional:!0,skipSelf:!0}),this._overlayContainer=S(yC),this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new ce,this._afterOpenedAtThisLevel=new ce,this._ariaHiddenElements=new Map,this._scrollStrategy=S(Eve),this.afterAllClosed=ko(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(ni(void 0)))}open(e,n){let r=this._defaultOptions||new Cc;n=X(X({},r),n),n.id=n.id||`cdk-dialog-${Dve++}`,n.id&&this.getDialogById(n.id);let o=this._getOverlayConfig(n),s=this._overlay.create(o),a=new rv(s,n),l=this._attachContainer(s,a,n);return a.containerInstance=l,this._attachDialogContent(e,a,l,n),this.openDialogs.length||this._hideNonDialogContentFromAssistiveTechnology(),this.openDialogs.push(a),a.closed.subscribe(()=>this._removeOpenDialog(a,!0)),this.afterOpened.next(a),a}closeAll(){iR(this.openDialogs,e=>e.close())}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){iR(this._openDialogsAtThisLevel,e=>{e.config.closeOnDestroy===!1&&this._removeOpenDialog(e,!1)}),iR(this._openDialogsAtThisLevel,e=>e.close()),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete(),this._openDialogsAtThisLevel=[]}_getOverlayConfig(e){let n=new bi({positionStrategy:e.positionStrategy||this._overlay.position().global().centerHorizontally().centerVertically(),scrollStrategy:e.scrollStrategy||this._scrollStrategy(),panelClass:e.panelClass,hasBackdrop:e.hasBackdrop,direction:e.direction,minWidth:e.minWidth,minHeight:e.minHeight,maxWidth:e.maxWidth,maxHeight:e.maxHeight,width:e.width,height:e.height,disposeOnNavigation:e.closeOnNavigation});return e.backdropClass&&(n.backdropClass=e.backdropClass),n}_attachContainer(e,n,r){let o=r.injector||r.viewContainerRef?.injector,s=[{provide:Cc,useValue:r},{provide:rv,useValue:n},{provide:rf,useValue:e}],a;r.container?typeof r.container=="function"?a=r.container:(a=r.container.type,s.push(...r.container.providers(r))):a=rR;let l=new Li(a,r.viewContainerRef,pt.create({parent:o||this._injector,providers:s}));return e.attach(l).instance}_attachDialogContent(e,n,r,o){if(e instanceof Qn){let s=this._createInjector(o,n,r,void 0),a={$implicit:o.data,dialogRef:n};o.templateContext&&(a=X(X({},a),typeof o.templateContext=="function"?o.templateContext():o.templateContext)),r.attachTemplatePortal(new Jr(e,null,a,s))}else{let s=this._createInjector(o,n,r,this._injector),a=r.attachComponentPortal(new Li(e,o.viewContainerRef,s));n.componentRef=a,n.componentInstance=a.instance}}_createInjector(e,n,r,o){let s=e.injector||e.viewContainerRef?.injector,a=[{provide:Ive,useValue:e.data},{provide:rv,useValue:n}];return e.providers&&(typeof e.providers=="function"?a.push(...e.providers(n,e,r)):a.push(...e.providers)),e.direction&&(!s||!s.get(oi,null,{optional:!0}))&&a.push({provide:oi,useValue:{value:e.direction,change:ke()}}),pt.create({parent:s||o,providers:a})}_removeOpenDialog(e,n){let r=this.openDialogs.indexOf(e);r>-1&&(this.openDialogs.splice(r,1),this.openDialogs.length||(this._ariaHiddenElements.forEach((o,s)=>{o?s.setAttribute("aria-hidden",o):s.removeAttribute("aria-hidden")}),this._ariaHiddenElements.clear(),n&&this._getAfterAllClosed().next()))}_hideNonDialogContentFromAssistiveTechnology(){let e=this._overlayContainer.getContainerElement();if(e.parentElement){let n=e.parentElement.children;for(let r=n.length-1;r>-1;r--){let o=n[r];o!==e&&o.nodeName!=="SCRIPT"&&o.nodeName!=="STYLE"&&!o.hasAttribute("aria-live")&&(this._ariaHiddenElements.set(o,o.getAttribute("aria-hidden")),o.setAttribute("aria-hidden","true"))}}}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function iR(i,t){let e=i.length;for(;e--;)t(i[e])}var vj=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({providers:[oR],imports:[so,Ds,zb,Ds]})}}return i})();function Ove(i,t){}var dS=class{constructor(){this.role="dialog",this.panelClass="",this.hasBackdrop=!0,this.backdropClass="",this.disableClose=!1,this.width="",this.height="",this.data=null,this.ariaDescribedBy=null,this.ariaLabelledBy=null,this.ariaLabel=null,this.ariaModal=!0,this.autoFocus="first-tabbable",this.restoreFocus=!0,this.delayFocusTrap=!0,this.closeOnNavigation=!0}},sR="mdc-dialog--open",yj="mdc-dialog--opening",bj="mdc-dialog--closing",Pve=150,Rve=75,Ave=(()=>{class i extends rR{constructor(){super(...arguments),this._animationMode=S(Kn,{optional:!0}),this._animationStateChanged=new Ie,this._animationsEnabled=this._animationMode!=="NoopAnimations",this._actionSectionCount=0,this._hostElement=this._elementRef.nativeElement,this._enterAnimationDuration=this._animationsEnabled?wj(this._config.enterAnimationDuration)??Pve:0,this._exitAnimationDuration=this._animationsEnabled?wj(this._config.exitAnimationDuration)??Rve:0,this._animationTimer=null,this._finishDialogOpen=()=>{this._clearAnimationClasses(),this._openAnimationDone(this._enterAnimationDuration)},this._finishDialogClose=()=>{this._clearAnimationClasses(),this._animationStateChanged.emit({state:"closed",totalTime:this._exitAnimationDuration})}}_contentAttached(){super._contentAttached(),this._startOpenAnimation()}_startOpenAnimation(){this._animationStateChanged.emit({state:"opening",totalTime:this._enterAnimationDuration}),this._animationsEnabled?(this._hostElement.style.setProperty(xj,`${this._enterAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(yj,sR)),this._waitForAnimationToComplete(this._enterAnimationDuration,this._finishDialogOpen)):(this._hostElement.classList.add(sR),Promise.resolve().then(()=>this._finishDialogOpen()))}_startExitAnimation(){this._animationStateChanged.emit({state:"closing",totalTime:this._exitAnimationDuration}),this._hostElement.classList.remove(sR),this._animationsEnabled?(this._hostElement.style.setProperty(xj,`${this._exitAnimationDuration}ms`),this._requestAnimationFrame(()=>this._hostElement.classList.add(bj)),this._waitForAnimationToComplete(this._exitAnimationDuration,this._finishDialogClose)):Promise.resolve().then(()=>this._finishDialogClose())}_updateActionSectionCount(e){this._actionSectionCount+=e,this._changeDetectorRef.markForCheck()}_clearAnimationClasses(){this._hostElement.classList.remove(yj,bj)}_waitForAnimationToComplete(e,n){this._animationTimer!==null&&clearTimeout(this._animationTimer),this._animationTimer=setTimeout(n,e)}_requestAnimationFrame(e){this._ngZone.runOutsideAngular(()=>{typeof requestAnimationFrame=="function"?requestAnimationFrame(e):e()})}_captureInitialFocus(){this._config.delayFocusTrap||this._trapFocus()}_openAnimationDone(e){this._config.delayFocusTrap&&this._trapFocus(),this._animationStateChanged.next({state:"opened",totalTime:e})}ngOnDestroy(){super.ngOnDestroy(),this._animationTimer!==null&&clearTimeout(this._animationTimer)}attachComponentPortal(e){let n=super.attachComponentPortal(e);return n.location.nativeElement.classList.add("mat-mdc-dialog-component-host"),n}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Zn(i)))(r||i)}})()}static{this.\u0275cmp=oe({type:i,selectors:[["mat-dialog-container"]],hostAttrs:["tabindex","-1",1,"mat-mdc-dialog-container","mdc-dialog"],hostVars:10,hostBindings:function(n,r){n&2&&(Cr("id",r._config.id),qe("aria-modal",r._config.ariaModal)("role",r._config.role)("aria-labelledby",r._config.ariaLabel?null:r._ariaLabelledByQueue[0])("aria-label",r._config.ariaLabel)("aria-describedby",r._config.ariaDescribedBy||null),ne("_mat-animation-noopable",!r._animationsEnabled)("mat-mdc-dialog-container-with-actions",r._actionSectionCount>0))},standalone:!0,features:[sn,se],decls:3,vars:0,consts:[[1,"mat-mdc-dialog-inner-container","mdc-dialog__container"],[1,"mat-mdc-dialog-surface","mdc-dialog__surface"],["cdkPortalOutlet",""]],template:function(n,r){n&1&&(v(0,"div",0)(1,"div",1),W(2,Ove,0,0,"ng-template",2),y()())},dependencies:[ns],styles:['.mat-mdc-dialog-container{width:100%;height:100%;display:block;box-sizing:border-box;max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;outline:0}.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-max-width, 560px);min-width:var(--mat-dialog-container-min-width, 280px)}@media(max-width: 599px){.cdk-overlay-pane.mat-mdc-dialog-panel{max-width:var(--mat-dialog-container-small-max-width, calc(100vw - 32px))}}.mat-mdc-dialog-inner-container{display:flex;flex-direction:row;align-items:center;justify-content:space-around;box-sizing:border-box;height:100%;opacity:0;transition:opacity linear var(--mat-dialog-transition-duration, 0ms);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit}.mdc-dialog--closing .mat-mdc-dialog-inner-container{transition:opacity 75ms linear;transform:none}.mdc-dialog--open .mat-mdc-dialog-inner-container{opacity:1}._mat-animation-noopable .mat-mdc-dialog-inner-container{transition:none}.mat-mdc-dialog-surface{display:flex;flex-direction:column;flex-grow:0;flex-shrink:0;box-sizing:border-box;width:100%;height:100%;position:relative;overflow-y:auto;outline:0;transform:scale(0.8);transition:transform var(--mat-dialog-transition-duration, 0ms) cubic-bezier(0, 0, 0.2, 1);max-height:inherit;min-height:inherit;min-width:inherit;max-width:inherit;box-shadow:var(--mat-dialog-container-elevation-shadow, none);border-radius:var(--mdc-dialog-container-shape, var(--mat-sys-corner-extra-large, 4px));background-color:var(--mdc-dialog-container-color, var(--mat-sys-surface, white))}[dir=rtl] .mat-mdc-dialog-surface{text-align:right}.mdc-dialog--open .mat-mdc-dialog-surface,.mdc-dialog--closing .mat-mdc-dialog-surface{transform:none}._mat-animation-noopable .mat-mdc-dialog-surface{transition:none}.mat-mdc-dialog-surface::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;border:2px solid rgba(0,0,0,0);border-radius:inherit;content:"";pointer-events:none}.mat-mdc-dialog-title{display:block;position:relative;flex-shrink:0;box-sizing:border-box;margin:0 0 1px;padding:var(--mat-dialog-headline-padding, 6px 24px 13px)}.mat-mdc-dialog-title::before{display:inline-block;width:0;height:40px;content:"";vertical-align:0}[dir=rtl] .mat-mdc-dialog-title{text-align:right}.mat-mdc-dialog-container .mat-mdc-dialog-title{color:var(--mdc-dialog-subhead-color, var(--mat-sys-on-surface, rgba(0, 0, 0, 0.87)));font-family:var(--mdc-dialog-subhead-font, var(--mat-sys-headline-small-font, inherit));line-height:var(--mdc-dialog-subhead-line-height, var(--mat-sys-headline-small-line-height, 1.5rem));font-size:var(--mdc-dialog-subhead-size, var(--mat-sys-headline-small-size, 1rem));font-weight:var(--mdc-dialog-subhead-weight, var(--mat-sys-headline-small-weight, 400));letter-spacing:var(--mdc-dialog-subhead-tracking, var(--mat-sys-headline-small-tracking, 0.03125em))}.mat-mdc-dialog-content{display:block;flex-grow:1;box-sizing:border-box;margin:0;overflow:auto;max-height:65vh}.mat-mdc-dialog-content>:first-child{margin-top:0}.mat-mdc-dialog-content>:last-child{margin-bottom:0}.mat-mdc-dialog-container .mat-mdc-dialog-content{color:var(--mdc-dialog-supporting-text-color, var(--mat-sys-on-surface-variant, rgba(0, 0, 0, 0.6)));font-family:var(--mdc-dialog-supporting-text-font, var(--mat-sys-body-medium-font, inherit));line-height:var(--mdc-dialog-supporting-text-line-height, var(--mat-sys-body-medium-line-height, 1.5rem));font-size:var(--mdc-dialog-supporting-text-size, var(--mat-sys-body-medium-size, 1rem));font-weight:var(--mdc-dialog-supporting-text-weight, var(--mat-sys-body-medium-weight, 400));letter-spacing:var(--mdc-dialog-supporting-text-tracking, var(--mat-sys-body-medium-tracking, 0.03125em))}.mat-mdc-dialog-container .mat-mdc-dialog-content{padding:var(--mat-dialog-content-padding, 20px 24px)}.mat-mdc-dialog-container-with-actions .mat-mdc-dialog-content{padding:var(--mat-dialog-with-actions-content-padding, 20px 24px 0)}.mat-mdc-dialog-container .mat-mdc-dialog-title+.mat-mdc-dialog-content{padding-top:0}.mat-mdc-dialog-actions{display:flex;position:relative;flex-shrink:0;flex-wrap:wrap;align-items:center;justify-content:flex-end;box-sizing:border-box;min-height:52px;margin:0;padding:8px;border-top:1px solid rgba(0,0,0,0);padding:var(--mat-dialog-actions-padding, 16px 24px);justify-content:var(--mat-dialog-actions-alignment, flex-end)}@media(forced-colors: active){.mat-mdc-dialog-actions{border-top-color:CanvasText}}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-start,.mat-mdc-dialog-actions[align=start]{justify-content:start}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-center,.mat-mdc-dialog-actions[align=center]{justify-content:center}.mat-mdc-dialog-actions.mat-mdc-dialog-actions-align-end,.mat-mdc-dialog-actions[align=end]{justify-content:flex-end}.mat-mdc-dialog-actions .mat-button-base+.mat-button-base,.mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-mdc-dialog-actions .mat-button-base+.mat-button-base,[dir=rtl] .mat-mdc-dialog-actions .mat-mdc-button-base+.mat-mdc-button-base{margin-left:0;margin-right:8px}.mat-mdc-dialog-component-host{display:contents}'],encapsulation:2})}}return i})(),xj="--mat-dialog-transition-duration";function wj(i){return i==null?null:typeof i=="number"?i:i.endsWith("ms")?Va(i.substring(0,i.length-2)):i.endsWith("s")?Va(i.substring(0,i.length-1))*1e3:i==="0"?0:null}var cS=function(i){return i[i.OPEN=0]="OPEN",i[i.CLOSING=1]="CLOSING",i[i.CLOSED=2]="CLOSED",i}(cS||{}),ov=class{constructor(t,e,n){this._ref=t,this._containerInstance=n,this._afterOpened=new ce,this._beforeClosed=new ce,this._state=cS.OPEN,this.disableClose=e.disableClose,this.id=t.id,t.addPanelClass("mat-mdc-dialog-panel"),n._animationStateChanged.pipe(qt(r=>r.state==="opened"),tn(1)).subscribe(()=>{this._afterOpened.next(),this._afterOpened.complete()}),n._animationStateChanged.pipe(qt(r=>r.state==="closed"),tn(1)).subscribe(()=>{clearTimeout(this._closeFallbackTimeout),this._finishDialogClose()}),t.overlayRef.detachments().subscribe(()=>{this._beforeClosed.next(this._result),this._beforeClosed.complete(),this._finishDialogClose()}),Xn(this.backdropClick(),this.keydownEvents().pipe(qt(r=>r.keyCode===27&&!this.disableClose&&!Si(r)))).subscribe(r=>{this.disableClose||(r.preventDefault(),Cj(this,r.type==="keydown"?"keyboard":"mouse"))})}close(t){this._result=t,this._containerInstance._animationStateChanged.pipe(qt(e=>e.state==="closing"),tn(1)).subscribe(e=>{this._beforeClosed.next(t),this._beforeClosed.complete(),this._ref.overlayRef.detachBackdrop(),this._closeFallbackTimeout=setTimeout(()=>this._finishDialogClose(),e.totalTime+100)}),this._state=cS.CLOSING,this._containerInstance._startExitAnimation()}afterOpened(){return this._afterOpened}afterClosed(){return this._ref.closed}beforeClosed(){return this._beforeClosed}backdropClick(){return this._ref.backdropClick}keydownEvents(){return this._ref.keydownEvents}updatePosition(t){let e=this._ref.config.positionStrategy;return t&&(t.left||t.right)?t.left?e.left(t.left):e.right(t.right):e.centerHorizontally(),t&&(t.top||t.bottom)?t.top?e.top(t.top):e.bottom(t.bottom):e.centerVertically(),this._ref.updatePosition(),this}updateSize(t="",e=""){return this._ref.updateSize(t,e),this}addPanelClass(t){return this._ref.addPanelClass(t),this}removePanelClass(t){return this._ref.removePanelClass(t),this}getState(){return this._state}_finishDialogClose(){this._state=cS.CLOSED,this._ref.close(this._result,{focusOrigin:this._closeInteractionType}),this.componentInstance=null}};function Cj(i,t,e){return i._closeInteractionType=t,i.close(e)}var Nve=new pe("MatMdcDialogData"),kve=new pe("mat-mdc-dialog-default-options"),Lve=new pe("mat-mdc-dialog-scroll-strategy",{providedIn:"root",factory:()=>{let i=S(on);return()=>i.scrollStrategies.block()}});var Fve=0,Eu=(()=>{class i{get openDialogs(){return this._parentDialog?this._parentDialog.openDialogs:this._openDialogsAtThisLevel}get afterOpened(){return this._parentDialog?this._parentDialog.afterOpened:this._afterOpenedAtThisLevel}_getAfterAllClosed(){let e=this._parentDialog;return e?e._getAfterAllClosed():this._afterAllClosedAtThisLevel}constructor(){this._overlay=S(on),this._defaultOptions=S(kve,{optional:!0}),this._scrollStrategy=S(Lve),this._parentDialog=S(i,{optional:!0,skipSelf:!0}),this._dialog=S(oR),this._openDialogsAtThisLevel=[],this._afterAllClosedAtThisLevel=new ce,this._afterOpenedAtThisLevel=new ce,this.dialogConfigClass=dS,this.afterAllClosed=ko(()=>this.openDialogs.length?this._getAfterAllClosed():this._getAfterAllClosed().pipe(ni(void 0))),this._dialogRefConstructor=ov,this._dialogContainerType=Ave,this._dialogDataToken=Nve}open(e,n){let r;n=X(X({},this._defaultOptions||new dS),n),n.id=n.id||`mat-mdc-dialog-${Fve++}`,n.scrollStrategy=n.scrollStrategy||this._scrollStrategy();let o=this._dialog.open(e,at(X({},n),{positionStrategy:this._overlay.position().global().centerHorizontally().centerVertically(),disableClose:!0,closeOnDestroy:!1,closeOnOverlayDetachments:!1,container:{type:this._dialogContainerType,providers:()=>[{provide:this.dialogConfigClass,useValue:n},{provide:Cc,useValue:n}]},templateContext:()=>({dialogRef:r}),providers:(s,a,l)=>(r=new this._dialogRefConstructor(s,n,l),r.updatePosition(n?.position),[{provide:this._dialogContainerType,useValue:l},{provide:this._dialogDataToken,useValue:a.data},{provide:this._dialogRefConstructor,useValue:r}])}));return r.componentRef=o.componentRef,r.componentInstance=o.componentInstance,this.openDialogs.push(r),this.afterOpened.next(r),r.afterClosed().subscribe(()=>{let s=this.openDialogs.indexOf(r);s>-1&&(this.openDialogs.splice(s,1),this.openDialogs.length||this._getAfterAllClosed().next())}),r}closeAll(){this._closeDialogs(this.openDialogs)}getDialogById(e){return this.openDialogs.find(n=>n.id===e)}ngOnDestroy(){this._closeDialogs(this._openDialogsAtThisLevel),this._afterAllClosedAtThisLevel.complete(),this._afterOpenedAtThisLevel.complete()}_closeDialogs(e){let n=e.length;for(;n--;)e[n].close()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),Bve=0,pf=(()=>{class i{constructor(){this.dialogRef=S(ov,{optional:!0}),this._elementRef=S(Fe),this._dialog=S(Eu),this.type="button"}ngOnInit(){this.dialogRef||(this.dialogRef=Mj(this._elementRef,this._dialog.openDialogs))}ngOnChanges(e){let n=e._matDialogClose||e._matDialogCloseResult;n&&(this.dialogResult=n.currentValue)}_onButtonClick(e){Cj(this.dialogRef,e.screenX===0&&e.screenY===0?"keyboard":"mouse",this.dialogResult)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["","mat-dialog-close",""],["","matDialogClose",""]],hostVars:2,hostBindings:function(n,r){n&1&&H("click",function(s){return r._onButtonClick(s)}),n&2&&qe("aria-label",r.ariaLabel||null)("type",r.type)},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],type:"type",dialogResult:[0,"mat-dialog-close","dialogResult"],_matDialogClose:[0,"matDialogClose","_matDialogClose"]},exportAs:["matDialogClose"],standalone:!0,features:[un]})}}return i})(),Sj=(()=>{class i{constructor(){this._dialogRef=S(ov,{optional:!0}),this._elementRef=S(Fe),this._dialog=S(Eu)}ngOnInit(){this._dialogRef||(this._dialogRef=Mj(this._elementRef,this._dialog.openDialogs)),this._dialogRef&&Promise.resolve().then(()=>{this._onAdd()})}ngOnDestroy(){this._dialogRef?._containerInstance&&Promise.resolve().then(()=>{this._onRemove()})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,standalone:!0})}}return i})(),ff=(()=>{class i extends Sj{constructor(){super(...arguments),this.id=`mat-mdc-dialog-title-${Bve++}`}_onAdd(){this._dialogRef._containerInstance?._addAriaLabelledBy?.(this.id)}_onRemove(){this._dialogRef?._containerInstance?._removeAriaLabelledBy?.(this.id)}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Zn(i)))(r||i)}})()}static{this.\u0275dir=Ve({type:i,selectors:[["","mat-dialog-title",""],["","matDialogTitle",""]],hostAttrs:[1,"mat-mdc-dialog-title","mdc-dialog__title"],hostVars:1,hostBindings:function(n,r){n&2&&Cr("id",r.id)},inputs:{id:"id"},exportAs:["matDialogTitle"],standalone:!0,features:[sn]})}}return i})(),mf=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["","mat-dialog-content",""],["mat-dialog-content"],["","matDialogContent",""]],hostAttrs:[1,"mat-mdc-dialog-content","mdc-dialog__content"],standalone:!0,features:[z2([wP])]})}}return i})(),gf=(()=>{class i extends Sj{_onAdd(){this._dialogRef._containerInstance?._updateActionSectionCount?.(1)}_onRemove(){this._dialogRef._containerInstance?._updateActionSectionCount?.(-1)}static{this.\u0275fac=(()=>{let e;return function(r){return(e||(e=Zn(i)))(r||i)}})()}static{this.\u0275dir=Ve({type:i,selectors:[["","mat-dialog-actions",""],["mat-dialog-actions"],["","matDialogActions",""]],hostAttrs:[1,"mat-mdc-dialog-actions","mdc-dialog__actions"],hostVars:6,hostBindings:function(n,r){n&2&&ne("mat-mdc-dialog-actions-align-start",r.align==="start")("mat-mdc-dialog-actions-align-center",r.align==="center")("mat-mdc-dialog-actions-align-end",r.align==="end")},inputs:{align:"align"},standalone:!0,features:[sn]})}}return i})();function Mj(i,t){let e=i.nativeElement.parentElement;for(;e&&!e.classList.contains("mat-mdc-dialog-container");)e=e.parentElement;return e?t.find(n=>n.id===e.id):null}var ga=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({providers:[Eu],imports:[vj,so,Ds,Ht,Ht]})}}return i})();function Uj(i){let t=i.cloneNode(!0),e=t.querySelectorAll("[id]"),n=i.nodeName.toLowerCase();t.removeAttribute("id");for(let r=0;r=n&&e<=r&&t>=o&&t<=s}function lv(i,t,e){i.top+=t,i.bottom=i.top+i.height,i.left+=e,i.right=i.left+i.width}function Dj(i,t,e,n){let{top:r,right:o,bottom:s,left:a,width:l,height:c}=i,d=l*t,u=c*t;return n>r-u&&na-d&&e{this.positions.set(e,{scrollPosition:{top:e.scrollTop,left:e.scrollLeft},clientRect:fR(e)})})}handleScroll(t){let e=Pi(t),n=this.positions.get(e);if(!n)return null;let r=n.scrollPosition,o,s;if(e===this._document){let c=this.getViewportScrollPosition();o=c.top,s=c.left}else o=e.scrollTop,s=e.scrollLeft;let a=r.top-o,l=r.left-s;return this.positions.forEach((c,d)=>{c.clientRect&&e!==d&&e.contains(d)&&lv(c.clientRect,a,l)}),r.top=o,r.left=s,{top:a,left:l}}getViewportScrollPosition(){return{top:window.scrollY,left:window.scrollX}}};function Hj(i,t){let e=i.rootNodes;if(e.length===1&&e[0].nodeType===t.ELEMENT_NODE)return e[0];let n=t.createElement("div");return e.forEach(r=>n.appendChild(r)),n}function mR(i,t,e){for(let n in t)if(t.hasOwnProperty(n)){let r=t[n];r?i.setProperty(n,r,e?.has(n)?"important":""):i.removeProperty(n)}return i}function _f(i,t){let e=t?"":"none";mR(i.style,{"touch-action":t?"":"none","-webkit-user-drag":t?"":"none","-webkit-tap-highlight-color":t?"":"transparent","user-select":e,"-ms-user-select":e,"-webkit-user-select":e,"-moz-user-select":e})}function Oj(i,t,e){mR(i.style,{position:t?"":"fixed",top:t?"":"0",opacity:t?"":"0",left:t?"":"-999em"},e)}function fS(i,t){return t&&t!="none"?i+" "+t:i}function Pj(i,t){i.style.width=`${t.width}px`,i.style.height=`${t.height}px`,i.style.transform=mS(t.left,t.top)}function mS(i,t){return`translate3d(${Math.round(i)}px, ${Math.round(t)}px, 0)`}function Rj(i){let t=i.toLowerCase().indexOf("ms")>-1?1:1e3;return parseFloat(i)*t}function zve(i){let t=getComputedStyle(i),e=aR(t,"transition-property"),n=e.find(a=>a==="transform"||a==="all");if(!n)return 0;let r=e.indexOf(n),o=aR(t,"transition-duration"),s=aR(t,"transition-delay");return Rj(o[r])+Rj(s[r])}function aR(i,t){return i.getPropertyValue(t).split(",").map(n=>n.trim())}var Uve=new Set(["position"]),cR=class{get element(){return this._preview}constructor(t,e,n,r,o,s,a,l,c){this._document=t,this._rootElement=e,this._direction=n,this._initialDomRect=r,this._previewTemplate=o,this._previewClass=s,this._pickupPositionOnPage=a,this._initialTransform=l,this._zIndex=c}attach(t){this._preview=this._createPreview(),t.appendChild(this._preview),Aj(this._preview)&&this._preview.showPopover()}destroy(){this._preview.remove(),this._previewEmbeddedView?.destroy(),this._preview=this._previewEmbeddedView=null}setTransform(t){this._preview.style.transform=t}getBoundingClientRect(){return this._preview.getBoundingClientRect()}addClass(t){this._preview.classList.add(t)}getTransitionDuration(){return zve(this._preview)}addEventListener(t,e){this._preview.addEventListener(t,e)}removeEventListener(t,e){this._preview.removeEventListener(t,e)}_createPreview(){let t=this._previewTemplate,e=this._previewClass,n=t?t.template:null,r;if(n&&t){let o=t.matchSize?this._initialDomRect:null,s=t.viewContainer.createEmbeddedView(n,t.context);s.detectChanges(),r=Hj(s,this._document),this._previewEmbeddedView=s,t.matchSize?Pj(r,o):r.style.transform=mS(this._pickupPositionOnPage.x,this._pickupPositionOnPage.y)}else r=Uj(this._rootElement),Pj(r,this._initialDomRect),this._initialTransform&&(r.style.transform=this._initialTransform);return mR(r.style,{"pointer-events":"none",margin:Aj(r)?"0 auto 0 0":"0",position:"fixed",top:"0",left:"0","z-index":this._zIndex+""},Uve),_f(r,!1),r.classList.add("cdk-drag-preview"),r.setAttribute("popover","manual"),r.setAttribute("dir",this._direction),e&&(Array.isArray(e)?e.forEach(o=>r.classList.add(o)):r.classList.add(e)),r}};function Aj(i){return"showPopover"in i}var Nj=Wr({passive:!0}),uS=Wr({passive:!1}),kj=Wr({passive:!1,capture:!0}),Hve=800,Lj=new Set(["position"]),dR=class{get disabled(){return this._disabled||!!(this._dropContainer&&this._dropContainer.disabled)}set disabled(t){t!==this._disabled&&(this._disabled=t,this._toggleNativeDragInteractions(),this._handles.forEach(e=>_f(e,t)))}constructor(t,e,n,r,o,s){this._config=e,this._document=n,this._ngZone=r,this._viewportRuler=o,this._dragDropRegistry=s,this._passiveTransform={x:0,y:0},this._activeTransform={x:0,y:0},this._hasStartedDragging=et(!1),this._moveEvents=new ce,this._pointerMoveSubscription=St.EMPTY,this._pointerUpSubscription=St.EMPTY,this._scrollSubscription=St.EMPTY,this._resizeSubscription=St.EMPTY,this._boundaryElement=null,this._nativeInteractionsEnabled=!0,this._handles=[],this._disabledHandles=new Set,this._direction="ltr",this.dragStartDelay=0,this.scale=1,this._disabled=!1,this.beforeStarted=new ce,this.started=new ce,this.released=new ce,this.ended=new ce,this.entered=new ce,this.exited=new ce,this.dropped=new ce,this.moved=this._moveEvents,this._pointerDown=a=>{if(this.beforeStarted.next(),this._handles.length){let l=this._getTargetHandle(a);l&&!this._disabledHandles.has(l)&&!this.disabled&&this._initializeDragSequence(l,a)}else this.disabled||this._initializeDragSequence(this._rootElement,a)},this._pointerMove=a=>{let l=this._getPointerPositionOnPage(a);if(!this._hasStartedDragging()){let d=Math.abs(l.x-this._pickupPositionOnPage.x),u=Math.abs(l.y-this._pickupPositionOnPage.y);if(d+u>=this._config.dragStartThreshold){let p=Date.now()>=this._dragStartTime+this._getDragStartDelay(a),f=this._dropContainer;if(!p){this._endDragSequence(a);return}(!f||!f.isDragging()&&!f.isReceiving())&&(a.cancelable&&a.preventDefault(),this._hasStartedDragging.set(!0),this._ngZone.run(()=>this._startDragSequence(a)))}return}a.cancelable&&a.preventDefault();let c=this._getConstrainedPointerPosition(l);if(this._hasMoved=!0,this._lastKnownPointerPosition=l,this._updatePointerDirectionDelta(c),this._dropContainer)this._updateActiveDropContainer(c,l);else{let d=this.constrainPosition?this._initialDomRect:this._pickupPositionOnPage,u=this._activeTransform;u.x=c.x-d.x+this._passiveTransform.x,u.y=c.y-d.y+this._passiveTransform.y,this._applyRootElementTransform(u.x,u.y)}this._moveEvents.observers.length&&this._ngZone.run(()=>{this._moveEvents.next({source:this,pointerPosition:c,event:a,distance:this._getDragDistance(c),delta:this._pointerDirectionDelta})})},this._pointerUp=a=>{this._endDragSequence(a)},this._nativeDragStart=a=>{if(this._handles.length){let l=this._getTargetHandle(a);l&&!this._disabledHandles.has(l)&&!this.disabled&&a.preventDefault()}else this.disabled||a.preventDefault()},this.withRootElement(t).withParent(e.parentDragRef||null),this._parentPositions=new pS(n),s.registerDragItem(this)}getPlaceholderElement(){return this._placeholder}getRootElement(){return this._rootElement}getVisibleElement(){return this.isDragging()?this.getPlaceholderElement():this.getRootElement()}withHandles(t){this._handles=t.map(n=>ar(n)),this._handles.forEach(n=>_f(n,this.disabled)),this._toggleNativeDragInteractions();let e=new Set;return this._disabledHandles.forEach(n=>{this._handles.indexOf(n)>-1&&e.add(n)}),this._disabledHandles=e,this}withPreviewTemplate(t){return this._previewTemplate=t,this}withPlaceholderTemplate(t){return this._placeholderTemplate=t,this}withRootElement(t){let e=ar(t);return e!==this._rootElement&&(this._rootElement&&this._removeRootElementListeners(this._rootElement),this._ngZone.runOutsideAngular(()=>{e.addEventListener("mousedown",this._pointerDown,uS),e.addEventListener("touchstart",this._pointerDown,Nj),e.addEventListener("dragstart",this._nativeDragStart,uS)}),this._initialTransform=void 0,this._rootElement=e),typeof SVGElement<"u"&&this._rootElement instanceof SVGElement&&(this._ownerSVGElement=this._rootElement.ownerSVGElement),this}withBoundaryElement(t){return this._boundaryElement=t?ar(t):null,this._resizeSubscription.unsubscribe(),t&&(this._resizeSubscription=this._viewportRuler.change(10).subscribe(()=>this._containInsideBoundaryOnResize())),this}withParent(t){return this._parentDragRef=t,this}dispose(){this._removeRootElementListeners(this._rootElement),this.isDragging()&&this._rootElement?.remove(),this._anchor?.remove(),this._destroyPreview(),this._destroyPlaceholder(),this._dragDropRegistry.removeDragItem(this),this._removeListeners(),this.beforeStarted.complete(),this.started.complete(),this.released.complete(),this.ended.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this._moveEvents.complete(),this._handles=[],this._disabledHandles.clear(),this._dropContainer=void 0,this._resizeSubscription.unsubscribe(),this._parentPositions.clear(),this._boundaryElement=this._rootElement=this._ownerSVGElement=this._placeholderTemplate=this._previewTemplate=this._anchor=this._parentDragRef=null}isDragging(){return this._hasStartedDragging()&&this._dragDropRegistry.isDragging(this)}reset(){this._rootElement.style.transform=this._initialTransform||"",this._activeTransform={x:0,y:0},this._passiveTransform={x:0,y:0}}disableHandle(t){!this._disabledHandles.has(t)&&this._handles.indexOf(t)>-1&&(this._disabledHandles.add(t),_f(t,!0))}enableHandle(t){this._disabledHandles.has(t)&&(this._disabledHandles.delete(t),_f(t,this.disabled))}withDirection(t){return this._direction=t,this}_withDropContainer(t){this._dropContainer=t}getFreeDragPosition(){let t=this.isDragging()?this._activeTransform:this._passiveTransform;return{x:t.x,y:t.y}}setFreeDragPosition(t){return this._activeTransform={x:0,y:0},this._passiveTransform.x=t.x,this._passiveTransform.y=t.y,this._dropContainer||this._applyRootElementTransform(t.x,t.y),this}withPreviewContainer(t){return this._previewContainer=t,this}_sortFromLastPointerPosition(){let t=this._lastKnownPointerPosition;t&&this._dropContainer&&this._updateActiveDropContainer(this._getConstrainedPointerPosition(t),t)}_removeListeners(){this._pointerMoveSubscription.unsubscribe(),this._pointerUpSubscription.unsubscribe(),this._scrollSubscription.unsubscribe(),this._getShadowRoot()?.removeEventListener("selectstart",Bj,kj)}_destroyPreview(){this._preview?.destroy(),this._preview=null}_destroyPlaceholder(){this._placeholder?.remove(),this._placeholderRef?.destroy(),this._placeholder=this._placeholderRef=null}_endDragSequence(t){if(this._dragDropRegistry.isDragging(this)&&(this._removeListeners(),this._dragDropRegistry.stopDragging(this),this._toggleNativeDragInteractions(),this._handles&&(this._rootElement.style.webkitTapHighlightColor=this._rootElementTapHighlight),!!this._hasStartedDragging()))if(this.released.next({source:this,event:t}),this._dropContainer)this._dropContainer._stopScrolling(),this._animatePreviewToPlaceholder().then(()=>{this._cleanupDragArtifacts(t),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)});else{this._passiveTransform.x=this._activeTransform.x;let e=this._getPointerPositionOnPage(t);this._passiveTransform.y=this._activeTransform.y,this._ngZone.run(()=>{this.ended.next({source:this,distance:this._getDragDistance(e),dropPoint:e,event:t})}),this._cleanupCachedDimensions(),this._dragDropRegistry.stopDragging(this)}}_startDragSequence(t){av(t)&&(this._lastTouchEventTime=Date.now()),this._toggleNativeDragInteractions();let e=this._getShadowRoot(),n=this._dropContainer;if(e&&this._ngZone.runOutsideAngular(()=>{e.addEventListener("selectstart",Bj,kj)}),n){let r=this._rootElement,o=r.parentNode,s=this._placeholder=this._createPlaceholderElement(),a=this._anchor=this._anchor||this._document.createComment("");o.insertBefore(a,r),this._initialTransform=r.style.transform||"",this._preview=new cR(this._document,this._rootElement,this._direction,this._initialDomRect,this._previewTemplate||null,this.previewClass||null,this._pickupPositionOnPage,this._initialTransform,this._config.zIndex||1e3),this._preview.attach(this._getPreviewInsertionPoint(o,e)),Oj(r,!1,Lj),this._document.body.appendChild(o.replaceChild(s,r)),this.started.next({source:this,event:t}),n.start(),this._initialContainer=n,this._initialIndex=n.getItemIndex(this)}else this.started.next({source:this,event:t}),this._initialContainer=this._initialIndex=void 0;this._parentPositions.cache(n?n.getScrollableParents():[])}_initializeDragSequence(t,e){this._parentDragRef&&e.stopPropagation();let n=this.isDragging(),r=av(e),o=!r&&e.button!==0,s=this._rootElement,a=Pi(e),l=!r&&this._lastTouchEventTime&&this._lastTouchEventTime+Hve>Date.now(),c=r?Md(e):Sd(e);if(a&&a.draggable&&e.type==="mousedown"&&e.preventDefault(),n||o||l||c)return;if(this._handles.length){let h=s.style;this._rootElementTapHighlight=h.webkitTapHighlightColor||"",h.webkitTapHighlightColor="transparent"}this._hasMoved=!1,this._hasStartedDragging.set(this._hasMoved),this._removeListeners(),this._initialDomRect=this._rootElement.getBoundingClientRect(),this._pointerMoveSubscription=this._dragDropRegistry.pointerMove.subscribe(this._pointerMove),this._pointerUpSubscription=this._dragDropRegistry.pointerUp.subscribe(this._pointerUp),this._scrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(h=>this._updateOnScroll(h)),this._boundaryElement&&(this._boundaryRect=fR(this._boundaryElement));let d=this._previewTemplate;this._pickupPositionInElement=d&&d.template&&!d.matchSize?{x:0,y:0}:this._getPointerPositionInElement(this._initialDomRect,t,e);let u=this._pickupPositionOnPage=this._lastKnownPointerPosition=this._getPointerPositionOnPage(e);this._pointerDirectionDelta={x:0,y:0},this._pointerPositionAtLastDirectionChange={x:u.x,y:u.y},this._dragStartTime=Date.now(),this._dragDropRegistry.startDragging(this,e)}_cleanupDragArtifacts(t){Oj(this._rootElement,!0,Lj),this._anchor.parentNode.replaceChild(this._rootElement,this._anchor),this._destroyPreview(),this._destroyPlaceholder(),this._initialDomRect=this._boundaryRect=this._previewRect=this._initialTransform=void 0,this._ngZone.run(()=>{let e=this._dropContainer,n=e.getItemIndex(this),r=this._getPointerPositionOnPage(t),o=this._getDragDistance(r),s=e._isOverContainer(r.x,r.y);this.ended.next({source:this,distance:o,dropPoint:r,event:t}),this.dropped.next({item:this,currentIndex:n,previousIndex:this._initialIndex,container:e,previousContainer:this._initialContainer,isPointerOverContainer:s,distance:o,dropPoint:r,event:t}),e.drop(this,n,this._initialIndex,this._initialContainer,s,o,r,t),this._dropContainer=this._initialContainer})}_updateActiveDropContainer({x:t,y:e},{x:n,y:r}){let o=this._initialContainer._getSiblingContainerFromPosition(this,t,e);!o&&this._dropContainer!==this._initialContainer&&this._initialContainer._isOverContainer(t,e)&&(o=this._initialContainer),o&&o!==this._dropContainer&&this._ngZone.run(()=>{this.exited.next({item:this,container:this._dropContainer}),this._dropContainer.exit(this),this._dropContainer=o,this._dropContainer.enter(this,t,e,o===this._initialContainer&&o.sortingDisabled?this._initialIndex:void 0),this.entered.next({item:this,container:o,currentIndex:o.getItemIndex(this)})}),this.isDragging()&&(this._dropContainer._startScrollingIfNecessary(n,r),this._dropContainer._sortItem(this,t,e,this._pointerDirectionDelta),this.constrainPosition?this._applyPreviewTransform(t,e):this._applyPreviewTransform(t-this._pickupPositionInElement.x,e-this._pickupPositionInElement.y))}_animatePreviewToPlaceholder(){if(!this._hasMoved)return Promise.resolve();let t=this._placeholder.getBoundingClientRect();this._preview.addClass("cdk-drag-animating"),this._applyPreviewTransform(t.left,t.top);let e=this._preview.getTransitionDuration();return e===0?Promise.resolve():this._ngZone.runOutsideAngular(()=>new Promise(n=>{let r=s=>{(!s||this._preview&&Pi(s)===this._preview.element&&s.propertyName==="transform")&&(this._preview?.removeEventListener("transitionend",r),n(),clearTimeout(o))},o=setTimeout(r,e*1.5);this._preview.addEventListener("transitionend",r)}))}_createPlaceholderElement(){let t=this._placeholderTemplate,e=t?t.template:null,n;return e?(this._placeholderRef=t.viewContainer.createEmbeddedView(e,t.context),this._placeholderRef.detectChanges(),n=Hj(this._placeholderRef,this._document)):n=Uj(this._rootElement),n.style.pointerEvents="none",n.classList.add("cdk-drag-placeholder"),n}_getPointerPositionInElement(t,e,n){let r=e===this._rootElement?null:e,o=r?r.getBoundingClientRect():t,s=av(n)?n.targetTouches[0]:n,a=this._getViewportScrollPosition(),l=s.pageX-o.left-a.left,c=s.pageY-o.top-a.top;return{x:o.left-t.left+l,y:o.top-t.top+c}}_getPointerPositionOnPage(t){let e=this._getViewportScrollPosition(),n=av(t)?t.touches[0]||t.changedTouches[0]||{pageX:0,pageY:0}:t,r=n.pageX-e.left,o=n.pageY-e.top;if(this._ownerSVGElement){let s=this._ownerSVGElement.getScreenCTM();if(s){let a=this._ownerSVGElement.createSVGPoint();return a.x=r,a.y=o,a.matrixTransform(s.inverse())}}return{x:r,y:o}}_getConstrainedPointerPosition(t){let e=this._dropContainer?this._dropContainer.lockAxis:null,{x:n,y:r}=this.constrainPosition?this.constrainPosition(t,this,this._initialDomRect,this._pickupPositionInElement):t;if(this.lockAxis==="x"||e==="x"?r=this._pickupPositionOnPage.y-(this.constrainPosition?this._pickupPositionInElement.y:0):(this.lockAxis==="y"||e==="y")&&(n=this._pickupPositionOnPage.x-(this.constrainPosition?this._pickupPositionInElement.x:0)),this._boundaryRect){let{x:o,y:s}=this.constrainPosition?{x:0,y:0}:this._pickupPositionInElement,a=this._boundaryRect,{width:l,height:c}=this._getPreviewRect(),d=a.top+s,u=a.bottom-(c-s),h=a.left+o,p=a.right-(l-o);n=Fj(n,h,p),r=Fj(r,d,u)}return{x:n,y:r}}_updatePointerDirectionDelta(t){let{x:e,y:n}=t,r=this._pointerDirectionDelta,o=this._pointerPositionAtLastDirectionChange,s=Math.abs(e-o.x),a=Math.abs(n-o.y);return s>this._config.pointerDirectionChangeThreshold&&(r.x=e>o.x?1:-1,o.x=e),a>this._config.pointerDirectionChangeThreshold&&(r.y=n>o.y?1:-1,o.y=n),r}_toggleNativeDragInteractions(){if(!this._rootElement||!this._handles)return;let t=this._handles.length>0||!this.isDragging();t!==this._nativeInteractionsEnabled&&(this._nativeInteractionsEnabled=t,_f(this._rootElement,t))}_removeRootElementListeners(t){t.removeEventListener("mousedown",this._pointerDown,uS),t.removeEventListener("touchstart",this._pointerDown,Nj),t.removeEventListener("dragstart",this._nativeDragStart,uS)}_applyRootElementTransform(t,e){let n=1/this.scale,r=mS(t*n,e*n),o=this._rootElement.style;this._initialTransform==null&&(this._initialTransform=o.transform&&o.transform!="none"?o.transform:""),o.transform=fS(r,this._initialTransform)}_applyPreviewTransform(t,e){let n=this._previewTemplate?.template?void 0:this._initialTransform,r=mS(t,e);this._preview.setTransform(fS(r,n))}_getDragDistance(t){let e=this._pickupPositionOnPage;return e?{x:t.x-e.x,y:t.y-e.y}:{x:0,y:0}}_cleanupCachedDimensions(){this._boundaryRect=this._previewRect=void 0,this._parentPositions.clear()}_containInsideBoundaryOnResize(){let{x:t,y:e}=this._passiveTransform;if(t===0&&e===0||this.isDragging()||!this._boundaryElement)return;let n=this._rootElement.getBoundingClientRect(),r=this._boundaryElement.getBoundingClientRect();if(r.width===0&&r.height===0||n.width===0&&n.height===0)return;let o=r.left-n.left,s=n.right-r.right,a=r.top-n.top,l=n.bottom-r.bottom;r.width>n.width?(o>0&&(t+=o),s>0&&(t-=s)):t=0,r.height>n.height?(a>0&&(e+=a),l>0&&(e-=l)):e=0,(t!==this._passiveTransform.x||e!==this._passiveTransform.y)&&this.setFreeDragPosition({y:e,x:t})}_getDragStartDelay(t){let e=this.dragStartDelay;return typeof e=="number"?e:av(t)?e.touch:e?e.mouse:0}_updateOnScroll(t){let e=this._parentPositions.handleScroll(t);if(e){let n=Pi(t);this._boundaryRect&&n!==this._boundaryElement&&n.contains(this._boundaryElement)&&lv(this._boundaryRect,e.top,e.left),this._pickupPositionOnPage.x+=e.left,this._pickupPositionOnPage.y+=e.top,this._dropContainer||(this._activeTransform.x-=e.left,this._activeTransform.y-=e.top,this._applyRootElementTransform(this._activeTransform.x,this._activeTransform.y))}}_getViewportScrollPosition(){return this._parentPositions.positions.get(this._document)?.scrollPosition||this._parentPositions.getViewportScrollPosition()}_getShadowRoot(){return this._cachedShadowRoot===void 0&&(this._cachedShadowRoot=Oh(this._rootElement)),this._cachedShadowRoot}_getPreviewInsertionPoint(t,e){let n=this._previewContainer||"global";if(n==="parent")return t;if(n==="global"){let r=this._document;return e||r.fullscreenElement||r.webkitFullscreenElement||r.mozFullScreenElement||r.msFullscreenElement||r.body}return ar(n)}_getPreviewRect(){return(!this._previewRect||!this._previewRect.width&&!this._previewRect.height)&&(this._previewRect=this._preview?this._preview.getBoundingClientRect():this._initialDomRect),this._previewRect}_getTargetHandle(t){return this._handles.find(e=>t.target&&(t.target===e||e.contains(t.target)))}};function Fj(i,t,e){return Math.max(t,Math.min(e,i))}function av(i){return i.type[0]==="t"}function Bj(i){i.preventDefault()}function Gj(i,t,e){let n=Vj(t,i.length-1),r=Vj(e,i.length-1);if(n===r)return;let o=i[n],s=r0)return null;let a=this.orientation==="horizontal",l=o.findIndex(b=>b.drag===t),c=o[s],d=o[l].clientRect,u=c.clientRect,h=l>s?1:-1,p=this._getItemOffsetPx(d,u,h),f=this._getSiblingOffsetPx(l,o,h),m=o.slice();return Gj(o,l,s),o.forEach((b,g)=>{if(m[g]===b)return;let _=b.drag===t,x=_?p:f,C=_?t.getPlaceholderElement():b.drag.getRootElement();b.offset+=x;let T=Math.round(b.offset*(1/b.drag.scale));a?(C.style.transform=fS(`translate3d(${T}px, 0, 0)`,b.initialTransform),lv(b.clientRect,0,x)):(C.style.transform=fS(`translate3d(0, ${T}px, 0)`,b.initialTransform),lv(b.clientRect,x,0))}),this._previousSwap.overlaps=lR(u,e,n),this._previousSwap.drag=c.drag,this._previousSwap.delta=a?r.x:r.y,{previousIndex:l,currentIndex:s}}enter(t,e,n,r){let o=r==null||r<0?this._getItemIndexFromPointerPosition(t,e,n):r,s=this._activeDraggables,a=s.indexOf(t),l=t.getPlaceholderElement(),c=s[o];if(c===t&&(c=s[o+1]),!c&&(o==null||o===-1||o-1&&s.splice(a,1),c&&!this._dragDropRegistry.isDragging(c)){let d=c.getRootElement();d.parentElement.insertBefore(l,d),s.splice(o,0,t)}else this._element.appendChild(l),s.push(t);l.style.transform="",this._cacheItemPositions()}withItems(t){this._activeDraggables=t.slice(),this._cacheItemPositions()}withSortPredicate(t){this._sortPredicate=t}reset(){this._activeDraggables?.forEach(t=>{let e=t.getRootElement();if(e){let n=this._itemPositions.find(r=>r.drag===t)?.initialTransform;e.style.transform=n||""}}),this._itemPositions=[],this._activeDraggables=[],this._previousSwap.drag=null,this._previousSwap.delta=0,this._previousSwap.overlaps=!1}getActiveItemsSnapshot(){return this._activeDraggables}getItemIndex(t){return(this.orientation==="horizontal"&&this.direction==="rtl"?this._itemPositions.slice().reverse():this._itemPositions).findIndex(n=>n.drag===t)}updateOnScroll(t,e){this._itemPositions.forEach(({clientRect:n})=>{lv(n,t,e)}),this._itemPositions.forEach(({drag:n})=>{this._dragDropRegistry.isDragging(n)&&n._sortFromLastPointerPosition()})}withElementContainer(t){this._element=t}_cacheItemPositions(){let t=this.orientation==="horizontal";this._itemPositions=this._activeDraggables.map(e=>{let n=e.getVisibleElement();return{drag:e,offset:0,initialTransform:n.style.transform||"",clientRect:fR(n)}}).sort((e,n)=>t?e.clientRect.left-n.clientRect.left:e.clientRect.top-n.clientRect.top)}_getItemOffsetPx(t,e,n){let r=this.orientation==="horizontal",o=r?e.left-t.left:e.top-t.top;return n===-1&&(o+=r?e.width-t.width:e.height-t.height),o}_getSiblingOffsetPx(t,e,n){let r=this.orientation==="horizontal",o=e[t].clientRect,s=e[t+n*-1],a=o[r?"width":"height"]*n;if(s){let l=r?"left":"top",c=r?"right":"bottom";n===-1?a-=s.clientRect[l]-o[c]:a+=o[l]-s.clientRect[c]}return a}_shouldEnterAsFirstChild(t,e){if(!this._activeDraggables.length)return!1;let n=this._itemPositions,r=this.orientation==="horizontal";if(n[0].drag!==this._activeDraggables[0]){let s=n[n.length-1].clientRect;return r?t>=s.right:e>=s.bottom}else{let s=n[0].clientRect;return r?t<=s.left:e<=s.top}}_getItemIndexFromPointerPosition(t,e,n,r){let o=this.orientation==="horizontal",s=this._itemPositions.findIndex(({drag:a,clientRect:l})=>{if(a===t)return!1;if(r){let c=o?r.x:r.y;if(a===this._previousSwap.drag&&this._previousSwap.overlaps&&c===this._previousSwap.delta)return!1}return o?e>=Math.floor(l.left)&&e=Math.floor(l.top)&&nl?d.after(c):d.before(c),Gj(this._activeItems,l,o);let u=this._getRootNode().elementFromPoint(e,n);return s.deltaX=r.x,s.deltaY=r.y,s.drag=a,s.overlaps=d===u||d.contains(u),{previousIndex:l,currentIndex:o}}enter(t,e,n,r){let o=r==null||r<0?this._getItemIndexFromPointerPosition(t,e,n):r;o===-1&&(o=this._getClosestItemIndexToPointer(t,e,n));let s=this._activeItems[o],a=this._activeItems.indexOf(t);a>-1&&this._activeItems.splice(a,1),s&&!this._dragDropRegistry.isDragging(s)?(this._activeItems.splice(o,0,t),s.getRootElement().before(t.getPlaceholderElement())):(this._activeItems.push(t),this._element.appendChild(t.getPlaceholderElement()))}withItems(t){this._activeItems=t.slice()}withSortPredicate(t){this._sortPredicate=t}reset(){let t=this._element,e=this._previousSwap;for(let n=this._relatedNodes.length-1;n>-1;n--){let[r,o]=this._relatedNodes[n];r.parentNode===t&&r.nextSibling!==o&&(o===null?t.appendChild(r):o.parentNode===t&&t.insertBefore(r,o))}this._relatedNodes=[],this._activeItems=[],e.drag=null,e.deltaX=e.deltaY=0,e.overlaps=!1}getActiveItemsSnapshot(){return this._activeItems}getItemIndex(t){return this._activeItems.indexOf(t)}updateOnScroll(){this._activeItems.forEach(t=>{this._dragDropRegistry.isDragging(t)&&t._sortFromLastPointerPosition()})}withElementContainer(t){t!==this._element&&(this._element=t,this._rootNode=void 0)}_getItemIndexFromPointerPosition(t,e,n){let r=this._getRootNode().elementFromPoint(Math.floor(e),Math.floor(n)),o=r?this._activeItems.findIndex(s=>{let a=s.getRootElement();return r===a||a.contains(r)}):-1;return o===-1||!this._sortPredicate(o,t)?-1:o}_getRootNode(){return this._rootNode||(this._rootNode=Oh(this._element)||this._document),this._rootNode}_getClosestItemIndexToPointer(t,e,n){if(this._activeItems.length===0)return-1;if(this._activeItems.length===1)return 0;let r=1/0,o=-1;for(let s=0;s!0,this.sortPredicate=()=>!0,this.beforeStarted=new ce,this.entered=new ce,this.exited=new ce,this.dropped=new ce,this.sorted=new ce,this.receivingStarted=new ce,this.receivingStopped=new ce,this._isDragging=!1,this._draggables=[],this._siblings=[],this._activeSiblings=new Set,this._viewportScrollSubscription=St.EMPTY,this._verticalScrollDirection=os.NONE,this._horizontalScrollDirection=eo.NONE,this._stopScrollTimers=new ce,this._cachedShadowRoot=null,this._scrollableElements=[],this._direction="ltr",this._startScrollInterval=()=>{this._stopScrolling(),$S(0,Tv).pipe(Ke(this._stopScrollTimers)).subscribe(()=>{let a=this._scrollNode,l=this.autoScrollStep;this._verticalScrollDirection===os.UP?a.scrollBy(0,-l):this._verticalScrollDirection===os.DOWN&&a.scrollBy(0,l),this._horizontalScrollDirection===eo.LEFT?a.scrollBy(-l,0):this._horizontalScrollDirection===eo.RIGHT&&a.scrollBy(l,0)})};let s=this.element=ar(t);this._document=n,this.withOrientation("vertical").withElementContainer(s),e.registerDropContainer(this),this._parentPositions=new pS(n)}dispose(){this._stopScrolling(),this._stopScrollTimers.complete(),this._viewportScrollSubscription.unsubscribe(),this.beforeStarted.complete(),this.entered.complete(),this.exited.complete(),this.dropped.complete(),this.sorted.complete(),this.receivingStarted.complete(),this.receivingStopped.complete(),this._activeSiblings.clear(),this._scrollNode=null,this._parentPositions.clear(),this._dragDropRegistry.removeDropContainer(this)}isDragging(){return this._isDragging}start(){this._draggingStarted(),this._notifyReceivingSiblings()}enter(t,e,n,r){this._draggingStarted(),r==null&&this.sortingDisabled&&(r=this._draggables.indexOf(t)),this._sortStrategy.enter(t,e,n,r),this._cacheParentPositions(),this._notifyReceivingSiblings(),this.entered.next({item:t,container:this,currentIndex:this.getItemIndex(t)})}exit(t){this._reset(),this.exited.next({item:t,container:this})}drop(t,e,n,r,o,s,a,l={}){this._reset(),this.dropped.next({item:t,currentIndex:e,previousIndex:n,container:this,previousContainer:r,isPointerOverContainer:o,distance:s,dropPoint:a,event:l})}withItems(t){let e=this._draggables;return this._draggables=t,t.forEach(n=>n._withDropContainer(this)),this.isDragging()&&(e.filter(r=>r.isDragging()).every(r=>t.indexOf(r)===-1)?this._reset():this._sortStrategy.withItems(this._draggables)),this}withDirection(t){return this._direction=t,this._sortStrategy instanceof gS&&(this._sortStrategy.direction=t),this}connectedTo(t){return this._siblings=t.slice(),this}withOrientation(t){if(t==="mixed")this._sortStrategy=new uR(this._document,this._dragDropRegistry);else{let e=new gS(this._dragDropRegistry);e.direction=this._direction,e.orientation=t,this._sortStrategy=e}return this._sortStrategy.withElementContainer(this._container),this._sortStrategy.withSortPredicate((e,n)=>this.sortPredicate(e,n,this)),this}withScrollableParents(t){let e=this._container;return this._scrollableElements=t.indexOf(e)===-1?[e,...t]:t.slice(),this}withElementContainer(t){if(t===this._container)return this;let e=ar(this.element),n=this._scrollableElements.indexOf(this._container),r=this._scrollableElements.indexOf(t);return n>-1&&this._scrollableElements.splice(n,1),r>-1&&this._scrollableElements.splice(r,1),this._sortStrategy&&this._sortStrategy.withElementContainer(t),this._cachedShadowRoot=null,this._scrollableElements.unshift(t),this._container=t,this}getScrollableParents(){return this._scrollableElements}getItemIndex(t){return this._isDragging?this._sortStrategy.getItemIndex(t):this._draggables.indexOf(t)}isReceiving(){return this._activeSiblings.size>0}_sortItem(t,e,n,r){if(this.sortingDisabled||!this._domRect||!Dj(this._domRect,zj,e,n))return;let o=this._sortStrategy.sort(t,e,n,r);o&&this.sorted.next({previousIndex:o.previousIndex,currentIndex:o.currentIndex,container:this,item:t})}_startScrollingIfNecessary(t,e){if(this.autoScrollDisabled)return;let n,r=os.NONE,o=eo.NONE;if(this._parentPositions.positions.forEach((s,a)=>{a===this._document||!s.clientRect||n||Dj(s.clientRect,zj,t,e)&&([r,o]=Gve(a,s.clientRect,this._direction,t,e),(r||o)&&(n=a))}),!r&&!o){let{width:s,height:a}=this._viewportRuler.getViewportSize(),l={width:s,height:a,top:0,right:s,bottom:a,left:0};r=Wj(l,e),o=$j(l,t),n=window}n&&(r!==this._verticalScrollDirection||o!==this._horizontalScrollDirection||n!==this._scrollNode)&&(this._verticalScrollDirection=r,this._horizontalScrollDirection=o,this._scrollNode=n,(r||o)&&n?this._ngZone.runOutsideAngular(this._startScrollInterval):this._stopScrolling())}_stopScrolling(){this._stopScrollTimers.next()}_draggingStarted(){let t=this._container.style;this.beforeStarted.next(),this._isDragging=!0,this._initialScrollSnap=t.msScrollSnapType||t.scrollSnapType||"",t.scrollSnapType=t.msScrollSnapType="none",this._sortStrategy.start(this._draggables),this._cacheParentPositions(),this._viewportScrollSubscription.unsubscribe(),this._listenToScrollEvents()}_cacheParentPositions(){this._parentPositions.cache(this._scrollableElements),this._domRect=this._parentPositions.positions.get(this._container).clientRect}_reset(){this._isDragging=!1;let t=this._container.style;t.scrollSnapType=t.msScrollSnapType=this._initialScrollSnap,this._siblings.forEach(e=>e._stopReceiving(this)),this._sortStrategy.reset(),this._stopScrolling(),this._viewportScrollSubscription.unsubscribe(),this._parentPositions.clear()}_isOverContainer(t,e){return this._domRect!=null&&lR(this._domRect,t,e)}_getSiblingContainerFromPosition(t,e,n){return this._siblings.find(r=>r._canReceive(t,e,n))}_canReceive(t,e,n){if(!this._domRect||!lR(this._domRect,e,n)||!this.enterPredicate(t,this))return!1;let r=this._getShadowRoot().elementFromPoint(e,n);return r?r===this._container||this._container.contains(r):!1}_startReceiving(t,e){let n=this._activeSiblings;!n.has(t)&&e.every(r=>this.enterPredicate(r,this)||this._draggables.indexOf(r)>-1)&&(n.add(t),this._cacheParentPositions(),this._listenToScrollEvents(),this.receivingStarted.next({initiator:t,receiver:this,items:e}))}_stopReceiving(t){this._activeSiblings.delete(t),this._viewportScrollSubscription.unsubscribe(),this.receivingStopped.next({initiator:t,receiver:this})}_listenToScrollEvents(){this._viewportScrollSubscription=this._dragDropRegistry.scrolled(this._getShadowRoot()).subscribe(t=>{if(this.isDragging()){let e=this._parentPositions.handleScroll(t);e&&this._sortStrategy.updateOnScroll(e.top,e.left)}else this.isReceiving()&&this._cacheParentPositions()})}_getShadowRoot(){if(!this._cachedShadowRoot){let t=Oh(this._container);this._cachedShadowRoot=t||this._document}return this._cachedShadowRoot}_notifyReceivingSiblings(){let t=this._sortStrategy.getActiveItemsSnapshot().filter(e=>e.isDragging());this._siblings.forEach(e=>e._startReceiving(this,t))}};function Wj(i,t){let{top:e,bottom:n,height:r}=i,o=r*jj;return t>=e-o&&t<=e+o?os.UP:t>=n-o&&t<=n+o?os.DOWN:os.NONE}function $j(i,t){let{left:e,right:n,width:r}=i,o=r*jj;return t>=e-o&&t<=e+o?eo.LEFT:t>=n-o&&t<=n+o?eo.RIGHT:eo.NONE}function Gve(i,t,e,n,r){let o=Wj(t,r),s=$j(t,n),a=os.NONE,l=eo.NONE;if(o){let c=i.scrollTop;o===os.UP?c>0&&(a=os.UP):i.scrollHeight-c>i.clientHeight&&(a=os.DOWN)}if(s){let c=i.scrollLeft;e==="rtl"?s===eo.RIGHT?c<0&&(l=eo.RIGHT):i.scrollWidth+c>i.clientWidth&&(l=eo.LEFT):s===eo.LEFT?c>0&&(l=eo.LEFT):i.scrollWidth-c>i.clientWidth&&(l=eo.RIGHT)}return[a,l]}var hS=Wr({passive:!1,capture:!0}),jve=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["ng-component"]],hostAttrs:["cdk-drag-resets-container",""],standalone:!0,features:[se],decls:0,vars:0,template:function(n,r){},styles:["@layer cdk-resets{.cdk-drag-preview{background:none;border:none;padding:0;color:inherit;inset:auto}}.cdk-drag-placeholder *,.cdk-drag-preview *{pointer-events:none !important}"],encapsulation:2,changeDetection:0})}}return i})(),Wve=(()=>{class i{constructor(){this._ngZone=S(Ue),this._document=S(ft),this._styleLoader=S(mi),this._dropInstances=new Set,this._dragInstances=new Set,this._activeDragInstances=et([]),this._globalListeners=new Map,this._draggingPredicate=e=>e.isDragging(),this.pointerMove=new ce,this.pointerUp=new ce,this.scroll=new ce,this._preventDefaultWhileDragging=e=>{this._activeDragInstances().length>0&&e.preventDefault()},this._persistentTouchmoveListener=e=>{this._activeDragInstances().length>0&&(this._activeDragInstances().some(this._draggingPredicate)&&e.preventDefault(),this.pointerMove.next(e))}}registerDropContainer(e){this._dropInstances.has(e)||this._dropInstances.add(e)}registerDragItem(e){this._dragInstances.add(e),this._dragInstances.size===1&&this._ngZone.runOutsideAngular(()=>{this._document.addEventListener("touchmove",this._persistentTouchmoveListener,hS)})}removeDropContainer(e){this._dropInstances.delete(e)}removeDragItem(e){this._dragInstances.delete(e),this.stopDragging(e),this._dragInstances.size===0&&this._document.removeEventListener("touchmove",this._persistentTouchmoveListener,hS)}startDragging(e,n){if(!(this._activeDragInstances().indexOf(e)>-1)&&(this._styleLoader.load(jve),this._activeDragInstances.update(r=>[...r,e]),this._activeDragInstances().length===1)){let r=n.type.startsWith("touch");this._globalListeners.set(r?"touchend":"mouseup",{handler:o=>this.pointerUp.next(o),options:!0}).set("scroll",{handler:o=>this.scroll.next(o),options:!0}).set("selectstart",{handler:this._preventDefaultWhileDragging,options:hS}),r||this._globalListeners.set("mousemove",{handler:o=>this.pointerMove.next(o),options:hS}),this._ngZone.runOutsideAngular(()=>{this._globalListeners.forEach((o,s)=>{this._document.addEventListener(s,o.handler,o.options)})})}}stopDragging(e){this._activeDragInstances.update(n=>{let r=n.indexOf(e);return r>-1?(n.splice(r,1),[...n]):n}),this._activeDragInstances().length===0&&this._clearGlobalListeners()}isDragging(e){return this._activeDragInstances().indexOf(e)>-1}scrolled(e){let n=[this.scroll];return e&&e!==this._document&&n.push(new Dt(r=>this._ngZone.runOutsideAngular(()=>{let s=a=>{this._activeDragInstances().length&&r.next(a)};return e.addEventListener("scroll",s,!0),()=>{e.removeEventListener("scroll",s,!0)}}))),Xn(...n)}ngOnDestroy(){this._dragInstances.forEach(e=>this.removeDragItem(e)),this._dropInstances.forEach(e=>this.removeDropContainer(e)),this._clearGlobalListeners(),this.pointerMove.complete(),this.pointerUp.complete()}_clearGlobalListeners(){this._globalListeners.forEach((e,n)=>{this._document.removeEventListener(n,e.handler,e.options)}),this._globalListeners.clear()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),$ve={dragStartThreshold:5,pointerDirectionChangeThreshold:5},qj=(()=>{class i{constructor(){this._document=S(ft),this._ngZone=S(Ue),this._viewportRuler=S(aa),this._dragDropRegistry=S(Wve)}createDrag(e,n=$ve){return new dR(e,n,this._document,this._ngZone,this._viewportRuler,this._dragDropRegistry)}createDropList(e){return new hR(e,this._dragDropRegistry,this._document,this._ngZone,this._viewportRuler)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})(),pR=new pe("CDK_DRAG_PARENT");var Yj=new pe("CdkDragHandle"),Xj=(()=>{class i{get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._stateChanges.next(this)}constructor(){this.element=S(Fe),this._parentDrag=S(pR,{optional:!0,skipSelf:!0}),this._stateChanges=new ce,this._disabled=!1,this._parentDrag?._addHandle(this)}ngOnDestroy(){this._parentDrag?._removeHandle(this),this._stateChanges.complete()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["","cdkDragHandle",""]],hostAttrs:[1,"cdk-drag-handle"],inputs:{disabled:[2,"cdkDragHandleDisabled","disabled",Ye]},standalone:!0,features:[Bt([{provide:Yj,useExisting:i}]),nn]})}}return i})(),qve=new pe("CDK_DRAG_CONFIG"),Yve="cdk-drag",Xve=new pe("CdkDropList"),Qj=(()=>{class i{static{this._dragInstances=[]}get disabled(){return this._disabled||!!(this.dropContainer&&this.dropContainer.disabled)}set disabled(e){this._disabled=e,this._dragRef.disabled=this._disabled}constructor(){this.element=S(Fe),this.dropContainer=S(Xve,{optional:!0,skipSelf:!0}),this._ngZone=S(Ue),this._viewContainerRef=S(Kt),this._dir=S(oi,{optional:!0}),this._changeDetectorRef=S(Re),this._selfHandle=S(Yj,{optional:!0,self:!0}),this._parentDrag=S(pR,{optional:!0,skipSelf:!0}),this._destroyed=new ce,this._handles=new yn([]),this.scale=1,this.started=new Ie,this.released=new Ie,this.ended=new Ie,this.entered=new Ie,this.exited=new Ie,this.dropped=new Ie,this.moved=new Dt(o=>{let s=this._dragRef.moved.pipe(We(a=>({source:this,pointerPosition:a.pointerPosition,event:a.event,delta:a.delta,distance:a.distance}))).subscribe(o);return()=>{s.unsubscribe()}}),this._injector=S(pt);let e=this.dropContainer,n=S(qve,{optional:!0}),r=S(qj);this._dragRef=r.createDrag(this.element,{dragStartThreshold:n&&n.dragStartThreshold!=null?n.dragStartThreshold:5,pointerDirectionChangeThreshold:n&&n.pointerDirectionChangeThreshold!=null?n.pointerDirectionChangeThreshold:5,zIndex:n?.zIndex}),this._dragRef.data=this,i._dragInstances.push(this),n&&this._assignDefaults(n),e&&(this._dragRef._withDropContainer(e._dropListRef),e.addItem(this),e._dropListRef.beforeStarted.pipe(Ke(this._destroyed)).subscribe(()=>{this._dragRef.scale=this.scale})),this._syncInputs(this._dragRef),this._handleEvents(this._dragRef)}getPlaceholderElement(){return this._dragRef.getPlaceholderElement()}getRootElement(){return this._dragRef.getRootElement()}reset(){this._dragRef.reset()}getFreeDragPosition(){return this._dragRef.getFreeDragPosition()}setFreeDragPosition(e){this._dragRef.setFreeDragPosition(e)}ngAfterViewInit(){zi(()=>{this._updateRootElement(),this._setupHandlesListener(),this._dragRef.scale=this.scale,this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)},{injector:this._injector})}ngOnChanges(e){let n=e.rootElementSelector,r=e.freeDragPosition;n&&!n.firstChange&&this._updateRootElement(),this._dragRef.scale=this.scale,r&&!r.firstChange&&this.freeDragPosition&&this._dragRef.setFreeDragPosition(this.freeDragPosition)}ngOnDestroy(){this.dropContainer&&this.dropContainer.removeItem(this);let e=i._dragInstances.indexOf(this);e>-1&&i._dragInstances.splice(e,1),this._ngZone.runOutsideAngular(()=>{this._handles.complete(),this._destroyed.next(),this._destroyed.complete(),this._dragRef.dispose()})}_addHandle(e){let n=this._handles.getValue();n.push(e),this._handles.next(n)}_removeHandle(e){let n=this._handles.getValue(),r=n.indexOf(e);r>-1&&(n.splice(r,1),this._handles.next(n))}_setPreviewTemplate(e){this._previewTemplate=e}_resetPreviewTemplate(e){e===this._previewTemplate&&(this._previewTemplate=null)}_setPlaceholderTemplate(e){this._placeholderTemplate=e}_resetPlaceholderTemplate(e){e===this._placeholderTemplate&&(this._placeholderTemplate=null)}_updateRootElement(){let e=this.element.nativeElement,n=e;this.rootElementSelector&&(n=e.closest!==void 0?e.closest(this.rootElementSelector):e.parentElement?.closest(this.rootElementSelector)),this._dragRef.withRootElement(n||e)}_getBoundaryElement(){let e=this.boundaryElement;return e?typeof e=="string"?this.element.nativeElement.closest(e):ar(e):null}_syncInputs(e){e.beforeStarted.subscribe(()=>{if(!e.isDragging()){let n=this._dir,r=this.dragStartDelay,o=this._placeholderTemplate?{template:this._placeholderTemplate.templateRef,context:this._placeholderTemplate.data,viewContainer:this._viewContainerRef}:null,s=this._previewTemplate?{template:this._previewTemplate.templateRef,context:this._previewTemplate.data,matchSize:this._previewTemplate.matchSize,viewContainer:this._viewContainerRef}:null;e.disabled=this.disabled,e.lockAxis=this.lockAxis,e.scale=this.scale,e.dragStartDelay=typeof r=="object"&&r?r:Va(r),e.constrainPosition=this.constrainPosition,e.previewClass=this.previewClass,e.withBoundaryElement(this._getBoundaryElement()).withPlaceholderTemplate(o).withPreviewTemplate(s).withPreviewContainer(this.previewContainer||"global"),n&&e.withDirection(n.value)}}),e.beforeStarted.pipe(tn(1)).subscribe(()=>{if(this._parentDrag){e.withParent(this._parentDrag._dragRef);return}let n=this.element.nativeElement.parentElement;for(;n;){if(n.classList.contains(Yve)){e.withParent(i._dragInstances.find(r=>r.element.nativeElement===n)?._dragRef||null);break}n=n.parentElement}})}_handleEvents(e){e.started.subscribe(n=>{this.started.emit({source:this,event:n.event}),this._changeDetectorRef.markForCheck()}),e.released.subscribe(n=>{this.released.emit({source:this,event:n.event})}),e.ended.subscribe(n=>{this.ended.emit({source:this,distance:n.distance,dropPoint:n.dropPoint,event:n.event}),this._changeDetectorRef.markForCheck()}),e.entered.subscribe(n=>{this.entered.emit({container:n.container.data,item:this,currentIndex:n.currentIndex})}),e.exited.subscribe(n=>{this.exited.emit({container:n.container.data,item:this})}),e.dropped.subscribe(n=>{this.dropped.emit({previousIndex:n.previousIndex,currentIndex:n.currentIndex,previousContainer:n.previousContainer.data,container:n.container.data,isPointerOverContainer:n.isPointerOverContainer,item:this,distance:n.distance,dropPoint:n.dropPoint,event:n.event})})}_assignDefaults(e){let{lockAxis:n,dragStartDelay:r,constrainPosition:o,previewClass:s,boundaryElement:a,draggingDisabled:l,rootElementSelector:c,previewContainer:d}=e;this.disabled=l??!1,this.dragStartDelay=r||0,n&&(this.lockAxis=n),o&&(this.constrainPosition=o),s&&(this.previewClass=s),a&&(this.boundaryElement=a),c&&(this.rootElementSelector=c),d&&(this.previewContainer=d)}_setupHandlesListener(){this._handles.pipe(gn(e=>{let n=e.map(r=>r.element);this._selfHandle&&this.rootElementSelector&&n.push(this.element),this._dragRef.withHandles(n)}),Tn(e=>Xn(...e.map(n=>n._stateChanges.pipe(ni(n))))),Ke(this._destroyed)).subscribe(e=>{let n=this._dragRef,r=e.element.nativeElement;e.disabled?n.disableHandle(r):n.enableHandle(r)})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["","cdkDrag",""]],hostAttrs:[1,"cdk-drag"],hostVars:4,hostBindings:function(n,r){n&2&&ne("cdk-drag-disabled",r.disabled)("cdk-drag-dragging",r._dragRef.isDragging())},inputs:{data:[0,"cdkDragData","data"],lockAxis:[0,"cdkDragLockAxis","lockAxis"],rootElementSelector:[0,"cdkDragRootElement","rootElementSelector"],boundaryElement:[0,"cdkDragBoundary","boundaryElement"],dragStartDelay:[0,"cdkDragStartDelay","dragStartDelay"],freeDragPosition:[0,"cdkDragFreeDragPosition","freeDragPosition"],disabled:[2,"cdkDragDisabled","disabled",Ye],constrainPosition:[0,"cdkDragConstrainPosition","constrainPosition"],previewClass:[0,"cdkDragPreviewClass","previewClass"],previewContainer:[0,"cdkDragPreviewContainer","previewContainer"],scale:[2,"cdkDragScale","scale",Jn]},outputs:{started:"cdkDragStarted",released:"cdkDragReleased",ended:"cdkDragEnded",entered:"cdkDragEntered",exited:"cdkDragExited",dropped:"cdkDragDropped",moved:"cdkDragMoved"},exportAs:["cdkDrag"],standalone:!0,features:[Bt([{provide:pR,useExisting:i}]),nn,un]})}}return i})();var Zj=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({providers:[qj],imports:[ts]})}}return i})();var gR=(i,t)=>t.type;function Zve(i,t){if(i&1){let e=te();v(0,"div",18),H("click",function(){let r=B(e).$implicit,o=I(2).$index,s=I();return V(s.handleToggleMatchType(o,r.type))}),v(1,"mat-icon"),M(2),y()()}if(i&2){let e=t.$implicit,n=I(2).$implicit,r=I();ne("selected",r.getIsMatchTypeSelected(n,e.type))("disabled",r.getDisableMatchType(n,e.type)),R("matTooltip",e.tooltip),w(2),lt(e.type)}}function Kve(i,t){if(i&1){let e=te();v(0,"div",12)(1,"div",13),M(2,"R"),y(),v(3,"div",14),M(4,"E"),y()(),v(5,"input",15,1),H("change",function(){B(e);let r=fe(6),o=I().$index,s=I();return V(s.handleRegexQueryChanged(o,r.value))}),y(),v(7,"div",16),Xt(8,Zve,3,6,"div",17,gR),y()}if(i&2){let e=I().$implicit,n=I();w(5),R("value",e.queryRegex),w(3),Qt(n.allSearchMatchTypeOptions)}}function Jve(i,t){if(i&1){let e=te();v(0,"div",19),M(1," [\xB7\xB7] "),y(),v(2,"div",20)(3,"input",21,2),H("change",function(){B(e);let r=fe(4),o=fe(8),s=fe(12),a=I().$index,l=I();return V(l.handleAttrValueRangeQueryChanged(a,r.value.trim(),o.value.trim(),s.value.trim()))}),y(),v(5,"div",22),M(6,":"),y(),v(7,"input",23,3),H("change",function(){B(e);let r=fe(4),o=fe(8),s=fe(12),a=I().$index,l=I();return V(l.handleAttrValueRangeQueryChanged(a,r.value.trim(),o.value.trim(),s.value.trim()))}),y(),v(9,"div",24),M(10,","),y(),v(11,"input",25,4),H("change",function(){B(e);let r=fe(4),o=fe(8),s=fe(12),a=I().$index,l=I();return V(l.handleAttrValueRangeQueryChanged(a,r.value.trim(),o.value.trim(),s.value.trim()))}),y()()}if(i&2){let e=I().$implicit,n=I();w(3),R("value",e.attrName),w(4),R("value",n.getAttrValueRangeString(e.min)),w(4),R("value",n.getAttrValueRangeString(e.max))}}function eye(i,t){if(i&1&&(v(0,"option",28),M(1),y()),i&2){let e=t.$implicit,n=I(2).$implicit;R("value",e.type)("selected",e.type===n.nodeType),w(),we(" ",e.label," ")}}function tye(i,t){if(i&1){let e=te();v(0,"div",26)(1,"mat-icon"),M(2,"device_hub"),y()(),v(3,"select",27,5),H("change",function(){B(e);let r=fe(4),o=I().$index,s=I();return V(s.handleNodeTypeChanged(o,r.value))}),Xt(5,eye,2,3,"option",28,gR),y()}if(i&2){let e=I(2);w(5),Qt(e.allSearchNodeTypes)}}function nye(i,t){if(i&1){let e=te();v(0,"div",29),H("click",function(){B(e);let r=I().$index,o=I();return V(o.handleDeleteQuery(r))}),v(1,"mat-icon"),M(2,"delete"),y()()}}function iye(i,t){if(i&1&&(v(0,"div",7),W(1,Kve,10,1)(2,Jve,13,3)(3,tye,7,0)(4,nye,3,0,"div",11),y()),i&2){let e,n=t.$implicit,r=I();w(),re((e=n.type)===r.NodeQueryType.REGEX?1:e===r.NodeQueryType.ATTR_VALUE_RANGE?2:e===r.NodeQueryType.NODE_TYPE?3:-1),w(3),re(r.getShowDeleteQueryButton(n)?4:-1)}}function rye(i,t){i&1&&(v(0,"div",31)(1,"div",13),M(2,"R"),y(),v(3,"div",14),M(4,"E"),y()())}function oye(i,t){i&1&&(v(0,"div",32),M(1," [\xB7\xB7] "),y())}function sye(i,t){if(i&1){let e=te();v(0,"div",30),H("click",function(){let r=B(e).$implicit,o=I();return V(o.handleAddQuery(r.type))}),W(1,rye,5,0,"div",31)(2,oye,2,0,"div",32),v(3,"div",33),M(4),y()()}if(i&2){let e,n=t.$implicit,r=I();w(),re((e=n.type)===r.NodeQueryType.REGEX?1:e===r.NodeQueryType.ATTR_VALUE_RANGE?2:-1),w(3),lt(n.label)}}var Kj=(()=>{class i{changeDetectorRef;queries=[];queriesUpdated=new Ie;NodeQueryType=Un;allSearchMatchTypeOptions=[{type:xt.NODE_LABEL,tooltip:"Match label"},{type:xt.ATTRIBUTE,tooltip:"Match attributes"},{type:xt.INPUT_METADATA,tooltip:"Match inputs (op node only)"},{type:xt.OUTPUT_METADATA,tooltip:"Match outputs (op node only)"}];allSearchNodeTypes=[{type:Sr.OP_NODES,label:"Op nodes only"},{type:Sr.LAYER_NODES,label:"Layer nodes only"},{type:Sr.OP_AND_LAYER_NODES,label:"Op and layer nodes"}];allQueryTypes=[{type:Un.REGEX,label:"Regex"},{type:Un.ATTR_VALUE_RANGE,label:"Attribute value range"}];curQueries=[];curMatchedNodes={};constructor(e){this.changeDetectorRef=e}ngOnInit(){this.curQueries=JSON.parse(JSON.stringify(this.queries))}setMatchedNodes(e){this.curMatchedNodes=e,this.changeDetectorRef.markForCheck()}handleRegexQueryChanged(e,n){let r=this.curQueries[e];r.queryRegex=n.trim(),this.queriesUpdated.emit([...this.curQueries])}handleAttrValueRangeQueryChanged(e,n,r,o){let s=Number.NEGATIVE_INFINITY,a=Number.POSITIVE_INFINITY;r!==""&&!isNaN(Number(r))&&(s=Number(r)),o!==""&&!isNaN(Number(o))&&(a=Number(o));let l=this.curQueries[e];l.attrName=n,l.min=s,l.max=a,this.queriesUpdated.emit([...this.curQueries])}handleNodeTypeChanged(e,n){let r=this.curQueries[e];r.nodeType=n,this.queriesUpdated.emit([...this.curQueries])}handleToggleMatchType(e,n){if(this.getDisableMatchType(this.curQueries[e],n))return;let r=this.curQueries[e],o=r.matchTypes.indexOf(n);o>=0?r.matchTypes.splice(o,1):r.matchTypes.push(n),this.queriesUpdated.emit([...this.curQueries])}handleDeleteQuery(e){this.curQueries.splice(e,1),this.queriesUpdated.emit([...this.curQueries])}handleAddQuery(e){switch(e){case Un.REGEX:this.curQueries.push({type:e,queryRegex:"",matchTypes:[xt.NODE_LABEL]});break;case Un.ATTR_VALUE_RANGE:this.curQueries.push({type:e,attrName:"",min:Number.NEGATIVE_INFINITY,max:Number.POSITIVE_INFINITY});break;case Un.NODE_TYPE:this.curQueries.push({type:e,nodeType:Sr.OP_NODES});break;default:break}this.queriesUpdated.emit([...this.curQueries])}getIsMatchTypeSelected(e,n){return e.matchTypes.includes(n)}getDisableMatchType(e,n){return e.matchTypes.length===1&&e.matchTypes[0]===n}getAttrValueRangeString(e){return e==null||e===Number.NEGATIVE_INFINITY||e===Number.POSITIVE_INFINITY?"":`${e}`}getShowDeleteQueryButton(e){return e.type!==Un.NODE_TYPE}static \u0275fac=function(n){return new(n||i)(q(Re))};static \u0275cmp=oe({type:i,selectors:[["complex-queries"]],inputs:{queries:"queries"},outputs:{queriesUpdated:"queriesUpdated"},standalone:!0,features:[se],decls:11,vars:1,consts:[["menu","matMenu"],["queryInput",""],["inputAttrName",""],["inputMin",""],["inputMax",""],["select",""],[1,"container"],[1,"query-container"],[1,"btn-add-query",3,"matMenuTriggerFor"],[1,"model-explorer-add-query-menu"],[1,"menu-item"],["matTooltip","Delete query","matTooltipPosition","right",1,"icon-container","delete"],["matTooltip","Regex","n","","matTooltipPosition","left",1,"model-explorer-regex-icon"],[1,"r"],[1,"e"],["placeholder","Regex",1,"regex","common-input",3,"change","value"],[1,"targets-container"],[1,"icon-container","match-type",3,"matTooltip","selected","disabled"],[1,"icon-container","match-type",3,"click","matTooltip"],["matTooltip","Attribute value range","matTooltipPosition","left",1,"model-explorer-attr-value-range-icon"],[1,"attrs-value-range-container"],["placeholder","Attr name",1,"common-input","attr-name",3,"change","value"],[1,"colon"],["placeholder","min",1,"common-input","min",3,"change","value"],[1,"to"],["placeholder","max",1,"common-input","max",3,"change","value"],["matTooltip","Node type","matTooltipPosition","left",1,"model-explorer-node-type-icon"],[1,"node-type-selector",3,"change"],[3,"value","selected"],["matTooltip","Delete query","matTooltipPosition","right",1,"icon-container","delete",3,"click"],[1,"menu-item",3,"click"],[1,"model-explorer-regex-icon"],[1,"model-explorer-attr-value-range-icon"],[1,"label"]],template:function(n,r){if(n&1&&(v(0,"div",6),Xt(1,iye,5,2,"div",7,wr),v(3,"div",8)(4,"mat-icon"),M(5,"add"),y(),M(6," Add query "),y(),v(7,"mat-menu",9,0),Xt(9,sye,5,2,"div",10,gR),y()()),n&2){let o=fe(8);w(),Qt(r.curQueries),w(2),R("matMenuTriggerFor",o),w(6),Qt(r.allQueryTypes)}},dependencies:[Oe,Je,dt,ca,is,yc,$t,qn],styles:[`.query-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:6px;margin-bottom:4px;position:relative;padding-right:36px}.query-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:22px;border:1px solid #ccc;border-radius:4px;box-sizing:border-box;padding:0 4px;outline:none}.query-container[_ngcontent-%COMP%] input.regex[_ngcontent-%COMP%]{flex-grow:1}.query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%]{display:flex;align-items:center;width:240px}.query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] .colon[_ngcontent-%COMP%], .query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] .to[_ngcontent-%COMP%]{font-weight:700;margin:0 2px;height:22px}.query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{min-width:0}.query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] input.attr-name[_ngcontent-%COMP%]{flex-grow:1}.query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] input.min[_ngcontent-%COMP%], .query-container[_ngcontent-%COMP%] .attrs-value-range-container[_ngcontent-%COMP%] input.max[_ngcontent-%COMP%]{width:50px}.query-container[_ngcontent-%COMP%] .node-type-selector[_ngcontent-%COMP%]{border:1px solid #ccc;border-radius:4px;outline:none;height:23px;cursor:pointer;box-sizing:border-box;width:160px}.query-container[_ngcontent-%COMP%] .icon-container.delete[_ngcontent-%COMP%]{display:flex;position:absolute;right:0;top:4px;cursor:pointer;opacity:.6}.query-container[_ngcontent-%COMP%] .icon-container.delete[_ngcontent-%COMP%]:hover{opacity:1}.query-container[_ngcontent-%COMP%] .icon-container.delete[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.targets-container[_ngcontent-%COMP%]{display:flex;align-items:center;gap:2px}.targets-container[_ngcontent-%COMP%] .icon-container.match-type[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;background-color:#ddd;border-radius:4px;cursor:pointer;padding:4px}.targets-container[_ngcontent-%COMP%] .icon-container.match-type.selected[_ngcontent-%COMP%]{background-color:#a3c9ff}.targets-container[_ngcontent-%COMP%] .icon-container.match-type.disabled[_ngcontent-%COMP%]{cursor:default}.targets-container[_ngcontent-%COMP%] .icon-container.match-type[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:14px;width:14px;height:14px;color:#333}.btn-add-query[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;width:fit-content;line-height:16px;opacity:.6;white-space:nowrap;margin-top:2px;-webkit-user-select:none;user-select:none;margin-left:19px}.btn-add-query[_ngcontent-%COMP%]:hover{opacity:1}.btn-add-query[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px;margin-right:2px} .model-explorer-add-query-menu .menu-item{letter-spacing:normal!important;font-family:Google Sans Text,Arial,Helvetica,sans-serif!important;font-size:12px;padding:0 8px;cursor:pointer;display:flex;align-items:center} .model-explorer-add-query-menu .menu-item .label{margin-left:6px} .model-explorer-add-query-menu .menu-item:hover{background-color:#eee} .model-explorer-regex-icon{display:flex;width:16px;height:16px;align-items:center;justify-content:center;font-weight:700;-webkit-user-select:none;user-select:none;color:#aaa} .model-explorer-regex-icon .r{font-size:12px} .model-explorer-regex-icon .e{font-size:8px;margin-top:2px} .model-explorer-attr-value-range-icon{display:flex;width:16px;height:16px;align-items:center;justify-content:center;font-size:10px;font-weight:700;-webkit-user-select:none;user-select:none;color:#aaa} .model-explorer-node-type-icon{width:16px;height:16px} .model-explorer-node-type-icon mat-icon{font-size:16px;width:16px;height:16px;color:#aaa} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();function aye(i,t){if(i&1&&(v(0,"div",3),ee(1,"io-tree",4),y()),i&2){let e=I();w(),R("data",e.curIoTreeData)("rendererId",e.rendererId)("tooltipPosition","right")}}var Jj=(()=>{class i{nodes=[];rendererId="";labelSuffix="node";popupSize={minWidth:320,maxWidth:640,minHeight:0};curIoTreeData=[];ngOnChanges(e){e.nodes&&(this.curIoTreeData=ul(this.nodes,[],"incoming"))}get label(){let e=this.nodes.length;return`${e} ${this.labelSuffix}${e===1?"":"s"}`}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=oe({type:i,selectors:[["node-list-viewer"]],inputs:{nodes:"nodes",rendererId:"rendererId",labelSuffix:"labelSuffix"},standalone:!0,features:[un,se],decls:5,vars:5,consts:[["nodeList",""],[1,"container"],["panelClass","model-explorer-node-list-panel",1,"label-container",3,"bubbleClick","overlaySize"],[1,"model-explorer-node-list"],[3,"data","rendererId","tooltipPosition"]],template:function(n,r){if(n&1&&(v(0,"div",1)(1,"div",2),M(2),y(),W(3,aye,2,3,"ng-template",null,0,Mt),y()),n&2){let o=fe(4);w(),ne("disabled",r.nodes.length===0),R("bubbleClick",o)("overlaySize",r.popupSize),w(),we(" ",r.label," ")}},dependencies:[co,Oe,xc,Je],styles:[`.container[_ngcontent-%COMP%]{display:flex;position:relative}.label-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;padding:4px 6px;border-radius:4px;background-color:#a3c9ff;line-height:14px;cursor:pointer;-webkit-user-select:none;user-select:none;opacity:.8}.label-container[_ngcontent-%COMP%]:hover{opacity:1}.label-container.disabled[_ngcontent-%COMP%]{pointer-events:none;background-color:#ddd} .model-explorer-node-list{font-size:12px;background-color:#fff;line-height:normal} .model-explorer-node-list-panel bubble-container{width:100%} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();var lye=(i,t)=>t.id;function cye(i,t){i&1&&(v(0,"div",24),M(1," Rules use your defined queries to match nodes for styling. All queries within a rule are connected with "),v(2,"span",25),M(3,"AND"),y(),M(4," logic. "),y())}function dye(i,t){if(i&1&&(v(0,"div",28),ee(1,"node-list-viewer",36),y()),i&2){let e=I().$index,n=I(2);w(),R("nodes",n.getMatchedNodes(e,0))("rendererId",n.leftPaneRendererId)}}function uye(i,t){if(i&1&&(v(0,"div",28)(1,"div",37),M(2,"Left pane"),y(),ee(3,"node-list-viewer",36),y(),v(4,"div",28)(5,"div",37),M(6,"Right pane"),y(),ee(7,"node-list-viewer",36),y()),i&2){let e=I().$index,n=I(2);w(3),R("nodes",n.getMatchedNodes(e,0))("rendererId",n.leftPaneRendererId),w(4),R("nodes",n.getMatchedNodes(e,1))("rendererId",n.rightPaneRendererId)}}function hye(i,t){if(i&1){let e=te();v(0,"div",41)(1,"label")(2,"input",42,3),H("change",function(){B(e);let r=fe(3),o=I(2).$implicit,s=I().$index,a=I(2);return V(a.handleStyleColorChanged(s,o,r.value))}),y()(),v(4,"input",43,4),H("change",function(){B(e);let r=fe(5),o=I(2).$implicit,s=I().$index,a=I(2);return V(a.handleStyleColorChanged(s,o,r.value))}),y()()}if(i&2){let e=I(2).$implicit,n=I().$implicit,r=I(2);w(),an("background-color",r.getSerializedStyleValue(n,e)),w(),R("value",r.getSerializedStyleValue(n,e)),w(2),R("value",r.getSerializedStyleValue(n,e))}}function pye(i,t){if(i&1&&W(0,hye,6,4,"div",41),i&2){let e=I().$implicit,n=I().$implicit,r=I(2);re(r.getIsStyleEnabled(n,e)?0:-1)}}function fye(i,t){if(i&1){let e=te();v(0,"div",44)(1,"input",45,5),H("change",function(){B(e);let r=fe(2),o=I(2).$implicit,s=I().$index,a=I(2);return V(a.handleStyleColorChanged(s,o,r.value))}),y()()}if(i&2){let e=I(2).$implicit,n=I().$implicit,r=I(2);w(),R("value",r.getSerializedStyleValue(n,e))}}function mye(i,t){if(i&1&&W(0,fye,3,1,"div",44),i&2){let e=I().$implicit,n=I().$implicit,r=I(2);re(r.getIsStyleEnabled(n,e)?0:-1)}}function gye(i,t){if(i&1){let e=te();v(0,"div",30)(1,"div",38)(2,"input",39,2),H("change",function(){let r=B(e).$implicit,o=fe(3),s=I().$index,a=I(2);return V(a.handleToggleStyle(s,r,o.checked))}),y(),v(4,"div",40),H("click",function(){let r=B(e).$implicit,o=I().$index,s=I(2);return V(s.handleToggleStyle(o,r))}),M(5),y()(),W(6,pye,1,1)(7,mye,1,1),y()}if(i&2){let e,n=t.$implicit,r=I().$implicit,o=I(2);w(2),R("checked",o.getIsStyleEnabled(r,n)),w(3),we(" ",n.label," "),w(),re((e=n.type)===o.StyleType.COLOR?6:e===o.StyleType.NUMBER?7:-1)}}function _ye(i,t){if(i&1){let e=te();v(0,"div",46),H("click",function(){B(e);let r=I().$index,o=I(2);return V(o.handleMoveUpRule(r))}),v(1,"mat-icon"),M(2,"arrow_upward_alt"),y()()}}function vye(i,t){if(i&1){let e=te();v(0,"div",47),H("click",function(){B(e);let r=I().$index,o=I(2);return V(o.handleMoveDownRule(r))}),v(1,"mat-icon"),M(2,"arrow_downward_alt"),y()()}}function yye(i,t){if(i&1){let e=te();v(0,"tr")(1,"td",19)(2,"complex-queries",26),H("queriesUpdated",function(r){let o=B(e).$index,s=I(2);return V(s.handleQueriesUpdated(o,r))}),y(),v(3,"div",27),W(4,dye,2,2,"div",28)(5,uye,8,4),y()(),v(6,"td",22)(7,"div",29),Xt(8,gye,8,3,"div",30,lye),y()(),v(10,"td",23)(11,"div",31),W(12,_ye,3,0,"div",32)(13,vye,3,0,"div",33),v(14,"div",34),H("click",function(){let r=B(e).$index,o=I(2);return V(o.handleDuplicateRule(r))}),v(15,"mat-icon"),M(16,"content_copy"),y()(),v(17,"div",35),H("click",function(){let r=B(e).$index,o=I(2);return V(o.handleDeleteRule(r))}),v(18,"mat-icon"),M(19,"delete"),y()()()()()}if(i&2){let e=t.$implicit,n=t.$index,r=t.$count,o=I(2);w(2),R("queries",e.queries),w(2),re(o.panesCount===1?4:o.panesCount===2?5:-1),w(4),Qt(o.allStyles),w(4),re(n!==0?12:-1),w(),re(n!==r-1?13:-1)}}function bye(i,t){if(i&1&&(v(0,"table",10)(1,"thead")(2,"th",19)(3,"div",20),M(4," Queries to match nodes "),v(5,"div",21)(6,"mat-icon"),M(7,"help_outline"),y()(),W(8,cye,5,0,"ng-template",null,1,Mt),y()(),v(10,"th",22),M(11,"Styles to apply"),y(),ee(12,"th",23),y(),v(13,"tbody"),Xt(14,yye,20,4,"tr",null,wr),y()()),i&2){let e=fe(9),n=I();w(5),R("bubble",e)("overlaySize",n.helpPopupSize)("hoverDelayMs",10),w(9),Qt(n.rules())}}function xye(i,t){i&1&&(v(0,"div",11),M(1,' No rules configured. Click the "Add rule" button below to get started. '),y())}var e8=(()=>{class i{appService;changeDetectorRef;nodeStylerService;rules;hasNonEmptyNodeStylerRules;hasRules=Ot(()=>this.rules().length>0);StyleType=lf;NodeStylerQueryType=Un;allStyles=f5;allSearchMatchTypeOptions=[{type:xt.NODE_LABEL,tooltip:"Match label"},{type:xt.ATTRIBUTE,tooltip:"Match attributes"},{type:xt.INPUT_METADATA,tooltip:"Match inputs (op node only)"},{type:xt.OUTPUT_METADATA,tooltip:"Match outputs (op node only)"}];allSearchNodeTypes=[{type:Sr.OP_NODES,label:"Ops only"},{type:Sr.LAYER_NODES,label:"Layers only"},{type:Sr.OP_AND_LAYER_NODES,label:"Ops & layers"}];allQueryTypes=[{type:Un.REGEX,label:"Regex"},{type:Un.ATTR_VALUE_RANGE,label:"Attribute value range"}];helpPopupSize={minWidth:0,minHeight:0,maxWidth:340};curMatchedNodes={};constructor(e,n,r){this.appService=e,this.changeDetectorRef=n,this.nodeStylerService=r,this.rules=this.nodeStylerService.rules,this.hasNonEmptyNodeStylerRules=this.nodeStylerService.hasNonEmptyNodeStylerRules,ct(()=>{this.curMatchedNodes=this.nodeStylerService.matchedNodes(),this.changeDetectorRef.markForCheck()})}handleClickAddRule(){this.nodeStylerService.addNewRule()}handleClickExportRules(){let e=document.createElement("a");e.download="node_styler_rules.json";let n=`data:text/json;charset=utf-8, ${encodeURIComponent(JSON.stringify(this.rules(),null,2))}`;dl(e,n),e.click()}handleClickImportRules(e){if(!e.files||e.files.length===0)return;let n=new FileReader;n.onload=r=>{let o=JSON.parse(r.target?.result);this.nodeStylerService.updateRules(o)},n.readAsText(e.files[0])}handleQueriesUpdated(e,n){this.nodeStylerService.updateQueries(e,n)}handleToggleStyle(e,n,r){this.nodeStylerService.toggleStyle(e,n,r)}handleStyleColorChanged(e,n,r){let o=r;r.startsWith("rgb")?o=this.rgbToHex(r):r.startsWith("#")||(o=ab[r]||r),this.nodeStylerService.updateStyleValue(e,n,o)}handleNumberChanged(e,n,r){let o=Number(r);isNaN(o)||(o=Math.min(10,Math.max(.001,o)),this.nodeStylerService.updateStyleValue(e,n,`${o}`))}handleMoveUpRule(e){this.nodeStylerService.moveUpRule(e)}handleMoveDownRule(e){this.nodeStylerService.moveDownRule(e)}handleDuplicateRule(e){this.nodeStylerService.duplicateRule(e)}handleDeleteRule(e){this.nodeStylerService.deleteRule(e)}getIsStyleEnabled(e,n){return e.styles[n.id]!=null}getSerializedStyleValue(e,n){return fd(e,n.id)}getMatchedNodes(e,n){return(this.curMatchedNodes[e]||{})[n]||[]}get panesCount(){return this.appService.panes().length}get leftPaneRendererId(){return this.appService.panes()[0].id}get rightPaneRendererId(){return this.appService.panes()[1].id}rgbToHex(e){let n=e.match(/^rgba?\((\d+),\s*(\d+),\s*(\d+)(?:,\s*(\d+\.{0,1}\d*))?\)$/);if(n){let r=n.slice(1,4).map(o=>Number(o).toString(16).padStart(2,"0")).join("");return r[0]===r[1]&&r[2]===r[3]&&r[4]===r[5]?`#${r[0]}${r[2]}${r[4]}`:`#${r}`}return"unknown"}static \u0275fac=function(n){return new(n||i)(q(nt),q(Re),q(ua))};static \u0275cmp=oe({type:i,selectors:[["node-styler-dialog"]],standalone:!0,features:[se],decls:26,vars:1,consts:[["input",""],["helpQuery",""],["cb",""],["colorPicker",""],["colorInput",""],["numberInput",""],["mat-dialog-title","","cdkDrag","","cdkDragRootElement",".cdk-overlay-pane","cdkDragHandle","",1,"title-container"],[1,"title"],[1,"description"],["mat-dialog-content","",1,"dialog-content"],["border","0","cellspacing","0","cellpadding","0",1,"rules-table"],[1,"no-rules-message"],["mat-dialog-actions","",1,"btns-container"],[1,"left-btns"],["mat-flat-button","","color","primary",1,"action-button","add-rule",3,"click"],["mat-flat-button","","color","primary",1,"action-button","load-rules",3,"click"],["mat-flat-button","","color","primary",1,"action-button","save-rules",3,"click"],["type","file","accept","application/JSON",1,"import-rules-input",3,"change"],["mat-button","","mat-dialog-close","",1,"close"],[1,"query"],[1,"query-header-container"],[1,"icon-container",3,"bubble","overlaySize","hoverDelayMs"],[1,"styles"],[1,"action-btns"],[1,"model-explorer-help-popup"],[1,"bold"],[3,"queriesUpdated","queries"],[1,"node-list-viewers-container"],[1,"node-list-viewer-container"],[1,"styles-container"],[1,"color-style-container"],[1,"action-buttons-container"],["matTooltip","Move up",1,"icon-container","move-up"],["matTooltip","Move down",1,"icon-container","move-down"],["matTooltip","Duplicate rule",1,"icon-container","duplicate-rule",3,"click"],["matTooltip","Delete rule",1,"icon-container","delete-rule",3,"click"],["labelSuffix","matched node",3,"nodes","rendererId"],[1,"label"],[1,"style-name-container"],["type","checkbox",3,"change","checked"],[3,"click"],[1,"color-picker-container"],["type","color",3,"change","value"],["type","text",3,"change","value"],[1,"number-editor-container"],[3,"change","value"],["matTooltip","Move up",1,"icon-container","move-up",3,"click"],["matTooltip","Move down",1,"icon-container","move-down",3,"click"]],template:function(n,r){if(n&1){let o=te();v(0,"div",6)(1,"div",7),M(2,"Node styler"),y(),v(3,"div",8),M(4," Use the buttons below to apply styling rules to this graph "),y()(),v(5,"div",9),W(6,bye,16,3,"table",10)(7,xye,2,0,"div",11),y(),v(8,"div",12)(9,"div",13)(10,"button",14),H("click",function(){return B(o),V(r.handleClickAddRule())}),v(11,"mat-icon"),M(12,"add"),y(),M(13," Add rule "),y(),v(14,"button",15),H("click",function(){B(o);let a=fe(23);return V(a.click())}),v(15,"mat-icon"),M(16,"file_upload"),y(),M(17," Import rules "),y(),v(18,"button",16),H("click",function(){return B(o),V(r.handleClickExportRules())}),v(19,"mat-icon"),M(20,"file_download"),y(),M(21," Export rules "),y(),v(22,"input",17,0),H("change",function(){B(o);let a=fe(23);return V(r.handleClickImportRules(a))}),y()(),v(24,"button",18),M(25,"Done"),y()()}n&2&&(w(6),re(r.hasRules()?6:7))},dependencies:[Nn,Oe,Kj,Zj,Qj,Xj,vn,gi,ga,pf,ff,gf,mf,Je,dt,ca,$t,qn,Jj],styles:[`*[_ngcontent-%COMP%]:not(mat-icon){font-family:Google Sans Text,Arial,Helvetica,sans-serif!important;letter-spacing:normal!important}.title-container[_ngcontent-%COMP%]{position:relative}.title[_ngcontent-%COMP%]{font-size:24px;font-weight:500;margin-top:-30px}.description[_ngcontent-%COMP%]{line-height:14px;font-size:12px;color:#777;margin-top:6px;margin-bottom:4px;font-weight:400}.btns-container[_ngcontent-%COMP%]{width:100%;display:flex;align-items:center;justify-content:space-between;padding:0 24px}.action-button[_ngcontent-%COMP%]{height:30px;padding:0 10px;font-size:13px}.action-button[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{margin-right:2px}.import-rules-input[_ngcontent-%COMP%]{display:none}.dialog-content[_ngcontent-%COMP%]{padding:0;box-sizing:border-box;border-top:1px solid #e6e6e6;border-bottom:1px solid #e6e6e6;background-color:#f9f9f9;overflow:hidden auto}.dialog-content[_ngcontent-%COMP%] .no-rules-message[_ngcontent-%COMP%]{padding:12px 24px;font-size:12px;color:#777}.common-input[_ngcontent-%COMP%]{padding:0 4px;border:1px solid #ccc;border-radius:4px;height:22px;box-sizing:border-box;outline:none}.common-input[_ngcontent-%COMP%]:focus{border-color:#1a73e8;outline:1px solid #1a73e8}.rules-table[_ngcontent-%COMP%]{width:100%;font-size:12px}.rules-table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]:not(.action-btns), .rules-table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:not(.action-btns){border-right:1px solid #e6e6e6}.rules-table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{border-bottom:1px solid #e6e6e6}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{text-align:left;height:32px;position:sticky;top:0;background-color:#f1f1f1;z-index:100}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{font-weight:500;border-bottom:1px solid #e6e6e6}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.query[_ngcontent-%COMP%]{padding-left:24px;width:410px}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.query[_ngcontent-%COMP%] .query-header-container[_ngcontent-%COMP%]{display:flex;align-items:center}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.query[_ngcontent-%COMP%] .query-header-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{width:16px;height:16px;opacity:.6;cursor:pointer;margin-left:4px}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.query[_ngcontent-%COMP%] .query-header-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.query[_ngcontent-%COMP%] .query-header-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.target[_ngcontent-%COMP%]{padding-left:12px}.rules-table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] th.styles[_ngcontent-%COMP%]{padding-left:12px;min-width:254px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-top:8px;padding-bottom:8px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.query[_ngcontent-%COMP%]{padding-left:24px;padding-right:12px;vertical-align:top}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.query[_ngcontent-%COMP%] .node-list-viewers-container[_ngcontent-%COMP%]{display:flex;gap:12px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.query[_ngcontent-%COMP%] .node-list-viewer-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;width:fit-content;margin-top:12px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.query[_ngcontent-%COMP%] .node-list-viewer-container[_ngcontent-%COMP%] .label[_ngcontent-%COMP%]{line-height:18px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.target[_ngcontent-%COMP%]{vertical-align:top;padding-left:12px;padding-right:12px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.styles[_ngcontent-%COMP%]{padding-left:12px;padding-right:18px;vertical-align:top}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.styles[_ngcontent-%COMP%] .styles-container[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:2px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.action-btns[_ngcontent-%COMP%]{vertical-align:top;padding-right:12px;width:80px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.action-btns[_ngcontent-%COMP%] .action-buttons-container[_ngcontent-%COMP%]{display:flex;justify-content:flex-end;gap:2px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.action-btns[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;opacity:.6;cursor:pointer;margin-top:2px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.action-btns[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] td.action-btns[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%]{display:flex;align-items:center}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .style-name-container[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;-webkit-user-select:none;user-select:none;width:100px}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .style-name-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{cursor:pointer}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .color-picker-container[_ngcontent-%COMP%]{display:flex;align-items:center;overflow:hidden;border-radius:4px;border:1px solid #ccc;margin-left:4px;width:fit-content;background-color:#fff;box-sizing:border-box;height:24px;position:relative}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .color-picker-container[_ngcontent-%COMP%]:focus-within{border-color:#1a73e8;outline:1px solid #1a73e8}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .color-picker-container[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:inline-block;width:16px;height:16px;margin:2px;background-color:red;border-radius:4px;cursor:pointer;border:1px solid #ddd}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .color-picker-container[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{visibility:hidden}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .color-picker-container[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]{width:100px;border:none;height:100%;background-color:transparent;outline:none}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .number-editor-container[_ngcontent-%COMP%]{display:flex;align-items:center;overflow:hidden;margin-left:4px;width:fit-content}.rules-table[_ngcontent-%COMP%] tbody[_ngcontent-%COMP%] .color-style-container[_ngcontent-%COMP%] .number-editor-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:80px;height:28px;border:1px solid #ccc;border-radius:4px;background-color:transparent;box-sizing:border-box;padding:0 4px;outline:none} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();var t8=(()=>{class i{dialog;nodeStylerService;viewContainerRef;hasNonEmptyNodeStylerRules;constructor(e,n,r){this.dialog=e,this.nodeStylerService=n,this.viewContainerRef=r,this.hasNonEmptyNodeStylerRules=this.nodeStylerService.hasNonEmptyNodeStylerRules}handleClickOpenDialog(){this.dialog.open(e8,{width:"800px",height:"600px",viewContainerRef:this.viewContainerRef,hasBackdrop:!1,autoFocus:!1})}static \u0275fac=function(n){return new(n||i)(q(Eu),q(ua),q(Kt))};static \u0275cmp=oe({type:i,selectors:[["node-styler"]],standalone:!0,features:[se],decls:3,vars:2,consts:[["mat-icon-button","","aria-label","node-styler","matTooltip","Style nodes with custom rules",3,"click"]],template:function(n,r){n&1&&(v(0,"button",0),H("click",function(){return r.handleClickOpenDialog()}),v(1,"mat-icon"),M(2,"palette"),y()()),n&2&&(w(),ne("highlight",r.hasNonEmptyNodeStylerRules()))},dependencies:[Oe,vn,qo,ga,Je,dt,$t,qn],styles:[`button[_ngcontent-%COMP%] mat-icon.highlight[_ngcontent-%COMP%]{background:linear-gradient(45deg,#0089ff 0 30%,#f1af00 70% 100%);background-clip:text;-webkit-background-clip:text;-webkit-text-fill-color:transparent} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();var wye=["*"],n8=(()=>{class i{appService;titleClicked=new Ie;constructor(e){this.appService=e}get disableTitleTooltip(){return this.appService.testMode}static \u0275fac=function(n){return new(n||i)(q(nt))};static \u0275cmp=oe({type:i,selectors:[["title-bar"]],outputs:{titleClicked:"titleClicked"},standalone:!0,features:[se],ngContentSelectors:wye,decls:22,vars:1,consts:[[1,"container"],["matTooltip","Back home",1,"title",3,"click","matTooltipDisabled"],[1,"right-container"],[1,"divider"],[1,"divider","tighter-right"],[1,"icons-container"],["href","https://github.com/google-ai-edge/model-explorer","target","_blank"],["mat-icon-button","","aria-label","doc","matTooltip","GitHub"],["href","https://github.com/google-ai-edge/model-explorer/issues","target","_blank"],["mat-icon-button","","aria-label","bug","matTooltip","File issue or feature request"]],template:function(n,r){n&1&&(Dn(),v(0,"div",0)(1,"div",1),H("click",function(){return r.titleClicked.emit()}),ee(2,"me-logo"),M(3," Model Explorer "),ee(4,"new-version-chip"),y(),v(5,"div",2),ee(6,"node-data-provider-dropdown")(7,"div",3)(8,"graph-selector")(9,"div",4)(10,"node-styler"),v(11,"div",5)(12,"a",6)(13,"button",7)(14,"mat-icon"),M(15,"article"),y()()(),v(16,"a",8)(17,"button",9)(18,"mat-icon"),M(19,"bug_report"),y()()()(),ee(20,"open-in-new-tab-button"),Wt(21),y()()),n&2&&(w(),R("matTooltipDisabled",r.disableTitleTooltip))},dependencies:[Oe,fj,nf,vn,qo,Je,dt,$t,qn,lS,_j,t8,oS],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;padding:8px 8px 8px 12px;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid #ddd}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{font-weight:400;cursor:pointer;color:#444746;font-size:20px;display:flex;align-items:center}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] me-logo[_ngcontent-%COMP%]{margin-right:6px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] new-version-chip[_ngcontent-%COMP%]{margin-left:16px}.container[_ngcontent-%COMP%] .right-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{width:1px;height:28px;border-left:1px solid #ccc;margin:0 16px}.container[_ngcontent-%COMP%] .divider.tighter-right[_ngcontent-%COMP%]{margin-right:4px}.container[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;color:#000}.container[_ngcontent-%COMP%] open-in-new-tab-button[_ngcontent-%COMP%]{margin-left:8px} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();var Cye=["*"];function Sye(i,t){i&1&&ee(0,"benchmark-runner")}function Mye(i,t){if(i&1){let e=te();v(0,"title-bar",4),H("titleClicked",function(){B(e);let r=I(3);return V(r.titleClicked.emit())}),Wt(1),y()}}function Eye(i,t){i&1&&(v(0,"div",3),M(1,"No graphs"),y())}function Iye(i,t){i&1&&ee(0,"split-panes-container")}function Tye(i,t){if(i&1&&(W(0,Mye,2,0,"title-bar"),v(1,"div",2),W(2,Eye,2,0,"div",3)(3,Iye,1,0,"split-panes-container"),y()),i&2){let e=I(2);re(e.showTitleBar?0:-1),w(2),re(e.hasNoGraphs?2:3)}}function Dye(i,t){if(i&1){let e=te();v(0,"div",1),H("dragover",function(r){B(e);let o=I();return V(o.handleDragOver(r))})("drop",function(r){B(e);let o=I();return V(o.handleDrop(r))}),W(1,Sye,1,0,"benchmark-runner")(2,Tye,4,2,"div",2),y()}if(i&2){let e=I();w(),re(e.benchmark?1:2)}}var _S=(()=>{class i{appService;changeDetectorRef;destroyRef;el;snackBar;threejsService;uiStateService;nodeDataProviderExtensionService;nodeStylerService;syncNavigationService;graphCollections;config;initialUiState;benchmark=!1;nodeDataSources=[];titleClicked=new Ie;uiStateChanged=new Ie;modelGraphProcessed=new Ie;remoteNodeDataPathsChanged=new Ie;syncNavigationModeChanged=new Ie;selectedNodeChanged=new Ie;hoveredNodeChanged=new Ie;doubleClickedNodeChanged=new Ie;curProcessedModelGraph;ready=!1;mouseDownHandler=e=>{window.parent.postMessage({cmd:"model-explorer-mousedown"},"*")};constructor(e,n,r,o,s,a,l,c,d,u){this.appService=e,this.changeDetectorRef=n,this.destroyRef=r,this.el=o,this.snackBar=s,this.threejsService=a,this.uiStateService=l,this.nodeDataProviderExtensionService=c,this.nodeStylerService=d,this.syncNavigationService=u,ct(()=>{let h=this.uiStateService.curUiState();h&&this.uiStateChanged.emit(h)}),ct(()=>{this.remoteNodeDataPathsChanged.emit(this.appService.remoteNodeDataPaths())}),ct(()=>{this.selectedNodeChanged.emit(this.appService.selectedNode())}),ct(()=>{this.hoveredNodeChanged.emit(this.appService.hoveredNode())}),ct(()=>{this.doubleClickedNodeChanged.emit(this.appService.doubleClickedNode())}),window.addEventListener("message",h=>{let p=h.data;switch(p.cmd){case"model-explorer-load-node-data-file":let f=p.path;f&&this.handleGetNodeDataPathFromPostMessage(f);break;case"model-explorer-select-node-by-output-tensor-name":let m=p.tensorName;m&&this.handleSelectNodeByOutputTensorNameFromPostMessage(m);break;case"model-explorer-select-node-by-node-id":let b=p.nodeId;b&&this.handleSelectNodeByNodeIdFromPostMessage(b);break;default:break}}),this.appService.modelGraphProcessed$.pipe(fi(this.destroyRef)).subscribe(h=>{this.modelGraphProcessed.next(h)}),this.syncNavigationService.syncNavigationModeChanged$.pipe(fi(this.destroyRef)).subscribe(h=>{this.syncNavigationModeChanged.next(h)}),this.initThreejs()}ngOnInit(){if(this.appService.config.set(this.config||{}),this.appService.addGraphCollections(this.graphCollections),this.appService.curInitialUiState.set(this.initialUiState),this.config?.nodeStylerRules&&this.nodeStylerService.rules.set(this.config.nodeStylerRules),!this.initialUiState||this.initialUiState.paneStates.length===0){if(this.graphCollections.length>0&&this.graphCollections[0].graphs.length>0){let n=[...this.graphCollections[0].graphs].sort((r,o)=>o.nodes.length-r.nodes.length)[0];this.appService.selectGraphInCurrentPane(n)}}else if(this.initialUiState.paneStates.length===1){let e=this.initialUiState.paneStates[0],n=e.selectedNodeId===""&&e.deepestExpandedGroupNodeIds.length===0,r=this.findGraphFromCollections(e.selectedCollectionLabel,e.selectedGraphId),o=e.flattenLayers===!0;if(r)this.appService.selectGraphInCurrentPane(r,o,void 0,n);else{let s=this.graphCollections[0].graphs[0];this.appService.selectGraphInCurrentPane(s,o,void 0,n)}this.appService.setFlattenLayersInCurrentPane(o)}else if(this.initialUiState.paneStates.length===2){let e=this.initialUiState.paneStates[0],n=this.findGraphFromCollections(e.selectedCollectionLabel,e.selectedGraphId),r=e.flattenLayers===!0;if(n)this.appService.selectGraphInCurrentPane(n,r);else{let l=this.graphCollections[0].graphs[0];this.appService.selectGraphInCurrentPane(l,r)}this.appService.setFlattenLayersInCurrentPane(r);let o=this.initialUiState.paneStates[1],s=o.flattenLayers===!0,a=this.findGraphFromCollections(o.selectedCollectionLabel,o.selectedGraphId);if(a)this.appService.openGraphInSplitPane(a,s);else{let l=this.graphCollections[0].graphs[0];this.appService.openGraphInSplitPane(l,s)}e.selected?this.appService.selectPaneByIndex(0):o.selected&&this.appService.selectPaneByIndex(1),this.appService.setPaneWidthFraction(e.widthFraction)}this.el.nativeElement.addEventListener("mousedown",this.mouseDownHandler,!0)}ngOnChanges(e){e.graphCollections&&(e.graphCollections.isFirstChange()||(this.appService.reset(),this.uiStateService.reset(),this.cleanUp(),this.ngOnInit()))}ngOnDestroy(){this.cleanUp()}handleKeyboardEvent(e){e.key===" "?cb()||this.appService.spaceKeyToZoomFitClicked.next({}):e.key==="f"&&(e.ctrlKey||e.metaKey)&&(this.config?.hideTitleBar||e.preventDefault(),this.appService.searchKeyClicked.next({}))}handleDragOver(e){e.preventDefault()}handleDrop(e){return Ct(this,null,function*(){if(!e.dataTransfer)return;e.stopPropagation(),e.preventDefault();let n=[];e.dataTransfer?.items?Array.from(e.dataTransfer.items).forEach((o,s)=>{if(o.kind==="file"){let a=o.getAsFile();a&&n.push(a)}}):n.push(...Array.from(e.dataTransfer?.files||[]));let r=!1;if(n.length!==0)for(let o of n){if(!o.name.endsWith(".json"))continue;let s=new FileReader,a=yield new Promise(l=>{s.onload=c=>{let d=JSON.parse(c.target?.result);l(d)},s.readAsText(o)});a.results!=null&&a.results.results==null?(this.addNodeDataProviderData(o.name,a),r=!0):Object.values(a).some(l=>l.results!=null)&&(this.addNodeDataProviderDataWithGraphIndex(o.name,a),r=!0)}r||this.snackBar.open("File(s) not supported","Dismiss")})}selectNode(e,n,r,o=0){let s=this.graphCollections;if(r){let c=this.appService.curGraphCollections().find(d=>d.label.toLowerCase()===r.toLowerCase());if(!c){console.warn(`Failed to locate collection with label "${r}"`);return}s=[c]}let a;for(let c of s){let d=c.graphs.find(u=>u.id===n);if(d){a=d;break}}if(!a){console.warn(`Failed to locate graph with id "${n}"`);return}this.appService.selectGraphInPane(a,o);let l=this.appService.panes()[o].id;this.appService.curInitialUiState.set(void 0),this.appService.selectNode(l,void 0),this.appService.curToLocateNodeInfo.set(void 0),this.appService.setNodeToReveal(l,e)}addNodeDataProviderData(e,n,r=0,o=!1){let s=this.appService.getModelGraphFromPaneIndex(r);if(!s){console.warn(`Model graph in pane with index ${r} doesn't exist`);return}this.nodeDataProviderExtensionService.addRun(qi(),e,"",s,{[s.id]:n},o)}addNodeDataProviderDataWithGraphIndex(e,n,r=0,o=!1){let s=this.appService.getModelGraphFromPaneIndex(r);if(!s){console.warn(`Model graph in pane with index ${r} doesn't exist`);return}this.nodeDataProviderExtensionService.addRun(qi(),e,"",s,n,o)}loadRemoteNodeDataPaths(e,n){return Ct(this,null,function*(){yield Promise.all(e.map(r=>this.nodeDataProviderExtensionService.addRunFromRemoteSource(r,n)))})}get hasNoGraphs(){return this.graphCollections.reduce((e,n)=>e+n.graphs.length,0)===0}get showTitleBar(){return!this.config?.hideTitleBar}findGraphFromCollections(e,n){for(let r of this.graphCollections)for(let o of r.graphs)if(o.id===n&&(e===""||o.collectionLabel===e))return o}handleGetNodeDataPathFromPostMessage(e){let n=this.appService.getModelGraphFromPaneIndex(0);if(!n){console.warn("Model graph in pane with index 0 doesn't exist");return}this.loadRemoteNodeDataPaths([e],n)}handleSelectNodeByOutputTensorNameFromPostMessage(e){let n=this.appService.getModelGraphFromSelectedPane();if(!n)return;let r;for(let o of n.nodes)if(Et(o)){let s=o.outputsMetadata||{};for(let a of Object.keys(s)){let l=s[a];if(e===l.tensor_name){r=o;break}}if(r)break}r&&this.selectNode(r.id,n.id)}handleSelectNodeByNodeIdFromPostMessage(e){let n=this.appService.getModelGraphFromSelectedPane();if(!n)return;let r=n.nodesById[e];r&&this.selectNode(r.id,n.id)}initThreejs(){return Ct(this,null,function*(){yield this.threejsService.depsLoadedPromise,this.ready=!0,this.changeDetectorRef.markForCheck()})}cleanUp(){this.el.nativeElement.removeEventListener("mousedown",this.mouseDownHandler,!0)}static \u0275fac=function(n){return new(n||i)(q(nt),q(Re),q(hi),q(Fe),q(Os),q(Zi),q(Ul),q(Rr),q(ua),q(ha))};static \u0275cmp=oe({type:i,selectors:[["model-graph-visualizer"]],hostBindings:function(n,r){n&1&&H("keydown",function(s){return r.handleKeyboardEvent(s)},!1,t0)},inputs:{graphCollections:"graphCollections",config:"config",initialUiState:"initialUiState",benchmark:"benchmark",nodeDataSources:"nodeDataSources"},outputs:{titleClicked:"titleClicked",uiStateChanged:"uiStateChanged",modelGraphProcessed:"modelGraphProcessed",remoteNodeDataPathsChanged:"remoteNodeDataPathsChanged",syncNavigationModeChanged:"syncNavigationModeChanged",selectedNodeChanged:"selectedNodeChanged",hoveredNodeChanged:"hoveredNodeChanged",doubleClickedNodeChanged:"doubleClickedNodeChanged"},standalone:!0,features:[Bt([nt,C5,Rr,ua,ha,Ul,Hl]),un,se],ngContentSelectors:Cye,decls:1,vars:1,consts:[["class","container",3,"dragover","drop",4,"ngIf"],[1,"container",3,"dragover","drop"],[1,"main"],[1,"no-graphs-message"],[3,"titleClicked"]],template:function(n,r){n&1&&(Dn(),W(0,Dye,3,1,"div",0)),n&2&&R("ngIf",r.ready)},dependencies:[w5,Oe,On,n8,dj],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;display:flex;flex-direction:column;position:relative}.container[_ngcontent-%COMP%] benchmark-runner[_ngcontent-%COMP%]{flex-grow:1}.container[_ngcontent-%COMP%] title-bar[_ngcontent-%COMP%]{height:48px;min-height:48px}.container[_ngcontent-%COMP%] .main[_ngcontent-%COMP%]{flex-grow:1;display:flex;position:relative;overflow:hidden}.container[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] .no-graphs-message[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:200;display:flex;align-items:center;justify-content:center;color:#999}.container[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] split-panes-container[_ngcontent-%COMP%]{flex-grow:1}.container[_ngcontent-%COMP%] .main[_ngcontent-%COMP%] graph-selector[_ngcontent-%COMP%]{position:absolute;top:12px;left:12px;z-index:100} .model-explorer-help-popup{font-size:12px;padding:8px;background-color:#fff;line-height:normal} .model-explorer-help-popup .bold{font-weight:700} .model-explorer-help-popup .shortcut{display:flex;align-items:center;color:#777;margin-top:8px} .model-explorer-help-popup .shortcut mat-icon{font-size:20px;width:20px;height:20px;margin-right:2px;color:#777} .model-explorer-help-popup .description{color:#777;margin-top:8px} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();function Oye(i,t){if(i&1&&ee(0,"model-graph-visualizer",1),i&2){let e=I();R("graphCollections",e.graphCollections)("config",e.config)}}var Pye="https://storage.googleapis.com/tfweb/model-graph-vis-v2-test-models/coco-ssd.tflite%20(10).json",Rye="https://storage.googleapis.com/tfweb/model-graph-vis-v2-test-models/coco-ssd-tf.json",i8=(()=>{class i{graphCollections=[];config={nodeLabelsToHide:["Const","pseudo_const","ReadVariableOp"],defaultRenderer:X1.WEBGL,maxConstValueCount:16,enableSubgraphSelection:!0,enableExportToResource:!0};ngOnInit(){Promise.all([this.fetch(Pye),this.fetch(Rye)]).then(e=>{this.graphCollections=e})}fetch(e){return new Promise(n=>{fetch(e).then(r=>{r.json().then(o=>{o.label==null&&o.graphs==null?n({label:"unnamed collection",graphs:o}):n(o)})})})}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=oe({type:i,selectors:[["demo-page"]],standalone:!0,features:[se],decls:2,vars:1,consts:[[1,"container"],[3,"graphCollections","config"]],template:function(n,r){n&1&&(v(0,"div",0),W(1,Oye,1,2,"model-graph-visualizer",1),y()),n&2&&(w(),re(r.graphCollections.length>0?1:-1))},dependencies:[Oe,_S],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;overflow:hidden;display:flex}.container[_ngcontent-%COMP%] model-graph-visualizer[_ngcontent-%COMP%]{width:100%;height:100%} + + + + + + + + + + + + + + + + + +`]})}return i})();var No=function(i){return i.CONST_ELEMENT_COUNT_LIMIT="const_element_count_limit",i.SHOW_WELCOME_CARD="show_welcome_card",i.HIDE_OP_NODES_WITH_LABELS="hide_op_nodes_with_labels",i.ARTIFICIAL_LAYER_NODE_COUNT_THRESHOLD="artificial_layer_node_count_threshold",i.EDGE_LABEL_FONT_SIZE="edge_label_font_size",i.EDGE_COLOR="edge_color",i.DISALLOW_VERTICAL_EDGE_LABELS="disallow_vertical_edge_labels",i.KEEP_LAYERS_WITH_A_SINGLE_CHILD="keep_layers_with_a_single_child",i.SHOW_OP_NODE_OUT_OF_LAYER_EDGES_WITHOUT_SELECTING="show_op_node_out_of_layer_edges_without_selecting",i}(No||{}),uo=function(i){return i[i.BOOLEAN=0]="BOOLEAN",i[i.NUMBER=1]="NUMBER",i[i.TEXT_MULTILINE=2]="TEXT_MULTILINE",i[i.COLOR=3]="COLOR",i}(uo||{}),_R={label:"Maximum element count for constant tensor values",key:No.CONST_ELEMENT_COUNT_LIMIT,type:uo.NUMBER,defaultValue:16,help:"Controls the number of values extracted from the constant tensors during model processing. Increasing this number may impact performance due to larger payload sizes."},Aye={label:"Show welcome card",key:No.SHOW_WELCOME_CARD,type:uo.BOOLEAN,defaultValue:!0},vR={label:"Hide op nodes with labels below (comma separated)",key:No.HIDE_OP_NODES_WITH_LABELS,type:uo.TEXT_MULTILINE,defaultValue:"Const,pseudo_const,pseudo_qconst,ReadVariableOp",help:"Removes op nodes from model graphs if their label matches any of the labels entered below."},yR={label:"Maximum number of nodes in an artificial layer",key:No.ARTIFICIAL_LAYER_NODE_COUNT_THRESHOLD,type:uo.NUMBER,defaultValue:Lm,help:"Controls the maximum number of immediate child nodes displayed under a layer. When the number of child nodes exceeds this limit, Model Explorer automatically groups them into smaller, more manageable artificial layers to improve layout performance and readability."},bR={label:"Edge label font size",key:No.EDGE_LABEL_FONT_SIZE,type:uo.NUMBER,defaultValue:sb},xR={label:"Edge color",key:No.EDGE_COLOR,type:uo.COLOR,defaultValue:"#aaaaaa"},wR={label:"Disallow vertical edge labels",key:No.DISALLOW_VERTICAL_EDGE_LABELS,type:uo.BOOLEAN,defaultValue:!1,help:"-"},CR={label:"Keep layers with a single op node child",key:No.KEEP_LAYERS_WITH_A_SINGLE_CHILD,type:uo.BOOLEAN,defaultValue:!1,help:"By default, layers with a single op node as its child are automatically removed to improve graph readability. Turn this toggle on to keep those layers."},SR={label:"Show op node out-of-layer edges without selecting",key:No.SHOW_OP_NODE_OUT_OF_LAYER_EDGES_WITHOUT_SELECTING,type:uo.BOOLEAN,defaultValue:!1,help:"By default, an op node's edges that go out of the layer is only visible when the op node is selected. Turn this toggle on to see those edges without needing to select the node. \u26A0\uFE0F This feature will make the model graph look more noisy and harder to read especially for larger models."},vS="model_explorer_settings",yS=[_R,vR,yR,bR,xR,CR,Aye,wR,SR],vf=(()=>{class i{localStorageService;savedSettings;constructor(e){this.localStorageService=e;let n=this.localStorageService.getItem(vS)||"";this.savedSettings=n===""?{}:JSON.parse(n)}getBooleanValue(e){return this.savedSettings[e.key]==null?e.defaultValue===!0:this.savedSettings[e.key]===!0}getNumberValue(e){let n=this.savedSettings[e.key];return n!=null?Number(n):e.defaultValue||0}getStringValue(e){let n=this.savedSettings[e.key];return n??(e.defaultValue||"")}saveBooleanValue(e,n){this.savedSettings[n]=e,this.localStorageService.setItem(vS,JSON.stringify(this.savedSettings))}saveNumberValue(e,n){isNaN(e)||(this.savedSettings[n]=e,this.localStorageService.setItem(vS,JSON.stringify(this.savedSettings)))}saveStringValue(e,n){this.savedSettings[n]=e,this.localStorageService.setItem(vS,JSON.stringify(this.savedSettings))}getAllSettingsValues(){let e={};for(let n of yS)switch(n.type){case uo.BOOLEAN:e[n.key]=this.getBooleanValue(n);break;case uo.NUMBER:e[n.key]=this.getNumberValue(n);break;default:break}return e}getSettingByKey(e){return yS.find(n=>n.key===e)}static \u0275fac=function(n){return new(n||i)(Le(Mr))};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Nye=["panel"],kye=["*"];function Lye(i,t){if(i&1){let e=te();v(0,"div",1,0),H("@panelAnimation.done",function(r){B(e);let o=I();return V(o._animationDone.next(r))}),Wt(2),y()}if(i&2){let e=t.id,n=I();Gr(n._classList),ne("mat-mdc-autocomplete-visible",n.showPanel)("mat-mdc-autocomplete-hidden",!n.showPanel)("mat-primary",n._color==="primary")("mat-accent",n._color==="accent")("mat-warn",n._color==="warn"),R("id",n.id)("@panelAnimation",n.isOpen?"visible":"hidden"),qe("aria-label",n.ariaLabel||null)("aria-labelledby",n._getPanelAriaLabelledby(e))}}var Fye=pi("panelAnimation",[Ci("void, hidden",en({opacity:0,transform:"scaleY(0.8)"})),Fn(":enter, hidden => visible",[LF([Ln("0.03s linear",en({opacity:1})),Ln("0.12s cubic-bezier(0, 0, 0.2, 1)",en({transform:"scaleY(1)"}))])]),Fn(":leave, visible => hidden",[Ln("0.075s linear",en({opacity:0}))])]),Bye=0,ER=class{constructor(t,e){this.source=t,this.option=e}},r8=new pe("mat-autocomplete-default-options",{providedIn:"root",factory:Vye});function Vye(){return{autoActiveFirstOption:!1,autoSelectActiveOption:!1,hideSingleSelectionIndicator:!1,requireSelection:!1}}var o8=(()=>{class i{get isOpen(){return this._isOpen&&this.showPanel}_setColor(e){this._color=e,this._changeDetectorRef.markForCheck()}set classList(e){this._classList=e,this._elementRef.nativeElement.className=""}get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._syncParentProperties()}_syncParentProperties(){if(this.options)for(let e of this.options)e._changeDetectorRef.markForCheck()}constructor(){this._changeDetectorRef=S(Re),this._elementRef=S(Fe),this._defaults=S(r8),this._activeOptionChanges=St.EMPTY,this._animationDone=new Ie,this.showPanel=!1,this._isOpen=!1,this.displayWith=null,this.optionSelected=new Ie,this.opened=new Ie,this.closed=new Ie,this.optionActivated=new Ie,this.id=`mat-autocomplete-${Bye++}`;let e=S(Rn);this.inertGroups=e?.SAFARI||!1,this.autoActiveFirstOption=!!this._defaults.autoActiveFirstOption,this.autoSelectActiveOption=!!this._defaults.autoSelectActiveOption,this.requireSelection=!!this._defaults.requireSelection,this._hideSingleSelectionIndicator=this._defaults.hideSingleSelectionIndicator??!1}ngAfterContentInit(){this._keyManager=new Ah(this.options).withWrap().skipPredicate(this._skipPredicate),this._activeOptionChanges=this._keyManager.change.subscribe(e=>{this.isOpen&&this.optionActivated.emit({source:this,option:this.options.toArray()[e]||null})}),this._setVisibility()}ngOnDestroy(){this._keyManager?.destroy(),this._activeOptionChanges.unsubscribe(),this._animationDone.complete()}_setScrollTop(e){this.panel&&(this.panel.nativeElement.scrollTop=e)}_getScrollTop(){return this.panel?this.panel.nativeElement.scrollTop:0}_setVisibility(){this.showPanel=!!this.options.length,this._changeDetectorRef.markForCheck()}_emitSelectEvent(e){let n=new ER(this,e);this.optionSelected.emit(n)}_getPanelAriaLabelledby(e){if(this.ariaLabel)return null;let n=e?e+" ":"";return this.ariaLabelledby?n+this.ariaLabelledby:e}_skipPredicate(){return!1}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=oe({type:i,selectors:[["mat-autocomplete"]],contentQueries:function(n,r,o){if(n&1&&(wi(o,Yl,5),wi(o,Vh,5)),n&2){let s;_e(s=ve())&&(r.options=s),_e(s=ve())&&(r.optionGroups=s)}},viewQuery:function(n,r){if(n&1&&(Me(Qn,7),Me(Nye,5)),n&2){let o;_e(o=ve())&&(r.template=o.first),_e(o=ve())&&(r.panel=o.first)}},hostAttrs:[1,"mat-mdc-autocomplete"],inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],displayWith:"displayWith",autoActiveFirstOption:[2,"autoActiveFirstOption","autoActiveFirstOption",Ye],autoSelectActiveOption:[2,"autoSelectActiveOption","autoSelectActiveOption",Ye],requireSelection:[2,"requireSelection","requireSelection",Ye],panelWidth:"panelWidth",disableRipple:[2,"disableRipple","disableRipple",Ye],classList:[0,"class","classList"],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",Ye]},outputs:{optionSelected:"optionSelected",opened:"opened",closed:"closed",optionActivated:"optionActivated"},exportAs:["matAutocomplete"],standalone:!0,features:[Bt([{provide:Bh,useExisting:i}]),nn,se],ngContentSelectors:kye,decls:1,vars:0,consts:[["panel",""],["role","listbox",1,"mat-mdc-autocomplete-panel","mdc-menu-surface","mdc-menu-surface--open",3,"id"]],template:function(n,r){n&1&&(Dn(),W(0,Lye,3,16,"ng-template"))},styles:["div.mat-mdc-autocomplete-panel{width:100%;max-height:256px;visibility:hidden;transform-origin:center top;overflow:auto;padding:8px 0;box-sizing:border-box;position:static;border-radius:var(--mat-autocomplete-container-shape, var(--mat-sys-corner-extra-small));box-shadow:var(--mat-autocomplete-container-elevation-shadow, 0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12));background-color:var(--mat-autocomplete-background-color, var(--mat-sys-surface-container))}@media(forced-colors: active){div.mat-mdc-autocomplete-panel{outline:solid 1px}}.cdk-overlay-pane:not(.mat-mdc-autocomplete-panel-above) div.mat-mdc-autocomplete-panel{border-top-left-radius:0;border-top-right-radius:0}.mat-mdc-autocomplete-panel-above div.mat-mdc-autocomplete-panel{border-bottom-left-radius:0;border-bottom-right-radius:0;transform-origin:center bottom}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-visible{visibility:visible}div.mat-mdc-autocomplete-panel.mat-mdc-autocomplete-hidden{visibility:hidden;pointer-events:none}mat-autocomplete{display:none}"],encapsulation:2,data:{animation:[Fye]},changeDetection:0})}}return i})();var zye={provide:Ba,useExisting:xr(()=>cv),multi:!0};var s8=new pe("mat-autocomplete-scroll-strategy",{providedIn:"root",factory:()=>{let i=S(on);return()=>i.scrollStrategies.reposition()}});function Uye(i){return()=>i.scrollStrategies.reposition()}var Hye={provide:s8,deps:[on],useFactory:Uye},cv=(()=>{class i{constructor(){this._element=S(Fe),this._overlay=S(on),this._viewContainerRef=S(Kt),this._zone=S(Ue),this._changeDetectorRef=S(Re),this._dir=S(oi,{optional:!0}),this._formField=S(nv,{optional:!0,host:!0}),this._document=S(ft),this._viewportRuler=S(aa),this._defaults=S(r8,{optional:!0}),this._componentDestroyed=!1,this._scrollStrategy=S(s8),this._manuallyFloatingLabel=!1,this._viewportSubscription=St.EMPTY,this._breakpointObserver=S(Ph),this._handsetLandscapeSubscription=St.EMPTY,this._canOpenOnNextFocus=!0,this._closeKeyEventStream=new ce,this._windowBlurHandler=()=>{this._canOpenOnNextFocus=this._document.activeElement!==this._element.nativeElement||this.panelOpen},this._onChange=()=>{},this._onTouched=()=>{},this.position="auto",this.autocompleteAttribute="off",this._initialized=new ce,this._injector=S(pt),this._aboveClass="mat-mdc-autocomplete-panel-above",this._overlayAttached=!1,this.optionSelections=ko(()=>{let e=this.autocomplete?this.autocomplete.options:null;return e?e.changes.pipe(ni(e),Tn(()=>Xn(...e.map(n=>n.onSelectionChange)))):this._initialized.pipe(Tn(()=>this.optionSelections))}),this._handlePanelKeydown=e=>{(e.keyCode===27&&!Si(e)||e.keyCode===38&&Si(e,"altKey"))&&(this._pendingAutoselectedOption&&(this._updateNativeInputValue(this._valueBeforeAutoSelection??""),this._pendingAutoselectedOption=null),this._closeKeyEventStream.next(),this._resetActiveItem(),e.stopPropagation(),e.preventDefault())},this._trackedModal=null}ngAfterViewInit(){this._initialized.next(),this._initialized.complete();let e=this._getWindow();typeof e<"u"&&this._zone.runOutsideAngular(()=>e.addEventListener("blur",this._windowBlurHandler))}ngOnChanges(e){e.position&&this._positionStrategy&&(this._setStrategyPositions(this._positionStrategy),this.panelOpen&&this._overlayRef.updatePosition())}ngOnDestroy(){let e=this._getWindow();typeof e<"u"&&e.removeEventListener("blur",this._windowBlurHandler),this._handsetLandscapeSubscription.unsubscribe(),this._viewportSubscription.unsubscribe(),this._componentDestroyed=!0,this._destroyPanel(),this._closeKeyEventStream.complete(),this._clearFromModal()}get panelOpen(){return this._overlayAttached&&this.autocomplete.showPanel}openPanel(){this._openPanelInternal()}closePanel(){this._resetLabel(),this._overlayAttached&&(this.panelOpen&&this._zone.run(()=>{this.autocomplete.closed.emit()}),this.autocomplete._latestOpeningTrigger===this&&(this.autocomplete._isOpen=!1,this.autocomplete._latestOpeningTrigger=null),this._overlayAttached=!1,this._pendingAutoselectedOption=null,this._overlayRef&&this._overlayRef.hasAttached()&&(this._overlayRef.detach(),this._closingActionsSubscription.unsubscribe()),this._updatePanelState(),this._componentDestroyed||this._changeDetectorRef.detectChanges(),this._trackedModal&&$l(this._trackedModal,"aria-owns",this.autocomplete.id))}updatePosition(){this._overlayAttached&&this._overlayRef.updatePosition()}get panelClosingActions(){return Xn(this.optionSelections,this.autocomplete._keyManager.tabOut.pipe(qt(()=>this._overlayAttached)),this._closeKeyEventStream,this._getOutsideClickStream(),this._overlayRef?this._overlayRef.detachments().pipe(qt(()=>this._overlayAttached)):ke()).pipe(We(e=>e instanceof Qm?e:null))}get activeOption(){return this.autocomplete&&this.autocomplete._keyManager?this.autocomplete._keyManager.activeItem:null}_getOutsideClickStream(){return Xn(wn(this._document,"click"),wn(this._document,"auxclick"),wn(this._document,"touchend")).pipe(qt(e=>{let n=Pi(e),r=this._formField?this._formField.getConnectedOverlayOrigin().nativeElement:null,o=this.connectedTo?this.connectedTo.elementRef.nativeElement:null;return this._overlayAttached&&n!==this._element.nativeElement&&this._document.activeElement!==this._element.nativeElement&&(!r||!r.contains(n))&&(!o||!o.contains(n))&&!!this._overlayRef&&!this._overlayRef.overlayElement.contains(n)}))}writeValue(e){Promise.resolve(null).then(()=>this._assignOptionValue(e))}registerOnChange(e){this._onChange=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this._element.nativeElement.disabled=e}_handleKeydown(e){let n=e.keyCode,r=Si(e);if(n===27&&!r&&e.preventDefault(),this._valueOnLastKeydown=this._element.nativeElement.value,this.activeOption&&n===13&&this.panelOpen&&!r)this.activeOption._selectViaInteraction(),this._resetActiveItem(),e.preventDefault();else if(this.autocomplete){let o=this.autocomplete._keyManager.activeItem,s=n===38||n===40;n===9||s&&!r&&this.panelOpen?this.autocomplete._keyManager.onKeydown(e):s&&this._canOpen()&&this._openPanelInternal(this._valueOnLastKeydown),(s||this.autocomplete._keyManager.activeItem!==o)&&(this._scrollToOption(this.autocomplete._keyManager.activeItemIndex||0),this.autocomplete.autoSelectActiveOption&&this.activeOption&&(this._pendingAutoselectedOption||(this._valueBeforeAutoSelection=this._valueOnLastKeydown),this._pendingAutoselectedOption=this.activeOption,this._assignOptionValue(this.activeOption.value)))}}_handleInput(e){let n=e.target,r=n.value;if(n.type==="number"&&(r=r==""?null:parseFloat(r)),this._previousValue!==r){if(this._previousValue=r,this._pendingAutoselectedOption=null,(!this.autocomplete||!this.autocomplete.requireSelection)&&this._onChange(r),!r)this._clearPreviousSelectedOption(null,!1);else if(this.panelOpen&&!this.autocomplete.requireSelection){let o=this.autocomplete.options?.find(s=>s.selected);if(o){let s=this._getDisplayValue(o.value);r!==s&&o.deselect(!1)}}if(this._canOpen()&&this._document.activeElement===e.target){let o=this._valueOnLastKeydown??this._element.nativeElement.value;this._valueOnLastKeydown=null,this._openPanelInternal(o)}}}_handleFocus(){this._canOpenOnNextFocus?this._canOpen()&&(this._previousValue=this._element.nativeElement.value,this._attachOverlay(this._previousValue),this._floatLabel(!0)):this._canOpenOnNextFocus=!0}_handleClick(){this._canOpen()&&!this.panelOpen&&this._openPanelInternal()}_floatLabel(e=!1){this._formField&&this._formField.floatLabel==="auto"&&(e?this._formField._animateAndLockLabel():this._formField.floatLabel="always",this._manuallyFloatingLabel=!0)}_resetLabel(){this._manuallyFloatingLabel&&(this._formField&&(this._formField.floatLabel="auto"),this._manuallyFloatingLabel=!1)}_subscribeToClosingActions(){let e=new Dt(r=>{zi(()=>{r.next()},{injector:this._injector})}),n=this.autocomplete.options.changes.pipe(gn(()=>this._positionStrategy.reapplyLastPosition()),Vu(0));return Xn(e,n).pipe(Tn(()=>this._zone.run(()=>{let r=this.panelOpen;return this._resetActiveItem(),this._updatePanelState(),this._changeDetectorRef.detectChanges(),this.panelOpen&&this._overlayRef.updatePosition(),r!==this.panelOpen&&(this.panelOpen?this._emitOpened():this.autocomplete.closed.emit()),this.panelClosingActions})),tn(1)).subscribe(r=>this._setValueAndClose(r))}_emitOpened(){this.autocomplete.opened.emit()}_destroyPanel(){this._overlayRef&&(this.closePanel(),this._overlayRef.dispose(),this._overlayRef=null)}_getDisplayValue(e){let n=this.autocomplete;return n&&n.displayWith?n.displayWith(e):e}_assignOptionValue(e){let n=this._getDisplayValue(e);e==null&&this._clearPreviousSelectedOption(null,!1),this._updateNativeInputValue(n??"")}_updateNativeInputValue(e){this._formField?this._formField._control.value=e:this._element.nativeElement.value=e,this._previousValue=e}_setValueAndClose(e){let n=this.autocomplete,r=e?e.source:this._pendingAutoselectedOption;r?(this._clearPreviousSelectedOption(r),this._assignOptionValue(r.value),this._onChange(r.value),n._emitSelectEvent(r),this._element.nativeElement.focus()):n.requireSelection&&this._element.nativeElement.value!==this._valueOnAttach&&(this._clearPreviousSelectedOption(null),this._assignOptionValue(null),n._animationDone?n._animationDone.pipe(tn(1)).subscribe(()=>this._onChange(null)):this._onChange(null)),this.closePanel()}_clearPreviousSelectedOption(e,n){this.autocomplete?.options?.forEach(r=>{r!==e&&r.selected&&r.deselect(n)})}_openPanelInternal(e=this._element.nativeElement.value){if(this._attachOverlay(e),this._floatLabel(),this._trackedModal){let n=this.autocomplete.id;Lh(this._trackedModal,"aria-owns",n)}}_attachOverlay(e){this.autocomplete;let n=this._overlayRef;n?(this._positionStrategy.setOrigin(this._getConnectedElement()),n.updateSize({width:this._getPanelWidth()})):(this._portal=new Jr(this.autocomplete.template,this._viewContainerRef,{id:this._formField?.getLabelId()}),n=this._overlay.create(this._getOverlayConfig()),this._overlayRef=n,this._viewportSubscription=this._viewportRuler.change().subscribe(()=>{this.panelOpen&&n&&n.updateSize({width:this._getPanelWidth()})}),this._handsetLandscapeSubscription=this._breakpointObserver.observe(Db.HandsetLandscape).subscribe(o=>{o.matches?this._positionStrategy.withFlexibleDimensions(!0).withGrowAfterOpen(!0).withViewportMargin(8):this._positionStrategy.withFlexibleDimensions(!1).withGrowAfterOpen(!1).withViewportMargin(0)})),n&&!n.hasAttached()&&(n.attach(this._portal),this._valueOnAttach=e,this._valueOnLastKeydown=null,this._closingActionsSubscription=this._subscribeToClosingActions());let r=this.panelOpen;this.autocomplete._isOpen=this._overlayAttached=!0,this.autocomplete._latestOpeningTrigger=this,this.autocomplete._setColor(this._formField?.color),this._updatePanelState(),this._applyModalPanelOwnership(),this.panelOpen&&r!==this.panelOpen&&this._emitOpened()}_updatePanelState(){if(this.autocomplete._setVisibility(),this.panelOpen){let e=this._overlayRef;this._keydownSubscription||(this._keydownSubscription=e.keydownEvents().subscribe(this._handlePanelKeydown)),this._outsideClickSubscription||(this._outsideClickSubscription=e.outsidePointerEvents().subscribe())}else this._keydownSubscription?.unsubscribe(),this._outsideClickSubscription?.unsubscribe(),this._keydownSubscription=this._outsideClickSubscription=null}_getOverlayConfig(){return new bi({positionStrategy:this._getOverlayPosition(),scrollStrategy:this._scrollStrategy(),width:this._getPanelWidth(),direction:this._dir??void 0,panelClass:this._defaults?.overlayPanelClass})}_getOverlayPosition(){let e=this._overlay.position().flexibleConnectedTo(this._getConnectedElement()).withFlexibleDimensions(!1).withPush(!1);return this._setStrategyPositions(e),this._positionStrategy=e,e}_setStrategyPositions(e){let n=[{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"},{originX:"end",originY:"bottom",overlayX:"end",overlayY:"top"}],r=this._aboveClass,o=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",panelClass:r},{originX:"end",originY:"top",overlayX:"end",overlayY:"bottom",panelClass:r}],s;this.position==="above"?s=o:this.position==="below"?s=n:s=[...n,...o],e.withPositions(s)}_getConnectedElement(){return this.connectedTo?this.connectedTo.elementRef:this._formField?this._formField.getConnectedOverlayOrigin():this._element}_getPanelWidth(){return this.autocomplete.panelWidth||this._getHostWidth()}_getHostWidth(){return this._getConnectedElement().nativeElement.getBoundingClientRect().width}_resetActiveItem(){let e=this.autocomplete;if(e.autoActiveFirstOption){let n=-1;for(let r=0;r .cdk-overlay-container [aria-modal="true"]');if(!e)return;let n=this.autocomplete.id;this._trackedModal&&$l(this._trackedModal,"aria-owns",n),Lh(e,"aria-owns",n),this._trackedModal=e}_clearFromModal(){if(this._trackedModal){let e=this.autocomplete.id;$l(this._trackedModal,"aria-owns",e),this._trackedModal=null}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275dir=Ve({type:i,selectors:[["input","matAutocomplete",""],["textarea","matAutocomplete",""]],hostAttrs:[1,"mat-mdc-autocomplete-trigger"],hostVars:7,hostBindings:function(n,r){n&1&&H("focusin",function(){return r._handleFocus()})("blur",function(){return r._onTouched()})("input",function(s){return r._handleInput(s)})("keydown",function(s){return r._handleKeydown(s)})("click",function(){return r._handleClick()}),n&2&&qe("autocomplete",r.autocompleteAttribute)("role",r.autocompleteDisabled?null:"combobox")("aria-autocomplete",r.autocompleteDisabled?null:"list")("aria-activedescendant",r.panelOpen&&r.activeOption?r.activeOption.id:null)("aria-expanded",r.autocompleteDisabled?null:r.panelOpen.toString())("aria-controls",r.autocompleteDisabled||!r.panelOpen||r.autocomplete==null?null:r.autocomplete.id)("aria-haspopup",r.autocompleteDisabled?null:"listbox")},inputs:{autocomplete:[0,"matAutocomplete","autocomplete"],position:[0,"matAutocompletePosition","position"],connectedTo:[0,"matAutocompleteConnectedTo","connectedTo"],autocompleteAttribute:[0,"autocomplete","autocompleteAttribute"],autocompleteDisabled:[2,"matAutocompleteDisabled","autocompleteDisabled",Ye]},exportAs:["matAutocompleteTrigger"],standalone:!0,features:[Bt([zye]),nn,un]})}}return i})(),a8=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275mod=ot({type:i})}static{this.\u0275inj=rt({providers:[Hye],imports:[so,zh,Ht,Oe,ts,zh,Ht]})}}return i})();var bS="graphs://",l8="data-nexus://";var Sc=function(i){return i.TFLITE_MLIR="builtin_tflite_mlir",i.TFLITE_FLATBUFFER="builtin_tflite_flatbuffer",i.TF_MLIR="builtin_tf_mlir",i.TF_DIRECT="builtin_tf_direct",i.GRAPHDEF="builtin_graphdef",i.MLIR="builtin_mlir",i.JSON_LOADER="builtin_json",i.DATA_NEXUS="builtin_data_nexus",i}(Sc||{}),IR=function(i){return i.ADAPTER="adapter",i.NODE_DATA_PROVIDER="node_data_provider",i}(IR||{}),ai=function(i){return i.LOCAL="local",i.REMOTE="remote",i.DATA_NEXUS="data_nexus",i.GRAPH_JSONS_FROM_SERVER="graphs_json_from_server",i.FILE_PATH="file_path",i}(ai||{}),zn=function(i){return i.NOT_STARTED="Not started",i.PROCESSING="Converting",i.UPLOADING="Uploading",i.DONE="Done",i.ERROR="Error",i}(zn||{});var jye=(i,t)=>t.id;function Wye(i,t){i&1&&(v(0,"span",4),M(1,"Default"),y())}function $ye(i,t){if(i&1){let e=te();v(0,"div",2),H("click",function(){let r=B(e).$implicit,o=I();return V(o.handleSelectCandidate(r))}),v(1,"div",3),M(2),W(3,Wye,2,0,"span",4),y(),v(4,"div",5),M(5),y()()}if(i&2){let e=t.$implicit,n=t.$index,r=I();ne("selected",(r.selectedAdapter==null?null:r.selectedAdapter.id)===e.id),w(2),we(" ",e.name||e.id," "),w(),re(n===0?3:-1),w(2),we(" ",e.description||"-"," ")}}var c8=(()=>{class i{candidates=[];selectedAdapter;onClose=new Ie;handleSelectCandidate(e){this.onClose.next(e)}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=oe({type:i,selectors:[["adapter-selector-panel"]],inputs:{candidates:"candidates",selectedAdapter:"selectedAdapter"},outputs:{onClose:"onClose"},standalone:!0,features:[se],decls:3,vars:1,consts:[[1,"container"],[1,"candidate-container",3,"selected"],[1,"candidate-container",3,"click"],[1,"name"],[1,"default-label"],[1,"description"]],template:function(n,r){n&1&&(v(0,"div",0),Xt(1,$ye,6,5,"div",1,jye),y()),n&2&&(R("@transformPanel","showing"),w(),Qt(r.candidates))},dependencies:[Oe,fa,Je,ma,$t,Ir],styles:[`.container[_ngcontent-%COMP%]{box-shadow:0 2px 6px 2px #00000026,0 1px 2px #0000004d;transform-origin:top center;font-size:13px;padding:8px 0;border-radius:8px;background-color:#fff}.container[_ngcontent-%COMP%] .candidate-container[_ngcontent-%COMP%]{padding:8px 16px}.container[_ngcontent-%COMP%] .candidate-container.selected[_ngcontent-%COMP%]{background-color:#c2e7ff}.container[_ngcontent-%COMP%] .candidate-container[_ngcontent-%COMP%]:hover:not(.selected){background-color:#f2f2f2;cursor:pointer}.container[_ngcontent-%COMP%] .candidate-container[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-size:14px;color:#1f1f1f;line-height:20px;margin-bottom:2px;display:flex;align-items:center}.container[_ngcontent-%COMP%] .candidate-container[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] .default-label[_ngcontent-%COMP%]{display:inline-block;padding:0 10px;box-sizing:border-box;background-color:#f3e0b4;color:#70571e;border:1px solid #dbac41;font-size:11px;line-height:14px;border-radius:99px;margin-left:8px}.container[_ngcontent-%COMP%] .candidate-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{font-size:12px;color:#444746} + + + + + + + + + + + + + + + + + +`],data:{animation:[pi("transformPanel",[Ci("void",en({opacity:0,transform:"scale(1, 0.8)"})),Fn("void => showing",Ln("120ms cubic-bezier(0, 0, 0.2, 1)",en({opacity:1,transform:"scale(1, 1)"}))),Fn("* => void",Ln("100ms linear",en({opacity:0})))])]},changeDetection:0})}return i})();function dv(i,t,e){let n=i.split("/").filter(s=>s!==""),o=n[n.length-1].split(".");if(!e&&i.startsWith("http"))return t.getExtensionsForHttpUrls();if(o.length>1){let s=o[o.length-1];return t.getExtensionsByFileExt(s)}return!e&&sS(i)?t.getExtensionsForGoogleStorageDir():[]}var qye="/api/v1/get_extensions",Yye="/api/v1/send_command",Xye="/apipost/v1/send_command",yf=(()=>{class i{loading=et(!0);internalColab=hf;extensions=[];constructor(){this.loadExtensions()}sendCommandToExtension(e){return Ct(this,null,function*(){try{let n;if(this.internalColab){let r=`${Yye}?json=${JSON.stringify(e)}`;n=yield fetch(r)}else{let r={method:"POST",headers:{"Content-Type":"application/json"}};r.body=JSON.stringify(e),n=yield fetch(Xye,r)}return n.ok?{cmdResp:yield n.json()}:{otherError:`Failed to convert model. ${n.status}`}}catch(n){return{otherError:n}}})}loadExtensions(){return Ct(this,null,function*(){let e=[];e=yield this.getExtensionsForExternal(),this.extensions=e,this.loading.set(!1)})}getExtensionsForExternal(){return Ct(this,null,function*(){try{let e=yield fetch(qye,{credentials:"include"});return e.ok?yield e.json():(console.error(`Failed to get extensions: ${e.status}`),[])}catch(e){return console.error("Failed to get extensions.",e),[]}})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var DR=class{registry={};getExtensionsByFileExt(t){return this.registry[t]||[]}getExtensionById(t){for(let e of Object.values(this.registry))for(let n of e)if(n.id===t)return n}getExtensionsForGoogleStorageDir(){let t=[];for(let e of Object.values(this.registry))for(let n of e)n.matchGoogleStorageDir&&!t.includes(n)&&t.push(n);return t}getExtensionsForHttpUrls(){let t=[];for(let e of Object.values(this.registry))for(let n of e)n.matchHttpUrl&&t.push(n);return t}register(t){for(let e of t.fileExts){this.registry[e]==null&&(this.registry[e]=[]);let n=this.registry[e];if(n.find(r=>r.id===t.id)!=null){console.warn("Adapter extension exists",t);continue}n.push(t)}}},d8=(()=>{class i extends DR{extensionService;constructor(e){super(),this.extensionService=e,ct(()=>{if(!this.extensionService.loading())for(let n of this.extensionService.extensions)n.type===IR.ADAPTER&&this.register(n)})}static \u0275fac=function(n){return new(n||i)(Le(yf))};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var to=function(i){return i.DATA="data",i.RENDERER="renderer",i.SHOW_OPEN_IN_NEW_TAB="show_open_in_new_tab",i.BENCHMARK="benchmark",i.ENABLE_SUBGRAPH_SELECTION="ess",i.ENABLE_EXPORT_TO_RESOURCE="eetr",i.INTERNAL_COLAB="internal_colab",i}(to||{}),xS=(()=>{class i{router;models=[];nodeData=[];syncNavigation;nodeDataTargets=[];uiState;prevQueryParamStr="";renderer="webgl";showOpenInNewTab=!1;internalColab=!1;benchmark=!1;enableSubgraphSelection=!1;enableExportToResource=!1;constructor(e){this.router=e,this.decodeUrl()}setModels(e){this.models=e,this.updateUrl()}getModels(){return this.models}setUiState(e){this.uiState=e,this.updateUrl()}getUiState(){return this.uiState}getNodeDataSources(){return this.nodeData||[]}setNodeDataSources(e){this.nodeData=e,this.updateUrl()}getSyncNavigation(){return this.syncNavigation}setSyncNavigation(e){this.syncNavigation=e,this.updateUrl()}getNodeDataTargets(){return this.nodeDataTargets||[]}setNodeDataTargets(e){this.nodeDataTargets=e,this.updateUrl()}updateUrl(){let e={};if(this.benchmark)e[to.BENCHMARK]="1";else{let r={models:this.models,nodeData:this.nodeData,nodeDataTargets:this.nodeDataTargets,uiState:this.uiState,sync:this.syncNavigation};e[to.DATA]=JSON.stringify(r),e[to.RENDERER]=this.renderer,e[to.SHOW_OPEN_IN_NEW_TAB]=this.showOpenInNewTab?"1":"0",e[to.INTERNAL_COLAB]=this.internalColab?"1":"0",e[to.ENABLE_SUBGRAPH_SELECTION]=this.enableSubgraphSelection?"1":"0",e[to.ENABLE_EXPORT_TO_RESOURCE]=this.enableExportToResource?"1":"0"}let n=JSON.stringify(e);n!==this.prevQueryParamStr&&(this.prevQueryParamStr=n,this.router.navigate([],{queryParams:e,queryParamsHandling:"",replaceUrl:!1}))}decodeUrl(){let e=new URLSearchParams(document.location.search),n=e.get(to.DATA);if(n){let o=JSON.parse(n),s=o,a=o;a.modelUrl!=null&&(s={models:[{url:a.modelUrl}],uiState:{paneStates:[{deepestExpandedGroupNodeIds:a.deepestExpandedGroupNodeIds||[],selectedNodeId:a.selectedNodeId||"",selectedGraphId:a.selectedGraphId||"",selectedCollectionLabel:"",widthFraction:1}]}}),this.models=s.models,this.uiState=s.uiState,this.nodeData=s.nodeData,this.syncNavigation=s.sync,this.nodeDataTargets=s.nodeDataTargets}let r=e.get(to.RENDERER);this.renderer=r||"webgl",this.showOpenInNewTab=e.get(to.SHOW_OPEN_IN_NEW_TAB)==="1",this.internalColab=e.get(to.INTERNAL_COLAB)==="1",this.enableSubgraphSelection=e.get(to.ENABLE_SUBGRAPH_SELECTION)==="1",this.enableExportToResource=e.get(to.ENABLE_EXPORT_TO_RESOURCE)==="1",this.benchmark=e.get(to.BENCHMARK)==="1"}static \u0275fac=function(n){return new(n||i)(Le(vh))};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var Zye=["modelPathInput"];function Kye(i,t){if(i&1){let e=te();v(0,"mat-option",22)(1,"div",31),M(2),v(3,"div",32)(4,"div",33),H("click",function(r){let o=B(e).$index,s=I();return V(s.handleEditAutocompleteModelPath(r,o))}),v(5,"mat-icon"),M(6,"edit"),y()(),v(7,"div",33),H("click",function(r){let o=B(e).$index,s=I();return V(s.handleClickDeleteAutocompleteModelPath(r,o))}),v(8,"mat-icon"),M(9,"delete"),y()()()()()}if(i&2){let e=t.$implicit;R("value",e),w(2),we(" ",e," ")}}function Jye(i,t){i&1&&(v(0,"div",25),M(1,"or"),y())}function e0e(i,t){if(i&1){let e=te();v(0,"button",34),H("click",function(){B(e),I();let r=fe(40);return V(r.click())}),M(1," Select from your computer "),y()}if(i&2){let e=I();R("disabled",e.hasReachedMaxModelsCount||e.loading())}}function t0e(i,t){i&1&&(v(0,"div",28),M(1," You have selected maximum number of models "),y())}function n0e(i,t){i&1&&ee(0,"mat-spinner",44)}function i0e(i,t){if(i&1&&(v(0,"div",50),M(1),y()),i&2){let e=I(2).$implicit;w(),we(" ",e.errorMessage," ")}}function r0e(i,t){if(i&1&&(v(0,"div",49)(1,"mat-icon"),M(2,"info"),y()(),W(3,i0e,2,1,"ng-template",null,6,Mt)),i&2){let e=fe(4),n=I(3);R("bubble",e)("overlaySize",n.errorInfoPopupSize)("hoverDelayMs",50)}}function o0e(i,t){if(i&1){let e=te();v(0,"div",51,7),H("click",function(){B(e);let r=fe(1),o=I().$implicit,s=I(2);return V(s.handleClickOpenAdapterDropdown(o,r))}),v(2,"div",52),M(3),y(),v(4,"mat-icon"),M(5,"arrow_drop_down"),y()()}if(i&2){let e=I().$implicit,n=I(2);ne("disabled",n.loading()),w(3),we(" ",n.getSelectedAdapterName(e)," ")}}function s0e(i,t){i&1&&(v(0,"div",47),M(1," No supported adapter "),y())}function a0e(i,t){if(i&1){let e=te();v(0,"tr")(1,"td")(2,"div",40)(3,"mat-checkbox",41,5),H("change",function(r){let o=B(e).$implicit,s=I(2);return V(s.handleModelSelectionChanged(o,r.checked))}),y(),v(5,"div",42),H("click",function(){let r=B(e).$implicit,o=fe(4),s=I(2);return V(s.handleModelSelectionChanged(r,!o.checked))}),M(6),y()()(),v(7,"td")(8,"div",43),W(9,n0e,1,0,"mat-spinner",44),v(10,"div",45),M(11),y(),W(12,r0e,5,3),y()(),v(13,"td"),W(14,o0e,6,3,"div",46)(15,s0e,2,0,"div",47),y(),v(16,"td")(17,"button",48),H("click",function(){let r=B(e).index,o=I(2);return V(o.handleDeleteModel(r))}),v(18,"mat-icon"),M(19,"delete"),y()()()()}if(i&2){let e=t.$implicit,n=I(2);w(2),ne("disabled",!n.hasSupportedAdapter(e)),w(),R("checked",e.selected)("disabled",!n.hasSupportedAdapter(e)||n.loading()),w(2),ne("disabled",!n.hasSupportedAdapter(e)||n.loading()),w(),we(" ",e.path," "),w(3),re(n.showSpinner(e)?9:-1),w(),ne("done",e.status()===n.ModelItemStatus.DONE)("error",n.hasError(e)),w(),we(" ",n.getModelItemStatusString(e)," "),w(),re(n.hasError(e)?12:-1),w(2),re(n.hasSupportedAdapter(e)?14:15),w(3),R("disabled",n.loading())}}function l0e(i,t){if(i&1&&(v(0,"div",29)(1,"table")(2,"thead")(3,"tr")(4,"th",35),M(5,"Model name"),y(),v(6,"th"),M(7,"Status"),y(),v(8,"th")(9,"div",36),M(10," Adapter "),v(11,"div",37)(12,"mat-icon",38),M(13,"help_outline"),y()()()(),v(14,"th"),M(15,"Delete"),y()()(),v(16,"tbody"),W(17,a0e,20,16,"tr",39),y()()()),i&2){let e=I(),n=fe(47);w(11),R("bubble",n)("overlayPositions",e.adapterHelpPopupPosition)("hoverDelayMs",100),w(6),R("ngForOf",e.modelItems)("ngForTrackBy",e.trackByModelData)}}function c0e(i,t){if(i&1){let e=te();v(0,"div",30)(1,"div",53)(2,"button",54),H("click",function(){B(e);let r=I();return V(r.handleDeselectAllModels())}),v(3,"mat-icon"),M(4,"close"),y()(),M(5),y(),v(6,"button",55),H("click",function(){B(e);let r=I();return V(r.handleClickViewSelectedModels())}),M(7," View selected models "),y()()}if(i&2){let e=I();w(),ne("hide",e.selectedModelsCount===0),w(),R("disabled",e.loading()),w(3),we(" ",e.selectedModelsCount," selected "),w(),R("disabled",e.selectedModelsCount===0||e.loading())}}function d0e(i,t){i&1&&(v(0,"div",56)(1,"div"),M(2," Support TF, TFL and StableHLO dialect. "),y()())}function u0e(i,t){i&1&&(v(0,"div",57)(1,"span",58),M(2,"Adapters"),y(),M(3,' transform model files into an intermediate format that Model Explorer can understand and visualize. For certain model types, multiple adapters may exist, offering different transformation approaches. The "default" adapter should cover the majority of common scenarios. '),ee(4,"br")(5,"br"),M(6," You can also create your own "),v(7,"span",58),M(8,"adapter extensions"),y(),M(9," to add support for more model formats. See "),v(10,"a",59),M(11,"this guide"),y(),M(12," for instructions. "),y())}var OR=10,PR="model_explorer_model_paths",h8=50,p8=(()=>{class i{changeDetectorRef;adapterExtensionService;destroyRef;localStorageService;modelLoaderService;overlay;urlService;viewContainerRef;modelPathInput;matAutocompleteTrigger;curFilePath=new Er("");modelItems=[];modelInputAutocompleteOptions=[];filteredModelInputAutocompleteOptions=[];ModelItemStatus=zn;modelFormatHelpPopupSize={maxWidth:400,minHeight:0};errorInfoPopupSize={minHeight:0};adapterHelpPopupPosition=[{originX:"start",originY:"top",overlayX:"start",overlayY:"bottom",offsetY:-4}];loading=et(!1);hasUploadedModels=et(!1);internalColab=hf;portal=null;constructor(e,n,r,o,s,a,l,c){this.changeDetectorRef=e,this.adapterExtensionService=n,this.destroyRef=r,this.localStorageService=o,this.modelLoaderService=s,this.overlay=a,this.urlService=l,this.viewContainerRef=c,this.curFilePath.valueChanges.pipe(fi(this.destroyRef)).subscribe(d=>{this.updateFilteredAutocompleteOptions()}),this.modelInputAutocompleteOptions=this.loadSavedModelPathsForAutocomplete(),this.updateFilteredAutocompleteOptions()}startProcessingModelSource(e){this.modelItems=e.map(n=>{if(n.url.startsWith(bS)){let r=this.adapterExtensionService.getExtensionById(Sc.JSON_LOADER),o=r==null?[]:[r];return{path:n.url,type:ai.GRAPH_JSONS_FROM_SERVER,status:et(zn.NOT_STARTED),selected:o.length>0,adapterCandidates:o,selectedAdapter:r}}else if(n.url.startsWith(l8)){let r=this.adapterExtensionService.getExtensionById(Sc.DATA_NEXUS),o=r==null?[]:[r];return{path:n.url,type:ai.DATA_NEXUS,status:et(zn.NOT_STARTED),selected:!0,adapterCandidates:o,selectedAdapter:r}}else{let r=dv(n.url,this.adapterExtensionService,!0),o=this.adapterExtensionService.getExtensionById(n.converterId||n.adapterId||"");return o||(o=r.length>0?r[0]:void 0),{path:n.url,type:ai.FILE_PATH,status:et(zn.NOT_STARTED),selected:r.length>0,adapterCandidates:r,selectedAdapter:o}}}),this.changeDetectorRef.detectChanges(),this.modelItems.some(n=>n.selected)&&this.handleClickViewSelectedModels()}startWithUrlEncodedData(e,n){if(e){let r=this.adapterExtensionService.getExtensionById(Sc.JSON_LOADER);if(!r)return;this.addModelItems([{path:"",type:ai.GRAPH_JSONS_FROM_SERVER,status:et(zn.NOT_STARTED),selected:!0,adapterCandidates:[r],selectedAdapter:r}])}if(n.length>0){let r=n.map(o=>{let s=dv(o,this.adapterExtensionService,!0);return{path:o,type:ai.FILE_PATH,status:et(zn.NOT_STARTED),selected:s.length>0,adapterCandidates:s,selectedAdapter:s.length>0?s[0]:void 0}});this.addModelItems(r),this.addPathsToAutocompleteHistory(n),this.updateFilteredAutocompleteOptions()}this.changeDetectorRef.detectChanges(),e&&n.length===0&&this.handleClickViewSelectedModels()}handleClickAddEnteredModelPath(){return Ct(this,null,function*(){yield new Promise(r=>{setTimeout(r)});let e=this.curFilePath.value;if(e==null)return;let n=e.trim().split(",").filter(r=>r.trim()!=="").map(r=>{let o=dv(r,this.adapterExtensionService,!0);return{path:r,type:this.isInternal?ai.REMOTE:ai.FILE_PATH,status:et(zn.NOT_STARTED),selected:o.length>0,adapterCandidates:o,selectedAdapter:o.length>0?o[0]:void 0}});this.addModelItems(n),this.addPathsToAutocompleteHistory(n.map(r=>r.path)),this.curFilePath.setValue(""),setTimeout(()=>{this.matAutocompleteTrigger?.closePanel(),this.modelPathInput.nativeElement.blur()})})}handleAutocompleteOptionSelected(e){this.disableAddEnteredModelPathButton||(e.option.deselect(),this.handleClickAddEnteredModelPath())}handleModelSelectionChanged(e,n){e.selected=n}handleDeleteModel(e){this.modelItems.splice(e,1),this.changeDetectorRef.markForCheck()}handleDeselectAllModels(){for(let e of this.modelItems)e.selected=!1}handleEditAutocompleteModelPath(e,n){e.stopPropagation(),this.curFilePath.setValue(this.modelInputAutocompleteOptions[n].path),this.modelPathInput.nativeElement.focus()}handleClickDeleteAutocompleteModelPath(e,n){e.stopPropagation(),this.modelInputAutocompleteOptions.splice(n,1),this.updateFilteredAutocompleteOptions(),this.localStorageService.setItem(PR,JSON.stringify(this.modelInputAutocompleteOptions))}handleClickUpload(e){let n=e.files;if(!n)return;let r=[];for(let o=0;o0,adapterCandidates:l,selectedAdapter:l.length>0?l[0]:void 0}):n.push({path:o.name,type:ai.LOCAL,status:et(zn.NOT_STARTED),selected:l.length>0,file:o,adapterCandidates:l,selectedAdapter:l.length>0?l[0]:void 0})}this.addModelItems(n)}handleClickOpenAdapterDropdown(e,n){let r=e.selectedAdapter?.id,o=this.createOverlay(n),s=o.attach(this.portal);s.instance.selectedAdapter=e.selectedAdapter,s.instance.candidates=e.adapterCandidates||[],s.instance.onClose.subscribe(a=>{o.dispose(),a?.id!==r&&e.errorMessage!=null&&(e.status.set(zn.NOT_STARTED),e.errorMessage=void 0,e.selected=!0),e.selectedAdapter=a,this.changeDetectorRef.markForCheck()})}handleClickViewSelectedModels(){this.loading.set(!0);let e=this.modelItems.filter(n=>n.selected);this.modelLoaderService.loadModels(e).then(()=>{this.loading.set(!1)}),this.urlService.setUiState(void 0),this.urlService.setModels(e.filter(n=>n.type===ai.REMOTE||n.type===ai.GRAPH_JSONS_FROM_SERVER||n.type===ai.FILE_PATH).map(n=>({url:n.path,adapterId:n.selectedAdapter?.id}))),this.hasUploadedModels.set(e.some(n=>n.type===ai.LOCAL))}trackByModelData(e,n){return`${n.path}_${n.file?.size}_${n.file?.lastModified}`}isNotStarted(e){return e.status()===zn.NOT_STARTED}getSelectedAdapterName(e){return e.selectedAdapter==null?"?":(e.adapterCandidates||[]).indexOf(e.selectedAdapter)===0?"Default":e.selectedAdapter?.name||"?"}hasSupportedAdapter(e){return(e.adapterCandidates||[]).length>0}hasMultipleSupportedAdapters(e){return(e.adapterCandidates||[]).length>1}showSpinner(e){return e.status()===zn.PROCESSING||e.status()===zn.UPLOADING}hasError(e){return e.status()===zn.ERROR}getModelItemStatusString(e){let n=e.status();return n===zn.UPLOADING?"Processing":n}get disableAddEnteredModelPathButton(){if(this.hasReachedMaxModelsCount)return!0;if(this.isInternal){let e=(this.curFilePath.value||"").toLowerCase().trim();return e!==""&&!sS(e)&&!e.startsWith("http")||e===""}else{let e=(this.curFilePath.value||"").trim();return e===""||e!==""&&!e.startsWith("/")&&!e.startsWith("~")}}get isInternal(){return!!0}get isExternal(){return!0}get selectedModelsCount(){return this.modelItems.filter(e=>e.selected).length}get hasReachedMaxModelsCount(){return this.modelItems.length===OR}get modelPathInputPlaceholder(){return"Absolute file paths (recommended for large models)"}updateFilteredAutocompleteOptions(){let n=(this.curFilePath.value||"").toLowerCase();this.filteredModelInputAutocompleteOptions=this.modelInputAutocompleteOptions.filter(r=>r.path.toLowerCase().includes(n)).map(r=>r.path),this.changeDetectorRef.markForCheck()}addPathsToAutocompleteHistory(e){let n=this.loadSavedModelPathsForAutocomplete();for(let r of e){let o=n.findIndex(s=>s.path===r);if(o>=0){let s=n.splice(o,1);s&&s.length>0&&(s[0].ts=Date.now(),n.unshift(s[0]))}else n.unshift({path:r,ts:Date.now()})}n.length>h8&&n.splice(h8),this.localStorageService.setItem(PR,JSON.stringify(n)),this.modelInputAutocompleteOptions=n}addModelItems(e){let n=e.filter(r=>this.modelItems.find(o=>o.path===r.path&&o.file?.size===r.file?.size&&o.file?.lastModified===r.file?.lastModified)==null);this.modelItems.push(...n),this.modelItems.length>OR&&this.modelItems.splice(OR),this.changeDetectorRef.markForCheck()}loadSavedModelPathsForAutocomplete(){return JSON.parse(this.localStorageService.getItem(PR)||"[]")}createOverlay(e){let n=new bi({positionStrategy:this.overlay.position().flexibleConnectedTo(e).withPositions([{originX:"start",originY:"bottom",overlayX:"start",overlayY:"top"}]),hasBackdrop:!0,backdropClass:"cdk-overlay-transparent-backdrop",scrollStrategy:this.overlay.scrollStrategies.reposition(),maxWidth:"380px",panelClass:"graph-selector-panel"}),r=this.overlay.create(n);return this.portal=new Li(c8,this.viewContainerRef),r.backdropClick().subscribe(()=>{r.dispose()}),r}static \u0275fac=function(n){return new(n||i)(q(Re),q(d8),q(hi),q(Mr),q("ModelLoaderService"),q(on),q(xS),q(Kt))};static \u0275cmp=oe({type:i,selectors:[["model-source-input"]],viewQuery:function(n,r){if(n&1&&(Me(Zye,5),Me(cv,5)),n&2){let o;_e(o=ve())&&(r.modelPathInput=o.first),_e(o=ve())&&(r.matAutocompleteTrigger=o.first)}},standalone:!0,features:[se],decls:48,vars:16,consts:[["auto","matAutocomplete"],["modelPathInput",""],["uploadInput",""],["externalMlirHelp",""],["adapterHelp",""],["checkbox",""],["errorInfo",""],["selector",""],[1,"container"],[1,"content"],[1,"title"],[1,"description-container"],[1,"description"],["href","https://www.tensorflow.org/","target","_blank"],["href","https://www.tensorflow.org/lite","target","_blank"],["href","https://www.tensorflow.org/js","target","_blank"],["href","https://www.tensorflow.org/guide/jax2tf","target","_blank"],["href","https://github.com/google-ai-edge/model-explorer/wiki/2.-User-Guide#how-to-select-pytorch-models","target","_blank"],[1,"help-trigger","external",3,"bubble","overlaySize","hoverDelayMs"],[1,"source-input-container"],[1,"input-container"],[1,"model-path-autocomplete",3,"optionSelected"],[3,"value"],[3,"keydown.enter","placeholder","formControl","matAutocomplete"],["mat-raised-button","",1,"btn-add-model-path",3,"click","disabled"],[1,"or-label"],["mat-flat-button","",1,"btn-upload",3,"disabled"],["type","file","multiple","",1,"upload-input",3,"change"],[1,"model-count-warning"],[1,"models-table"],[1,"table-action-bar"],[1,"option-container"],[1,"icons-container"],[1,"mat-icon-container",3,"click"],["mat-flat-button","",1,"btn-upload",3,"click","disabled"],[1,"model-name-col"],[1,"adapter-header"],[1,"icon-container",3,"bubble","overlayPositions","hoverDelayMs"],["fontSet","google-material-icons"],[4,"ngFor","ngForOf","ngForTrackBy"],[1,"model-name-container"],[3,"change","checked","disabled"],[1,"model-path",3,"click"],[1,"model-status-container"],["color","primary","diameter","16"],[1,"model-status-label-container"],[1,"selected-adapter-container",3,"disabled"],[1,"no-supported-adapter-msg"],["mat-icon-button","",1,"btn-delete-model-item",3,"click","disabled"],[1,"error-info-container",3,"bubble","overlaySize","hoverDelayMs"],[1,"model-explorer-error-info-popup"],[1,"selected-adapter-container",3,"click"],[1,"selected-adapter-label"],[1,"selection-status"],["mat-icon-button","",1,"btn-deselect-all",3,"click","disabled"],["mat-flat-button","","color","primary",1,"btn-view-models",3,"click","disabled"],[1,"model-explorer-model-format-help-popup"],[1,"model-explorer-adapter-help-popup"],[1,"bold"],["href","https://github.com/google-ai-edge/model-explorer/wiki/6.-Develop-Adapter-Extension","target","_blank"]],template:function(n,r){if(n&1){let o=te();v(0,"div",8)(1,"div",9)(2,"div",10),M(3," Select Models "),y(),v(4,"div",11)(5,"div",12),M(6," Select models from your comupter or enter the file paths directly (up to 10 in total)."),ee(7,"br"),M(8," Supported model formats: "),v(9,"a",13),M(10,"TF"),y(),M(11," (.pb, .pbtxt, .graphdef), "),v(12,"a",14),M(13,"TFLite"),y(),M(14," (.tflite), "),v(15,"a",15),M(16,"TFJS"),y(),M(17," (.json), "),v(18,"a",16),M(19,"JAX"),y(),M(20," (.pb), "),v(21,"a",17),M(22,"PyTorch ExportedProgram"),y(),M(23," (.pt2), "),v(24,"span",18),M(25," MLIR "),y(),M(26," (.mlir, .mlirbc). "),y()(),v(27,"div",19)(28,"div",20)(29,"mat-autocomplete",21,0),H("optionSelected",function(a){return B(o),V(r.handleAutocompleteOptionSelected(a))}),Xt(31,Kye,10,2,"mat-option",22,wr),y(),v(33,"input",23,1),H("keydown.enter",function(){return B(o),V(!r.disableAddEnteredModelPathButton&&r.handleClickAddEnteredModelPath())}),y(),v(35,"button",24),H("click",function(){return B(o),V(r.handleClickAddEnteredModelPath())}),M(36," Add "),y()(),W(37,Jye,2,0,"div",25)(38,e0e,2,1,"button",26),v(39,"input",27,2),H("change",function(){B(o);let a=fe(40);return V(r.handleClickUpload(a))}),y()(),W(41,t0e,2,0,"div",28)(42,l0e,18,5,"div",29),y(),W(43,c0e,8,5,"div",30),y(),W(44,d0e,3,0,"ng-template",null,3,Mt)(46,u0e,13,0,"ng-template",null,4,Mt)}if(n&2){let o=fe(30),s=fe(45);w(),ne("no-models",r.modelItems.length===0),w(23),R("bubble",s)("overlaySize",r.modelFormatHelpPopupSize)("hoverDelayMs",50),w(3),ne("reverse",r.isExternal),w(4),Qt(r.filteredModelInputAutocompleteOptions),w(2),R("placeholder",r.modelPathInputPlaceholder)("formControl",r.curFilePath)("matAutocomplete",o),w(2),R("disabled",r.disableAddEnteredModelPathButton||r.loading()),w(2),re(r.internalColab?-1:37),w(),re(r.internalColab?-1:38),w(3),re(r.hasReachedMaxModelsCount?41:-1),w(),re(r.modelItems.length>0?42:-1),w(),re(r.modelItems.length>0?43:-1)}},dependencies:[Nn,Oe,Oi,a8,o8,Yl,cv,vn,gi,qo,ZC,QC,fa,lo,pa,ma,$t,Je,dt,Ir,Xs,Wo,Co],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;box-sizing:border-box;display:flex;align-items:flex-start;flex-direction:column;border:1px solid #dadce0;border-radius:8px;overflow:hidden}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{width:100%;box-sizing:border-box;padding:24px 24px 0;overflow:hidden;display:flex;flex-direction:column}.container[_ngcontent-%COMP%] .content.no-models[_ngcontent-%COMP%]{padding-bottom:24px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#1f1f1f;font-size:24px}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%]{color:#444746;font-size:14px;margin-top:8px}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{line-height:20px}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .tfhub[_ngcontent-%COMP%]{display:inline-block;text-decoration:underline;text-decoration-color:#aaa;cursor:help}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .help-trigger[_ngcontent-%COMP%]{display:inline-block;margin-right:6px;text-decoration:underline;text-decoration-color:#aaa;cursor:help}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] .help-trigger.external[_ngcontent-%COMP%]{margin-right:0}.container[_ngcontent-%COMP%] .description-container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:inherit}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%]{display:flex;height:56px;box-sizing:border-box;width:100%;margin-top:8px;padding:8px 0;align-items:center;flex-shrink:0}.container[_ngcontent-%COMP%] .source-input-container.reverse[_ngcontent-%COMP%]{flex-direction:row-reverse}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%]{height:100%;box-sizing:border-box;background-color:#f0f4f9;border-radius:99px;flex-grow:1;display:flex;align-items:center;padding-left:18px}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{height:100%;flex-grow:1;border:none;outline:none;background-color:transparent;color:#444746;font-size:14px;margin-right:16px}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .btn-add-model-path[_ngcontent-%COMP%]{background-color:#fff;border-radius:99px;color:#0b57d0;height:40px}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .input-container[_ngcontent-%COMP%] .btn-add-model-path[disabled][_ngcontent-%COMP%]{background-color:#1f1f1f1f;color:#1f1f1f61}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .or-label[_ngcontent-%COMP%]{font-size:14px;margin:0 20px;color:#5f6368}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .btn-upload[_ngcontent-%COMP%]{height:100%;background-color:#c2e7ff;border-radius:99px;color:#001d35}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .btn-upload[disabled][_ngcontent-%COMP%]{background-color:#1f1f1f1f;color:#1f1f1f61}.container[_ngcontent-%COMP%] .source-input-container[_ngcontent-%COMP%] .upload-input[_ngcontent-%COMP%]{display:none}.container[_ngcontent-%COMP%] .model-count-warning[_ngcontent-%COMP%]{color:#ab6c17;background-color:#ffefd9;margin:4px 0;width:fit-content;padding:2px 9px;border-radius:4px;font-size:13px;font-weight:500}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%]{width:100%;color:#1f1f1f;font-size:14px;margin-top:18px;overflow:hidden auto}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%]{width:100%;border-spacing:0;border-collapse:collapse;padding:0}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%]{position:sticky;top:0;z-index:100;box-shadow:inset 0 -1px #c4c7c5;background-color:#fff}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] .model-name-col[_ngcontent-%COMP%]{width:100%}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] .adapter-header[_ngcontent-%COMP%]{display:flex;align-items:center;gap:4px}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] .adapter-header[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{display:flex;align-items:center;cursor:pointer;opacity:.8}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] .adapter-header[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] thead[_ngcontent-%COMP%] .adapter-header[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:20px;width:20px;height:20px;color:#777}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{height:49px;text-align:left;padding:0;font-weight:500}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]{height:49px;text-align:left;padding:0}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:not(:last-child){border-bottom:1px solid #c4c7c5}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:0}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-name-container[_ngcontent-%COMP%]{display:flex;align-items:center;padding-left:12px;margin-right:12px;word-break:break-all}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-name-container.disabled[_ngcontent-%COMP%]{pointer-events:none}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-name-container[_ngcontent-%COMP%] mat-checkbox[_ngcontent-%COMP%]{margin-right:2px}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-name-container[_ngcontent-%COMP%] .model-path[_ngcontent-%COMP%]{cursor:pointer;line-height:16px;padding:8px 0}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-name-container[_ngcontent-%COMP%] .model-path.disabled[_ngcontent-%COMP%]{pointer-events:none}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .selected-adapter-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:space-between;cursor:pointer;height:48px;margin-right:24px;white-space:nowrap}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .selected-adapter-container.disabled[_ngcontent-%COMP%]{opacity:.5;pointer-events:none}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .selected-adapter-container[_ngcontent-%COMP%]:hover mat-icon[_ngcontent-%COMP%]{opacity:1}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .selected-adapter-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{opacity:.7}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .no-supported-adapter-msg[_ngcontent-%COMP%]{color:#ab6c17;background-color:#ffefd9;padding:2px 8px;width:fit-content;border-radius:4px;font-size:12px;margin-right:24px;white-space:nowrap;font-weight:500}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%]{display:flex;align-items:center;margin-right:32px}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] mat-spinner[_ngcontent-%COMP%]{margin-right:4px}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] .model-status-label-container[_ngcontent-%COMP%]{font-size:12px;padding:2px 8px;background-color:#f1f3f4;display:flex;align-items:center;justify-content:center;color:#3c4043;width:fit-content;border-radius:4px;white-space:nowrap;font-weight:500}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] .model-status-label-container.done[_ngcontent-%COMP%]{color:#0d652d;background-color:#e6f4ea}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] .model-status-label-container.error[_ngcontent-%COMP%]{color:#a50e0e;background-color:#fce8e6}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] .error-info-container[_ngcontent-%COMP%]{width:20px;display:flex;align-items:center;justify-content:center;margin-left:4px;cursor:pointer}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .model-status-container[_ngcontent-%COMP%] .error-info-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{width:20px;height:20px;font-size:20px}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .btn-delete-model-item[_ngcontent-%COMP%]{width:36px;height:36px;padding:0;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .btn-delete-model-item[disabled][_ngcontent-%COMP%]{opacity:.5}.container[_ngcontent-%COMP%] .models-table[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .btn-delete-model-item[_ngcontent-%COMP%] mat-icon{font-size:20px;width:20px;height:20px;color:#444746}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%]{flex-shrink:0;height:60px;width:100%;box-sizing:border-box;display:flex;align-items:center;justify-content:space-between;background-color:#f0f4f9;padding:0 24px 0 38px}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%] .selection-status[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:14px;color:#444746}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%] .selection-status.hide[_ngcontent-%COMP%]{visibility:hidden}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%] .btn-deselect-all[_ngcontent-%COMP%]{width:36px;height:36px;padding:0;display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%] .btn-deselect-all[_ngcontent-%COMP%] mat-icon{font-size:20px;width:20px;height:20px;color:#444746}.container[_ngcontent-%COMP%] .table-action-bar[_ngcontent-%COMP%] .btn-view-models[_ngcontent-%COMP%]{height:40px;border-radius:99px}.container[_ngcontent-%COMP%] .instructions-container[_ngcontent-%COMP%]{font-size:13px;color:#555;margin-top:24px;display:none}.container[_ngcontent-%COMP%] .instructions-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;margin-right:4px}.container[_ngcontent-%COMP%] .instructions-container[_ngcontent-%COMP%] .instruction-title[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .instructions-container[_ngcontent-%COMP%] .instruction-title[_ngcontent-%COMP%] .model-format[_ngcontent-%COMP%]{color:#333;margin-right:4px;margin-left:4px;border:1px solid #ccc;border-radius:4px;padding:2px 4px;cursor:pointer}.container[_ngcontent-%COMP%] .instructions-container[_ngcontent-%COMP%] .instruction-title[_ngcontent-%COMP%] .model-format[_ngcontent-%COMP%]:hover{background-color:#eee} .model-explorer-upload-help-popup{padding:12px;font-weight:400;color:#555;line-height:14px;font-size:12px;font-family:Google Sans Text,Arial,Helvetica,sans-serif} .model-explorer-adapter-help-popup{padding:12px;font-weight:400;color:#555;line-height:15px;font-size:12px;font-family:Google Sans Text,Arial,Helvetica,sans-serif} .model-explorer-adapter-help-popup .bold{font-weight:700} .model-explorer-model-format-help-popup{padding:12px;font-weight:400;color:#555;line-height:15px;font-size:12px;font-family:Google Sans Text,Arial,Helvetica,sans-serif;letter-spacing:normal} .model-explorer-model-format-help-popup a{color:inherit} .model-explorer-model-format-help-popup .example{margin-top:8px;color:#aaa} .model-explorer-model-format-help-popup .example ul{margin:4px 0;padding-inline-start:28px} .model-explorer-model-format-help-popup .example li{margin-top:4px} .model-explorer-model-format-help-popup .info{display:inline-block;background-color:#ffd1a8} .model-explorer-error-info-popup{padding:12px;font-weight:400;background-color:#f0f4f9;line-height:14px;font-size:12px;font-family:Google Sans Text,Arial,Helvetica,sans-serif} .model-path-autocomplete mat-option{min-height:13px;font-size:13px;line-height:13px;padding-top:5px;padding-bottom:5px} .model-path-autocomplete mat-option:hover .option-container .mat-icon-container{visibility:visible} .model-path-autocomplete mat-option>span{width:100%} .model-path-autocomplete mat-option .option-container{width:100%;display:flex;align-items:center;justify-content:space-between;word-break:break-all} .model-path-autocomplete mat-option .option-container .icons-container{display:flex;align-items:center;gap:4px;min-width:50px;justify-content:flex-end} .model-path-autocomplete mat-option .option-container .mat-icon-container{visibility:hidden;display:flex;align-items:center;justify-content:center;opacity:.6;width:18px} .model-path-autocomplete mat-option .option-container .mat-icon-container:hover{opacity:1} .model-path-autocomplete mat-option .option-container .mat-icon-container mat-icon{font-size:18px;width:18px;height:18px} + + + + + + + + + + + + + + + + + +`],changeDetection:0})}return i})();var h0e=(i,t)=>t.name;function p0e(i,t){if(i&1){let e=te();v(0,"div",11),H("click",function(){B(e);let r=I().$implicit;return V(r.expanded=!r.expanded)}),v(1,"mat-icon"),M(2,"unfold_more"),y()()}}function f0e(i,t){if(i&1&&(v(0,"div",3)(1,"div",6),M(2),y(),v(3,"div",7),M(4),y(),v(5,"div",8)(6,"div",9),M(7),y(),W(8,p0e,3,0,"div",10),y()()),i&2){let e=t.$implicit;w(2),lt(e.name),w(2),lt(e.copyright),w(),ne("expanded",e.expanded),w(2),lt(e.license),w(),re(e.expanded?-1:8)}}var f8=(()=>{class i{libs=[{name:"Angular",copyright:"Copyright (c) 2010-2024 Google LLC.",license:`The MIT License + +Copyright (c) 2010-2024 Google LLC. https://angular.io/license + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE.`},{name:"d3 (v5.7.0)",copyright:"Copyright 2010-2017 Mike Bostock",license:`Copyright 2010-2017 Mike Bostock +All rights reserved. + +Redistribution and use in source and binary forms, with or without modification, +are permitted provided that the following conditions are met: + +* Redistributions of source code must retain the above copyright notice, this + list of conditions and the following disclaimer. + +* Redistributions in binary form must reproduce the above copyright notice, + this list of conditions and the following disclaimer in the documentation + and/or other materials provided with the distribution. + +* Neither the name of the author nor the names of contributors may be used to + endorse or promote products derived from this software without specific prior + written permission. + +THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND +ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED +WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE +DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR +ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES +(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; +LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON +ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS +SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.`},{name:"dagre (v0.8.5)",copyright:"Copyright (c) 2012-2014 Chris Pettitt",license:`Copyright (c) 2012-2014 Chris Pettitt + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE.`},{name:"three.js (r134)",copyright:"Copyright \xA9 2010-2021 three.js authors",license:`The MIT License + +Copyright \xA9 2010-2021 three.js authors + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE.`}];static \u0275fac=function(n){return new(n||i)};static \u0275cmp=oe({type:i,selectors:[["open-source-libs-dialog"]],standalone:!0,features:[se],decls:9,vars:0,consts:[["mat-dialog-title",""],[1,"title"],["mat-dialog-content","",1,"dialog-content"],[1,"lib-container"],["mat-dialog-actions","","align","end"],["mat-button","","mat-dialog-close",""],[1,"name"],[1,"copyright"],[1,"license-container"],[1,"license-content"],[1,"icon-container"],[1,"icon-container",3,"click"]],template:function(n,r){n&1&&(v(0,"div",0)(1,"div",1),M(2,"Open source libraries"),y()(),v(3,"div",2),Xt(4,f0e,9,6,"div",3,h0e),y(),v(6,"div",4)(7,"button",5),M(8,"Close"),y()()),n&2&&(w(4),Qt(r.libs))},dependencies:[Oe,vn,gi,ga,pf,ff,gf,mf,Je,dt],styles:[`*[_ngcontent-%COMP%]:not(mat-icon){font-family:Google Sans Text,Arial,Helvetica,sans-serif!important;letter-spacing:normal!important}.title[_ngcontent-%COMP%]{font-size:24px;font-weight:500;margin-top:-16px}.dialog-content[_ngcontent-%COMP%]{padding-bottom:0}.lib-container[_ngcontent-%COMP%]{margin:18px 0}.lib-container[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{font-size:16px;font-weight:700;color:#333}.lib-container[_ngcontent-%COMP%] .copyright[_ngcontent-%COMP%]{font-size:12px;color:#777}.lib-container[_ngcontent-%COMP%] .license-container[_ngcontent-%COMP%]{width:520px;font-size:11px;border:1px solid #ccc;margin-top:8px;background-color:#f9f9f9;height:100px;overflow:hidden;position:relative}.lib-container[_ngcontent-%COMP%] .license-container.expanded[_ngcontent-%COMP%]{height:fit-content}.lib-container[_ngcontent-%COMP%] .license-container[_ngcontent-%COMP%] .license-content[_ngcontent-%COMP%]{white-space:pre-wrap;line-height:14px;padding:8px;overflow:hidden;height:100%;box-sizing:border-box}.lib-container[_ngcontent-%COMP%] .license-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{position:absolute;right:8px;top:8px;cursor:pointer;opacity:.8}.lib-container[_ngcontent-%COMP%] .license-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:1} + + + + + + + + + + + + + + + + + +`]})}return i})();function m0e(i,t){i&1&&(M(0," When "),v(1,"a",19),M(2,"View tensor shape on edge"),y(),M(3," is turned on, Model Explorer will try to position the shape along the edge curve. When the edge is close to vertical, the shape may be hard to read. Enabling this option will force the shapes to be rendered horizontally in such situations to improve readbility. "))}function g0e(i,t){if(i&1&&M(0),i&2){let e=I(3).$implicit;we(" ",e.help," ")}}function _0e(i,t){if(i&1&&(v(0,"div",18),W(1,m0e,4,0)(2,g0e,1,1),y()),i&2){let e=I(2).$implicit;w(),re(e.key==="disallow_vertical_edge_labels"?1:2)}}function v0e(i,t){if(i&1&&(v(0,"div",16)(1,"mat-icon",17),M(2,"help_outline"),y()(),W(3,_0e,3,1,"ng-template",null,0,Mt)),i&2){let e=fe(4),n=I(2);R("bubble",e)("overlaySize",n.helpPopupSize)("overlayPositions",n.helpPopupPosition)("hoverDelayMs",100)}}function y0e(i,t){if(i&1){let e=te();_o(0),v(1,"mat-slide-toggle",20),H("change",function(r){B(e);let o=I().$implicit,s=I();return V(s.settingsService.saveBooleanValue(r.checked,o.key))}),y(),vo()}if(i&2){let e=I().$implicit,n=I();w(),R("checked",n.settingsService.getBooleanValue(e))}}function b0e(i,t){if(i&1){let e=te();_o(0),v(1,"input",21,1),H("focus",function(){B(e);let r=fe(2);return V(r.select())})("change",function(){B(e);let r=fe(2),o=I().$implicit,s=I();return V(s.settingsService.saveNumberValue(r.valueAsNumber,o.key))}),y(),v(3,"div",22),H("click",function(){B(e);let r=I().$implicit,o=I();return V(o.handleClickResetToDefaultNumber(r))}),M(4,"Reset to default"),y(),vo()}if(i&2){let e=I().$implicit,n=I();w(),R("value",n.settingsService.getNumberValue(e))}}function x0e(i,t){if(i&1){let e=te();_o(0),v(1,"textarea",21,1),H("focus",function(){B(e);let r=fe(2);return V(r.select())})("change",function(){B(e);let r=fe(2),o=I().$implicit,s=I();return V(s.settingsService.saveStringValue(r.value,o.key))}),y(),v(3,"div",22),H("click",function(){B(e);let r=I().$implicit,o=I();return V(o.handleClickResetToDefaultText(r))}),M(4,"Reset to default"),y(),vo()}if(i&2){let e=I().$implicit,n=I();w(),R("value",n.settingsService.getStringValue(e))}}function w0e(i,t){if(i&1){let e=te();_o(0),v(1,"div",23)(2,"label")(3,"input",24,2),H("change",function(){B(e);let r=fe(4),o=I().$implicit,s=I();return V(s.settingsService.saveStringValue(r.value,o.key))}),y()(),v(5,"input",25,3),H("change",function(){B(e);let r=fe(4),o=I().$implicit,s=I();return V(s.settingsService.saveStringValue(r.value,o.key))}),y()(),v(7,"div",22),H("click",function(){B(e);let r=I().$implicit,o=I();return V(o.handleClickResetToDefaultText(r))}),M(8,"Reset to default"),y(),vo()}if(i&2){let e=I().$implicit,n=I();w(2),an("background-color",n.settingsService.getStringValue(e)),w(),R("value",n.settingsService.getStringValue(e)),w(2),R("value",n.settingsService.getStringValue(e))}}function C0e(i,t){if(i&1&&(v(0,"div",12),_o(1,13),v(2,"div",14),M(3),W(4,v0e,5,4),y(),W(5,y0e,2,1,"ng-container",15)(6,b0e,5,1,"ng-container",15)(7,x0e,5,1,"ng-container",15)(8,w0e,9,4,"ng-container",15),vo(),y()),i&2){let e=t.$implicit,n=I();w(),R("ngSwitch",e.type),w(2),we(" ",e.label," "),w(),re(e.help?4:-1),w(),R("ngSwitchCase",n.SettingType.BOOLEAN),w(),R("ngSwitchCase",n.SettingType.NUMBER),w(),R("ngSwitchCase",n.SettingType.TEXT_MULTILINE),w(),R("ngSwitchCase",n.SettingType.COLOR)}}var m8=(()=>{class i{settingsService;SettingType=uo;helpPopupSize={minWidth:0,minHeight:0,maxWidth:340};helpPopupPosition=[{originX:"end",originY:"top",overlayX:"start",overlayY:"top",offsetX:4}];constructor(e){this.settingsService=e}allSettings=yS;handleClickResetToDefaultText(e){this.settingsService.saveStringValue(e.defaultValue,e.key)}handleClickResetToDefaultNumber(e){this.settingsService.saveNumberValue(e.defaultValue,e.key)}static \u0275fac=function(n){return new(n||i)(q(vf))};static \u0275cmp=oe({type:i,selectors:[["settings-dialog"]],standalone:!0,features:[se],decls:11,vars:1,consts:[["helpPopup",""],["input",""],["colorPicker",""],["colorInput",""],["mat-dialog-title","",1,"title-container"],[1,"title"],[1,"local-storage-info"],["mat-dialog-content","",1,"dialog-content"],[1,"settings-container"],["class","setting-item",4,"ngFor","ngForOf"],["mat-dialog-actions","","align","end",1,"buttons-container"],["mat-button","","mat-dialog-close",""],[1,"setting-item"],[3,"ngSwitch"],[1,"setting-label"],[4,"ngSwitchCase"],[1,"icon-container",3,"bubble","overlaySize","overlayPositions","hoverDelayMs"],["fontSet","google-material-icons"],[1,"model-explorer-settings-help-popup"],["href","https://github.com/google-ai-edge/model-explorer/wiki/2.-User-Guide#overlay-data-on-nodesedges","target","_blank"],[3,"change","checked"],["type","number",3,"focus","change","value"],[1,"reset",3,"click"],[1,"color-picker-container"],["type","color",3,"change","value"],["type","text",3,"change","value"]],template:function(n,r){n&1&&(v(0,"div",4)(1,"div",5),M(2,"Advanced settings"),y(),v(3,"div",6),M(4," Settings are stored in current browser's local storage "),y()(),v(5,"div",7)(6,"div",8),W(7,C0e,9,7,"div",9),y()(),v(8,"div",10)(9,"button",11),M(10,"Close"),y()()),n&2&&(w(7),R("ngForOf",r.allSettings))},dependencies:[Nn,Oe,Oi,vI,RL,vn,gi,ga,pf,ff,gf,mf,Je,dt,rS,iS],styles:[`*[_ngcontent-%COMP%]:not(mat-icon){font-family:Google Sans Text,Arial,Helvetica,sans-serif}.title-container[_ngcontent-%COMP%]{border-bottom:1px solid #ddd}.title[_ngcontent-%COMP%]{font-size:24px;font-weight:500;margin-top:-16px}.local-storage-info[_ngcontent-%COMP%]{font-size:12px;color:#777;margin-top:6px}.dialog-content[_ngcontent-%COMP%]{padding-bottom:0}.settings-container[_ngcontent-%COMP%]{font-size:13px;color:#000;margin-top:20px;margin-bottom:10px}.setting-item[_ngcontent-%COMP%]{display:flex;flex-direction:column;align-items:flex-start;margin-bottom:24px}.setting-item[_ngcontent-%COMP%] .setting-label[_ngcontent-%COMP%]{line-height:16px;margin-bottom:4px;width:100%;display:flex;align-items:center;justify-content:space-between}.setting-item[_ngcontent-%COMP%] .setting-label[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{width:16px;height:16px;margin-left:12px;opacity:.4;cursor:pointer}.setting-item[_ngcontent-%COMP%] .setting-label[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:.6}.setting-item[_ngcontent-%COMP%] .setting-label[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.setting-item[_ngcontent-%COMP%] input[_ngcontent-%COMP%], .setting-item[_ngcontent-%COMP%] textarea[_ngcontent-%COMP%]{box-sizing:border-box;width:100%}.setting-item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-outer-spin-button, .setting-item[_ngcontent-%COMP%] input[_ngcontent-%COMP%]::-webkit-inner-spin-button{-webkit-appearance:none;margin:0}.setting-item[_ngcontent-%COMP%] .reset[_ngcontent-%COMP%]{color:#999;cursor:pointer;margin-top:2px;text-decoration:underline;-webkit-user-select:none;user-select:none}.setting-item[_ngcontent-%COMP%] .reset[_ngcontent-%COMP%]:hover{color:#777}.color-picker-container[_ngcontent-%COMP%]{display:flex;align-items:center;overflow:hidden;border-radius:2px;border:1px solid rgb(118,118,118);width:100%;background-color:#fff;box-sizing:border-box;height:24px;position:relative}.color-picker-container[_ngcontent-%COMP%]:focus-within{border-color:#1a73e8;outline:1px solid #1a73e8}.color-picker-container[_ngcontent-%COMP%] label[_ngcontent-%COMP%]{display:inline-block;width:16px;height:16px;margin:2px;background-color:red;border-radius:4px;cursor:pointer;border:1px solid #ddd}.color-picker-container[_ngcontent-%COMP%] label[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{visibility:hidden}.color-picker-container[_ngcontent-%COMP%] input[type=text][_ngcontent-%COMP%]{border:none;height:100%;background-color:transparent;outline:none}.buttons-container[_ngcontent-%COMP%]{border-top:1px solid #ddd} .model-explorer-settings-help-popup{font-size:12px;padding:8px;background-color:#fff;line-height:normal} .model-explorer-settings-help-popup .bold{font-weight:700} + + + + + + + + + + + + + + + + + +`]})}return i})();var g8=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275cmp=oe({type:i,selectors:[["welcome-card"]],standalone:!0,features:[se],decls:13,vars:0,consts:[[1,"container"],[1,"left"],[1,"title"],[1,"description"],[1,"doc-links-container"],[1,"doc-link"],["href","https://github.com/google-ai-edge/model-explorer","target","_blank"],[1,"doc-text"]],template:function(n,r){n&1&&(v(0,"div",0)(1,"div",1)(2,"div",2),M(3," Welcome to Model Explorer "),y(),v(4,"div",3),M(5," A modern model graph visualizer and debugger "),y(),v(6,"div",4)(7,"div",5)(8,"a",6)(9,"mat-icon"),M(10,"open_in_new"),y(),v(11,"span",7),M(12,"Learn more from GitHub"),y()()()()()())},dependencies:[Oe,Je,dt],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;box-sizing:border-box;border:1px solid #dadce0;border-radius:8px;padding:24px;display:flex;justify-content:space-between}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{color:#1f1f1f;font-size:24px}.container[_ngcontent-%COMP%] .description[_ngcontent-%COMP%]{color:#3c4043;margin-top:8px;font-size:14px}.container[_ngcontent-%COMP%] .doc-links-container[_ngcontent-%COMP%]{margin-top:24px}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%]{font-size:14px;color:#0b57d0;cursor:pointer;opacity:.8;margin-bottom:8px}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%] .doc-text[_ngcontent-%COMP%]{color:#0b57d0}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;align-items:center;text-decoration:none}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%] [_ngcontent-%COMP%]:hover{opacity:1}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%] [_ngcontent-%COMP%]:hover .doc-text[_ngcontent-%COMP%]{text-decoration:underline}.container[_ngcontent-%COMP%] .doc-link[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:18px;width:18px;height:18px;margin-right:8px;color:#0b57d0}.container[_ngcontent-%COMP%] .video-container[_ngcontent-%COMP%]{width:430px;height:100%;border-radius:8px;background-color:#f1f1f1;display:flex;align-items:center;justify-content:center;color:#999;font-size:13px} + + + + + + + + + + + + + + + + + +`]})}return i})();var wS=new pe("Inject:Window");var _8=(()=>{class i{window;gtag;constructor(e){this.window=e,this.gtag=this.window.gtag}trackEvent(e,n="",r,o,s){let a=this.getPath(this.window.location.href);r=r??a,o=o??e,s=s??1;let l={event_category:n,event_label:r,description:o,value:s,page_path:a};this.trackEventInternal(e,l)}trackNumeric(e,n){this.trackEvent(e,"",void 0,void 0,n)}getPath(e){return"/"+e.split("/").slice(3).join("/")}trackEventInternal(e,n){this.gtag&&this.gtag("event",e,X({},n))}static \u0275fac=function(n){return new(n||i)(Le(wS))};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var v8=function(i){return i.RefreshPage="refreshPage",i}(v8||{}),y8=(()=>{class i{init(){!hf&&new EventSource("/apistream/server_director").addEventListener("message",n=>{if(!n.data)return;let r=JSON.parse(n.data);switch(r.name){case v8.RefreshPage:kP(window.location,r.url);break;default:break}})}static \u0275fac=function(n){return new(n||i)};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var E0e=["modelSourceInput"],I0e=["modelGraphVisualizer"],T0e=()=>[];function D0e(i,t){if(i&1){let e=te();v(0,"div",16),ee(1,"welcome-card"),v(2,"div",24),H("click",function(){B(e);let r=I();return V(r.handleClickDismissWelcomeCard())}),v(3,"mat-icon"),M(4,"close"),y()()()}}function O0e(i,t){i&1&&(v(0,"div",17),ee(1,"mat-spinner",25),y())}function P0e(i,t){i&1&&(v(0,"div",18),ee(1,"model-source-input",null,1),y())}function R0e(i,t){i&1&&(v(0,"div",20),M(1,"The "),v(2,"a",26),M(3," Google Terms of Service "),y(),M(4," apply to your use of this offering "),y())}function A0e(i,t){if(i&1){let e=te();v(0,"model-graph-visualizer",27,2),H("titleClicked",function(){B(e);let r=I();return V(r.handleClickTitle())})("modelGraphProcessed",function(r){B(e);let o=I();return V(o.handleModelGraphProcessed(r))})("uiStateChanged",function(r){B(e);let o=I();return V(o.handleUiStateChanged(r))})("remoteNodeDataPathsChanged",function(r){B(e);let o=I();return V(o.handleRemoteNodeDataPathsChanged(r))})("syncNavigationModeChanged",function(r){B(e);let o=I();return V(o.handleSyncNavigationModeChanged(r))}),y()}if(i&2){let e=I();R("graphCollections",e.benchmark?pL(5,T0e):e.loadedGraphCollections())("benchmark",e.benchmark)("config",e.curConfig)("initialUiState",e.initialUiState)("nodeDataSources",e.remoteNodeDataPaths)}}var b8=(()=>{class i{dialog;extensionService;gaService;modelLoaderService;newVersionService;route;router;serverDirectorService;settingsService;snackBar;threejsService;urlService;modelSourceInput;modelGraphVisualizer;loadingExtensions;loadedGraphCollections;runningVersion=Ot(()=>this.newVersionService.info().runningVersion);initialUiState;dismissWelcomeCard=!1;dragOver=!1;benchmark=!1;remoteNodeDataPaths=[];remoteNodeDataTargetModels=[];syncNavigation;hasUploadedModels=et(!1);shareButtonTooltip=et("");remoteProcessedNodeDataTargetModels=new Set;constructor(e,n,r,o,s,a,l,c,d,u,h,p){this.dialog=e,this.extensionService=n,this.gaService=r,this.modelLoaderService=o,this.newVersionService=s,this.route=a,this.router=l,this.serverDirectorService=c,this.settingsService=d,this.snackBar=u,this.threejsService=h,this.urlService=p,this.serverDirectorService.init(),this.loadingExtensions=this.extensionService.loading,this.loadedGraphCollections=this.modelLoaderService.loadedGraphCollections,this.initialUiState=this.urlService.getUiState(),ct(()=>{this.extensionService.loading()||setTimeout(()=>{this.handleExtensionLoaded()})}),ct(()=>{this.loadedGraphCollections()!=null&&window.history.pushState({ts:Date.now()},"")});let f=new URLSearchParams(document.location.search);this.benchmark=f.get("benchmark")==="1",this.remoteNodeDataPaths=this.urlService.getNodeDataSources(),this.remoteNodeDataTargetModels=this.urlService.getNodeDataTargets(),this.syncNavigation=this.urlService.getSyncNavigation()}ngAfterViewInit(){this.modelSourceInput&&(this.hasUploadedModels=this.modelSourceInput.hasUploadedModels,this.shareButtonTooltip=Ot(()=>this.hasUploadedModels()?"Share is not available for uploaded models":"Share"))}handlePopState(e){this.loadedGraphCollections.set(void 0),this.initialUiState=void 0,setTimeout(()=>{this.router.navigate([],{queryParams:{},queryParamsHandling:"",replaceUrl:!0})})}handleDragOver(e){this.loadedGraphCollections()==null&&(this.dragOver=!0),e.preventDefault()}handleDragLeave(){this.dragOver=!1}handleDrop(e){e.preventDefault(),this.dragOver=!1;let n=[];e.dataTransfer?.items?Array.from(e.dataTransfer.items).forEach((r,o)=>{if(r.kind==="file"){let s=r.getAsFile();s&&n.push(s)}}):n.push(...Array.from(e.dataTransfer?.files||[])),this.modelSourceInput.addFiles(n)}handleClickTitle(e=!1){e?this.router.navigate(["/"]).then(()=>{window.location.reload()}):window.history.back()}handleClickSettings(){this.dialog.open(m8,{})}handleClickDismissWelcomeCard(){this.settingsService.saveBooleanValue(!1,No.SHOW_WELCOME_CARD)}handleUiStateChanged(e){this.urlService.setUiState(e)}handleModelGraphProcessed(e){let n=e.modelGraph.collectionLabel,r=this.remoteProcessedNodeDataTargetModels.has(n);if(this.remoteNodeDataPaths&&this.remoteNodeDataPaths.length>0&&!r){let o=[];for(let s=0;sn.trim()).filter(n=>n!==""&&(!e||e&&n!=="pseudo_const"&&n!=="pseudo_qconst")),artificialLayerNodeCountThreshold:this.settingsService.getNumberValue(yR),edgeLabelFontSize:this.settingsService.getNumberValue(bR),edgeColor:this.settingsService.getStringValue(xR),maxConstValueCount:this.settingsService.getNumberValue(_R),disallowVerticalEdgeLabels:this.settingsService.getBooleanValue(wR),enableSubgraphSelection:this.urlService.enableSubgraphSelection,enableExportToResource:this.urlService.enableExportToResource,keepLayersWithASingleChild:this.settingsService.getBooleanValue(CR),showOpNodeOutOfLayerEdgesWithoutSelecting:this.settingsService.getBooleanValue(SR)}}handleExtensionLoaded(){let e=this.urlService.getModels();e!=null&&e.length>0?this.modelSourceInput.startProcessingModelSource(e):this.initialUiState=void 0}static \u0275fac=function(n){return new(n||i)(q(Eu),q(yf),q(_8),q("ModelLoaderService"),q(nR),q(Al),q(vh),q(y8),q(vf),q(Os),q(Zi),q(xS))};static \u0275cmp=oe({type:i,selectors:[["home-page"]],viewQuery:function(n,r){if(n&1&&(Me(E0e,5),Me(I0e,5)),n&2){let o;_e(o=ve())&&(r.modelSourceInput=o.first),_e(o=ve())&&(r.modelGraphVisualizer=o.first)}},hostBindings:function(n,r){n&1&&H("popstate",function(s){return r.handlePopState(s)},!1,Yk)},standalone:!0,features:[se],decls:38,vars:12,consts:[["menu","matMenu"],["modelSourceInput",""],["modelGraphVisualizer",""],[1,"container",3,"dragover","dragleave","dragend","drop"],[1,"title"],[1,"name",3,"click"],[1,"icons-container"],["mat-icon-button","","aria-label","settings","matTooltip","Advanced settings",3,"click"],["href","https://github.com/google-ai-edge/model-explorer","target","_blank"],["mat-icon-button","","aria-label","doc","matTooltip","GitHub"],["href","https://github.com/google-ai-edge/model-explorer/issues","target","_blank"],["mat-icon-button","","aria-label","bug","matTooltip","File issue or feature request"],["mat-icon-button","","aria-label","about","matTooltip","About",3,"matMenuTriggerFor"],["mat-menu-item","",3,"click"],[1,"model-explorer-version"],[1,"content"],[1,"welcome-card-container"],[1,"loading-adapter-extension-container"],[1,"model-source-input-container"],[1,"padding"],[1,"utos"],[3,"graphCollections","benchmark","config","initialUiState","nodeDataSources","titleClicked","modelGraphProcessed","uiStateChanged","remoteNodeDataPathsChanged","syncNavigationModeChanged",4,"ngIf"],[1,"dragover-overlay"],[1,"msg"],["matTooltip","Dismiss",1,"icon-container",3,"click"],["color","primary","diameter","24"],["href","https://policies.google.com/terms?hl=en-US#toc-intro","target","_blank"],[3,"titleClicked","modelGraphProcessed","uiStateChanged","remoteNodeDataPathsChanged","syncNavigationModeChanged","graphCollections","benchmark","config","initialUiState","nodeDataSources"]],template:function(n,r){if(n&1){let o=te();v(0,"div",3),H("dragover",function(a){return B(o),V(r.handleDragOver(a))})("dragleave",function(){return B(o),V(r.handleDragLeave())})("dragend",function(){return B(o),V(r.handleDragLeave())})("drop",function(a){return B(o),V(r.handleDrop(a))}),v(1,"div",4)(2,"div",5),H("click",function(){return B(o),V(r.handleClickTitle(!0))}),ee(3,"me-logo"),M(4," Model Explorer "),ee(5,"new-version-chip"),y(),v(6,"div",6)(7,"button",7),H("click",function(){return B(o),V(r.handleClickSettings())}),v(8,"mat-icon"),M(9,"settings"),y()(),v(10,"a",8)(11,"button",9)(12,"mat-icon"),M(13,"article"),y()()(),v(14,"a",10)(15,"button",11)(16,"mat-icon"),M(17,"bug_report"),y()()(),v(18,"button",12)(19,"mat-icon"),M(20,"info_outline"),y()(),v(21,"mat-menu",null,0)(23,"button",13),H("click",function(){return B(o),V(r.handleClickShowThirdPartyLibraries())}),M(24," Open source libraries "),y(),v(25,"div",14),M(26),y()(),ee(27,"open-in-new-tab-button"),y()(),v(28,"div",15),W(29,D0e,5,0,"div",16)(30,O0e,2,0,"div",17)(31,P0e,3,0,"div",18),ee(32,"div",19),y(),W(33,R0e,5,0,"div",20)(34,A0e,2,6,"model-graph-visualizer",21),v(35,"div",22)(36,"div",23),M(37,"Drop to add model files"),y()()()}if(n&2){let o=fe(22);ne("dragover",r.dragOver),w(),ne("hide",r.loadedGraphCollections()!=null||r.benchmark),w(17),R("matMenuTriggerFor",o),w(8),we("v",r.runningVersion(),""),w(2),ne("hide",r.loadedGraphCollections()!=null||r.benchmark),w(),re(r.showWelcomeCard?29:-1),w(),re(r.loadingExtensions()?30:31),w(3),re(r.loadedGraphCollections()==null&&!r.benchmark?33:-1),w(),R("ngIf",r.loadedGraphCollections()!=null||r.benchmark)}},dependencies:[Oe,On,nf,vn,qo,ga,Je,dt,ca,is,Z_,yc,lo,pa,_5,$t,qn,_S,p8,lS,oS,g8],styles:[`.container[_ngcontent-%COMP%]{width:100%;height:100%;overflow:hidden;display:flex;flex-direction:column;position:relative}.container.dragover[_ngcontent-%COMP%] .dragover-overlay[_ngcontent-%COMP%]{display:flex}.container[_ngcontent-%COMP%] .dragover-overlay[_ngcontent-%COMP%]{display:none;position:absolute;left:0;top:0;width:100%;height:100%;background-color:#0000001a;pointer-events:none;flex-direction:column;align-items:center;justify-content:flex-end;z-index:500}.container[_ngcontent-%COMP%] .dragover-overlay[_ngcontent-%COMP%] .msg[_ngcontent-%COMP%]{margin-bottom:16px;color:#fff;padding:4px 12px;border-radius:99px;background-color:#4285f4}@keyframes _ngcontent-%COMP%_rotate{0%{transform:rotate(0)}30%{transform:rotate(180deg)}60%{transform:rotate(360deg)}to{transform:rotate(360deg)}}@keyframes _ngcontent-%COMP%_goUp{0%{transform:translateY(10%);opacity:0}30%{transform:translate(0);opacity:1}to{transform:translateY(-25%);opacity:0}}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%]{padding:8px 12px;box-sizing:border-box;height:48px;display:flex;align-items:center;justify-content:space-between;cursor:pointer;color:#444746;border-bottom:1px solid transparent}.container[_ngcontent-%COMP%] .title.hide[_ngcontent-%COMP%]{display:none}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%]{display:flex;align-items:center;font-size:20px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] me-logo[_ngcontent-%COMP%]{margin-right:6px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .name[_ngcontent-%COMP%] new-version-chip[_ngcontent-%COMP%]{margin-left:16px}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;color:#000}.container[_ngcontent-%COMP%] .title[_ngcontent-%COMP%] .icons-container[_ngcontent-%COMP%] open-in-new-tab-button[_ngcontent-%COMP%]{margin-left:8px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%]{flex-grow:1;display:flex;flex-direction:column;align-items:center;justify-content:flex-start;position:relative;margin-top:16px;overflow:hidden}.container[_ngcontent-%COMP%] .content.hide[_ngcontent-%COMP%]{display:none}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .welcome-card-container[_ngcontent-%COMP%]{width:1016px;flex-shrink:0;position:relative}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .welcome-card-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]{position:absolute;top:6px;right:6px;cursor:pointer;opacity:.5}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .welcome-card-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%]:hover{opacity:.8}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .welcome-card-container[_ngcontent-%COMP%] .icon-container[_ngcontent-%COMP%] mat-icon[_ngcontent-%COMP%]{font-size:16px;width:16px;height:16px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .loading-adapter-extension-container[_ngcontent-%COMP%]{margin-top:20px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .model-source-input-container[_ngcontent-%COMP%]{width:1016px;margin-top:20px;overflow:hidden;z-index:100;background-color:#fff}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .padding[_ngcontent-%COMP%]{width:100%;flex-grow:1;min-height:12px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .cover[_ngcontent-%COMP%]{position:absolute;top:0;left:0;width:100%;height:100%;z-index:5000;color:#333;background-color:#ffffffe6;-webkit-backdrop-filter:blur(10px);backdrop-filter:blur(10px);display:flex;flex-direction:column;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .cover[_ngcontent-%COMP%] .loading-subtitle[_ngcontent-%COMP%]{font-size:14px;color:#999;margin-top:20px}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .loading[_ngcontent-%COMP%] .wait-icon[_ngcontent-%COMP%]{display:inline-block;margin:0 8px;animation:_ngcontent-%COMP%_rotate 2s ease-in-out 0s infinite}.container[_ngcontent-%COMP%] .content[_ngcontent-%COMP%] .uploading[_ngcontent-%COMP%] .upload-icon[_ngcontent-%COMP%]{display:inline-block;margin:0 8px;animation:_ngcontent-%COMP%_goUp 1s ease-in-out 0s infinite}.container[_ngcontent-%COMP%] .utos[_ngcontent-%COMP%]{position:absolute;right:12px;bottom:12px;font-size:12px;color:#999}.container[_ngcontent-%COMP%] .utos[_ngcontent-%COMP%] a[_ngcontent-%COMP%]{color:#999}.container[_ngcontent-%COMP%] model-graph-visualizer[_ngcontent-%COMP%]{width:100%;height:100%}.container[_ngcontent-%COMP%] .bug-report[_ngcontent-%COMP%]{position:absolute;bottom:8px;left:8px;display:inline-block;display:flex;align-items:center;justify-content:center;color:#000;opacity:.5}.container[_ngcontent-%COMP%] .bug-report[_ngcontent-%COMP%]:hover{opacity:.8}.container[_ngcontent-%COMP%] .btns-container[_ngcontent-%COMP%]{display:flex;align-items:center}.container[_ngcontent-%COMP%] .btns-container[_ngcontent-%COMP%] .share-button-container[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center}.container[_ngcontent-%COMP%] .btns-container[_ngcontent-%COMP%] .divider[_ngcontent-%COMP%]{border-left:1px solid #ccc;height:28px;box-sizing:border-box;margin-left:8px;margin-right:8px} .model-explorer-version{font-size:12px;text-align:right;padding:8px 16px 0;color:#999} + + + + + + + + + + + + + + + + + +`]})}return i})();var N0e="/apipost/v1/upload",k0e="/api/v1/load_graphs_json",L0e="/api/v1/read_text_file",x8=(()=>{class i{settingsService;extensionService;loadedGraphCollections=et(void 0);constructor(e,n){this.settingsService=e,this.extensionService=n}loadModels(e){return Ct(this,null,function*(){let n=[];for(let o of e)(o.type===ai.LOCAL||o.type===ai.GRAPH_JSONS_FROM_SERVER||o.type===ai.FILE_PATH)&&n.push(this.loadModel(o));let r=yield Promise.all(n);for(let o of e)o.errorMessage!=null&&(o.errorMessage=y3(o.errorMessage));r.find(o=>o.length===0)==null&&this.loadedGraphCollections.set(r.flat())})}loadModel(e){return Ct(this,null,function*(){e.status.set(zn.PROCESSING);let n=[];if(e.type===ai.FILE_PATH)switch(e.selectedAdapter?.id){case Sc.JSON_LOADER:try{let s=yield this.readTextFile(e.path),a=e.path.split("/").pop()||"untitled",l=JSON.parse(s),c=tR(a,l);if(c.error)throw new Error(`Failed to process file: ${c.error})`);c.graphCollections&&(n=c.graphCollections),e.status.set(zn.DONE)}catch(s){e.selected=!1,e.status.set(zn.ERROR),e.errorMessage=s}break;default:let r=e.path,o=r.split("/").pop()||"untitled";n=yield this.sendConvertRequest(e,r,o,!1);break}else{let r=e.file;switch(e.selectedAdapter?.id){case Sc.JSON_LOADER:try{e.type===ai.GRAPH_JSONS_FROM_SERVER?(n=yield this.loadGraphsFromBackendGraphsJson(e.path),e.status.set(zn.DONE)):(n=yield gj(r),e.status.set(zn.DONE))}catch(a){e.selected=!1,e.status.set(zn.ERROR),e.errorMessage=a}break;default:e.status.set(zn.UPLOADING);let{path:o,error:s}=yield this.uploadModelFile(r);if(s)return e.selected=!1,e.status.set(zn.ERROR),e.errorMessage=s,[];n=yield this.sendConvertRequest(e,o,r.name,!0);break}}return n})}readTextFile(e){return Ct(this,null,function*(){let r=yield(yield fetch(`${L0e}?path=${e}`)).json();if(r.error)throw new Error(`Failed to read file: ${r.error}`);return r.content})}loadGraphsFromBackendGraphsJson(e){return Ct(this,null,function*(){let n=e.replace(bS,""),r=n.lastIndexOf("/"),o=n.substring(0,r),s=Number(n.substring(r+1)),l=yield(yield fetch(`${k0e}?graph_index=${s}`)).json();return this.processAdapterConvertResponse(l,o)})}uploadModelFile(e){return Ct(this,null,function*(){let n=new FormData;n.append("file",e,e.name);let r=yield fetch(N0e,{method:"POST",body:n});return r.ok?{path:JSON.parse(yield r.text()).path}:(console.error(yield r.text()),{path:"",error:"Failed to upload model. Check console for details"})})}sendConvertRequest(e,n,r,o){return Ct(this,null,function*(){let s=[];e.status.set(zn.PROCESSING);let a={cmdId:"convert",extensionId:e.selectedAdapter?.id||"",modelPath:n,settings:this.settingsService.getAllSettingsValues(),deleteAfterConversion:o},{cmdResp:l,otherError:c}=yield this.extensionService.sendCommandToExtension(a),d=l?.error||c;return d?(e.selected=!1,e.status.set(zn.ERROR),e.errorMessage=d,[]):(l&&(s=this.processAdapterConvertResponse(l,r)),e.status.set(zn.DONE),s)})}processAdapterConvertResponse(e,n){return e.graphs?[{label:n,graphs:e.graphs}]:e.graphCollections?e.graphCollections.map(r=>({label:r.label===""?n:`${n} (${r.label})`,graphs:r.graphs})):[]}static \u0275fac=function(n){return new(n||i)(Le(vf),Le(yf))};static \u0275prov=J({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var F0e=[{path:"",component:b8},{path:"demo",component:i8}],w8={providers:[mL({eventCoalescing:!0}),AF(F0e),f3(),{provide:"ModelLoaderService",useClass:x8},{provide:wS,useValue:window}]};XL(kF,w8).catch(i=>console.error(i)); diff --git a/src/server/package/src/model_explorer/web_app/polyfills-FFHMD2TL.js b/src/server/package/src/model_explorer/web_app/polyfills-FFHMD2TL.js new file mode 100644 index 00000000..b01b7911 --- /dev/null +++ b/src/server/package/src/model_explorer/web_app/polyfills-FFHMD2TL.js @@ -0,0 +1,2 @@ +var ce=globalThis;function te(e){return(ce.__Zone_symbol_prefix||"__zone_symbol__")+e}function dt(){let e=ce.performance;function n(M){e&&e.mark&&e.mark(M)}function a(M,s){e&&e.measure&&e.measure(M,s)}n("Zone");class t{static{this.__symbol__=te}static assertZonePatched(){if(ce.Promise!==S.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let s=t.current;for(;s.parent;)s=s.parent;return s}static get current(){return b.zone}static get currentTask(){return D}static __load_patch(s,i,o=!1){if(S.hasOwnProperty(s)){let g=ce[te("forceDuplicateZoneCheck")]===!0;if(!o&&g)throw Error("Already loaded patch: "+s)}else if(!ce["__Zone_disable_"+s]){let g="Zone:"+s;n(g),S[s]=i(ce,t,w),a(g,g)}}get parent(){return this._parent}get name(){return this._name}constructor(s,i){this._parent=s,this._name=i?i.name||"unnamed":"",this._properties=i&&i.properties||{},this._zoneDelegate=new f(this,this._parent&&this._parent._zoneDelegate,i)}get(s){let i=this.getZoneWith(s);if(i)return i._properties[s]}getZoneWith(s){let i=this;for(;i;){if(i._properties.hasOwnProperty(s))return i;i=i._parent}return null}fork(s){if(!s)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,s)}wrap(s,i){if(typeof s!="function")throw new Error("Expecting function got: "+s);let o=this._zoneDelegate.intercept(this,s,i),g=this;return function(){return g.runGuarded(o,this,arguments,i)}}run(s,i,o,g){b={parent:b,zone:this};try{return this._zoneDelegate.invoke(this,s,i,o,g)}finally{b=b.parent}}runGuarded(s,i=null,o,g){b={parent:b,zone:this};try{try{return this._zoneDelegate.invoke(this,s,i,o,g)}catch(V){if(this._zoneDelegate.handleError(this,V))throw V}}finally{b=b.parent}}runTask(s,i,o){if(s.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(s.zone||J).name+"; Execution: "+this.name+")");let g=s,{type:V,data:{isPeriodic:ee=!1,isRefreshable:Z=!1}={}}=s;if(s.state===q&&(V===z||V===y))return;let he=s.state!=A;he&&g._transitionTo(A,d);let _e=D;D=g,b={parent:b,zone:this};try{V==y&&s.data&&!ee&&!Z&&(s.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,g,i,o)}catch(Q){if(this._zoneDelegate.handleError(this,Q))throw Q}}finally{let Q=s.state;if(Q!==q&&Q!==X)if(V==z||ee||Z&&Q===k)he&&g._transitionTo(d,A,k);else{let Ee=g._zoneDelegates;this._updateTaskCount(g,-1),he&&g._transitionTo(q,A,q),Z&&(g._zoneDelegates=Ee)}b=b.parent,D=_e}}scheduleTask(s){if(s.zone&&s.zone!==this){let o=this;for(;o;){if(o===s.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${s.zone.name}`);o=o.parent}}s._transitionTo(k,q);let i=[];s._zoneDelegates=i,s._zone=this;try{s=this._zoneDelegate.scheduleTask(this,s)}catch(o){throw s._transitionTo(X,k,q),this._zoneDelegate.handleError(this,o),o}return s._zoneDelegates===i&&this._updateTaskCount(s,1),s.state==k&&s._transitionTo(d,k),s}scheduleMicroTask(s,i,o,g){return this.scheduleTask(new E(G,s,i,o,g,void 0))}scheduleMacroTask(s,i,o,g,V){return this.scheduleTask(new E(y,s,i,o,g,V))}scheduleEventTask(s,i,o,g,V){return this.scheduleTask(new E(z,s,i,o,g,V))}cancelTask(s){if(s.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(s.zone||J).name+"; Execution: "+this.name+")");if(!(s.state!==d&&s.state!==A)){s._transitionTo(x,d,A);try{this._zoneDelegate.cancelTask(this,s)}catch(i){throw s._transitionTo(X,x),this._zoneDelegate.handleError(this,i),i}return this._updateTaskCount(s,-1),s._transitionTo(q,x),s.runCount=-1,s}}_updateTaskCount(s,i){let o=s._zoneDelegates;i==-1&&(s._zoneDelegates=null);for(let g=0;gM.hasTask(i,o),onScheduleTask:(M,s,i,o)=>M.scheduleTask(i,o),onInvokeTask:(M,s,i,o,g,V)=>M.invokeTask(i,o,g,V),onCancelTask:(M,s,i,o)=>M.cancelTask(i,o)};class f{get zone(){return this._zone}constructor(s,i,o){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this._zone=s,this._parentDelegate=i,this._forkZS=o&&(o&&o.onFork?o:i._forkZS),this._forkDlgt=o&&(o.onFork?i:i._forkDlgt),this._forkCurrZone=o&&(o.onFork?this._zone:i._forkCurrZone),this._interceptZS=o&&(o.onIntercept?o:i._interceptZS),this._interceptDlgt=o&&(o.onIntercept?i:i._interceptDlgt),this._interceptCurrZone=o&&(o.onIntercept?this._zone:i._interceptCurrZone),this._invokeZS=o&&(o.onInvoke?o:i._invokeZS),this._invokeDlgt=o&&(o.onInvoke?i:i._invokeDlgt),this._invokeCurrZone=o&&(o.onInvoke?this._zone:i._invokeCurrZone),this._handleErrorZS=o&&(o.onHandleError?o:i._handleErrorZS),this._handleErrorDlgt=o&&(o.onHandleError?i:i._handleErrorDlgt),this._handleErrorCurrZone=o&&(o.onHandleError?this._zone:i._handleErrorCurrZone),this._scheduleTaskZS=o&&(o.onScheduleTask?o:i._scheduleTaskZS),this._scheduleTaskDlgt=o&&(o.onScheduleTask?i:i._scheduleTaskDlgt),this._scheduleTaskCurrZone=o&&(o.onScheduleTask?this._zone:i._scheduleTaskCurrZone),this._invokeTaskZS=o&&(o.onInvokeTask?o:i._invokeTaskZS),this._invokeTaskDlgt=o&&(o.onInvokeTask?i:i._invokeTaskDlgt),this._invokeTaskCurrZone=o&&(o.onInvokeTask?this._zone:i._invokeTaskCurrZone),this._cancelTaskZS=o&&(o.onCancelTask?o:i._cancelTaskZS),this._cancelTaskDlgt=o&&(o.onCancelTask?i:i._cancelTaskDlgt),this._cancelTaskCurrZone=o&&(o.onCancelTask?this._zone:i._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;let g=o&&o.onHasTask,V=i&&i._hasTaskZS;(g||V)&&(this._hasTaskZS=g?o:c,this._hasTaskDlgt=i,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,o.onScheduleTask||(this._scheduleTaskZS=c,this._scheduleTaskDlgt=i,this._scheduleTaskCurrZone=this._zone),o.onInvokeTask||(this._invokeTaskZS=c,this._invokeTaskDlgt=i,this._invokeTaskCurrZone=this._zone),o.onCancelTask||(this._cancelTaskZS=c,this._cancelTaskDlgt=i,this._cancelTaskCurrZone=this._zone))}fork(s,i){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,s,i):new t(s,i)}intercept(s,i,o){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,s,i,o):i}invoke(s,i,o,g,V){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,s,i,o,g,V):i.apply(o,g)}handleError(s,i){return this._handleErrorZS?this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,s,i):!0}scheduleTask(s,i){let o=i;if(this._scheduleTaskZS)this._hasTaskZS&&o._zoneDelegates.push(this._hasTaskDlgtOwner),o=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,s,i),o||(o=i);else if(i.scheduleFn)i.scheduleFn(i);else if(i.type==G)U(i);else throw new Error("Task is missing scheduleFn.");return o}invokeTask(s,i,o,g){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,s,i,o,g):i.callback.apply(o,g)}cancelTask(s,i){let o;if(this._cancelTaskZS)o=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,s,i);else{if(!i.cancelFn)throw Error("Task is not cancelable");o=i.cancelFn(i)}return o}hasTask(s,i){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,s,i)}catch(o){this.handleError(s,o)}}_updateTaskCount(s,i){let o=this._taskCounts,g=o[s],V=o[s]=g+i;if(V<0)throw new Error("More tasks executed then were scheduled.");if(g==0||V==0){let ee={microTask:o.microTask>0,macroTask:o.macroTask>0,eventTask:o.eventTask>0,change:s};this.hasTask(this._zone,ee)}}}class E{constructor(s,i,o,g,V,ee){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=s,this.source=i,this.data=g,this.scheduleFn=V,this.cancelFn=ee,!o)throw new Error("callback is not defined");this.callback=o;let Z=this;s===z&&g&&g.useG?this.invoke=E.invokeTask:this.invoke=function(){return E.invokeTask.call(ce,Z,this,arguments)}}static invokeTask(s,i,o){s||(s=this),K++;try{return s.runCount++,s.zone.runTask(s,i,o)}finally{K==1&&$(),K--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(q,k)}_transitionTo(s,i,o){if(this._state===i||this._state===o)this._state=s,s==q&&(this._zoneDelegates=null);else throw new Error(`${this.type} '${this.source}': can not transition to '${s}', expecting state '${i}'${o?" or '"+o+"'":""}, was '${this._state}'.`)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}let T=te("setTimeout"),p=te("Promise"),C=te("then"),_=[],P=!1,I;function H(M){if(I||ce[p]&&(I=ce[p].resolve(0)),I){let s=I[C];s||(s=I.then),s.call(I,M)}else ce[T](M,0)}function U(M){K===0&&_.length===0&&H($),M&&_.push(M)}function $(){if(!P){for(P=!0;_.length;){let M=_;_=[];for(let s=0;sb,onUnhandledError:W,microtaskDrainDone:W,scheduleMicroTask:U,showUncaughtError:()=>!t[te("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:W,patchMethod:()=>W,bindArguments:()=>[],patchThen:()=>W,patchMacroTask:()=>W,patchEventPrototype:()=>W,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>W,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>W,wrapWithCurrentZone:()=>W,filterProperties:()=>[],attachOriginToPatched:()=>W,_redefineProperty:()=>W,patchCallbacks:()=>W,nativeScheduleMicroTask:H},b={parent:null,zone:new t(null,null)},D=null,K=0;function W(){}return a("Zone","Zone"),t}function _t(){let e=globalThis,n=e[te("forceDuplicateZoneCheck")]===!0;if(e.Zone&&(n||typeof e.Zone.__symbol__!="function"))throw new Error("Zone already loaded.");return e.Zone??=dt(),e.Zone}var be=Object.getOwnPropertyDescriptor,Ae=Object.defineProperty,je=Object.getPrototypeOf,Et=Object.create,Tt=Array.prototype.slice,He="addEventListener",xe="removeEventListener",Le=te(He),Ie=te(xe),ae="true",le="false",Pe=te("");function Ve(e,n){return Zone.current.wrap(e,n)}function Ge(e,n,a,t,c){return Zone.current.scheduleMacroTask(e,n,a,t,c)}var j=te,De=typeof window<"u",pe=De?window:void 0,Y=De&&pe||globalThis,gt="removeAttribute";function Fe(e,n){for(let a=e.length-1;a>=0;a--)typeof e[a]=="function"&&(e[a]=Ve(e[a],n+"_"+a));return e}function yt(e,n){let a=e.constructor.name;for(let t=0;t{let p=function(){return T.apply(this,Fe(arguments,a+"."+c))};return fe(p,T),p})(f)}}}function tt(e){return e?e.writable===!1?!1:!(typeof e.get=="function"&&typeof e.set>"u"):!0}var nt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,Se=!("nw"in Y)&&typeof Y.process<"u"&&Y.process.toString()==="[object process]",Be=!Se&&!nt&&!!(De&&pe.HTMLElement),rt=typeof Y.process<"u"&&Y.process.toString()==="[object process]"&&!nt&&!!(De&&pe.HTMLElement),Ce={},mt=j("enable_beforeunload"),Ye=function(e){if(e=e||Y.event,!e)return;let n=Ce[e.type];n||(n=Ce[e.type]=j("ON_PROPERTY"+e.type));let a=this||e.target||Y,t=a[n],c;if(Be&&a===pe&&e.type==="error"){let f=e;c=t&&t.call(this,f.message,f.filename,f.lineno,f.colno,f.error),c===!0&&e.preventDefault()}else c=t&&t.apply(this,arguments),e.type==="beforeunload"&&Y[mt]&&typeof c=="string"?e.returnValue=c:c!=null&&!c&&e.preventDefault();return c};function $e(e,n,a){let t=be(e,n);if(!t&&a&&be(a,n)&&(t={enumerable:!0,configurable:!0}),!t||!t.configurable)return;let c=j("on"+n+"patched");if(e.hasOwnProperty(c)&&e[c])return;delete t.writable,delete t.value;let f=t.get,E=t.set,T=n.slice(2),p=Ce[T];p||(p=Ce[T]=j("ON_PROPERTY"+T)),t.set=function(C){let _=this;if(!_&&e===Y&&(_=Y),!_)return;typeof _[p]=="function"&&_.removeEventListener(T,Ye),E&&E.call(_,null),_[p]=C,typeof C=="function"&&_.addEventListener(T,Ye,!1)},t.get=function(){let C=this;if(!C&&e===Y&&(C=Y),!C)return null;let _=C[p];if(_)return _;if(f){let P=f.call(this);if(P)return t.set.call(this,P),typeof C[gt]=="function"&&C.removeAttribute(n),P}return null},Ae(e,n,t),e[c]=!0}function ot(e,n,a){if(n)for(let t=0;tfunction(E,T){let p=a(E,T);return p.cbIdx>=0&&typeof T[p.cbIdx]=="function"?Ge(p.name,T[p.cbIdx],p,c):f.apply(E,T)})}function fe(e,n){e[j("OriginalDelegate")]=n}var Je=!1,Me=!1;function kt(){try{let e=pe.navigator.userAgent;if(e.indexOf("MSIE ")!==-1||e.indexOf("Trident/")!==-1)return!0}catch{}return!1}function vt(){if(Je)return Me;Je=!0;try{let e=pe.navigator.userAgent;(e.indexOf("MSIE ")!==-1||e.indexOf("Trident/")!==-1||e.indexOf("Edge/")!==-1)&&(Me=!0)}catch{}return Me}function Ke(e){return typeof e=="function"}function Qe(e){return typeof e=="number"}var me=!1;if(typeof window<"u")try{let e=Object.defineProperty({},"passive",{get:function(){me=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch{me=!1}var bt={useG:!0},ne={},st={},it=new RegExp("^"+Pe+"(\\w+)(true|false)$"),ct=j("propagationStopped");function at(e,n){let a=(n?n(e):e)+le,t=(n?n(e):e)+ae,c=Pe+a,f=Pe+t;ne[e]={},ne[e][le]=c,ne[e][ae]=f}function Pt(e,n,a,t){let c=t&&t.add||He,f=t&&t.rm||xe,E=t&&t.listeners||"eventListeners",T=t&&t.rmAll||"removeAllListeners",p=j(c),C="."+c+":",_="prependListener",P="."+_+":",I=function(k,d,A){if(k.isRemoved)return;let x=k.callback;typeof x=="object"&&x.handleEvent&&(k.callback=y=>x.handleEvent(y),k.originalDelegate=x);let X;try{k.invoke(k,d,[A])}catch(y){X=y}let G=k.options;if(G&&typeof G=="object"&&G.once){let y=k.originalDelegate?k.originalDelegate:k.callback;d[f].call(d,A.type,y,G)}return X};function H(k,d,A){if(d=d||e.event,!d)return;let x=k||d.target||e,X=x[ne[d.type][A?ae:le]];if(X){let G=[];if(X.length===1){let y=I(X[0],x,d);y&&G.push(y)}else{let y=X.slice();for(let z=0;z{throw z})}}}let U=function(k){return H(this,k,!1)},$=function(k){return H(this,k,!0)};function J(k,d){if(!k)return!1;let A=!0;d&&d.useG!==void 0&&(A=d.useG);let x=d&&d.vh,X=!0;d&&d.chkDup!==void 0&&(X=d.chkDup);let G=!1;d&&d.rt!==void 0&&(G=d.rt);let y=k;for(;y&&!y.hasOwnProperty(c);)y=je(y);if(!y&&k[c]&&(y=k),!y||y[p])return!1;let z=d&&d.eventNameToString,S={},w=y[p]=y[c],b=y[j(f)]=y[f],D=y[j(E)]=y[E],K=y[j(T)]=y[T],W;d&&d.prepend&&(W=y[j(d.prepend)]=y[d.prepend]);function M(r,u){return!me&&typeof r=="object"&&r?!!r.capture:!me||!u?r:typeof r=="boolean"?{capture:r,passive:!0}:r?typeof r=="object"&&r.passive!==!1?{...r,passive:!0}:r:{passive:!0}}let s=function(r){if(!S.isExisting)return w.call(S.target,S.eventName,S.capture?$:U,S.options)},i=function(r){if(!r.isRemoved){let u=ne[r.eventName],v;u&&(v=u[r.capture?ae:le]);let R=v&&r.target[v];if(R){for(let m=0;mre.zone.cancelTask(re);r.call(Te,"abort",ie,{once:!0}),re.removeAbortListener=()=>Te.removeEventListener("abort",ie)}if(S.target=null,ke&&(ke.taskData=null),Ue&&(S.options.once=!0),!me&&typeof re.options=="boolean"||(re.options=se),re.target=N,re.capture=Oe,re.eventName=L,B&&(re.originalDelegate=F),O?ge.unshift(re):ge.push(re),m)return N}};return y[c]=l(w,C,ee,Z,G),W&&(y[_]=l(W,P,g,Z,G,!0)),y[f]=function(){let r=this||e,u=arguments[0];d&&d.transferEventName&&(u=d.transferEventName(u));let v=arguments[2],R=v?typeof v=="boolean"?!0:v.capture:!1,m=arguments[1];if(!m)return b.apply(this,arguments);if(x&&!x(b,m,r,arguments))return;let O=ne[u],N;O&&(N=O[R?ae:le]);let L=N&&r[N];if(L)for(let F=0;Ffunction(c,f){c[ct]=!0,t&&t.apply(c,f)})}function Rt(e,n){n.patchMethod(e,"queueMicrotask",a=>function(t,c){Zone.current.scheduleMicroTask("queueMicrotask",c[0])})}var Re=j("zoneTask");function ye(e,n,a,t){let c=null,f=null;n+=t,a+=t;let E={};function T(C){let _=C.data;_.args[0]=function(){return C.invoke.apply(this,arguments)};let P=c.apply(e,_.args);return Qe(P)?_.handleId=P:(_.handle=P,_.isRefreshable=Ke(P.refresh)),C}function p(C){let{handle:_,handleId:P}=C.data;return f.call(e,_??P)}c=ue(e,n,C=>function(_,P){if(Ke(P[0])){let I={isRefreshable:!1,isPeriodic:t==="Interval",delay:t==="Timeout"||t==="Interval"?P[1]||0:void 0,args:P},H=P[0];P[0]=function(){try{return H.apply(this,arguments)}finally{let{handle:A,handleId:x,isPeriodic:X,isRefreshable:G}=I;!X&&!G&&(x?delete E[x]:A&&(A[Re]=null))}};let U=Ge(n,P[0],I,T,p);if(!U)return U;let{handleId:$,handle:J,isRefreshable:q,isPeriodic:k}=U.data;if($)E[$]=U;else if(J&&(J[Re]=U,q&&!k)){let d=J.refresh;J.refresh=function(){let{zone:A,state:x}=U;return x==="notScheduled"?(U._state="scheduled",A._updateTaskCount(U,1)):x==="running"&&(U._state="scheduling"),d.call(this)}}return J??$??U}else return C.apply(e,P)}),f=ue(e,a,C=>function(_,P){let I=P[0],H;Qe(I)?(H=E[I],delete E[I]):(H=I?.[Re],H?I[Re]=null:H=I),H?.type?H.cancelFn&&H.zone.cancelTask(H):C.apply(e,P)})}function Ct(e,n){let{isBrowser:a,isMix:t}=n.getGlobalObjects();if(!a&&!t||!e.customElements||!("customElements"in e))return;let c=["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"];n.patchCallbacks(n,e.customElements,"customElements","define",c)}function Dt(e,n){if(Zone[n.symbol("patchEventTarget")])return;let{eventNames:a,zoneSymbolEventNames:t,TRUE_STR:c,FALSE_STR:f,ZONE_SYMBOL_PREFIX:E}=n.getGlobalObjects();for(let p=0;pf.target===e);if(!t||t.length===0)return n;let c=t[0].ignoreProperties;return n.filter(f=>c.indexOf(f)===-1)}function et(e,n,a,t){if(!e)return;let c=ut(e,n,a);ot(e,c,t)}function Ze(e){return Object.getOwnPropertyNames(e).filter(n=>n.startsWith("on")&&n.length>2).map(n=>n.substring(2))}function Ot(e,n){if(Se&&!rt||Zone[e.symbol("patchEvents")])return;let a=n.__Zone_ignore_on_properties,t=[];if(Be){let c=window;t=t.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);let f=kt()?[{target:c,ignoreProperties:["error"]}]:[];et(c,Ze(c),a&&a.concat(f),je(c))}t=t.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let c=0;c{let a=n[e.__symbol__("legacyPatch")];a&&a()}),e.__load_patch("timers",n=>{let a="set",t="clear";ye(n,a,t,"Timeout"),ye(n,a,t,"Interval"),ye(n,a,t,"Immediate")}),e.__load_patch("requestAnimationFrame",n=>{ye(n,"request","cancel","AnimationFrame"),ye(n,"mozRequest","mozCancel","AnimationFrame"),ye(n,"webkitRequest","webkitCancel","AnimationFrame")}),e.__load_patch("blocking",(n,a)=>{let t=["alert","prompt","confirm"];for(let c=0;cfunction(C,_){return a.current.run(E,n,_,p)})}}),e.__load_patch("EventTarget",(n,a,t)=>{St(n,t),Dt(n,t);let c=n.XMLHttpRequestEventTarget;c&&c.prototype&&t.patchEventTarget(n,t,[c.prototype])}),e.__load_patch("MutationObserver",(n,a,t)=>{ve("MutationObserver"),ve("WebKitMutationObserver")}),e.__load_patch("IntersectionObserver",(n,a,t)=>{ve("IntersectionObserver")}),e.__load_patch("FileReader",(n,a,t)=>{ve("FileReader")}),e.__load_patch("on_property",(n,a,t)=>{Ot(t,n)}),e.__load_patch("customElements",(n,a,t)=>{Ct(n,t)}),e.__load_patch("XHR",(n,a)=>{C(n);let t=j("xhrTask"),c=j("xhrSync"),f=j("xhrListener"),E=j("xhrScheduled"),T=j("xhrURL"),p=j("xhrErrorBeforeScheduled");function C(_){let P=_.XMLHttpRequest;if(!P)return;let I=P.prototype;function H(w){return w[t]}let U=I[Le],$=I[Ie];if(!U){let w=_.XMLHttpRequestEventTarget;if(w){let b=w.prototype;U=b[Le],$=b[Ie]}}let J="readystatechange",q="scheduled";function k(w){let b=w.data,D=b.target;D[E]=!1,D[p]=!1;let K=D[f];U||(U=D[Le],$=D[Ie]),K&&$.call(D,J,K);let W=D[f]=()=>{if(D.readyState===D.DONE)if(!b.aborted&&D[E]&&w.state===q){let s=D[a.__symbol__("loadfalse")];if(D.status!==0&&s&&s.length>0){let i=w.invoke;w.invoke=function(){let o=D[a.__symbol__("loadfalse")];for(let g=0;gfunction(w,b){return w[c]=b[2]==!1,w[T]=b[1],x.apply(w,b)}),X="XMLHttpRequest.send",G=j("fetchTaskAborting"),y=j("fetchTaskScheduling"),z=ue(I,"send",()=>function(w,b){if(a.current[y]===!0||w[c])return z.apply(w,b);{let D={target:w,url:w[T],isPeriodic:!1,args:b,aborted:!1},K=Ge(X,d,D,k,A);w&&w[p]===!0&&!D.aborted&&K.state===q&&K.invoke()}}),S=ue(I,"abort",()=>function(w,b){let D=H(w);if(D&&typeof D.type=="string"){if(D.cancelFn==null||D.data&&D.data.aborted)return;D.zone.cancelTask(D)}else if(a.current[G]===!0)return S.apply(w,b)})}}),e.__load_patch("geolocation",n=>{n.navigator&&n.navigator.geolocation&&yt(n.navigator.geolocation,["getCurrentPosition","watchPosition"])}),e.__load_patch("PromiseRejectionEvent",(n,a)=>{function t(c){return function(f){lt(n,c).forEach(T=>{let p=n.PromiseRejectionEvent;if(p){let C=new p(c,{promise:f.promise,reason:f.rejection});T.invoke(C)}})}}n.PromiseRejectionEvent&&(a[j("unhandledPromiseRejectionHandler")]=t("unhandledrejection"),a[j("rejectionHandledHandler")]=t("rejectionhandled"))}),e.__load_patch("queueMicrotask",(n,a,t)=>{Rt(n,t)})}function Lt(e){e.__load_patch("ZoneAwarePromise",(n,a,t)=>{let c=Object.getOwnPropertyDescriptor,f=Object.defineProperty;function E(h){if(h&&h.toString===Object.prototype.toString){let l=h.constructor&&h.constructor.name;return(l||"")+": "+JSON.stringify(h)}return h?h.toString():Object.prototype.toString.call(h)}let T=t.symbol,p=[],C=n[T("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")]!==!1,_=T("Promise"),P=T("then"),I="__creationTrace__";t.onUnhandledError=h=>{if(t.showUncaughtError()){let l=h&&h.rejection;l?console.error("Unhandled Promise rejection:",l instanceof Error?l.message:l,"; Zone:",h.zone.name,"; Task:",h.task&&h.task.source,"; Value:",l,l instanceof Error?l.stack:void 0):console.error(h)}},t.microtaskDrainDone=()=>{for(;p.length;){let h=p.shift();try{h.zone.runGuarded(()=>{throw h.throwOriginal?h.rejection:h})}catch(l){U(l)}}};let H=T("unhandledPromiseRejectionHandler");function U(h){t.onUnhandledError(h);try{let l=a[H];typeof l=="function"&&l.call(this,h)}catch{}}function $(h){return h&&h.then}function J(h){return h}function q(h){return Z.reject(h)}let k=T("state"),d=T("value"),A=T("finally"),x=T("parentPromiseValue"),X=T("parentPromiseState"),G="Promise.then",y=null,z=!0,S=!1,w=0;function b(h,l){return r=>{try{M(h,l,r)}catch(u){M(h,!1,u)}}}let D=function(){let h=!1;return function(r){return function(){h||(h=!0,r.apply(null,arguments))}}},K="Promise resolved with itself",W=T("currentTaskTrace");function M(h,l,r){let u=D();if(h===r)throw new TypeError(K);if(h[k]===y){let v=null;try{(typeof r=="object"||typeof r=="function")&&(v=r&&r.then)}catch(R){return u(()=>{M(h,!1,R)})(),h}if(l!==S&&r instanceof Z&&r.hasOwnProperty(k)&&r.hasOwnProperty(d)&&r[k]!==y)i(r),M(h,r[k],r[d]);else if(l!==S&&typeof v=="function")try{v.call(r,u(b(h,l)),u(b(h,!1)))}catch(R){u(()=>{M(h,!1,R)})()}else{h[k]=l;let R=h[d];if(h[d]=r,h[A]===A&&l===z&&(h[k]=h[X],h[d]=h[x]),l===S&&r instanceof Error){let m=a.currentTask&&a.currentTask.data&&a.currentTask.data[I];m&&f(r,W,{configurable:!0,enumerable:!1,writable:!0,value:m})}for(let m=0;m{try{let O=h[d],N=!!r&&A===r[A];N&&(r[x]=O,r[X]=R);let L=l.run(m,void 0,N&&m!==q&&m!==J?[]:[O]);M(r,!0,L)}catch(O){M(r,!1,O)}},r)}let g="function ZoneAwarePromise() { [native code] }",V=function(){},ee=n.AggregateError;class Z{static toString(){return g}static resolve(l){return l instanceof Z?l:M(new this(null),z,l)}static reject(l){return M(new this(null),S,l)}static withResolvers(){let l={};return l.promise=new Z((r,u)=>{l.resolve=r,l.reject=u}),l}static any(l){if(!l||typeof l[Symbol.iterator]!="function")return Promise.reject(new ee([],"All promises were rejected"));let r=[],u=0;try{for(let m of l)u++,r.push(Z.resolve(m))}catch{return Promise.reject(new ee([],"All promises were rejected"))}if(u===0)return Promise.reject(new ee([],"All promises were rejected"));let v=!1,R=[];return new Z((m,O)=>{for(let N=0;N{v||(v=!0,m(L))},L=>{R.push(L),u--,u===0&&(v=!0,O(new ee(R,"All promises were rejected")))})})}static race(l){let r,u,v=new this((O,N)=>{r=O,u=N});function R(O){r(O)}function m(O){u(O)}for(let O of l)$(O)||(O=this.resolve(O)),O.then(R,m);return v}static all(l){return Z.allWithCallback(l)}static allSettled(l){return(this&&this.prototype instanceof Z?this:Z).allWithCallback(l,{thenCallback:u=>({status:"fulfilled",value:u}),errorCallback:u=>({status:"rejected",reason:u})})}static allWithCallback(l,r){let u,v,R=new this((L,F)=>{u=L,v=F}),m=2,O=0,N=[];for(let L of l){$(L)||(L=this.resolve(L));let F=O;try{L.then(B=>{N[F]=r?r.thenCallback(B):B,m--,m===0&&u(N)},B=>{r?(N[F]=r.errorCallback(B),m--,m===0&&u(N)):v(B)})}catch(B){v(B)}m++,O++}return m-=2,m===0&&u(N),R}constructor(l){let r=this;if(!(r instanceof Z))throw new Error("Must be an instanceof Promise.");r[k]=y,r[d]=[];try{let u=D();l&&l(u(b(r,z)),u(b(r,S)))}catch(u){M(r,!1,u)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return Z}then(l,r){let u=this.constructor?.[Symbol.species];(!u||typeof u!="function")&&(u=this.constructor||Z);let v=new u(V),R=a.current;return this[k]==y?this[d].push(R,v,l,r):o(this,R,v,l,r),v}catch(l){return this.then(null,l)}finally(l){let r=this.constructor?.[Symbol.species];(!r||typeof r!="function")&&(r=Z);let u=new r(V);u[A]=A;let v=a.current;return this[k]==y?this[d].push(v,u,l,l):o(this,v,u,l,l),u}}Z.resolve=Z.resolve,Z.reject=Z.reject,Z.race=Z.race,Z.all=Z.all;let he=n[_]=n.Promise;n.Promise=Z;let _e=T("thenPatched");function Q(h){let l=h.prototype,r=c(l,"then");if(r&&(r.writable===!1||!r.configurable))return;let u=l.then;l[P]=u,h.prototype.then=function(v,R){return new Z((O,N)=>{u.call(this,O,N)}).then(v,R)},h[_e]=!0}t.patchThen=Q;function Ee(h){return function(l,r){let u=h.apply(l,r);if(u instanceof Z)return u;let v=u.constructor;return v[_e]||Q(v),u}}return he&&(Q(he),ue(n,"fetch",h=>Ee(h))),Promise[a.__symbol__("uncaughtPromiseErrors")]=p,Z})}function It(e){e.__load_patch("toString",n=>{let a=Function.prototype.toString,t=j("OriginalDelegate"),c=j("Promise"),f=j("Error"),E=function(){if(typeof this=="function"){let _=this[t];if(_)return typeof _=="function"?a.call(_):Object.prototype.toString.call(_);if(this===Promise){let P=n[c];if(P)return a.call(P)}if(this===Error){let P=n[f];if(P)return a.call(P)}}return a.call(this)};E[t]=a,Function.prototype.toString=E;let T=Object.prototype.toString,p="[object Promise]";Object.prototype.toString=function(){return typeof Promise=="function"&&this instanceof Promise?p:T.call(this)}})}function Mt(e,n,a,t,c){let f=Zone.__symbol__(t);if(n[f])return;let E=n[f]=n[t];n[t]=function(T,p,C){return p&&p.prototype&&c.forEach(function(_){let P=`${a}.${t}::`+_,I=p.prototype;try{if(I.hasOwnProperty(_)){let H=e.ObjectGetOwnPropertyDescriptor(I,_);H&&H.value?(H.value=e.wrapWithCurrentZone(H.value,P),e._redefineProperty(p.prototype,_,H)):I[_]&&(I[_]=e.wrapWithCurrentZone(I[_],P))}else I[_]&&(I[_]=e.wrapWithCurrentZone(I[_],P))}catch{}}),E.call(n,T,p,C)},e.attachOriginToPatched(n[t],E)}function Zt(e){e.__load_patch("util",(n,a,t)=>{let c=Ze(n);t.patchOnProperties=ot,t.patchMethod=ue,t.bindArguments=Fe,t.patchMacroTask=pt;let f=a.__symbol__("BLACK_LISTED_EVENTS"),E=a.__symbol__("UNPATCHED_EVENTS");n[E]&&(n[f]=n[E]),n[f]&&(a[f]=a[E]=n[f]),t.patchEventPrototype=wt,t.patchEventTarget=Pt,t.isIEOrEdge=vt,t.ObjectDefineProperty=Ae,t.ObjectGetOwnPropertyDescriptor=be,t.ObjectCreate=Et,t.ArraySlice=Tt,t.patchClass=ve,t.wrapWithCurrentZone=Ve,t.filterProperties=ut,t.attachOriginToPatched=fe,t._redefineProperty=Object.defineProperty,t.patchCallbacks=Mt,t.getGlobalObjects=()=>({globalSources:st,zoneSymbolEventNames:ne,eventNames:c,isBrowser:Be,isMix:rt,isNode:Se,TRUE_STR:ae,FALSE_STR:le,ZONE_SYMBOL_PREFIX:Pe,ADD_EVENT_LISTENER_STR:He,REMOVE_EVENT_LISTENER_STR:xe})})}function At(e){Lt(e),It(e),Zt(e)}var ft=_t();At(ft);Nt(ft); diff --git a/src/server/package/src/model_explorer/web_app/polyfills-SCHOHYNV.js b/src/server/package/src/model_explorer/web_app/polyfills-SCHOHYNV.js deleted file mode 100644 index de846137..00000000 --- a/src/server/package/src/model_explorer/web_app/polyfills-SCHOHYNV.js +++ /dev/null @@ -1,2 +0,0 @@ -var ae=globalThis;function ee(e){return(ae.__Zone_symbol_prefix||"__zone_symbol__")+e}function dt(){let e=ae.performance;function n(j){e&&e.mark&&e.mark(j)}function a(j,i){e&&e.measure&&e.measure(j,i)}n("Zone");let Y=class Y{static assertZonePatched(){if(ae.Promise!==S.ZoneAwarePromise)throw new Error("Zone.js has detected that ZoneAwarePromise `(window|global).Promise` has been overwritten.\nMost likely cause is that a Promise polyfill has been loaded after Zone.js (Polyfilling Promise api is not necessary when zone.js is loaded. If you must load one, do so before loading zone.js.)")}static get root(){let i=Y.current;for(;i.parent;)i=i.parent;return i}static get current(){return b.zone}static get currentTask(){return D}static __load_patch(i,s,o=!1){if(S.hasOwnProperty(i)){let p=ae[ee("forceDuplicateZoneCheck")]===!0;if(!o&&p)throw Error("Already loaded patch: "+i)}else if(!ae["__Zone_disable_"+i]){let p="Zone:"+i;n(p),S[i]=s(ae,Y,w),a(p,p)}}get parent(){return this._parent}get name(){return this._name}constructor(i,s){this._parent=i,this._name=s?s.name||"unnamed":"",this._properties=s&&s.properties||{},this._zoneDelegate=new f(this,this._parent&&this._parent._zoneDelegate,s)}get(i){let s=this.getZoneWith(i);if(s)return s._properties[i]}getZoneWith(i){let s=this;for(;s;){if(s._properties.hasOwnProperty(i))return s;s=s._parent}return null}fork(i){if(!i)throw new Error("ZoneSpec required!");return this._zoneDelegate.fork(this,i)}wrap(i,s){if(typeof i!="function")throw new Error("Expecting function got: "+i);let o=this._zoneDelegate.intercept(this,i,s),p=this;return function(){return p.runGuarded(o,this,arguments,s)}}run(i,s,o,p){b={parent:b,zone:this};try{return this._zoneDelegate.invoke(this,i,s,o,p)}finally{b=b.parent}}runGuarded(i,s=null,o,p){b={parent:b,zone:this};try{try{return this._zoneDelegate.invoke(this,i,s,o,p)}catch(H){if(this._zoneDelegate.handleError(this,H))throw H}}finally{b=b.parent}}runTask(i,s,o){if(i.zone!=this)throw new Error("A task can only be run in the zone of creation! (Creation: "+(i.zone||K).name+"; Execution: "+this.name+")");let p=i,{type:H,data:{isPeriodic:M=!1,isRefreshable:se=!1}={}}=i;if(i.state===q&&(H===z||H===g))return;let le=i.state!=Z;le&&p._transitionTo(Z,d);let ue=D;D=p,b={parent:b,zone:this};try{H==g&&i.data&&!M&&!se&&(i.cancelFn=void 0);try{return this._zoneDelegate.invokeTask(this,p,s,o)}catch(ne){if(this._zoneDelegate.handleError(this,ne))throw ne}}finally{let ne=i.state;if(ne!==q&&ne!==X)if(H==z||M||se&&ne===k)le&&p._transitionTo(d,Z,k);else{let h=p._zoneDelegates;this._updateTaskCount(p,-1),le&&p._transitionTo(q,Z,q),se&&(p._zoneDelegates=h)}b=b.parent,D=ue}}scheduleTask(i){if(i.zone&&i.zone!==this){let o=this;for(;o;){if(o===i.zone)throw Error(`can not reschedule task to ${this.name} which is descendants of the original zone ${i.zone.name}`);o=o.parent}}i._transitionTo(k,q);let s=[];i._zoneDelegates=s,i._zone=this;try{i=this._zoneDelegate.scheduleTask(this,i)}catch(o){throw i._transitionTo(X,k,q),this._zoneDelegate.handleError(this,o),o}return i._zoneDelegates===s&&this._updateTaskCount(i,1),i.state==k&&i._transitionTo(d,k),i}scheduleMicroTask(i,s,o,p){return this.scheduleTask(new E(G,i,s,o,p,void 0))}scheduleMacroTask(i,s,o,p,H){return this.scheduleTask(new E(g,i,s,o,p,H))}scheduleEventTask(i,s,o,p,H){return this.scheduleTask(new E(z,i,s,o,p,H))}cancelTask(i){if(i.zone!=this)throw new Error("A task can only be cancelled in the zone of creation! (Creation: "+(i.zone||K).name+"; Execution: "+this.name+")");if(!(i.state!==d&&i.state!==Z)){i._transitionTo(V,d,Z);try{this._zoneDelegate.cancelTask(this,i)}catch(s){throw i._transitionTo(X,V),this._zoneDelegate.handleError(this,s),s}return this._updateTaskCount(i,-1),i._transitionTo(q,V),i.runCount=-1,i}}_updateTaskCount(i,s){let o=i._zoneDelegates;s==-1&&(i._zoneDelegates=null);for(let p=0;pj.hasTask(s,o),onScheduleTask:(j,i,s,o)=>j.scheduleTask(s,o),onInvokeTask:(j,i,s,o,p,H)=>j.invokeTask(s,o,p,H),onCancelTask:(j,i,s,o)=>j.cancelTask(s,o)};class f{get zone(){return this._zone}constructor(i,s,o){this._taskCounts={microTask:0,macroTask:0,eventTask:0},this._zone=i,this._parentDelegate=s,this._forkZS=o&&(o&&o.onFork?o:s._forkZS),this._forkDlgt=o&&(o.onFork?s:s._forkDlgt),this._forkCurrZone=o&&(o.onFork?this._zone:s._forkCurrZone),this._interceptZS=o&&(o.onIntercept?o:s._interceptZS),this._interceptDlgt=o&&(o.onIntercept?s:s._interceptDlgt),this._interceptCurrZone=o&&(o.onIntercept?this._zone:s._interceptCurrZone),this._invokeZS=o&&(o.onInvoke?o:s._invokeZS),this._invokeDlgt=o&&(o.onInvoke?s:s._invokeDlgt),this._invokeCurrZone=o&&(o.onInvoke?this._zone:s._invokeCurrZone),this._handleErrorZS=o&&(o.onHandleError?o:s._handleErrorZS),this._handleErrorDlgt=o&&(o.onHandleError?s:s._handleErrorDlgt),this._handleErrorCurrZone=o&&(o.onHandleError?this._zone:s._handleErrorCurrZone),this._scheduleTaskZS=o&&(o.onScheduleTask?o:s._scheduleTaskZS),this._scheduleTaskDlgt=o&&(o.onScheduleTask?s:s._scheduleTaskDlgt),this._scheduleTaskCurrZone=o&&(o.onScheduleTask?this._zone:s._scheduleTaskCurrZone),this._invokeTaskZS=o&&(o.onInvokeTask?o:s._invokeTaskZS),this._invokeTaskDlgt=o&&(o.onInvokeTask?s:s._invokeTaskDlgt),this._invokeTaskCurrZone=o&&(o.onInvokeTask?this._zone:s._invokeTaskCurrZone),this._cancelTaskZS=o&&(o.onCancelTask?o:s._cancelTaskZS),this._cancelTaskDlgt=o&&(o.onCancelTask?s:s._cancelTaskDlgt),this._cancelTaskCurrZone=o&&(o.onCancelTask?this._zone:s._cancelTaskCurrZone),this._hasTaskZS=null,this._hasTaskDlgt=null,this._hasTaskDlgtOwner=null,this._hasTaskCurrZone=null;let p=o&&o.onHasTask,H=s&&s._hasTaskZS;(p||H)&&(this._hasTaskZS=p?o:c,this._hasTaskDlgt=s,this._hasTaskDlgtOwner=this,this._hasTaskCurrZone=this._zone,o.onScheduleTask||(this._scheduleTaskZS=c,this._scheduleTaskDlgt=s,this._scheduleTaskCurrZone=this._zone),o.onInvokeTask||(this._invokeTaskZS=c,this._invokeTaskDlgt=s,this._invokeTaskCurrZone=this._zone),o.onCancelTask||(this._cancelTaskZS=c,this._cancelTaskDlgt=s,this._cancelTaskCurrZone=this._zone))}fork(i,s){return this._forkZS?this._forkZS.onFork(this._forkDlgt,this.zone,i,s):new t(i,s)}intercept(i,s,o){return this._interceptZS?this._interceptZS.onIntercept(this._interceptDlgt,this._interceptCurrZone,i,s,o):s}invoke(i,s,o,p,H){return this._invokeZS?this._invokeZS.onInvoke(this._invokeDlgt,this._invokeCurrZone,i,s,o,p,H):s.apply(o,p)}handleError(i,s){return this._handleErrorZS?this._handleErrorZS.onHandleError(this._handleErrorDlgt,this._handleErrorCurrZone,i,s):!0}scheduleTask(i,s){let o=s;if(this._scheduleTaskZS)this._hasTaskZS&&o._zoneDelegates.push(this._hasTaskDlgtOwner),o=this._scheduleTaskZS.onScheduleTask(this._scheduleTaskDlgt,this._scheduleTaskCurrZone,i,s),o||(o=s);else if(s.scheduleFn)s.scheduleFn(s);else if(s.type==G)U(s);else throw new Error("Task is missing scheduleFn.");return o}invokeTask(i,s,o,p){return this._invokeTaskZS?this._invokeTaskZS.onInvokeTask(this._invokeTaskDlgt,this._invokeTaskCurrZone,i,s,o,p):s.callback.apply(o,p)}cancelTask(i,s){let o;if(this._cancelTaskZS)o=this._cancelTaskZS.onCancelTask(this._cancelTaskDlgt,this._cancelTaskCurrZone,i,s);else{if(!s.cancelFn)throw Error("Task is not cancelable");o=s.cancelFn(s)}return o}hasTask(i,s){try{this._hasTaskZS&&this._hasTaskZS.onHasTask(this._hasTaskDlgt,this._hasTaskCurrZone,i,s)}catch(o){this.handleError(i,o)}}_updateTaskCount(i,s){let o=this._taskCounts,p=o[i],H=o[i]=p+s;if(H<0)throw new Error("More tasks executed then were scheduled.");if(p==0||H==0){let M={microTask:o.microTask>0,macroTask:o.macroTask>0,eventTask:o.eventTask>0,change:i};this.hasTask(this._zone,M)}}}class E{constructor(i,s,o,p,H,M){if(this._zone=null,this.runCount=0,this._zoneDelegates=null,this._state="notScheduled",this.type=i,this.source=s,this.data=p,this.scheduleFn=H,this.cancelFn=M,!o)throw new Error("callback is not defined");this.callback=o;let se=this;i===z&&p&&p.useG?this.invoke=E.invokeTask:this.invoke=function(){return E.invokeTask.call(ae,se,this,arguments)}}static invokeTask(i,s,o){i||(i=this),Q++;try{return i.runCount++,i.zone.runTask(i,s,o)}finally{Q==1&&J(),Q--}}get zone(){return this._zone}get state(){return this._state}cancelScheduleRequest(){this._transitionTo(q,k)}_transitionTo(i,s,o){if(this._state===s||this._state===o)this._state=i,i==q&&(this._zoneDelegates=null);else throw new Error(`${this.type} '${this.source}': can not transition to '${i}', expecting state '${s}'${o?" or '"+o+"'":""}, was '${this._state}'.`)}toString(){return this.data&&typeof this.data.handleId<"u"?this.data.handleId.toString():Object.prototype.toString.call(this)}toJSON(){return{type:this.type,state:this.state,source:this.source,zone:this.zone.name,runCount:this.runCount}}}let T=ee("setTimeout"),m=ee("Promise"),C=ee("then"),_=[],P=!1,I;function x(j){if(I||ae[m]&&(I=ae[m].resolve(0)),I){let i=I[C];i||(i=I.then),i.call(I,j)}else ae[T](j,0)}function U(j){Q===0&&_.length===0&&x(J),j&&_.push(j)}function J(){if(!P){for(P=!0;_.length;){let j=_;_=[];for(let i=0;ib,onUnhandledError:W,microtaskDrainDone:W,scheduleMicroTask:U,showUncaughtError:()=>!t[ee("ignoreConsoleErrorUncaughtError")],patchEventTarget:()=>[],patchOnProperties:W,patchMethod:()=>W,bindArguments:()=>[],patchThen:()=>W,patchMacroTask:()=>W,patchEventPrototype:()=>W,isIEOrEdge:()=>!1,getGlobalObjects:()=>{},ObjectDefineProperty:()=>W,ObjectGetOwnPropertyDescriptor:()=>{},ObjectCreate:()=>{},ArraySlice:()=>[],patchClass:()=>W,wrapWithCurrentZone:()=>W,filterProperties:()=>[],attachOriginToPatched:()=>W,_redefineProperty:()=>W,patchCallbacks:()=>W,nativeScheduleMicroTask:x},b={parent:null,zone:new t(null,null)},D=null,Q=0;function W(){}return a("Zone","Zone"),t}function _t(){let e=globalThis,n=e[ee("forceDuplicateZoneCheck")]===!0;if(e.Zone&&(n||typeof e.Zone.__symbol__!="function"))throw new Error("Zone already loaded.");return e.Zone??=dt(),e.Zone}var be=Object.getOwnPropertyDescriptor,Ae=Object.defineProperty,je=Object.getPrototypeOf,Et=Object.create,Tt=Array.prototype.slice,He="addEventListener",xe="removeEventListener",Le=ee(He),Ie=ee(xe),fe="true",he="false",Pe=ee("");function Ve(e,n){return Zone.current.wrap(e,n)}function Ge(e,n,a,t,c){return Zone.current.scheduleMacroTask(e,n,a,t,c)}var A=ee,De=typeof window<"u",pe=De?window:void 0,$=De&&pe||globalThis,gt="removeAttribute";function Fe(e,n){for(let a=e.length-1;a>=0;a--)typeof e[a]=="function"&&(e[a]=Ve(e[a],n+"_"+a));return e}function yt(e,n){let a=e.constructor.name;for(let t=0;t{let m=function(){return T.apply(this,Fe(arguments,a+"."+c))};return _e(m,T),m})(f)}}}function tt(e){return e?e.writable===!1?!1:!(typeof e.get=="function"&&typeof e.set>"u"):!0}var nt=typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope,Se=!("nw"in $)&&typeof $.process<"u"&&$.process.toString()==="[object process]",Be=!Se&&!nt&&!!(De&&pe.HTMLElement),rt=typeof $.process<"u"&&$.process.toString()==="[object process]"&&!nt&&!!(De&&pe.HTMLElement),Ce={},mt=A("enable_beforeunload"),Ye=function(e){if(e=e||$.event,!e)return;let n=Ce[e.type];n||(n=Ce[e.type]=A("ON_PROPERTY"+e.type));let a=this||e.target||$,t=a[n],c;if(Be&&a===pe&&e.type==="error"){let f=e;c=t&&t.call(this,f.message,f.filename,f.lineno,f.colno,f.error),c===!0&&e.preventDefault()}else c=t&&t.apply(this,arguments),e.type==="beforeunload"&&$[mt]&&typeof c=="string"?e.returnValue=c:c!=null&&!c&&e.preventDefault();return c};function $e(e,n,a){let t=be(e,n);if(!t&&a&&be(a,n)&&(t={enumerable:!0,configurable:!0}),!t||!t.configurable)return;let c=A("on"+n+"patched");if(e.hasOwnProperty(c)&&e[c])return;delete t.writable,delete t.value;let f=t.get,E=t.set,T=n.slice(2),m=Ce[T];m||(m=Ce[T]=A("ON_PROPERTY"+T)),t.set=function(C){let _=this;if(!_&&e===$&&(_=$),!_)return;typeof _[m]=="function"&&_.removeEventListener(T,Ye),E&&E.call(_,null),_[m]=C,typeof C=="function"&&_.addEventListener(T,Ye,!1)},t.get=function(){let C=this;if(!C&&e===$&&(C=$),!C)return null;let _=C[m];if(_)return _;if(f){let P=f.call(this);if(P)return t.set.call(this,P),typeof C[gt]=="function"&&C.removeAttribute(n),P}return null},Ae(e,n,t),e[c]=!0}function ot(e,n,a){if(n)for(let t=0;tfunction(E,T){let m=a(E,T);return m.cbIdx>=0&&typeof T[m.cbIdx]=="function"?Ge(m.name,T[m.cbIdx],m,c):f.apply(E,T)})}function _e(e,n){e[A("OriginalDelegate")]=n}var Je=!1,Me=!1;function kt(){try{let e=pe.navigator.userAgent;if(e.indexOf("MSIE ")!==-1||e.indexOf("Trident/")!==-1)return!0}catch{}return!1}function vt(){if(Je)return Me;Je=!0;try{let e=pe.navigator.userAgent;(e.indexOf("MSIE ")!==-1||e.indexOf("Trident/")!==-1||e.indexOf("Edge/")!==-1)&&(Me=!0)}catch{}return Me}function Ke(e){return typeof e=="function"}function Qe(e){return typeof e=="number"}var me=!1;if(typeof window<"u")try{let e=Object.defineProperty({},"passive",{get:function(){me=!0}});window.addEventListener("test",e,e),window.removeEventListener("test",e,e)}catch{me=!1}var bt={useG:!0},te={},st={},it=new RegExp("^"+Pe+"(\\w+)(true|false)$"),ct=A("propagationStopped");function at(e,n){let a=(n?n(e):e)+he,t=(n?n(e):e)+fe,c=Pe+a,f=Pe+t;te[e]={},te[e][he]=c,te[e][fe]=f}function Pt(e,n,a,t){let c=t&&t.add||He,f=t&&t.rm||xe,E=t&&t.listeners||"eventListeners",T=t&&t.rmAll||"removeAllListeners",m=A(c),C="."+c+":",_="prependListener",P="."+_+":",I=function(k,d,Z){if(k.isRemoved)return;let V=k.callback;typeof V=="object"&&V.handleEvent&&(k.callback=g=>V.handleEvent(g),k.originalDelegate=V);let X;try{k.invoke(k,d,[Z])}catch(g){X=g}let G=k.options;if(G&&typeof G=="object"&&G.once){let g=k.originalDelegate?k.originalDelegate:k.callback;d[f].call(d,Z.type,g,G)}return X};function x(k,d,Z){if(d=d||e.event,!d)return;let V=k||d.target||e,X=V[te[d.type][Z?fe:he]];if(X){let G=[];if(X.length===1){let g=I(X[0],V,d);g&&G.push(g)}else{let g=X.slice();for(let z=0;z{throw z})}}}let U=function(k){return x(this,k,!1)},J=function(k){return x(this,k,!0)};function K(k,d){if(!k)return!1;let Z=!0;d&&d.useG!==void 0&&(Z=d.useG);let V=d&&d.vh,X=!0;d&&d.chkDup!==void 0&&(X=d.chkDup);let G=!1;d&&d.rt!==void 0&&(G=d.rt);let g=k;for(;g&&!g.hasOwnProperty(c);)g=je(g);if(!g&&k[c]&&(g=k),!g||g[m])return!1;let z=d&&d.eventNameToString,S={},w=g[m]=g[c],b=g[A(f)]=g[f],D=g[A(E)]=g[E],Q=g[A(T)]=g[T],W;d&&d.prepend&&(W=g[A(d.prepend)]=g[d.prepend]);function Y(r,u){return!me&&typeof r=="object"&&r?!!r.capture:!me||!u?r:typeof r=="boolean"?{capture:r,passive:!0}:r?typeof r=="object"&&r.passive!==!1?{...r,passive:!0}:r:{passive:!0}}let j=function(r){if(!S.isExisting)return w.call(S.target,S.eventName,S.capture?J:U,S.options)},i=function(r){if(!r.isRemoved){let u=te[r.eventName],v;u&&(v=u[r.capture?fe:he]);let R=v&&r.target[v];if(R){for(let y=0;yre.zone.cancelTask(re);r.call(Te,"abort",ce,{once:!0}),re.removeAbortListener=()=>Te.removeEventListener("abort",ce)}if(S.target=null,ke&&(ke.taskData=null),Ue&&(S.options.once=!0),!me&&typeof re.options=="boolean"||(re.options=ie),re.target=N,re.capture=Oe,re.eventName=L,B&&(re.originalDelegate=F),O?ge.unshift(re):ge.push(re),y)return N}};return g[c]=l(w,C,H,M,G),W&&(g[_]=l(W,P,o,M,G,!0)),g[f]=function(){let r=this||e,u=arguments[0];d&&d.transferEventName&&(u=d.transferEventName(u));let v=arguments[2],R=v?typeof v=="boolean"?!0:v.capture:!1,y=arguments[1];if(!y)return b.apply(this,arguments);if(V&&!V(b,y,r,arguments))return;let O=te[u],N;O&&(N=O[R?fe:he]);let L=N&&r[N];if(L)for(let F=0;Ffunction(c,f){c[ct]=!0,t&&t.apply(c,f)})}function Rt(e,n){n.patchMethod(e,"queueMicrotask",a=>function(t,c){Zone.current.scheduleMicroTask("queueMicrotask",c[0])})}var Re=A("zoneTask");function ye(e,n,a,t){let c=null,f=null;n+=t,a+=t;let E={};function T(C){let _=C.data;_.args[0]=function(){return C.invoke.apply(this,arguments)};let P=c.apply(e,_.args);return Qe(P)?_.handleId=P:(_.handle=P,_.isRefreshable=Ke(P.refresh)),C}function m(C){let{handle:_,handleId:P}=C.data;return f.call(e,_??P)}c=de(e,n,C=>function(_,P){if(Ke(P[0])){let I={isRefreshable:!1,isPeriodic:t==="Interval",delay:t==="Timeout"||t==="Interval"?P[1]||0:void 0,args:P},x=P[0];P[0]=function(){try{return x.apply(this,arguments)}finally{let{handle:Z,handleId:V,isPeriodic:X,isRefreshable:G}=I;!X&&!G&&(V?delete E[V]:Z&&(Z[Re]=null))}};let U=Ge(n,P[0],I,T,m);if(!U)return U;let{handleId:J,handle:K,isRefreshable:q,isPeriodic:k}=U.data;if(J)E[J]=U;else if(K&&(K[Re]=U,q&&!k)){let d=K.refresh;K.refresh=function(){let{zone:Z,state:V}=U;return V==="notScheduled"?(U._state="scheduled",Z._updateTaskCount(U,1)):V==="running"&&(U._state="scheduling"),d.call(this)}}return K??J??U}else return C.apply(e,P)}),f=de(e,a,C=>function(_,P){let I=P[0],x;Qe(I)?(x=E[I],delete E[I]):(x=I?.[Re],x?I[Re]=null:x=I),x?.type?x.cancelFn&&x.zone.cancelTask(x):C.apply(e,P)})}function Ct(e,n){let{isBrowser:a,isMix:t}=n.getGlobalObjects();if(!a&&!t||!e.customElements||!("customElements"in e))return;let c=["connectedCallback","disconnectedCallback","adoptedCallback","attributeChangedCallback","formAssociatedCallback","formDisabledCallback","formResetCallback","formStateRestoreCallback"];n.patchCallbacks(n,e.customElements,"customElements","define",c)}function Dt(e,n){if(Zone[n.symbol("patchEventTarget")])return;let{eventNames:a,zoneSymbolEventNames:t,TRUE_STR:c,FALSE_STR:f,ZONE_SYMBOL_PREFIX:E}=n.getGlobalObjects();for(let m=0;mf.target===e);if(!t||t.length===0)return n;let c=t[0].ignoreProperties;return n.filter(f=>c.indexOf(f)===-1)}function et(e,n,a,t){if(!e)return;let c=ut(e,n,a);ot(e,c,t)}function Ze(e){return Object.getOwnPropertyNames(e).filter(n=>n.startsWith("on")&&n.length>2).map(n=>n.substring(2))}function Ot(e,n){if(Se&&!rt||Zone[e.symbol("patchEvents")])return;let a=n.__Zone_ignore_on_properties,t=[];if(Be){let c=window;t=t.concat(["Document","SVGElement","Element","HTMLElement","HTMLBodyElement","HTMLMediaElement","HTMLFrameSetElement","HTMLFrameElement","HTMLIFrameElement","HTMLMarqueeElement","Worker"]);let f=kt()?[{target:c,ignoreProperties:["error"]}]:[];et(c,Ze(c),a&&a.concat(f),je(c))}t=t.concat(["XMLHttpRequest","XMLHttpRequestEventTarget","IDBIndex","IDBRequest","IDBOpenDBRequest","IDBDatabase","IDBTransaction","IDBCursor","WebSocket"]);for(let c=0;c{let a=n[e.__symbol__("legacyPatch")];a&&a()}),e.__load_patch("timers",n=>{let a="set",t="clear";ye(n,a,t,"Timeout"),ye(n,a,t,"Interval"),ye(n,a,t,"Immediate")}),e.__load_patch("requestAnimationFrame",n=>{ye(n,"request","cancel","AnimationFrame"),ye(n,"mozRequest","mozCancel","AnimationFrame"),ye(n,"webkitRequest","webkitCancel","AnimationFrame")}),e.__load_patch("blocking",(n,a)=>{let t=["alert","prompt","confirm"];for(let c=0;cfunction(C,_){return a.current.run(E,n,_,m)})}}),e.__load_patch("EventTarget",(n,a,t)=>{St(n,t),Dt(n,t);let c=n.XMLHttpRequestEventTarget;c&&c.prototype&&t.patchEventTarget(n,t,[c.prototype])}),e.__load_patch("MutationObserver",(n,a,t)=>{ve("MutationObserver"),ve("WebKitMutationObserver")}),e.__load_patch("IntersectionObserver",(n,a,t)=>{ve("IntersectionObserver")}),e.__load_patch("FileReader",(n,a,t)=>{ve("FileReader")}),e.__load_patch("on_property",(n,a,t)=>{Ot(t,n)}),e.__load_patch("customElements",(n,a,t)=>{Ct(n,t)}),e.__load_patch("XHR",(n,a)=>{C(n);let t=A("xhrTask"),c=A("xhrSync"),f=A("xhrListener"),E=A("xhrScheduled"),T=A("xhrURL"),m=A("xhrErrorBeforeScheduled");function C(_){let P=_.XMLHttpRequest;if(!P)return;let I=P.prototype;function x(w){return w[t]}let U=I[Le],J=I[Ie];if(!U){let w=_.XMLHttpRequestEventTarget;if(w){let b=w.prototype;U=b[Le],J=b[Ie]}}let K="readystatechange",q="scheduled";function k(w){let b=w.data,D=b.target;D[E]=!1,D[m]=!1;let Q=D[f];U||(U=D[Le],J=D[Ie]),Q&&J.call(D,K,Q);let W=D[f]=()=>{if(D.readyState===D.DONE)if(!b.aborted&&D[E]&&w.state===q){let j=D[a.__symbol__("loadfalse")];if(D.status!==0&&j&&j.length>0){let i=w.invoke;w.invoke=function(){let s=D[a.__symbol__("loadfalse")];for(let o=0;ofunction(w,b){return w[c]=b[2]==!1,w[T]=b[1],V.apply(w,b)}),X="XMLHttpRequest.send",G=A("fetchTaskAborting"),g=A("fetchTaskScheduling"),z=de(I,"send",()=>function(w,b){if(a.current[g]===!0||w[c])return z.apply(w,b);{let D={target:w,url:w[T],isPeriodic:!1,args:b,aborted:!1},Q=Ge(X,d,D,k,Z);w&&w[m]===!0&&!D.aborted&&Q.state===q&&Q.invoke()}}),S=de(I,"abort",()=>function(w,b){let D=x(w);if(D&&typeof D.type=="string"){if(D.cancelFn==null||D.data&&D.data.aborted)return;D.zone.cancelTask(D)}else if(a.current[G]===!0)return S.apply(w,b)})}}),e.__load_patch("geolocation",n=>{n.navigator&&n.navigator.geolocation&&yt(n.navigator.geolocation,["getCurrentPosition","watchPosition"])}),e.__load_patch("PromiseRejectionEvent",(n,a)=>{function t(c){return function(f){lt(n,c).forEach(T=>{let m=n.PromiseRejectionEvent;if(m){let C=new m(c,{promise:f.promise,reason:f.rejection});T.invoke(C)}})}}n.PromiseRejectionEvent&&(a[A("unhandledPromiseRejectionHandler")]=t("unhandledrejection"),a[A("rejectionHandledHandler")]=t("rejectionhandled"))}),e.__load_patch("queueMicrotask",(n,a,t)=>{Rt(n,t)})}function Lt(e){e.__load_patch("ZoneAwarePromise",(n,a,t)=>{let c=Object.getOwnPropertyDescriptor,f=Object.defineProperty;function E(h){if(h&&h.toString===Object.prototype.toString){let l=h.constructor&&h.constructor.name;return(l||"")+": "+JSON.stringify(h)}return h?h.toString():Object.prototype.toString.call(h)}let T=t.symbol,m=[],C=n[T("DISABLE_WRAPPING_UNCAUGHT_PROMISE_REJECTION")]!==!1,_=T("Promise"),P=T("then"),I="__creationTrace__";t.onUnhandledError=h=>{if(t.showUncaughtError()){let l=h&&h.rejection;l?console.error("Unhandled Promise rejection:",l instanceof Error?l.message:l,"; Zone:",h.zone.name,"; Task:",h.task&&h.task.source,"; Value:",l,l instanceof Error?l.stack:void 0):console.error(h)}},t.microtaskDrainDone=()=>{for(;m.length;){let h=m.shift();try{h.zone.runGuarded(()=>{throw h.throwOriginal?h.rejection:h})}catch(l){U(l)}}};let x=T("unhandledPromiseRejectionHandler");function U(h){t.onUnhandledError(h);try{let l=a[x];typeof l=="function"&&l.call(this,h)}catch{}}function J(h){return h&&h.then}function K(h){return h}function q(h){return M.reject(h)}let k=T("state"),d=T("value"),Z=T("finally"),V=T("parentPromiseValue"),X=T("parentPromiseState"),G="Promise.then",g=null,z=!0,S=!1,w=0;function b(h,l){return r=>{try{Y(h,l,r)}catch(u){Y(h,!1,u)}}}let D=function(){let h=!1;return function(r){return function(){h||(h=!0,r.apply(null,arguments))}}},Q="Promise resolved with itself",W=T("currentTaskTrace");function Y(h,l,r){let u=D();if(h===r)throw new TypeError(Q);if(h[k]===g){let v=null;try{(typeof r=="object"||typeof r=="function")&&(v=r&&r.then)}catch(R){return u(()=>{Y(h,!1,R)})(),h}if(l!==S&&r instanceof M&&r.hasOwnProperty(k)&&r.hasOwnProperty(d)&&r[k]!==g)i(r),Y(h,r[k],r[d]);else if(l!==S&&typeof v=="function")try{v.call(r,u(b(h,l)),u(b(h,!1)))}catch(R){u(()=>{Y(h,!1,R)})()}else{h[k]=l;let R=h[d];if(h[d]=r,h[Z]===Z&&l===z&&(h[k]=h[X],h[d]=h[V]),l===S&&r instanceof Error){let y=a.currentTask&&a.currentTask.data&&a.currentTask.data[I];y&&f(r,W,{configurable:!0,enumerable:!1,writable:!0,value:y})}for(let y=0;y{try{let O=h[d],N=!!r&&Z===r[Z];N&&(r[V]=O,r[X]=R);let L=l.run(y,void 0,N&&y!==q&&y!==K?[]:[O]);Y(r,!0,L)}catch(O){Y(r,!1,O)}},r)}let o="function ZoneAwarePromise() { [native code] }",p=function(){},H=n.AggregateError;class M{static toString(){return o}static resolve(l){return l instanceof M?l:Y(new this(null),z,l)}static reject(l){return Y(new this(null),S,l)}static withResolvers(){let l={};return l.promise=new M((r,u)=>{l.resolve=r,l.reject=u}),l}static any(l){if(!l||typeof l[Symbol.iterator]!="function")return Promise.reject(new H([],"All promises were rejected"));let r=[],u=0;try{for(let y of l)u++,r.push(M.resolve(y))}catch{return Promise.reject(new H([],"All promises were rejected"))}if(u===0)return Promise.reject(new H([],"All promises were rejected"));let v=!1,R=[];return new M((y,O)=>{for(let N=0;N{v||(v=!0,y(L))},L=>{R.push(L),u--,u===0&&(v=!0,O(new H(R,"All promises were rejected")))})})}static race(l){let r,u,v=new this((O,N)=>{r=O,u=N});function R(O){r(O)}function y(O){u(O)}for(let O of l)J(O)||(O=this.resolve(O)),O.then(R,y);return v}static all(l){return M.allWithCallback(l)}static allSettled(l){return(this&&this.prototype instanceof M?this:M).allWithCallback(l,{thenCallback:u=>({status:"fulfilled",value:u}),errorCallback:u=>({status:"rejected",reason:u})})}static allWithCallback(l,r){let u,v,R=new this((L,F)=>{u=L,v=F}),y=2,O=0,N=[];for(let L of l){J(L)||(L=this.resolve(L));let F=O;try{L.then(B=>{N[F]=r?r.thenCallback(B):B,y--,y===0&&u(N)},B=>{r?(N[F]=r.errorCallback(B),y--,y===0&&u(N)):v(B)})}catch(B){v(B)}y++,O++}return y-=2,y===0&&u(N),R}constructor(l){let r=this;if(!(r instanceof M))throw new Error("Must be an instanceof Promise.");r[k]=g,r[d]=[];try{let u=D();l&&l(u(b(r,z)),u(b(r,S)))}catch(u){Y(r,!1,u)}}get[Symbol.toStringTag](){return"Promise"}get[Symbol.species](){return M}then(l,r){let u=this.constructor?.[Symbol.species];(!u||typeof u!="function")&&(u=this.constructor||M);let v=new u(p),R=a.current;return this[k]==g?this[d].push(R,v,l,r):s(this,R,v,l,r),v}catch(l){return this.then(null,l)}finally(l){let r=this.constructor?.[Symbol.species];(!r||typeof r!="function")&&(r=M);let u=new r(p);u[Z]=Z;let v=a.current;return this[k]==g?this[d].push(v,u,l,l):s(this,v,u,l,l),u}}M.resolve=M.resolve,M.reject=M.reject,M.race=M.race,M.all=M.all;let se=n[_]=n.Promise;n.Promise=M;let le=T("thenPatched");function ue(h){let l=h.prototype,r=c(l,"then");if(r&&(r.writable===!1||!r.configurable))return;let u=l.then;l[P]=u,h.prototype.then=function(v,R){return new M((O,N)=>{u.call(this,O,N)}).then(v,R)},h[le]=!0}t.patchThen=ue;function ne(h){return function(l,r){let u=h.apply(l,r);if(u instanceof M)return u;let v=u.constructor;return v[le]||ue(v),u}}return se&&(ue(se),de(n,"fetch",h=>ne(h))),Promise[a.__symbol__("uncaughtPromiseErrors")]=m,M})}function It(e){e.__load_patch("toString",n=>{let a=Function.prototype.toString,t=A("OriginalDelegate"),c=A("Promise"),f=A("Error"),E=function(){if(typeof this=="function"){let _=this[t];if(_)return typeof _=="function"?a.call(_):Object.prototype.toString.call(_);if(this===Promise){let P=n[c];if(P)return a.call(P)}if(this===Error){let P=n[f];if(P)return a.call(P)}}return a.call(this)};E[t]=a,Function.prototype.toString=E;let T=Object.prototype.toString,m="[object Promise]";Object.prototype.toString=function(){return typeof Promise=="function"&&this instanceof Promise?m:T.call(this)}})}function Mt(e,n,a,t,c){let f=Zone.__symbol__(t);if(n[f])return;let E=n[f]=n[t];n[t]=function(T,m,C){return m&&m.prototype&&c.forEach(function(_){let P=`${a}.${t}::`+_,I=m.prototype;try{if(I.hasOwnProperty(_)){let x=e.ObjectGetOwnPropertyDescriptor(I,_);x&&x.value?(x.value=e.wrapWithCurrentZone(x.value,P),e._redefineProperty(m.prototype,_,x)):I[_]&&(I[_]=e.wrapWithCurrentZone(I[_],P))}else I[_]&&(I[_]=e.wrapWithCurrentZone(I[_],P))}catch{}}),E.call(n,T,m,C)},e.attachOriginToPatched(n[t],E)}function Zt(e){e.__load_patch("util",(n,a,t)=>{let c=Ze(n);t.patchOnProperties=ot,t.patchMethod=de,t.bindArguments=Fe,t.patchMacroTask=pt;let f=a.__symbol__("BLACK_LISTED_EVENTS"),E=a.__symbol__("UNPATCHED_EVENTS");n[E]&&(n[f]=n[E]),n[f]&&(a[f]=a[E]=n[f]),t.patchEventPrototype=wt,t.patchEventTarget=Pt,t.isIEOrEdge=vt,t.ObjectDefineProperty=Ae,t.ObjectGetOwnPropertyDescriptor=be,t.ObjectCreate=Et,t.ArraySlice=Tt,t.patchClass=ve,t.wrapWithCurrentZone=Ve,t.filterProperties=ut,t.attachOriginToPatched=_e,t._redefineProperty=Object.defineProperty,t.patchCallbacks=Mt,t.getGlobalObjects=()=>({globalSources:st,zoneSymbolEventNames:te,eventNames:c,isBrowser:Be,isMix:rt,isNode:Se,TRUE_STR:fe,FALSE_STR:he,ZONE_SYMBOL_PREFIX:Pe,ADD_EVENT_LISTENER_STR:He,REMOVE_EVENT_LISTENER_STR:xe})})}function At(e){Lt(e),It(e),Zt(e)}var ft=_t();At(ft);Nt(ft); diff --git a/src/server/package/src/model_explorer/web_app/styles-A5CA6XFW.css b/src/server/package/src/model_explorer/web_app/styles-A5CA6XFW.css new file mode 100644 index 00000000..296fd576 --- /dev/null +++ b/src/server/package/src/model_explorer/web_app/styles-A5CA6XFW.css @@ -0,0 +1 @@ +html{--mat-ripple-color: rgba(0, 0, 0, .1)}html,.mat-accent{--mat-option-selected-state-label-text-color: #1a73e8;--mat-option-label-text-color: rgba(0, 0, 0, .87);--mat-option-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-option-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-option-selected-state-layer-color: rgba(0, 0, 0, .04)}.mat-warn{--mat-option-selected-state-label-text-color: #f44336;--mat-option-label-text-color: rgba(0, 0, 0, .87);--mat-option-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-option-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-option-selected-state-layer-color: rgba(0, 0, 0, .04)}html{--mat-optgroup-label-text-color: rgba(0, 0, 0, .87)}html{--mat-full-pseudo-checkbox-selected-icon-color: #1a73e8;--mat-full-pseudo-checkbox-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mat-full-pseudo-checkbox-disabled-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-disabled-unselected-icon-color: #b0b0b0;--mat-full-pseudo-checkbox-disabled-selected-icon-color: #b0b0b0}html{--mat-minimal-pseudo-checkbox-selected-checkmark-color: #1a73e8;--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: #b0b0b0}.mat-primary{--mat-full-pseudo-checkbox-selected-icon-color: #1a73e8;--mat-full-pseudo-checkbox-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mat-full-pseudo-checkbox-disabled-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-disabled-unselected-icon-color: #b0b0b0;--mat-full-pseudo-checkbox-disabled-selected-icon-color: #b0b0b0}.mat-primary{--mat-minimal-pseudo-checkbox-selected-checkmark-color: #1a73e8;--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: #b0b0b0}.mat-accent{--mat-full-pseudo-checkbox-selected-icon-color: #1a73e8;--mat-full-pseudo-checkbox-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mat-full-pseudo-checkbox-disabled-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-disabled-unselected-icon-color: #b0b0b0;--mat-full-pseudo-checkbox-disabled-selected-icon-color: #b0b0b0}.mat-accent{--mat-minimal-pseudo-checkbox-selected-checkmark-color: #1a73e8;--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: #b0b0b0}.mat-warn{--mat-full-pseudo-checkbox-selected-icon-color: #f44336;--mat-full-pseudo-checkbox-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mat-full-pseudo-checkbox-disabled-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-disabled-unselected-icon-color: #b0b0b0;--mat-full-pseudo-checkbox-disabled-selected-icon-color: #b0b0b0}.mat-warn{--mat-minimal-pseudo-checkbox-selected-checkmark-color: #f44336;--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: #b0b0b0}html{--mat-app-background-color: #fafafa;--mat-app-text-color: rgba(0, 0, 0, .87);--mat-app-elevation-shadow-level-0: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-1: 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-2: 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-3: 0px 3px 3px -2px rgba(0, 0, 0, .2), 0px 3px 4px 0px rgba(0, 0, 0, .14), 0px 1px 8px 0px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-4: 0px 2px 4px -1px rgba(0, 0, 0, .2), 0px 4px 5px 0px rgba(0, 0, 0, .14), 0px 1px 10px 0px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-5: 0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 5px 8px 0px rgba(0, 0, 0, .14), 0px 1px 14px 0px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-6: 0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-7: 0px 4px 5px -2px rgba(0, 0, 0, .2), 0px 7px 10px 1px rgba(0, 0, 0, .14), 0px 2px 16px 1px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-8: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-9: 0px 5px 6px -3px rgba(0, 0, 0, .2), 0px 9px 12px 1px rgba(0, 0, 0, .14), 0px 3px 16px 2px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-10: 0px 6px 6px -3px rgba(0, 0, 0, .2), 0px 10px 14px 1px rgba(0, 0, 0, .14), 0px 4px 18px 3px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-11: 0px 6px 7px -4px rgba(0, 0, 0, .2), 0px 11px 15px 1px rgba(0, 0, 0, .14), 0px 4px 20px 3px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-12: 0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 12px 17px 2px rgba(0, 0, 0, .14), 0px 5px 22px 4px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-13: 0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 13px 19px 2px rgba(0, 0, 0, .14), 0px 5px 24px 4px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-14: 0px 7px 9px -4px rgba(0, 0, 0, .2), 0px 14px 21px 2px rgba(0, 0, 0, .14), 0px 5px 26px 4px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-15: 0px 8px 9px -5px rgba(0, 0, 0, .2), 0px 15px 22px 2px rgba(0, 0, 0, .14), 0px 6px 28px 5px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-16: 0px 8px 10px -5px rgba(0, 0, 0, .2), 0px 16px 24px 2px rgba(0, 0, 0, .14), 0px 6px 30px 5px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-17: 0px 8px 11px -5px rgba(0, 0, 0, .2), 0px 17px 26px 2px rgba(0, 0, 0, .14), 0px 6px 32px 5px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-18: 0px 9px 11px -5px rgba(0, 0, 0, .2), 0px 18px 28px 2px rgba(0, 0, 0, .14), 0px 7px 34px 6px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-19: 0px 9px 12px -6px rgba(0, 0, 0, .2), 0px 19px 29px 2px rgba(0, 0, 0, .14), 0px 7px 36px 6px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-20: 0px 10px 13px -6px rgba(0, 0, 0, .2), 0px 20px 31px 3px rgba(0, 0, 0, .14), 0px 8px 38px 7px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-21: 0px 10px 13px -6px rgba(0, 0, 0, .2), 0px 21px 33px 3px rgba(0, 0, 0, .14), 0px 8px 40px 7px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-22: 0px 10px 14px -6px rgba(0, 0, 0, .2), 0px 22px 35px 3px rgba(0, 0, 0, .14), 0px 8px 42px 7px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-23: 0px 11px 14px -7px rgba(0, 0, 0, .2), 0px 23px 36px 3px rgba(0, 0, 0, .14), 0px 9px 44px 8px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-24: 0px 11px 15px -7px rgba(0, 0, 0, .2), 0px 24px 38px 3px rgba(0, 0, 0, .14), 0px 9px 46px 8px rgba(0, 0, 0, .12)}html{--mat-option-label-text-font: Roboto, sans-serif;--mat-option-label-text-line-height: 24px;--mat-option-label-text-size: 16px;--mat-option-label-text-tracking: .03125em;--mat-option-label-text-weight: 400}html{--mat-optgroup-label-text-font: Roboto, sans-serif;--mat-optgroup-label-text-line-height: 24px;--mat-optgroup-label-text-size: 16px;--mat-optgroup-label-text-tracking: .03125em;--mat-optgroup-label-text-weight: 400}.mat-h1,.mat-headline-5,.mat-typography .mat-h1,.mat-typography .mat-headline-5,.mat-typography h1{font:400 24px/32px Roboto,sans-serif;letter-spacing:normal;margin:0 0 16px}.mat-h2,.mat-headline-6,.mat-typography .mat-h2,.mat-typography .mat-headline-6,.mat-typography h2{font:500 20px/32px Roboto,sans-serif;letter-spacing:.0125em;margin:0 0 16px}.mat-h3,.mat-subtitle-1,.mat-typography .mat-h3,.mat-typography .mat-subtitle-1,.mat-typography h3{font:400 16px/28px Roboto,sans-serif;letter-spacing:.009375em;margin:0 0 16px}.mat-h4,.mat-body-1,.mat-typography .mat-h4,.mat-typography .mat-body-1,.mat-typography h4{font:400 16px/24px Roboto,sans-serif;letter-spacing:.03125em;margin:0 0 16px}.mat-h5,.mat-typography .mat-h5,.mat-typography h5{font:400 11.62px/20px Roboto,sans-serif;margin:0 0 12px}.mat-h6,.mat-typography .mat-h6,.mat-typography h6{font:400 9.38px/20px Roboto,sans-serif;margin:0 0 12px}.mat-body-strong,.mat-subtitle-2,.mat-typography .mat-body-strong,.mat-typography .mat-subtitle-2{font:500 14px/22px Roboto,sans-serif;letter-spacing:.0071428571em}.mat-body,.mat-body-2,.mat-typography .mat-body,.mat-typography .mat-body-2,.mat-typography{font:400 14px/20px Roboto,sans-serif;letter-spacing:.0178571429em}.mat-body p,.mat-body-2 p,.mat-typography .mat-body p,.mat-typography .mat-body-2 p,.mat-typography p{margin:0 0 12px}.mat-small,.mat-caption,.mat-typography .mat-small,.mat-typography .mat-caption{font:400 12px/20px Roboto,sans-serif;letter-spacing:.0333333333em}.mat-headline-1,.mat-typography .mat-headline-1{font:300 96px/96px Roboto,sans-serif;letter-spacing:-.015625em;margin:0 0 56px}.mat-headline-2,.mat-typography .mat-headline-2{font:300 60px/60px Roboto,sans-serif;letter-spacing:-.0083333333em;margin:0 0 64px}.mat-headline-3,.mat-typography .mat-headline-3{font:400 48px/50px Roboto,sans-serif;letter-spacing:normal;margin:0 0 64px}.mat-headline-4,.mat-typography .mat-headline-4{font:400 34px/40px Roboto,sans-serif;letter-spacing:.0073529412em;margin:0 0 64px}html{--mat-autocomplete-container-shape: 4px;--mat-autocomplete-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12)}html{--mat-autocomplete-background-color: white}html{--mdc-text-button-container-shape: 4px;--mdc-text-button-keep-touch-target: false}html{--mdc-filled-button-container-shape: 4px;--mdc-filled-button-keep-touch-target: false}html{--mdc-protected-button-container-shape: 4px;--mdc-protected-button-container-elevation-shadow: 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12);--mdc-protected-button-disabled-container-elevation-shadow: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mdc-protected-button-focus-container-elevation-shadow: 0px 2px 4px -1px rgba(0, 0, 0, .2), 0px 4px 5px 0px rgba(0, 0, 0, .14), 0px 1px 10px 0px rgba(0, 0, 0, .12);--mdc-protected-button-hover-container-elevation-shadow: 0px 2px 4px -1px rgba(0, 0, 0, .2), 0px 4px 5px 0px rgba(0, 0, 0, .14), 0px 1px 10px 0px rgba(0, 0, 0, .12);--mdc-protected-button-pressed-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12)}html{--mdc-outlined-button-keep-touch-target: false;--mdc-outlined-button-outline-width: 1px;--mdc-outlined-button-container-shape: 4px}html{--mat-text-button-horizontal-padding: 8px;--mat-text-button-with-icon-horizontal-padding: 8px;--mat-text-button-icon-spacing: 8px;--mat-text-button-icon-offset: 0}html{--mat-filled-button-horizontal-padding: 16px;--mat-filled-button-icon-spacing: 8px;--mat-filled-button-icon-offset: -4px}html{--mat-protected-button-horizontal-padding: 16px;--mat-protected-button-icon-spacing: 8px;--mat-protected-button-icon-offset: -4px}html{--mat-outlined-button-horizontal-padding: 15px;--mat-outlined-button-icon-spacing: 8px;--mat-outlined-button-icon-offset: -4px}html{--mdc-text-button-label-text-color: black;--mdc-text-button-disabled-label-text-color: rgba(0, 0, 0, .38)}html{--mat-text-button-state-layer-color: black;--mat-text-button-disabled-state-layer-color: black;--mat-text-button-ripple-color: rgba(0, 0, 0, .1);--mat-text-button-hover-state-layer-opacity: .04;--mat-text-button-focus-state-layer-opacity: .12;--mat-text-button-pressed-state-layer-opacity: .12}html{--mdc-filled-button-container-color: white;--mdc-filled-button-label-text-color: black;--mdc-filled-button-disabled-container-color: rgba(0, 0, 0, .12);--mdc-filled-button-disabled-label-text-color: rgba(0, 0, 0, .38)}html{--mat-filled-button-state-layer-color: black;--mat-filled-button-disabled-state-layer-color: black;--mat-filled-button-ripple-color: rgba(0, 0, 0, .1);--mat-filled-button-hover-state-layer-opacity: .04;--mat-filled-button-focus-state-layer-opacity: .12;--mat-filled-button-pressed-state-layer-opacity: .12}html{--mdc-protected-button-container-color: white;--mdc-protected-button-label-text-color: black;--mdc-protected-button-disabled-container-color: rgba(0, 0, 0, .12);--mdc-protected-button-disabled-label-text-color: rgba(0, 0, 0, .38)}html{--mat-protected-button-state-layer-color: black;--mat-protected-button-disabled-state-layer-color: black;--mat-protected-button-ripple-color: rgba(0, 0, 0, .1);--mat-protected-button-hover-state-layer-opacity: .04;--mat-protected-button-focus-state-layer-opacity: .12;--mat-protected-button-pressed-state-layer-opacity: .12}html{--mdc-outlined-button-disabled-outline-color: rgba(0, 0, 0, .12);--mdc-outlined-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-outlined-button-label-text-color: black;--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12)}html{--mat-outlined-button-state-layer-color: black;--mat-outlined-button-disabled-state-layer-color: black;--mat-outlined-button-ripple-color: rgba(0, 0, 0, .1);--mat-outlined-button-hover-state-layer-opacity: .04;--mat-outlined-button-focus-state-layer-opacity: .12;--mat-outlined-button-pressed-state-layer-opacity: .12}.mat-mdc-button.mat-primary{--mdc-text-button-label-text-color: #1a73e8}.mat-mdc-button.mat-primary{--mat-text-button-state-layer-color: #1a73e8;--mat-text-button-ripple-color: rgba(26, 115, 232, .1)}.mat-mdc-button.mat-accent{--mdc-text-button-label-text-color: #1a73e8}.mat-mdc-button.mat-accent{--mat-text-button-state-layer-color: #1a73e8;--mat-text-button-ripple-color: rgba(26, 115, 232, .1)}.mat-mdc-button.mat-warn{--mdc-text-button-label-text-color: #f44336}.mat-mdc-button.mat-warn{--mat-text-button-state-layer-color: #f44336;--mat-text-button-ripple-color: rgba(244, 67, 54, .1)}.mat-mdc-unelevated-button.mat-primary{--mdc-filled-button-container-color: #1a73e8;--mdc-filled-button-label-text-color: white}.mat-mdc-unelevated-button.mat-primary{--mat-filled-button-state-layer-color: white;--mat-filled-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-unelevated-button.mat-accent{--mdc-filled-button-container-color: #1a73e8;--mdc-filled-button-label-text-color: white}.mat-mdc-unelevated-button.mat-accent{--mat-filled-button-state-layer-color: white;--mat-filled-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-unelevated-button.mat-warn{--mdc-filled-button-container-color: #f44336;--mdc-filled-button-label-text-color: white}.mat-mdc-unelevated-button.mat-warn{--mat-filled-button-state-layer-color: white;--mat-filled-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-raised-button.mat-primary{--mdc-protected-button-container-color: #1a73e8;--mdc-protected-button-label-text-color: white}.mat-mdc-raised-button.mat-primary{--mat-protected-button-state-layer-color: white;--mat-protected-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-raised-button.mat-accent{--mdc-protected-button-container-color: #1a73e8;--mdc-protected-button-label-text-color: white}.mat-mdc-raised-button.mat-accent{--mat-protected-button-state-layer-color: white;--mat-protected-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-raised-button.mat-warn{--mdc-protected-button-container-color: #f44336;--mdc-protected-button-label-text-color: white}.mat-mdc-raised-button.mat-warn{--mat-protected-button-state-layer-color: white;--mat-protected-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-outlined-button.mat-primary{--mdc-outlined-button-label-text-color: #1a73e8;--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12)}.mat-mdc-outlined-button.mat-primary{--mat-outlined-button-state-layer-color: #1a73e8;--mat-outlined-button-ripple-color: rgba(26, 115, 232, .1)}.mat-mdc-outlined-button.mat-accent{--mdc-outlined-button-label-text-color: #1a73e8;--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12)}.mat-mdc-outlined-button.mat-accent{--mat-outlined-button-state-layer-color: #1a73e8;--mat-outlined-button-ripple-color: rgba(26, 115, 232, .1)}.mat-mdc-outlined-button.mat-warn{--mdc-outlined-button-label-text-color: #f44336;--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12)}.mat-mdc-outlined-button.mat-warn{--mat-outlined-button-state-layer-color: #f44336;--mat-outlined-button-ripple-color: rgba(244, 67, 54, .1)}html{--mdc-text-button-container-height: 36px}html{--mdc-filled-button-container-height: 36px}html{--mdc-protected-button-container-height: 36px}html{--mdc-outlined-button-container-height: 36px}html{--mat-text-button-touch-target-display: block}html{--mat-filled-button-touch-target-display: block}html{--mat-protected-button-touch-target-display: block}html{--mat-outlined-button-touch-target-display: block}html{--mdc-text-button-label-text-font: Roboto, sans-serif;--mdc-text-button-label-text-size: 14px;--mdc-text-button-label-text-tracking: .0892857143em;--mdc-text-button-label-text-weight: 500;--mdc-text-button-label-text-transform: none}html{--mdc-filled-button-label-text-font: Roboto, sans-serif;--mdc-filled-button-label-text-size: 14px;--mdc-filled-button-label-text-tracking: .0892857143em;--mdc-filled-button-label-text-weight: 500;--mdc-filled-button-label-text-transform: none}html{--mdc-protected-button-label-text-font: Roboto, sans-serif;--mdc-protected-button-label-text-size: 14px;--mdc-protected-button-label-text-tracking: .0892857143em;--mdc-protected-button-label-text-weight: 500;--mdc-protected-button-label-text-transform: none}html{--mdc-outlined-button-label-text-font: Roboto, sans-serif;--mdc-outlined-button-label-text-size: 14px;--mdc-outlined-button-label-text-tracking: .0892857143em;--mdc-outlined-button-label-text-weight: 500;--mdc-outlined-button-label-text-transform: none}html{--mdc-elevated-card-container-shape: 4px}html{--mdc-outlined-card-container-shape: 4px;--mdc-outlined-card-outline-width: 1px}html{--mdc-elevated-card-container-color: white;--mdc-elevated-card-container-elevation: 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12)}html{--mdc-outlined-card-container-color: white;--mdc-outlined-card-outline-color: rgba(0, 0, 0, .12);--mdc-outlined-card-container-elevation: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12)}html{--mat-card-subtitle-text-color: rgba(0, 0, 0, .54)}html{--mat-card-title-text-font: Roboto, sans-serif;--mat-card-title-text-line-height: 32px;--mat-card-title-text-size: 20px;--mat-card-title-text-tracking: .0125em;--mat-card-title-text-weight: 500;--mat-card-subtitle-text-font: Roboto, sans-serif;--mat-card-subtitle-text-line-height: 22px;--mat-card-subtitle-text-size: 14px;--mat-card-subtitle-text-tracking: .0071428571em;--mat-card-subtitle-text-weight: 500}html{--mdc-checkbox-disabled-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-state-layer-opacity: .16;--mdc-checkbox-selected-hover-state-layer-opacity: .04;--mdc-checkbox-selected-pressed-state-layer-opacity: .16;--mdc-checkbox-unselected-focus-state-layer-opacity: .16;--mdc-checkbox-unselected-hover-state-layer-opacity: .04;--mdc-checkbox-unselected-pressed-state-layer-opacity: .16}html{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #1a73e8;--mdc-checkbox-selected-hover-icon-color: #1a73e8;--mdc-checkbox-selected-icon-color: #1a73e8;--mdc-checkbox-selected-pressed-icon-color: #1a73e8;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #1a73e8;--mdc-checkbox-selected-hover-state-layer-color: #1a73e8;--mdc-checkbox-selected-pressed-state-layer-color: #1a73e8;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}html{--mat-checkbox-disabled-label-color: rgba(0, 0, 0, .38);--mat-checkbox-label-text-color: rgba(0, 0, 0, .87)}.mat-mdc-checkbox.mat-primary{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #1a73e8;--mdc-checkbox-selected-hover-icon-color: #1a73e8;--mdc-checkbox-selected-icon-color: #1a73e8;--mdc-checkbox-selected-pressed-icon-color: #1a73e8;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #1a73e8;--mdc-checkbox-selected-hover-state-layer-color: #1a73e8;--mdc-checkbox-selected-pressed-state-layer-color: #1a73e8;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-checkbox.mat-warn{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #f44336;--mdc-checkbox-selected-hover-icon-color: #f44336;--mdc-checkbox-selected-icon-color: #f44336;--mdc-checkbox-selected-pressed-icon-color: #f44336;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #f44336;--mdc-checkbox-selected-hover-state-layer-color: #f44336;--mdc-checkbox-selected-pressed-state-layer-color: #f44336;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}html{--mdc-checkbox-state-layer-size: 40px}html{--mat-checkbox-touch-target-display: block}html{--mat-checkbox-label-text-font: Roboto, sans-serif;--mat-checkbox-label-text-line-height: 20px;--mat-checkbox-label-text-size: 14px;--mat-checkbox-label-text-tracking: .0178571429em;--mat-checkbox-label-text-weight: 400}html{--mdc-dialog-container-shape: 4px}html{--mat-dialog-container-elevation-shadow: 0px 11px 15px -7px rgba(0, 0, 0, .2), 0px 24px 38px 3px rgba(0, 0, 0, .14), 0px 9px 46px 8px rgba(0, 0, 0, .12);--mat-dialog-container-max-width: 80vw;--mat-dialog-container-small-max-width: 80vw;--mat-dialog-container-min-width: 0;--mat-dialog-actions-alignment: start;--mat-dialog-actions-padding: 8px;--mat-dialog-content-padding: 20px 24px;--mat-dialog-with-actions-content-padding: 20px 24px;--mat-dialog-headline-padding: 0 24px 9px}html{--mdc-dialog-container-color: white;--mdc-dialog-subhead-color: rgba(0, 0, 0, .87);--mdc-dialog-supporting-text-color: rgba(0, 0, 0, .6)}html{--mdc-dialog-subhead-font: Roboto, sans-serif;--mdc-dialog-subhead-line-height: 32px;--mdc-dialog-subhead-size: 20px;--mdc-dialog-subhead-weight: 500;--mdc-dialog-subhead-tracking: .0125em;--mdc-dialog-supporting-text-font: Roboto, sans-serif;--mdc-dialog-supporting-text-line-height: 24px;--mdc-dialog-supporting-text-size: 16px;--mdc-dialog-supporting-text-weight: 400;--mdc-dialog-supporting-text-tracking: .03125em}html{--mdc-filled-text-field-active-indicator-height: 1px;--mdc-filled-text-field-focus-active-indicator-height: 2px;--mdc-filled-text-field-container-shape: 4px}html{--mdc-outlined-text-field-outline-width: 1px;--mdc-outlined-text-field-focus-outline-width: 2px;--mdc-outlined-text-field-container-shape: 4px}html{--mdc-filled-text-field-caret-color: #1a73e8;--mdc-filled-text-field-focus-active-indicator-color: #1a73e8;--mdc-filled-text-field-focus-label-text-color: rgba(26, 115, 232, .87);--mdc-filled-text-field-container-color: rgb(244.8, 244.8, 244.8);--mdc-filled-text-field-disabled-container-color: rgb(249.9, 249.9, 249.9);--mdc-filled-text-field-label-text-color: rgba(0, 0, 0, .6);--mdc-filled-text-field-hover-label-text-color: rgba(0, 0, 0, .6);--mdc-filled-text-field-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-filled-text-field-input-text-color: rgba(0, 0, 0, .87);--mdc-filled-text-field-disabled-input-text-color: rgba(0, 0, 0, .38);--mdc-filled-text-field-input-text-placeholder-color: rgba(0, 0, 0, .6);--mdc-filled-text-field-error-hover-label-text-color: #f44336;--mdc-filled-text-field-error-focus-label-text-color: #f44336;--mdc-filled-text-field-error-label-text-color: #f44336;--mdc-filled-text-field-error-caret-color: #f44336;--mdc-filled-text-field-active-indicator-color: rgba(0, 0, 0, .42);--mdc-filled-text-field-disabled-active-indicator-color: rgba(0, 0, 0, .06);--mdc-filled-text-field-hover-active-indicator-color: rgba(0, 0, 0, .87);--mdc-filled-text-field-error-active-indicator-color: #f44336;--mdc-filled-text-field-error-focus-active-indicator-color: #f44336;--mdc-filled-text-field-error-hover-active-indicator-color: #f44336}html{--mdc-outlined-text-field-caret-color: #1a73e8;--mdc-outlined-text-field-focus-outline-color: #1a73e8;--mdc-outlined-text-field-focus-label-text-color: rgba(26, 115, 232, .87);--mdc-outlined-text-field-label-text-color: rgba(0, 0, 0, .6);--mdc-outlined-text-field-hover-label-text-color: rgba(0, 0, 0, .6);--mdc-outlined-text-field-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-input-text-color: rgba(0, 0, 0, .87);--mdc-outlined-text-field-disabled-input-text-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-input-text-placeholder-color: rgba(0, 0, 0, .6);--mdc-outlined-text-field-error-caret-color: #f44336;--mdc-outlined-text-field-error-focus-label-text-color: #f44336;--mdc-outlined-text-field-error-label-text-color: #f44336;--mdc-outlined-text-field-error-hover-label-text-color: #f44336;--mdc-outlined-text-field-outline-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-disabled-outline-color: rgba(0, 0, 0, .06);--mdc-outlined-text-field-hover-outline-color: rgba(0, 0, 0, .87);--mdc-outlined-text-field-error-focus-outline-color: #f44336;--mdc-outlined-text-field-error-hover-outline-color: #f44336;--mdc-outlined-text-field-error-outline-color: #f44336}html{--mat-form-field-focus-select-arrow-color: rgba(26, 115, 232, .87);--mat-form-field-disabled-input-text-placeholder-color: rgba(0, 0, 0, .38);--mat-form-field-state-layer-color: rgba(0, 0, 0, .87);--mat-form-field-error-text-color: #f44336;--mat-form-field-select-option-text-color: inherit;--mat-form-field-select-disabled-option-text-color: GrayText;--mat-form-field-leading-icon-color: unset;--mat-form-field-disabled-leading-icon-color: unset;--mat-form-field-trailing-icon-color: unset;--mat-form-field-disabled-trailing-icon-color: unset;--mat-form-field-error-focus-trailing-icon-color: unset;--mat-form-field-error-hover-trailing-icon-color: unset;--mat-form-field-error-trailing-icon-color: unset;--mat-form-field-enabled-select-arrow-color: rgba(0, 0, 0, .54);--mat-form-field-disabled-select-arrow-color: rgba(0, 0, 0, .38);--mat-form-field-hover-state-layer-opacity: .04;--mat-form-field-focus-state-layer-opacity: .08}.mat-mdc-form-field.mat-accent{--mdc-filled-text-field-caret-color: #1a73e8;--mdc-filled-text-field-focus-active-indicator-color: #1a73e8;--mdc-filled-text-field-focus-label-text-color: rgba(26, 115, 232, .87)}.mat-mdc-form-field.mat-accent{--mdc-outlined-text-field-caret-color: #1a73e8;--mdc-outlined-text-field-focus-outline-color: #1a73e8;--mdc-outlined-text-field-focus-label-text-color: rgba(26, 115, 232, .87)}.mat-mdc-form-field.mat-accent{--mat-form-field-focus-select-arrow-color: rgba(26, 115, 232, .87)}.mat-mdc-form-field.mat-warn{--mdc-filled-text-field-caret-color: #f44336;--mdc-filled-text-field-focus-active-indicator-color: #f44336;--mdc-filled-text-field-focus-label-text-color: rgba(244, 67, 54, .87)}.mat-mdc-form-field.mat-warn{--mdc-outlined-text-field-caret-color: #f44336;--mdc-outlined-text-field-focus-outline-color: #f44336;--mdc-outlined-text-field-focus-label-text-color: rgba(244, 67, 54, .87)}.mat-mdc-form-field.mat-warn{--mat-form-field-focus-select-arrow-color: rgba(244, 67, 54, .87)}html{--mat-form-field-container-height: 56px;--mat-form-field-filled-label-display: block;--mat-form-field-container-vertical-padding: 16px;--mat-form-field-filled-with-label-container-padding-top: 24px;--mat-form-field-filled-with-label-container-padding-bottom: 8px}html{--mdc-filled-text-field-label-text-font: Roboto, sans-serif;--mdc-filled-text-field-label-text-size: 16px;--mdc-filled-text-field-label-text-tracking: .03125em;--mdc-filled-text-field-label-text-weight: 400}html{--mdc-outlined-text-field-label-text-font: Roboto, sans-serif;--mdc-outlined-text-field-label-text-size: 16px;--mdc-outlined-text-field-label-text-tracking: .03125em;--mdc-outlined-text-field-label-text-weight: 400}html{--mat-form-field-container-text-font: Roboto, sans-serif;--mat-form-field-container-text-line-height: 24px;--mat-form-field-container-text-size: 16px;--mat-form-field-container-text-tracking: .03125em;--mat-form-field-container-text-weight: 400;--mat-form-field-outlined-label-text-populated-size: 16px;--mat-form-field-subscript-text-font: Roboto, sans-serif;--mat-form-field-subscript-text-line-height: 20px;--mat-form-field-subscript-text-size: 12px;--mat-form-field-subscript-text-tracking: .0333333333em;--mat-form-field-subscript-text-weight: 400}html{--mdc-icon-button-icon-size: 24px}html{--mdc-icon-button-icon-color: inherit;--mdc-icon-button-disabled-icon-color: rgba(0, 0, 0, .38)}html{--mat-icon-button-state-layer-color: black;--mat-icon-button-disabled-state-layer-color: black;--mat-icon-button-ripple-color: rgba(0, 0, 0, .1);--mat-icon-button-hover-state-layer-opacity: .04;--mat-icon-button-focus-state-layer-opacity: .12;--mat-icon-button-pressed-state-layer-opacity: .12}html .mat-mdc-icon-button.mat-primary{--mdc-icon-button-icon-color: #1a73e8}html .mat-mdc-icon-button.mat-primary{--mat-icon-button-state-layer-color: #1a73e8;--mat-icon-button-ripple-color: rgba(26, 115, 232, .1)}html .mat-mdc-icon-button.mat-accent{--mdc-icon-button-icon-color: #1a73e8}html .mat-mdc-icon-button.mat-accent{--mat-icon-button-state-layer-color: #1a73e8;--mat-icon-button-ripple-color: rgba(26, 115, 232, .1)}html .mat-mdc-icon-button.mat-warn{--mdc-icon-button-icon-color: #f44336}html .mat-mdc-icon-button.mat-warn{--mat-icon-button-state-layer-color: #f44336;--mat-icon-button-ripple-color: rgba(244, 67, 54, .1)}html{--mat-icon-button-touch-target-display: block}.mat-mdc-icon-button.mat-mdc-button-base{--mdc-icon-button-state-layer-size: 48px;width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size);padding:12px}html{--mat-icon-color: inherit}.mat-icon.mat-primary,.mat-icon.mat-accent{--mat-icon-color: #1a73e8}.mat-icon.mat-warn{--mat-icon-color: #f44336}html{--mdc-list-list-item-container-shape: 0;--mdc-list-list-item-leading-avatar-shape: 50%;--mdc-list-list-item-container-color: transparent;--mdc-list-list-item-selected-container-color: transparent;--mdc-list-list-item-leading-avatar-color: transparent;--mdc-list-list-item-leading-icon-size: 24px;--mdc-list-list-item-leading-avatar-size: 40px;--mdc-list-list-item-trailing-icon-size: 24px;--mdc-list-list-item-disabled-state-layer-color: transparent;--mdc-list-list-item-disabled-state-layer-opacity: 0;--mdc-list-list-item-disabled-label-text-opacity: .38;--mdc-list-list-item-disabled-leading-icon-opacity: .38;--mdc-list-list-item-disabled-trailing-icon-opacity: .38}html{--mat-list-active-indicator-color: transparent;--mat-list-active-indicator-shape: 4px}html{--mdc-list-list-item-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-supporting-text-color: rgba(0, 0, 0, .54);--mdc-list-list-item-leading-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-trailing-supporting-text-color: rgba(0, 0, 0, .38);--mdc-list-list-item-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-selected-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-disabled-label-text-color: black;--mdc-list-list-item-disabled-leading-icon-color: black;--mdc-list-list-item-disabled-trailing-icon-color: black;--mdc-list-list-item-hover-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-hover-leading-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-hover-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-focus-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-hover-state-layer-color: black;--mdc-list-list-item-hover-state-layer-opacity: .04;--mdc-list-list-item-focus-state-layer-color: black;--mdc-list-list-item-focus-state-layer-opacity: .12}.mdc-list-item__start,.mdc-list-item__end,.mat-accent .mdc-list-item__start,.mat-accent .mdc-list-item__end{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-focus-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #1a73e8;--mdc-radio-selected-hover-icon-color: #1a73e8;--mdc-radio-selected-icon-color: #1a73e8;--mdc-radio-selected-pressed-icon-color: #1a73e8}.mat-warn .mdc-list-item__start,.mat-warn .mdc-list-item__end{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-focus-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #f44336;--mdc-radio-selected-hover-icon-color: #f44336;--mdc-radio-selected-icon-color: #f44336;--mdc-radio-selected-pressed-icon-color: #f44336}.mat-mdc-list-option,.mat-mdc-list-option.mat-accent{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #1a73e8;--mdc-checkbox-selected-hover-icon-color: #1a73e8;--mdc-checkbox-selected-icon-color: #1a73e8;--mdc-checkbox-selected-pressed-icon-color: #1a73e8;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #1a73e8;--mdc-checkbox-selected-hover-state-layer-color: #1a73e8;--mdc-checkbox-selected-pressed-state-layer-color: #1a73e8;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-list-option.mat-warn{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #f44336;--mdc-checkbox-selected-hover-icon-color: #f44336;--mdc-checkbox-selected-icon-color: #f44336;--mdc-checkbox-selected-pressed-icon-color: #f44336;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #f44336;--mdc-checkbox-selected-hover-state-layer-color: #f44336;--mdc-checkbox-selected-pressed-state-layer-color: #f44336;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--selected .mdc-list-item__primary-text,.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--selected .mdc-list-item__start,.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--activated .mdc-list-item__primary-text,.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--activated .mdc-list-item__start{color:#1a73e8}.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__start,.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__content,.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__end{opacity:1}html{--mdc-list-list-item-one-line-container-height: 48px;--mdc-list-list-item-two-line-container-height: 64px;--mdc-list-list-item-three-line-container-height: 88px}html{--mat-list-list-item-leading-icon-start-space: 16px;--mat-list-list-item-leading-icon-end-space: 32px}.mdc-list-item__start,.mdc-list-item__end{--mdc-radio-state-layer-size: 40px}.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line,.mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line,.mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line{height:56px}.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines,.mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines,.mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines{height:72px}html{--mdc-list-list-item-label-text-font: Roboto, sans-serif;--mdc-list-list-item-label-text-line-height: 24px;--mdc-list-list-item-label-text-size: 16px;--mdc-list-list-item-label-text-tracking: .03125em;--mdc-list-list-item-label-text-weight: 400;--mdc-list-list-item-supporting-text-font: Roboto, sans-serif;--mdc-list-list-item-supporting-text-line-height: 20px;--mdc-list-list-item-supporting-text-size: 14px;--mdc-list-list-item-supporting-text-tracking: .0178571429em;--mdc-list-list-item-supporting-text-weight: 400;--mdc-list-list-item-trailing-supporting-text-font: Roboto, sans-serif;--mdc-list-list-item-trailing-supporting-text-line-height: 20px;--mdc-list-list-item-trailing-supporting-text-size: 12px;--mdc-list-list-item-trailing-supporting-text-tracking: .0333333333em;--mdc-list-list-item-trailing-supporting-text-weight: 400}.mdc-list-group__subheader{font:400 16px/28px Roboto,sans-serif;letter-spacing:.009375em}html{--mat-menu-container-shape: 4px;--mat-menu-divider-bottom-spacing: 0;--mat-menu-divider-top-spacing: 0;--mat-menu-item-spacing: 16px;--mat-menu-item-icon-size: 24px;--mat-menu-item-leading-spacing: 16px;--mat-menu-item-trailing-spacing: 16px;--mat-menu-item-with-icon-leading-spacing: 16px;--mat-menu-item-with-icon-trailing-spacing: 16px;--mat-menu-base-elevation-level: 8}html{--mat-menu-item-label-text-color: rgba(0, 0, 0, .87);--mat-menu-item-icon-color: rgba(0, 0, 0, .87);--mat-menu-item-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-menu-item-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-menu-container-color: white;--mat-menu-divider-color: rgba(0, 0, 0, .12)}html{--mat-menu-item-label-text-font: Roboto, sans-serif;--mat-menu-item-label-text-size: 16px;--mat-menu-item-label-text-tracking: .03125em;--mat-menu-item-label-text-line-height: 24px;--mat-menu-item-label-text-weight: 400}html{--mdc-circular-progress-active-indicator-width: 4px;--mdc-circular-progress-size: 48px}html,html .mat-accent{--mdc-circular-progress-active-indicator-color: #1a73e8}html .mat-warn{--mdc-circular-progress-active-indicator-color: #f44336}html{--mdc-radio-disabled-selected-icon-opacity: .38;--mdc-radio-disabled-unselected-icon-opacity: .38;--mdc-radio-state-layer-size: 40px}.mat-mdc-radio-button.mat-primary{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-focus-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #1a73e8;--mdc-radio-selected-hover-icon-color: #1a73e8;--mdc-radio-selected-icon-color: #1a73e8;--mdc-radio-selected-pressed-icon-color: #1a73e8}.mat-mdc-radio-button.mat-primary{--mat-radio-ripple-color: black;--mat-radio-checked-ripple-color: #1a73e8;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38);--mat-radio-label-text-color: rgba(0, 0, 0, .87)}.mat-mdc-radio-button.mat-accent{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-focus-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #1a73e8;--mdc-radio-selected-hover-icon-color: #1a73e8;--mdc-radio-selected-icon-color: #1a73e8;--mdc-radio-selected-pressed-icon-color: #1a73e8}.mat-mdc-radio-button.mat-accent{--mat-radio-ripple-color: black;--mat-radio-checked-ripple-color: #1a73e8;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38);--mat-radio-label-text-color: rgba(0, 0, 0, .87)}.mat-mdc-radio-button.mat-warn{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-focus-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #f44336;--mdc-radio-selected-hover-icon-color: #f44336;--mdc-radio-selected-icon-color: #f44336;--mdc-radio-selected-pressed-icon-color: #f44336}.mat-mdc-radio-button.mat-warn{--mat-radio-ripple-color: black;--mat-radio-checked-ripple-color: #f44336;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38);--mat-radio-label-text-color: rgba(0, 0, 0, .87)}html{--mdc-radio-state-layer-size: 40px}html{--mat-radio-touch-target-display: block}html{--mat-radio-label-text-font: Roboto, sans-serif;--mat-radio-label-text-line-height: 20px;--mat-radio-label-text-size: 14px;--mat-radio-label-text-tracking: .0178571429em;--mat-radio-label-text-weight: 400}html{--mat-select-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12)}html,html .mat-mdc-form-field.mat-accent{--mat-select-panel-background-color: white;--mat-select-enabled-trigger-text-color: rgba(0, 0, 0, .87);--mat-select-disabled-trigger-text-color: rgba(0, 0, 0, .38);--mat-select-placeholder-text-color: rgba(0, 0, 0, .6);--mat-select-enabled-arrow-color: rgba(0, 0, 0, .54);--mat-select-disabled-arrow-color: rgba(0, 0, 0, .38);--mat-select-focused-arrow-color: rgba(26, 115, 232, .87);--mat-select-invalid-arrow-color: rgba(244, 67, 54, .87)}html .mat-mdc-form-field.mat-warn{--mat-select-panel-background-color: white;--mat-select-enabled-trigger-text-color: rgba(0, 0, 0, .87);--mat-select-disabled-trigger-text-color: rgba(0, 0, 0, .38);--mat-select-placeholder-text-color: rgba(0, 0, 0, .6);--mat-select-enabled-arrow-color: rgba(0, 0, 0, .54);--mat-select-disabled-arrow-color: rgba(0, 0, 0, .38);--mat-select-focused-arrow-color: rgba(244, 67, 54, .87);--mat-select-invalid-arrow-color: rgba(244, 67, 54, .87)}html{--mat-select-arrow-transform: translateY(-8px)}html{--mat-select-trigger-text-font: Roboto, sans-serif;--mat-select-trigger-text-line-height: 24px;--mat-select-trigger-text-size: 16px;--mat-select-trigger-text-tracking: .03125em;--mat-select-trigger-text-weight: 400}html{--mat-sidenav-container-shape: 0;--mat-sidenav-container-elevation-shadow: 0px 8px 10px -5px rgba(0, 0, 0, .2), 0px 16px 24px 2px rgba(0, 0, 0, .14), 0px 6px 30px 5px rgba(0, 0, 0, .12);--mat-sidenav-container-width: auto}html{--mat-sidenav-container-divider-color: rgba(0, 0, 0, .12);--mat-sidenav-container-background-color: white;--mat-sidenav-container-text-color: rgba(0, 0, 0, .87);--mat-sidenav-content-background-color: #fafafa;--mat-sidenav-content-text-color: rgba(0, 0, 0, .87);--mat-sidenav-scrim-color: rgba(0, 0, 0, .6)}html{--mdc-switch-disabled-selected-icon-opacity: .38;--mdc-switch-disabled-track-opacity: .12;--mdc-switch-disabled-unselected-icon-opacity: .38;--mdc-switch-handle-height: 20px;--mdc-switch-handle-shape: 10px;--mdc-switch-handle-width: 20px;--mdc-switch-selected-icon-size: 18px;--mdc-switch-track-height: 14px;--mdc-switch-track-shape: 7px;--mdc-switch-track-width: 36px;--mdc-switch-unselected-icon-size: 18px;--mdc-switch-selected-focus-state-layer-opacity: .12;--mdc-switch-selected-hover-state-layer-opacity: .04;--mdc-switch-selected-pressed-state-layer-opacity: .1;--mdc-switch-unselected-focus-state-layer-opacity: .12;--mdc-switch-unselected-hover-state-layer-opacity: .04;--mdc-switch-unselected-pressed-state-layer-opacity: .1}html .mat-mdc-slide-toggle{--mat-switch-disabled-selected-handle-opacity: .38;--mat-switch-disabled-unselected-handle-opacity: .38;--mat-switch-unselected-handle-size: 20px;--mat-switch-selected-handle-size: 20px;--mat-switch-pressed-handle-size: 20px;--mat-switch-with-icon-handle-size: 20px;--mat-switch-selected-handle-horizontal-margin: 0;--mat-switch-selected-with-icon-handle-horizontal-margin: 0;--mat-switch-selected-pressed-handle-horizontal-margin: 0;--mat-switch-unselected-handle-horizontal-margin: 0;--mat-switch-unselected-with-icon-handle-horizontal-margin: 0;--mat-switch-unselected-pressed-handle-horizontal-margin: 0;--mat-switch-visible-track-opacity: 1;--mat-switch-hidden-track-opacity: 1;--mat-switch-visible-track-transition: transform 75ms 0ms cubic-bezier(0, 0, .2, 1);--mat-switch-hidden-track-transition: transform 75ms 0ms cubic-bezier(.4, 0, .6, 1);--mat-switch-track-outline-width: 1px;--mat-switch-track-outline-color: transparent;--mat-switch-selected-track-outline-width: 1px;--mat-switch-selected-track-outline-color: transparent;--mat-switch-disabled-unselected-track-outline-width: 1px;--mat-switch-disabled-unselected-track-outline-color: transparent}html{--mdc-switch-selected-focus-state-layer-color: #1a73e8;--mdc-switch-selected-handle-color: #1a73e8;--mdc-switch-selected-hover-state-layer-color: #1a73e8;--mdc-switch-selected-pressed-state-layer-color: #1a73e8;--mdc-switch-selected-focus-handle-color: #174ea6;--mdc-switch-selected-hover-handle-color: #174ea6;--mdc-switch-selected-pressed-handle-color: #174ea6;--mdc-switch-selected-focus-track-color: #8ab4f8;--mdc-switch-selected-hover-track-color: #8ab4f8;--mdc-switch-selected-pressed-track-color: #8ab4f8;--mdc-switch-selected-track-color: #8ab4f8;--mdc-switch-disabled-selected-handle-color: #424242;--mdc-switch-disabled-selected-icon-color: #fff;--mdc-switch-disabled-selected-track-color: #424242;--mdc-switch-disabled-unselected-handle-color: #424242;--mdc-switch-disabled-unselected-icon-color: #fff;--mdc-switch-disabled-unselected-track-color: #424242;--mdc-switch-handle-surface-color: #fff;--mdc-switch-selected-icon-color: #fff;--mdc-switch-unselected-focus-handle-color: #212121;--mdc-switch-unselected-focus-state-layer-color: #424242;--mdc-switch-unselected-focus-track-color: #e0e0e0;--mdc-switch-unselected-handle-color: #616161;--mdc-switch-unselected-hover-handle-color: #212121;--mdc-switch-unselected-hover-state-layer-color: #424242;--mdc-switch-unselected-hover-track-color: #e0e0e0;--mdc-switch-unselected-icon-color: #fff;--mdc-switch-unselected-pressed-handle-color: #212121;--mdc-switch-unselected-pressed-state-layer-color: #424242;--mdc-switch-unselected-pressed-track-color: #e0e0e0;--mdc-switch-unselected-track-color: #e0e0e0;--mdc-switch-handle-elevation-shadow: 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mdc-switch-disabled-handle-elevation-shadow: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12)}html{--mdc-switch-disabled-label-text-color: rgba(0, 0, 0, .38)}html .mat-mdc-slide-toggle{--mat-switch-label-text-color: rgba(0, 0, 0, .87)}html .mat-mdc-slide-toggle.mat-accent{--mdc-switch-selected-focus-state-layer-color: #1a73e8;--mdc-switch-selected-handle-color: #1a73e8;--mdc-switch-selected-hover-state-layer-color: #1a73e8;--mdc-switch-selected-pressed-state-layer-color: #1a73e8;--mdc-switch-selected-focus-handle-color: #174ea6;--mdc-switch-selected-hover-handle-color: #174ea6;--mdc-switch-selected-pressed-handle-color: #174ea6;--mdc-switch-selected-focus-track-color: #8ab4f8;--mdc-switch-selected-hover-track-color: #8ab4f8;--mdc-switch-selected-pressed-track-color: #8ab4f8;--mdc-switch-selected-track-color: #8ab4f8}html .mat-mdc-slide-toggle.mat-warn{--mdc-switch-selected-focus-state-layer-color: #e53935;--mdc-switch-selected-handle-color: #e53935;--mdc-switch-selected-hover-state-layer-color: #e53935;--mdc-switch-selected-pressed-state-layer-color: #e53935;--mdc-switch-selected-focus-handle-color: #b71c1c;--mdc-switch-selected-hover-handle-color: #b71c1c;--mdc-switch-selected-pressed-handle-color: #b71c1c;--mdc-switch-selected-focus-track-color: #e57373;--mdc-switch-selected-hover-track-color: #e57373;--mdc-switch-selected-pressed-track-color: #e57373;--mdc-switch-selected-track-color: #e57373}html{--mdc-switch-state-layer-size: 40px}html .mat-mdc-slide-toggle{--mat-switch-label-text-font: Roboto, sans-serif;--mat-switch-label-text-line-height: 20px;--mat-switch-label-text-size: 14px;--mat-switch-label-text-tracking: .0178571429em;--mat-switch-label-text-weight: 400}html{--mdc-snackbar-container-shape: 4px}html{--mdc-snackbar-container-color: #333333;--mdc-snackbar-supporting-text-color: rgba(255, 255, 255, .87)}html{--mat-snack-bar-button-color: #1a73e8}html{--mdc-snackbar-supporting-text-font: Roboto, sans-serif;--mdc-snackbar-supporting-text-line-height: 20px;--mdc-snackbar-supporting-text-size: 14px;--mdc-snackbar-supporting-text-weight: 400}html{--mdc-plain-tooltip-container-shape: 4px;--mdc-plain-tooltip-supporting-text-line-height: 16px}html{--mdc-plain-tooltip-container-color: #616161;--mdc-plain-tooltip-supporting-text-color: #fff}html{--mdc-plain-tooltip-supporting-text-font: Roboto, sans-serif;--mdc-plain-tooltip-supporting-text-size: 12px;--mdc-plain-tooltip-supporting-text-weight: 400;--mdc-plain-tooltip-supporting-text-tracking: .0333333333em}html{--mat-tree-container-background-color: white;--mat-tree-node-text-color: rgba(0, 0, 0, .87)}html{--mat-tree-node-min-height: 48px}html{--mat-tree-node-text-font: Roboto, sans-serif;--mat-tree-node-text-size: 14px;--mat-tree-node-text-weight: 400}body{font-size:16px;font-weight:400;line-height:24px;font-family:Roboto,sans-serif;letter-spacing:.03125em;background-color:#fafafa}html,body{margin:0;height:100%;line-height:normal;letter-spacing:normal;overflow:hidden;font-family:Google Sans Text,Arial,Helvetica,sans-serif;background-color:#fff}input,textarea{font-family:Google Sans Text,Arial,Helvetica,sans-serif}button>span{font-family:Google Sans Text,Arial,Helvetica,sans-serif;letter-spacing:normal}@font-face{font-family:Material Icons;font-style:normal;font-weight:400;src:url(/static_files/material_icon.woff2) format("woff2")}@font-face{font-family:Google Material Icons;font-style:normal;font-weight:400;src:url(/static_files/google_material_icon.woff2) format("woff2")}.material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;font-feature-settings:"liga";-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.google-material-icons{font-family:Google Material Icons;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:400;src:url(/static_files/5aUo9-KzpRiLCAt4Unrc-xIKmCU5qE9GjU9GixI.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:400;src:url(/static_files/5aUo9-KzpRiLCAt4Unrc-xIKmCU5qE9Gik9GixI.woff2) format("woff2");unicode-range:U+0370-03FF}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:400;src:url(/static_files/5aUo9-KzpRiLCAt4Unrc-xIKmCU5qE9Ghk9GixI.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:400;src:url(/static_files/5aUo9-KzpRiLCAt4Unrc-xIKmCU5qE9Gh09GixI.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:400;src:url(/static_files/5aUo9-KzpRiLCAt4Unrc-xIKmCU5qE9GiU9G.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:500;src:url(/static_files/5aUr9-KzpRiLCAt4Unrc-xIKmCU5qE9OemxTsDO_PZ0.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:500;src:url(/static_files/5aUr9-KzpRiLCAt4Unrc-xIKmCU5qE9OemxTtzO_PZ0.woff2) format("woff2");unicode-range:U+0370-03FF}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:500;src:url(/static_files/5aUr9-KzpRiLCAt4Unrc-xIKmCU5qE9OemxTuzO_PZ0.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:500;src:url(/static_files/5aUr9-KzpRiLCAt4Unrc-xIKmCU5qE9OemxTujO_PZ0.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:500;src:url(/static_files/5aUr9-KzpRiLCAt4Unrc-xIKmCU5qE9OemxTtDO_.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:700;src:url(/static_files/5aUr9-KzpRiLCAt4Unrc-xIKmCU5qE9OMmpTsDO_PZ0.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:700;src:url(/static_files/5aUr9-KzpRiLCAt4Unrc-xIKmCU5qE9OMmpTtzO_PZ0.woff2) format("woff2");unicode-range:U+0370-03FF}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:700;src:url(/static_files/5aUr9-KzpRiLCAt4Unrc-xIKmCU5qE9OMmpTuzO_PZ0.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:700;src:url(/static_files/5aUr9-KzpRiLCAt4Unrc-xIKmCU5qE9OMmpTujO_PZ0.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:700;src:url(/static_files/5aUr9-KzpRiLCAt4Unrc-xIKmCU5qE9OMmpTtDO_.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:400;src:url(/static_files/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qE52i1dC.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:400;src:url(/static_files/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEl2i1dC.woff2) format("woff2");unicode-range:U+0370-03FF}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:400;src:url(/static_files/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEV2i1dC.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:400;src:url(/static_files/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qER2i1dC.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:400;src:url(/static_files/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEp2iw.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:500;src:url(/static_files/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmxjtiu7.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:500;src:url(/static_files/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmtjtiu7.woff2) format("woff2");unicode-range:U+0370-03FF}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:500;src:url(/static_files/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmdjtiu7.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:500;src:url(/static_files/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmZjtiu7.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:500;src:url(/static_files/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmhjtg.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:700;src:url(/static_files/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmxjtiu7.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:700;src:url(/static_files/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmtjtiu7.woff2) format("woff2");unicode-range:U+0370-03FF}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:700;src:url(/static_files/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmdjtiu7.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:700;src:url(/static_files/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmZjtiu7.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:700;src:url(/static_files/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmhjtg.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD} diff --git a/src/server/package/src/model_explorer/web_app/styles-GNTXUQ3P.css b/src/server/package/src/model_explorer/web_app/styles-GNTXUQ3P.css deleted file mode 100644 index 4fcd920d..00000000 --- a/src/server/package/src/model_explorer/web_app/styles-GNTXUQ3P.css +++ /dev/null @@ -1 +0,0 @@ -.mat-ripple{overflow:hidden;position:relative}.mat-ripple:not(:empty){transform:translateZ(0)}.mat-ripple.mat-ripple-unbounded{overflow:visible}.mat-ripple-element{position:absolute;border-radius:50%;pointer-events:none;transition:opacity,transform 0ms cubic-bezier(0,0,.2,1);transform:scale3d(0,0,0);background-color:var(--mat-ripple-color, rgba(0, 0, 0, .1))}.cdk-high-contrast-active .mat-ripple-element,.cdk-drag-preview .mat-ripple-element,.cdk-drag-placeholder .mat-ripple-element{display:none}.cdk-visually-hidden{border:0;clip:rect(0 0 0 0);height:1px;margin:-1px;overflow:hidden;padding:0;position:absolute;width:1px;white-space:nowrap;outline:0;-webkit-appearance:none;-moz-appearance:none;left:0}[dir=rtl] .cdk-visually-hidden{left:auto;right:0}.cdk-overlay-container,.cdk-global-overlay-wrapper{pointer-events:none;top:0;left:0;height:100%;width:100%}.cdk-overlay-container{position:fixed;z-index:1000}.cdk-overlay-container:empty{display:none}.cdk-global-overlay-wrapper{display:flex;position:absolute;z-index:1000}.cdk-overlay-pane{position:absolute;pointer-events:auto;box-sizing:border-box;z-index:1000;display:flex;max-width:100%;max-height:100%}.cdk-overlay-backdrop{position:absolute;inset:0;z-index:1000;pointer-events:auto;-webkit-tap-highlight-color:transparent;transition:opacity .4s cubic-bezier(.25,.8,.25,1);opacity:0}.cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:1}.cdk-high-contrast-active .cdk-overlay-backdrop.cdk-overlay-backdrop-showing{opacity:.6}.cdk-overlay-dark-backdrop{background:#00000052}.cdk-overlay-transparent-backdrop{transition:visibility 1ms linear,opacity 1ms linear;visibility:hidden;opacity:1}.cdk-overlay-transparent-backdrop.cdk-overlay-backdrop-showing{opacity:0;visibility:visible}.cdk-overlay-backdrop-noop-animation{transition:none}.cdk-overlay-connected-position-bounding-box{position:absolute;z-index:1000;display:flex;flex-direction:column;min-width:1px;min-height:1px}.cdk-global-scrollblock{position:fixed;width:100%;overflow-y:scroll}textarea.cdk-textarea-autosize{resize:none}textarea.cdk-textarea-autosize-measuring{padding:2px 0!important;box-sizing:content-box!important;height:auto!important;overflow:hidden!important}textarea.cdk-textarea-autosize-measuring-firefox{padding:2px 0!important;box-sizing:content-box!important;height:0!important}@keyframes cdk-text-field-autofill-start{}@keyframes cdk-text-field-autofill-end{}.cdk-text-field-autofill-monitored:-webkit-autofill{animation:cdk-text-field-autofill-start 0s 1ms}.cdk-text-field-autofill-monitored:not(:-webkit-autofill){animation:cdk-text-field-autofill-end 0s 1ms}.mat-focus-indicator{position:relative}.mat-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-focus-indicator-display, none);border:var(--mat-focus-indicator-border-width, 3px) var(--mat-focus-indicator-border-style, solid) var(--mat-focus-indicator-border-color, transparent);border-radius:var(--mat-focus-indicator-border-radius, 4px)}.mat-focus-indicator:focus:before{content:""}.cdk-high-contrast-active{--mat-focus-indicator-display: block}.mat-mdc-focus-indicator{position:relative}.mat-mdc-focus-indicator:before{inset:0;position:absolute;box-sizing:border-box;pointer-events:none;display:var(--mat-mdc-focus-indicator-display, none);border:var(--mat-mdc-focus-indicator-border-width, 3px) var(--mat-mdc-focus-indicator-border-style, solid) var(--mat-mdc-focus-indicator-border-color, transparent);border-radius:var(--mat-mdc-focus-indicator-border-radius, 4px)}.mat-mdc-focus-indicator:focus:before{content:""}.cdk-high-contrast-active{--mat-mdc-focus-indicator-display: block}.mat-app-background{background-color:var(--mat-app-background-color, transparent);color:var(--mat-app-text-color, inherit)}.mat-elevation-z0,.mat-mdc-elevation-specific.mat-elevation-z0{box-shadow:var(--mat-app-elevation-shadow-level-0, none)}.mat-elevation-z1,.mat-mdc-elevation-specific.mat-elevation-z1{box-shadow:var(--mat-app-elevation-shadow-level-1, none)}.mat-elevation-z2,.mat-mdc-elevation-specific.mat-elevation-z2{box-shadow:var(--mat-app-elevation-shadow-level-2, none)}.mat-elevation-z3,.mat-mdc-elevation-specific.mat-elevation-z3{box-shadow:var(--mat-app-elevation-shadow-level-3, none)}.mat-elevation-z4,.mat-mdc-elevation-specific.mat-elevation-z4{box-shadow:var(--mat-app-elevation-shadow-level-4, none)}.mat-elevation-z5,.mat-mdc-elevation-specific.mat-elevation-z5{box-shadow:var(--mat-app-elevation-shadow-level-5, none)}.mat-elevation-z6,.mat-mdc-elevation-specific.mat-elevation-z6{box-shadow:var(--mat-app-elevation-shadow-level-6, none)}.mat-elevation-z7,.mat-mdc-elevation-specific.mat-elevation-z7{box-shadow:var(--mat-app-elevation-shadow-level-7, none)}.mat-elevation-z8,.mat-mdc-elevation-specific.mat-elevation-z8{box-shadow:var(--mat-app-elevation-shadow-level-8, none)}.mat-elevation-z9,.mat-mdc-elevation-specific.mat-elevation-z9{box-shadow:var(--mat-app-elevation-shadow-level-9, none)}.mat-elevation-z10,.mat-mdc-elevation-specific.mat-elevation-z10{box-shadow:var(--mat-app-elevation-shadow-level-10, none)}.mat-elevation-z11,.mat-mdc-elevation-specific.mat-elevation-z11{box-shadow:var(--mat-app-elevation-shadow-level-11, none)}.mat-elevation-z12,.mat-mdc-elevation-specific.mat-elevation-z12{box-shadow:var(--mat-app-elevation-shadow-level-12, none)}.mat-elevation-z13,.mat-mdc-elevation-specific.mat-elevation-z13{box-shadow:var(--mat-app-elevation-shadow-level-13, none)}.mat-elevation-z14,.mat-mdc-elevation-specific.mat-elevation-z14{box-shadow:var(--mat-app-elevation-shadow-level-14, none)}.mat-elevation-z15,.mat-mdc-elevation-specific.mat-elevation-z15{box-shadow:var(--mat-app-elevation-shadow-level-15, none)}.mat-elevation-z16,.mat-mdc-elevation-specific.mat-elevation-z16{box-shadow:var(--mat-app-elevation-shadow-level-16, none)}.mat-elevation-z17,.mat-mdc-elevation-specific.mat-elevation-z17{box-shadow:var(--mat-app-elevation-shadow-level-17, none)}.mat-elevation-z18,.mat-mdc-elevation-specific.mat-elevation-z18{box-shadow:var(--mat-app-elevation-shadow-level-18, none)}.mat-elevation-z19,.mat-mdc-elevation-specific.mat-elevation-z19{box-shadow:var(--mat-app-elevation-shadow-level-19, none)}.mat-elevation-z20,.mat-mdc-elevation-specific.mat-elevation-z20{box-shadow:var(--mat-app-elevation-shadow-level-20, none)}.mat-elevation-z21,.mat-mdc-elevation-specific.mat-elevation-z21{box-shadow:var(--mat-app-elevation-shadow-level-21, none)}.mat-elevation-z22,.mat-mdc-elevation-specific.mat-elevation-z22{box-shadow:var(--mat-app-elevation-shadow-level-22, none)}.mat-elevation-z23,.mat-mdc-elevation-specific.mat-elevation-z23{box-shadow:var(--mat-app-elevation-shadow-level-23, none)}.mat-elevation-z24,.mat-mdc-elevation-specific.mat-elevation-z24{box-shadow:var(--mat-app-elevation-shadow-level-24, none)}.mat-theme-loaded-marker{display:none}html{--mat-ripple-color: rgba(0, 0, 0, .1)}html,.mat-accent{--mat-option-selected-state-label-text-color: #1a73e8;--mat-option-label-text-color: rgba(0, 0, 0, .87);--mat-option-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-option-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-option-selected-state-layer-color: rgba(0, 0, 0, .04)}.mat-warn{--mat-option-selected-state-label-text-color: #f44336;--mat-option-label-text-color: rgba(0, 0, 0, .87);--mat-option-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-option-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-option-selected-state-layer-color: rgba(0, 0, 0, .04)}html{--mat-optgroup-label-text-color: rgba(0, 0, 0, .87)}.mat-primary,html,.mat-accent{--mat-full-pseudo-checkbox-selected-icon-color: #1a73e8;--mat-full-pseudo-checkbox-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mat-full-pseudo-checkbox-disabled-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-disabled-unselected-icon-color: #b0b0b0;--mat-full-pseudo-checkbox-disabled-selected-icon-color: #b0b0b0;--mat-minimal-pseudo-checkbox-selected-checkmark-color: #1a73e8;--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: #b0b0b0}.mat-warn{--mat-full-pseudo-checkbox-selected-icon-color: #f44336;--mat-full-pseudo-checkbox-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mat-full-pseudo-checkbox-disabled-selected-checkmark-color: #fafafa;--mat-full-pseudo-checkbox-disabled-unselected-icon-color: #b0b0b0;--mat-full-pseudo-checkbox-disabled-selected-icon-color: #b0b0b0;--mat-minimal-pseudo-checkbox-selected-checkmark-color: #f44336;--mat-minimal-pseudo-checkbox-disabled-selected-checkmark-color: #b0b0b0}html{--mat-app-background-color: #fafafa;--mat-app-text-color: rgba(0, 0, 0, .87);--mat-app-elevation-shadow-level-0: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-1: 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-2: 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-3: 0px 3px 3px -2px rgba(0, 0, 0, .2), 0px 3px 4px 0px rgba(0, 0, 0, .14), 0px 1px 8px 0px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-4: 0px 2px 4px -1px rgba(0, 0, 0, .2), 0px 4px 5px 0px rgba(0, 0, 0, .14), 0px 1px 10px 0px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-5: 0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 5px 8px 0px rgba(0, 0, 0, .14), 0px 1px 14px 0px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-6: 0px 3px 5px -1px rgba(0, 0, 0, .2), 0px 6px 10px 0px rgba(0, 0, 0, .14), 0px 1px 18px 0px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-7: 0px 4px 5px -2px rgba(0, 0, 0, .2), 0px 7px 10px 1px rgba(0, 0, 0, .14), 0px 2px 16px 1px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-8: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-9: 0px 5px 6px -3px rgba(0, 0, 0, .2), 0px 9px 12px 1px rgba(0, 0, 0, .14), 0px 3px 16px 2px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-10: 0px 6px 6px -3px rgba(0, 0, 0, .2), 0px 10px 14px 1px rgba(0, 0, 0, .14), 0px 4px 18px 3px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-11: 0px 6px 7px -4px rgba(0, 0, 0, .2), 0px 11px 15px 1px rgba(0, 0, 0, .14), 0px 4px 20px 3px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-12: 0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 12px 17px 2px rgba(0, 0, 0, .14), 0px 5px 22px 4px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-13: 0px 7px 8px -4px rgba(0, 0, 0, .2), 0px 13px 19px 2px rgba(0, 0, 0, .14), 0px 5px 24px 4px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-14: 0px 7px 9px -4px rgba(0, 0, 0, .2), 0px 14px 21px 2px rgba(0, 0, 0, .14), 0px 5px 26px 4px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-15: 0px 8px 9px -5px rgba(0, 0, 0, .2), 0px 15px 22px 2px rgba(0, 0, 0, .14), 0px 6px 28px 5px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-16: 0px 8px 10px -5px rgba(0, 0, 0, .2), 0px 16px 24px 2px rgba(0, 0, 0, .14), 0px 6px 30px 5px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-17: 0px 8px 11px -5px rgba(0, 0, 0, .2), 0px 17px 26px 2px rgba(0, 0, 0, .14), 0px 6px 32px 5px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-18: 0px 9px 11px -5px rgba(0, 0, 0, .2), 0px 18px 28px 2px rgba(0, 0, 0, .14), 0px 7px 34px 6px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-19: 0px 9px 12px -6px rgba(0, 0, 0, .2), 0px 19px 29px 2px rgba(0, 0, 0, .14), 0px 7px 36px 6px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-20: 0px 10px 13px -6px rgba(0, 0, 0, .2), 0px 20px 31px 3px rgba(0, 0, 0, .14), 0px 8px 38px 7px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-21: 0px 10px 13px -6px rgba(0, 0, 0, .2), 0px 21px 33px 3px rgba(0, 0, 0, .14), 0px 8px 40px 7px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-22: 0px 10px 14px -6px rgba(0, 0, 0, .2), 0px 22px 35px 3px rgba(0, 0, 0, .14), 0px 8px 42px 7px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-23: 0px 11px 14px -7px rgba(0, 0, 0, .2), 0px 23px 36px 3px rgba(0, 0, 0, .14), 0px 9px 44px 8px rgba(0, 0, 0, .12);--mat-app-elevation-shadow-level-24: 0px 11px 15px -7px rgba(0, 0, 0, .2), 0px 24px 38px 3px rgba(0, 0, 0, .14), 0px 9px 46px 8px rgba(0, 0, 0, .12)}html{--mat-option-label-text-font: Roboto, sans-serif;--mat-option-label-text-line-height: 24px;--mat-option-label-text-size: 16px;--mat-option-label-text-tracking: .03125em;--mat-option-label-text-weight: 400}html{--mat-optgroup-label-text-font: Roboto, sans-serif;--mat-optgroup-label-text-line-height: 24px;--mat-optgroup-label-text-size: 16px;--mat-optgroup-label-text-tracking: .03125em;--mat-optgroup-label-text-weight: 400}.mat-h1,.mat-headline-5,.mat-typography .mat-h1,.mat-typography .mat-headline-5,.mat-typography h1{font:400 24px/32px Roboto,sans-serif;letter-spacing:normal;margin:0 0 16px}.mat-h2,.mat-headline-6,.mat-typography .mat-h2,.mat-typography .mat-headline-6,.mat-typography h2{font:500 20px/32px Roboto,sans-serif;letter-spacing:.0125em;margin:0 0 16px}.mat-h3,.mat-subtitle-1,.mat-typography .mat-h3,.mat-typography .mat-subtitle-1,.mat-typography h3{font:400 16px/28px Roboto,sans-serif;letter-spacing:.009375em;margin:0 0 16px}.mat-h4,.mat-body-1,.mat-typography .mat-h4,.mat-typography .mat-body-1,.mat-typography h4{font:400 16px/24px Roboto,sans-serif;letter-spacing:.03125em;margin:0 0 16px}.mat-h5,.mat-typography .mat-h5,.mat-typography h5{font:400 11.62px/20px Roboto,sans-serif;margin:0 0 12px}.mat-h6,.mat-typography .mat-h6,.mat-typography h6{font:400 9.38px/20px Roboto,sans-serif;margin:0 0 12px}.mat-body-strong,.mat-subtitle-2,.mat-typography .mat-body-strong,.mat-typography .mat-subtitle-2{font:500 14px/22px Roboto,sans-serif;letter-spacing:.0071428571em}.mat-body,.mat-body-2,.mat-typography .mat-body,.mat-typography .mat-body-2,.mat-typography{font:400 14px/20px Roboto,sans-serif;letter-spacing:.0178571429em}.mat-body p,.mat-body-2 p,.mat-typography .mat-body p,.mat-typography .mat-body-2 p,.mat-typography p{margin:0 0 12px}.mat-small,.mat-caption,.mat-typography .mat-small,.mat-typography .mat-caption{font:400 12px/20px Roboto,sans-serif;letter-spacing:.0333333333em}.mat-headline-1,.mat-typography .mat-headline-1{font:300 96px/96px Roboto,sans-serif;letter-spacing:-.015625em;margin:0 0 56px}.mat-headline-2,.mat-typography .mat-headline-2{font:300 60px/60px Roboto,sans-serif;letter-spacing:-.0083333333em;margin:0 0 64px}.mat-headline-3,.mat-typography .mat-headline-3{font:400 48px/50px Roboto,sans-serif;letter-spacing:normal;margin:0 0 64px}.mat-headline-4,.mat-typography .mat-headline-4{font:400 34px/40px Roboto,sans-serif;letter-spacing:.0073529412em;margin:0 0 64px}html{--mat-autocomplete-container-shape: 4px;--mat-autocomplete-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12)}html{--mat-autocomplete-background-color: white}html{--mdc-text-button-container-shape: 4px;--mdc-text-button-keep-touch-target: false;--mdc-filled-button-container-shape: 4px;--mdc-filled-button-keep-touch-target: false;--mdc-protected-button-container-shape: 4px;--mdc-protected-button-container-elevation-shadow: 0px 3px 1px -2px rgba(0, 0, 0, .2), 0px 2px 2px 0px rgba(0, 0, 0, .14), 0px 1px 5px 0px rgba(0, 0, 0, .12);--mdc-protected-button-disabled-container-elevation-shadow: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mdc-protected-button-focus-container-elevation-shadow: 0px 2px 4px -1px rgba(0, 0, 0, .2), 0px 4px 5px 0px rgba(0, 0, 0, .14), 0px 1px 10px 0px rgba(0, 0, 0, .12);--mdc-protected-button-hover-container-elevation-shadow: 0px 2px 4px -1px rgba(0, 0, 0, .2), 0px 4px 5px 0px rgba(0, 0, 0, .14), 0px 1px 10px 0px rgba(0, 0, 0, .12);--mdc-protected-button-pressed-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12);--mdc-outlined-button-keep-touch-target: false;--mdc-outlined-button-outline-width: 1px;--mdc-outlined-button-container-shape: 4px;--mat-text-button-horizontal-padding: 8px;--mat-text-button-with-icon-horizontal-padding: 8px;--mat-text-button-icon-spacing: 8px;--mat-text-button-icon-offset: 0;--mat-filled-button-horizontal-padding: 16px;--mat-filled-button-icon-spacing: 8px;--mat-filled-button-icon-offset: -4px;--mat-protected-button-horizontal-padding: 16px;--mat-protected-button-icon-spacing: 8px;--mat-protected-button-icon-offset: -4px;--mat-outlined-button-horizontal-padding: 15px;--mat-outlined-button-icon-spacing: 8px;--mat-outlined-button-icon-offset: -4px}html{--mdc-text-button-label-text-color: black;--mdc-text-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mat-text-button-state-layer-color: black;--mat-text-button-disabled-state-layer-color: black;--mat-text-button-ripple-color: rgba(0, 0, 0, .1);--mat-text-button-hover-state-layer-opacity: .04;--mat-text-button-focus-state-layer-opacity: .12;--mat-text-button-pressed-state-layer-opacity: .12;--mdc-filled-button-container-color: white;--mdc-filled-button-label-text-color: black;--mdc-filled-button-disabled-container-color: rgba(0, 0, 0, .12);--mdc-filled-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mat-filled-button-state-layer-color: black;--mat-filled-button-disabled-state-layer-color: black;--mat-filled-button-ripple-color: rgba(0, 0, 0, .1);--mat-filled-button-hover-state-layer-opacity: .04;--mat-filled-button-focus-state-layer-opacity: .12;--mat-filled-button-pressed-state-layer-opacity: .12;--mdc-protected-button-container-color: white;--mdc-protected-button-label-text-color: black;--mdc-protected-button-disabled-container-color: rgba(0, 0, 0, .12);--mdc-protected-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mat-protected-button-state-layer-color: black;--mat-protected-button-disabled-state-layer-color: black;--mat-protected-button-ripple-color: rgba(0, 0, 0, .1);--mat-protected-button-hover-state-layer-opacity: .04;--mat-protected-button-focus-state-layer-opacity: .12;--mat-protected-button-pressed-state-layer-opacity: .12;--mdc-outlined-button-disabled-outline-color: rgba(0, 0, 0, .12);--mdc-outlined-button-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-outlined-button-label-text-color: black;--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12);--mat-outlined-button-state-layer-color: black;--mat-outlined-button-disabled-state-layer-color: black;--mat-outlined-button-ripple-color: rgba(0, 0, 0, .1);--mat-outlined-button-hover-state-layer-opacity: .04;--mat-outlined-button-focus-state-layer-opacity: .12;--mat-outlined-button-pressed-state-layer-opacity: .12}.mat-mdc-button.mat-primary,.mat-mdc-button.mat-accent{--mdc-text-button-label-text-color: #1a73e8;--mat-text-button-state-layer-color: #1a73e8;--mat-text-button-ripple-color: rgba(26, 115, 232, .1)}.mat-mdc-button.mat-warn{--mdc-text-button-label-text-color: #f44336;--mat-text-button-state-layer-color: #f44336;--mat-text-button-ripple-color: rgba(244, 67, 54, .1)}.mat-mdc-unelevated-button.mat-primary,.mat-mdc-unelevated-button.mat-accent{--mdc-filled-button-container-color: #1a73e8;--mdc-filled-button-label-text-color: white;--mat-filled-button-state-layer-color: white;--mat-filled-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-unelevated-button.mat-warn{--mdc-filled-button-container-color: #f44336;--mdc-filled-button-label-text-color: white;--mat-filled-button-state-layer-color: white;--mat-filled-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-raised-button.mat-primary,.mat-mdc-raised-button.mat-accent{--mdc-protected-button-container-color: #1a73e8;--mdc-protected-button-label-text-color: white;--mat-protected-button-state-layer-color: white;--mat-protected-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-raised-button.mat-warn{--mdc-protected-button-container-color: #f44336;--mdc-protected-button-label-text-color: white;--mat-protected-button-state-layer-color: white;--mat-protected-button-ripple-color: rgba(255, 255, 255, .1)}.mat-mdc-outlined-button.mat-primary,.mat-mdc-outlined-button.mat-accent{--mdc-outlined-button-label-text-color: #1a73e8;--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12);--mat-outlined-button-state-layer-color: #1a73e8;--mat-outlined-button-ripple-color: rgba(26, 115, 232, .1)}.mat-mdc-outlined-button.mat-warn{--mdc-outlined-button-label-text-color: #f44336;--mdc-outlined-button-outline-color: rgba(0, 0, 0, .12);--mat-outlined-button-state-layer-color: #f44336;--mat-outlined-button-ripple-color: rgba(244, 67, 54, .1)}html{--mdc-text-button-container-height: 36px;--mdc-filled-button-container-height: 36px;--mdc-protected-button-container-height: 36px;--mdc-outlined-button-container-height: 36px;--mat-text-button-touch-target-display: block;--mat-filled-button-touch-target-display: block;--mat-protected-button-touch-target-display: block;--mat-outlined-button-touch-target-display: block}html{--mdc-text-button-label-text-font: Roboto, sans-serif;--mdc-text-button-label-text-size: 14px;--mdc-text-button-label-text-tracking: .0892857143em;--mdc-text-button-label-text-weight: 500;--mdc-text-button-label-text-transform: none;--mdc-filled-button-label-text-font: Roboto, sans-serif;--mdc-filled-button-label-text-size: 14px;--mdc-filled-button-label-text-tracking: .0892857143em;--mdc-filled-button-label-text-weight: 500;--mdc-filled-button-label-text-transform: none;--mdc-protected-button-label-text-font: Roboto, sans-serif;--mdc-protected-button-label-text-size: 14px;--mdc-protected-button-label-text-tracking: .0892857143em;--mdc-protected-button-label-text-weight: 500;--mdc-protected-button-label-text-transform: none;--mdc-outlined-button-label-text-font: Roboto, sans-serif;--mdc-outlined-button-label-text-size: 14px;--mdc-outlined-button-label-text-tracking: .0892857143em;--mdc-outlined-button-label-text-weight: 500;--mdc-outlined-button-label-text-transform: none}html{--mdc-elevated-card-container-shape: 4px;--mdc-outlined-card-container-shape: 4px;--mdc-outlined-card-outline-width: 1px}html{--mdc-elevated-card-container-color: white;--mdc-elevated-card-container-elevation: 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mdc-outlined-card-container-color: white;--mdc-outlined-card-outline-color: rgba(0, 0, 0, .12);--mdc-outlined-card-container-elevation: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mat-card-subtitle-text-color: rgba(0, 0, 0, .54)}html{--mat-card-title-text-font: Roboto, sans-serif;--mat-card-title-text-line-height: 32px;--mat-card-title-text-size: 20px;--mat-card-title-text-tracking: .0125em;--mat-card-title-text-weight: 500;--mat-card-subtitle-text-font: Roboto, sans-serif;--mat-card-subtitle-text-line-height: 22px;--mat-card-subtitle-text-size: 14px;--mat-card-subtitle-text-tracking: .0071428571em;--mat-card-subtitle-text-weight: 500}html{--mdc-checkbox-disabled-selected-checkmark-color: #fff;--mdc-checkbox-selected-focus-state-layer-opacity: .16;--mdc-checkbox-selected-hover-state-layer-opacity: .04;--mdc-checkbox-selected-pressed-state-layer-opacity: .16;--mdc-checkbox-unselected-focus-state-layer-opacity: .16;--mdc-checkbox-unselected-hover-state-layer-opacity: .04;--mdc-checkbox-unselected-pressed-state-layer-opacity: .16}html{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #1a73e8;--mdc-checkbox-selected-hover-icon-color: #1a73e8;--mdc-checkbox-selected-icon-color: #1a73e8;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #1a73e8;--mdc-checkbox-selected-hover-state-layer-color: #1a73e8;--mdc-checkbox-selected-pressed-state-layer-color: #1a73e8;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black;--mat-checkbox-disabled-label-color: rgba(0, 0, 0, .38);--mat-checkbox-label-text-color: rgba(0, 0, 0, .87)}.mat-mdc-checkbox.mat-primary{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #1a73e8;--mdc-checkbox-selected-hover-icon-color: #1a73e8;--mdc-checkbox-selected-icon-color: #1a73e8;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #1a73e8;--mdc-checkbox-selected-hover-state-layer-color: #1a73e8;--mdc-checkbox-selected-pressed-state-layer-color: #1a73e8;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-checkbox.mat-warn{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #f44336;--mdc-checkbox-selected-hover-icon-color: #f44336;--mdc-checkbox-selected-icon-color: #f44336;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #f44336;--mdc-checkbox-selected-hover-state-layer-color: #f44336;--mdc-checkbox-selected-pressed-state-layer-color: #f44336;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}html{--mdc-checkbox-state-layer-size: 40px;--mat-checkbox-touch-target-display: block}html{--mat-checkbox-label-text-font: Roboto, sans-serif;--mat-checkbox-label-text-line-height: 20px;--mat-checkbox-label-text-size: 14px;--mat-checkbox-label-text-tracking: .0178571429em;--mat-checkbox-label-text-weight: 400}html{--mdc-dialog-container-shape: 4px;--mat-dialog-container-elevation-shadow: 0px 11px 15px -7px rgba(0, 0, 0, .2), 0px 24px 38px 3px rgba(0, 0, 0, .14), 0px 9px 46px 8px rgba(0, 0, 0, .12);--mat-dialog-container-max-width: 80vw;--mat-dialog-container-small-max-width: 80vw;--mat-dialog-container-min-width: 0;--mat-dialog-actions-alignment: start;--mat-dialog-actions-padding: 8px;--mat-dialog-content-padding: 20px 24px;--mat-dialog-with-actions-content-padding: 20px 24px;--mat-dialog-headline-padding: 0 24px 9px}html{--mdc-dialog-container-color: white;--mdc-dialog-subhead-color: rgba(0, 0, 0, .87);--mdc-dialog-supporting-text-color: rgba(0, 0, 0, .6)}html{--mdc-dialog-subhead-font: Roboto, sans-serif;--mdc-dialog-subhead-line-height: 32px;--mdc-dialog-subhead-size: 20px;--mdc-dialog-subhead-weight: 500;--mdc-dialog-subhead-tracking: .0125em;--mdc-dialog-supporting-text-font: Roboto, sans-serif;--mdc-dialog-supporting-text-line-height: 24px;--mdc-dialog-supporting-text-size: 16px;--mdc-dialog-supporting-text-weight: 400;--mdc-dialog-supporting-text-tracking: .03125em}html{--mdc-filled-text-field-active-indicator-height: 1px;--mdc-filled-text-field-focus-active-indicator-height: 2px;--mdc-filled-text-field-container-shape: 4px;--mdc-outlined-text-field-outline-width: 1px;--mdc-outlined-text-field-focus-outline-width: 2px;--mdc-outlined-text-field-container-shape: 4px}html{--mdc-filled-text-field-caret-color: #1a73e8;--mdc-filled-text-field-focus-active-indicator-color: #1a73e8;--mdc-filled-text-field-focus-label-text-color: rgba(26, 115, 232, .87);--mdc-filled-text-field-container-color: whitesmoke;--mdc-filled-text-field-disabled-container-color: #fafafa;--mdc-filled-text-field-label-text-color: rgba(0, 0, 0, .6);--mdc-filled-text-field-hover-label-text-color: rgba(0, 0, 0, .6);--mdc-filled-text-field-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-filled-text-field-input-text-color: rgba(0, 0, 0, .87);--mdc-filled-text-field-disabled-input-text-color: rgba(0, 0, 0, .38);--mdc-filled-text-field-input-text-placeholder-color: rgba(0, 0, 0, .6);--mdc-filled-text-field-error-hover-label-text-color: #f44336;--mdc-filled-text-field-error-focus-label-text-color: #f44336;--mdc-filled-text-field-error-label-text-color: #f44336;--mdc-filled-text-field-error-caret-color: #f44336;--mdc-filled-text-field-active-indicator-color: rgba(0, 0, 0, .42);--mdc-filled-text-field-disabled-active-indicator-color: rgba(0, 0, 0, .06);--mdc-filled-text-field-hover-active-indicator-color: rgba(0, 0, 0, .87);--mdc-filled-text-field-error-active-indicator-color: #f44336;--mdc-filled-text-field-error-focus-active-indicator-color: #f44336;--mdc-filled-text-field-error-hover-active-indicator-color: #f44336;--mdc-outlined-text-field-caret-color: #1a73e8;--mdc-outlined-text-field-focus-outline-color: #1a73e8;--mdc-outlined-text-field-focus-label-text-color: rgba(26, 115, 232, .87);--mdc-outlined-text-field-label-text-color: rgba(0, 0, 0, .6);--mdc-outlined-text-field-hover-label-text-color: rgba(0, 0, 0, .6);--mdc-outlined-text-field-disabled-label-text-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-input-text-color: rgba(0, 0, 0, .87);--mdc-outlined-text-field-disabled-input-text-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-input-text-placeholder-color: rgba(0, 0, 0, .6);--mdc-outlined-text-field-error-caret-color: #f44336;--mdc-outlined-text-field-error-focus-label-text-color: #f44336;--mdc-outlined-text-field-error-label-text-color: #f44336;--mdc-outlined-text-field-error-hover-label-text-color: #f44336;--mdc-outlined-text-field-outline-color: rgba(0, 0, 0, .38);--mdc-outlined-text-field-disabled-outline-color: rgba(0, 0, 0, .06);--mdc-outlined-text-field-hover-outline-color: rgba(0, 0, 0, .87);--mdc-outlined-text-field-error-focus-outline-color: #f44336;--mdc-outlined-text-field-error-hover-outline-color: #f44336;--mdc-outlined-text-field-error-outline-color: #f44336;--mat-form-field-focus-select-arrow-color: rgba(26, 115, 232, .87);--mat-form-field-disabled-input-text-placeholder-color: rgba(0, 0, 0, .38);--mat-form-field-state-layer-color: rgba(0, 0, 0, .87);--mat-form-field-error-text-color: #f44336;--mat-form-field-select-option-text-color: inherit;--mat-form-field-select-disabled-option-text-color: GrayText;--mat-form-field-leading-icon-color: unset;--mat-form-field-disabled-leading-icon-color: unset;--mat-form-field-trailing-icon-color: unset;--mat-form-field-disabled-trailing-icon-color: unset;--mat-form-field-error-focus-trailing-icon-color: unset;--mat-form-field-error-hover-trailing-icon-color: unset;--mat-form-field-error-trailing-icon-color: unset;--mat-form-field-enabled-select-arrow-color: rgba(0, 0, 0, .54);--mat-form-field-disabled-select-arrow-color: rgba(0, 0, 0, .38);--mat-form-field-hover-state-layer-opacity: .04;--mat-form-field-focus-state-layer-opacity: .08}.mat-mdc-form-field.mat-accent{--mdc-filled-text-field-caret-color: #1a73e8;--mdc-filled-text-field-focus-active-indicator-color: #1a73e8;--mdc-filled-text-field-focus-label-text-color: rgba(26, 115, 232, .87);--mdc-outlined-text-field-caret-color: #1a73e8;--mdc-outlined-text-field-focus-outline-color: #1a73e8;--mdc-outlined-text-field-focus-label-text-color: rgba(26, 115, 232, .87);--mat-form-field-focus-select-arrow-color: rgba(26, 115, 232, .87)}.mat-mdc-form-field.mat-warn{--mdc-filled-text-field-caret-color: #f44336;--mdc-filled-text-field-focus-active-indicator-color: #f44336;--mdc-filled-text-field-focus-label-text-color: rgba(244, 67, 54, .87);--mdc-outlined-text-field-caret-color: #f44336;--mdc-outlined-text-field-focus-outline-color: #f44336;--mdc-outlined-text-field-focus-label-text-color: rgba(244, 67, 54, .87);--mat-form-field-focus-select-arrow-color: rgba(244, 67, 54, .87)}html{--mat-form-field-container-height: 56px;--mat-form-field-filled-label-display: block;--mat-form-field-container-vertical-padding: 16px;--mat-form-field-filled-with-label-container-padding-top: 24px;--mat-form-field-filled-with-label-container-padding-bottom: 8px}html{--mdc-filled-text-field-label-text-font: Roboto, sans-serif;--mdc-filled-text-field-label-text-size: 16px;--mdc-filled-text-field-label-text-tracking: .03125em;--mdc-filled-text-field-label-text-weight: 400;--mdc-outlined-text-field-label-text-font: Roboto, sans-serif;--mdc-outlined-text-field-label-text-size: 16px;--mdc-outlined-text-field-label-text-tracking: .03125em;--mdc-outlined-text-field-label-text-weight: 400;--mat-form-field-container-text-font: Roboto, sans-serif;--mat-form-field-container-text-line-height: 24px;--mat-form-field-container-text-size: 16px;--mat-form-field-container-text-tracking: .03125em;--mat-form-field-container-text-weight: 400;--mat-form-field-outlined-label-text-populated-size: 16px;--mat-form-field-subscript-text-font: Roboto, sans-serif;--mat-form-field-subscript-text-line-height: 20px;--mat-form-field-subscript-text-size: 12px;--mat-form-field-subscript-text-tracking: .0333333333em;--mat-form-field-subscript-text-weight: 400}html{--mdc-icon-button-icon-size: 24px}html{--mdc-icon-button-icon-color: inherit;--mdc-icon-button-disabled-icon-color: rgba(0, 0, 0, .38);--mat-icon-button-state-layer-color: black;--mat-icon-button-disabled-state-layer-color: black;--mat-icon-button-ripple-color: rgba(0, 0, 0, .1);--mat-icon-button-hover-state-layer-opacity: .04;--mat-icon-button-focus-state-layer-opacity: .12;--mat-icon-button-pressed-state-layer-opacity: .12}html .mat-mdc-icon-button.mat-primary,html .mat-mdc-icon-button.mat-accent{--mdc-icon-button-icon-color: #1a73e8;--mat-icon-button-state-layer-color: #1a73e8;--mat-icon-button-ripple-color: rgba(26, 115, 232, .1)}html .mat-mdc-icon-button.mat-warn{--mdc-icon-button-icon-color: #f44336;--mat-icon-button-state-layer-color: #f44336;--mat-icon-button-ripple-color: rgba(244, 67, 54, .1)}html{--mat-icon-button-touch-target-display: block}.mat-mdc-icon-button.mat-mdc-button-base{--mdc-icon-button-state-layer-size: 48px;width:var(--mdc-icon-button-state-layer-size);height:var(--mdc-icon-button-state-layer-size);padding:12px}html{--mat-icon-color: inherit}.mat-icon.mat-primary,.mat-icon.mat-accent{--mat-icon-color: #1a73e8}.mat-icon.mat-warn{--mat-icon-color: #f44336}html{--mdc-list-list-item-container-shape: 0;--mdc-list-list-item-leading-avatar-shape: 50%;--mdc-list-list-item-container-color: transparent;--mdc-list-list-item-selected-container-color: transparent;--mdc-list-list-item-leading-avatar-color: transparent;--mdc-list-list-item-leading-icon-size: 24px;--mdc-list-list-item-leading-avatar-size: 40px;--mdc-list-list-item-trailing-icon-size: 24px;--mdc-list-list-item-disabled-state-layer-color: transparent;--mdc-list-list-item-disabled-state-layer-opacity: 0;--mdc-list-list-item-disabled-label-text-opacity: .38;--mdc-list-list-item-disabled-leading-icon-opacity: .38;--mdc-list-list-item-disabled-trailing-icon-opacity: .38;--mat-list-active-indicator-color: transparent;--mat-list-active-indicator-shape: 4px}html{--mdc-list-list-item-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-supporting-text-color: rgba(0, 0, 0, .54);--mdc-list-list-item-leading-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-trailing-supporting-text-color: rgba(0, 0, 0, .38);--mdc-list-list-item-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-selected-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-disabled-label-text-color: black;--mdc-list-list-item-disabled-leading-icon-color: black;--mdc-list-list-item-disabled-trailing-icon-color: black;--mdc-list-list-item-hover-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-hover-leading-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-hover-trailing-icon-color: rgba(0, 0, 0, .38);--mdc-list-list-item-focus-label-text-color: rgba(0, 0, 0, .87);--mdc-list-list-item-hover-state-layer-color: black;--mdc-list-list-item-hover-state-layer-opacity: .04;--mdc-list-list-item-focus-state-layer-color: black;--mdc-list-list-item-focus-state-layer-opacity: .12}.mdc-list-item__start,.mdc-list-item__end,.mat-accent .mdc-list-item__start,.mat-accent .mdc-list-item__end{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #1a73e8;--mdc-radio-selected-hover-icon-color: #1a73e8;--mdc-radio-selected-icon-color: #1a73e8;--mdc-radio-selected-pressed-icon-color: #1a73e8}.mat-warn .mdc-list-item__start,.mat-warn .mdc-list-item__end{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #f44336;--mdc-radio-selected-hover-icon-color: #f44336;--mdc-radio-selected-icon-color: #f44336;--mdc-radio-selected-pressed-icon-color: #f44336}.mat-mdc-list-option,.mat-mdc-list-option.mat-accent{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #1a73e8;--mdc-checkbox-selected-hover-icon-color: #1a73e8;--mdc-checkbox-selected-icon-color: #1a73e8;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #1a73e8;--mdc-checkbox-selected-hover-state-layer-color: #1a73e8;--mdc-checkbox-selected-pressed-state-layer-color: #1a73e8;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-list-option.mat-warn{--mdc-checkbox-disabled-selected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-disabled-unselected-icon-color: rgba(0, 0, 0, .38);--mdc-checkbox-selected-checkmark-color: white;--mdc-checkbox-selected-focus-icon-color: #f44336;--mdc-checkbox-selected-hover-icon-color: #f44336;--mdc-checkbox-selected-icon-color: #f44336;--mdc-checkbox-unselected-focus-icon-color: #212121;--mdc-checkbox-unselected-hover-icon-color: #212121;--mdc-checkbox-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-checkbox-selected-focus-state-layer-color: #f44336;--mdc-checkbox-selected-hover-state-layer-color: #f44336;--mdc-checkbox-selected-pressed-state-layer-color: #f44336;--mdc-checkbox-unselected-focus-state-layer-color: black;--mdc-checkbox-unselected-hover-state-layer-color: black;--mdc-checkbox-unselected-pressed-state-layer-color: black}.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--selected .mdc-list-item__primary-text,.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--selected .mdc-list-item__start,.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--activated .mdc-list-item__primary-text,.mat-mdc-list-base.mat-mdc-list-base .mdc-list-item--activated .mdc-list-item__start{color:#1a73e8}.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__start,.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__content,.mat-mdc-list-base .mdc-list-item--disabled .mdc-list-item__end{opacity:1}html{--mdc-list-list-item-one-line-container-height: 48px;--mdc-list-list-item-two-line-container-height: 64px;--mdc-list-list-item-three-line-container-height: 88px;--mat-list-list-item-leading-icon-start-space: 16px;--mat-list-list-item-leading-icon-end-space: 32px}.mdc-list-item__start,.mdc-list-item__end{--mdc-radio-state-layer-size: 40px}.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-one-line,.mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-one-line,.mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-one-line{height:56px}.mat-mdc-list-item.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines,.mat-mdc-list-item.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines,.mat-mdc-list-item.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines{height:72px}html{--mdc-list-list-item-label-text-font: Roboto, sans-serif;--mdc-list-list-item-label-text-line-height: 24px;--mdc-list-list-item-label-text-size: 16px;--mdc-list-list-item-label-text-tracking: .03125em;--mdc-list-list-item-label-text-weight: 400;--mdc-list-list-item-supporting-text-font: Roboto, sans-serif;--mdc-list-list-item-supporting-text-line-height: 20px;--mdc-list-list-item-supporting-text-size: 14px;--mdc-list-list-item-supporting-text-tracking: .0178571429em;--mdc-list-list-item-supporting-text-weight: 400;--mdc-list-list-item-trailing-supporting-text-font: Roboto, sans-serif;--mdc-list-list-item-trailing-supporting-text-line-height: 20px;--mdc-list-list-item-trailing-supporting-text-size: 12px;--mdc-list-list-item-trailing-supporting-text-tracking: .0333333333em;--mdc-list-list-item-trailing-supporting-text-weight: 400}.mdc-list-group__subheader{font:400 16px/28px Roboto,sans-serif;letter-spacing:.009375em}html{--mat-menu-container-shape: 4px;--mat-menu-divider-bottom-spacing: 0;--mat-menu-divider-top-spacing: 0;--mat-menu-item-spacing: 16px;--mat-menu-item-icon-size: 24px;--mat-menu-item-leading-spacing: 16px;--mat-menu-item-trailing-spacing: 16px;--mat-menu-item-with-icon-leading-spacing: 16px;--mat-menu-item-with-icon-trailing-spacing: 16px;--mat-menu-base-elevation-level: 8}html{--mat-menu-item-label-text-color: rgba(0, 0, 0, .87);--mat-menu-item-icon-color: rgba(0, 0, 0, .87);--mat-menu-item-hover-state-layer-color: rgba(0, 0, 0, .04);--mat-menu-item-focus-state-layer-color: rgba(0, 0, 0, .04);--mat-menu-container-color: white;--mat-menu-divider-color: rgba(0, 0, 0, .12)}html{--mat-menu-item-label-text-font: Roboto, sans-serif;--mat-menu-item-label-text-size: 16px;--mat-menu-item-label-text-tracking: .03125em;--mat-menu-item-label-text-line-height: 24px;--mat-menu-item-label-text-weight: 400}html{--mdc-circular-progress-active-indicator-width: 4px;--mdc-circular-progress-size: 48px}html,html .mat-accent{--mdc-circular-progress-active-indicator-color: #1a73e8}html .mat-warn{--mdc-circular-progress-active-indicator-color: #f44336}html{--mdc-radio-disabled-selected-icon-opacity: .38;--mdc-radio-disabled-unselected-icon-opacity: .38;--mdc-radio-state-layer-size: 40px}.mat-mdc-radio-button.mat-primary,.mat-mdc-radio-button.mat-accent{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #1a73e8;--mdc-radio-selected-hover-icon-color: #1a73e8;--mdc-radio-selected-icon-color: #1a73e8;--mdc-radio-selected-pressed-icon-color: #1a73e8;--mat-radio-ripple-color: black;--mat-radio-checked-ripple-color: #1a73e8;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38);--mat-radio-label-text-color: rgba(0, 0, 0, .87)}.mat-mdc-radio-button.mat-warn{--mdc-radio-disabled-selected-icon-color: black;--mdc-radio-disabled-unselected-icon-color: black;--mdc-radio-unselected-hover-icon-color: #212121;--mdc-radio-unselected-icon-color: rgba(0, 0, 0, .54);--mdc-radio-unselected-pressed-icon-color: rgba(0, 0, 0, .54);--mdc-radio-selected-focus-icon-color: #f44336;--mdc-radio-selected-hover-icon-color: #f44336;--mdc-radio-selected-icon-color: #f44336;--mdc-radio-selected-pressed-icon-color: #f44336;--mat-radio-ripple-color: black;--mat-radio-checked-ripple-color: #f44336;--mat-radio-disabled-label-color: rgba(0, 0, 0, .38);--mat-radio-label-text-color: rgba(0, 0, 0, .87)}html{--mdc-radio-state-layer-size: 40px;--mat-radio-touch-target-display: block}html{--mat-radio-label-text-font: Roboto, sans-serif;--mat-radio-label-text-line-height: 20px;--mat-radio-label-text-size: 14px;--mat-radio-label-text-tracking: .0178571429em;--mat-radio-label-text-weight: 400}html{--mat-select-container-elevation-shadow: 0px 5px 5px -3px rgba(0, 0, 0, .2), 0px 8px 10px 1px rgba(0, 0, 0, .14), 0px 3px 14px 2px rgba(0, 0, 0, .12)}html,html .mat-mdc-form-field.mat-accent{--mat-select-panel-background-color: white;--mat-select-enabled-trigger-text-color: rgba(0, 0, 0, .87);--mat-select-disabled-trigger-text-color: rgba(0, 0, 0, .38);--mat-select-placeholder-text-color: rgba(0, 0, 0, .6);--mat-select-enabled-arrow-color: rgba(0, 0, 0, .54);--mat-select-disabled-arrow-color: rgba(0, 0, 0, .38);--mat-select-focused-arrow-color: rgba(26, 115, 232, .87);--mat-select-invalid-arrow-color: rgba(244, 67, 54, .87)}html .mat-mdc-form-field.mat-warn{--mat-select-panel-background-color: white;--mat-select-enabled-trigger-text-color: rgba(0, 0, 0, .87);--mat-select-disabled-trigger-text-color: rgba(0, 0, 0, .38);--mat-select-placeholder-text-color: rgba(0, 0, 0, .6);--mat-select-enabled-arrow-color: rgba(0, 0, 0, .54);--mat-select-disabled-arrow-color: rgba(0, 0, 0, .38);--mat-select-focused-arrow-color: rgba(244, 67, 54, .87);--mat-select-invalid-arrow-color: rgba(244, 67, 54, .87)}html{--mat-select-arrow-transform: translateY(-8px)}html{--mat-select-trigger-text-font: Roboto, sans-serif;--mat-select-trigger-text-line-height: 24px;--mat-select-trigger-text-size: 16px;--mat-select-trigger-text-tracking: .03125em;--mat-select-trigger-text-weight: 400}html{--mat-sidenav-container-shape: 0;--mat-sidenav-container-elevation-shadow: 0px 8px 10px -5px rgba(0, 0, 0, .2), 0px 16px 24px 2px rgba(0, 0, 0, .14), 0px 6px 30px 5px rgba(0, 0, 0, .12);--mat-sidenav-container-width: auto}html{--mat-sidenav-container-divider-color: rgba(0, 0, 0, .12);--mat-sidenav-container-background-color: white;--mat-sidenav-container-text-color: rgba(0, 0, 0, .87);--mat-sidenav-content-background-color: #fafafa;--mat-sidenav-content-text-color: rgba(0, 0, 0, .87);--mat-sidenav-scrim-color: rgba(0, 0, 0, .6)}html{--mdc-switch-disabled-selected-icon-opacity: .38;--mdc-switch-disabled-track-opacity: .12;--mdc-switch-disabled-unselected-icon-opacity: .38;--mdc-switch-handle-height: 20px;--mdc-switch-handle-shape: 10px;--mdc-switch-handle-width: 20px;--mdc-switch-selected-icon-size: 18px;--mdc-switch-track-height: 14px;--mdc-switch-track-shape: 7px;--mdc-switch-track-width: 36px;--mdc-switch-unselected-icon-size: 18px;--mdc-switch-selected-focus-state-layer-opacity: .12;--mdc-switch-selected-hover-state-layer-opacity: .04;--mdc-switch-selected-pressed-state-layer-opacity: .1;--mdc-switch-unselected-focus-state-layer-opacity: .12;--mdc-switch-unselected-hover-state-layer-opacity: .04;--mdc-switch-unselected-pressed-state-layer-opacity: .1}html .mat-mdc-slide-toggle{--mat-switch-disabled-selected-handle-opacity: .38;--mat-switch-disabled-unselected-handle-opacity: .38;--mat-switch-unselected-handle-size: 20px;--mat-switch-selected-handle-size: 20px;--mat-switch-pressed-handle-size: 20px;--mat-switch-with-icon-handle-size: 20px;--mat-switch-selected-handle-horizontal-margin: 0;--mat-switch-selected-with-icon-handle-horizontal-margin: 0;--mat-switch-selected-pressed-handle-horizontal-margin: 0;--mat-switch-unselected-handle-horizontal-margin: 0;--mat-switch-unselected-with-icon-handle-horizontal-margin: 0;--mat-switch-unselected-pressed-handle-horizontal-margin: 0;--mat-switch-visible-track-opacity: 1;--mat-switch-hidden-track-opacity: 1;--mat-switch-visible-track-transition: transform 75ms 0ms cubic-bezier(0, 0, .2, 1);--mat-switch-hidden-track-transition: transform 75ms 0ms cubic-bezier(.4, 0, .6, 1);--mat-switch-track-outline-width: 1px;--mat-switch-track-outline-color: transparent;--mat-switch-selected-track-outline-width: 1px;--mat-switch-selected-track-outline-color: transparent;--mat-switch-disabled-unselected-track-outline-width: 1px;--mat-switch-disabled-unselected-track-outline-color: transparent}html{--mdc-switch-selected-focus-state-layer-color: #1a73e8;--mdc-switch-selected-handle-color: #1a73e8;--mdc-switch-selected-hover-state-layer-color: #1a73e8;--mdc-switch-selected-pressed-state-layer-color: #1a73e8;--mdc-switch-selected-focus-handle-color: #174ea6;--mdc-switch-selected-hover-handle-color: #174ea6;--mdc-switch-selected-pressed-handle-color: #174ea6;--mdc-switch-selected-focus-track-color: #8ab4f8;--mdc-switch-selected-hover-track-color: #8ab4f8;--mdc-switch-selected-pressed-track-color: #8ab4f8;--mdc-switch-selected-track-color: #8ab4f8;--mdc-switch-disabled-selected-handle-color: #424242;--mdc-switch-disabled-selected-icon-color: #fff;--mdc-switch-disabled-selected-track-color: #424242;--mdc-switch-disabled-unselected-handle-color: #424242;--mdc-switch-disabled-unselected-icon-color: #fff;--mdc-switch-disabled-unselected-track-color: #424242;--mdc-switch-handle-surface-color: #fff;--mdc-switch-selected-icon-color: #fff;--mdc-switch-unselected-focus-handle-color: #212121;--mdc-switch-unselected-focus-state-layer-color: #424242;--mdc-switch-unselected-focus-track-color: #e0e0e0;--mdc-switch-unselected-handle-color: #616161;--mdc-switch-unselected-hover-handle-color: #212121;--mdc-switch-unselected-hover-state-layer-color: #424242;--mdc-switch-unselected-hover-track-color: #e0e0e0;--mdc-switch-unselected-icon-color: #fff;--mdc-switch-unselected-pressed-handle-color: #212121;--mdc-switch-unselected-pressed-state-layer-color: #424242;--mdc-switch-unselected-pressed-track-color: #e0e0e0;--mdc-switch-unselected-track-color: #e0e0e0;--mdc-switch-handle-elevation-shadow: 0px 2px 1px -1px rgba(0, 0, 0, .2), 0px 1px 1px 0px rgba(0, 0, 0, .14), 0px 1px 3px 0px rgba(0, 0, 0, .12);--mdc-switch-disabled-handle-elevation-shadow: 0px 0px 0px 0px rgba(0, 0, 0, .2), 0px 0px 0px 0px rgba(0, 0, 0, .14), 0px 0px 0px 0px rgba(0, 0, 0, .12);--mdc-switch-disabled-label-text-color: rgba(0, 0, 0, .38)}html .mat-mdc-slide-toggle{--mat-switch-label-text-color: rgba(0, 0, 0, .87)}html .mat-mdc-slide-toggle.mat-accent{--mdc-switch-selected-focus-state-layer-color: #1a73e8;--mdc-switch-selected-handle-color: #1a73e8;--mdc-switch-selected-hover-state-layer-color: #1a73e8;--mdc-switch-selected-pressed-state-layer-color: #1a73e8;--mdc-switch-selected-focus-handle-color: #174ea6;--mdc-switch-selected-hover-handle-color: #174ea6;--mdc-switch-selected-pressed-handle-color: #174ea6;--mdc-switch-selected-focus-track-color: #8ab4f8;--mdc-switch-selected-hover-track-color: #8ab4f8;--mdc-switch-selected-pressed-track-color: #8ab4f8;--mdc-switch-selected-track-color: #8ab4f8}html .mat-mdc-slide-toggle.mat-warn{--mdc-switch-selected-focus-state-layer-color: #e53935;--mdc-switch-selected-handle-color: #e53935;--mdc-switch-selected-hover-state-layer-color: #e53935;--mdc-switch-selected-pressed-state-layer-color: #e53935;--mdc-switch-selected-focus-handle-color: #b71c1c;--mdc-switch-selected-hover-handle-color: #b71c1c;--mdc-switch-selected-pressed-handle-color: #b71c1c;--mdc-switch-selected-focus-track-color: #e57373;--mdc-switch-selected-hover-track-color: #e57373;--mdc-switch-selected-pressed-track-color: #e57373;--mdc-switch-selected-track-color: #e57373}html{--mdc-switch-state-layer-size: 40px}html .mat-mdc-slide-toggle{--mat-switch-label-text-font: Roboto, sans-serif;--mat-switch-label-text-line-height: 20px;--mat-switch-label-text-size: 14px;--mat-switch-label-text-tracking: .0178571429em;--mat-switch-label-text-weight: 400}html{--mdc-snackbar-container-shape: 4px}html{--mdc-snackbar-container-color: #333333;--mdc-snackbar-supporting-text-color: rgba(255, 255, 255, .87);--mat-snack-bar-button-color: #1a73e8}html{--mdc-snackbar-supporting-text-font: Roboto, sans-serif;--mdc-snackbar-supporting-text-line-height: 20px;--mdc-snackbar-supporting-text-size: 14px;--mdc-snackbar-supporting-text-weight: 400}html{--mdc-plain-tooltip-container-shape: 4px;--mdc-plain-tooltip-supporting-text-line-height: 16px}html{--mdc-plain-tooltip-container-color: #616161;--mdc-plain-tooltip-supporting-text-color: #fff}html{--mdc-plain-tooltip-supporting-text-font: Roboto, sans-serif;--mdc-plain-tooltip-supporting-text-size: 12px;--mdc-plain-tooltip-supporting-text-weight: 400;--mdc-plain-tooltip-supporting-text-tracking: .0333333333em}html{--mat-tree-container-background-color: white;--mat-tree-node-text-color: rgba(0, 0, 0, .87)}html{--mat-tree-node-min-height: 48px}html{--mat-tree-node-text-font: Roboto, sans-serif;--mat-tree-node-text-size: 14px;--mat-tree-node-text-weight: 400}body{font-size:16px;font-weight:400;line-height:24px;font-family:Roboto,sans-serif;letter-spacing:.03125em;background-color:#fafafa}html,body{margin:0;height:100%;line-height:normal;letter-spacing:normal;overflow:hidden;font-family:Google Sans Text,Arial,Helvetica,sans-serif;background-color:#fff}input,textarea{font-family:Google Sans Text,Arial,Helvetica,sans-serif}button>span{font-family:Google Sans Text,Arial,Helvetica,sans-serif;letter-spacing:normal}@font-face{font-family:Material Icons;font-style:normal;font-weight:400;src:url(/static_files/material_icon.woff2) format("woff2")}@font-face{font-family:Google Material Icons;font-style:normal;font-weight:400;src:url(/static_files/google_material_icon.woff2) format("woff2")}.material-icons{font-family:Material Icons;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;font-feature-settings:"liga";-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}.google-material-icons{font-family:Google Material Icons;font-weight:400;font-style:normal;font-size:24px;line-height:1;letter-spacing:normal;text-transform:none;display:inline-block;white-space:nowrap;word-wrap:normal;direction:ltr;-webkit-font-feature-settings:"liga";-webkit-font-smoothing:antialiased}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:400;src:url(/static_files/5aUo9-KzpRiLCAt4Unrc-xIKmCU5qE9GjU9GixI.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:400;src:url(/static_files/5aUo9-KzpRiLCAt4Unrc-xIKmCU5qE9Gik9GixI.woff2) format("woff2");unicode-range:U+0370-03FF}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:400;src:url(/static_files/5aUo9-KzpRiLCAt4Unrc-xIKmCU5qE9Ghk9GixI.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:400;src:url(/static_files/5aUo9-KzpRiLCAt4Unrc-xIKmCU5qE9Gh09GixI.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:400;src:url(/static_files/5aUo9-KzpRiLCAt4Unrc-xIKmCU5qE9GiU9G.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:500;src:url(/static_files/5aUr9-KzpRiLCAt4Unrc-xIKmCU5qE9OemxTsDO_PZ0.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:500;src:url(/static_files/5aUr9-KzpRiLCAt4Unrc-xIKmCU5qE9OemxTtzO_PZ0.woff2) format("woff2");unicode-range:U+0370-03FF}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:500;src:url(/static_files/5aUr9-KzpRiLCAt4Unrc-xIKmCU5qE9OemxTuzO_PZ0.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:500;src:url(/static_files/5aUr9-KzpRiLCAt4Unrc-xIKmCU5qE9OemxTujO_PZ0.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:500;src:url(/static_files/5aUr9-KzpRiLCAt4Unrc-xIKmCU5qE9OemxTtDO_.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:700;src:url(/static_files/5aUr9-KzpRiLCAt4Unrc-xIKmCU5qE9OMmpTsDO_PZ0.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:700;src:url(/static_files/5aUr9-KzpRiLCAt4Unrc-xIKmCU5qE9OMmpTtzO_PZ0.woff2) format("woff2");unicode-range:U+0370-03FF}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:700;src:url(/static_files/5aUr9-KzpRiLCAt4Unrc-xIKmCU5qE9OMmpTuzO_PZ0.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:700;src:url(/static_files/5aUr9-KzpRiLCAt4Unrc-xIKmCU5qE9OMmpTujO_PZ0.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Google Sans Text;font-style:italic;font-weight:700;src:url(/static_files/5aUr9-KzpRiLCAt4Unrc-xIKmCU5qE9OMmpTtDO_.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:400;src:url(/static_files/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qE52i1dC.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:400;src:url(/static_files/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEl2i1dC.woff2) format("woff2");unicode-range:U+0370-03FF}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:400;src:url(/static_files/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEV2i1dC.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:400;src:url(/static_files/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qER2i1dC.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:400;src:url(/static_files/5aUu9-KzpRiLCAt4Unrc-xIKmCU5qEp2iw.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:500;src:url(/static_files/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmxjtiu7.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:500;src:url(/static_files/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmtjtiu7.woff2) format("woff2");unicode-range:U+0370-03FF}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:500;src:url(/static_files/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmdjtiu7.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:500;src:url(/static_files/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmZjtiu7.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:500;src:url(/static_files/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oLlVnmhjtg.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:700;src:url(/static_files/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmxjtiu7.woff2) format("woff2");unicode-range:U+0301,U+0400-045F,U+0490-0491,U+04B0-04B1,U+2116}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:700;src:url(/static_files/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmtjtiu7.woff2) format("woff2");unicode-range:U+0370-03FF}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:700;src:url(/static_files/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmdjtiu7.woff2) format("woff2");unicode-range:U+0102-0103,U+0110-0111,U+0128-0129,U+0168-0169,U+01A0-01A1,U+01AF-01B0,U+0300-0301,U+0303-0304,U+0308-0309,U+0323,U+0329,U+1EA0-1EF9,U+20AB}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:700;src:url(/static_files/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmZjtiu7.woff2) format("woff2");unicode-range:U+0100-02AF,U+0304,U+0308,U+0329,U+1E00-1E9F,U+1EF2-1EFF,U+2020,U+20A0-20AB,U+20AD-20CF,U+2113,U+2C60-2C7F,U+A720-A7FF}@font-face{font-family:Google Sans Text;font-style:normal;font-weight:700;src:url(/static_files/5aUp9-KzpRiLCAt4Unrc-xIKmCU5oPFTnmhjtg.woff2) format("woff2");unicode-range:U+0000-00FF,U+0131,U+0152-0153,U+02BB-02BC,U+02C6,U+02DA,U+02DC,U+0304,U+0308,U+0329,U+2000-206F,U+2074,U+20AC,U+2122,U+2191,U+2193,U+2212,U+2215,U+FEFF,U+FFFD} diff --git a/src/server/package/src/model_explorer/web_app/worker-JQ3C3QUW.js b/src/server/package/src/model_explorer/web_app/worker-JQ3C3QUW.js deleted file mode 100644 index 5e550648..00000000 --- a/src/server/package/src/model_explorer/web_app/worker-JQ3C3QUW.js +++ /dev/null @@ -1,3 +0,0 @@ -var Q=4,ie=4,D=9,le=16,ce=200,q=12,pe=1e3;var j=25;var ue=.1;var M="Node data provider: ",R=10;var k="__value",z="__tensor_tag",P=20;var H=14;var be=new OffscreenCanvas(300,300),ge={},yt=typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);function y(n){return n?.nodeType===0}function N(n){return n?.nodeType===1}function Z(n){let e=[];for(let[o,t]of Object.entries(n))switch(o){case"Op node id":t.selected&&e.push("id");break;default:break}return e}function J(n){let e=[];for(let[o,t]of Object.entries(n))switch(o){case"Layer node children count":t.selected&&e.push("#children");break;case"Layer node descendants count":t.selected&&e.push("#descendants");break;default:break}return e}function ee(n,e){if(y(n))switch(e.toLowerCase()){case"id":return n.id;case"namespace":return he(n);default:break}else if(N(n))switch(e.toLowerCase()){case"namespace":return he(n);case"#children":return String((n.nsChildrenIds||[]).length);case"#descendants":return String((n.descendantsNodeIds||[]).length);default:break}return""}function he(n){return n.fullNamespace||n.namespace||""}function A(n,e,o,t=!1){let r=[];n==null?r=e.rootNodes.map(s=>s.id):r=n.nsChildrenIds||[];for(let s of r){let d=e.nodesById[s];if(d&&N(d)&&(t||!t&&d.expanded)){let a=d.nsChildrenIds||[];(t?a.filter(i=>N(e.nodesById[i])).length===0:a.filter(i=>N(e.nodesById[i])).every(i=>!e.nodesById[i].expanded))&&o.push(d.id),A(d,e,o,t)}}}function fe(n,e,o,t){let r=[];if(n.length===2)r=n;else if(n.length===3&&n[0].x===n[1].x&&n[1].x===n[2].x)r=n;else{let s=!0,d=0;for(let l=0;li?1:-1;if(d!==0&&d!==h){s=!1;break}d=h}let a=t.Vector3;if(s){let i=e().x(p=>p.x).y(p=>p.y).curve(o)(n).split(/M|C/).filter(p=>p!=="").map(p=>p.split(",").map(g=>Number(g))),c=new a(i[0][0],i[0][1],0),h=new t.CurvePath;for(let p=1;pnew a(c.x,c.y,0));r=new t.CatmullRomCurve3(l,!1,"catmullrom",ue).getPoints(j)}}return r}function x(n,e,o,t=!0){let r=`${n}___${e}___${o}`,s=ge[r];if(s==null){let d=be.getContext("2d");d.font=`${e}px "Google Sans Text", Arial, Helvetica, sans-serif`,o&&(d.font=`bold ${d.font}`);let l=d.measureText(n).width;t&&(ge[r]=l),s=l}return s}function De(n,e,o){let t=o[z];return t?`Input${n}:${t} (${e.label})`:`Input${n} (${e.label})`}function Se(n,e,o){let t=`Output${n}`;if(o.label==="GraphInputs"){let r=e.tensor_name;r!=null&&(t=`${t} (${r})`)}else{let r=e[z];r&&(t=`Output${n}:${r}`)}return t}function Ne(n){let e=((n||{}).shape||"").replace(/ /g,"").replace(/×/g,"x");return e===""&&(e="?"),e}function te(n,e=""){let o=n.attrs||{},t=[],r=new RegExp(e,"i");for(let s of Object.keys(o)){let d=s,a=o[s],l=[`${d}:${a}`,`${d}=${a}`];if(e.trim()===""||l.some(i=>r.test(i))){let i=a;d===k?i=a.replace(/\s/gm,""):i=a.replace(/(\r\n|\n|\r)/gm," "),t.push({key:d,value:i})}}return t}function oe(n,e,o=""){let t=e.groupNodeAttributes?.[n.id.replace("___group___","")]||{},r=[],s=new RegExp(o,"i");for(let d of Object.keys(t)){let a=d,l=t[d],i=[`${a}:${l}`,`${a}=${l}`];if(o.trim()===""||i.some(c=>s.test(c))){let c=l.replace(/(\r\n|\n|\r)/gm," ");r.push({key:a,value:c})}}return r}function me(n,e){let o=n.incomingEdges||[],t=[];for(let r=0;rR){let r=o.length-R;t.push({key:`(${r} more input${r===1?"":"s"} omitted)`,value:"..."})}return t}function Ee(n){let e=[],o=n.outputsMetadata||{},t=Object.values(o);for(let r=0;rR){let r=t.length-R;e.push({key:`(${r} more output${r===1?"":"s"} omitted)`,value:"..."})}return e}function Ie(n,e,o,t){let r=[],s=Object.keys(o).filter(a=>o[a].selected).filter(a=>a.startsWith(M)).map(a=>a.replace(M,"")),d=Object.values(t).filter(a=>s.includes(a.runName));for(let a of d){let l=(a.results||{})?.[e][n.id]?.strValue||"-";r.push({key:a.runName,value:l})}return r}function _e(n,e){let o=n.split("/"),t=e.split("/"),r="";for(let s=Math.min(o.length,t.length);s>0;s--){let d=o.slice(0,s).join("/"),a=t.slice(0,s).join("/");if(d===a){r=a;break}}return r}function re(n,e){if(n===e)return"";let o=n.split("/").filter(r=>r!==""),t=e.split("/").filter(r=>r!=="");return t.length===0?"":t[o.length]}function w(n){return n.split(` -`).map(e=>e.trim()).filter(e=>e!=="")}function Y(n){return(w(n).length-1)*H}var ne=36,Te=16,ye=26,Le=50,Me=24,ve=80,Ce=8,T=class{constructor(e,o,t,r,s=!1){this.modelGraph=e;this.dagre=o;this.showOnNodeItemTypes=t;this.nodeDataProviderRuns=r;this.testMode=s;this.dagreGraph=new this.dagre.graphlib.Graph}dagreGraph;layout(e){let o,t=[];e==null?t=this.modelGraph.rootNodes:(o=this.modelGraph.nodesById[e],t=(o.nsChildrenIds||[]).map(u=>this.modelGraph.nodesById[u])),this.configLayout(this.dagreGraph);let r=ae(o?.id||"",t,this.modelGraph,this.showOnNodeItemTypes,this.nodeDataProviderRuns,this.testMode);for(let u of Object.keys(r.nodes)){let E=r.nodes[u];E.config?.pinToGroupTop||this.dagreGraph.setNode(u,E)}for(let u of Object.keys(r.outgoingEdges))for(let E of r.outgoingEdges[u])this.dagreGraph.setEdge(u,E);this.dagre.layout(this.dagreGraph);let s=Number.MAX_VALUE,d=Number.MAX_VALUE,a=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY;for(let u of t){let E=r.nodes[u.id];if(!E){console.warn(`Node "${u.id}" is not in the dagre layout result`);continue}u.x=(E.x||0)-E.width/2,u.y=(E.y||0)-E.height/2,u.width=E.width,u.height=E.height,u.localOffsetX=0,u.localOffsetY=0,E.config?.pinToGroupTop||(s=Math.min(s,u.x),d=Math.min(d,u.y),a=Math.max(a,u.x+u.width),l=Math.max(l,u.y+u.height))}let i=Number.MAX_VALUE,c=Number.MAX_VALUE,h=Number.NEGATIVE_INFINITY,p=Number.NEGATIVE_INFINITY,g=this.dagreGraph.edges(),m=[];for(let u of g){let E=this.dagreGraph.edge(u).points,_=globalThis.d3,v=globalThis.THREE,V=typeof v>"u"?[]:fe(E,_.line,_.curveMonotoneY,v),f=this.modelGraph.nodesById[u.v],b=this.modelGraph.nodesById[u.w];if(f==null){console.warn(`Edge from node not found: "${u.v}"`);continue}if(b==null){console.warn(`Edge to node not found: "${u.w}"`);continue}let C=`${f.id}|${b.id}`;m.push({id:C,fromNodeId:f.id,toNodeId:b.id,points:E,curvePoints:V});for(let O of E)i=Math.min(i,O.x),c=Math.min(c,O.y),h=Math.max(h,O.x),p=Math.max(p,O.y)}if(this.modelGraph.edgesByGroupNodeIds[e||""]=m,i0){let E=u*q+16;for(let _ of t)_.localOffsetY=E;l+=E}}return{x:s,y:d,width:I-P*2,height:l-d}}configLayout(e){e.setGraph({nodesep:20,ranksep:50,edgesep:20,marginx:P,marginy:ne}),e.setDefaultEdgeLabel(()=>({}))}};function $(n,e,o,t,r=!1){if(r)return Le;let s=n.label,d=w(s),a=0;for(let h of d)a=Math.max(x(h,11,N(n))+Me,a);N(n)&&(a+=28);let l=0,i=0;if(y(n)){let h=Z(o);for(let m of h){let I=x(`${m}:`,D,!0),u=ee(n,m),E=x(u,D,!1);l=Math.max(l,I),i=Math.max(i,E)}if(o["Op node attributes"]?.selected){let m=te(n,o["Op node attributes"]?.filterRegex||""),I=B(m);l=Math.max(l,I.maxAttrLabelWidth),i=Math.max(i,I.maxAttrValueWidth)}if(o["Op node inputs"]?.selected){let m=me(n,e),I=B(m);l=Math.max(l,I.maxAttrLabelWidth),i=Math.max(i,I.maxAttrValueWidth)}if(o["Op node outputs"]?.selected){let m=Ee(n),I=B(m);l=Math.max(l,I.maxAttrLabelWidth),i=Math.max(i,I.maxAttrValueWidth)}let p=Ie(n,e.id,o,t),g=B(p);l=Math.max(l,g.maxAttrLabelWidth),i=Math.max(i,g.maxAttrValueWidth)}else if(N(n)){let h=J(o);for(let p of h){let g=x(`${p}:`,D,!0),m=ee(n,p),I=x(m,D,!1);l=Math.max(l,g),i=Math.max(i,I)}if(o["Layer node attributes"]?.selected){let p=oe(n,e,o["Layer node attributes"]?.filterRegex||""),g=B(p);l=Math.max(l,g.maxAttrLabelWidth),i=Math.max(i,g.maxAttrValueWidth)}}i=Math.min(i,ce);let c=l+i+ie*2+Q;return c!==Q&&(c+=Ce*2),Math.max(ve,Math.max(a,c))}function se(n,e,o,t,r=!1,s=!1){if(r)return ye;if(n.height!=null&&!s)return n.height;let d=Y(n.label),a=0;return y(n)?a=we(o,n,t):N(n)&&(a=Re(n,e,o)),ye+d+a*q+(a>0?le-4:0)}function ae(n,e,o,t,r,s=!1,d=!1){let a={nodes:{},incomingEdges:{},outgoingEdges:{}};for(let i of e){if(y(i)&&i.hideInLayout)continue;let c={id:i.id,width:i.width||(d?10:$(i,o,t,r,s)),height:d?10:se(i,o,t,r,s),config:y(i)?i.config:void 0};a.nodes[i.id]=c}let l=o.layoutGraphEdges[n]||{};for(let[i,c]of Object.entries(l))for(let h of Object.keys(c)){let p=o.nodesById[i],g=o.nodesById[h];p&&y(p)&&p.config?.pinToGroupTop||g&&y(g)&&g.config?.pinToGroupTop||Be(a,i,h)}return a}function we(n,e,o){let t=Z(n),r=n["Op node attributes"]?.selected?te(e,n["Op node attributes"]?.filterRegex||"").length:0,s=n["Op node inputs"]?.selected?Object.keys(e.incomingEdges||[]).length:0;s>R&&(s=R+1);let d=n["Op node outputs"]?.selected?Object.keys(e.outputsMetadata||{}).length:0;d>R&&(d=R+1);let a=Object.keys(n).filter(l=>n[l].selected).filter(l=>l.startsWith(M)&&Object.values(o).some(i=>i.runName===l.replace(M,""))).length;return t.length+r+s+d+a}function Re(n,e,o){let t=J(o),r=o["Layer node attributes"]?.selected?oe(n,e,o["Layer node attributes"]?.filterRegex||"").length:0;return t.length+r}function Be(n,e,o){n.outgoingEdges[e]==null&&(n.outgoingEdges[e]=[]),n.outgoingEdges[e].push(o),n.incomingEdges[o]==null&&(n.incomingEdges[o]=[]),n.incomingEdges[o].push(e)}function B(n){let e=0,o=0;for(let{key:t,value:r}of n){let s=x(t,D,!0);e=Math.max(e,s);let d=x(r,D,!1);o=Math.max(o,d)}return{maxAttrLabelWidth:e,maxAttrValueWidth:o}}var S=class{constructor(e,o,t,r,s=!1){this.modelGraph=e;this.dagre=o;this.showOnNodeItemTypes=t;this.nodeDataProviderRuns=r;this.testMode=s}dagreGraphs=[];expandGroupNode(e){let o=this.modelGraph.nodesById[e];if(o&&N(o)){if(o.expanded)return;o.expanded=!0}let t=e;for(;t!=null;){let s=this.modelGraph.nodesById[t];if(!s)break;s.expanded=!0;let d=new T(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns),a=d.layout(t);this.testMode&&this.dagreGraphs.push(d.dagreGraph);let l=a.width+P*2,i=this.getTargetGroupNodeHeight(a,s);s.width=l,s.height=i,t=s.nsParentId}let r=new T(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns);r.layout(),this.testMode&&this.dagreGraphs.push(r.dagreGraph);for(let s of this.modelGraph.rootNodes)N(s)&&this.updateNodeOffset(s)}expandFromDeepestGroupNodes(e){let o=new Set,t=[...e];for(;t.length>0;){let d=t.shift();if(o.has(d))continue;o.add(d);let l=this.modelGraph.nodesById[d]?.nsParentId;l&&t.push(l)}let r=Array.from(o).sort((d,a)=>{let l=this.modelGraph.nodesById[d];return this.modelGraph.nodesById[a].level-l.level});for(let d of r){let a=this.modelGraph.nodesById[d];a.expanded=!0;let l=new T(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns),i=l.layout(d);this.testMode&&this.dagreGraphs.push(l.dagreGraph);let c=i.width+P*2,h=this.getTargetGroupNodeHeight(i,a);a.width=c,a.height=h}let s=new T(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns);s.layout(),this.testMode&&this.dagreGraphs.push(s.dagreGraph);for(let d of this.modelGraph.rootNodes)N(d)&&this.updateNodeOffset(d)}expandToRevealNode(e){let o=this.modelGraph.nodesById[e],t=[],r=o;for(;;){let d=this.modelGraph.nodesById[r.nsParentId||""];if(!d)break;t.unshift(d),r=d}for(let d of t)this.expandGroupNode(d.id);let s=[];return A(void 0,this.modelGraph,s),s}collapseGroupNode(e){let o=this.modelGraph.nodesById[e];if(!o)return[];o.expanded=!1,delete this.modelGraph.edgesByGroupNodeIds[e],o.width=$(o,this.modelGraph,this.showOnNodeItemTypes,this.nodeDataProviderRuns),o.height=se(o,this.modelGraph,this.showOnNodeItemTypes,this.nodeDataProviderRuns,this.testMode,!0);let t=o.nsParentId;for(;t!=null;){let d=this.modelGraph.nodesById[t];if(!d)break;let a=new T(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns),l=a.layout(t);this.testMode&&this.dagreGraphs.push(a.dagreGraph);let i=l.width+P*2,c=this.getTargetGroupNodeHeight(l,d);d.width=i,d.height=c,t=d.nsParentId}let r=new T(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns);r.layout(),this.testMode&&this.dagreGraphs.push(r.dagreGraph);for(let d of this.modelGraph.rootNodes)N(d)&&this.updateNodeOffset(d);let s=[];return A(void 0,this.modelGraph,s),s}reLayoutGraph(e,o){let t=e;if(t)o&&this.clearLayoutData(void 0,!0);else{let r=[];this.clearLayoutData(void 0),A(void 0,this.modelGraph,r),t=r}return t.length>0?this.expandFromDeepestGroupNodes(t):new T(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns).layout(),t}expandAllGroups(){this.clearLayoutData(void 0,!0);let e=this.modelGraph.nodes.filter(o=>N(o)&&(o.nsChildrenIds||[]).filter(t=>N(this.modelGraph.nodesById[t])).length===0).map(o=>o.id);return e.length>0&&this.expandFromDeepestGroupNodes(e),e}collapseAllGroup(){this.clearLayoutData(void 0,!0),new T(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns).layout();for(let o of this.modelGraph.rootNodes)N(o)&&this.updateNodeOffset(o);return[]}updateNodeOffset(e){for(let o of e.nsChildrenIds||[]){let t=this.modelGraph.nodesById[o];if(t.x!=null&&t.y!=null){t.globalX=(e.x||0)+(e.globalX||0)+(t.localOffsetX||0),t.globalY=(e.y||0)+(e.globalY||0)+(t.localOffsetY||0);let r=(w(e.label).length-1)*H;r>0&&(t.globalY+=r),e.pinToTopOpNode&&t.id!==e.pinToTopOpNode.id&&(t.globalY+=this.getPinToTopNodeVerticalSpace(e.pinToTopOpNode)),e.pinToTopOpNode?.id===t.id&&(t.globalX=(e.x||0)+(e.globalX||0)+(e.width||0)/2,t.globalY=(e.y||0)+(e.globalY||0)+(t.localOffsetY||0)+this.getPinToTopNodeVerticalSpace(t)-(t.height||0)/2+10)}N(t)&&this.updateNodeOffset(t)}}clearLayoutData(e,o){let t=[];e==null?t=this.modelGraph.rootNodes.map(r=>r.id):t=e.nsChildrenIds||[],o&&e!=null&&(e.expanded=!1,delete this.modelGraph.edgesByGroupNodeIds[e.id]);for(let r of t){let s=this.modelGraph.nodesById[r];s&&(s.width=void 0,s.height=void 0,N(s)&&s.expanded&&this.clearLayoutData(s,o))}}getPinToTopNodeVerticalSpace(e){return(e.height||0)+20}getTargetGroupNodeHeight(e,o){let t=Y(o.label),r=e.height+ne+Te+t;return o.pinToTopOpNode&&(r+=this.getPinToTopNodeVerticalSpace(o.pinToTopOpNode)),r}};function G(n,e,o){let t={eventType:8,paneId:n,label:e,error:o};postMessage(t)}var ke=/dense<([^>]*)>/,F=class{constructor(e,o,t,r={},s={},d=pe,a=!1,l=!1,i=!1){this.paneId=e;this.graph=o;this.config=t;this.showOnNodeItemTypes=r;this.nodeDataProviderRuns=s;this.groupNodeChildrenCountThreshold=d;this.testMode=a;this.flattenLayers=l;this.keepLayersWithASingleChild=i;this.nodeLabelsToHide=new Set((this.config?.nodeLabelsToHide||[]).map(c=>c.toLowerCase()))}nodeLabelsToHide;process(){let e=this.createEmptyModelGraph();return this.processNodes(e),this.processEdgeRelationships(e),G(this.paneId,"Processing nodes and edges"),this.processNamespaceRelationships(e),G(this.paneId,"Processing layer namespaces"),this.generateLayoutGraphConnections(e),G(this.paneId,"Processing layout data"),this.splitLargeGroupNodes(e),G(this.paneId,"Splitting large layers (if any)"),this.populateDescendantsAndCounts(e),e}processNodes(e){let o=new Set;for(let t of this.graph.nodes){let s=t.namespace.split(";").filter(a=>a!=="");s.length>1&&(t.namespace=s[s.length-1]);let d={nodeType:0,id:t.id,namespace:this.flattenLayers?"":t.namespace,savedNamespace:t.namespace,fullNamespace:t.namespace,label:t.label,level:this.getNonEmptyNamespaceComponents(t.namespace).length};if(t.subgraphIds&&t.subgraphIds.length>0&&(d.subgraphIds=t.subgraphIds),this.nodeLabelsToHide.has(t.label.toLowerCase())&&(d.hideInLayout=!0),t.attrs){let a={};for(let l of t.attrs)a[l.key]=this.processAttrValue(l.key,l.value);d.attrs=a}if(t.inputsMetadata&&(d.inputsMetadata=this.processMetadataList(t.inputsMetadata)),t.outputsMetadata&&(d.outputsMetadata=this.processMetadataList(t.outputsMetadata)),t.style&&(d.style=t.style),t.config&&(d.config=t.config),e.nodes.push(d),e.nodesById[d.id]=d,!d.hideInLayout&&!this.flattenLayers){let a=this.getAncestorNamespaces(d.namespace);for(let l of a){if(o.has(l))continue;o.add(l);let i=l.split("/"),c=i.splice(-1)[0],h=i.join("/"),p={nodeType:1,id:this.getGroupNodeIdFromNamespace(l),namespace:h,label:c,level:i.length,expanded:!1};e.nodes.push(p),e.nodesById[p.id]=p}}}}processEdgeRelationships(e){for(let o of this.graph.nodes){let t=e.nodesById[o.id];if(t)for(let r of o.incomingEdges||[]){let s=r.sourceNodeId,d=e.nodesById[s];d&&(t.incomingEdges==null&&(t.incomingEdges=[]),t.incomingEdges.find(a=>a.sourceNodeId===s&&a.sourceNodeOutputId===r.sourceNodeOutputId&&a.targetNodeInputId===r.targetNodeInputId)==null&&t.incomingEdges.push({...r}),d.outgoingEdges==null&&(d.outgoingEdges=[]),d.outgoingEdges.find(a=>a.targetNodeId===t.id&&a.sourceNodeOutputId===r.sourceNodeOutputId&&a.targetNodeInputId===r.targetNodeInputId)==null&&d.outgoingEdges.push({targetNodeId:t.id,sourceNodeOutputId:r.sourceNodeOutputId,targetNodeInputId:r.targetNodeInputId}))}}}processNamespaceRelationships(e){for(let o of e.nodes){if(y(o)&&o.hideInLayout)continue;let t=o.namespace;if(t===""){e.rootNodes.push(o);continue}let r=this.getGroupNodeIdFromNamespace(t),s=e.nodesById[r];s?o.nsParentId=s.id:console.warn(`Failed to find the NS parent of node "${o.id}": "${r}"`),s&&(s.nsChildrenIds==null&&(s.nsChildrenIds=[]),s.nsChildrenIds.includes(o.id)||(s.nsChildrenIds.push(o.id),y(o)&&o.config?.pinToGroupTop&&(s.pinToTopOpNode=o)))}if(!this.keepLayersWithASingleChild)for(;;){let o=0;for(let t of e.nodes)if(N(t)&&t.nsChildrenIds!=null&&t.nsChildrenIds.length===1){let r=e.nodesById[t.nsChildrenIds[0]];if(y(r)){o++;let s=e.nodes.indexOf(t);s>=0&&e.nodes.splice(s,1),delete e.nodesById[t.id];let d=r.namespace,a=this.getNonEmptyNamespaceComponents(d);a.pop(),r.namespace=a.join("/"),r.savedNamespace=r.namespace,r.level=a.length,r.nsParentId=t.nsParentId;let l=e.rootNodes.indexOf(t);if(l>=0&&(e.rootNodes.splice(l,1),e.rootNodes.push(r)),t.nsParentId){let i=e.nodesById[t.nsParentId],c=i.nsChildrenIds.indexOf(t.id);i.nsChildrenIds.splice(c,1),i.nsChildrenIds.push(r.id)}}}if(o===0)break}}generateLayoutGraphConnections(e){e.layoutGraphEdges={};let o=[];for(let s of e.nodes){if(!y(s)||s.hideInLayout)continue;(s.incomingEdges||[]).filter(a=>!e.nodesById[a.sourceNodeId].hideInLayout).length===0&&o.push(s)}let t=[...o],r=new Set;for(;t.length>0;){let s=t.shift();if(s==null||s.hideInLayout||r.has(s.id))continue;r.add(s.id);let d=s.outgoingEdges||[];for(let a of d){let l=e.nodesById[a.targetNodeId];if(l.hideInLayout)continue;let i=_e(s.namespace,l.namespace),c=re(i,s.namespace),h=c===""?s.id:`${i}${i===""?"":"/"}${c}___group___`,p=re(i,l.namespace),g=p===""?l.id:`${i}${i===""?"":"/"}${p}___group___`,m=i===""?"":`${i}___group___`;e.layoutGraphEdges[m]==null&&(e.layoutGraphEdges[m]={}),e.layoutGraphEdges[m][h]==null&&(e.layoutGraphEdges[m][h]={}),e.layoutGraphEdges[m][h][g]=!0}for(let a of d){let l=e.nodesById[a.targetNodeId];t.push(l)}}}splitLargeGroupNodes(e){let o=[void 0],t=!1;for(;o.length>0;){let r=o.shift(),s=r==null?e.rootNodes:(r.nsChildrenIds||[]).map(d=>e.nodesById[d]);if(s.length>this.groupNodeChildrenCountThreshold){t=!0;let d=ae(r?.id||"",s,e,this.showOnNodeItemTypes,this.nodeDataProviderRuns,this.testMode,!0),a=[];for(let g of Object.keys(d.nodes))d.incomingEdges[g]==null&&a.push(e.nodesById[g]);let l=[],i=[],c=new Set,h=g=>{if(c.has(g))return;c.add(g);let m=e.nodesById[g];i.push(m),i.length===this.groupNodeChildrenCountThreshold&&(l.push(i),i=[]);for(let I of d.outgoingEdges[m.id]||[])h(I)};for(let g of a)h(g.id);i.length0&&l.push(i);let p=[];for(let g=0;gf!=="").length,nsParentId:r?.id,nsChildrenIds:m.map(f=>f.id),expanded:!1,sectionContainer:!0};p.push(_),e.nodes.push(_),e.nodesById[_.id]=_,e.artificialGroupNodeIds==null&&(e.artificialGroupNodeIds=[]),e.artificialGroupNodeIds.push(_.id);for(let f of m)f.nsParentId=_.id;let v=E.replace("___group___",""),V=f=>{if(f.namespace===""?f.namespace=v:r==null?f.namespace=`${v}/${f.namespace}`:f.namespace=(f.nsParentId||"").replace("___group___",""),f.level=f.namespace.split("/").filter(C=>C!=="").length,N(f)){let C=f.id;if(delete e.nodesById[f.id],f.id=`${f.namespace}/${f.label}___group___`,e.nodesById[f.id]=f,f.nsParentId){let O=e.nodesById[f.nsParentId],L=(O.nsChildrenIds||[]).indexOf(C);L>=0&&((O.nsChildrenIds||[])[L]=f.id)}for(let O of f.nsChildrenIds||[]){let L=e.nodesById[O];L!=null&&(L.nsParentId=f.id,V(L))}}};for(let f of m)V(f);if(r==null){for(let f of m){let b=e.rootNodes.indexOf(f);b>=0&&e.rootNodes.splice(b,1)}_.namespace===""&&e.rootNodes.push(_)}s=p}r!=null&&(r.nsChildrenIds=p.map(g=>g.id))}for(let d of s)N(d)&&o.push(d)}t&&this.generateLayoutGraphConnections(e)}populateDescendantsAndCounts(e){let o=Number.MAX_VALUE,t=Number.NEGATIVE_INFINITY;for(let r of e.nodes)if(N(r)){let s=[];this.gatherDescendants(e,r,s),r.descendantsNodeIds=s.map(a=>a.id),r.descendantsOpNodeIds=s.filter(a=>a.nodeType===0).map(a=>a.id);let d=(r.descendantsOpNodeIds||[]).length;o=Math.min(d,o),t=Math.max(d,t)}e.minDescendantOpNodeCount=o,e.maxDescendantOpNodeCount=t}createEmptyModelGraph(){let e={id:this.graph.id,collectionLabel:this.graph.collectionLabel||"",nodes:[],nodesById:{},rootNodes:[],edgesByGroupNodeIds:{},layoutGraphEdges:{},minDescendantOpNodeCount:-1,maxDescendantOpNodeCount:-1};return this.graph.groupNodeAttributes&&(e.groupNodeAttributes=this.graph.groupNodeAttributes),e}getAncestorNamespaces(e){let o=this.getNonEmptyNamespaceComponents(e),t=[];for(;o.length>0;)t.push(o.join("/")),o.pop();return t}getNonEmptyNamespaceComponents(e){return e.split("/").filter(o=>o!=="")}getGroupNodeIdFromNamespace(e){return`${e}___group___`}gatherDescendants(e,o,t){for(let r of o.nsChildrenIds||[]){let s=e.nodesById[r];(N(s)||y(s)&&!s.hideInLayout)&&t.push(s),N(s)&&this.gatherDescendants(e,s,t)}}processAttrValue(e,o){if(o.startsWith("dense<")){let t=o.match(ke);if(t!=null&&t.length>1){let r=t[1];return Oe(r)}}else if(e===k)return Oe(o);return o.replaceAll('"',"")||""}processMetadataList(e){let o={};for(let t of e){let r={};for(let s of t.attrs){let d=s.key,a=s.value;d==="tensor_shape"&&(d="shape",a=a.replace("tensor<","").replace(">","").replace("*","\u2217").split("x").join(" x ")),r[d]=a}o[t.id]=r}return o}};function Oe(n){try{return JSON.stringify(JSON.parse(n),null,2).replaceAll("\\n",` -`).trim()}catch{return n}}var W=10000019,X=class{constructor(e){this.modelGraph=e}markIdenticalGroups(){let e={};for(let t of this.modelGraph.nodes){if(!N(t))continue;let r=0,s=(t.descendantsOpNodeIds||[]).map(a=>this.modelGraph.nodesById[a]).filter(a=>!a.hideInLayout),d=new Set(s.map(a=>a.id));for(let a of s)r=(r+this.getNodeHash(a,d))%W;for(let a of s)for(let l of a.outgoingEdges||[]){let i=l.targetNodeId;if(!d.has(i))continue;let c=this.modelGraph.nodesById[i];r=(r+this.getEdgeHash(a,c))%W}e[r]||(e[r]=[]),e[r].push(t)}let o=0;for(let t of Object.values(e))if(!(t.length<=1)&&!(t.length===2&&(t[0].nsParentId===t[1].id||t[1].nsParentId===t[0].id))){for(let r of t)r.identicalGroupIndex=o;o++}}getNodeHash(e,o){let t=0;t=this.addToHash(t,e.label);let r=0;for(let d of e.incomingEdges||[]){let a=d.sourceNodeId;if(o.has(a)){let l=this.modelGraph.nodesById[a];t=this.addToHash(t,`in ${l.label}`),r++}}let s=0;for(let d of e.outgoingEdges||[]){let a=d.targetNodeInputId;if(o.has(a)){let l=this.modelGraph.nodesById[a];t=this.addToHash(t,`out ${l.label}`),s++}}return t=this.addToHash(t,`${r}`),t=this.addToHash(t,`${s}`),t}getEdgeHash(e,o){return this.genHash(e.label+o.label)%W}genHash(e){let o=5381;e=e||"";for(let t=0,r=e.length;t{let e=n.data;switch(e.eventType){case 0:{let o=He(e.paneId,e.graph,e.showOnNodeItemTypes,e.nodeDataProviderRuns,e.config,e.groupNodeChildrenCountThreshold,e.flattenLayers,e.keepLayersWithASingleChild,e.initialLayout);U(o,e.paneId);let t={eventType:1,modelGraph:o,paneId:e.paneId};postMessage(t);break}case 9:{let o=K(e.modelGraphId,e.paneId),t=JSON.parse(JSON.stringify(o));U(t,e.rendererId);let r={eventType:10,modelGraph:o,paneId:e.paneId,rendererId:e.rendererId,groupNodeId:e.groupNodeId,initialPosition:e.initialPosition};postMessage(r);break}case 2:{let o=K(e.modelGraphId,e.rendererId),t=[];e.expand?t=Ye(o,e.groupNodeId,e.showOnNodeItemTypes,e.nodeDataProviderRuns,e.all===!0):t=$e(o,e.groupNodeId,e.showOnNodeItemTypes,e.nodeDataProviderRuns,e.all===!0),U(o,e.rendererId);let r={eventType:3,modelGraph:o,expanded:e.expand,groupNodeId:e.groupNodeId,rendererId:e.rendererId,deepestExpandedGroupNodeIds:t};postMessage(r);break}case 4:{let o=K(e.modelGraphId,e.rendererId);Fe(o,e.showOnNodeItemTypes,e.nodeDataProviderRuns,e.targetDeepestGroupNodeIdsToExpand,e.clearAllExpandStates),U(o,e.rendererId);let t={eventType:5,modelGraph:o,selectedNodeId:e.selectedNodeId,rendererId:e.rendererId,forRestoringUiState:e.forRestoringUiState,rectToZoomFit:e.rectToZoomFit,forRestoringSnapshotAfterTogglingFlattenLayers:e.forRestoringSnapshotAfterTogglingFlattenLayers,targetDeepestGroupNodeIdsToExpand:e.targetDeepestGroupNodeIdsToExpand,triggerNavigationSync:e.triggerNavigationSync};postMessage(t);break}case 6:{let o=K(e.modelGraphId,e.rendererId),t=We(o,e.showOnNodeItemTypes,e.nodeDataProviderRuns,e.nodeId);U(o,e.rendererId);let r={eventType:7,modelGraph:o,nodeId:e.nodeId,rendererId:e.rendererId,deepestExpandedGroupNodeIds:t,noNodeShake:e.noNodeShake,select:e.select};postMessage(r);break}case 11:{de={};break}default:break}});function He(n,e,o,t,r,s,d,a,l){let i,h=new F(n,e,r,o,{},s,!1,d,a).process();if(h.nodesById[""]!=null&&(i="Some nodes have empty strings as ids which will cause layout failures. See console for details.",console.warn("Nodes with empty ids",h.nodesById[""])),!i&&l){let g=new T(h,dagre,o,t);try{g.layout()}catch(m){i=`Failed to layout graph: ${m}`}}return G(n,"Laying out root layer",i),new X(h).markIdenticalGroups(),G(n,"Finding identical layers"),h}function Ye(n,e,o,t,r){let s=new S(n,dagre,o,t);if(e!=null){let d,a=n.nodesById[e];if(a&&N(a)){a.expanded=!0;let i=a;for(;;){let h=i.nsChildrenIds||[];if(h.length===1){let p=n.nodesById[h[0]];if(p&&N(p))p.expanded=!0,i=p;else break}else break}let c=[];A(i,n,c),d=c.length===0?[i.id]:c;for(let h of i.descendantsNodeIds||[]){let p=n.nodesById[h];p.width=void 0,p.height=void 0}}if(r){for(let i of a.descendantsNodeIds||[]){let c=n.nodesById[i];N(c)&&(c.expanded=!0)}d=void 0}s.reLayoutGraph(d);let l=[];return A(void 0,n,l),l}else return s.expandAllGroups()}function $e(n,e,o,t,r){let s=new S(n,dagre,o,t);if(e!=null){if(r){let d=n.nodesById[e];for(let a of d.descendantsNodeIds||[]){let l=n.nodesById[a];N(l)&&(l.expanded=!1,l.width=void 0,l.height=void 0,delete n.edgesByGroupNodeIds[l.id])}}return s.collapseGroupNode(e)}else return s.collapseAllGroup()}function Fe(n,e,o,t,r){new S(n,dagre,e,o).reLayoutGraph(t,r)}function We(n,e,o,t){return new S(n,dagre,e,o).expandToRevealNode(t)}function U(n,e){de[Pe(n.id,e)]=n}function K(n,e){let o=de[Pe(n,e)];if(o==null)throw new Error(`ModelGraph with id "${n}" not found for rendererId "${e}"`);return o}function Pe(n,e){return`${n}___${e}`} diff --git a/src/server/package/src/model_explorer/web_app/worker-KVPVY7KV.js b/src/server/package/src/model_explorer/web_app/worker-KVPVY7KV.js new file mode 100644 index 00000000..66cd5958 --- /dev/null +++ b/src/server/package/src/model_explorer/web_app/worker-KVPVY7KV.js @@ -0,0 +1,3 @@ +var q=4,le=4,D=9,ce=16,pe=200,j=12,ue=1e3;var z=25;var ge=.1;var M="Node data provider: ",R=10;var k="__value",Z="__tensor_tag",P=20;var H=14;var De=new OffscreenCanvas(300,300),he={},Rt=typeof navigator<"u"&&/Macintosh/.test(navigator.userAgent);function y(n){return n?.nodeType===0}function N(n){return n?.nodeType===1}function J(n){let e=[];for(let[o,t]of Object.entries(n))switch(o){case"Op node id":t.selected&&e.push("id");break;default:break}return e}function ee(n){let e=[];for(let[o,t]of Object.entries(n))switch(o){case"Layer node children count":t.selected&&e.push("#children");break;case"Layer node descendants count":t.selected&&e.push("#descendants");break;default:break}return e}function te(n,e){if(y(n))switch(e.toLowerCase()){case"id":return n.id;case"namespace":return fe(n);default:break}else if(N(n))switch(e.toLowerCase()){case"namespace":return fe(n);case"#children":return String((n.nsChildrenIds||[]).length);case"#descendants":return String((n.descendantsNodeIds||[]).length);default:break}return""}function fe(n){return n.fullNamespace||n.namespace||""}function x(n,e,o,t=!1){let r=[];n==null?r=e.rootNodes.map(s=>s.id):r=n.nsChildrenIds||[];for(let s of r){let d=e.nodesById[s];if(d&&N(d)&&(t||!t&&d.expanded)){let a=d.nsChildrenIds||[];(t?a.filter(i=>N(e.nodesById[i])).length===0:a.filter(i=>N(e.nodesById[i])).every(i=>!e.nodesById[i].expanded))&&o.push(d.id),x(d,e,o,t)}}}function Ne(n,e,o,t){let r=[];if(n.length===2)r=n;else if(n.length===3&&n[0].x===n[1].x&&n[1].x===n[2].x)r=n;else{let s=!0,d=0;for(let l=0;li?1:-1;if(d!==0&&d!==h){s=!1;break}d=h}let a=t.Vector3;if(s){let i=e().x(p=>p.x).y(p=>p.y).curve(o)(n).split(/M|C/).filter(p=>p!=="").map(p=>p.split(",").map(g=>Number(g))),c=new a(i[0][0],i[0][1],0),h=new t.CurvePath;for(let p=1;pnew a(c.x,c.y,0));r=new t.CatmullRomCurve3(l,!1,"catmullrom",ge).getPoints(z)}}return r}function A(n,e,o,t=!0){let r=`${n}___${e}___${o}`,s=he[r];if(s==null){let d=De.getContext("2d");d.font=`${e}px "Google Sans Text", Arial, Helvetica, sans-serif`,o&&(d.font=`bold ${d.font}`);let l=d.measureText(n).width;t&&(he[r]=l),s=l}return s}function Se(n,e,o){let t=o[Z];return t?`Input${n}:${t} (${e.label})`:`Input${n} (${e.label})`}function Le(n,e,o){let t=`Output${n}`;if(o.label==="GraphInputs"){let r=e.tensor_name;r!=null&&(t=`${t} (${r})`)}else{let r=e[Z];r&&(t=`Output${n}:${r}`)}return t}function me(n){let e=((n||{}).shape||"").replace(/ /g,"").replace(/×/g,"x");return e===""&&(e="?"),e}function oe(n,e=""){let o=n.attrs||{},t=[],r=new RegExp(e,"i");for(let s of Object.keys(o)){let d=s,a=o[s],l=[`${d}:${a}`,`${d}=${a}`];if(e.trim()===""||l.some(i=>r.test(i))){let i=a;d===k?i=a.replace(/\s/gm,""):i=a.replace(/(\r\n|\n|\r)/gm," "),t.push({key:d,value:i})}}return t}function re(n,e,o=""){let t=e.groupNodeAttributes?.[n.id.replace("___group___","")]||{},r=[],s=new RegExp(o,"i");for(let d of Object.keys(t)){let a=d,l=t[d],i=[`${a}:${l}`,`${a}=${l}`];if(o.trim()===""||i.some(c=>s.test(c))){let c=l.replace(/(\r\n|\n|\r)/gm," ");r.push({key:a,value:c})}}return r}function Ee(n,e){let o=n.incomingEdges||[],t=[];for(let r=0;rR){let r=o.length-R;t.push({key:`(${r} more input${r===1?"":"s"} omitted)`,value:"..."})}return t}function Ie(n){let e=[],o=n.outputsMetadata||{},t=Object.values(o);for(let r=0;rR){let r=t.length-R;e.push({key:`(${r} more output${r===1?"":"s"} omitted)`,value:"..."})}return e}function _e(n,e,o,t){let r=[],s=Object.keys(o).filter(a=>o[a].selected).filter(a=>a.startsWith(M)).map(a=>a.replace(M,"")),d=Object.values(t).filter(a=>s.includes(Y(a,{id:e})));for(let a of d){let l=(a.results||{})?.[e][n.id]?.strValue||"-";r.push({key:Y(a,{id:e}),value:l})}return r}function ye(n,e){let o=n.split("/"),t=e.split("/"),r="";for(let s=Math.min(o.length,t.length);s>0;s--){let d=o.slice(0,s).join("/"),a=t.slice(0,s).join("/");if(d===a){r=a;break}}return r}function ne(n,e){if(n===e)return"";let o=n.split("/").filter(r=>r!==""),t=e.split("/").filter(r=>r!=="");return t.length===0?"":t[o.length]}function w(n){return n.split(` +`).map(e=>e.trim()).filter(e=>e!=="")}function $(n){return(w(n).length-1)*H}function Y(n,e){return n.nodeDataProviderData?.[e?.id||""]?.name??n.runName}var se=36,Re=16,Te=26,Me=50,ve=24,Ce=80,we=8,T=class{constructor(e,o,t,r,s=!1){this.modelGraph=e;this.dagre=o;this.showOnNodeItemTypes=t;this.nodeDataProviderRuns=r;this.testMode=s;this.dagreGraph=new this.dagre.graphlib.Graph}dagreGraph;layout(e){let o,t=[];e==null?t=this.modelGraph.rootNodes:(o=this.modelGraph.nodesById[e],t=(o.nsChildrenIds||[]).map(u=>this.modelGraph.nodesById[u])),this.configLayout(this.dagreGraph);let r=de(o?.id||"",t,this.modelGraph,this.showOnNodeItemTypes,this.nodeDataProviderRuns,this.testMode);for(let u of Object.keys(r.nodes)){let E=r.nodes[u];E.config?.pinToGroupTop||this.dagreGraph.setNode(u,E)}for(let u of Object.keys(r.outgoingEdges))for(let E of r.outgoingEdges[u])this.dagreGraph.setEdge(u,E);this.dagre.layout(this.dagreGraph);let s=Number.MAX_VALUE,d=Number.MAX_VALUE,a=Number.NEGATIVE_INFINITY,l=Number.NEGATIVE_INFINITY;for(let u of t){let E=r.nodes[u.id];if(!E){console.warn(`Node "${u.id}" is not in the dagre layout result`);continue}u.x=(E.x||0)-E.width/2,u.y=(E.y||0)-E.height/2,u.width=E.width,u.height=E.height,u.localOffsetX=0,u.localOffsetY=0,E.config?.pinToGroupTop||(s=Math.min(s,u.x),d=Math.min(d,u.y),a=Math.max(a,u.x+u.width),l=Math.max(l,u.y+u.height))}let i=Number.MAX_VALUE,c=Number.MAX_VALUE,h=Number.NEGATIVE_INFINITY,p=Number.NEGATIVE_INFINITY,g=this.dagreGraph.edges(),m=[];for(let u of g){let E=this.dagreGraph.edge(u).points,_=globalThis.d3,v=globalThis.THREE,V=typeof v>"u"?[]:Ne(E,_.line,_.curveMonotoneY,v),f=this.modelGraph.nodesById[u.v],b=this.modelGraph.nodesById[u.w];if(f==null){console.warn(`Edge from node not found: "${u.v}"`);continue}if(b==null){console.warn(`Edge to node not found: "${u.w}"`);continue}let C=`${f.id}|${b.id}`;m.push({id:C,fromNodeId:f.id,toNodeId:b.id,points:E,curvePoints:V});for(let O of E)i=Math.min(i,O.x),c=Math.min(c,O.y),h=Math.max(h,O.x),p=Math.max(p,O.y)}if(this.modelGraph.edgesByGroupNodeIds[e||""]=m,i0){let E=u*j+16;for(let _ of t)_.localOffsetY=E;l+=E}}return{x:s,y:d,width:I-P*2,height:l-d}}configLayout(e){e.setGraph({nodesep:20,ranksep:50,edgesep:20,marginx:P,marginy:se}),e.setDefaultEdgeLabel(()=>({}))}};function F(n,e,o,t,r=!1){if(r)return Me;let s=n.label,d=w(s),a=0;for(let h of d)a=Math.max(A(h,11,N(n))+ve,a);N(n)&&(a+=28);let l=0,i=0;if(y(n)){let h=J(o);for(let m of h){let I=A(`${m}:`,D,!0),u=te(n,m),E=A(u,D,!1);l=Math.max(l,I),i=Math.max(i,E)}if(o["Op node attributes"]?.selected){let m=oe(n,o["Op node attributes"]?.filterRegex||""),I=B(m);l=Math.max(l,I.maxAttrLabelWidth),i=Math.max(i,I.maxAttrValueWidth)}if(o["Op node inputs"]?.selected){let m=Ee(n,e),I=B(m);l=Math.max(l,I.maxAttrLabelWidth),i=Math.max(i,I.maxAttrValueWidth)}if(o["Op node outputs"]?.selected){let m=Ie(n),I=B(m);l=Math.max(l,I.maxAttrLabelWidth),i=Math.max(i,I.maxAttrValueWidth)}let p=_e(n,e.id,o,t),g=B(p);l=Math.max(l,g.maxAttrLabelWidth),i=Math.max(i,g.maxAttrValueWidth)}else if(N(n)){let h=ee(o);for(let p of h){let g=A(`${p}:`,D,!0),m=te(n,p),I=A(m,D,!1);l=Math.max(l,g),i=Math.max(i,I)}if(o["Layer node attributes"]?.selected){let p=re(n,e,o["Layer node attributes"]?.filterRegex||""),g=B(p);l=Math.max(l,g.maxAttrLabelWidth),i=Math.max(i,g.maxAttrValueWidth)}}i=Math.min(i,pe);let c=l+i+le*2+q;return c!==q&&(c+=we*2),Math.max(Ce,Math.max(a,c))}function ae(n,e,o,t,r=!1,s=!1){if(r)return Te;if(n.height!=null&&!s)return n.height;let d=$(n.label),a=0;return y(n)?a=Be(o,n,t,e):N(n)&&(a=Oe(n,e,o)),Te+d+a*j+(a>0?ce-4:0)}function de(n,e,o,t,r,s=!1,d=!1){let a={nodes:{},incomingEdges:{},outgoingEdges:{}};for(let i of e){if(y(i)&&i.hideInLayout)continue;let c={id:i.id,width:i.width||(d?10:F(i,o,t,r,s)),height:d?10:ae(i,o,t,r,s),config:y(i)?i.config:void 0};a.nodes[i.id]=c}let l=o.layoutGraphEdges[n]||{};for(let[i,c]of Object.entries(l))for(let h of Object.keys(c)){let p=o.nodesById[i],g=o.nodesById[h];p&&y(p)&&p.config?.pinToGroupTop||g&&y(g)&&g.config?.pinToGroupTop||Ue(a,i,h)}return a}function Be(n,e,o,t){let r=J(n),s=n["Op node attributes"]?.selected?oe(e,n["Op node attributes"]?.filterRegex||"").length:0,d=n["Op node inputs"]?.selected?Object.keys(e.incomingEdges||[]).length:0;d>R&&(d=R+1);let a=n["Op node outputs"]?.selected?Object.keys(e.outputsMetadata||{}).length:0;a>R&&(a=R+1);let l=Object.keys(n).filter(i=>n[i].selected).filter(i=>i.startsWith(M)&&Object.values(o).some(c=>Y(c,t)===i.replace(M,""))).length;return r.length+s+d+a+l}function Oe(n,e,o){let t=ee(o),r=o["Layer node attributes"]?.selected?re(n,e,o["Layer node attributes"]?.filterRegex||"").length:0;return t.length+r}function Ue(n,e,o){n.outgoingEdges[e]==null&&(n.outgoingEdges[e]=[]),n.outgoingEdges[e].push(o),n.incomingEdges[o]==null&&(n.incomingEdges[o]=[]),n.incomingEdges[o].push(e)}function B(n){let e=0,o=0;for(let{key:t,value:r}of n){let s=A(t,D,!0);e=Math.max(e,s);let d=A(r,D,!1);o=Math.max(o,d)}return{maxAttrLabelWidth:e,maxAttrValueWidth:o}}var S=class{constructor(e,o,t,r,s=!1){this.modelGraph=e;this.dagre=o;this.showOnNodeItemTypes=t;this.nodeDataProviderRuns=r;this.testMode=s}dagreGraphs=[];expandGroupNode(e){let o=this.modelGraph.nodesById[e];if(o&&N(o)){if(o.expanded)return;o.expanded=!0}let t=e;for(;t!=null;){let s=this.modelGraph.nodesById[t];if(!s)break;s.expanded=!0;let d=new T(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns),a=d.layout(t);this.testMode&&this.dagreGraphs.push(d.dagreGraph);let l=a.width+P*2,i=this.getTargetGroupNodeHeight(a,s);s.width=l,s.height=i,t=s.nsParentId}let r=new T(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns);r.layout(),this.testMode&&this.dagreGraphs.push(r.dagreGraph);for(let s of this.modelGraph.rootNodes)N(s)&&this.updateNodeOffset(s)}expandFromDeepestGroupNodes(e){let o=new Set,t=[...e];for(;t.length>0;){let d=t.shift();if(o.has(d))continue;o.add(d);let l=this.modelGraph.nodesById[d]?.nsParentId;l&&t.push(l)}let r=Array.from(o).sort((d,a)=>{let l=this.modelGraph.nodesById[d];return this.modelGraph.nodesById[a].level-l.level});for(let d of r){let a=this.modelGraph.nodesById[d];a.expanded=!0;let l=new T(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns),i=l.layout(d);this.testMode&&this.dagreGraphs.push(l.dagreGraph);let c=i.width+P*2,h=this.getTargetGroupNodeHeight(i,a);a.width=c,a.height=h}let s=new T(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns);s.layout(),this.testMode&&this.dagreGraphs.push(s.dagreGraph);for(let d of this.modelGraph.rootNodes)N(d)&&this.updateNodeOffset(d)}expandToRevealNode(e){let o=this.modelGraph.nodesById[e],t=[],r=o;for(;;){let d=this.modelGraph.nodesById[r.nsParentId||""];if(!d)break;t.unshift(d),r=d}for(let d of t)this.expandGroupNode(d.id);let s=[];return x(void 0,this.modelGraph,s),s}collapseGroupNode(e){let o=this.modelGraph.nodesById[e];if(!o)return[];o.expanded=!1,delete this.modelGraph.edgesByGroupNodeIds[e],o.width=F(o,this.modelGraph,this.showOnNodeItemTypes,this.nodeDataProviderRuns),o.height=ae(o,this.modelGraph,this.showOnNodeItemTypes,this.nodeDataProviderRuns,this.testMode,!0);let t=o.nsParentId;for(;t!=null;){let d=this.modelGraph.nodesById[t];if(!d)break;let a=new T(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns),l=a.layout(t);this.testMode&&this.dagreGraphs.push(a.dagreGraph);let i=l.width+P*2,c=this.getTargetGroupNodeHeight(l,d);d.width=i,d.height=c,t=d.nsParentId}let r=new T(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns);r.layout(),this.testMode&&this.dagreGraphs.push(r.dagreGraph);for(let d of this.modelGraph.rootNodes)N(d)&&this.updateNodeOffset(d);let s=[];return x(void 0,this.modelGraph,s),s}reLayoutGraph(e,o){let t=e;if(t)o&&this.clearLayoutData(void 0,!0);else{let r=[];this.clearLayoutData(void 0),x(void 0,this.modelGraph,r),t=r}return t.length>0?this.expandFromDeepestGroupNodes(t):new T(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns).layout(),t}expandAllGroups(){this.clearLayoutData(void 0,!0);let e=this.modelGraph.nodes.filter(o=>N(o)&&(o.nsChildrenIds||[]).filter(t=>N(this.modelGraph.nodesById[t])).length===0).map(o=>o.id);return e.length>0&&this.expandFromDeepestGroupNodes(e),e}collapseAllGroup(){this.clearLayoutData(void 0,!0),new T(this.modelGraph,this.dagre,this.showOnNodeItemTypes,this.nodeDataProviderRuns).layout();for(let o of this.modelGraph.rootNodes)N(o)&&this.updateNodeOffset(o);return[]}updateNodeOffset(e){for(let o of e.nsChildrenIds||[]){let t=this.modelGraph.nodesById[o];if(t.x!=null&&t.y!=null){t.globalX=(e.x||0)+(e.globalX||0)+(t.localOffsetX||0),t.globalY=(e.y||0)+(e.globalY||0)+(t.localOffsetY||0);let r=(w(e.label).length-1)*H;r>0&&(t.globalY+=r),e.pinToTopOpNode&&t.id!==e.pinToTopOpNode.id&&(t.globalY+=this.getPinToTopNodeVerticalSpace(e.pinToTopOpNode)),e.pinToTopOpNode?.id===t.id&&(t.globalX=(e.x||0)+(e.globalX||0)+(e.width||0)/2,t.globalY=(e.y||0)+(e.globalY||0)+(t.localOffsetY||0)+this.getPinToTopNodeVerticalSpace(t)-(t.height||0)/2+10)}N(t)&&this.updateNodeOffset(t)}}clearLayoutData(e,o){let t=[];e==null?t=this.modelGraph.rootNodes.map(r=>r.id):t=e.nsChildrenIds||[],o&&e!=null&&(e.expanded=!1,delete this.modelGraph.edgesByGroupNodeIds[e.id]);for(let r of t){let s=this.modelGraph.nodesById[r];s&&(s.width=void 0,s.height=void 0,N(s)&&s.expanded&&this.clearLayoutData(s,o))}}getPinToTopNodeVerticalSpace(e){return(e.height||0)+20}getTargetGroupNodeHeight(e,o){let t=$(o.label),r=e.height+se+Re+t;return o.pinToTopOpNode&&(r+=this.getPinToTopNodeVerticalSpace(o.pinToTopOpNode)),r}};function G(n,e,o){let t={eventType:8,paneId:n,label:e,error:o};postMessage(t)}var He=/dense<([^>]*)>/,W=class{constructor(e,o,t,r={},s={},d=ue,a=!1,l=!1,i=!1){this.paneId=e;this.graph=o;this.config=t;this.showOnNodeItemTypes=r;this.nodeDataProviderRuns=s;this.groupNodeChildrenCountThreshold=d;this.testMode=a;this.flattenLayers=l;this.keepLayersWithASingleChild=i;this.nodeLabelsToHide=new Set((this.config?.nodeLabelsToHide||[]).map(c=>c.toLowerCase()))}nodeLabelsToHide;process(){let e=this.createEmptyModelGraph();return this.processNodes(e),this.processEdgeRelationships(e),G(this.paneId,"Processing nodes and edges"),this.processNamespaceRelationships(e),G(this.paneId,"Processing layer namespaces"),this.generateLayoutGraphConnections(e),G(this.paneId,"Processing layout data"),this.splitLargeGroupNodes(e),G(this.paneId,"Splitting large layers (if any)"),this.populateDescendantsAndCounts(e),e}processNodes(e){let o=new Set;for(let t of this.graph.nodes){let s=t.namespace.split(";").filter(a=>a!=="");s.length>1&&(t.namespace=s[s.length-1]);let d={nodeType:0,id:t.id,namespace:this.flattenLayers?"":t.namespace,savedNamespace:t.namespace,fullNamespace:t.namespace,label:t.label,level:this.getNonEmptyNamespaceComponents(t.namespace).length};if(t.subgraphIds&&t.subgraphIds.length>0&&(d.subgraphIds=t.subgraphIds),this.nodeLabelsToHide.has(t.label.toLowerCase())&&(d.hideInLayout=!0),t.attrs){let a={};for(let l of t.attrs)a[l.key]=this.processAttrValue(l.key,l.value);d.attrs=a}if(t.inputsMetadata&&(d.inputsMetadata=this.processMetadataList(t.inputsMetadata)),t.outputsMetadata&&(d.outputsMetadata=this.processMetadataList(t.outputsMetadata)),t.style&&(d.style=t.style),t.config&&(d.config=t.config),e.nodes.push(d),e.nodesById[d.id]=d,!d.hideInLayout&&!this.flattenLayers){let a=this.getAncestorNamespaces(d.namespace);for(let l of a){if(o.has(l))continue;o.add(l);let i=l.split("/"),c=i.splice(-1)[0],h=i.join("/"),p={nodeType:1,id:this.getGroupNodeIdFromNamespace(l),namespace:h,label:c,level:i.length,expanded:!1};e.nodes.push(p),e.nodesById[p.id]=p}}}}processEdgeRelationships(e){for(let o of this.graph.nodes){let t=e.nodesById[o.id];if(t)for(let r of o.incomingEdges||[]){let s=r.sourceNodeId,d=e.nodesById[s];d&&(t.incomingEdges==null&&(t.incomingEdges=[]),t.incomingEdges.find(a=>a.sourceNodeId===s&&a.sourceNodeOutputId===r.sourceNodeOutputId&&a.targetNodeInputId===r.targetNodeInputId)==null&&t.incomingEdges.push({...r}),d.outgoingEdges==null&&(d.outgoingEdges=[]),d.outgoingEdges.find(a=>a.targetNodeId===t.id&&a.sourceNodeOutputId===r.sourceNodeOutputId&&a.targetNodeInputId===r.targetNodeInputId)==null&&d.outgoingEdges.push({targetNodeId:t.id,sourceNodeOutputId:r.sourceNodeOutputId,targetNodeInputId:r.targetNodeInputId}))}}}processNamespaceRelationships(e){for(let o of e.nodes){if(y(o)&&o.hideInLayout)continue;let t=o.namespace;if(t===""){e.rootNodes.push(o);continue}let r=this.getGroupNodeIdFromNamespace(t),s=e.nodesById[r];s?o.nsParentId=s.id:console.warn(`Failed to find the NS parent of node "${o.id}": "${r}"`),s&&(s.nsChildrenIds==null&&(s.nsChildrenIds=[]),s.nsChildrenIds.includes(o.id)||(s.nsChildrenIds.push(o.id),y(o)&&o.config?.pinToGroupTop&&(s.pinToTopOpNode=o)))}if(!this.keepLayersWithASingleChild)for(;;){let o=0;for(let t of e.nodes)if(N(t)&&t.nsChildrenIds!=null&&t.nsChildrenIds.length===1){let r=e.nodesById[t.nsChildrenIds[0]];if(y(r)){o++;let s=e.nodes.indexOf(t);s>=0&&e.nodes.splice(s,1),delete e.nodesById[t.id];let d=r.namespace,a=this.getNonEmptyNamespaceComponents(d);a.pop(),r.namespace=a.join("/"),r.savedNamespace=r.namespace,r.level=a.length,r.nsParentId=t.nsParentId;let l=e.rootNodes.indexOf(t);if(l>=0&&(e.rootNodes.splice(l,1),e.rootNodes.push(r)),t.nsParentId){let i=e.nodesById[t.nsParentId],c=i.nsChildrenIds.indexOf(t.id);i.nsChildrenIds.splice(c,1),i.nsChildrenIds.push(r.id)}}}if(o===0)break}}generateLayoutGraphConnections(e){e.layoutGraphEdges={};let o=[];for(let s of e.nodes){if(!y(s)||s.hideInLayout)continue;(s.incomingEdges||[]).filter(a=>!e.nodesById[a.sourceNodeId].hideInLayout).length===0&&o.push(s)}let t=[...o],r=new Set;for(;t.length>0;){let s=t.shift();if(s==null||s.hideInLayout||r.has(s.id))continue;r.add(s.id);let d=s.outgoingEdges||[];for(let a of d){let l=e.nodesById[a.targetNodeId];if(l.hideInLayout)continue;let i=ye(s.namespace,l.namespace),c=ne(i,s.namespace),h=c===""?s.id:`${i}${i===""?"":"/"}${c}___group___`,p=ne(i,l.namespace),g=p===""?l.id:`${i}${i===""?"":"/"}${p}___group___`,m=i===""?"":`${i}___group___`;e.layoutGraphEdges[m]==null&&(e.layoutGraphEdges[m]={}),e.layoutGraphEdges[m][h]==null&&(e.layoutGraphEdges[m][h]={}),e.layoutGraphEdges[m][h][g]=!0}for(let a of d){let l=e.nodesById[a.targetNodeId];t.push(l)}}}splitLargeGroupNodes(e){let o=[void 0],t=!1;for(;o.length>0;){let r=o.shift(),s=r==null?e.rootNodes:(r.nsChildrenIds||[]).map(d=>e.nodesById[d]);if(s.length>this.groupNodeChildrenCountThreshold){t=!0;let d=de(r?.id||"",s,e,this.showOnNodeItemTypes,this.nodeDataProviderRuns,this.testMode,!0),a=[];for(let g of Object.keys(d.nodes))d.incomingEdges[g]==null&&a.push(e.nodesById[g]);let l=[],i=[],c=new Set,h=g=>{if(c.has(g))return;c.add(g);let m=e.nodesById[g];i.push(m),i.length===this.groupNodeChildrenCountThreshold&&(l.push(i),i=[]);for(let I of d.outgoingEdges[m.id]||[])h(I)};for(let g of a)h(g.id);i.length0&&l.push(i);let p=[];for(let g=0;gf!=="").length,nsParentId:r?.id,nsChildrenIds:m.map(f=>f.id),expanded:!1,sectionContainer:!0};p.push(_),e.nodes.push(_),e.nodesById[_.id]=_,e.artificialGroupNodeIds==null&&(e.artificialGroupNodeIds=[]),e.artificialGroupNodeIds.push(_.id);for(let f of m)f.nsParentId=_.id;let v=E.replace("___group___",""),V=f=>{if(f.namespace===""?f.namespace=v:r==null?f.namespace=`${v}/${f.namespace}`:f.namespace=(f.nsParentId||"").replace("___group___",""),f.level=f.namespace.split("/").filter(C=>C!=="").length,N(f)){let C=f.id;if(delete e.nodesById[f.id],f.id=`${f.namespace}/${f.label}___group___`,e.nodesById[f.id]=f,f.nsParentId){let O=e.nodesById[f.nsParentId],L=(O.nsChildrenIds||[]).indexOf(C);L>=0&&((O.nsChildrenIds||[])[L]=f.id)}for(let O of f.nsChildrenIds||[]){let L=e.nodesById[O];L!=null&&(L.nsParentId=f.id,V(L))}}};for(let f of m)V(f);if(r==null){for(let f of m){let b=e.rootNodes.indexOf(f);b>=0&&e.rootNodes.splice(b,1)}_.namespace===""&&e.rootNodes.push(_)}s=p}r!=null&&(r.nsChildrenIds=p.map(g=>g.id))}for(let d of s)N(d)&&o.push(d)}t&&this.generateLayoutGraphConnections(e)}populateDescendantsAndCounts(e){let o=Number.MAX_VALUE,t=Number.NEGATIVE_INFINITY;for(let r of e.nodes)if(N(r)){let s=[];this.gatherDescendants(e,r,s),r.descendantsNodeIds=s.map(a=>a.id),r.descendantsOpNodeIds=s.filter(a=>a.nodeType===0).map(a=>a.id);let d=(r.descendantsOpNodeIds||[]).length;o=Math.min(d,o),t=Math.max(d,t)}e.minDescendantOpNodeCount=o,e.maxDescendantOpNodeCount=t}createEmptyModelGraph(){let e={id:this.graph.id,collectionLabel:this.graph.collectionLabel||"",nodes:[],nodesById:{},rootNodes:[],edgesByGroupNodeIds:{},layoutGraphEdges:{},minDescendantOpNodeCount:-1,maxDescendantOpNodeCount:-1};return this.graph.groupNodeAttributes&&(e.groupNodeAttributes=this.graph.groupNodeAttributes),e}getAncestorNamespaces(e){let o=this.getNonEmptyNamespaceComponents(e),t=[];for(;o.length>0;)t.push(o.join("/")),o.pop();return t}getNonEmptyNamespaceComponents(e){return e.split("/").filter(o=>o!=="")}getGroupNodeIdFromNamespace(e){return`${e}___group___`}gatherDescendants(e,o,t){for(let r of o.nsChildrenIds||[]){let s=e.nodesById[r];(N(s)||y(s)&&!s.hideInLayout)&&t.push(s),N(s)&&this.gatherDescendants(e,s,t)}}processAttrValue(e,o){if(o.startsWith("dense<")){let t=o.match(He);if(t!=null&&t.length>1){let r=t[1];return Pe(r)}}else if(e===k)return Pe(o);return o.replaceAll('"',"")||""}processMetadataList(e){let o={};for(let t of e){let r={};for(let s of t.attrs){let d=s.key,a=s.value;d==="tensor_shape"&&(d="shape",a=a.replace("tensor<","").replace(">","").replace("*","\u2217").split("x").join(" x ")),r[d]=a}o[t.id]=r}return o}};function Pe(n){try{return JSON.stringify(JSON.parse(n),null,2).replaceAll("\\n",` +`).trim()}catch{return n}}var X=10000019,K=class{constructor(e){this.modelGraph=e}markIdenticalGroups(){let e={};for(let t of this.modelGraph.nodes){if(!N(t))continue;let r=0,s=(t.descendantsOpNodeIds||[]).map(a=>this.modelGraph.nodesById[a]).filter(a=>!a.hideInLayout),d=new Set(s.map(a=>a.id));for(let a of s)r=(r+this.getNodeHash(a,d))%X;for(let a of s)for(let l of a.outgoingEdges||[]){let i=l.targetNodeId;if(!d.has(i))continue;let c=this.modelGraph.nodesById[i];r=(r+this.getEdgeHash(a,c))%X}e[r]||(e[r]=[]),e[r].push(t)}let o=0;for(let t of Object.values(e))if(!(t.length<=1)&&!(t.length===2&&(t[0].nsParentId===t[1].id||t[1].nsParentId===t[0].id))){for(let r of t)r.identicalGroupIndex=o;o++}}getNodeHash(e,o){let t=0;t=this.addToHash(t,e.label);let r=0;for(let d of e.incomingEdges||[]){let a=d.sourceNodeId;if(o.has(a)){let l=this.modelGraph.nodesById[a];t=this.addToHash(t,`in ${l.label}`),r++}}let s=0;for(let d of e.outgoingEdges||[]){let a=d.targetNodeInputId;if(o.has(a)){let l=this.modelGraph.nodesById[a];t=this.addToHash(t,`out ${l.label}`),s++}}return t=this.addToHash(t,`${r}`),t=this.addToHash(t,`${s}`),t}getEdgeHash(e,o){return this.genHash(e.label+o.label)%X}genHash(e){let o=5381;e=e||"";for(let t=0,r=e.length;t{let e=n.data;switch(e.eventType){case 0:{let o=Ye(e.paneId,e.graph,e.showOnNodeItemTypes,e.nodeDataProviderRuns,e.config,e.groupNodeChildrenCountThreshold,e.flattenLayers,e.keepLayersWithASingleChild,e.initialLayout);U(o,e.paneId);let t={eventType:1,modelGraph:o,paneId:e.paneId};postMessage(t);break}case 9:{let o=Q(e.modelGraphId,e.paneId),t=JSON.parse(JSON.stringify(o));U(t,e.rendererId);let r={eventType:10,modelGraph:o,paneId:e.paneId,rendererId:e.rendererId,groupNodeId:e.groupNodeId,initialPosition:e.initialPosition};postMessage(r);break}case 2:{let o=Q(e.modelGraphId,e.rendererId),t=[];e.expand?t=$e(o,e.groupNodeId,e.showOnNodeItemTypes,e.nodeDataProviderRuns,e.all===!0):t=Fe(o,e.groupNodeId,e.showOnNodeItemTypes,e.nodeDataProviderRuns,e.all===!0),U(o,e.rendererId);let r={eventType:3,modelGraph:o,expanded:e.expand,groupNodeId:e.groupNodeId,rendererId:e.rendererId,deepestExpandedGroupNodeIds:t};postMessage(r);break}case 4:{let o=Q(e.modelGraphId,e.rendererId);We(o,e.showOnNodeItemTypes,e.nodeDataProviderRuns,e.targetDeepestGroupNodeIdsToExpand,e.clearAllExpandStates),U(o,e.rendererId);let t={eventType:5,modelGraph:o,selectedNodeId:e.selectedNodeId,rendererId:e.rendererId,forRestoringUiState:e.forRestoringUiState,rectToZoomFit:e.rectToZoomFit,forRestoringSnapshotAfterTogglingFlattenLayers:e.forRestoringSnapshotAfterTogglingFlattenLayers,targetDeepestGroupNodeIdsToExpand:e.targetDeepestGroupNodeIdsToExpand,triggerNavigationSync:e.triggerNavigationSync};postMessage(t);break}case 6:{let o=Q(e.modelGraphId,e.rendererId),t=Xe(o,e.showOnNodeItemTypes,e.nodeDataProviderRuns,e.nodeId);U(o,e.rendererId);let r={eventType:7,modelGraph:o,nodeId:e.nodeId,rendererId:e.rendererId,deepestExpandedGroupNodeIds:t,noNodeShake:e.noNodeShake,select:e.select};postMessage(r);break}case 11:{ie={};break}default:break}});function Ye(n,e,o,t,r,s,d,a,l){let i,h=new W(n,e,r,o,{},s,!1,d,a).process();if(h.nodesById[""]!=null&&(i="Some nodes have empty strings as ids which will cause layout failures. See console for details.",console.warn("Nodes with empty ids",h.nodesById[""])),!i&&l){let g=new T(h,dagre,o,t);try{g.layout()}catch(m){i=`Failed to layout graph: ${m}`}}return G(n,"Laying out root layer",i),new K(h).markIdenticalGroups(),G(n,"Finding identical layers"),h}function $e(n,e,o,t,r){let s=new S(n,dagre,o,t);if(e!=null){let d,a=n.nodesById[e];if(a&&N(a)){a.expanded=!0;let i=a;for(;;){let h=i.nsChildrenIds||[];if(h.length===1){let p=n.nodesById[h[0]];if(p&&N(p))p.expanded=!0,i=p;else break}else break}let c=[];x(i,n,c),d=c.length===0?[i.id]:c;for(let h of i.descendantsNodeIds||[]){let p=n.nodesById[h];p.width=void 0,p.height=void 0}}if(r){for(let i of a.descendantsNodeIds||[]){let c=n.nodesById[i];N(c)&&(c.expanded=!0)}d=void 0}s.reLayoutGraph(d);let l=[];return x(void 0,n,l),l}else return s.expandAllGroups()}function Fe(n,e,o,t,r){let s=new S(n,dagre,o,t);if(e!=null){if(r){let d=n.nodesById[e];for(let a of d.descendantsNodeIds||[]){let l=n.nodesById[a];N(l)&&(l.expanded=!1,l.width=void 0,l.height=void 0,delete n.edgesByGroupNodeIds[l.id])}}return s.collapseGroupNode(e)}else return s.collapseAllGroup()}function We(n,e,o,t,r){new S(n,dagre,e,o).reLayoutGraph(t,r)}function Xe(n,e,o,t){return new S(n,dagre,e,o).expandToRevealNode(t)}function U(n,e){ie[xe(n.id,e)]=n}function Q(n,e){let o=ie[xe(n,e)];if(o==null)throw new Error(`ModelGraph with id "${n}" not found for rendererId "${e}"`);return o}function xe(n,e){return`${n}___${e}`}