codecharta-visualization 0.0.0-staging-9882370 → 0.0.0-staging-289e3b0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundler/browser/index.html +4 -4
- package/dist/bundler/browser/{main-NMKSXBGP.js → main-UGHMOFV6.js} +5 -5
- package/dist/bundler/browser/package.json +5 -0
- package/dist/bundler/browser/styles-ATEETD2Q.css +1 -0
- package/package.json +6 -1
- package/dist/bundler/browser/styles-GJBRA4GU.css +0 -1
|
@@ -1235,7 +1235,7 @@ void main() {
|
|
|
1235
1235
|
`],encapsulation:2,changeDetection:0})}return i})(),Mf=class i{_target;_ngZone;_platform;_containerElement;_triggerElement;_isPointerDown=!1;_activeRipples=new Map;_mostRecentTransientRipple;_lastTouchStartEvent;_pointerUpEventsRegistered=!1;_containerRect;static _eventManager=new uB;constructor(t,e,n,r,o){this._target=t,this._ngZone=e,this._platform=r,r.isBrowser&&(this._containerElement=pa(n)),o&&o.get(Tn).load(Hae)}fadeInRipple(t,e,n={}){let r=this._containerRect=this._containerRect||this._containerElement.getBoundingClientRect(),o=$e($e({},j0),n.animation);n.centered&&(t=r.left+r.width/2,e=r.top+r.height/2);let a=n.radius||Vae(t,e,r),s=t-r.left,l=e-r.top,c=o.enterDuration,d=document.createElement("div");d.classList.add("mat-ripple-element"),d.style.left=`${s-a}px`,d.style.top=`${l-a}px`,d.style.height=`${a*2}px`,d.style.width=`${a*2}px`,n.color!=null&&(d.style.backgroundColor=n.color),d.style.transitionDuration=`${c}ms`,this._containerElement.appendChild(d);let h=window.getComputedStyle(d),u=h.transitionProperty,f=h.transitionDuration,_=u==="none"||f==="0s"||f==="0s, 0s"||r.width===0&&r.height===0,y=new dB(this,d,n,_);d.style.transform="scale3d(1, 1, 1)",y.state=Aa.FADING_IN,n.persistent||(this._mostRecentTransientRipple=y);let b=null;return!_&&(c||o.exitDuration)&&this._ngZone.runOutsideAngular(()=>{let v=()=>{b&&(b.fallbackTimer=null),clearTimeout(x),this._finishRippleTransition(y)},M=()=>this._destroyRipple(y),x=setTimeout(M,c+100);d.addEventListener("transitionend",v),d.addEventListener("transitioncancel",M),b={onTransitionEnd:v,onTransitionCancel:M,fallbackTimer:x}}),this._activeRipples.set(y,b),(_||!c)&&this._finishRippleTransition(y),y}fadeOutRipple(t){if(t.state===Aa.FADING_OUT||t.state===Aa.HIDDEN)return;let e=t.element,n=$e($e({},j0),t.config.animation);e.style.transitionDuration=`${n.exitDuration}ms`,e.style.opacity="0",t.state=Aa.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=pa(t);!this._platform.isBrowser||!e||e===this._triggerElement||(this._removeTriggerEvents(),this._triggerElement=e,nN.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(()=>{rN.forEach(e=>{this._triggerElement.addEventListener(e,this,iN)})}),this._pointerUpEventsRegistered=!0)}_finishRippleTransition(t){t.state===Aa.FADING_IN?this._startFadeOutTransition(t):t.state===Aa.FADING_OUT&&this._destroyRipple(t)}_startFadeOutTransition(t){let e=t===this._mostRecentTransientRipple,{persistent:n}=t.config;t.state=Aa.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=Aa.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=bf(t),n=this._lastTouchStartEvent&&Date.now()<this._lastTouchStartEvent+Uae;!this._target.rippleDisabled&&!e&&!n&&(this._isPointerDown=!0,this.fadeInRipple(t.clientX,t.clientY,this._target.rippleConfig))}_onTouchStart(t){if(!this._target.rippleDisabled&&!vf(t)){this._lastTouchStartEvent=Date.now(),this._isPointerDown=!0;let e=t.changedTouches;if(e)for(let n=0;n<e.length;n++)this.fadeInRipple(e[n].clientX,e[n].clientY,this._target.rippleConfig)}}_onPointerUp(){this._isPointerDown&&(this._isPointerDown=!1,this._getActiveRipples().forEach(t=>{let e=t.state===Aa.VISIBLE||t.config.terminateOnPointerUp&&t.state===Aa.FADING_IN;!t.config.persistent&&e&&t.fadeOut()}))}_getActiveRipples(){return Array.from(this._activeRipples.keys())}_removeTriggerEvents(){let t=this._triggerElement;t&&(nN.forEach(e=>i._eventManager.removeHandler(e,t,this)),this._pointerUpEventsRegistered&&(rN.forEach(e=>t.removeEventListener(e,this,iN)),this._pointerUpEventsRegistered=!1))}};function Vae(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 Sf=new Je("mat-ripple-global-options"),Ja=(()=>{class i{_elementRef=R(Ft);_animationsDisabled=vn();color;unbounded;centered;radius=0;animation;get disabled(){return this._disabled}set disabled(e){e&&this.fadeOutAllNonPersistent(),this._disabled=e,this._setupTriggerEventsIfEnabled()}_disabled=!1;get trigger(){return this._trigger||this._elementRef.nativeElement}set trigger(e){this._trigger=e,this._setupTriggerEventsIfEnabled()}_trigger;_rippleRenderer;_globalOptions;_isInitialized=!1;constructor(){let e=R(ti),n=R(Ki),r=R(Sf,{optional:!0}),o=R(_i);this._globalOptions=r||{},this._rippleRenderer=new Mf(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:$e($e($e({},this._globalOptions.animation),this._animationsDisabled?{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,$e($e({},this.rippleConfig),r)):this._rippleRenderer.fadeInRipple(0,0,$e($e({},this.rippleConfig),e))}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,selectors:[["","mat-ripple",""],["","matRipple",""]],hostAttrs:[1,"mat-ripple"],hostVars:2,hostBindings:function(n,r){n&2&&yt("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"]})}return i})();var Qae={capture:!0},zae=["focus","mousedown","mouseenter","touchstart"],hB="mat-ripple-loader-uninitialized",fB="mat-ripple-loader-class-name",oN="mat-ripple-loader-centered",Yy="mat-ripple-loader-disabled",aN=(()=>{class i{_document=R(yi);_animationsDisabled=vn();_globalRippleOptions=R(Sf,{optional:!0});_platform=R(Ki);_ngZone=R(ti);_injector=R(_i);_eventCleanups;_hosts=new Map;constructor(){let e=R(ho).createRenderer(null,null);this._eventCleanups=this._ngZone.runOutsideAngular(()=>zae.map(n=>e.listen(this._document,n,this._onInteraction,Qae)))}ngOnDestroy(){let e=this._hosts.keys();for(let n of e)this.destroyRipple(n);this._eventCleanups.forEach(n=>n())}configureRipple(e,n){e.setAttribute(hB,this._globalRippleOptions?.namespace??""),(n.className||!e.hasAttribute(fB))&&e.setAttribute(fB,n.className||""),n.centered&&e.setAttribute(oN,""),n.disabled&&e.setAttribute(Yy,"")}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(Yy,""):e.removeAttribute(Yy)}_onInteraction=e=>{let n=Ao(e);if(n instanceof HTMLElement){let r=n.closest(`[${hB}="${this._globalRippleOptions?.namespace??""}"]`);r&&this._createRipple(r)}};_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(fB)),e.append(n);let r=this._globalRippleOptions,o=this._animationsDisabled?0:r?.animation?.enterDuration??j0.enterDuration,a=this._animationsDisabled?0:r?.animation?.exitDuration??j0.exitDuration,s={rippleDisabled:this._animationsDisabled||r?.disabled||e.hasAttribute(Yy),rippleConfig:{centered:e.hasAttribute(oN),terminateOnPointerUp:r?.terminateOnPointerUp,animation:{enterDuration:o,exitDuration:a}}},l=new Mf(s,this._ngZone,n,this._platform,this._injector),c=!s.rippleDisabled;c&&l.setupTriggerEvents(e),this._hosts.set(e,{target:s,renderer:l,hasSetUpEvents:c}),e.removeAttribute(hB)}destroyRipple(e){let n=this._hosts.get(e);n&&(n.renderer._removeTriggerEvents(),this._hosts.delete(e))}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})();var bo=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275cmp=re({type:i,selectors:[["structural-styles"]],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}}
|
|
1236
1236
|
`],encapsulation:2,changeDetection:0})}return i})();var qae=new Je("MAT_BUTTON_CONFIG");function sN(i){return i==null?void 0:Yn(i)}var lN=(()=>{class i{_elementRef=R(Ft);_ngZone=R(ti);_animationsDisabled=vn();_config=R(qae,{optional:!0});_focusMonitor=R(go);_cleanupClick;_renderer=R(cn);_rippleLoader=R(aN);_isAnchor;_isFab=!1;color;get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=e,this._updateRippleDisabled()}_disableRipple=!1;get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._updateRippleDisabled()}_disabled=!1;ariaDisabled;disabledInteractive;tabIndex;set _tabindex(e){this.tabIndex=e}constructor(){R(Tn).load(bo);let e=this._elementRef.nativeElement;this._isAnchor=e.tagName==="A",this.disabledInteractive=this._config?.disabledInteractive??!1,this.color=this._config?.color??null,this._rippleLoader?.configureRipple(e,{className:"mat-mdc-button-ripple"})}ngAfterViewInit(){this._focusMonitor.monitor(this._elementRef,!0),this._isAnchor&&this._setupAsAnchor()}ngOnDestroy(){this._cleanupClick?.(),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._isAnchor?this.disabled||null: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)}_getTabIndex(){return this._isAnchor?this.disabled&&!this.disabledInteractive?-1:this.tabIndex:this.tabIndex}_setupAsAnchor(){this._cleanupClick=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"click",e=>{this.disabled&&(e.preventDefault(),e.stopImmediatePropagation())}))}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,hostAttrs:[1,"mat-mdc-button-base"],hostVars:13,hostBindings:function(n,r){n&2&&(ni("disabled",r._getDisabledAttribute())("aria-disabled",r._getAriaDisabled())("tabindex",r._getTabIndex()),Xi(r.color?"mat-"+r.color:""),yt("mat-mdc-button-disabled",r.disabled)("mat-mdc-button-disabled-interactive",r.disabledInteractive)("mat-unthemed",!r.color)("_mat-animation-noopable",r._animationsDisabled))},inputs:{color:"color",disableRipple:[2,"disableRipple","disableRipple",kt],disabled:[2,"disabled","disabled",kt],ariaDisabled:[2,"aria-disabled","ariaDisabled",kt],disabledInteractive:[2,"disabledInteractive","disabledInteractive",kt],tabIndex:[2,"tabIndex","tabIndex",sN],_tabindex:[2,"tabindex","_tabindex",sN]}})}return i})();var Gae=["matButton",""],Wae=[[["",8,"material-icons",3,"iconPositionEnd",""],["mat-icon",3,"iconPositionEnd",""],["","matButtonIcon","",3,"iconPositionEnd",""]],"*",[["","iconPositionEnd","",8,"material-icons"],["mat-icon","iconPositionEnd",""],["","matButtonIcon","","iconPositionEnd",""]]],jae=[".material-icons:not([iconPositionEnd]), mat-icon:not([iconPositionEnd]), [matButtonIcon]:not([iconPositionEnd])","*",".material-icons[iconPositionEnd], mat-icon[iconPositionEnd], [matButtonIcon][iconPositionEnd]"];var cN=new Map([["text",["mat-mdc-button"]],["filled",["mdc-button--unelevated","mat-mdc-unelevated-button"]],["elevated",["mdc-button--raised","mat-mdc-raised-button"]],["outlined",["mdc-button--outlined","mat-mdc-outlined-button"]],["tonal",["mat-tonal-button"]]]),Wi=(()=>{class i extends lN{get appearance(){return this._appearance}set appearance(e){this.setAppearance(e||this._config?.defaultAppearance||"text")}_appearance=null;constructor(){super();let e=$ae(this._elementRef.nativeElement);e&&this.setAppearance(e)}setAppearance(e){if(e===this._appearance)return;let n=this._elementRef.nativeElement.classList,r=this._appearance?cN.get(this._appearance):null,o=cN.get(e);r&&n.remove(...r),n.add(...o),this._appearance=e}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=re({type:i,selectors:[["button","matButton",""],["a","matButton",""],["button","mat-button",""],["button","mat-raised-button",""],["button","mat-flat-button",""],["button","mat-stroked-button",""],["a","mat-button",""],["a","mat-raised-button",""],["a","mat-flat-button",""],["a","mat-stroked-button",""]],hostAttrs:[1,"mdc-button"],inputs:{appearance:[0,"matButton","appearance"]},exportAs:["matButton","matAnchor"],features:[nn],attrs:Gae,ngContentSelectors:jae,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&&(ki(Wae),Ti(0,"span",0),Gt(1),Ut(2,"span",1),Gt(3,1),qt(),Gt(4,2),Ti(5,"span",2)(6,"span",3)),n&2&&yt("mdc-button__ripple",!r._isFab)("mdc-fab__ripple",r._isFab)},styles:[`.mat-mdc-button-base{text-decoration:none}.mat-mdc-button-base .mat-icon{min-height:fit-content;flex-shrink:0}.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-button-text-horizontal-padding, 12px);height:var(--mat-button-text-container-height, 40px);font-family:var(--mat-button-text-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-text-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-text-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-text-label-text-transform);font-weight:var(--mat-button-text-label-text-weight, var(--mat-sys-label-large-weight))}.mat-mdc-button,.mat-mdc-button .mdc-button__ripple{border-radius:var(--mat-button-text-container-shape, var(--mat-sys-corner-full))}.mat-mdc-button:not(:disabled){color:var(--mat-button-text-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(--mat-button-text-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-button-text-with-icon-horizontal-padding, 16px)}.mat-mdc-button>.mat-icon{margin-right:var(--mat-button-text-icon-spacing, 8px);margin-left:var(--mat-button-text-icon-offset, -4px)}[dir=rtl] .mat-mdc-button>.mat-icon{margin-right:var(--mat-button-text-icon-offset, -4px);margin-left:var(--mat-button-text-icon-spacing, 8px)}.mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-text-icon-offset, -4px);margin-left:var(--mat-button-text-icon-spacing, 8px)}[dir=rtl] .mat-mdc-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-text-icon-spacing, 8px);margin-left:var(--mat-button-text-icon-offset, -4px)}.mat-mdc-button .mat-ripple-element{background-color:var(--mat-button-text-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-button-text-state-layer-color, var(--mat-sys-primary))}.mat-mdc-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-text-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-text-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-button-text-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-mdc-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-text-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-mdc-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-text-touch-target-size, 48px);display:var(--mat-button-text-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-unelevated-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-button-filled-container-height, 40px);font-family:var(--mat-button-filled-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-filled-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-filled-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-filled-label-text-transform);font-weight:var(--mat-button-filled-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-button-filled-horizontal-padding, 24px)}.mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-button-filled-icon-spacing, 8px);margin-left:var(--mat-button-filled-icon-offset, -8px)}[dir=rtl] .mat-mdc-unelevated-button>.mat-icon{margin-right:var(--mat-button-filled-icon-offset, -8px);margin-left:var(--mat-button-filled-icon-spacing, 8px)}.mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-filled-icon-offset, -8px);margin-left:var(--mat-button-filled-icon-spacing, 8px)}[dir=rtl] .mat-mdc-unelevated-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-filled-icon-spacing, 8px);margin-left:var(--mat-button-filled-icon-offset, -8px)}.mat-mdc-unelevated-button .mat-ripple-element{background-color:var(--mat-button-filled-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-button-filled-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-button-filled-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-unelevated-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-filled-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-button-filled-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-button-filled-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:var(--mat-button-filled-touch-target-size, 48px);display:var(--mat-button-filled-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-unelevated-button:not(:disabled){color:var(--mat-button-filled-label-text-color, var(--mat-sys-on-primary));background-color:var(--mat-button-filled-container-color, var(--mat-sys-primary))}.mat-mdc-unelevated-button,.mat-mdc-unelevated-button .mdc-button__ripple{border-radius:var(--mat-button-filled-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(--mat-button-filled-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-filled-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(--mat-button-protected-container-elevation-shadow, var(--mat-sys-level1));height:var(--mat-button-protected-container-height, 40px);font-family:var(--mat-button-protected-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-protected-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-protected-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-protected-label-text-transform);font-weight:var(--mat-button-protected-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-button-protected-horizontal-padding, 24px)}.mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-button-protected-icon-spacing, 8px);margin-left:var(--mat-button-protected-icon-offset, -8px)}[dir=rtl] .mat-mdc-raised-button>.mat-icon{margin-right:var(--mat-button-protected-icon-offset, -8px);margin-left:var(--mat-button-protected-icon-spacing, 8px)}.mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-protected-icon-offset, -8px);margin-left:var(--mat-button-protected-icon-spacing, 8px)}[dir=rtl] .mat-mdc-raised-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-protected-icon-spacing, 8px);margin-left:var(--mat-button-protected-icon-offset, -8px)}.mat-mdc-raised-button .mat-ripple-element{background-color:var(--mat-button-protected-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-button-protected-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-button-protected-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-raised-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-protected-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-button-protected-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-button-protected-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:var(--mat-button-protected-touch-target-size, 48px);display:var(--mat-button-protected-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-raised-button:not(:disabled){color:var(--mat-button-protected-label-text-color, var(--mat-sys-primary));background-color:var(--mat-button-protected-container-color, var(--mat-sys-surface))}.mat-mdc-raised-button,.mat-mdc-raised-button .mdc-button__ripple{border-radius:var(--mat-button-protected-container-shape, var(--mat-sys-corner-full))}.mat-mdc-raised-button:hover{box-shadow:var(--mat-button-protected-hover-container-elevation-shadow, var(--mat-sys-level2))}.mat-mdc-raised-button:focus{box-shadow:var(--mat-button-protected-focus-container-elevation-shadow, var(--mat-sys-level1))}.mat-mdc-raised-button:active,.mat-mdc-raised-button:focus:active{box-shadow:var(--mat-button-protected-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(--mat-button-protected-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-protected-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(--mat-button-protected-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(--mat-button-outlined-container-height, 40px);font-family:var(--mat-button-outlined-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-outlined-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-outlined-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-outlined-label-text-transform);font-weight:var(--mat-button-outlined-label-text-weight, var(--mat-sys-label-large-weight));border-radius:var(--mat-button-outlined-container-shape, var(--mat-sys-corner-full));border-width:var(--mat-button-outlined-outline-width, 1px);padding:0 var(--mat-button-outlined-horizontal-padding, 24px)}.mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-button-outlined-icon-spacing, 8px);margin-left:var(--mat-button-outlined-icon-offset, -8px)}[dir=rtl] .mat-mdc-outlined-button>.mat-icon{margin-right:var(--mat-button-outlined-icon-offset, -8px);margin-left:var(--mat-button-outlined-icon-spacing, 8px)}.mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-outlined-icon-offset, -8px);margin-left:var(--mat-button-outlined-icon-spacing, 8px)}[dir=rtl] .mat-mdc-outlined-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-outlined-icon-spacing, 8px);margin-left:var(--mat-button-outlined-icon-offset, -8px)}.mat-mdc-outlined-button .mat-ripple-element{background-color:var(--mat-button-outlined-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-button-outlined-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-button-outlined-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-mdc-outlined-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-outlined-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-button-outlined-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-button-outlined-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:var(--mat-button-outlined-touch-target-size, 48px);display:var(--mat-button-outlined-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-outlined-button:not(:disabled){color:var(--mat-button-outlined-label-text-color, var(--mat-sys-primary));border-color:var(--mat-button-outlined-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(--mat-button-outlined-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));border-color:var(--mat-button-outlined-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-tonal-button{transition:box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1);height:var(--mat-button-tonal-container-height, 40px);font-family:var(--mat-button-tonal-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-tonal-label-text-size, var(--mat-sys-label-large-size));letter-spacing:var(--mat-button-tonal-label-text-tracking, var(--mat-sys-label-large-tracking));text-transform:var(--mat-button-tonal-label-text-transform);font-weight:var(--mat-button-tonal-label-text-weight, var(--mat-sys-label-large-weight));padding:0 var(--mat-button-tonal-horizontal-padding, 24px)}.mat-tonal-button:not(:disabled){color:var(--mat-button-tonal-label-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-button-tonal-container-color, var(--mat-sys-secondary-container))}.mat-tonal-button,.mat-tonal-button .mdc-button__ripple{border-radius:var(--mat-button-tonal-container-shape, var(--mat-sys-corner-full))}.mat-tonal-button[disabled],.mat-tonal-button.mat-mdc-button-disabled{cursor:default;pointer-events:none;color:var(--mat-button-tonal-disabled-label-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-tonal-disabled-container-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-tonal-button.mat-mdc-button-disabled-interactive{pointer-events:auto}.mat-tonal-button>.mat-icon{margin-right:var(--mat-button-tonal-icon-spacing, 8px);margin-left:var(--mat-button-tonal-icon-offset, -8px)}[dir=rtl] .mat-tonal-button>.mat-icon{margin-right:var(--mat-button-tonal-icon-offset, -8px);margin-left:var(--mat-button-tonal-icon-spacing, 8px)}.mat-tonal-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-tonal-icon-offset, -8px);margin-left:var(--mat-button-tonal-icon-spacing, 8px)}[dir=rtl] .mat-tonal-button .mdc-button__label+.mat-icon{margin-right:var(--mat-button-tonal-icon-spacing, 8px);margin-left:var(--mat-button-tonal-icon-offset, -8px)}.mat-tonal-button .mat-ripple-element{background-color:var(--mat-button-tonal-ripple-color, color-mix(in srgb, var(--mat-sys-on-secondary-container) calc(var(--mat-sys-pressed-state-layer-opacity) * 100%), transparent))}.mat-tonal-button .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-tonal-state-layer-color, var(--mat-sys-on-secondary-container))}.mat-tonal-button.mat-mdc-button-disabled .mat-mdc-button-persistent-ripple::before{background-color:var(--mat-button-tonal-disabled-state-layer-color, var(--mat-sys-on-surface-variant))}.mat-tonal-button:hover>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-tonal-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-tonal-button.cdk-program-focused>.mat-mdc-button-persistent-ripple::before,.mat-tonal-button.cdk-keyboard-focused>.mat-mdc-button-persistent-ripple::before,.mat-tonal-button.mat-mdc-button-disabled-interactive:focus>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-tonal-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mat-tonal-button:active>.mat-mdc-button-persistent-ripple::before{opacity:var(--mat-button-tonal-pressed-state-layer-opacity, var(--mat-sys-pressed-state-layer-opacity))}.mat-tonal-button .mat-mdc-button-touch-target{position:absolute;top:50%;height:var(--mat-button-tonal-touch-target-size, 48px);display:var(--mat-button-tonal-touch-target-display, block);left:0;right:0;transform:translateY(-50%)}.mat-mdc-button,.mat-mdc-unelevated-button,.mat-mdc-raised-button,.mat-mdc-outlined-button,.mat-tonal-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,.mat-tonal-button .mat-mdc-button-ripple,.mat-tonal-button .mat-mdc-button-persistent-ripple,.mat-tonal-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,.mat-tonal-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,.mat-tonal-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,.mat-tonal-button .mdc-button__label,.mat-tonal-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,.mat-tonal-button .mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit}.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,.mat-tonal-button:focus>.mat-focus-indicator::before{content:"";border-radius:inherit}.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,.mat-tonal-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,.mat-tonal-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-tonal-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)}
|
|
1237
1237
|
`,`@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-button-base.mat-tonal-button,.mat-mdc-icon-button.mat-mdc-icon-button,.mat-mdc-outlined-button .mdc-button__ripple{outline:solid 1px}}
|
|
1238
|
-
`],encapsulation:2,changeDetection:0})}return i})();function $ae(i){return i.hasAttribute("mat-raised-button")?"elevated":i.hasAttribute("mat-stroked-button")?"outlined":i.hasAttribute("mat-flat-button")?"filled":i.hasAttribute("mat-button")?"text":null}function Xae(i,t){if(i&1){let e=st();S(0,"button",4),he("click",function(){Ve(e);let r=me();return Qe(r.data.resolveErrorData.onResolveErrorClick())}),j(1),F()}if(i&2){let e=me();E(),ct(" ",e.data.resolveErrorData.buttonText," ")}}var es=(()=>{class i{constructor(e){this.data=e}static{this.\u0275fac=function(n){return new(n||i)(se(Ts))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-error-dialog"]],decls:7,vars:3,consts:[["mat-dialog-title",""],["mat-dialog-content","",3,"innerHTML"],["mat-dialog-actions","","align","end"],["mat-button","","mat-dialog-close",""],["mat-button","","mat-dialog-close","",3,"click"]],template:function(n,r){n&1&&(S(0,"h1",0),j(1),F(),J(2,"div",1),S(3,"div",2),ke(4,Xae,2,1,"button",3),S(5,"button",3),j(6,"OK"),F()()),n&2&&(E(),Ai(r.data.title),E(),z("innerHTML",r.data.message,ey),E(2),Pe(r.data.resolveErrorData?4:-1))},dependencies:[Cf,ar,Cr,Wi,or],encapsulation:2})}}return i})();function dN(i){return{title:"Something is wrong with the loaded file(s)",message:[...Kae(i),...Yae(i)].join("")}}function Kae(i){let t=i.filter(e=>e.errors.length>0);return t.length>0?["<h2>Errors</h2>",...t.map(e=>Zae(e))]:[]}function Yae(i){let t=i.filter(e=>e.warnings.length>0);return t.length>0?["<h2>Warnings</h2>",...t.map(e=>Jae(e))]:[]}function Zae(i){return`<p><strong>${i.fileName}:</strong> ${Zy('<i class="fa fa-exclamation-circle"></i> ',i.errors)}</p>`}function Jae(i){return`<p><strong>${i.fileName}:</strong> ${Zy('<i class="fa fa-exclamation-triangle"></i> ',i.warnings)}</p>`}function Zy(i,t){return`<p>${t.map(e=>i+e).join("<br>")}</p>`}var mB=(function(i){return i.hide="hide",i.exclude="exclude",i})(mB||{});var gB=el(Jy());function _N(i){let t=i.content;return{fileMeta:{fileName:i.fileName,fileChecksum:t.fileChecksum,projectName:t.projectName,apiVersion:t.apiVersion,exportedFileSize:i.fileSize,repoCreationDate:t.repoCreationDate||""},settings:{fileSettings:{edges:t.edges||[],attributeTypes:tse(t.attributeTypes),attributeDescriptors:ise(t.attributeDescriptors),blacklist:nse(t.blacklist||[]),markedPackages:t.markedPackages||[]}},map:Po(t.nodes[0])}}function tse(i){return!i||Array.isArray(i.nodes)||Array.isArray(i.edges)?{nodes:{},edges:{}}:{nodes:i.nodes??{},edges:i.edges??{}}}function ise(i){return i||{}}function nse(i){for(let t of i)t.type===mB.hide&&(t.type="flatten");return i}function bN(i){let t=0;for(let e of i)e.selectedAs!==vi.None&&(t+=e.file.fileMeta.exportedFileSize);return t}function $0(i){let t=null;try{let e=typeof i=="string"?JSON.parse(i):i;if("data"in e&&"checksum"in e)return t=e.data,t.fileChecksum=e.checksum||(0,gB.default)(JSON.stringify(e.data)),t;if(!e.fileChecksum){let n=typeof i=="string"?i:JSON.stringify(i);e.fileChecksum=(0,gB.default)(n)}return e}catch{}return t}var K8=el(QB());var Zl={author:"MaibornWolff GmbH <dist_intern_codecharta@maibornwolff.de>",homepage:"https://maibornwolff.github.io/codecharta/",bugs:{url:"https://github.com/MaibornWolff/codecharta/issues",email:"dist_intern_codecharta@maibornwolff.de"},repository:{type:"git",url:"https://github.com/MaibornWolff/codecharta.git"},name:"codecharta-visualization",version:"1.137.0",engines:{node:">=20"},description:"MaibornWolff CodeCharta",files:["dist/bundler/browser","conf","Dockerfile","LICENSE.md","package.json","package-lock.json","README.md","tsconfig.json","cli.js"],codecharta:{apiVersion:"1.5"},main:"main.js",browserslist:["last 2 chrome version","last 2 firefox version","last 2 safari version"],scripts:{start:"electron dist/bundler/browser",build:"ng build && cp electron/* package.json dist/bundler/browser",dev:"ng serve",test:"npm run test:ci -- --maxWorkers=25%","test:ci":"jest --config conf/jestUnit.config.json .*\\.spec\\.ts","test:auto":"npm test -- --watch","test:autoNoCoverage":"npm run test:auto -- --coverage false","test:updateSnaps":"npm test -- --updateSnapshot","test:createCoverageFile":"jest --config conf/jestUnit.config.json --coverage --coverageReporters=lcov --coverageDirectory=coverage",e2e:"jest --config conf/jestE2E.config.json .*\\.e2e\\.ts --coverage false","e2e:auto":"npm run e2e -- --watch","e2e:ci":"npm run e2e -- --runInBand",package:"node script/appMain.js","package:local":"npm run package -- --local","schema:generate":"typescript-json-schema ./app/codeCharta/codeCharta.model.ts ExportCCFile --required --topRef --out app/codeCharta/util/generatedSchema.json",sbom:"cyclonedx-npm --omit dev --gather-license-texts --spec-version 1.6 --output-format json --output-file build/reports/sbom_visualization.cdx.json"},bin:{"codecharta-visualization":"cli.js"},license:"BSD-3-Clause",dependencies:{"@angular/animations":"^20.3.4","@angular/cdk":"^20.2.8","@angular/common":"^20.3.4","@angular/core":"^20.3.4","@angular/forms":"^20.3.4","@angular/material":"^20.2.8","@angular/platform-browser":"^20.3.4","@angular/platform-browser-dynamic":"^20.3.4","@angular/router":"^20.3.4","@ngrx/effects":"^20.0.0","@ngrx/operators":"^20.0.0","@ngrx/store":"^20.0.0","@ngrx/store-devtools":"^20.0.0","@types/d3":"^7.4.3",ajv:"^6.12.6","color-convert":"2.0.1",d3:"^7.8.5","d3-hierarchy":"^2.0.0",dequal:"^2.0.3",electron:"38.4.0","fake-indexeddb":"^6.2.4",fflate:"^0.8.2","font-awesome":"^4.7.0","hotkeys-js":"^3.8.2",html2canvas:"^1.4.1",idb:"^8.0.0",ignore:"^7.0.5",klona:"^2.0.4","marked-mangle":"^1.1.11","material-icons":"^1.10.4",md5:"^2.3.0","ngx-color":"^7.3.3",pako:"^2.0.4","percent-round":"^2.2.1",qrcode:"^1.5.3",rxjs:"^7.5.1","safe-stable-stringify":"^2.4.3",shelljs:"^0.10.0",three:"^0.168.0","three-orbit-controls":"^82.1.0","typescript-json-schema":"0.65.1","zone.js":"^0.15.1"},devDependencies:{"@angular/build":"^20.3.5","@angular/cli":"^20.3.5","@angular/compiler":"^20.3.4","@angular/compiler-cli":"^20.3.4","@babel/plugin-transform-class-static-block":"^7.23.3","@cyclonedx/cyclonedx-npm":"^4.0.3","@electron/get":"^4.0.2","@electron/packager":"^19.0.1","@testing-library/angular":"^18.1.0","@testing-library/user-event":"^14.5.2","@types/color-convert":"2.0.4","@types/d3-hierarchy":"^3.0.2","@types/expect-puppeteer":"^5.0.2","@types/jest":"^30.0.0","@types/jest-environment-puppeteer":"^5.0.6","@types/node":"^22.0.0","@types/three":"^0.168.0",bestzip:"^2.2.0","fast-xml-parser":"^4.4.0","html-loader":"^4.0.0",jest:"^30.2.0","jest-canvas-mock":"^2.4.0","jest-environment-jsdom":"^30.1.0","jest-preset-angular":"15.0.2","jest-puppeteer":"^11.0.0",marked:"^5.0.2",puppeteer:"^24.24.0","ts-jest":"^29.4.5",typescript:"5.8.3","webpack-glsl-loader":"^1.0.1"},optionalDependencies:{"@rollup/rollup-linux-x64-gnu":"^4.24.2"}};var v8={$ref:"#/definitions/ExportCCFile",$schema:"http://json-schema.org/draft-07/schema#",definitions:{AttributeTypes:{properties:{edges:{additionalProperties:{enum:["absolute","relative"],type:"string"},type:"object"},nodes:{additionalProperties:{enum:["absolute","relative"],type:"string"},type:"object"}},type:"object"},CodeMapNode:{properties:{attributes:{$ref:"#/definitions/KeyValuePair"},children:{items:{$ref:"#/definitions/CodeMapNode"},type:"array"},deltas:{additionalProperties:{type:"number"},type:"object"},edgeAttributes:{additionalProperties:{$ref:"#/definitions/EdgeMetricCount"},type:"object"},fixedPosition:{$ref:"#/definitions/FixedPosition"},id:{type:"number"},isExcluded:{type:"boolean"},isFlattened:{type:"boolean"},link:{type:"string"},name:{type:"string"},path:{type:"string"},type:{$ref:"#/definitions/NodeType"}},required:["name","type"],type:"object"},Edge:{properties:{attributes:{$ref:"#/definitions/KeyValuePair"},fromNodeName:{type:"string"},toNodeName:{type:"string"},visible:{$ref:"#/definitions/EdgeVisibility"}},required:["attributes","fromNodeName","toNodeName"],type:"object"},EdgeMetricCount:{properties:{incoming:{type:"number"},outgoing:{type:"number"}},required:["incoming","outgoing"],type:"object"},EdgeVisibility:{enum:["both","from","none","to"],type:"string"},ExportBlacklistItem:{properties:{path:{type:"string"},type:{$ref:"#/definitions/ExportBlacklistType"}},required:["path","type"],type:"object"},ExportBlacklistType:{enum:["exclude","hide"],type:"string"},ExportCCFile:{properties:{apiVersion:{type:"string"},attributeTypes:{anyOf:[{$ref:"#/definitions/OldAttributeTypes"},{$ref:"#/definitions/AttributeTypes"}]},blacklist:{items:{$ref:"#/definitions/ExportBlacklistItem"},type:"array"},edges:{items:{$ref:"#/definitions/Edge"},type:"array"},markedPackages:{items:{$ref:"#/definitions/MarkedPackage"},type:"array"},nodes:{items:{$ref:"#/definitions/CodeMapNode"},type:"array"},projectName:{type:"string"}},required:["apiVersion","nodes","projectName"],type:"object"},FixedPosition:{properties:{height:{type:"number"},left:{type:"number"},top:{type:"number"},width:{type:"number"}},required:["height","left","top","width"],type:"object"},KeyValuePair:{additionalProperties:{type:"number"},type:"object"},MarkedPackage:{properties:{color:{type:"string"},path:{type:"string"}},required:["color","path"],type:"object"},NodeType:{enum:["File","Folder"],type:"string"},OldAttributeTypes:{properties:{edges:{additionalItems:{anyOf:[{additionalProperties:{enum:["absolute","relative"],type:"string"},type:"object"}]},items:[{additionalProperties:{enum:["absolute","relative"],type:"string"},type:"object"}],minItems:0,type:"array"},nodes:{additionalItems:{anyOf:[{additionalProperties:{enum:["absolute","relative"],type:"string"},type:"object"}]},items:[{additionalProperties:{enum:["absolute","relative"],type:"string"},type:"object"}],minItems:0,type:"array"}},type:"object"}}};function Nle(i){var t=0,e=i.children,n=e&&e.length;if(!n)t=1;else for(;--n>=0;)t+=e[n].value;i.value=t}function y8(){return this.eachAfter(Nle)}function x8(i,t){let e=-1;for(let n of this)i.call(t,n,++e,this);return this}function w8(i,t){for(var e=this,n=[e],r,o,a=-1;e=n.pop();)if(i.call(t,e,++a,this),r=e.children)for(o=r.length-1;o>=0;--o)n.push(r[o]);return this}function C8(i,t){for(var e=this,n=[e],r=[],o,a,s,l=-1;e=n.pop();)if(r.push(e),o=e.children)for(a=0,s=o.length;a<s;++a)n.push(o[a]);for(;e=r.pop();)i.call(t,e,++l,this);return this}function M8(i,t){let e=-1;for(let n of this)if(i.call(t,n,++e,this))return n}function S8(i){return this.eachAfter(function(t){for(var e=+i(t.data)||0,n=t.children,r=n&&n.length;--r>=0;)e+=n[r].value;t.value=e})}function E8(i){return this.eachBefore(function(t){t.children&&t.children.sort(i)})}function T8(i){for(var t=this,e=Ule(t,i),n=[t];t!==e;)t=t.parent,n.push(t);for(var r=n.length;i!==e;)n.splice(r,0,i),i=i.parent;return n}function Ule(i,t){if(i===t)return i;var e=i.ancestors(),n=t.ancestors(),r=null;for(i=e.pop(),t=n.pop();i===t;)r=i,i=e.pop(),t=n.pop();return r}function B8(){for(var i=this,t=[i];i=i.parent;)t.push(i);return t}function F8(){return Array.from(this)}function I8(){var i=[];return this.eachBefore(function(t){t.children||i.push(t)}),i}function D8(){var i=this,t=[];return i.each(function(e){e!==i&&t.push({source:e.parent,target:e})}),t}function*k8(){var i=this,t,e=[i],n,r,o;do for(t=e.reverse(),e=[];i=t.pop();)if(yield i,n=i.children)for(r=0,o=n.length;r<o;++r)e.push(n[r]);while(e.length)}function Ni(i,t){i instanceof Map?(i=[void 0,i],t===void 0&&(t=Qle)):t===void 0&&(t=Vle);for(var e=new _1(i),n,r=[e],o,a,s,l;n=r.pop();)if((a=t(n.data))&&(l=(a=Array.from(a)).length))for(n.children=a,s=l-1;s>=0;--s)r.push(o=a[s]=new _1(a[s])),o.parent=n,o.depth=n.depth+1;return e.eachBefore(qle)}function Hle(){return Ni(this).eachBefore(zle)}function Vle(i){return i.children}function Qle(i){return Array.isArray(i)?i[1]:null}function zle(i){i.data.value!==void 0&&(i.value=i.data.value),i.data=i.data.data}function qle(i){var t=0;do i.height=t;while((i=i.parent)&&i.height<++t)}function _1(i){this.data=i,this.depth=this.height=0,this.parent=null}_1.prototype=Ni.prototype={constructor:_1,count:y8,each:x8,eachAfter:C8,eachBefore:w8,find:M8,sum:S8,sort:E8,path:T8,ancestors:B8,descendants:F8,leaves:I8,links:D8,copy:Hle,[Symbol.iterator]:k8};function P8(i){if(typeof i!="function")throw new Error;return i}function vp(){return 0}function yp(i){return function(){return i}}function R8(i){i.x0=Math.round(i.x0),i.y0=Math.round(i.y0),i.x1=Math.round(i.x1),i.y1=Math.round(i.y1)}function O8(i,t,e,n,r){for(var o=i.children,a,s=-1,l=o.length,c=i.value&&(n-t)/i.value;++s<l;)a=o[s],a.y0=e,a.y1=r,a.x0=t,a.x1=t+=a.value*c}function L8(i,t,e,n,r){for(var o=i.children,a,s=-1,l=o.length,c=i.value&&(r-e)/i.value;++s<l;)a=o[s],a.x0=t,a.x1=n,a.y0=e,a.y1=e+=a.value*c}var Gle=(1+Math.sqrt(5))/2;function Wle(i,t,e,n,r,o){for(var a=[],s=t.children,l,c,d=0,h=0,u=s.length,f,_,y=t.value,b,v,M,x,w,k,P;d<u;){f=r-e,_=o-n;do b=s[h++].value;while(!b&&h<u);for(v=M=b,k=Math.max(_/f,f/_)/(y*i),P=b*b*k,w=Math.max(M/P,P/v);h<u;++h){if(b+=c=s[h].value,c<v&&(v=c),c>M&&(M=c),P=b*b*k,x=Math.max(M/P,P/v),x>w){b-=c;break}w=x}a.push(l={value:b,dice:f<_,children:s.slice(d,h)}),l.dice?O8(l,e,n,r,y?n+=_*b/y:o):L8(l,e,n,y?e+=f*b/y:r,o),y-=b,d=h}return a}var N8=(function i(t){function e(n,r,o,a,s){Wle(t,n,r,o,a,s)}return e.ratio=function(n){return i((n=+n)>1?n:1)},e})(Gle);function zB(){var i=N8,t=!1,e=1,n=1,r=[0],o=vp,a=vp,s=vp,l=vp,c=vp;function d(u){return u.x0=u.y0=0,u.x1=e,u.y1=n,u.eachBefore(h),r=[0],t&&u.eachBefore(R8),u}function h(u){var f=r[u.depth],_=u.x0+f,y=u.y0+f,b=u.x1-f,v=u.y1-f;b<_&&(_=b=(_+b)/2),v<y&&(y=v=(y+v)/2),u.x0=_,u.y0=y,u.x1=b,u.y1=v,u.children&&(f=r[u.depth+1]=o(u)/2,_+=c(u)-f,y+=a(u)-f,b-=s(u)-f,v-=l(u)-f,b<_&&(_=b=(_+b)/2),v<y&&(y=v=(y+v)/2),i(u,_,y,b,v))}return d.round=function(u){return arguments.length?(t=!!u,d):t},d.size=function(u){return arguments.length?(e=+u[0],n=+u[1],d):[e,n]},d.tile=function(u){return arguments.length?(i=P8(u),d):i},d.padding=function(u){return arguments.length?d.paddingInner(u).paddingOuter(u):d.paddingInner()},d.paddingInner=function(u){return arguments.length?(o=typeof u=="function"?u:yp(+u),d):o},d.paddingOuter=function(u){return arguments.length?d.paddingTop(u).paddingRight(u).paddingBottom(u).paddingLeft(u):d.paddingTop()},d.paddingTop=function(u){return arguments.length?(a=typeof u=="function"?u:yp(+u),d):a},d.paddingRight=function(u){return arguments.length?(s=typeof u=="function"?u:yp(+u),d):s},d.paddingBottom=function(u){return arguments.length?(l=typeof u=="function"?u:yp(+u),d):l},d.paddingLeft=function(u){return arguments.length?(c=typeof u=="function"?u:yp(+u),d):c},d}var KB=el(j8());function Bf(i){let t=2;if(i.startsWith("/"))t=1;else if(!i.startsWith("./"))return i;return i.slice(t)}function $8(i){let t=[];if(i!==void 0)for(let{data:e}of Ni(i))e.type!=="Folder"&&t.push(e);return t}function YB(i,t){let e=ZB(t);return e.ignoredNodePaths.ignores(Bf(i.path))===e.condition}function ZB(i){i=Bf(i.trimStart());let t=!0;i.startsWith("!")&&(i=i.slice(1),t=!1);let e=(0,KB.default)();for(let n of i.split(","))n=n.trimStart(),!n.startsWith("*")&&!n.endsWith("*")&&(n=n.startsWith('"')&&n.endsWith('"')?n.slice(1,-1):`*${n}*`),n.length!==0&&e.add(Bf(n));return{ignoredNodePaths:e,condition:t}}function X8(i,t){return ga(i,t,"exclude")||ga(i,t,"flatten")}function ga(i,t,e){if(t.length===0)return!1;let n=(0,KB.default)();for(let r of t)r.type===e&&n.add(Bf(r.path));return n.ignores(Bf(i))}function Ff(i,t){if(!t)return;let e;for(let n of t)(!e||e.path.length<n.path.length)&&(i.path.startsWith(`${n.path}/`)||i.path===n.path)&&(e=n);if(e)return e.color}function Yi(i){return i.children===void 0||i.children.length===0}var x1=(function(i){return i[i.SMALL_MAP=1]="SMALL_MAP",i[i.MEDIUM_MAP=.5]="MEDIUM_MAP",i[i.BIG_MAP=.25]="BIG_MAP",i})(x1||{});function If(i){let e=bN(i);switch(!0){case e>=7*1048576:return x1.BIG_MAP;case e>=2*1048576:return x1.MEDIUM_MAP;default:return x1.SMALL_MAP}}var Y8=Zl.codecharta.apiVersion,dl={fileIsInvalid:"File is empty or invalid.",apiVersionIsInvalid:"API Version is empty or invalid.",majorApiVersionIsOutdated:"API Version Outdated: Update CodeCharta API Version to match cc.json.",minorApiVersionOutdated:"Minor API Version Outdated.",nodesNotUnique:"Node names in combination with node types are not unique.",nodesEmpty:"The nodes array is empty. At least one node is required.",notAllFoldersAreFixed:"If at least one direct sub-folder of root is marked as fixed, all direct sub-folders of root must be fixed.",fixedFoldersOutOfBounds:"Coordinates of fixed folders must be within a range of 0 and 100.",fixedFoldersOverlapped:"Folders may not overlap.",fixedFoldersNotAllowed:"Fixated folders may not be defined in API-Version < 1.2.",fileAlreadyExists:"File already exists.",blacklistError:"Excluding all buildings is not possible.",fileContainsAuthorsAttribute:"File contains unsupported 'authors' attribute. This attribute will be ignored. Node containing the attribute: "};function Z8(i){return!i||!i.nodes?[]:t6(i.nodes)}function J8(i){let t=[];return i&&Ace(i)&&t.push(`${dl.minorApiVersionOutdated} Found: ${i.apiVersion}`),t}function e6(i){let t=[];switch(!0){case!i:t.push(dl.fileIsInvalid);break;case!mce(i):t.push(dl.apiVersionIsInvalid);break;case pce(i):t.push(dl.majorApiVersionIsOutdated);break}return t.length===0&&t.push(...fce(i)),t}function fce(i){let t=[];if(t.length===0){let n=new K8.default({allErrors:!0}).compile(v8);n(i)?i.nodes.length===0?t.push(dl.nodesEmpty):t.push(..._ce(i.nodes[0]),...n6(i)):t.push(...n.errors.map(o=>gce(o)))}return t}function mce(i){let{apiVersion:t}=i,e=t!==void 0,r=/\d+\.\d+/.test(t);return e&&r}function pce(i){return Z0(i.apiVersion).major>Z0(Y8).major}function Ace(i){return Z0(i.apiVersion).minor>Z0(Y8).minor}function t6(i){let t=[];for(let e of i)e.attributes?.authors&&(delete e.attributes.authors,t.push(`${dl.fileContainsAuthorsAttribute}"${e.name}"`)),e.children&&t.push(...t6(e.children));return t}function Z0(i){return{major:Number(i.split(".")[0]),minor:Number(i.split(".")[1])}}function gce(i){let t=i.keyword.charAt(0).toUpperCase()+i.keyword.slice(1),e=i.dataPath.slice(1);return`${t} error: ${e} ${i.message}`}function _ce(i){let t=[],e=new Set;return e.add(`${i.name}|${i.type}`),i6(i,t,e,`/${i.name}`),t}function i6(i,t,e,n){if(!Yi(i))for(let r of i.children){let o=`${n}/${r.name}`;e.has(`${o}|${r.type}`)?t.push(`${dl.nodesNotUnique} Found duplicate of ${r.type} with path: ${o}`):(e.add(`${o}|${r.type}`),i6(r,t,e,o))}}function bce(i,t,e,n,r,o){for(let a of i)if(a.fixedPosition===void 0)t.push(`${a.name}`);else{let s=Z0(e.apiVersion);if(s.major<1||s.major===1&&s.minor<2){n.push(`${dl.fixedFoldersNotAllowed} Found: ${e.apiVersion}`);return}yce(a)&&r.push(Y0(a));for(let l of i)l.fixedPosition!==void 0&&a!==l&&vce(a.fixedPosition,l.fixedPosition)&&!o.has(`${Y0(l)} and ${Y0(a)}`)&&o.add(`${Y0(a)} and ${Y0(l)}`)}}function n6(i,t=i.nodes[0].children){let e=[],n=[],r=[],o=new Set;bce(t,n,i,e,r,o),n.length>0&&n.length!==t.length&&e.push(`${dl.notAllFoldersAreFixed} Found: ${n.join(", ")}`),r.length>0&&e.push(`${dl.fixedFoldersOutOfBounds} Found: ${r.join(", ")}`),o.size>0&&e.push(`${dl.fixedFoldersOverlapped} Found: ${[...o].join(", ")}`);for(let a of t)a.children&&e.push(...n6(i,a.children));return e}function Y0(i){return`${i.name} ${JSON.stringify(i.fixedPosition)}`}function vce(i,t){return w1(i.left,i.top,t)||w1(i.left,i.top+i.height,t)||w1(i.left+i.width,i.top,t)||w1(i.left+i.width,i.top+i.height,t)}function w1(i,t,e){return i>=e.left&&i<=e.left+e.width&&t>=e.top&&t<=e.top+e.height}function yce({fixedPosition:{left:i,top:t,width:e,height:n}}){return i<0||t<0||i+e>100||t+n>100||e<0||n<0}var C1=i=>{i.sort((t,e)=>{let n=t.name.toLowerCase(),r=e.name.toLowerCase();return n>r?1:r>n?-1:0})};var Cp="unary",M1=(i,t)=>{if(i.length===0)return[];let e=new Map,n=new Map,r=new Map;for(let{file:a}of i)for(let s of Ni(a.map))if(Yi(s)&&s.data.path&&!ga(s.data.path,t,"exclude"))for(let l of Object.keys(s.data.attributes)){let c=n.get(l),d=r.get(l);e.get(l)||e.set(l,[]),e.get(l).push(s.data.attributes[l]),(d===void 0||d>=s.data.attributes[l])&&r.set(l,s.data.attributes[l]),(c===void 0||c<=s.data.attributes[l])&&n.set(l,s.data.attributes[l])}let o=[];n.set(Cp,1),r.set(Cp,1);for(let[a,s]of n)o.push({name:a,values:e.get(a),maxValue:s,minValue:r.get(a)});return C1(o),o};var J0={decorateMap(i,t,e){for(let{data:n}of Ni(i)){n.isFlattened=!1,n.isExcluded=!1;for(let r of e)r.type==="flatten"?n.isFlattened=n.isFlattened||YB(n,r.path):n.isExcluded=n.isExcluded||YB(n,r.path)&&Yi(n)}i.isExcluded=!1,this.decorateMapWithMetricData(i,t)},decorateMapWithMetricData(i,t){let{nodeMetricData:e,edgeMetricData:n}=t,r=0;for(let{data:o}of Ni(i)){o.id=r,r++,o.attributes===void 0&&(o.attributes={}),Yi(o)&&(o.attributes[Cp]=1);for(let a of e)o.attributes[a.name]===void 0&&(o.attributes[a.name]=0),o.deltas!==void 0&&o.deltas[a.name]===void 0&&(o.deltas[a.name]=0);o.edgeAttributes===void 0&&(o.edgeAttributes={});for(let a of n)o.edgeAttributes[a.name]===void 0&&(o.edgeAttributes[a.name]={incoming:0,outgoing:0});xce(o)}},decorateMapWithPathAttribute(i){for(let t of Ni(i.map))t.data.path=t.parent?`${t.parent.data.path}/${t.data.name}`:`/${t.data.name}`;return i},decorateParentNodesWithAggregatedAttributes(i,t,e){let n=new Map,r=Object.keys(i.attributes),o=Object.keys(i.edgeAttributes);Ni(i).eachAfter(function({data:s,parent:l}){if(!(s.isExcluded||!l)){for(let c of r){let d=`${c}${s.path}`,h=`${c}${l.data.path}`;e.nodes[c]===al.relative?(Cce(n,d,h,s,c,t),wce(n,h,s,c,t)):(l.data.attributes[c]+=s.attributes[c],t&&l.data.deltas&&(l.data.deltas[c]=l.data.deltas[c]??0,l.data.deltas[c]+=s.deltas[c]??0))}t&&l.data.fileCount&&(l.data.fileCount.added+=s.fileCount.added,l.data.fileCount.changed+=s.fileCount.changed,l.data.fileCount.removed+=s.fileCount.removed);for(let c of o){let d=s.edgeAttributes[c];if(!d)continue;let h=`${c}${s.path}`,u=`${c}${l.data.path}`;e.edges[c]===al.relative?(o6(n,`INCOMING${h}`,`INCOMING${u}`,s,c,"incoming"),o6(n,`OUTGOING${h}`,`OUTGOING${u}`,s,c,"outgoing"),r6(n,`INCOMING${u}`,s,c,"incoming"),r6(n,`OUTGOING${u}`,s,c,"outgoing")):(l.data.edgeAttributes[c].incoming+=d.incoming,l.data.edgeAttributes[c].outgoing+=d.outgoing)}}});for(let a of o)e.edges[a]===al.relative&&(i.edgeAttributes[a].incoming=Df(n.get(`INCOMING${a}${i.path}`)),i.edgeAttributes[a].outgoing=Df(n.get(`OUTGOING${a}${i.path}`)));for(let a of r)e.nodes[a]===al.relative&&(i.attributes[a]=Df(n.get(`MEDIAN${a}${i.path}`)),t&&i.deltas&&(i.deltas[a]=Df(n.get(`DELTA${a}${i.path}`))))}};function xce(i){if(!(i.children?.length===1&&i.children[0]?.fixedPosition)&&i.children?.length===1&&i.children[0].children?.length>0){let[t]=i.children;i.children=t.children,i.name+=`/${t.name}`,i.path+=`/${t.name}`,t.link&&(i.link=t.link)}}function r6(i,t,e,n,r){e.edgeAttributes[n][r]!==0&&eF(i,t,e,e.edgeAttributes[n][r])}function wce(i,t,e,n,r){e.attributes[n]!==0&&eF(i,`MEDIAN${t}`,e,e.attributes[n]),r&&e.deltas&&e.deltas[n]!==0&&eF(i,`DELTA${t}`,e,e.deltas[n])}function Cce(i,t,e,n,r,o){if(Yi(n))return;let a=i.get(`MEDIAN${t}`);if(a!==void 0&&(n.attributes[r]=Df(a),JB(i,`MEDIAN${e}`,a)),o&&n.deltas){let s=i.get(`DELTA${t}`);s!==void 0&&(n.deltas[r]=Df(s),JB(i,`DELTA${e}`,s))}}function o6(i,t,e,n,r,o){if(Yi(n))return;let a=i.get(t);a!==void 0&&(n.edgeAttributes[r][o]=Df(a),JB(i,e,a))}function JB(i,t,e){let n=i.get(t);n===void 0?i.set(t,e):Sce(n,e)}function eF(i,t,e,n){let r=i.get(t);r===void 0?i.set(t,[n]):Yi(e)&&Mce(r,n)}function Df(i){if(i===void 0||i.length===0)return 0;let t=(i.length-1)/2;return(i[Math.floor(t)]+i[Math.ceil(t)])/2}function Mce(i,t){let e=0,n=i.length-1,r=0;if(n<0||i[n]<=t){i.push(t);return}if(i[0]>=t){i.unshift(t);return}for(;e<=n;)if(r=Math.floor((e+n)/2),i[r]<t)e=r+1;else if(n=r-1,i[n]<=t){i.splice(r,0,t);return}}function Sce(i,t){let e=0;for(let n=0;n<i.length;n++){let r=0;for(;i[n]>t[e]&&(r++,e++,e!==t.length););if(r>0&&(i.splice(n,0,...t.slice(e-r,e)),e===t.length))return}i.push(...t.slice(e))}function tF(i){return{fileName:i.fileMeta.fileName,fileSize:i.fileMeta.exportedFileSize,content:Ece(i)}}function Ece(i){return{projectName:i.fileMeta.projectName,apiVersion:i.fileMeta.apiVersion,fileChecksum:i.fileMeta.fileChecksum,nodes:[i.map],attributeTypes:i.settings.fileSettings.attributeTypes,attributeDescriptors:i.settings.fileSettings.attributeDescriptors,edges:i.settings.fileSettings.edges,markedPackages:i.settings.fileSettings.markedPackages,blacklist:i.settings.fileSettings.blacklist.map(t=>{switch(t.type){case"flatten":return{path:t.path,type:"hide"};case"exclude":return{path:t.path,type:t.type}}})}}function a6(i,t,e,n,r,o){let a=!1;for(let s of e){let l={fileName:s?.fileName,errors:[],warnings:[]};l.warnings.push(...Z8(s?.content)),l.errors.push(...e6(s?.content)),l.errors.length===0&&(l.warnings.push(...J8(s?.content)),Tce(i,t,s,r,o)&&(a=!0)),(l.errors.length>0||l.warnings.length>0)&&n.push(l)}return a}function Tce(i,t,e,n,r){n()&&(i.length=0,r(),localStorage.removeItem("scenarios"));let o=_N(e);J0.decorateMapWithPathAttribute(o);let a=o.fileMeta.fileChecksum,s=o.fileMeta.fileName,l=new Map(i.map(h=>[h.file.fileMeta.fileName,h.file.fileMeta.fileChecksum])),c=new Map(i.map((h,u)=>[h.file.fileMeta.fileChecksum,u])),d=c.has(a);return l.has(s)&&(s=Bce(s,l,a),o.fileMeta.fileName=s),d?(i[c.get(a)].file.fileMeta.fileName=s,t.unshift(s),!1):(i.push({file:o,selectedAs:vi.None}),t.push(s),!0)}function Bce(i,t,e){if(t.get(i)===e)return i;let n=!1,r=1,o=i;for(;!n;){let a=i.indexOf(".");o=a>=0?[i.slice(0,a),"_",r,i.slice(a)].join(""):`${i}_${r}`,(t.get(o)===e||!t.has(o))&&(n=!0),r++}return o}var _a={rootName:"root",rootPath:"/root",updateRoot(i){this.rootName=i,this.rootPath=`/${i}`}};var ud=et("CURRENT_FILES_ARE_SAMPLE_FILES",rt());var S1="File(s) could not be loaded",Fce="File(s) are already loaded",ul=(()=>{class i{static{this.CC_FILE_EXTENSION=".cc.json"}constructor(e,n,r){this.store=e,this.state=n,this.dialog=r,this.referenceFileSubscription=this.store.select(ky).pipe(Oi(o=>{o&&_a.updateRoot(o.map.name)})).subscribe()}ngOnDestroy(){this.referenceFileSubscription.unsubscribe()}loadFiles(e){let n=Po(this.state.getValue().files),r=[],o=[],a=a6(n,r,e,o,()=>this.state.getValue().appStatus.currentFilesAreSampleFiles,()=>this.store.dispatch(ud({value:!1})));if(o.length>0&&this.dialog.open(es,{data:dN(o)}),r.length===0)throw new Error(S1);this.store.dispatch(od({value:n}));let s=r[0],l=this.state.getValue().files.find(c=>c.file.fileMeta.fileName===s).file.map.name;if(this.store.dispatch(D0({fileNames:r})),_a.updateRoot(l),!a)throw new Error(Fce)}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie),Me(bi),Me(fn))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Ice=/_\d{4}(?:-\d{1,2}){2}_\d{1,2}-\d{1,2}\./,Na=(()=>{class i{static{this.JSON_EXTENSION=".json"}static getNewFileName(e,n){return`${this.getFileNameWithoutTimestamp(e,n)}_${this.getNewTimestamp()}`}static getNewTimestamp(){let e=new Date;return i.getFormattedTimestamp(e)}static getFormattedTimestamp(e){return e.toISOString().slice(0,16).replace("T","_").replace(":","-")}static getFileNameWithoutTimestamp(e,n){if(!n){let r=Ice.exec(e);if(r)return e.slice(0,r.index);if(e.endsWith(ul.CC_FILE_EXTENSION))return e.slice(0,-ul.CC_FILE_EXTENSION.length);if(e.endsWith(i.JSON_EXTENSION))return e.slice(0,-i.JSON_EXTENSION.length)}return e}static withoutCCExtension(e){return e.replace(/(\.cc)?(\.json)?(\.gz)?$/,"")}}return i})();var xu=class{static downloadCurrentMap(t,e,n,r,o){let a=this.getProjectDataAsCCJsonFormat(t,e,n,r),s=o+ul.CC_FILE_EXTENSION;this.downloadData(JSON.stringify(a),s)}static getProjectDataAsCCJsonFormat(t,e,n,r){return{projectName:e.projectName,apiVersion:e.apiVersion,fileChecksum:e.fileChecksum,nodes:[this.undecorateMap(t)],attributeTypes:r.includes("AttributeTypes")?this.getAttributeTypesForJSON(n.attributeTypes):{},attributeDescriptors:r.includes("AttributeDescriptors")?this.getAttributeDescriptorsForJSON(n.attributeDescriptors):{},edges:r.includes("Edges")?this.undecorateEdges(n.edges):[],markedPackages:r.includes("MarkedPackages")?n.markedPackages:[],blacklist:this.getBlacklistToDownload(r,n.blacklist)}}static getBlacklistToDownload(t,e){let n=[];return t.includes("Flattens")&&n.push(...this.getFilteredBlacklist(e,"flatten").map(r=>({path:r.path,type:"hide"}))),t.includes("Excludes")&&n.push(...this.getFilteredBlacklist(e,"exclude")),n}static getAttributeTypesForJSON(t){return Object.keys(t.edges).length===0&&Object.keys(t.nodes).length===0?{}:t}static getAttributeDescriptorsForJSON(t){return Object.keys(t).length===0?{}:t}static getFilteredBlacklist(t,e){return t.filter(n=>n.type===e)}static undecorateMap(t){let e=Po(t);for(let{data:n}of Ni(e))delete n.isExcluded,delete n.isFlattened,delete n.edgeAttributes,delete n.path,n.type===Zn.FOLDER?n.attributes={}:delete n.attributes[Cp];return e}static undecorateEdges(t){let e=Po(t);for(let n of e)delete n.visible;return e}static downloadData(t,e){let n=new Blob([t],{type:"text/json"}),r=document.createEvent("MouseEvents"),o=document.createElement("a");o.download=e,o.href=window.URL.createObjectURL(n),o.dataset.downloadurl=["text/json",o.download,o.href].join(":"),r.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),o.dispatchEvent(r)}};var ts=et("SET_STATE",rt());function s6(i){return i.type===ts.type}var nF=".cc.config.json",Dce="1.0.1",kce="1.0.1",l6="CodeCharta::customConfigs",Bn=class i{static{this.customConfigs=i.loadCustomConfigsFromLocalStorage()}static{this.customConfigChange$=new Ol(null)}static setCustomConfigsToLocalStorage(){let t={version:Dce,customConfigs:[...i.customConfigs]};localStorage.setItem(l6,JSON.stringify(t,Af)),i.customConfigChange$.next(null)}static loadCustomConfigsFromLocalStorage(){let t=this.getCcLocalStorage();return new Map(t?.customConfigs)}static getCcLocalStorage(){return JSON.parse(localStorage.getItem(l6),PT)}static addCustomConfig(t){i.customConfigs.set(t.id,t),i.setCustomConfigsToLocalStorage()}static editCustomConfigNote(t,e){let n=i.customConfigs.get(t);n.note=e,i.customConfigs.set(t,n),i.setCustomConfigsToLocalStorage()}static getCustomConfigSettings(t){return i.customConfigs.get(t)}static hasCustomConfigByName(t,e,n){for(let r of i.customConfigs.values())if(r.name===n&&r.mapSelectionMode===t&&this.areEqual(e,r.assignedMaps))return!0;return!1}static areEqual(t,e){return t.size!==e.size?!1:[...t.entries()].every(([n,r])=>e.has(n)&&e.get(n)===r)}static getCustomConfigs(){return i.customConfigs}static importCustomConfigs(t){let e=JSON.parse(t,PT);for(let n of e.customConfigs.values()){if(i.getCustomConfigSettings(n.id))continue;i.hasCustomConfigByName(n.mapSelectionMode,n.assignedMaps,n.name)&&(n.name+=` (${Na.getFormattedTimestamp(new Date(n.creationTime))})`);let o=$e({id:n.id,name:n.name,creationTime:n.creationTime,assignedMaps:n.assignedMaps,customConfigVersion:n.customConfigVersion,mapSelectionMode:n.mapSelectionMode,stateSettings:n.stateSettings,camera:n.camera},n.note&&{note:n.note});i.addCustomConfig(o)}}static downloadCustomConfigs(t){let e={downloadApiVersion:kce,timestamp:Date.now(),customConfigs:t},n=Na.getNewTimestamp()+nF;xu.downloadData(JSON.stringify(e,Af),n)}static createExportCustomConfigFromConfig(t){return $e({},t)}static getCustomConfigsAmountByMapAndMode(t,e){let n=0;for(let r of i.customConfigs.values())[...r.assignedMaps.values()].join(" ")===t&&r.mapSelectionMode===e&&n++;return n}static getConfigNameSuggestionByFileState({mapSelectionMode:t,assignedMaps:e}){let n=[...e.values()].join(" "),r=i.getCustomConfigsAmountByMapAndMode(n,t)+1;return`${n} #${r}`}static deleteCustomConfigs(t){for(let e of t)i.customConfigs.delete(e.id);i.setCustomConfigsToLocalStorage()}static deleteCustomConfig(t){i.customConfigs.delete(t),i.setCustomConfigsToLocalStorage()}static sortCustomConfigDropDownGroupList(t,e){if(!e.hasApplicableItems){if(t.hasApplicableItems||t.mapSelectionMode<e.mapSelectionMode)return-1;if(t.mapSelectionMode===e.mapSelectionMode)return 0}return 1}static applyCustomConfig(t,e,n,r,o){let a=this.getCustomConfigSettings(t);e.dispatch(ts({value:a.stateSettings})),a.camera&&(n.setPosition(a.camera.camera),r.setControlTarget(a.camera.cameraTarget)),o.render()}};var E1=()=>{let i=document.createElement("INPUT");return i.setAttribute("type","file"),i.setAttribute("accept",".json,.gz"),i.setAttribute("multiple",""),document.body.appendChild(i),i};var u6=el(Jy());var Mp="base";function h6(i){let{gameObjectPositions:t,cycles:e=[]}=JSON.parse(i),n={checksum:"",data:{projectName:"GameObjects",fileChecksum:"",apiVersion:"1.3",nodes:[]}},r=[{name:Mp,type:Zn.FOLDER,attributes:{},children:[]}];Pce(t);let o=t.find(s=>s.name==="root"),a=Vce(o.scale);t.push(a);for(let s of t){let l=s.name.split(".");l[0]!==Mp&&f6(l,r[0].children,Mp,s,t,o)}return n.data.nodes=r,n.data.edges=e.map(s=>Uce(s)),n.data.attributeTypes=Hce(),n.checksum=(0,u6.default)(JSON.stringify(n.data)),n}function Pce(i){for(let t of i)t.name.startsWith("root")||(t.name=t.name.startsWith(".")?`root${t.name}`:`root.${t.name}`)}function f6(i,t,e,n,r,o){if(i.length===0)return;let[a]=i,s={name:a,type:c6(i)?Zn.FILE:Zn.FOLDER,attributes:{}};c6(i)?s=Oce(a,s,n):s.children=[],Rce(t,a)?s=t.find(d=>d.name===a):t.push(s);let l=r.find(d=>d.name===e);s.fixedPosition=Lce(s,l,n,o.name);let c=e===Mp?s.name:`${e}.${s.name}`;f6(i.slice(1),s.children,c,n,r,o)}function c6(i){return i.length===1}function Rce(i,t){return i.some(e=>e.name===t)}function Oce(i,t,e){let n=$e({},t);return n.attributes={height:e.scale.y},{name:i,type:Zn.FOLDER,attributes:{},children:[n]}}function Lce(i,t,e,n){let r;if(i.type===Zn.FOLDER){let o=t.position.x-t.scale.x/2,a=t.position.z-t.scale.z/2,s=e.position.x-e.scale.x/2,l=e.position.z-e.scale.z/2,c=T1((s-o)/t.scale.x*100,2),d=T1((l-a)/t.scale.z*100,2),h=T1(e.scale.z/t.scale.z*100,2),u=T1(e.scale.x/t.scale.x*100,2);r={left:d,top:c,width:h,height:u}}return i.name===n&&(r=Nce(r)),r}function T1(i,t){let e=Math.pow(10,t);return Math.round(i*e)/e}function Nce(i){let t=$e({},i);return t.top=Math.floor(50-t.height/2),t.left=Math.floor(50-t.width/2),t}function d6(i){let t=i.replaceAll(".","/"),n=i.split(".").slice(-1);return`/${Mp}/${t}/${n}`}function Uce(i){return{fromNodeName:d6(i.from),toNodeName:d6(i.to),attributes:{coupling:100}}}function Hce(){return{edges:{coupling:al.relative}}}function Vce(i){let t=Math.max(i.x,i.z);return{name:Mp,position:{x:0,y:0,z:0},scale:{x:t,y:0,z:t}}}var p6=el(QB());var m6={$id:"http://example.com/example.json",$schema:"http://json-schema.org/draft-07/schema",default:{},description:"This is the JSON Schema for the GameObjectsPositions structure",examples:[{gameObjectPositions:[{name:"root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.HelloWorldTest",position:{x:69,y:18.5,z:228.5},scale:{x:9,y:5,z:9}},{name:"root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.TryCatchFinallyTest",position:{x:66,y:22.5,z:177.5},scale:{x:1,y:13,z:1}}],cycles:[{from:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParser",to:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParserParameter"}]}],required:["gameObjectPositions"],title:"The root schema",type:"object",properties:{gameObjectPositions:{$id:"#/properties/gameObjectPositions",type:"array",title:"The gameObjectPositions schema",description:"Defines the position and scale of GameObjects",default:[],examples:[[{name:"root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.HelloWorldTest",position:{x:69,y:18.5,z:228.5},scale:{x:9,y:5,z:9}},{name:"root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.SwitchCaseTest",position:{x:65,y:22,z:181},scale:{x:2,y:12,z:2}}]],additionalItems:!0,items:{$id:"#/properties/gameObjectPositions/items",anyOf:[{$id:"#/properties/gameObjectPositions/items/anyOf/0",type:"object",title:"The first anyOf schema",description:"Defines the properties of a GameObject",default:{},examples:[{name:"root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.HelloWorldTest",position:{x:69,y:18.5,z:228.5},scale:{x:9,y:5,z:9}}],required:["name","position","scale"],properties:{name:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/name",type:"string",title:"The name schema",description:"An explanation about the purpose of this instance.",default:"",examples:["root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.HelloWorldTest"]},position:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/position",type:"object",title:"The position schema",description:"The position in absolute values",default:{},examples:[{x:69,y:18.5,z:228.5}],required:["x","y","z"],properties:{x:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/position/properties/x",type:"number",title:"The x schema",description:"x position",default:0,examples:[69]},y:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/position/properties/y",type:"number",title:"The y schema",description:"y position",default:0,examples:[18.5]},z:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/position/properties/z",type:"number",title:"The z schema",description:"z position",default:0,examples:[228.5]}},additionalProperties:!0},scale:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/scale",type:"object",title:"The scale schema",description:"The scale of GameObjects",default:{},examples:[{x:9,y:5,z:9}],required:["x","y","z"],properties:{x:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/scale/properties/x",type:"number",title:"The x schema",description:"x scale",default:0,examples:[9]},y:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/scale/properties/y",type:"number",title:"The y schema",description:"y scale",default:0,examples:[5]},z:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/scale/properties/z",type:"number",title:"The z schema",description:"z scale",default:0,examples:[9]}},additionalProperties:!0}},additionalProperties:!0}]}},cycles:{$id:"#/properties/cycles",type:"array",title:"The cycles schema",description:"Defines the cycles between GameObjects",default:[],examples:[[{from:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParser",to:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParserParameter"}]],additionalItems:!0,items:{$id:"#/properties/cycles/items",anyOf:[{$id:"#/properties/cycles/items/anyOf/0",type:"object",title:"The first anyOf schema",description:"A cycle between two GameObjects",default:{},examples:[{from:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParser",to:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParserParameter"}],required:["from","to"],properties:{from:{$id:"#/properties/cycles/items/anyOf/0/properties/from",type:"string",title:"The from schema",description:"from GameObject",default:"",examples:["root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParser"]},to:{$id:"#/properties/cycles/items/anyOf/0/properties/to",type:"string",title:"The to schema",description:"to GameObject",default:"",examples:["root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParserParameter"]}},additionalProperties:!0}]}}},additionalProperties:!0};function A6(i){return new p6.default({allErrors:!0}).validate(m6,JSON.parse(i))}function Ip(i){let t=i.length;for(;--t>=0;)i[t]=0}var zce=0,t7=1,qce=2,Gce=3,Wce=258,EF=29,m_=256,a_=m_+1+EF,Tp=30,TF=19,i7=2*a_+1,kf=15,rF=16,jce=7,BF=256,n7=16,r7=17,o7=18,_F=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),P1=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),$ce=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),a7=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Xce=512,fd=new Array((a_+2)*2);Ip(fd);var n_=new Array(Tp*2);Ip(n_);var s_=new Array(Xce);Ip(s_);var l_=new Array(Wce-Gce+1);Ip(l_);var FF=new Array(EF);Ip(FF);var R1=new Array(Tp);Ip(R1);function oF(i,t,e,n,r){this.static_tree=i,this.extra_bits=t,this.extra_base=e,this.elems=n,this.max_length=r,this.has_stree=i&&i.length}var s7,l7,c7;function aF(i,t){this.dyn_tree=i,this.max_code=0,this.stat_desc=t}var d7=i=>i<256?s_[i]:s_[256+(i>>>7)],c_=(i,t)=>{i.pending_buf[i.pending++]=t&255,i.pending_buf[i.pending++]=t>>>8&255},Ua=(i,t,e)=>{i.bi_valid>rF-e?(i.bi_buf|=t<<i.bi_valid&65535,c_(i,i.bi_buf),i.bi_buf=t>>rF-i.bi_valid,i.bi_valid+=e-rF):(i.bi_buf|=t<<i.bi_valid&65535,i.bi_valid+=e)},ec=(i,t,e)=>{Ua(i,e[t*2],e[t*2+1])},u7=(i,t)=>{let e=0;do e|=i&1,i>>>=1,e<<=1;while(--t>0);return e>>>1},Kce=i=>{i.bi_valid===16?(c_(i,i.bi_buf),i.bi_buf=0,i.bi_valid=0):i.bi_valid>=8&&(i.pending_buf[i.pending++]=i.bi_buf&255,i.bi_buf>>=8,i.bi_valid-=8)},Yce=(i,t)=>{let e=t.dyn_tree,n=t.max_code,r=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,l=t.stat_desc.max_length,c,d,h,u,f,_,y=0;for(u=0;u<=kf;u++)i.bl_count[u]=0;for(e[i.heap[i.heap_max]*2+1]=0,c=i.heap_max+1;c<i7;c++)d=i.heap[c],u=e[e[d*2+1]*2+1]+1,u>l&&(u=l,y++),e[d*2+1]=u,!(d>n)&&(i.bl_count[u]++,f=0,d>=s&&(f=a[d-s]),_=e[d*2],i.opt_len+=_*(u+f),o&&(i.static_len+=_*(r[d*2+1]+f)));if(y!==0){do{for(u=l-1;i.bl_count[u]===0;)u--;i.bl_count[u]--,i.bl_count[u+1]+=2,i.bl_count[l]--,y-=2}while(y>0);for(u=l;u!==0;u--)for(d=i.bl_count[u];d!==0;)h=i.heap[--c],!(h>n)&&(e[h*2+1]!==u&&(i.opt_len+=(u-e[h*2+1])*e[h*2],e[h*2+1]=u),d--)}},h7=(i,t,e)=>{let n=new Array(kf+1),r=0,o,a;for(o=1;o<=kf;o++)r=r+e[o-1]<<1,n[o]=r;for(a=0;a<=t;a++){let s=i[a*2+1];s!==0&&(i[a*2]=u7(n[s]++,s))}},Zce=()=>{let i,t,e,n,r,o=new Array(kf+1);for(e=0,n=0;n<EF-1;n++)for(FF[n]=e,i=0;i<1<<_F[n];i++)l_[e++]=n;for(l_[e-1]=n,r=0,n=0;n<16;n++)for(R1[n]=r,i=0;i<1<<P1[n];i++)s_[r++]=n;for(r>>=7;n<Tp;n++)for(R1[n]=r<<7,i=0;i<1<<P1[n]-7;i++)s_[256+r++]=n;for(t=0;t<=kf;t++)o[t]=0;for(i=0;i<=143;)fd[i*2+1]=8,i++,o[8]++;for(;i<=255;)fd[i*2+1]=9,i++,o[9]++;for(;i<=279;)fd[i*2+1]=7,i++,o[7]++;for(;i<=287;)fd[i*2+1]=8,i++,o[8]++;for(h7(fd,a_+1,o),i=0;i<Tp;i++)n_[i*2+1]=5,n_[i*2]=u7(i,5);s7=new oF(fd,_F,m_+1,a_,kf),l7=new oF(n_,P1,0,Tp,kf),c7=new oF(new Array(0),$ce,0,TF,jce)},f7=i=>{let t;for(t=0;t<a_;t++)i.dyn_ltree[t*2]=0;for(t=0;t<Tp;t++)i.dyn_dtree[t*2]=0;for(t=0;t<TF;t++)i.bl_tree[t*2]=0;i.dyn_ltree[BF*2]=1,i.opt_len=i.static_len=0,i.sym_next=i.matches=0},m7=i=>{i.bi_valid>8?c_(i,i.bi_buf):i.bi_valid>0&&(i.pending_buf[i.pending++]=i.bi_buf),i.bi_buf=0,i.bi_valid=0},g6=(i,t,e,n)=>{let r=t*2,o=e*2;return i[r]<i[o]||i[r]===i[o]&&n[t]<=n[e]},sF=(i,t,e)=>{let n=i.heap[e],r=e<<1;for(;r<=i.heap_len&&(r<i.heap_len&&g6(t,i.heap[r+1],i.heap[r],i.depth)&&r++,!g6(t,n,i.heap[r],i.depth));)i.heap[e]=i.heap[r],e=r,r<<=1;i.heap[e]=n},_6=(i,t,e)=>{let n,r,o=0,a,s;if(i.sym_next!==0)do n=i.pending_buf[i.sym_buf+o++]&255,n+=(i.pending_buf[i.sym_buf+o++]&255)<<8,r=i.pending_buf[i.sym_buf+o++],n===0?ec(i,r,t):(a=l_[r],ec(i,a+m_+1,t),s=_F[a],s!==0&&(r-=FF[a],Ua(i,r,s)),n--,a=d7(n),ec(i,a,e),s=P1[a],s!==0&&(n-=R1[a],Ua(i,n,s)));while(o<i.sym_next);ec(i,BF,t)},bF=(i,t)=>{let e=t.dyn_tree,n=t.stat_desc.static_tree,r=t.stat_desc.has_stree,o=t.stat_desc.elems,a,s,l=-1,c;for(i.heap_len=0,i.heap_max=i7,a=0;a<o;a++)e[a*2]!==0?(i.heap[++i.heap_len]=l=a,i.depth[a]=0):e[a*2+1]=0;for(;i.heap_len<2;)c=i.heap[++i.heap_len]=l<2?++l:0,e[c*2]=1,i.depth[c]=0,i.opt_len--,r&&(i.static_len-=n[c*2+1]);for(t.max_code=l,a=i.heap_len>>1;a>=1;a--)sF(i,e,a);c=o;do a=i.heap[1],i.heap[1]=i.heap[i.heap_len--],sF(i,e,1),s=i.heap[1],i.heap[--i.heap_max]=a,i.heap[--i.heap_max]=s,e[c*2]=e[a*2]+e[s*2],i.depth[c]=(i.depth[a]>=i.depth[s]?i.depth[a]:i.depth[s])+1,e[a*2+1]=e[s*2+1]=c,i.heap[1]=c++,sF(i,e,1);while(i.heap_len>=2);i.heap[--i.heap_max]=i.heap[1],Yce(i,t),h7(e,l,i.bl_count)},b6=(i,t,e)=>{let n,r=-1,o,a=t[1],s=0,l=7,c=4;for(a===0&&(l=138,c=3),t[(e+1)*2+1]=65535,n=0;n<=e;n++)o=a,a=t[(n+1)*2+1],!(++s<l&&o===a)&&(s<c?i.bl_tree[o*2]+=s:o!==0?(o!==r&&i.bl_tree[o*2]++,i.bl_tree[n7*2]++):s<=10?i.bl_tree[r7*2]++:i.bl_tree[o7*2]++,s=0,r=o,a===0?(l=138,c=3):o===a?(l=6,c=3):(l=7,c=4))},v6=(i,t,e)=>{let n,r=-1,o,a=t[1],s=0,l=7,c=4;for(a===0&&(l=138,c=3),n=0;n<=e;n++)if(o=a,a=t[(n+1)*2+1],!(++s<l&&o===a)){if(s<c)do ec(i,o,i.bl_tree);while(--s!==0);else o!==0?(o!==r&&(ec(i,o,i.bl_tree),s--),ec(i,n7,i.bl_tree),Ua(i,s-3,2)):s<=10?(ec(i,r7,i.bl_tree),Ua(i,s-3,3)):(ec(i,o7,i.bl_tree),Ua(i,s-11,7));s=0,r=o,a===0?(l=138,c=3):o===a?(l=6,c=3):(l=7,c=4)}},Jce=i=>{let t;for(b6(i,i.dyn_ltree,i.l_desc.max_code),b6(i,i.dyn_dtree,i.d_desc.max_code),bF(i,i.bl_desc),t=TF-1;t>=3&&i.bl_tree[a7[t]*2+1]===0;t--);return i.opt_len+=3*(t+1)+5+5+4,t},ede=(i,t,e,n)=>{let r;for(Ua(i,t-257,5),Ua(i,e-1,5),Ua(i,n-4,4),r=0;r<n;r++)Ua(i,i.bl_tree[a7[r]*2+1],3);v6(i,i.dyn_ltree,t-1),v6(i,i.dyn_dtree,e-1)},tde=i=>{let t=4093624447,e;for(e=0;e<=31;e++,t>>>=1)if(t&1&&i.dyn_ltree[e*2]!==0)return 0;if(i.dyn_ltree[18]!==0||i.dyn_ltree[20]!==0||i.dyn_ltree[26]!==0)return 1;for(e=32;e<m_;e++)if(i.dyn_ltree[e*2]!==0)return 1;return 0},y6=!1,ide=i=>{y6||(Zce(),y6=!0),i.l_desc=new aF(i.dyn_ltree,s7),i.d_desc=new aF(i.dyn_dtree,l7),i.bl_desc=new aF(i.bl_tree,c7),i.bi_buf=0,i.bi_valid=0,f7(i)},p7=(i,t,e,n)=>{Ua(i,(zce<<1)+(n?1:0),3),m7(i),c_(i,e),c_(i,~e),e&&i.pending_buf.set(i.window.subarray(t,t+e),i.pending),i.pending+=e},nde=i=>{Ua(i,t7<<1,3),ec(i,BF,fd),Kce(i)},rde=(i,t,e,n)=>{let r,o,a=0;i.level>0?(i.strm.data_type===2&&(i.strm.data_type=tde(i)),bF(i,i.l_desc),bF(i,i.d_desc),a=Jce(i),r=i.opt_len+3+7>>>3,o=i.static_len+3+7>>>3,o<=r&&(r=o)):r=o=e+5,e+4<=r&&t!==-1?p7(i,t,e,n):i.strategy===4||o===r?(Ua(i,(t7<<1)+(n?1:0),3),_6(i,fd,n_)):(Ua(i,(qce<<1)+(n?1:0),3),ede(i,i.l_desc.max_code+1,i.d_desc.max_code+1,a+1),_6(i,i.dyn_ltree,i.dyn_dtree)),f7(i),n&&m7(i)},ode=(i,t,e)=>(i.pending_buf[i.sym_buf+i.sym_next++]=t,i.pending_buf[i.sym_buf+i.sym_next++]=t>>8,i.pending_buf[i.sym_buf+i.sym_next++]=e,t===0?i.dyn_ltree[e*2]++:(i.matches++,t--,i.dyn_ltree[(l_[e]+m_+1)*2]++,i.dyn_dtree[d7(t)*2]++),i.sym_next===i.sym_end),ade=ide,sde=p7,lde=rde,cde=ode,dde=nde,ude={_tr_init:ade,_tr_stored_block:sde,_tr_flush_block:lde,_tr_tally:cde,_tr_align:dde},hde=(i,t,e,n)=>{let r=i&65535|0,o=i>>>16&65535|0,a=0;for(;e!==0;){a=e>2e3?2e3:e,e-=a;do r=r+t[n++]|0,o=o+r|0;while(--a);r%=65521,o%=65521}return r|o<<16|0},d_=hde,fde=()=>{let i,t=[];for(var e=0;e<256;e++){i=e;for(var n=0;n<8;n++)i=i&1?3988292384^i>>>1:i>>>1;t[e]=i}return t},mde=new Uint32Array(fde()),pde=(i,t,e,n)=>{let r=mde,o=n+e;i^=-1;for(let a=n;a<o;a++)i=i>>>8^r[(i^t[a])&255];return i^-1},vo=pde,Of={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Dp={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},{_tr_init:Ade,_tr_stored_block:vF,_tr_flush_block:gde,_tr_tally:Mu,_tr_align:_de}=ude,{Z_NO_FLUSH:Su,Z_PARTIAL_FLUSH:bde,Z_FULL_FLUSH:vde,Z_FINISH:Bs,Z_BLOCK:x6,Z_OK:Ro,Z_STREAM_END:w6,Z_STREAM_ERROR:tc,Z_DATA_ERROR:yde,Z_BUF_ERROR:lF,Z_DEFAULT_COMPRESSION:xde,Z_FILTERED:wde,Z_HUFFMAN_ONLY:B1,Z_RLE:Cde,Z_FIXED:Mde,Z_DEFAULT_STRATEGY:Sde,Z_UNKNOWN:Ede,Z_DEFLATED:N1}=Dp,Tde=9,Bde=15,Fde=8,Ide=29,Dde=256,yF=Dde+1+Ide,kde=30,Pde=19,Rde=2*yF+1,Ode=15,mn=3,Cu=258,ic=Cu+mn+1,Lde=32,Bp=42,IF=57,xF=69,wF=73,CF=91,MF=103,Pf=113,t_=666,ba=1,kp=2,Lf=3,Pp=4,Nde=3,Rf=(i,t)=>(i.msg=Of[t],t),C6=i=>i*2-(i>4?9:0),wu=i=>{let t=i.length;for(;--t>=0;)i[t]=0},Ude=i=>{let t,e,n,r=i.w_size;t=i.hash_size,n=t;do e=i.head[--n],i.head[n]=e>=r?e-r:0;while(--t);t=r,n=t;do e=i.prev[--n],i.prev[n]=e>=r?e-r:0;while(--t)},Hde=(i,t,e)=>(t<<i.hash_shift^e)&i.hash_mask,Eu=Hde,is=i=>{let t=i.state,e=t.pending;e>i.avail_out&&(e=i.avail_out),e!==0&&(i.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+e),i.next_out),i.next_out+=e,t.pending_out+=e,i.total_out+=e,i.avail_out-=e,t.pending-=e,t.pending===0&&(t.pending_out=0))},ns=(i,t)=>{gde(i,i.block_start>=0?i.block_start:-1,i.strstart-i.block_start,t),i.block_start=i.strstart,is(i.strm)},Fn=(i,t)=>{i.pending_buf[i.pending++]=t},e_=(i,t)=>{i.pending_buf[i.pending++]=t>>>8&255,i.pending_buf[i.pending++]=t&255},SF=(i,t,e,n)=>{let r=i.avail_in;return r>n&&(r=n),r===0?0:(i.avail_in-=r,t.set(i.input.subarray(i.next_in,i.next_in+r),e),i.state.wrap===1?i.adler=d_(i.adler,t,r,e):i.state.wrap===2&&(i.adler=vo(i.adler,t,r,e)),i.next_in+=r,i.total_in+=r,r)},A7=(i,t)=>{let e=i.max_chain_length,n=i.strstart,r,o,a=i.prev_length,s=i.nice_match,l=i.strstart>i.w_size-ic?i.strstart-(i.w_size-ic):0,c=i.window,d=i.w_mask,h=i.prev,u=i.strstart+Cu,f=c[n+a-1],_=c[n+a];i.prev_length>=i.good_match&&(e>>=2),s>i.lookahead&&(s=i.lookahead);do if(r=t,!(c[r+a]!==_||c[r+a-1]!==f||c[r]!==c[n]||c[++r]!==c[n+1])){n+=2,r++;do;while(c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&n<u);if(o=Cu-(u-n),n=u-Cu,o>a){if(i.match_start=t,a=o,o>=s)break;f=c[n+a-1],_=c[n+a]}}while((t=h[t&d])>l&&--e!==0);return a<=i.lookahead?a:i.lookahead},Fp=i=>{let t=i.w_size,e,n,r;do{if(n=i.window_size-i.lookahead-i.strstart,i.strstart>=t+(t-ic)&&(i.window.set(i.window.subarray(t,t+t-n),0),i.match_start-=t,i.strstart-=t,i.block_start-=t,i.insert>i.strstart&&(i.insert=i.strstart),Ude(i),n+=t),i.strm.avail_in===0)break;if(e=SF(i.strm,i.window,i.strstart+i.lookahead,n),i.lookahead+=e,i.lookahead+i.insert>=mn)for(r=i.strstart-i.insert,i.ins_h=i.window[r],i.ins_h=Eu(i,i.ins_h,i.window[r+1]);i.insert&&(i.ins_h=Eu(i,i.ins_h,i.window[r+mn-1]),i.prev[r&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=r,r++,i.insert--,!(i.lookahead+i.insert<mn)););}while(i.lookahead<ic&&i.strm.avail_in!==0)},g7=(i,t)=>{let e=i.pending_buf_size-5>i.w_size?i.w_size:i.pending_buf_size-5,n,r,o,a=0,s=i.strm.avail_in;do{if(n=65535,o=i.bi_valid+42>>3,i.strm.avail_out<o||(o=i.strm.avail_out-o,r=i.strstart-i.block_start,n>r+i.strm.avail_in&&(n=r+i.strm.avail_in),n>o&&(n=o),n<e&&(n===0&&t!==Bs||t===Su||n!==r+i.strm.avail_in)))break;a=t===Bs&&n===r+i.strm.avail_in?1:0,vF(i,0,0,a),i.pending_buf[i.pending-4]=n,i.pending_buf[i.pending-3]=n>>8,i.pending_buf[i.pending-2]=~n,i.pending_buf[i.pending-1]=~n>>8,is(i.strm),r&&(r>n&&(r=n),i.strm.output.set(i.window.subarray(i.block_start,i.block_start+r),i.strm.next_out),i.strm.next_out+=r,i.strm.avail_out-=r,i.strm.total_out+=r,i.block_start+=r,n-=r),n&&(SF(i.strm,i.strm.output,i.strm.next_out,n),i.strm.next_out+=n,i.strm.avail_out-=n,i.strm.total_out+=n)}while(a===0);return s-=i.strm.avail_in,s&&(s>=i.w_size?(i.matches=2,i.window.set(i.strm.input.subarray(i.strm.next_in-i.w_size,i.strm.next_in),0),i.strstart=i.w_size,i.insert=i.strstart):(i.window_size-i.strstart<=s&&(i.strstart-=i.w_size,i.window.set(i.window.subarray(i.w_size,i.w_size+i.strstart),0),i.matches<2&&i.matches++,i.insert>i.strstart&&(i.insert=i.strstart)),i.window.set(i.strm.input.subarray(i.strm.next_in-s,i.strm.next_in),i.strstart),i.strstart+=s,i.insert+=s>i.w_size-i.insert?i.w_size-i.insert:s),i.block_start=i.strstart),i.high_water<i.strstart&&(i.high_water=i.strstart),a?Pp:t!==Su&&t!==Bs&&i.strm.avail_in===0&&i.strstart===i.block_start?kp:(o=i.window_size-i.strstart,i.strm.avail_in>o&&i.block_start>=i.w_size&&(i.block_start-=i.w_size,i.strstart-=i.w_size,i.window.set(i.window.subarray(i.w_size,i.w_size+i.strstart),0),i.matches<2&&i.matches++,o+=i.w_size,i.insert>i.strstart&&(i.insert=i.strstart)),o>i.strm.avail_in&&(o=i.strm.avail_in),o&&(SF(i.strm,i.window,i.strstart,o),i.strstart+=o,i.insert+=o>i.w_size-i.insert?i.w_size-i.insert:o),i.high_water<i.strstart&&(i.high_water=i.strstart),o=i.bi_valid+42>>3,o=i.pending_buf_size-o>65535?65535:i.pending_buf_size-o,e=o>i.w_size?i.w_size:o,r=i.strstart-i.block_start,(r>=e||(r||t===Bs)&&t!==Su&&i.strm.avail_in===0&&r<=o)&&(n=r>o?o:r,a=t===Bs&&i.strm.avail_in===0&&n===r?1:0,vF(i,i.block_start,n,a),i.block_start+=n,is(i.strm)),a?Lf:ba)},cF=(i,t)=>{let e,n;for(;;){if(i.lookahead<ic){if(Fp(i),i.lookahead<ic&&t===Su)return ba;if(i.lookahead===0)break}if(e=0,i.lookahead>=mn&&(i.ins_h=Eu(i,i.ins_h,i.window[i.strstart+mn-1]),e=i.prev[i.strstart&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=i.strstart),e!==0&&i.strstart-e<=i.w_size-ic&&(i.match_length=A7(i,e)),i.match_length>=mn)if(n=Mu(i,i.strstart-i.match_start,i.match_length-mn),i.lookahead-=i.match_length,i.match_length<=i.max_lazy_match&&i.lookahead>=mn){i.match_length--;do i.strstart++,i.ins_h=Eu(i,i.ins_h,i.window[i.strstart+mn-1]),e=i.prev[i.strstart&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=i.strstart;while(--i.match_length!==0);i.strstart++}else i.strstart+=i.match_length,i.match_length=0,i.ins_h=i.window[i.strstart],i.ins_h=Eu(i,i.ins_h,i.window[i.strstart+1]);else n=Mu(i,0,i.window[i.strstart]),i.lookahead--,i.strstart++;if(n&&(ns(i,!1),i.strm.avail_out===0))return ba}return i.insert=i.strstart<mn-1?i.strstart:mn-1,t===Bs?(ns(i,!0),i.strm.avail_out===0?Lf:Pp):i.sym_next&&(ns(i,!1),i.strm.avail_out===0)?ba:kp},Sp=(i,t)=>{let e,n,r;for(;;){if(i.lookahead<ic){if(Fp(i),i.lookahead<ic&&t===Su)return ba;if(i.lookahead===0)break}if(e=0,i.lookahead>=mn&&(i.ins_h=Eu(i,i.ins_h,i.window[i.strstart+mn-1]),e=i.prev[i.strstart&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=i.strstart),i.prev_length=i.match_length,i.prev_match=i.match_start,i.match_length=mn-1,e!==0&&i.prev_length<i.max_lazy_match&&i.strstart-e<=i.w_size-ic&&(i.match_length=A7(i,e),i.match_length<=5&&(i.strategy===wde||i.match_length===mn&&i.strstart-i.match_start>4096)&&(i.match_length=mn-1)),i.prev_length>=mn&&i.match_length<=i.prev_length){r=i.strstart+i.lookahead-mn,n=Mu(i,i.strstart-1-i.prev_match,i.prev_length-mn),i.lookahead-=i.prev_length-1,i.prev_length-=2;do++i.strstart<=r&&(i.ins_h=Eu(i,i.ins_h,i.window[i.strstart+mn-1]),e=i.prev[i.strstart&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=i.strstart);while(--i.prev_length!==0);if(i.match_available=0,i.match_length=mn-1,i.strstart++,n&&(ns(i,!1),i.strm.avail_out===0))return ba}else if(i.match_available){if(n=Mu(i,0,i.window[i.strstart-1]),n&&ns(i,!1),i.strstart++,i.lookahead--,i.strm.avail_out===0)return ba}else i.match_available=1,i.strstart++,i.lookahead--}return i.match_available&&(n=Mu(i,0,i.window[i.strstart-1]),i.match_available=0),i.insert=i.strstart<mn-1?i.strstart:mn-1,t===Bs?(ns(i,!0),i.strm.avail_out===0?Lf:Pp):i.sym_next&&(ns(i,!1),i.strm.avail_out===0)?ba:kp},Vde=(i,t)=>{let e,n,r,o,a=i.window;for(;;){if(i.lookahead<=Cu){if(Fp(i),i.lookahead<=Cu&&t===Su)return ba;if(i.lookahead===0)break}if(i.match_length=0,i.lookahead>=mn&&i.strstart>0&&(r=i.strstart-1,n=a[r],n===a[++r]&&n===a[++r]&&n===a[++r])){o=i.strstart+Cu;do;while(n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&r<o);i.match_length=Cu-(o-r),i.match_length>i.lookahead&&(i.match_length=i.lookahead)}if(i.match_length>=mn?(e=Mu(i,1,i.match_length-mn),i.lookahead-=i.match_length,i.strstart+=i.match_length,i.match_length=0):(e=Mu(i,0,i.window[i.strstart]),i.lookahead--,i.strstart++),e&&(ns(i,!1),i.strm.avail_out===0))return ba}return i.insert=0,t===Bs?(ns(i,!0),i.strm.avail_out===0?Lf:Pp):i.sym_next&&(ns(i,!1),i.strm.avail_out===0)?ba:kp},Qde=(i,t)=>{let e;for(;;){if(i.lookahead===0&&(Fp(i),i.lookahead===0)){if(t===Su)return ba;break}if(i.match_length=0,e=Mu(i,0,i.window[i.strstart]),i.lookahead--,i.strstart++,e&&(ns(i,!1),i.strm.avail_out===0))return ba}return i.insert=0,t===Bs?(ns(i,!0),i.strm.avail_out===0?Lf:Pp):i.sym_next&&(ns(i,!1),i.strm.avail_out===0)?ba:kp};function Jl(i,t,e,n,r){this.good_length=i,this.max_lazy=t,this.nice_length=e,this.max_chain=n,this.func=r}var i_=[new Jl(0,0,0,0,g7),new Jl(4,4,8,4,cF),new Jl(4,5,16,8,cF),new Jl(4,6,32,32,cF),new Jl(4,4,16,16,Sp),new Jl(8,16,32,32,Sp),new Jl(8,16,128,128,Sp),new Jl(8,32,128,256,Sp),new Jl(32,128,258,1024,Sp),new Jl(32,258,258,4096,Sp)],zde=i=>{i.window_size=2*i.w_size,wu(i.head),i.max_lazy_match=i_[i.level].max_lazy,i.good_match=i_[i.level].good_length,i.nice_match=i_[i.level].nice_length,i.max_chain_length=i_[i.level].max_chain,i.strstart=0,i.block_start=0,i.lookahead=0,i.insert=0,i.match_length=i.prev_length=mn-1,i.match_available=0,i.ins_h=0};function qde(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=N1,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(Rde*2),this.dyn_dtree=new Uint16Array((2*kde+1)*2),this.bl_tree=new Uint16Array((2*Pde+1)*2),wu(this.dyn_ltree),wu(this.dyn_dtree),wu(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Ode+1),this.heap=new Uint16Array(2*yF+1),wu(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*yF+1),wu(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var p_=i=>{if(!i)return 1;let t=i.state;return!t||t.strm!==i||t.status!==Bp&&t.status!==IF&&t.status!==xF&&t.status!==wF&&t.status!==CF&&t.status!==MF&&t.status!==Pf&&t.status!==t_?1:0},_7=i=>{if(p_(i))return Rf(i,tc);i.total_in=i.total_out=0,i.data_type=Ede;let t=i.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?IF:t.wrap?Bp:Pf,i.adler=t.wrap===2?0:1,t.last_flush=-2,Ade(t),Ro},b7=i=>{let t=_7(i);return t===Ro&&zde(i.state),t},Gde=(i,t)=>p_(i)||i.state.wrap!==2?tc:(i.state.gzhead=t,Ro),v7=(i,t,e,n,r,o)=>{if(!i)return tc;let a=1;if(t===xde&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),r<1||r>Tde||e!==N1||n<8||n>15||t<0||t>9||o<0||o>Mde||n===8&&a!==1)return Rf(i,tc);n===8&&(n=9);let s=new qde;return i.state=s,s.strm=i,s.status=Bp,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=r+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+mn-1)/mn),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<r+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=t,s.strategy=o,s.method=e,b7(i)},Wde=(i,t)=>v7(i,t,N1,Bde,Fde,Sde),jde=(i,t)=>{if(p_(i)||t>x6||t<0)return i?Rf(i,tc):tc;let e=i.state;if(!i.output||i.avail_in!==0&&!i.input||e.status===t_&&t!==Bs)return Rf(i,i.avail_out===0?lF:tc);let n=e.last_flush;if(e.last_flush=t,e.pending!==0){if(is(i),i.avail_out===0)return e.last_flush=-1,Ro}else if(i.avail_in===0&&C6(t)<=C6(n)&&t!==Bs)return Rf(i,lF);if(e.status===t_&&i.avail_in!==0)return Rf(i,lF);if(e.status===Bp&&e.wrap===0&&(e.status=Pf),e.status===Bp){let r=N1+(e.w_bits-8<<4)<<8,o=-1;if(e.strategy>=B1||e.level<2?o=0:e.level<6?o=1:e.level===6?o=2:o=3,r|=o<<6,e.strstart!==0&&(r|=Lde),r+=31-r%31,e_(e,r),e.strstart!==0&&(e_(e,i.adler>>>16),e_(e,i.adler&65535)),i.adler=1,e.status=Pf,is(i),e.pending!==0)return e.last_flush=-1,Ro}if(e.status===IF){if(i.adler=0,Fn(e,31),Fn(e,139),Fn(e,8),e.gzhead)Fn(e,(e.gzhead.text?1:0)+(e.gzhead.hcrc?2:0)+(e.gzhead.extra?4:0)+(e.gzhead.name?8:0)+(e.gzhead.comment?16:0)),Fn(e,e.gzhead.time&255),Fn(e,e.gzhead.time>>8&255),Fn(e,e.gzhead.time>>16&255),Fn(e,e.gzhead.time>>24&255),Fn(e,e.level===9?2:e.strategy>=B1||e.level<2?4:0),Fn(e,e.gzhead.os&255),e.gzhead.extra&&e.gzhead.extra.length&&(Fn(e,e.gzhead.extra.length&255),Fn(e,e.gzhead.extra.length>>8&255)),e.gzhead.hcrc&&(i.adler=vo(i.adler,e.pending_buf,e.pending,0)),e.gzindex=0,e.status=xF;else if(Fn(e,0),Fn(e,0),Fn(e,0),Fn(e,0),Fn(e,0),Fn(e,e.level===9?2:e.strategy>=B1||e.level<2?4:0),Fn(e,Nde),e.status=Pf,is(i),e.pending!==0)return e.last_flush=-1,Ro}if(e.status===xF){if(e.gzhead.extra){let r=e.pending,o=(e.gzhead.extra.length&65535)-e.gzindex;for(;e.pending+o>e.pending_buf_size;){let s=e.pending_buf_size-e.pending;if(e.pending_buf.set(e.gzhead.extra.subarray(e.gzindex,e.gzindex+s),e.pending),e.pending=e.pending_buf_size,e.gzhead.hcrc&&e.pending>r&&(i.adler=vo(i.adler,e.pending_buf,e.pending-r,r)),e.gzindex+=s,is(i),e.pending!==0)return e.last_flush=-1,Ro;r=0,o-=s}let a=new Uint8Array(e.gzhead.extra);e.pending_buf.set(a.subarray(e.gzindex,e.gzindex+o),e.pending),e.pending+=o,e.gzhead.hcrc&&e.pending>r&&(i.adler=vo(i.adler,e.pending_buf,e.pending-r,r)),e.gzindex=0}e.status=wF}if(e.status===wF){if(e.gzhead.name){let r=e.pending,o;do{if(e.pending===e.pending_buf_size){if(e.gzhead.hcrc&&e.pending>r&&(i.adler=vo(i.adler,e.pending_buf,e.pending-r,r)),is(i),e.pending!==0)return e.last_flush=-1,Ro;r=0}e.gzindex<e.gzhead.name.length?o=e.gzhead.name.charCodeAt(e.gzindex++)&255:o=0,Fn(e,o)}while(o!==0);e.gzhead.hcrc&&e.pending>r&&(i.adler=vo(i.adler,e.pending_buf,e.pending-r,r)),e.gzindex=0}e.status=CF}if(e.status===CF){if(e.gzhead.comment){let r=e.pending,o;do{if(e.pending===e.pending_buf_size){if(e.gzhead.hcrc&&e.pending>r&&(i.adler=vo(i.adler,e.pending_buf,e.pending-r,r)),is(i),e.pending!==0)return e.last_flush=-1,Ro;r=0}e.gzindex<e.gzhead.comment.length?o=e.gzhead.comment.charCodeAt(e.gzindex++)&255:o=0,Fn(e,o)}while(o!==0);e.gzhead.hcrc&&e.pending>r&&(i.adler=vo(i.adler,e.pending_buf,e.pending-r,r))}e.status=MF}if(e.status===MF){if(e.gzhead.hcrc){if(e.pending+2>e.pending_buf_size&&(is(i),e.pending!==0))return e.last_flush=-1,Ro;Fn(e,i.adler&255),Fn(e,i.adler>>8&255),i.adler=0}if(e.status=Pf,is(i),e.pending!==0)return e.last_flush=-1,Ro}if(i.avail_in!==0||e.lookahead!==0||t!==Su&&e.status!==t_){let r=e.level===0?g7(e,t):e.strategy===B1?Qde(e,t):e.strategy===Cde?Vde(e,t):i_[e.level].func(e,t);if((r===Lf||r===Pp)&&(e.status=t_),r===ba||r===Lf)return i.avail_out===0&&(e.last_flush=-1),Ro;if(r===kp&&(t===bde?_de(e):t!==x6&&(vF(e,0,0,!1),t===vde&&(wu(e.head),e.lookahead===0&&(e.strstart=0,e.block_start=0,e.insert=0))),is(i),i.avail_out===0))return e.last_flush=-1,Ro}return t!==Bs?Ro:e.wrap<=0?w6:(e.wrap===2?(Fn(e,i.adler&255),Fn(e,i.adler>>8&255),Fn(e,i.adler>>16&255),Fn(e,i.adler>>24&255),Fn(e,i.total_in&255),Fn(e,i.total_in>>8&255),Fn(e,i.total_in>>16&255),Fn(e,i.total_in>>24&255)):(e_(e,i.adler>>>16),e_(e,i.adler&65535)),is(i),e.wrap>0&&(e.wrap=-e.wrap),e.pending!==0?Ro:w6)},$de=i=>{if(p_(i))return tc;let t=i.state.status;return i.state=null,t===Pf?Rf(i,yde):Ro},Xde=(i,t)=>{let e=t.length;if(p_(i))return tc;let n=i.state,r=n.wrap;if(r===2||r===1&&n.status!==Bp||n.lookahead)return tc;if(r===1&&(i.adler=d_(i.adler,t,e,0)),n.wrap=0,e>=n.w_size){r===0&&(wu(n.head),n.strstart=0,n.block_start=0,n.insert=0);let l=new Uint8Array(n.w_size);l.set(t.subarray(e-n.w_size,e),0),t=l,e=n.w_size}let o=i.avail_in,a=i.next_in,s=i.input;for(i.avail_in=e,i.next_in=0,i.input=t,Fp(n);n.lookahead>=mn;){let l=n.strstart,c=n.lookahead-(mn-1);do n.ins_h=Eu(n,n.ins_h,n.window[l+mn-1]),n.prev[l&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=l,l++;while(--c);n.strstart=l,n.lookahead=mn-1,Fp(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=mn-1,n.match_available=0,i.next_in=a,i.input=s,i.avail_in=o,n.wrap=r,Ro},Kde=Wde,Yde=v7,Zde=b7,Jde=_7,eue=Gde,tue=jde,iue=$de,nue=Xde,rue="pako deflate (from Nodeca project)",r_={deflateInit:Kde,deflateInit2:Yde,deflateReset:Zde,deflateResetKeep:Jde,deflateSetHeader:eue,deflate:tue,deflateEnd:iue,deflateSetDictionary:nue,deflateInfo:rue},oue=(i,t)=>Object.prototype.hasOwnProperty.call(i,t),aue=function(i){let t=Array.prototype.slice.call(arguments,1);for(;t.length;){let e=t.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(let n in e)oue(e,n)&&(i[n]=e[n])}}return i},sue=i=>{let t=0;for(let n=0,r=i.length;n<r;n++)t+=i[n].length;let e=new Uint8Array(t);for(let n=0,r=0,o=i.length;n<o;n++){let a=i[n];e.set(a,r),r+=a.length}return e},U1={assign:aue,flattenChunks:sue},y7=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{y7=!1}var u_=new Uint8Array(256);for(let i=0;i<256;i++)u_[i]=i>=252?6:i>=248?5:i>=240?4:i>=224?3:i>=192?2:1;u_[254]=u_[254]=1;var lue=i=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(i);let t,e,n,r,o,a=i.length,s=0;for(r=0;r<a;r++)e=i.charCodeAt(r),(e&64512)===55296&&r+1<a&&(n=i.charCodeAt(r+1),(n&64512)===56320&&(e=65536+(e-55296<<10)+(n-56320),r++)),s+=e<128?1:e<2048?2:e<65536?3:4;for(t=new Uint8Array(s),o=0,r=0;o<s;r++)e=i.charCodeAt(r),(e&64512)===55296&&r+1<a&&(n=i.charCodeAt(r+1),(n&64512)===56320&&(e=65536+(e-55296<<10)+(n-56320),r++)),e<128?t[o++]=e:e<2048?(t[o++]=192|e>>>6,t[o++]=128|e&63):e<65536?(t[o++]=224|e>>>12,t[o++]=128|e>>>6&63,t[o++]=128|e&63):(t[o++]=240|e>>>18,t[o++]=128|e>>>12&63,t[o++]=128|e>>>6&63,t[o++]=128|e&63);return t},cue=(i,t)=>{if(t<65534&&i.subarray&&y7)return String.fromCharCode.apply(null,i.length===t?i:i.subarray(0,t));let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(i[n]);return e},due=(i,t)=>{let e=t||i.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(i.subarray(0,t));let n,r,o=new Array(e*2);for(r=0,n=0;n<e;){let a=i[n++];if(a<128){o[r++]=a;continue}let s=u_[a];if(s>4){o[r++]=65533,n+=s-1;continue}for(a&=s===2?31:s===3?15:7;s>1&&n<e;)a=a<<6|i[n++]&63,s--;if(s>1){o[r++]=65533;continue}a<65536?o[r++]=a:(a-=65536,o[r++]=55296|a>>10&1023,o[r++]=56320|a&1023)}return cue(o,r)},uue=(i,t)=>{t=t||i.length,t>i.length&&(t=i.length);let e=t-1;for(;e>=0&&(i[e]&192)===128;)e--;return e<0||e===0?t:e+u_[i[e]]>t?e:t},h_={string2buf:lue,buf2string:due,utf8border:uue};function hue(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var x7=hue,w7=Object.prototype.toString,{Z_NO_FLUSH:fue,Z_SYNC_FLUSH:mue,Z_FULL_FLUSH:pue,Z_FINISH:Aue,Z_OK:O1,Z_STREAM_END:gue,Z_DEFAULT_COMPRESSION:_ue,Z_DEFAULT_STRATEGY:bue,Z_DEFLATED:vue}=Dp;function A_(i){this.options=U1.assign({level:_ue,method:vue,chunkSize:16384,windowBits:15,memLevel:8,strategy:bue},i||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new x7,this.strm.avail_out=0;let e=r_.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(e!==O1)throw new Error(Of[e]);if(t.header&&r_.deflateSetHeader(this.strm,t.header),t.dictionary){let n;if(typeof t.dictionary=="string"?n=h_.string2buf(t.dictionary):w7.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,e=r_.deflateSetDictionary(this.strm,n),e!==O1)throw new Error(Of[e]);this._dict_set=!0}}A_.prototype.push=function(i,t){let e=this.strm,n=this.options.chunkSize,r,o;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?Aue:fue,typeof i=="string"?e.input=h_.string2buf(i):w7.call(i)==="[object ArrayBuffer]"?e.input=new Uint8Array(i):e.input=i,e.next_in=0,e.avail_in=e.input.length;;){if(e.avail_out===0&&(e.output=new Uint8Array(n),e.next_out=0,e.avail_out=n),(o===mue||o===pue)&&e.avail_out<=6){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(r=r_.deflate(e,o),r===gue)return e.next_out>0&&this.onData(e.output.subarray(0,e.next_out)),r=r_.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===O1;if(e.avail_out===0){this.onData(e.output);continue}if(o>0&&e.next_out>0){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(e.avail_in===0)break}return!0};A_.prototype.onData=function(i){this.chunks.push(i)};A_.prototype.onEnd=function(i){i===O1&&(this.result=U1.flattenChunks(this.chunks)),this.chunks=[],this.err=i,this.msg=this.strm.msg};function DF(i,t){let e=new A_(t);if(e.push(i,!0),e.err)throw e.msg||Of[e.err];return e.result}function yue(i,t){return t=t||{},t.raw=!0,DF(i,t)}function xue(i,t){return t=t||{},t.gzip=!0,DF(i,t)}var wue=A_,Cue=DF,Mue=yue,Sue=xue,Eue=Dp,Tue={Deflate:wue,deflate:Cue,deflateRaw:Mue,gzip:Sue,constants:Eue},F1=16209,Bue=16191,Fue=function(t,e){let n,r,o,a,s,l,c,d,h,u,f,_,y,b,v,M,x,w,k,P,D,O,T,B,L=t.state;n=t.next_in,T=t.input,r=n+(t.avail_in-5),o=t.next_out,B=t.output,a=o-(e-t.avail_out),s=o+(t.avail_out-257),l=L.dmax,c=L.wsize,d=L.whave,h=L.wnext,u=L.window,f=L.hold,_=L.bits,y=L.lencode,b=L.distcode,v=(1<<L.lenbits)-1,M=(1<<L.distbits)-1;e:do{_<15&&(f+=T[n++]<<_,_+=8,f+=T[n++]<<_,_+=8),x=y[f&v];t:for(;;){if(w=x>>>24,f>>>=w,_-=w,w=x>>>16&255,w===0)B[o++]=x&65535;else if(w&16){k=x&65535,w&=15,w&&(_<w&&(f+=T[n++]<<_,_+=8),k+=f&(1<<w)-1,f>>>=w,_-=w),_<15&&(f+=T[n++]<<_,_+=8,f+=T[n++]<<_,_+=8),x=b[f&M];i:for(;;){if(w=x>>>24,f>>>=w,_-=w,w=x>>>16&255,w&16){if(P=x&65535,w&=15,_<w&&(f+=T[n++]<<_,_+=8,_<w&&(f+=T[n++]<<_,_+=8)),P+=f&(1<<w)-1,P>l){t.msg="invalid distance too far back",L.mode=F1;break e}if(f>>>=w,_-=w,w=o-a,P>w){if(w=P-w,w>d&&L.sane){t.msg="invalid distance too far back",L.mode=F1;break e}if(D=0,O=u,h===0){if(D+=c-w,w<k){k-=w;do B[o++]=u[D++];while(--w);D=o-P,O=B}}else if(h<w){if(D+=c+h-w,w-=h,w<k){k-=w;do B[o++]=u[D++];while(--w);if(D=0,h<k){w=h,k-=w;do B[o++]=u[D++];while(--w);D=o-P,O=B}}}else if(D+=h-w,w<k){k-=w;do B[o++]=u[D++];while(--w);D=o-P,O=B}for(;k>2;)B[o++]=O[D++],B[o++]=O[D++],B[o++]=O[D++],k-=3;k&&(B[o++]=O[D++],k>1&&(B[o++]=O[D++]))}else{D=o-P;do B[o++]=B[D++],B[o++]=B[D++],B[o++]=B[D++],k-=3;while(k>2);k&&(B[o++]=B[D++],k>1&&(B[o++]=B[D++]))}}else if((w&64)===0){x=b[(x&65535)+(f&(1<<w)-1)];continue i}else{t.msg="invalid distance code",L.mode=F1;break e}break}}else if((w&64)===0){x=y[(x&65535)+(f&(1<<w)-1)];continue t}else if(w&32){L.mode=Bue;break e}else{t.msg="invalid literal/length code",L.mode=F1;break e}break}}while(n<r&&o<s);k=_>>3,n-=k,_-=k<<3,f&=(1<<_)-1,t.next_in=n,t.next_out=o,t.avail_in=n<r?5+(r-n):5-(n-r),t.avail_out=o<s?257+(s-o):257-(o-s),L.hold=f,L.bits=_},Ep=15,M6=852,S6=592,E6=0,dF=1,T6=2,Iue=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Due=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),kue=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Pue=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),Rue=(i,t,e,n,r,o,a,s)=>{let l=s.bits,c=0,d=0,h=0,u=0,f=0,_=0,y=0,b=0,v=0,M=0,x,w,k,P,D,O=null,T,B=new Uint16Array(Ep+1),L=new Uint16Array(Ep+1),G=null,W,oe,pe;for(c=0;c<=Ep;c++)B[c]=0;for(d=0;d<n;d++)B[t[e+d]]++;for(f=l,u=Ep;u>=1&&B[u]===0;u--);if(f>u&&(f=u),u===0)return r[o++]=1<<24|64<<16|0,r[o++]=1<<24|64<<16|0,s.bits=1,0;for(h=1;h<u&&B[h]===0;h++);for(f<h&&(f=h),b=1,c=1;c<=Ep;c++)if(b<<=1,b-=B[c],b<0)return-1;if(b>0&&(i===E6||u!==1))return-1;for(L[1]=0,c=1;c<Ep;c++)L[c+1]=L[c]+B[c];for(d=0;d<n;d++)t[e+d]!==0&&(a[L[t[e+d]]++]=d);if(i===E6?(O=G=a,T=20):i===dF?(O=Iue,G=Due,T=257):(O=kue,G=Pue,T=0),M=0,d=0,c=h,D=o,_=f,y=0,k=-1,v=1<<f,P=v-1,i===dF&&v>M6||i===T6&&v>S6)return 1;for(;;){W=c-y,a[d]+1<T?(oe=0,pe=a[d]):a[d]>=T?(oe=G[a[d]-T],pe=O[a[d]-T]):(oe=96,pe=0),x=1<<c-y,w=1<<_,h=w;do w-=x,r[D+(M>>y)+w]=W<<24|oe<<16|pe|0;while(w!==0);for(x=1<<c-1;M&x;)x>>=1;if(x!==0?(M&=x-1,M+=x):M=0,d++,--B[c]===0){if(c===u)break;c=t[e+a[d]]}if(c>f&&(M&P)!==k){for(y===0&&(y=f),D+=h,_=c-y,b=1<<_;_+y<u&&(b-=B[_+y],!(b<=0));)_++,b<<=1;if(v+=1<<_,i===dF&&v>M6||i===T6&&v>S6)return 1;k=M&P,r[k]=f<<24|_<<16|D-o|0}}return M!==0&&(r[D+M]=c-y<<24|64<<16|0),s.bits=f,0},o_=Rue,Oue=0,C7=1,M7=2,{Z_FINISH:B6,Z_BLOCK:Lue,Z_TREES:I1,Z_OK:Nf,Z_STREAM_END:Nue,Z_NEED_DICT:Uue,Z_STREAM_ERROR:Fs,Z_DATA_ERROR:S7,Z_MEM_ERROR:E7,Z_BUF_ERROR:Hue,Z_DEFLATED:F6}=Dp,H1=16180,I6=16181,D6=16182,k6=16183,P6=16184,R6=16185,O6=16186,L6=16187,N6=16188,U6=16189,L1=16190,hd=16191,uF=16192,H6=16193,hF=16194,V6=16195,Q6=16196,z6=16197,q6=16198,D1=16199,k1=16200,G6=16201,W6=16202,j6=16203,$6=16204,X6=16205,fF=16206,K6=16207,Y6=16208,pr=16209,T7=16210,B7=16211,Vue=852,Que=592,zue=15,que=zue,Z6=i=>(i>>>24&255)+(i>>>8&65280)+((i&65280)<<8)+((i&255)<<24);function Gue(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var Uf=i=>{if(!i)return 1;let t=i.state;return!t||t.strm!==i||t.mode<H1||t.mode>B7?1:0},F7=i=>{if(Uf(i))return Fs;let t=i.state;return i.total_in=i.total_out=t.total=0,i.msg="",t.wrap&&(i.adler=t.wrap&1),t.mode=H1,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(Vue),t.distcode=t.distdyn=new Int32Array(Que),t.sane=1,t.back=-1,Nf},I7=i=>{if(Uf(i))return Fs;let t=i.state;return t.wsize=0,t.whave=0,t.wnext=0,F7(i)},D7=(i,t)=>{let e;if(Uf(i))return Fs;let n=i.state;return t<0?(e=0,t=-t):(e=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Fs:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=e,n.wbits=t,I7(i))},k7=(i,t)=>{if(!i)return Fs;let e=new Gue;i.state=e,e.strm=i,e.window=null,e.mode=H1;let n=D7(i,t);return n!==Nf&&(i.state=null),n},Wue=i=>k7(i,que),J6=!0,mF,pF,jue=i=>{if(J6){mF=new Int32Array(512),pF=new Int32Array(32);let t=0;for(;t<144;)i.lens[t++]=8;for(;t<256;)i.lens[t++]=9;for(;t<280;)i.lens[t++]=7;for(;t<288;)i.lens[t++]=8;for(o_(C7,i.lens,0,288,mF,0,i.work,{bits:9}),t=0;t<32;)i.lens[t++]=5;o_(M7,i.lens,0,32,pF,0,i.work,{bits:5}),J6=!1}i.lencode=mF,i.lenbits=9,i.distcode=pF,i.distbits=5},P7=(i,t,e,n)=>{let r,o=i.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),n>=o.wsize?(o.window.set(t.subarray(e-o.wsize,e),0),o.wnext=0,o.whave=o.wsize):(r=o.wsize-o.wnext,r>n&&(r=n),o.window.set(t.subarray(e-n,e-n+r),o.wnext),n-=r,n?(o.window.set(t.subarray(e-n,e),0),o.wnext=n,o.whave=o.wsize):(o.wnext+=r,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=r))),0},$ue=(i,t)=>{let e,n,r,o,a,s,l,c,d,h,u,f,_,y,b=0,v,M,x,w,k,P,D,O,T=new Uint8Array(4),B,L,G=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Uf(i)||!i.output||!i.input&&i.avail_in!==0)return Fs;e=i.state,e.mode===hd&&(e.mode=uF),a=i.next_out,r=i.output,l=i.avail_out,o=i.next_in,n=i.input,s=i.avail_in,c=e.hold,d=e.bits,h=s,u=l,O=Nf;e:for(;;)switch(e.mode){case H1:if(e.wrap===0){e.mode=uF;break}for(;d<16;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}if(e.wrap&2&&c===35615){e.wbits===0&&(e.wbits=15),e.check=0,T[0]=c&255,T[1]=c>>>8&255,e.check=vo(e.check,T,2,0),c=0,d=0,e.mode=I6;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((c&255)<<8)+(c>>8))%31){i.msg="incorrect header check",e.mode=pr;break}if((c&15)!==F6){i.msg="unknown compression method",e.mode=pr;break}if(c>>>=4,d-=4,D=(c&15)+8,e.wbits===0&&(e.wbits=D),D>15||D>e.wbits){i.msg="invalid window size",e.mode=pr;break}e.dmax=1<<e.wbits,e.flags=0,i.adler=e.check=1,e.mode=c&512?U6:hd,c=0,d=0;break;case I6:for(;d<16;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}if(e.flags=c,(e.flags&255)!==F6){i.msg="unknown compression method",e.mode=pr;break}if(e.flags&57344){i.msg="unknown header flags set",e.mode=pr;break}e.head&&(e.head.text=c>>8&1),e.flags&512&&e.wrap&4&&(T[0]=c&255,T[1]=c>>>8&255,e.check=vo(e.check,T,2,0)),c=0,d=0,e.mode=D6;case D6:for(;d<32;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}e.head&&(e.head.time=c),e.flags&512&&e.wrap&4&&(T[0]=c&255,T[1]=c>>>8&255,T[2]=c>>>16&255,T[3]=c>>>24&255,e.check=vo(e.check,T,4,0)),c=0,d=0,e.mode=k6;case k6:for(;d<16;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}e.head&&(e.head.xflags=c&255,e.head.os=c>>8),e.flags&512&&e.wrap&4&&(T[0]=c&255,T[1]=c>>>8&255,e.check=vo(e.check,T,2,0)),c=0,d=0,e.mode=P6;case P6:if(e.flags&1024){for(;d<16;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}e.length=c,e.head&&(e.head.extra_len=c),e.flags&512&&e.wrap&4&&(T[0]=c&255,T[1]=c>>>8&255,e.check=vo(e.check,T,2,0)),c=0,d=0}else e.head&&(e.head.extra=null);e.mode=R6;case R6:if(e.flags&1024&&(f=e.length,f>s&&(f=s),f&&(e.head&&(D=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(n.subarray(o,o+f),D)),e.flags&512&&e.wrap&4&&(e.check=vo(e.check,n,f,o)),s-=f,o+=f,e.length-=f),e.length))break e;e.length=0,e.mode=O6;case O6:if(e.flags&2048){if(s===0)break e;f=0;do D=n[o+f++],e.head&&D&&e.length<65536&&(e.head.name+=String.fromCharCode(D));while(D&&f<s);if(e.flags&512&&e.wrap&4&&(e.check=vo(e.check,n,f,o)),s-=f,o+=f,D)break e}else e.head&&(e.head.name=null);e.length=0,e.mode=L6;case L6:if(e.flags&4096){if(s===0)break e;f=0;do D=n[o+f++],e.head&&D&&e.length<65536&&(e.head.comment+=String.fromCharCode(D));while(D&&f<s);if(e.flags&512&&e.wrap&4&&(e.check=vo(e.check,n,f,o)),s-=f,o+=f,D)break e}else e.head&&(e.head.comment=null);e.mode=N6;case N6:if(e.flags&512){for(;d<16;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}if(e.wrap&4&&c!==(e.check&65535)){i.msg="header crc mismatch",e.mode=pr;break}c=0,d=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),i.adler=e.check=0,e.mode=hd;break;case U6:for(;d<32;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}i.adler=e.check=Z6(c),c=0,d=0,e.mode=L1;case L1:if(e.havedict===0)return i.next_out=a,i.avail_out=l,i.next_in=o,i.avail_in=s,e.hold=c,e.bits=d,Uue;i.adler=e.check=1,e.mode=hd;case hd:if(t===Lue||t===I1)break e;case uF:if(e.last){c>>>=d&7,d-=d&7,e.mode=fF;break}for(;d<3;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}switch(e.last=c&1,c>>>=1,d-=1,c&3){case 0:e.mode=H6;break;case 1:if(jue(e),e.mode=D1,t===I1){c>>>=2,d-=2;break e}break;case 2:e.mode=Q6;break;case 3:i.msg="invalid block type",e.mode=pr}c>>>=2,d-=2;break;case H6:for(c>>>=d&7,d-=d&7;d<32;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}if((c&65535)!==(c>>>16^65535)){i.msg="invalid stored block lengths",e.mode=pr;break}if(e.length=c&65535,c=0,d=0,e.mode=hF,t===I1)break e;case hF:e.mode=V6;case V6:if(f=e.length,f){if(f>s&&(f=s),f>l&&(f=l),f===0)break e;r.set(n.subarray(o,o+f),a),s-=f,o+=f,l-=f,a+=f,e.length-=f;break}e.mode=hd;break;case Q6:for(;d<14;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}if(e.nlen=(c&31)+257,c>>>=5,d-=5,e.ndist=(c&31)+1,c>>>=5,d-=5,e.ncode=(c&15)+4,c>>>=4,d-=4,e.nlen>286||e.ndist>30){i.msg="too many length or distance symbols",e.mode=pr;break}e.have=0,e.mode=z6;case z6:for(;e.have<e.ncode;){for(;d<3;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}e.lens[G[e.have++]]=c&7,c>>>=3,d-=3}for(;e.have<19;)e.lens[G[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,B={bits:e.lenbits},O=o_(Oue,e.lens,0,19,e.lencode,0,e.work,B),e.lenbits=B.bits,O){i.msg="invalid code lengths set",e.mode=pr;break}e.have=0,e.mode=q6;case q6:for(;e.have<e.nlen+e.ndist;){for(;b=e.lencode[c&(1<<e.lenbits)-1],v=b>>>24,M=b>>>16&255,x=b&65535,!(v<=d);){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}if(x<16)c>>>=v,d-=v,e.lens[e.have++]=x;else{if(x===16){for(L=v+2;d<L;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}if(c>>>=v,d-=v,e.have===0){i.msg="invalid bit length repeat",e.mode=pr;break}D=e.lens[e.have-1],f=3+(c&3),c>>>=2,d-=2}else if(x===17){for(L=v+3;d<L;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}c>>>=v,d-=v,D=0,f=3+(c&7),c>>>=3,d-=3}else{for(L=v+7;d<L;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}c>>>=v,d-=v,D=0,f=11+(c&127),c>>>=7,d-=7}if(e.have+f>e.nlen+e.ndist){i.msg="invalid bit length repeat",e.mode=pr;break}for(;f--;)e.lens[e.have++]=D}}if(e.mode===pr)break;if(e.lens[256]===0){i.msg="invalid code -- missing end-of-block",e.mode=pr;break}if(e.lenbits=9,B={bits:e.lenbits},O=o_(C7,e.lens,0,e.nlen,e.lencode,0,e.work,B),e.lenbits=B.bits,O){i.msg="invalid literal/lengths set",e.mode=pr;break}if(e.distbits=6,e.distcode=e.distdyn,B={bits:e.distbits},O=o_(M7,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,B),e.distbits=B.bits,O){i.msg="invalid distances set",e.mode=pr;break}if(e.mode=D1,t===I1)break e;case D1:e.mode=k1;case k1:if(s>=6&&l>=258){i.next_out=a,i.avail_out=l,i.next_in=o,i.avail_in=s,e.hold=c,e.bits=d,Fue(i,u),a=i.next_out,r=i.output,l=i.avail_out,o=i.next_in,n=i.input,s=i.avail_in,c=e.hold,d=e.bits,e.mode===hd&&(e.back=-1);break}for(e.back=0;b=e.lencode[c&(1<<e.lenbits)-1],v=b>>>24,M=b>>>16&255,x=b&65535,!(v<=d);){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}if(M&&(M&240)===0){for(w=v,k=M,P=x;b=e.lencode[P+((c&(1<<w+k)-1)>>w)],v=b>>>24,M=b>>>16&255,x=b&65535,!(w+v<=d);){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}c>>>=w,d-=w,e.back+=w}if(c>>>=v,d-=v,e.back+=v,e.length=x,M===0){e.mode=X6;break}if(M&32){e.back=-1,e.mode=hd;break}if(M&64){i.msg="invalid literal/length code",e.mode=pr;break}e.extra=M&15,e.mode=G6;case G6:if(e.extra){for(L=e.extra;d<L;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}e.length+=c&(1<<e.extra)-1,c>>>=e.extra,d-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=W6;case W6:for(;b=e.distcode[c&(1<<e.distbits)-1],v=b>>>24,M=b>>>16&255,x=b&65535,!(v<=d);){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}if((M&240)===0){for(w=v,k=M,P=x;b=e.distcode[P+((c&(1<<w+k)-1)>>w)],v=b>>>24,M=b>>>16&255,x=b&65535,!(w+v<=d);){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}c>>>=w,d-=w,e.back+=w}if(c>>>=v,d-=v,e.back+=v,M&64){i.msg="invalid distance code",e.mode=pr;break}e.offset=x,e.extra=M&15,e.mode=j6;case j6:if(e.extra){for(L=e.extra;d<L;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}e.offset+=c&(1<<e.extra)-1,c>>>=e.extra,d-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){i.msg="invalid distance too far back",e.mode=pr;break}e.mode=$6;case $6:if(l===0)break e;if(f=u-l,e.offset>f){if(f=e.offset-f,f>e.whave&&e.sane){i.msg="invalid distance too far back",e.mode=pr;break}f>e.wnext?(f-=e.wnext,_=e.wsize-f):_=e.wnext-f,f>e.length&&(f=e.length),y=e.window}else y=r,_=a-e.offset,f=e.length;f>l&&(f=l),l-=f,e.length-=f;do r[a++]=y[_++];while(--f);e.length===0&&(e.mode=k1);break;case X6:if(l===0)break e;r[a++]=e.length,l--,e.mode=k1;break;case fF:if(e.wrap){for(;d<32;){if(s===0)break e;s--,c|=n[o++]<<d,d+=8}if(u-=l,i.total_out+=u,e.total+=u,e.wrap&4&&u&&(i.adler=e.check=e.flags?vo(e.check,r,u,a-u):d_(e.check,r,u,a-u)),u=l,e.wrap&4&&(e.flags?c:Z6(c))!==e.check){i.msg="incorrect data check",e.mode=pr;break}c=0,d=0}e.mode=K6;case K6:if(e.wrap&&e.flags){for(;d<32;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}if(e.wrap&4&&c!==(e.total&4294967295)){i.msg="incorrect length check",e.mode=pr;break}c=0,d=0}e.mode=Y6;case Y6:O=Nue;break e;case pr:O=S7;break e;case T7:return E7;case B7:default:return Fs}return i.next_out=a,i.avail_out=l,i.next_in=o,i.avail_in=s,e.hold=c,e.bits=d,(e.wsize||u!==i.avail_out&&e.mode<pr&&(e.mode<fF||t!==B6))&&P7(i,i.output,i.next_out,u-i.avail_out),h-=i.avail_in,u-=i.avail_out,i.total_in+=h,i.total_out+=u,e.total+=u,e.wrap&4&&u&&(i.adler=e.check=e.flags?vo(e.check,r,u,i.next_out-u):d_(e.check,r,u,i.next_out-u)),i.data_type=e.bits+(e.last?64:0)+(e.mode===hd?128:0)+(e.mode===D1||e.mode===hF?256:0),(h===0&&u===0||t===B6)&&O===Nf&&(O=Hue),O},Xue=i=>{if(Uf(i))return Fs;let t=i.state;return t.window&&(t.window=null),i.state=null,Nf},Kue=(i,t)=>{if(Uf(i))return Fs;let e=i.state;return(e.wrap&2)===0?Fs:(e.head=t,t.done=!1,Nf)},Yue=(i,t)=>{let e=t.length,n,r,o;return Uf(i)||(n=i.state,n.wrap!==0&&n.mode!==L1)?Fs:n.mode===L1&&(r=1,r=d_(r,t,e,0),r!==n.check)?S7:(o=P7(i,t,e,e),o?(n.mode=T7,E7):(n.havedict=1,Nf))},Zue=I7,Jue=D7,ehe=F7,the=Wue,ihe=k7,nhe=$ue,rhe=Xue,ohe=Kue,ahe=Yue,she="pako inflate (from Nodeca project)",md={inflateReset:Zue,inflateReset2:Jue,inflateResetKeep:ehe,inflateInit:the,inflateInit2:ihe,inflate:nhe,inflateEnd:rhe,inflateGetHeader:ohe,inflateSetDictionary:ahe,inflateInfo:she};function lhe(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var che=lhe,R7=Object.prototype.toString,{Z_NO_FLUSH:dhe,Z_FINISH:uhe,Z_OK:f_,Z_STREAM_END:AF,Z_NEED_DICT:gF,Z_STREAM_ERROR:hhe,Z_DATA_ERROR:e7,Z_MEM_ERROR:fhe}=Dp;function g_(i){this.options=U1.assign({chunkSize:1024*64,windowBits:15,to:""},i||{});let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(i&&i.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new x7,this.strm.avail_out=0;let e=md.inflateInit2(this.strm,t.windowBits);if(e!==f_)throw new Error(Of[e]);if(this.header=new che,md.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=h_.string2buf(t.dictionary):R7.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(e=md.inflateSetDictionary(this.strm,t.dictionary),e!==f_)))throw new Error(Of[e])}g_.prototype.push=function(i,t){let e=this.strm,n=this.options.chunkSize,r=this.options.dictionary,o,a,s;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?uhe:dhe,R7.call(i)==="[object ArrayBuffer]"?e.input=new Uint8Array(i):e.input=i,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(n),e.next_out=0,e.avail_out=n),o=md.inflate(e,a),o===gF&&r&&(o=md.inflateSetDictionary(e,r),o===f_?o=md.inflate(e,a):o===e7&&(o=gF));e.avail_in>0&&o===AF&&e.state.wrap>0&&i[e.next_in]!==0;)md.inflateReset(e),o=md.inflate(e,a);switch(o){case hhe:case e7:case gF:case fhe:return this.onEnd(o),this.ended=!0,!1}if(s=e.avail_out,e.next_out&&(e.avail_out===0||o===AF))if(this.options.to==="string"){let l=h_.utf8border(e.output,e.next_out),c=e.next_out-l,d=h_.buf2string(e.output,l);e.next_out=c,e.avail_out=n-c,c&&e.output.set(e.output.subarray(l,l+c),0),this.onData(d)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(!(o===f_&&s===0)){if(o===AF)return o=md.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(e.avail_in===0)break}}return!0};g_.prototype.onData=function(i){this.chunks.push(i)};g_.prototype.onEnd=function(i){i===f_&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=U1.flattenChunks(this.chunks)),this.chunks=[],this.err=i,this.msg=this.strm.msg};function kF(i,t){let e=new g_(t);if(e.push(i),e.err)throw e.msg||Of[e.err];return e.result}function mhe(i,t){return t=t||{},t.raw=!0,kF(i,t)}var phe=g_,Ahe=kF,ghe=mhe,_he=kF,bhe=Dp,vhe={Inflate:phe,inflate:Ahe,inflateRaw:ghe,ungzip:_he,constants:bhe},{Deflate:AUe,deflate:gUe,deflateRaw:_Ue,gzip:bUe}=Tue,{Inflate:vUe,inflate:yUe,inflateRaw:xUe,ungzip:yhe}=vhe;var V1=yhe;var Q1=i=>{let t=[];for(let e=0;e<i.length;e++)t.push(xhe(i[e]));return t},xhe=i=>ft(null,null,function*(){return new Promise(t=>{let e=i.name.endsWith(".gz"),n=new FileReader;e?n.readAsArrayBuffer(i):n.readAsText(i,"utf8");let r;n.onload=o=>{let a=o.target.result.toString();r=e?V1(o.target.result,{to:"string"}):a,a.includes("gameObjectPositions")&&A6(a)&&(r=JSON.stringify(h6(a)))},n.onloadend=()=>{t(r)}})});var z1=(()=>{class i{constructor(e,n){this.store=e,this.loadFileService=n,this.isUploading=!1}uploadFiles(){let e=E1();e.addEventListener("change",()=>{this.uploadFilesOnEvent(e)}),e.click()}uploadFilesOnEvent(e){return ft(this,null,function*(){try{this.isUploading=!0,this.store.dispatch(Ya({value:!0})),this.store.dispatch(ol({value:!0}));let n=yield Promise.all(Q1(e.files)),{customConfigs:r,ccFiles:o}=this.splitCustomConfigsAndCCFiles(e.files,n);for(let a of r)Bn.importCustomConfigs(a);o.length>0&&this.loadFileService.loadFiles(o)}catch{this.store.dispatch(Ya({value:!1})),this.store.dispatch(ol({value:!1}))}finally{this.isUploading=!1}})}splitCustomConfigsAndCCFiles(e,n){let r=[],o=[];for(let[a,s]of n.entries()){let l=e[a].name;l.includes(nF)?r.push(s):o.push({fileName:l,fileSize:e[a].size,content:$0(s)})}return{customConfigs:r,ccFiles:o}}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie),Me(ul))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var L7=(()=>{class i{constructor(e){this.uploadFilesService=e}uploadFiles(){this.uploadFilesService.uploadFiles()}static{this.\u0275fac=function(n){return new(n||i)(se(z1))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-upload-files-button"]],decls:1,vars:1,consts:[["title","Load cc.json files",3,"click","icon"]],template:function(n,r){n&1&&(S(0,"cc-action-icon",0),he("click",function(){return r.uploadFiles()}),F()),n&2&&z("icon","fa fa-folder-open folder-icon")},dependencies:[La],encapsulation:2})}}return i})();var PF=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function RF(i,t,e,n){i.addEventListener?i.addEventListener(t,e,n):i.attachEvent&&i.attachEvent("on".concat(t),e)}function __(i,t,e,n){i.removeEventListener?i.removeEventListener(t,e,n):i.detachEvent&&i.detachEvent("on".concat(t),e)}function H7(i,t){let e=t.slice(0,t.length-1);for(let n=0;n<e.length;n++)e[n]=i[e[n].toLowerCase()];return e}function V7(i){typeof i!="string"&&(i=""),i=i.replace(/\s/g,"");let t=i.split(","),e=t.lastIndexOf("");for(;e>=0;)t[e-1]+=",",t.splice(e,1),e=t.lastIndexOf("");return t}function whe(i,t){let e=i.length>=t.length?i:t,n=i.length>=t.length?t:i,r=!0;for(let o=0;o<e.length;o++)n.indexOf(e[o])===-1&&(r=!1);return r}var y_={backspace:8,"\u232B":8,tab:9,clear:12,enter:13,"\u21A9":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,arrowup:38,arrowdown:40,arrowleft:37,arrowright:39,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"\u21EA":20,",":188,".":190,"/":191,"`":192,"-":PF?173:189,"=":PF?61:187,";":PF?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},fl={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,meta:91,command:91},b_={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},Oo={16:!1,18:!1,17:!1,91:!1},Mr={};for(let i=1;i<20;i++)y_["f".concat(i)]=111+i;var Ar=[],v_=null,Q7="all",pd=new Map,Rp=i=>y_[i.toLowerCase()]||fl[i.toLowerCase()]||i.toUpperCase().charCodeAt(0),Che=i=>Object.keys(y_).find(t=>y_[t]===i),Mhe=i=>Object.keys(fl).find(t=>fl[t]===i);function z7(i){Q7=i||"all"}function x_(){return Q7||"all"}function She(){return Ar.slice(0)}function Ehe(){return Ar.map(i=>Che(i)||Mhe(i)||String.fromCharCode(i))}function The(){let i=[];return Object.keys(Mr).forEach(t=>{Mr[t].forEach(e=>{let{key:n,scope:r,mods:o,shortcut:a}=e;i.push({scope:r,shortcut:a,mods:o,keys:n.split("+").map(s=>Rp(s))})})}),i}function Bhe(i){let t=i.target||i.srcElement,{tagName:e}=t,n=!0,r=e==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(t.type);return(t.isContentEditable||(r||e==="TEXTAREA"||e==="SELECT")&&!t.readOnly)&&(n=!1),n}function Fhe(i){return typeof i=="string"&&(i=Rp(i)),Ar.indexOf(i)!==-1}function Ihe(i,t){let e,n;i||(i=x_());for(let r in Mr)if(Object.prototype.hasOwnProperty.call(Mr,r))for(e=Mr[r],n=0;n<e.length;)e[n].scope===i?e.splice(n,1).forEach(a=>{let{element:s}=a;return LF(s)}):n++;x_()===i&&z7(t||"all")}function Dhe(i){let t=i.keyCode||i.which||i.charCode;i.key&&i.key.toLowerCase()==="capslock"&&(t=Rp(i.key));let e=Ar.indexOf(t);if(e>=0&&Ar.splice(e,1),i.key&&i.key.toLowerCase()==="meta"&&Ar.splice(0,Ar.length),(t===93||t===224)&&(t=91),t in Oo){Oo[t]=!1;for(let n in fl)fl[n]===t&&(hl[n]=!1)}}function q7(i){if(typeof i>"u")Object.keys(Mr).forEach(r=>{Array.isArray(Mr[r])&&Mr[r].forEach(o=>q1(o)),delete Mr[r]}),LF(null);else if(Array.isArray(i))i.forEach(r=>{r.key&&q1(r)});else if(typeof i=="object")i.key&&q1(i);else if(typeof i=="string"){for(var t=arguments.length,e=new Array(t>1?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];let[r,o]=e;typeof r=="function"&&(o=r,r=""),q1({key:i,scope:r,method:o,splitKey:"+"})}}var q1=i=>{let{key:t,scope:e,method:n,splitKey:r="+"}=i;V7(t).forEach(a=>{let s=a.split(r),l=s.length,c=s[l-1],d=c==="*"?"*":Rp(c);if(!Mr[d])return;e||(e=x_());let h=l>1?H7(fl,s):[],u=[];Mr[d]=Mr[d].filter(f=>{let y=(n?f.method===n:!0)&&f.scope===e&&whe(f.mods,h);return y&&u.push(f.element),!y}),u.forEach(f=>LF(f))})};function N7(i,t,e,n){if(t.element!==n)return;let r;if(t.scope===e||t.scope==="all"){r=t.mods.length>0;for(let o in Oo)Object.prototype.hasOwnProperty.call(Oo,o)&&(!Oo[o]&&t.mods.indexOf(+o)>-1||Oo[o]&&t.mods.indexOf(+o)===-1)&&(r=!1);(t.mods.length===0&&!Oo[16]&&!Oo[18]&&!Oo[17]&&!Oo[91]||r||t.shortcut==="*")&&(t.keys=[],t.keys=t.keys.concat(Ar),t.method(i,t)===!1&&(i.preventDefault?i.preventDefault():i.returnValue=!1,i.stopPropagation&&i.stopPropagation(),i.cancelBubble&&(i.cancelBubble=!0)))}}function U7(i,t){let e=Mr["*"],n=i.keyCode||i.which||i.charCode;if(i.key&&i.key.toLowerCase()==="capslock"||!hl.filter.call(this,i))return;if((n===93||n===224)&&(n=91),Ar.indexOf(n)===-1&&n!==229&&Ar.push(n),["metaKey","ctrlKey","altKey","shiftKey"].forEach(s=>{let l=b_[s];i[s]&&Ar.indexOf(l)===-1?Ar.push(l):!i[s]&&Ar.indexOf(l)>-1?Ar.splice(Ar.indexOf(l),1):s==="metaKey"&&i[s]&&(Ar=Ar.filter(c=>c in b_||c===n))}),n in Oo){Oo[n]=!0;for(let s in fl)if(Object.prototype.hasOwnProperty.call(fl,s)){let l=b_[fl[s]];hl[s]=i[l]}if(!e)return}for(let s in Oo)Object.prototype.hasOwnProperty.call(Oo,s)&&(Oo[s]=i[b_[s]]);i.getModifierState&&!(i.altKey&&!i.ctrlKey)&&i.getModifierState("AltGraph")&&(Ar.indexOf(17)===-1&&Ar.push(17),Ar.indexOf(18)===-1&&Ar.push(18),Oo[17]=!0,Oo[18]=!0);let r=x_();if(e)for(let s=0;s<e.length;s++)e[s].scope===r&&(i.type==="keydown"&&e[s].keydown||i.type==="keyup"&&e[s].keyup)&&N7(i,e[s],r,t);if(!(n in Mr))return;let o=Mr[n],a=o.length;for(let s=0;s<a;s++)if((i.type==="keydown"&&o[s].keydown||i.type==="keyup"&&o[s].keyup)&&o[s].key){let l=o[s],{splitKey:c}=l,d=l.key.split(c),h=[];for(let u=0;u<d.length;u++)h.push(Rp(d[u]));h.sort().join("")===Ar.sort().join("")&&N7(i,l,r,t)}}function hl(i,t,e){Ar=[];let n=V7(i),r=[],o="all",a=document,s=0,l=!1,c=!0,d="+",h=!1,u=!1;for(e===void 0&&typeof t=="function"&&(e=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(o=t.scope),t.element&&(a=t.element),t.keyup&&(l=t.keyup),t.keydown!==void 0&&(c=t.keydown),t.capture!==void 0&&(h=t.capture),typeof t.splitKey=="string"&&(d=t.splitKey),t.single===!0&&(u=!0)),typeof t=="string"&&(o=t),u&&q7(i,o);s<n.length;s++)i=n[s].split(d),r=[],i.length>1&&(r=H7(fl,i)),i=i[i.length-1],i=i==="*"?"*":Rp(i),i in Mr||(Mr[i]=[]),Mr[i].push({keyup:l,keydown:c,scope:o,mods:r,shortcut:n[s],method:e,key:n[s],splitKey:d,element:a});if(typeof a<"u"&&window){if(!pd.has(a)){let f=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return U7(y,a)},_=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;U7(y,a),Dhe(y)};pd.set(a,{keydownListener:f,keyupListenr:_,capture:h}),RF(a,"keydown",f,h),RF(a,"keyup",_,h)}if(!v_){let f=()=>{Ar=[]};v_={listener:f,capture:h},RF(window,"focus",f,h)}}}function khe(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(Mr).forEach(e=>{Mr[e].filter(r=>r.scope===t&&r.shortcut===i).forEach(r=>{r&&r.method&&r.method()})})}function LF(i){let t=Object.values(Mr).flat();if(t.findIndex(n=>{let{element:r}=n;return r===i})<0){let{keydownListener:n,keyupListenr:r,capture:o}=pd.get(i)||{};n&&r&&(__(i,"keyup",r,o),__(i,"keydown",n,o),pd.delete(i))}if((t.length<=0||pd.size<=0)&&(Object.keys(pd).forEach(r=>{let{keydownListener:o,keyupListenr:a,capture:s}=pd.get(r)||{};o&&a&&(__(r,"keyup",a,s),__(r,"keydown",o,s),pd.delete(r))}),pd.clear(),Object.keys(Mr).forEach(r=>delete Mr[r]),v_)){let{listener:r,capture:o}=v_;__(window,"focus",r,o),v_=null}}var OF={getPressedKeyString:Ehe,setScope:z7,getScope:x_,deleteScope:Ihe,getPressedKeyCodes:She,getAllKeyCodes:The,isPressed:Fhe,filter:Bhe,trigger:khe,unbind:q7,keyMap:y_,modifier:fl,modifierMap:b_};for(let i in OF)Object.prototype.hasOwnProperty.call(OF,i)&&(hl[i]=OF[i]);if(typeof window<"u"){let i=window.hotkeys;hl.noConflict=t=>(t&&window.hotkeys===hl&&(window.hotkeys=i),hl),window.hotkeys=hl}var TV=el(G7());var wa={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},dc={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Phe=0,W7=1,Rhe=2;var cH=1,Ohe=2,xd=3,Lu=0,ra=1,wd=2,rc=0,oA=1,j7=2,$7=3,X7=4,Lhe=5,jf=100,Nhe=101,Uhe=102,Hhe=103,Vhe=104,Qhe=200,zhe=201,qhe=202,Ghe=203,bI=204,vI=205,Whe=206,jhe=207,$he=208,Xhe=209,Khe=210,Yhe=211,Zhe=212,Jhe=213,efe=214,tfe=0,ife=1,nfe=2,Bx=3,rfe=4,ofe=5,afe=6,sfe=7,O3=0,lfe=1,cfe=2,Ru=0,dfe=1,ufe=2,hfe=3,ffe=4,mfe=5,pfe=6,Afe=7;var K7=300,dA=301,uA=302,yI=303,xI=304,lw=306,hA=1e3,Xf=1001,wI=1002,ks=1003,gfe=1004;var G1=1005;var as=1006,HF=1007;var Kf=1008;var Sd=1009,dH=1010,uH=1011,N_=1012,L3=1013,Zf=1014,Cd=1015,nm=1016,N3=1017,U3=1018,fA=1020,hH=35902,fH=1021,mH=1022,ss=1023,pH=1024,AH=1025,aA=1026,mA=1027,gH=1028,H3=1029,_H=1030,V3=1031;var Q3=1033,Cx=33776,Mx=33777,Sx=33778,Ex=33779,CI=35840,MI=35841,SI=35842,EI=35843,TI=36196,BI=37492,FI=37496,II=37808,DI=37809,kI=37810,PI=37811,RI=37812,OI=37813,LI=37814,NI=37815,UI=37816,HI=37817,VI=37818,QI=37819,zI=37820,qI=37821,Tx=36492,GI=36494,WI=36495,bH=36283,jI=36284,$I=36285,XI=36286;var Fx=2300,KI=2301,VF=2302,Y7=2400,Z7=2401,J7=2402;var _fe=3200,bfe=3201;var z3=0,vfe=1,Pu="",Ds="srgb",Qu="srgb-linear",q3="display-p3",cw="display-p3-linear",Ix="linear",sr="srgb",Dx="rec709",kx="p3";var Op=7680;var e9=519,yfe=512,xfe=513,wfe=514,vH=515,Cfe=516,Mfe=517,Sfe=518,Efe=519,YI=35044;var t9="300 es",Md=2e3,Px=2001,Ed=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,a=r.length;o<a;o++)r[o].call(this,t);t.target=null}}},ia=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],i9=1234567,k_=Math.PI/180,U_=180/Math.PI;function oc(){let i=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(ia[i&255]+ia[i>>8&255]+ia[i>>16&255]+ia[i>>24&255]+"-"+ia[t&255]+ia[t>>8&255]+"-"+ia[t>>16&15|64]+ia[t>>24&255]+"-"+ia[e&63|128]+ia[e>>8&255]+"-"+ia[e>>16&255]+ia[e>>24&255]+ia[n&255]+ia[n>>8&255]+ia[n>>16&255]+ia[n>>24&255]).toLowerCase()}function xo(i,t,e){return Math.max(t,Math.min(e,i))}function G3(i,t){return(i%t+t)%t}function Tfe(i,t,e,n,r){return n+(i-t)*(r-n)/(e-t)}function Bfe(i,t,e){return i!==t?(e-i)/(t-i):0}function P_(i,t,e){return(1-e)*i+e*t}function Ffe(i,t,e,n){return P_(i,t,1-Math.exp(-e*n))}function Ife(i,t=1){return t-Math.abs(G3(i,t*2)-t)}function Dfe(i,t,e){return i<=t?0:i>=e?1:(i=(i-t)/(e-t),i*i*(3-2*i))}function kfe(i,t,e){return i<=t?0:i>=e?1:(i=(i-t)/(e-t),i*i*i*(i*(i*6-15)+10))}function Pfe(i,t){return i+Math.floor(Math.random()*(t-i+1))}function Rfe(i,t){return i+Math.random()*(t-i)}function Ofe(i){return i*(.5-Math.random())}function Lfe(i){i!==void 0&&(i9=i);let t=i9+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function Nfe(i){return i*k_}function Ufe(i){return i*U_}function Hfe(i){return(i&i-1)===0&&i!==0}function Vfe(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function Qfe(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function zfe(i,t,e,n,r){let o=Math.cos,a=Math.sin,s=o(e/2),l=a(e/2),c=o((t+n)/2),d=a((t+n)/2),h=o((t-n)/2),u=a((t-n)/2),f=o((n-t)/2),_=a((n-t)/2);switch(r){case"XYX":i.set(s*d,l*h,l*u,s*c);break;case"YZY":i.set(l*u,s*d,l*h,s*c);break;case"ZXZ":i.set(l*h,l*u,s*d,s*c);break;case"XZX":i.set(s*d,l*_,l*f,s*c);break;case"YXY":i.set(l*f,s*d,l*_,s*c);break;case"ZYZ":i.set(l*_,l*f,s*d,s*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function _l(i,t){switch(t.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function Hn(i,t){switch(t.constructor){case Float32Array:return i;case Uint32Array:return Math.round(i*4294967295);case Uint16Array:return Math.round(i*65535);case Uint8Array:return Math.round(i*255);case Int32Array:return Math.round(i*2147483647);case Int16Array:return Math.round(i*32767);case Int8Array:return Math.round(i*127);default:throw new Error("Invalid component type.")}}var yH={DEG2RAD:k_,RAD2DEG:U_,generateUUID:oc,clamp:xo,euclideanModulo:G3,mapLinear:Tfe,inverseLerp:Bfe,lerp:P_,damp:Ffe,pingpong:Ife,smoothstep:Dfe,smootherstep:kfe,randInt:Pfe,randFloat:Rfe,randFloatSpread:Ofe,seededRandom:Lfe,degToRad:Nfe,radToDeg:Ufe,isPowerOfTwo:Hfe,ceilPowerOfTwo:Vfe,floorPowerOfTwo:Qfe,setQuaternionFromProperEuler:zfe,normalize:Hn,denormalize:_l},qe=class i{constructor(t=0,e=0){i.prototype.isVector2=!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){return 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){return 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=Math.trunc(this.x),this.y=Math.trunc(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}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(xo(n,-1,1))}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){return 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,a=this.y-t.y;return this.x=o*n-a*r+t.x,this.y=o*r+a*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},Bi=class i{constructor(t,e,n,r,o,a,s,l,c){i.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,e,n,r,o,a,s,l,c)}set(t,e,n,r,o,a,s,l,c){let d=this.elements;return d[0]=t,d[1]=r,d[2]=s,d[3]=e,d[4]=o,d[5]=l,d[6]=n,d[7]=a,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,a=n[0],s=n[3],l=n[6],c=n[1],d=n[4],h=n[7],u=n[2],f=n[5],_=n[8],y=r[0],b=r[3],v=r[6],M=r[1],x=r[4],w=r[7],k=r[2],P=r[5],D=r[8];return o[0]=a*y+s*M+l*k,o[3]=a*b+s*x+l*P,o[6]=a*v+s*w+l*D,o[1]=c*y+d*M+h*k,o[4]=c*b+d*x+h*P,o[7]=c*v+d*w+h*D,o[2]=u*y+f*M+_*k,o[5]=u*b+f*x+_*P,o[8]=u*v+f*w+_*D,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],a=t[4],s=t[5],l=t[6],c=t[7],d=t[8];return e*a*d-e*s*c-n*o*d+n*s*l+r*o*c-r*a*l}invert(){let t=this.elements,e=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],d=t[8],h=d*a-s*c,u=s*l-d*o,f=c*o-a*l,_=e*h+n*u+r*f;if(_===0)return this.set(0,0,0,0,0,0,0,0,0);let y=1/_;return t[0]=h*y,t[1]=(r*c-d*n)*y,t[2]=(s*n-r*a)*y,t[3]=u*y,t[4]=(d*e-r*l)*y,t[5]=(r*o-s*e)*y,t[6]=f*y,t[7]=(n*l-c*e)*y,t[8]=(a*e-n*o)*y,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,a,s){let l=Math.cos(o),c=Math.sin(o);return this.set(n*l,n*c,-n*(l*a+c*s)+a+t,-r*c,r*l,-r*(-c*a+l*s)+s+e,0,0,1),this}scale(t,e){return this.premultiply(QF.makeScale(t,e)),this}rotate(t){return this.premultiply(QF.makeRotation(-t)),this}translate(t,e){return this.premultiply(QF.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),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)}},QF=new Bi;function xH(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function Rx(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function qfe(){let i=Rx("canvas");return i.style.display="block",i}var n9={};function sA(i){i in n9||(n9[i]=!0,console.warn(i))}function Gfe(i,t,e){return new Promise(function(n,r){function o(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(o,e);break;default:n()}}setTimeout(o,e)})}var r9=new Bi().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),o9=new Bi().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),w_={[Qu]:{transfer:Ix,primaries:Dx,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[Ds]:{transfer:sr,primaries:Dx,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[cw]:{transfer:Ix,primaries:kx,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(o9),fromReference:i=>i.applyMatrix3(r9)},[q3]:{transfer:sr,primaries:kx,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(o9),fromReference:i=>i.applyMatrix3(r9).convertLinearToSRGB()}},Wfe=new Set([Qu,cw]),On={enabled:!0,_workingColorSpace:Qu,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!Wfe.has(i))throw new Error(`Unsupported working color space, "${i}".`);this._workingColorSpace=i},convert:function(i,t,e){if(this.enabled===!1||t===e||!t||!e)return i;let n=w_[t].toReference,r=w_[e].fromReference;return r(n(i))},fromWorkingColorSpace:function(i,t){return this.convert(i,this._workingColorSpace,t)},toWorkingColorSpace:function(i,t){return this.convert(i,t,this._workingColorSpace)},getPrimaries:function(i){return w_[i].primaries},getTransfer:function(i){return i===Pu?Ix:w_[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(w_[t].luminanceCoefficients)}};function lA(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function zF(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}var Lp,ZI=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{Lp===void 0&&(Lp=Rx("canvas")),Lp.width=t.width,Lp.height=t.height;let n=Lp.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=Lp}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")}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){let e=Rx("canvas");e.width=t.width,e.height=t.height;let n=e.getContext("2d");n.drawImage(t,0,0,t.width,t.height);let r=n.getImageData(0,0,t.width,t.height),o=r.data;for(let a=0;a<o.length;a++)o[a]=lA(o[a]/255)*255;return n.putImageData(r,0,0),e}else if(t.data){let e=t.data.slice(0);for(let n=0;n<e.length;n++)e instanceof Uint8Array||e instanceof Uint8ClampedArray?e[n]=Math.floor(lA(e[n]/255)*255):e[n]=lA(e[n]);return{data:e,width:t.width,height:t.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}},jfe=0,Ox=class{constructor(t=null){this.isSource=!0,Object.defineProperty(this,"id",{value:jfe++}),this.uuid=oc(),this.data=t,this.dataReady=!0,this.version=0}set needsUpdate(t){t===!0&&this.version++}toJSON(t){let e=t===void 0||typeof t=="string";if(!e&&t.images[this.uuid]!==void 0)return t.images[this.uuid];let n={uuid:this.uuid,url:""},r=this.data;if(r!==null){let o;if(Array.isArray(r)){o=[];for(let a=0,s=r.length;a<s;a++)r[a].isDataTexture?o.push(qF(r[a].image)):o.push(qF(r[a]))}else o=qF(r);n.url=o}return e||(t.images[this.uuid]=n),n}};function qF(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?ZI.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}var $fe=0,uc=(()=>{class i extends Ed{constructor(e=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Xf,o=Xf,a=as,s=Kf,l=ss,c=Sd,d=i.DEFAULT_ANISOTROPY,h=Pu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:$fe++}),this.uuid=oc(),this.name="",this.source=new Ox(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=o,this.magFilter=a,this.minFilter=s,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new qe(0,0),this.repeat=new qe(1,1),this.center=new qe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Bi,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=h,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.pmremVersion=0}get image(){return this.source.data}set image(e=null){this.source.data=e}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.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,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.colorSpace=e.colorSpace,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){let n=e===void 0||typeof e=="string";if(!n&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];let r={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(r.userData=this.userData),n||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==K7)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case hA:e.x=e.x-Math.floor(e.x);break;case Xf:e.x=e.x<0?0:1;break;case wI: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 hA:e.y=e.y-Math.floor(e.y);break;case Xf:e.y=e.y<0?0:1;break;case wI: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++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}return i.DEFAULT_IMAGE=null,i.DEFAULT_MAPPING=K7,i.DEFAULT_ANISOTROPY=1,i})(),ro=class i{constructor(t=0,e=0,n=0,r=1){i.prototype.isVector4=!0,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){return 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){return 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,a=t.elements;return this.x=a[0]*e+a[4]*n+a[8]*r+a[12]*o,this.y=a[1]*e+a[5]*n+a[9]*r+a[13]*o,this.z=a[2]*e+a[6]*n+a[10]*r+a[14]*o,this.w=a[3]*e+a[7]*n+a[11]*r+a[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],h=l[8],u=l[1],f=l[5],_=l[9],y=l[2],b=l[6],v=l[10];if(Math.abs(d-u)<.01&&Math.abs(h-y)<.01&&Math.abs(_-b)<.01){if(Math.abs(d+u)<.1&&Math.abs(h+y)<.1&&Math.abs(_+b)<.1&&Math.abs(c+f+v-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;let x=(c+1)/2,w=(f+1)/2,k=(v+1)/2,P=(d+u)/4,D=(h+y)/4,O=(_+b)/4;return x>w&&x>k?x<.01?(n=0,r=.707106781,o=.707106781):(n=Math.sqrt(x),r=P/n,o=D/n):w>k?w<.01?(n=.707106781,r=0,o=.707106781):(r=Math.sqrt(w),n=P/r,o=O/r):k<.01?(n=.707106781,r=.707106781,o=0):(o=Math.sqrt(k),n=D/o,r=O/o),this.set(n,r,o,e),this}let M=Math.sqrt((b-_)*(b-_)+(h-y)*(h-y)+(u-d)*(u-d));return Math.abs(M)<.001&&(M=1),this.x=(b-_)/M,this.y=(h-y)/M,this.z=(u-d)/M,this.w=Math.acos((c+f+v-1)/2),this}setFromMatrixPosition(t){let e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(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){return 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}},JI=class extends Ed{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new ro(0,0,t,e),this.scissorTest=!1,this.viewport=new ro(0,0,t,e);let r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:as,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);let o=new uc(r,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace);o.flipY=!1,o.generateMipmaps=n.generateMipmaps,o.internalFormat=n.internalFormat,this.textures=[];let a=n.count;for(let s=0;s<a;s++)this.textures[s]=o.clone(),this.textures[s].isRenderTargetTexture=!0;this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this.depthTexture=n.depthTexture,this.samples=n.samples}get texture(){return this.textures[0]}set texture(t){this.textures[0]=t}setSize(t,e,n=1){if(this.width!==t||this.height!==e||this.depth!==n){this.width=t,this.height=e,this.depth=n;for(let r=0,o=this.textures.length;r<o;r++)this.textures[r].image.width=t,this.textures[r].image.height=e,this.textures[r].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){this.width=t.width,this.height=t.height,this.depth=t.depth,this.scissor.copy(t.scissor),this.scissorTest=t.scissorTest,this.viewport.copy(t.viewport),this.textures.length=0;for(let n=0,r=t.textures.length;n<r;n++)this.textures[n]=t.textures[n].clone(),this.textures[n].isRenderTargetTexture=!0;let e=Object.assign({},t.texture.image);return this.texture.source=new Ox(e),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.resolveDepthBuffer=t.resolveDepthBuffer,this.resolveStencilBuffer=t.resolveStencilBuffer,t.depthTexture!==null&&(this.depthTexture=t.depthTexture.clone()),this.samples=t.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},ls=class extends JI{constructor(t=1,e=1,n={}){super(t,e,n),this.isWebGLRenderTarget=!0}},Lx=class extends uc{constructor(t=null,e=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:t,width:e,height:n,depth:r},this.magFilter=ks,this.minFilter=ks,this.wrapR=Xf,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(t){this.layerUpdates.add(t)}clearLayerUpdates(){this.layerUpdates.clear()}};var e3=class extends uc{constructor(t=null,e=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:e,height:n,depth:r},this.magFilter=ks,this.minFilter=ks,this.wrapR=Xf,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var bl=class{constructor(t=0,e=0,n=0,r=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=n,this._w=r}static slerpFlat(t,e,n,r,o,a,s){let l=n[r+0],c=n[r+1],d=n[r+2],h=n[r+3],u=o[a+0],f=o[a+1],_=o[a+2],y=o[a+3];if(s===0){t[e+0]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h;return}if(s===1){t[e+0]=u,t[e+1]=f,t[e+2]=_,t[e+3]=y;return}if(h!==y||l!==u||c!==f||d!==_){let b=1-s,v=l*u+c*f+d*_+h*y,M=v>=0?1:-1,x=1-v*v;if(x>Number.EPSILON){let k=Math.sqrt(x),P=Math.atan2(k,v*M);b=Math.sin(b*P)/k,s=Math.sin(s*P)/k}let w=s*M;if(l=l*b+u*w,c=c*b+f*w,d=d*b+_*w,h=h*b+y*w,b===1-s){let k=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=k,c*=k,d*=k,h*=k}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,o,a){let s=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=o[a],u=o[a+1],f=o[a+2],_=o[a+3];return t[e]=s*_+d*h+l*f-c*u,t[e+1]=l*_+d*u+c*h-s*f,t[e+2]=c*_+d*f+s*u-l*h,t[e+3]=d*_-s*h-l*u-c*f,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=!0){let n=t._x,r=t._y,o=t._z,a=t._order,s=Math.cos,l=Math.sin,c=s(n/2),d=s(r/2),h=s(o/2),u=l(n/2),f=l(r/2),_=l(o/2);switch(a){case"XYZ":this._x=u*d*h+c*f*_,this._y=c*f*h-u*d*_,this._z=c*d*_+u*f*h,this._w=c*d*h-u*f*_;break;case"YXZ":this._x=u*d*h+c*f*_,this._y=c*f*h-u*d*_,this._z=c*d*_-u*f*h,this._w=c*d*h+u*f*_;break;case"ZXY":this._x=u*d*h-c*f*_,this._y=c*f*h+u*d*_,this._z=c*d*_+u*f*h,this._w=c*d*h-u*f*_;break;case"ZYX":this._x=u*d*h-c*f*_,this._y=c*f*h+u*d*_,this._z=c*d*_-u*f*h,this._w=c*d*h+u*f*_;break;case"YZX":this._x=u*d*h+c*f*_,this._y=c*f*h+u*d*_,this._z=c*d*_-u*f*h,this._w=c*d*h-u*f*_;break;case"XZY":this._x=u*d*h-c*f*_,this._y=c*f*h-u*d*_,this._z=c*d*_+u*f*h,this._w=c*d*h+u*f*_;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return e===!0&&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],a=e[1],s=e[5],l=e[9],c=e[2],d=e[6],h=e[10],u=n+s+h;if(u>0){let f=.5/Math.sqrt(u+1);this._w=.25/f,this._x=(d-l)*f,this._y=(o-c)*f,this._z=(a-r)*f}else if(n>s&&n>h){let f=2*Math.sqrt(1+n-s-h);this._w=(d-l)/f,this._x=.25*f,this._y=(r+a)/f,this._z=(o+c)/f}else if(s>h){let f=2*Math.sqrt(1+s-n-h);this._w=(o-c)/f,this._x=(r+a)/f,this._y=.25*f,this._z=(l+d)/f}else{let f=2*Math.sqrt(1+h-n-s);this._w=(a-r)/f,this._x=(o+c)/f,this._y=(l+d)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.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(xo(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){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){let n=t._x,r=t._y,o=t._z,a=t._w,s=e._x,l=e._y,c=e._z,d=e._w;return this._x=n*d+a*s+r*c-o*l,this._y=r*d+a*l+o*s-n*c,this._z=o*d+a*c+n*l-r*s,this._w=a*d-n*s-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,a=this._w,s=a*t._w+n*t._x+r*t._y+o*t._z;if(s<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,s=-s):this.copy(t),s>=1)return this._w=a,this._x=n,this._y=r,this._z=o,this;let l=1-s*s;if(l<=Number.EPSILON){let f=1-e;return this._w=f*a+e*this._w,this._x=f*n+e*this._x,this._y=f*r+e*this._y,this._z=f*o+e*this._z,this.normalize(),this}let c=Math.sqrt(l),d=Math.atan2(c,s),h=Math.sin((1-e)*d)/c,u=Math.sin(e*d)/c;return this._w=a*h+this._w*u,this._x=n*h+this._x*u,this._y=r*h+this._y*u,this._z=o*h+this._z*u,this._onChangeCallback(),this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){let t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),o=Math.sqrt(n);return this.set(r*Math.sin(t),r*Math.cos(t),o*Math.sin(e),o*Math.cos(e))}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._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},ce=class i{constructor(t=0,e=0,n=0){i.prototype.isVector3=!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){return 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){return 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){return 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 this.applyQuaternion(a9.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(a9.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,a=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])*a,this.y=(o[1]*e+o[5]*n+o[9]*r+o[13])*a,this.z=(o[2]*e+o[6]*n+o[10]*r+o[14])*a,this}applyQuaternion(t){let e=this.x,n=this.y,r=this.z,o=t.x,a=t.y,s=t.z,l=t.w,c=2*(a*r-s*n),d=2*(s*e-o*r),h=2*(o*n-a*e);return this.x=e+l*c+a*h-s*d,this.y=n+l*d+s*c-o*h,this.z=r+l*h+o*d-a*c,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=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(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){return this.crossVectors(this,t)}crossVectors(t,e){let n=t.x,r=t.y,o=t.z,a=e.x,s=e.y,l=e.z;return this.x=r*l-o*s,this.y=o*a-n*l,this.z=n*s-r*a,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 GF.copy(this).projectOnVector(t),this.sub(GF)}reflect(t){return this.sub(GF.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(xo(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)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}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){return 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()*Math.PI*2,e=Math.random()*2-1,n=Math.sqrt(1-e*e);return this.x=n*Math.cos(t),this.y=e,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},GF=new ce,a9=new bl,Lo=class{constructor(t=new ce(1/0,1/0,1/0),e=new ce(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e+=3)this.expandByPoint(ml.fromArray(t,e));return this}setFromBufferAttribute(t){this.makeEmpty();for(let e=0,n=t.count;e<n;e++)this.expandByPoint(ml.fromBufferAttribute(t,e));return this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){let n=ml.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}setFromObject(t,e=!1){return this.makeEmpty(),this.expandByObject(t,e)}clone(){return new this.constructor().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t,e=!1){t.updateWorldMatrix(!1,!1);let n=t.geometry;if(n!==void 0){let o=n.getAttribute("position");if(e===!0&&o!==void 0&&t.isInstancedMesh!==!0)for(let a=0,s=o.count;a<s;a++)t.isMesh===!0?t.getVertexPosition(a,ml):ml.fromBufferAttribute(o,a),ml.applyMatrix4(t.matrixWorld),this.expandByPoint(ml);else t.boundingBox!==void 0?(t.boundingBox===null&&t.computeBoundingBox(),W1.copy(t.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),W1.copy(n.boundingBox)),W1.applyMatrix4(t.matrixWorld),this.union(W1)}let r=t.children;for(let o=0,a=r.length;o<a;o++)this.expandByObject(r[o],e);return this}containsPoint(t){return t.x>=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,ml),ml.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(C_),j1.subVectors(this.max,C_),Np.subVectors(t.a,C_),Up.subVectors(t.b,C_),Hp.subVectors(t.c,C_),Tu.subVectors(Up,Np),Bu.subVectors(Hp,Up),Hf.subVectors(Np,Hp);let e=[0,-Tu.z,Tu.y,0,-Bu.z,Bu.y,0,-Hf.z,Hf.y,Tu.z,0,-Tu.x,Bu.z,0,-Bu.x,Hf.z,0,-Hf.x,-Tu.y,Tu.x,0,-Bu.y,Bu.x,0,-Hf.y,Hf.x,0];return!WF(e,Np,Up,Hp,j1)||(e=[1,0,0,0,1,0,0,0,1],!WF(e,Np,Up,Hp,j1))?!1:($1.crossVectors(Tu,Bu),e=[$1.x,$1.y,$1.z],WF(e,Np,Up,Hp,j1))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,ml).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=this.getSize(ml).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:(Ad[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Ad[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Ad[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Ad[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Ad[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Ad[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Ad[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Ad[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Ad),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)}},Ad=[new ce,new ce,new ce,new ce,new ce,new ce,new ce,new ce],ml=new ce,W1=new Lo,Np=new ce,Up=new ce,Hp=new ce,Tu=new ce,Bu=new ce,Hf=new ce,C_=new ce,j1=new ce,$1=new ce,Vf=new ce;function WF(i,t,e,n,r){for(let o=0,a=i.length-3;o<=a;o+=3){Vf.fromArray(i,o);let s=r.x*Math.abs(Vf.x)+r.y*Math.abs(Vf.y)+r.z*Math.abs(Vf.z),l=t.dot(Vf),c=e.dot(Vf),d=n.dot(Vf);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>s)return!1}return!0}var Xfe=new Lo,M_=new ce,jF=new ce,sc=class{constructor(t=new ce,e=-1){this.isSphere=!0,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):Xfe.setFromPoints(t).getCenter(n);let r=0;for(let o=0,a=t.length;o<a;o++)r=Math.max(r,n.distanceToSquared(t[o]));return this.radius=Math.sqrt(r),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){let e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,e){let n=this.center.distanceToSquared(t);return e.copy(t),n>this.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){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;M_.subVectors(t,this.center);let e=M_.lengthSq();if(e>this.radius*this.radius){let n=Math.sqrt(e),r=(n-this.radius)*.5;this.center.addScaledVector(M_,r/n),this.radius+=r}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(jF.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(M_.copy(t.center).add(jF)),this.expandByPoint(M_.copy(t.center).sub(jF))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}},gd=new ce,$F=new ce,X1=new ce,Fu=new ce,XF=new ce,K1=new ce,KF=new ce,Td=class{constructor(t=new ce,e=new ce(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.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,gd)),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.origin).addScaledVector(this.direction,n)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){let e=gd.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(gd.copy(this.origin).addScaledVector(this.direction,e),gd.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){$F.copy(t).add(e).multiplyScalar(.5),X1.copy(e).sub(t).normalize(),Fu.copy(this.origin).sub($F);let o=t.distanceTo(e)*.5,a=-this.direction.dot(X1),s=Fu.dot(this.direction),l=-Fu.dot(X1),c=Fu.lengthSq(),d=Math.abs(1-a*a),h,u,f,_;if(d>0)if(h=a*l-s,u=a*s-l,_=o*d,h>=0)if(u>=-_)if(u<=_){let y=1/d;h*=y,u*=y,f=h*(h+a*u+2*s)+u*(a*h+u+2*l)+c}else u=o,h=Math.max(0,-(a*u+s)),f=-h*h+u*(u+2*l)+c;else u=-o,h=Math.max(0,-(a*u+s)),f=-h*h+u*(u+2*l)+c;else u<=-_?(h=Math.max(0,-(-a*o+s)),u=h>0?-o:Math.min(Math.max(-o,-l),o),f=-h*h+u*(u+2*l)+c):u<=_?(h=0,u=Math.min(Math.max(-o,-l),o),f=u*(u+2*l)+c):(h=Math.max(0,-(a*o+s)),u=h>0?o:Math.min(Math.max(-o,-l),o),f=-h*h+u*(u+2*l)+c);else u=a>0?-o:o,h=Math.max(0,-(a*u+s)),f=-h*h+u*(u+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,h),r&&r.copy($F).addScaledVector(X1,u),f}intersectSphere(t,e){gd.subVectors(t.center,this.origin);let n=gd.dot(this.direction),r=gd.dot(gd)-n*n,o=t.radius*t.radius;if(r>o)return null;let a=Math.sqrt(o-r),s=n-a,l=n+a;return l<0?null:s<0?this.at(l,e):this.at(s,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,a,s,l,c=1/this.direction.x,d=1/this.direction.y,h=1/this.direction.z,u=this.origin;return c>=0?(n=(t.min.x-u.x)*c,r=(t.max.x-u.x)*c):(n=(t.max.x-u.x)*c,r=(t.min.x-u.x)*c),d>=0?(o=(t.min.y-u.y)*d,a=(t.max.y-u.y)*d):(o=(t.max.y-u.y)*d,a=(t.min.y-u.y)*d),n>a||o>r||((o>n||isNaN(n))&&(n=o),(a<r||isNaN(r))&&(r=a),h>=0?(s=(t.min.z-u.z)*h,l=(t.max.z-u.z)*h):(s=(t.max.z-u.z)*h,l=(t.min.z-u.z)*h),n>l||s>r)||((s>n||n!==n)&&(n=s),(l<r||r!==r)&&(r=l),r<0)?null:this.at(n>=0?n:r,e)}intersectsBox(t){return this.intersectBox(t,gd)!==null}intersectTriangle(t,e,n,r,o){XF.subVectors(e,t),K1.subVectors(n,t),KF.crossVectors(XF,K1);let a=this.direction.dot(KF),s;if(a>0){if(r)return null;s=1}else if(a<0)s=-1,a=-a;else return null;Fu.subVectors(this.origin,t);let l=s*this.direction.dot(K1.crossVectors(Fu,K1));if(l<0)return null;let c=s*this.direction.dot(XF.cross(Fu));if(c<0||l+c>a)return null;let d=-s*Fu.dot(KF);return d<0?null:this.at(d/a,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)}},gr=class i{constructor(t,e,n,r,o,a,s,l,c,d,h,u,f,_,y,b){i.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,e,n,r,o,a,s,l,c,d,h,u,f,_,y,b)}set(t,e,n,r,o,a,s,l,c,d,h,u,f,_,y,b){let v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=r,v[1]=o,v[5]=a,v[9]=s,v[13]=l,v[2]=c,v[6]=d,v[10]=h,v[14]=u,v[3]=f,v[7]=_,v[11]=y,v[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/Vp.setFromMatrixColumn(t,0).length(),o=1/Vp.setFromMatrixColumn(t,1).length(),a=1/Vp.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]*a,e[9]=n[9]*a,e[10]=n[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){let e=this.elements,n=t.x,r=t.y,o=t.z,a=Math.cos(n),s=Math.sin(n),l=Math.cos(r),c=Math.sin(r),d=Math.cos(o),h=Math.sin(o);if(t.order==="XYZ"){let u=a*d,f=a*h,_=s*d,y=s*h;e[0]=l*d,e[4]=-l*h,e[8]=c,e[1]=f+_*c,e[5]=u-y*c,e[9]=-s*l,e[2]=y-u*c,e[6]=_+f*c,e[10]=a*l}else if(t.order==="YXZ"){let u=l*d,f=l*h,_=c*d,y=c*h;e[0]=u+y*s,e[4]=_*s-f,e[8]=a*c,e[1]=a*h,e[5]=a*d,e[9]=-s,e[2]=f*s-_,e[6]=y+u*s,e[10]=a*l}else if(t.order==="ZXY"){let u=l*d,f=l*h,_=c*d,y=c*h;e[0]=u-y*s,e[4]=-a*h,e[8]=_+f*s,e[1]=f+_*s,e[5]=a*d,e[9]=y-u*s,e[2]=-a*c,e[6]=s,e[10]=a*l}else if(t.order==="ZYX"){let u=a*d,f=a*h,_=s*d,y=s*h;e[0]=l*d,e[4]=_*c-f,e[8]=u*c+y,e[1]=l*h,e[5]=y*c+u,e[9]=f*c-_,e[2]=-c,e[6]=s*l,e[10]=a*l}else if(t.order==="YZX"){let u=a*l,f=a*c,_=s*l,y=s*c;e[0]=l*d,e[4]=y-u*h,e[8]=_*h+f,e[1]=h,e[5]=a*d,e[9]=-s*d,e[2]=-c*d,e[6]=f*h+_,e[10]=u-y*h}else if(t.order==="XZY"){let u=a*l,f=a*c,_=s*l,y=s*c;e[0]=l*d,e[4]=-h,e[8]=c*d,e[1]=u*h+y,e[5]=a*d,e[9]=f*h-_,e[2]=_*h-f,e[6]=s*d,e[10]=y*h+u}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(Kfe,t,Yfe)}lookAt(t,e,n){let r=this.elements;return rs.subVectors(t,e),rs.lengthSq()===0&&(rs.z=1),rs.normalize(),Iu.crossVectors(n,rs),Iu.lengthSq()===0&&(Math.abs(n.z)===1?rs.x+=1e-4:rs.z+=1e-4,rs.normalize(),Iu.crossVectors(n,rs)),Iu.normalize(),Y1.crossVectors(rs,Iu),r[0]=Iu.x,r[4]=Y1.x,r[8]=rs.x,r[1]=Iu.y,r[5]=Y1.y,r[9]=rs.y,r[2]=Iu.z,r[6]=Y1.z,r[10]=rs.z,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,a=n[0],s=n[4],l=n[8],c=n[12],d=n[1],h=n[5],u=n[9],f=n[13],_=n[2],y=n[6],b=n[10],v=n[14],M=n[3],x=n[7],w=n[11],k=n[15],P=r[0],D=r[4],O=r[8],T=r[12],B=r[1],L=r[5],G=r[9],W=r[13],oe=r[2],pe=r[6],ge=r[10],de=r[14],U=r[3],ee=r[7],De=r[11],We=r[15];return o[0]=a*P+s*B+l*oe+c*U,o[4]=a*D+s*L+l*pe+c*ee,o[8]=a*O+s*G+l*ge+c*De,o[12]=a*T+s*W+l*de+c*We,o[1]=d*P+h*B+u*oe+f*U,o[5]=d*D+h*L+u*pe+f*ee,o[9]=d*O+h*G+u*ge+f*De,o[13]=d*T+h*W+u*de+f*We,o[2]=_*P+y*B+b*oe+v*U,o[6]=_*D+y*L+b*pe+v*ee,o[10]=_*O+y*G+b*ge+v*De,o[14]=_*T+y*W+b*de+v*We,o[3]=M*P+x*B+w*oe+k*U,o[7]=M*D+x*L+w*pe+k*ee,o[11]=M*O+x*G+w*ge+k*De,o[15]=M*T+x*W+w*de+k*We,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],a=t[1],s=t[5],l=t[9],c=t[13],d=t[2],h=t[6],u=t[10],f=t[14],_=t[3],y=t[7],b=t[11],v=t[15];return _*(+o*l*h-r*c*h-o*s*u+n*c*u+r*s*f-n*l*f)+y*(+e*l*f-e*c*u+o*a*u-r*a*f+r*c*d-o*l*d)+b*(+e*c*h-e*s*f-o*a*h+n*a*f+o*s*d-n*c*d)+v*(-r*s*d-e*l*h+e*s*u+r*a*h-n*a*u+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],a=t[4],s=t[5],l=t[6],c=t[7],d=t[8],h=t[9],u=t[10],f=t[11],_=t[12],y=t[13],b=t[14],v=t[15],M=h*b*c-y*u*c+y*l*f-s*b*f-h*l*v+s*u*v,x=_*u*c-d*b*c-_*l*f+a*b*f+d*l*v-a*u*v,w=d*y*c-_*h*c+_*s*f-a*y*f-d*s*v+a*h*v,k=_*h*l-d*y*l-_*s*u+a*y*u+d*s*b-a*h*b,P=e*M+n*x+r*w+o*k;if(P===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let D=1/P;return t[0]=M*D,t[1]=(y*u*o-h*b*o-y*r*f+n*b*f+h*r*v-n*u*v)*D,t[2]=(s*b*o-y*l*o+y*r*c-n*b*c-s*r*v+n*l*v)*D,t[3]=(h*l*o-s*u*o-h*r*c+n*u*c+s*r*f-n*l*f)*D,t[4]=x*D,t[5]=(d*b*o-_*u*o+_*r*f-e*b*f-d*r*v+e*u*v)*D,t[6]=(_*l*o-a*b*o-_*r*c+e*b*c+a*r*v-e*l*v)*D,t[7]=(a*u*o-d*l*o+d*r*c-e*u*c-a*r*f+e*l*f)*D,t[8]=w*D,t[9]=(_*h*o-d*y*o-_*n*f+e*y*f+d*n*v-e*h*v)*D,t[10]=(a*y*o-_*s*o+_*n*c-e*y*c-a*n*v+e*s*v)*D,t[11]=(d*s*o-a*h*o-d*n*c+e*h*c+a*n*f-e*s*f)*D,t[12]=k*D,t[13]=(d*y*r-_*h*r+_*n*u-e*y*u-d*n*b+e*h*b)*D,t[14]=(_*s*r-a*y*r-_*n*l+e*y*l+a*n*b-e*s*b)*D,t[15]=(a*h*r-d*s*r+d*n*l-e*h*l-a*n*u+e*s*u)*D,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 t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):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,a=t.x,s=t.y,l=t.z,c=o*a,d=o*s;return this.set(c*a+n,c*s-r*l,c*l+r*s,0,c*s+r*l,d*s+n,d*l-r*a,0,c*l-r*s,d*l+r*a,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,a){return this.set(1,n,o,0,t,1,a,0,e,r,1,0,0,0,0,1),this}compose(t,e,n){let r=this.elements,o=e._x,a=e._y,s=e._z,l=e._w,c=o+o,d=a+a,h=s+s,u=o*c,f=o*d,_=o*h,y=a*d,b=a*h,v=s*h,M=l*c,x=l*d,w=l*h,k=n.x,P=n.y,D=n.z;return r[0]=(1-(y+v))*k,r[1]=(f+w)*k,r[2]=(_-x)*k,r[3]=0,r[4]=(f-w)*P,r[5]=(1-(u+v))*P,r[6]=(b+M)*P,r[7]=0,r[8]=(_+x)*D,r[9]=(b-M)*D,r[10]=(1-(u+y))*D,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=Vp.set(r[0],r[1],r[2]).length(),a=Vp.set(r[4],r[5],r[6]).length(),s=Vp.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],pl.copy(this);let c=1/o,d=1/a,h=1/s;return pl.elements[0]*=c,pl.elements[1]*=c,pl.elements[2]*=c,pl.elements[4]*=d,pl.elements[5]*=d,pl.elements[6]*=d,pl.elements[8]*=h,pl.elements[9]*=h,pl.elements[10]*=h,e.setFromRotationMatrix(pl),n.x=o,n.y=a,n.z=s,this}makePerspective(t,e,n,r,o,a,s=Md){let l=this.elements,c=2*o/(e-t),d=2*o/(n-r),h=(e+t)/(e-t),u=(n+r)/(n-r),f,_;if(s===Md)f=-(a+o)/(a-o),_=-2*a*o/(a-o);else if(s===Px)f=-a/(a-o),_=-a*o/(a-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);return l[0]=c,l[4]=0,l[8]=h,l[12]=0,l[1]=0,l[5]=d,l[9]=u,l[13]=0,l[2]=0,l[6]=0,l[10]=f,l[14]=_,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(t,e,n,r,o,a,s=Md){let l=this.elements,c=1/(e-t),d=1/(n-r),h=1/(a-o),u=(e+t)*c,f=(n+r)*d,_,y;if(s===Md)_=(a+o)*h,y=-2*h;else if(s===Px)_=o*h,y=-1*h;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-u,l[1]=0,l[5]=2*d,l[9]=0,l[13]=-f,l[2]=0,l[6]=0,l[10]=y,l[14]=-_,l[3]=0,l[7]=0,l[11]=0,l[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}},Vp=new ce,pl=new gr,Kfe=new ce(0,0,0),Yfe=new ce(1,1,1),Iu=new ce,Y1=new ce,rs=new ce,s9=new gr,l9=new bl,Jf=(()=>{class i{constructor(e=0,n=0,r=0,o=i.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=r,this._order=o}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,n,r,o=this._order){return this._x=e,this._y=n,this._z=r,this._order=o,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,n=this._order,r=!0){let o=e.elements,a=o[0],s=o[4],l=o[8],c=o[1],d=o[5],h=o[9],u=o[2],f=o[6],_=o[10];switch(n){case"XYZ":this._y=Math.asin(xo(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,_),this._z=Math.atan2(-s,a)):(this._x=Math.atan2(f,d),this._z=0);break;case"YXZ":this._x=Math.asin(-xo(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,_),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-u,a),this._z=0);break;case"ZXY":this._x=Math.asin(xo(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-u,_),this._z=Math.atan2(-s,d)):(this._y=0,this._z=Math.atan2(c,a));break;case"ZYX":this._y=Math.asin(-xo(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(f,_),this._z=Math.atan2(c,a)):(this._x=0,this._z=Math.atan2(-s,d));break;case"YZX":this._z=Math.asin(xo(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),this._y=Math.atan2(-u,a)):(this._x=0,this._y=Math.atan2(l,_));break;case"XZY":this._z=Math.asin(-xo(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(f,d),this._y=Math.atan2(l,a)):(this._x=Math.atan2(-h,_),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,r){return s9.makeRotationFromQuaternion(e),this.setFromRotationMatrix(s9,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return l9.setFromEuler(this),this.setFromQuaternion(l9,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=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}return i.DEFAULT_ORDER="XYZ",i})(),H_=class{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return(this.mask&t.mask)!==0}isEnabled(t){return(this.mask&(1<<t|0))!==0}},Zfe=0,c9=new ce,Qp=new bl,_d=new gr,Z1=new ce,S_=new ce,Jfe=new ce,eme=new bl,d9=new ce(1,0,0),u9=new ce(0,1,0),h9=new ce(0,0,1),f9={type:"added"},tme={type:"removed"},zp={type:"childadded",child:null},YF={type:"childremoved",child:null},Ps=(()=>{class i extends Ed{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:Zfe++}),this.uuid=oc(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();let e=new ce,n=new Jf,r=new bl,o=new ce(1,1,1);function a(){r.setFromEuler(n,!1)}function s(){n.setFromQuaternion(r,void 0,!1)}n._onChange(a),r._onChange(s),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:o},modelViewMatrix:{value:new gr},normalMatrix:{value:new Bi}}),this.matrix=new gr,this.matrixWorld=new gr,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new H_,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,n){this.quaternion.setFromAxisAngle(e,n)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,n){return Qp.setFromAxisAngle(e,n),this.quaternion.multiply(Qp),this}rotateOnWorldAxis(e,n){return Qp.setFromAxisAngle(e,n),this.quaternion.premultiply(Qp),this}rotateX(e){return this.rotateOnAxis(d9,e)}rotateY(e){return this.rotateOnAxis(u9,e)}rotateZ(e){return this.rotateOnAxis(h9,e)}translateOnAxis(e,n){return c9.copy(e).applyQuaternion(this.quaternion),this.position.add(c9.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(d9,e)}translateY(e){return this.translateOnAxis(u9,e)}translateZ(e){return this.translateOnAxis(h9,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(_d.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?Z1.copy(e):Z1.set(e,n,r);let o=this.parent;this.updateWorldMatrix(!0,!1),S_.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?_d.lookAt(S_,Z1,this.up):_d.lookAt(Z1,S_,this.up),this.quaternion.setFromRotationMatrix(_d),o&&(_d.extractRotation(o.matrixWorld),Qp.setFromRotationMatrix(_d),this.quaternion.premultiply(Qp.invert()))}add(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(f9),zp.child=e,this.dispatchEvent(zp),zp.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.remove(arguments[r]);return this}let n=this.children.indexOf(e);return n!==-1&&(e.parent=null,this.children.splice(n,1),e.dispatchEvent(tme),YF.child=e,this.dispatchEvent(YF),YF.child=null),this}removeFromParent(){let e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),_d.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),_d.multiply(e.parent.matrixWorld)),e.applyMatrix4(_d),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(f9),zp.child=e,this.dispatchEvent(zp),zp.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,n){if(this[e]===n)return this;for(let r=0,o=this.children.length;r<o;r++){let s=this.children[r].getObjectByProperty(e,n);if(s!==void 0)return s}}getObjectsByProperty(e,n,r=[]){this[e]===n&&r.push(this);let o=this.children;for(let a=0,s=o.length;a<s;a++)o[a].getObjectsByProperty(e,n,r);return r}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(S_,e,Jfe),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(S_,eme,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);let n=this.matrixWorld.elements;return e.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(e){e(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverseVisible(e)}traverseAncestors(e){let n=this.parent;n!==null&&(e(n),n.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].updateMatrixWorld(e)}updateWorldMatrix(e,n){let r=this.parent;if(e===!0&&r!==null&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),n===!0){let o=this.children;for(let a=0,s=o.length;a<s;a++)o[a].updateWorldMatrix(!1,!0)}}toJSON(e){let n=e===void 0||typeof e=="string",r={};n&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});let o={};o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.castShadow===!0&&(o.castShadow=!0),this.receiveShadow===!0&&(o.receiveShadow=!0),this.visible===!1&&(o.visible=!1),this.frustumCulled===!1&&(o.frustumCulled=!1),this.renderOrder!==0&&(o.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(o.userData=this.userData),o.layers=this.layers.mask,o.matrix=this.matrix.toArray(),o.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(o.matrixAutoUpdate=!1),this.isInstancedMesh&&(o.type="InstancedMesh",o.count=this.count,o.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(o.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(o.type="BatchedMesh",o.perObjectFrustumCulled=this.perObjectFrustumCulled,o.sortObjects=this.sortObjects,o.drawRanges=this._drawRanges,o.reservedRanges=this._reservedRanges,o.visibility=this._visibility,o.active=this._active,o.bounds=this._bounds.map(l=>({boxInitialized:l.boxInitialized,boxMin:l.box.min.toArray(),boxMax:l.box.max.toArray(),sphereInitialized:l.sphereInitialized,sphereRadius:l.sphere.radius,sphereCenter:l.sphere.center.toArray()})),o.maxInstanceCount=this._maxInstanceCount,o.maxVertexCount=this._maxVertexCount,o.maxIndexCount=this._maxIndexCount,o.geometryInitialized=this._geometryInitialized,o.geometryCount=this._geometryCount,o.matricesTexture=this._matricesTexture.toJSON(e),this._colorsTexture!==null&&(o.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(o.boundingSphere={center:o.boundingSphere.center.toArray(),radius:o.boundingSphere.radius}),this.boundingBox!==null&&(o.boundingBox={min:o.boundingBox.min.toArray(),max:o.boundingBox.max.toArray()}));function a(l,c){return l[c.uuid]===void 0&&(l[c.uuid]=c.toJSON(e)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?o.background=this.background.toJSON():this.background.isTexture&&(o.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(o.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){o.geometry=a(e.geometries,this.geometry);let l=this.geometry.parameters;if(l!==void 0&&l.shapes!==void 0){let c=l.shapes;if(Array.isArray(c))for(let d=0,h=c.length;d<h;d++){let u=c[d];a(e.shapes,u)}else a(e.shapes,c)}}if(this.isSkinnedMesh&&(o.bindMode=this.bindMode,o.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(a(e.skeletons,this.skeleton),o.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let l=[];for(let c=0,d=this.material.length;c<d;c++)l.push(a(e.materials,this.material[c]));o.material=l}else o.material=a(e.materials,this.material);if(this.children.length>0){o.children=[];for(let l=0;l<this.children.length;l++)o.children.push(this.children[l].toJSON(e).object)}if(this.animations.length>0){o.animations=[];for(let l=0;l<this.animations.length;l++){let c=this.animations[l];o.animations.push(a(e.animations,c))}}if(n){let l=s(e.geometries),c=s(e.materials),d=s(e.textures),h=s(e.images),u=s(e.shapes),f=s(e.skeletons),_=s(e.animations),y=s(e.nodes);l.length>0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),h.length>0&&(r.images=h),u.length>0&&(r.shapes=u),f.length>0&&(r.skeletons=f),_.length>0&&(r.animations=_),y.length>0&&(r.nodes=y)}return r.object=o,r;function s(l){let c=[];for(let d in l){let h=l[d];delete h.metadata,c.push(h)}return c}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!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.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,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.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let r=0;r<e.children.length;r++){let o=e.children[r];this.add(o.clone())}return this}}return i.DEFAULT_UP=new ce(0,1,0),i.DEFAULT_MATRIX_AUTO_UPDATE=!0,i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0,i})(),Al=new ce,bd=new ce,ZF=new ce,vd=new ce,qp=new ce,Gp=new ce,m9=new ce,JF=new ce,eI=new ce,tI=new ce,Yf=class i{constructor(t=new ce,e=new ce,n=new ce){this.a=t,this.b=e,this.c=n}static getNormal(t,e,n,r){r.subVectors(n,e),Al.subVectors(t,e),r.cross(Al);let o=r.lengthSq();return o>0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(t,e,n,r,o){Al.subVectors(r,e),bd.subVectors(n,e),ZF.subVectors(t,e);let a=Al.dot(Al),s=Al.dot(bd),l=Al.dot(ZF),c=bd.dot(bd),d=bd.dot(ZF),h=a*c-s*s;if(h===0)return o.set(0,0,0),null;let u=1/h,f=(c*l-s*d)*u,_=(a*d-s*l)*u;return o.set(1-f-_,_,f)}static containsPoint(t,e,n,r){return this.getBarycoord(t,e,n,r,vd)===null?!1:vd.x>=0&&vd.y>=0&&vd.x+vd.y<=1}static getInterpolation(t,e,n,r,o,a,s,l){return this.getBarycoord(t,e,n,r,vd)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(o,vd.x),l.addScaledVector(a,vd.y),l.addScaledVector(s,vd.z),l)}static isFrontFacing(t,e,n,r){return Al.subVectors(n,e),bd.subVectors(t,e),Al.cross(bd).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 Al.subVectors(this.c,this.b),bd.subVectors(this.a,this.b),Al.cross(bd).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)}getInterpolation(t,e,n,r,o){return i.getInterpolation(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,a,s;qp.subVectors(r,n),Gp.subVectors(o,n),JF.subVectors(t,n);let l=qp.dot(JF),c=Gp.dot(JF);if(l<=0&&c<=0)return e.copy(n);eI.subVectors(t,r);let d=qp.dot(eI),h=Gp.dot(eI);if(d>=0&&h<=d)return e.copy(r);let u=l*h-d*c;if(u<=0&&l>=0&&d<=0)return a=l/(l-d),e.copy(n).addScaledVector(qp,a);tI.subVectors(t,o);let f=qp.dot(tI),_=Gp.dot(tI);if(_>=0&&f<=_)return e.copy(o);let y=f*c-l*_;if(y<=0&&c>=0&&_<=0)return s=c/(c-_),e.copy(n).addScaledVector(Gp,s);let b=d*_-f*h;if(b<=0&&h-d>=0&&f-_>=0)return m9.subVectors(o,r),s=(h-d)/(h-d+(f-_)),e.copy(r).addScaledVector(m9,s);let v=1/(b+y+u);return a=y*v,s=u*v,e.copy(n).addScaledVector(qp,a).addScaledVector(Gp,s)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}},wH={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},Du={h:0,s:0,l:0},J1={h:0,s:0,l:0};function iI(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}var di=class{constructor(t,e,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,n)}set(t,e,n){if(e===void 0&&n===void 0){let r=t;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(t,e,n);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=Ds){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,On.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=On.workingColorSpace){return this.r=t,this.g=e,this.b=n,On.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=On.workingColorSpace){if(t=G3(t,1),e=xo(e,0,1),n=xo(n,0,1),e===0)this.r=this.g=this.b=n;else{let o=n<=.5?n*(1+e):n+e-n*e,a=2*n-o;this.r=iI(a,o,t+1/3),this.g=iI(a,o,t),this.b=iI(a,o,t-1/3)}return On.toWorkingColorSpace(this,r),this}setStyle(t,e=Ds){function n(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(t)){let o,a=r[1],s=r[2];switch(a){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,e);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,e);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,e);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(t)){let o=r[1],a=o.length;if(a===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,e);if(a===6)return this.setHex(parseInt(o,16),e);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=Ds){let n=wH[t.toLowerCase()];return n!==void 0?this.setHex(n,e):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}copySRGBToLinear(t){return this.r=lA(t.r),this.g=lA(t.g),this.b=lA(t.b),this}copyLinearToSRGB(t){return this.r=zF(t.r),this.g=zF(t.g),this.b=zF(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=Ds){return On.fromWorkingColorSpace(na.copy(this),t),Math.round(xo(na.r*255,0,255))*65536+Math.round(xo(na.g*255,0,255))*256+Math.round(xo(na.b*255,0,255))}getHexString(t=Ds){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=On.workingColorSpace){On.fromWorkingColorSpace(na.copy(this),e);let n=na.r,r=na.g,o=na.b,a=Math.max(n,r,o),s=Math.min(n,r,o),l,c,d=(s+a)/2;if(s===a)l=0,c=0;else{let h=a-s;switch(c=d<=.5?h/(a+s):h/(2-a-s),a){case n:l=(r-o)/h+(r<o?6:0);break;case r:l=(o-n)/h+2;break;case o:l=(n-r)/h+4;break}l/=6}return t.h=l,t.s=c,t.l=d,t}getRGB(t,e=On.workingColorSpace){return On.fromWorkingColorSpace(na.copy(this),e),t.r=na.r,t.g=na.g,t.b=na.b,t}getStyle(t=Ds){On.fromWorkingColorSpace(na.copy(this),t);let e=na.r,n=na.g,r=na.b;return t!==Ds?`color(${t} ${e.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(e*255)},${Math.round(n*255)},${Math.round(r*255)})`}offsetHSL(t,e,n){return this.getHSL(Du),this.setHSL(Du.h+t,Du.s+e,Du.l+n)}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,n){return this.r=t.r+(e.r-t.r)*n,this.g=t.g+(e.g-t.g)*n,this.b=t.b+(e.b-t.b)*n,this}lerpHSL(t,e){this.getHSL(Du),t.getHSL(J1);let n=P_(Du.h,J1.h,e),r=P_(Du.s,J1.s,e),o=P_(Du.l,J1.l,e);return this.setHSL(n,r,o),this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){let e=this.r,n=this.g,r=this.b,o=t.elements;return this.r=o[0]*e+o[3]*n+o[6]*r,this.g=o[1]*e+o[4]*n+o[7]*r,this.b=o[2]*e+o[5]*n+o[8]*r,this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},na=new di;di.NAMES=wH;var ime=0,lc=class extends Ed{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:ime++}),this.uuid=oc(),this.name="",this.type="Material",this.blending=oA,this.side=Lu,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=bI,this.blendDst=vI,this.blendEquation=jf,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new di(0,0,0),this.blendAlpha=0,this.depthFunc=Bx,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=e9,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Op,this.stencilZFail=Op,this.stencilZPass=Op,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.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}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: parameter '${e}' has value of undefined.`);continue}let r=this[e];if(r===void 0){console.warn(`THREE.Material: '${e}' is not a property of THREE.${this.type}.`);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.6,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!==void 0&&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.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),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.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),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&&this.attenuationDistance!==1/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!==oA&&(n.blending=this.blending),this.side!==Lu&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==bI&&(n.blendSrc=this.blendSrc),this.blendDst!==vI&&(n.blendDst=this.blendDst),this.blendEquation!==jf&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==Bx&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==e9&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Op&&(n.stencilFail=this.stencilFail),this.stencilZFail!==Op&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==Op&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&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!==void 0&&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.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.wireframe===!0&&(n.wireframe=!0),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=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function r(o){let a=[];for(let s in o){let l=o[s];delete l.metadata,a.push(l)}return a}if(e){let o=r(t.textures),a=r(t.images);o.length>0&&(n.textures=o),a.length>0&&(n.images=a)}return n}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,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.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,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.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,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++}onBuild(){console.warn("Material: onBuild() has been removed.")}},Bd=class extends lc{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new di(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Jf,this.combine=O3,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,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.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),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.fog=t.fog,this}};var $r=new ce,ex=new qe,Vn=class{constructor(t,e,n=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=e,this.count=t!==void 0?t.length/e:0,this.normalized=n,this.usage=YI,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Cd,this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}get updateRange(){return sA("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let r=0,o=this.itemSize;r<o;r++)this.array[t+r]=e.array[n+r];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(this.itemSize===2)for(let e=0,n=this.count;e<n;e++)ex.fromBufferAttribute(this,e),ex.applyMatrix3(t),this.setXY(e,ex.x,ex.y);else if(this.itemSize===3)for(let e=0,n=this.count;e<n;e++)$r.fromBufferAttribute(this,e),$r.applyMatrix3(t),this.setXYZ(e,$r.x,$r.y,$r.z);return this}applyMatrix4(t){for(let e=0,n=this.count;e<n;e++)$r.fromBufferAttribute(this,e),$r.applyMatrix4(t),this.setXYZ(e,$r.x,$r.y,$r.z);return this}applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)$r.fromBufferAttribute(this,e),$r.applyNormalMatrix(t),this.setXYZ(e,$r.x,$r.y,$r.z);return this}transformDirection(t){for(let e=0,n=this.count;e<n;e++)$r.fromBufferAttribute(this,e),$r.transformDirection(t),this.setXYZ(e,$r.x,$r.y,$r.z);return this}set(t,e=0){return this.array.set(t,e),this}getComponent(t,e){let n=this.array[t*this.itemSize+e];return this.normalized&&(n=_l(n,this.array)),n}setComponent(t,e,n){return this.normalized&&(n=Hn(n,this.array)),this.array[t*this.itemSize+e]=n,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=_l(e,this.array)),e}setX(t,e){return this.normalized&&(e=Hn(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=_l(e,this.array)),e}setY(t,e){return this.normalized&&(e=Hn(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=_l(e,this.array)),e}setZ(t,e){return this.normalized&&(e=Hn(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=_l(e,this.array)),e}setW(t,e){return this.normalized&&(e=Hn(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,n){return t*=this.itemSize,this.normalized&&(e=Hn(e,this.array),n=Hn(n,this.array)),this.array[t+0]=e,this.array[t+1]=n,this}setXYZ(t,e,n,r){return t*=this.itemSize,this.normalized&&(e=Hn(e,this.array),n=Hn(n,this.array),r=Hn(r,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this}setXYZW(t,e,n,r,o){return t*=this.itemSize,this.normalized&&(e=Hn(e,this.array),n=Hn(n,this.array),r=Hn(r,this.array),o=Hn(o,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=o,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(t.name=this.name),this.usage!==YI&&(t.usage=this.usage),t}};var Nx=class extends Vn{constructor(t,e,n){super(new Uint16Array(t),e,n)}};var Ux=class extends Vn{constructor(t,e,n){super(new Uint32Array(t),e,n)}};var Qn=class extends Vn{constructor(t,e,n){super(new Float32Array(t),e,n)}},nme=0,Is=new gr,nI=new Ps,Wp=new ce,os=new Lo,E_=new Lo,yo=new ce,wn=class i extends Ed{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:nme++}),this.uuid=oc(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(t){return Array.isArray(t)?this.index=new(xH(t)?Ux:Nx)(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 Bi().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 Is.makeRotationFromQuaternion(t),this.applyMatrix4(Is),this}rotateX(t){return Is.makeRotationX(t),this.applyMatrix4(Is),this}rotateY(t){return Is.makeRotationY(t),this.applyMatrix4(Is),this}rotateZ(t){return Is.makeRotationZ(t),this.applyMatrix4(Is),this}translate(t,e,n){return Is.makeTranslation(t,e,n),this.applyMatrix4(Is),this}scale(t,e,n){return Is.makeScale(t,e,n),this.applyMatrix4(Is),this}lookAt(t){return nI.lookAt(t),nI.updateMatrix(),this.applyMatrix4(nI.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Wp).negate(),this.translate(Wp.x,Wp.y,Wp.z),this}setFromPoints(t){let e=[];for(let n=0,r=t.length;n<r;n++){let o=t[n];e.push(o.x,o.y,o.z||0)}return this.setAttribute("position",new Qn(e,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Lo);let t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new ce(-1/0,-1/0,-1/0),new ce(1/0,1/0,1/0));return}if(t!==void 0){if(this.boundingBox.setFromBufferAttribute(t),e)for(let n=0,r=e.length;n<r;n++){let o=e[n];os.setFromBufferAttribute(o),this.morphTargetsRelative?(yo.addVectors(this.boundingBox.min,os.min),this.boundingBox.expandByPoint(yo),yo.addVectors(this.boundingBox.max,os.max),this.boundingBox.expandByPoint(yo)):(this.boundingBox.expandByPoint(os.min),this.boundingBox.expandByPoint(os.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new sc);let t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new ce,1/0);return}if(t){let n=this.boundingSphere.center;if(os.setFromBufferAttribute(t),e)for(let o=0,a=e.length;o<a;o++){let s=e[o];E_.setFromBufferAttribute(s),this.morphTargetsRelative?(yo.addVectors(os.min,E_.min),os.expandByPoint(yo),yo.addVectors(os.max,E_.max),os.expandByPoint(yo)):(os.expandByPoint(E_.min),os.expandByPoint(E_.max))}os.getCenter(n);let r=0;for(let o=0,a=t.count;o<a;o++)yo.fromBufferAttribute(t,o),r=Math.max(r,n.distanceToSquared(yo));if(e)for(let o=0,a=e.length;o<a;o++){let s=e[o],l=this.morphTargetsRelative;for(let c=0,d=s.count;c<d;c++)yo.fromBufferAttribute(s,c),l&&(Wp.fromBufferAttribute(t,c),yo.add(Wp)),r=Math.max(r,n.distanceToSquared(yo))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let t=this.index,e=this.attributes;if(t===null||e.position===void 0||e.normal===void 0||e.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let n=e.position,r=e.normal,o=e.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Vn(new Float32Array(4*n.count),4));let a=this.getAttribute("tangent"),s=[],l=[];for(let O=0;O<n.count;O++)s[O]=new ce,l[O]=new ce;let c=new ce,d=new ce,h=new ce,u=new qe,f=new qe,_=new qe,y=new ce,b=new ce;function v(O,T,B){c.fromBufferAttribute(n,O),d.fromBufferAttribute(n,T),h.fromBufferAttribute(n,B),u.fromBufferAttribute(o,O),f.fromBufferAttribute(o,T),_.fromBufferAttribute(o,B),d.sub(c),h.sub(c),f.sub(u),_.sub(u);let L=1/(f.x*_.y-_.x*f.y);isFinite(L)&&(y.copy(d).multiplyScalar(_.y).addScaledVector(h,-f.y).multiplyScalar(L),b.copy(h).multiplyScalar(f.x).addScaledVector(d,-_.x).multiplyScalar(L),s[O].add(y),s[T].add(y),s[B].add(y),l[O].add(b),l[T].add(b),l[B].add(b))}let M=this.groups;M.length===0&&(M=[{start:0,count:t.count}]);for(let O=0,T=M.length;O<T;++O){let B=M[O],L=B.start,G=B.count;for(let W=L,oe=L+G;W<oe;W+=3)v(t.getX(W+0),t.getX(W+1),t.getX(W+2))}let x=new ce,w=new ce,k=new ce,P=new ce;function D(O){k.fromBufferAttribute(r,O),P.copy(k);let T=s[O];x.copy(T),x.sub(k.multiplyScalar(k.dot(T))).normalize(),w.crossVectors(P,T);let L=w.dot(l[O])<0?-1:1;a.setXYZW(O,x.x,x.y,x.z,L)}for(let O=0,T=M.length;O<T;++O){let B=M[O],L=B.start,G=B.count;for(let W=L,oe=L+G;W<oe;W+=3)D(t.getX(W+0)),D(t.getX(W+1)),D(t.getX(W+2))}}computeVertexNormals(){let t=this.index,e=this.getAttribute("position");if(e!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new Vn(new Float32Array(e.count*3),3),this.setAttribute("normal",n);else for(let u=0,f=n.count;u<f;u++)n.setXYZ(u,0,0,0);let r=new ce,o=new ce,a=new ce,s=new ce,l=new ce,c=new ce,d=new ce,h=new ce;if(t)for(let u=0,f=t.count;u<f;u+=3){let _=t.getX(u+0),y=t.getX(u+1),b=t.getX(u+2);r.fromBufferAttribute(e,_),o.fromBufferAttribute(e,y),a.fromBufferAttribute(e,b),d.subVectors(a,o),h.subVectors(r,o),d.cross(h),s.fromBufferAttribute(n,_),l.fromBufferAttribute(n,y),c.fromBufferAttribute(n,b),s.add(d),l.add(d),c.add(d),n.setXYZ(_,s.x,s.y,s.z),n.setXYZ(y,l.x,l.y,l.z),n.setXYZ(b,c.x,c.y,c.z)}else for(let u=0,f=e.count;u<f;u+=3)r.fromBufferAttribute(e,u+0),o.fromBufferAttribute(e,u+1),a.fromBufferAttribute(e,u+2),d.subVectors(a,o),h.subVectors(r,o),d.cross(h),n.setXYZ(u+0,d.x,d.y,d.z),n.setXYZ(u+1,d.x,d.y,d.z),n.setXYZ(u+2,d.x,d.y,d.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let t=this.attributes.normal;for(let e=0,n=t.count;e<n;e++)yo.fromBufferAttribute(t,e),yo.normalize(),t.setXYZ(e,yo.x,yo.y,yo.z)}toNonIndexed(){function t(s,l){let c=s.array,d=s.itemSize,h=s.normalized,u=new c.constructor(l.length*d),f=0,_=0;for(let y=0,b=l.length;y<b;y++){s.isInterleavedBufferAttribute?f=l[y]*s.data.stride+s.offset:f=l[y]*d;for(let v=0;v<d;v++)u[_++]=c[f++]}return new Vn(u,d,h)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let e=new i,n=this.index.array,r=this.attributes;for(let s in r){let l=r[s],c=t(l,n);e.setAttribute(s,c)}let o=this.morphAttributes;for(let s in o){let l=[],c=o[s];for(let d=0,h=c.length;d<h;d++){let u=c[d],f=t(u,n);l.push(f)}e.morphAttributes[s]=l}e.morphTargetsRelative=this.morphTargetsRelative;let a=this.groups;for(let s=0,l=a.length;s<l;s++){let c=a[s];e.addGroup(c.start,c.count,c.materialIndex)}return e}toJSON(){let t={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),Object.keys(this.userData).length>0&&(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 h=0,u=c.length;h<u;h++){let f=c[h];d.push(f.toJSON(t.data))}d.length>0&&(r[l]=d,o=!0)}o&&(t.data.morphAttributes=r,t.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(t.data.groups=JSON.parse(JSON.stringify(a)));let s=this.boundingSphere;return s!==null&&(t.data.boundingSphere={center:s.center.toArray(),radius:s.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=[],h=o[c];for(let u=0,f=h.length;u<f;u++)d.push(h[u].clone(e));this.morphAttributes[c]=d}this.morphTargetsRelative=t.morphTargetsRelative;let a=t.groups;for(let c=0,d=a.length;c<d;c++){let h=a[c];this.addGroup(h.start,h.count,h.materialIndex)}let s=t.boundingBox;s!==null&&(this.boundingBox=s.clone());let l=t.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}},p9=new gr,Qf=new Td,tx=new sc,A9=new ce,jp=new ce,$p=new ce,Xp=new ce,rI=new ce,ix=new ce,nx=new qe,rx=new qe,ox=new qe,g9=new ce,_9=new ce,b9=new ce,ax=new ce,sx=new ce,Ui=class extends Ps{constructor(t=new wn,e=new Bd){super(),this.isMesh=!0,this.type="Mesh",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}updateMorphTargets(){let e=this.geometry.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,a=r.length;o<a;o++){let s=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=o}}}}getVertexPosition(t,e){let n=this.geometry,r=n.attributes.position,o=n.morphAttributes.position,a=n.morphTargetsRelative;e.fromBufferAttribute(r,t);let s=this.morphTargetInfluences;if(o&&s){ix.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let d=s[l],h=o[l];d!==0&&(rI.fromBufferAttribute(h,t),a?ix.addScaledVector(rI,d):ix.addScaledVector(rI.sub(e),d))}e.add(ix)}return e}raycast(t,e){let n=this.geometry,r=this.material,o=this.matrixWorld;r!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),tx.copy(n.boundingSphere),tx.applyMatrix4(o),Qf.copy(t.ray).recast(t.near),!(tx.containsPoint(Qf.origin)===!1&&(Qf.intersectSphere(tx,A9)===null||Qf.origin.distanceToSquared(A9)>(t.far-t.near)**2))&&(p9.copy(o).invert(),Qf.copy(t.ray).applyMatrix4(p9),!(n.boundingBox!==null&&Qf.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(t,e,Qf)))}_computeIntersections(t,e,n){let r,o=this.geometry,a=this.material,s=o.index,l=o.attributes.position,c=o.attributes.uv,d=o.attributes.uv1,h=o.attributes.normal,u=o.groups,f=o.drawRange;if(s!==null)if(Array.isArray(a))for(let _=0,y=u.length;_<y;_++){let b=u[_],v=a[b.materialIndex],M=Math.max(b.start,f.start),x=Math.min(s.count,Math.min(b.start+b.count,f.start+f.count));for(let w=M,k=x;w<k;w+=3){let P=s.getX(w),D=s.getX(w+1),O=s.getX(w+2);r=lx(this,v,t,n,c,d,h,P,D,O),r&&(r.faceIndex=Math.floor(w/3),r.face.materialIndex=b.materialIndex,e.push(r))}}else{let _=Math.max(0,f.start),y=Math.min(s.count,f.start+f.count);for(let b=_,v=y;b<v;b+=3){let M=s.getX(b),x=s.getX(b+1),w=s.getX(b+2);r=lx(this,a,t,n,c,d,h,M,x,w),r&&(r.faceIndex=Math.floor(b/3),e.push(r))}}else if(l!==void 0)if(Array.isArray(a))for(let _=0,y=u.length;_<y;_++){let b=u[_],v=a[b.materialIndex],M=Math.max(b.start,f.start),x=Math.min(l.count,Math.min(b.start+b.count,f.start+f.count));for(let w=M,k=x;w<k;w+=3){let P=w,D=w+1,O=w+2;r=lx(this,v,t,n,c,d,h,P,D,O),r&&(r.faceIndex=Math.floor(w/3),r.face.materialIndex=b.materialIndex,e.push(r))}}else{let _=Math.max(0,f.start),y=Math.min(l.count,f.start+f.count);for(let b=_,v=y;b<v;b+=3){let M=b,x=b+1,w=b+2;r=lx(this,a,t,n,c,d,h,M,x,w),r&&(r.faceIndex=Math.floor(b/3),e.push(r))}}}};function rme(i,t,e,n,r,o,a,s){let l;if(t.side===ra?l=n.intersectTriangle(a,o,r,!0,s):l=n.intersectTriangle(r,o,a,t.side===Lu,s),l===null)return null;sx.copy(s),sx.applyMatrix4(i.matrixWorld);let c=e.ray.origin.distanceTo(sx);return c<e.near||c>e.far?null:{distance:c,point:sx.clone(),object:i}}function lx(i,t,e,n,r,o,a,s,l,c){i.getVertexPosition(s,jp),i.getVertexPosition(l,$p),i.getVertexPosition(c,Xp);let d=rme(i,t,e,n,jp,$p,Xp,ax);if(d){r&&(nx.fromBufferAttribute(r,s),rx.fromBufferAttribute(r,l),ox.fromBufferAttribute(r,c),d.uv=Yf.getInterpolation(ax,jp,$p,Xp,nx,rx,ox,new qe)),o&&(nx.fromBufferAttribute(o,s),rx.fromBufferAttribute(o,l),ox.fromBufferAttribute(o,c),d.uv1=Yf.getInterpolation(ax,jp,$p,Xp,nx,rx,ox,new qe)),a&&(g9.fromBufferAttribute(a,s),_9.fromBufferAttribute(a,l),b9.fromBufferAttribute(a,c),d.normal=Yf.getInterpolation(ax,jp,$p,Xp,g9,_9,b9,new ce),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));let h={a:s,b:l,c,normal:new ce,materialIndex:0};Yf.getNormal(jp,$p,Xp,h.normal),d.face=h}return d}var xa=class i extends wn{constructor(t=1,e=1,n=1,r=1,o=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:o,depthSegments:a};let s=this;r=Math.floor(r),o=Math.floor(o),a=Math.floor(a);let l=[],c=[],d=[],h=[],u=0,f=0;_("z","y","x",-1,-1,n,e,t,a,o,0),_("z","y","x",1,-1,n,e,-t,a,o,1),_("x","z","y",1,1,t,n,e,r,a,2),_("x","z","y",1,-1,t,n,-e,r,a,3),_("x","y","z",1,-1,t,e,n,r,o,4),_("x","y","z",-1,-1,t,e,-n,r,o,5),this.setIndex(l),this.setAttribute("position",new Qn(c,3)),this.setAttribute("normal",new Qn(d,3)),this.setAttribute("uv",new Qn(h,2));function _(y,b,v,M,x,w,k,P,D,O,T){let B=w/D,L=k/O,G=w/2,W=k/2,oe=P/2,pe=D+1,ge=O+1,de=0,U=0,ee=new ce;for(let De=0;De<ge;De++){let We=De*L-W;for(let vt=0;vt<pe;vt++){let bt=vt*B-G;ee[y]=bt*M,ee[b]=We*x,ee[v]=oe,c.push(ee.x,ee.y,ee.z),ee[y]=0,ee[b]=0,ee[v]=P>0?1:-1,d.push(ee.x,ee.y,ee.z),h.push(vt/D),h.push(1-De/O),de+=1}}for(let De=0;De<O;De++)for(let We=0;We<D;We++){let vt=u+We+pe*De,bt=u+We+pe*(De+1),te=u+(We+1)+pe*(De+1),Z=u+(We+1)+pe*De;l.push(vt,bt,Z),l.push(bt,te,Z),U+=6}s.addGroup(f,U,T),f+=U,u+=de}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new i(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}};function pA(i){let t={};for(let e in i){t[e]={};for(let n in i[e]){let r=i[e][n];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),t[e][n]=null):t[e][n]=r.clone():Array.isArray(r)?t[e][n]=r.slice():t[e][n]=r}}return t}function ya(i){let t={};for(let e=0;e<i.length;e++){let n=pA(i[e]);for(let r in n)t[r]=n[r]}return t}function ome(i){let t=[];for(let e=0;e<i.length;e++)t.push(i[e].clone());return t}function CH(i){let t=i.getRenderTarget();return t===null?i.outputColorSpace:t.isXRRenderTarget===!0?t.texture.colorSpace:On.workingColorSpace}var Z_={clone:pA,merge:ya},ame=`void main() {
|
|
1238
|
+
`],encapsulation:2,changeDetection:0})}return i})();function $ae(i){return i.hasAttribute("mat-raised-button")?"elevated":i.hasAttribute("mat-stroked-button")?"outlined":i.hasAttribute("mat-flat-button")?"filled":i.hasAttribute("mat-button")?"text":null}function Xae(i,t){if(i&1){let e=st();S(0,"button",4),he("click",function(){Ve(e);let r=me();return Qe(r.data.resolveErrorData.onResolveErrorClick())}),j(1),F()}if(i&2){let e=me();E(),ct(" ",e.data.resolveErrorData.buttonText," ")}}var es=(()=>{class i{constructor(e){this.data=e}static{this.\u0275fac=function(n){return new(n||i)(se(Ts))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-error-dialog"]],decls:7,vars:3,consts:[["mat-dialog-title",""],["mat-dialog-content","",3,"innerHTML"],["mat-dialog-actions","","align","end"],["mat-button","","mat-dialog-close",""],["mat-button","","mat-dialog-close","",3,"click"]],template:function(n,r){n&1&&(S(0,"h1",0),j(1),F(),J(2,"div",1),S(3,"div",2),ke(4,Xae,2,1,"button",3),S(5,"button",3),j(6,"OK"),F()()),n&2&&(E(),Ai(r.data.title),E(),z("innerHTML",r.data.message,ey),E(2),Pe(r.data.resolveErrorData?4:-1))},dependencies:[Cf,ar,Cr,Wi,or],encapsulation:2})}}return i})();function dN(i){return{title:"Something is wrong with the loaded file(s)",message:[...Kae(i),...Yae(i)].join("")}}function Kae(i){let t=i.filter(e=>e.errors.length>0);return t.length>0?["<h2>Errors</h2>",...t.map(e=>Zae(e))]:[]}function Yae(i){let t=i.filter(e=>e.warnings.length>0);return t.length>0?["<h2>Warnings</h2>",...t.map(e=>Jae(e))]:[]}function Zae(i){return`<p><strong>${i.fileName}:</strong> ${Zy('<i class="fa fa-exclamation-circle"></i> ',i.errors)}</p>`}function Jae(i){return`<p><strong>${i.fileName}:</strong> ${Zy('<i class="fa fa-exclamation-triangle"></i> ',i.warnings)}</p>`}function Zy(i,t){return`<p>${t.map(e=>i+e).join("<br>")}</p>`}var mB=(function(i){return i.hide="hide",i.exclude="exclude",i})(mB||{});var gB=el(Jy());function _N(i){let t=i.content;return{fileMeta:{fileName:i.fileName,fileChecksum:t.fileChecksum,projectName:t.projectName,apiVersion:t.apiVersion,exportedFileSize:i.fileSize,repoCreationDate:t.repoCreationDate||""},settings:{fileSettings:{edges:t.edges||[],attributeTypes:tse(t.attributeTypes),attributeDescriptors:ise(t.attributeDescriptors),blacklist:nse(t.blacklist||[]),markedPackages:t.markedPackages||[]}},map:Po(t.nodes[0])}}function tse(i){return!i||Array.isArray(i.nodes)||Array.isArray(i.edges)?{nodes:{},edges:{}}:{nodes:i.nodes??{},edges:i.edges??{}}}function ise(i){return i||{}}function nse(i){for(let t of i)t.type===mB.hide&&(t.type="flatten");return i}function bN(i){let t=0;for(let e of i)e.selectedAs!==vi.None&&(t+=e.file.fileMeta.exportedFileSize);return t}function $0(i){let t=null;try{let e=typeof i=="string"?JSON.parse(i):i;if("data"in e&&"checksum"in e)return t=e.data,t.fileChecksum=e.checksum||(0,gB.default)(JSON.stringify(e.data)),t;if(!e.fileChecksum){let n=typeof i=="string"?i:JSON.stringify(i);e.fileChecksum=(0,gB.default)(n)}return e}catch{}return t}var K8=el(QB());var Zl={author:"MaibornWolff GmbH <dist_intern_codecharta@maibornwolff.de>",homepage:"https://maibornwolff.github.io/codecharta/",bugs:{url:"https://github.com/MaibornWolff/codecharta/issues",email:"dist_intern_codecharta@maibornwolff.de"},repository:{type:"git",url:"https://github.com/MaibornWolff/codecharta.git"},name:"codecharta-visualization",version:"1.137.0",engines:{node:">=20"},description:"MaibornWolff CodeCharta",files:["dist/bundler/browser","conf","Dockerfile","LICENSE.md","package.json","package-lock.json","README.md","tsconfig.json","cli.js"],codecharta:{apiVersion:"1.5"},main:"main.js",browserslist:["last 2 chrome version","last 2 firefox version","last 2 safari version"],scripts:{start:"electron dist/bundler/browser",build:"ng build && cp electron/* package.json dist/bundler/browser",dev:"ng serve",test:"npm run test:ci -- --maxWorkers=25%","test:ci":"jest --config conf/jestUnit.config.json .*\\.spec\\.ts","test:auto":"npm test -- --watch","test:autoNoCoverage":"npm run test:auto -- --coverage false","test:updateSnaps":"npm test -- --updateSnapshot","test:createCoverageFile":"jest --config conf/jestUnit.config.json --coverage --coverageReporters=lcov --coverageDirectory=coverage",e2e:"jest --config conf/jestE2E.config.json .*\\.e2e\\.ts --coverage false","e2e:auto":"npm run e2e -- --watch","e2e:ci":"npm run e2e -- --runInBand",package:"node script/appMain.js","package:local":"npm run package -- --local","schema:generate":"typescript-json-schema ./app/codeCharta/codeCharta.model.ts ExportCCFile --required --topRef --out app/codeCharta/util/generatedSchema.json",sbom:"cyclonedx-npm --omit dev --gather-license-texts --spec-version 1.6 --output-format json --output-file build/reports/sbom_visualization.cdx.json"},bin:{"codecharta-visualization":"cli.js"},license:"BSD-3-Clause",dependencies:{"@angular/animations":"^20.3.4","@angular/cdk":"^20.2.8","@angular/common":"^20.3.4","@angular/core":"^20.3.4","@angular/forms":"^20.3.4","@angular/material":"^20.2.8","@angular/platform-browser":"^20.3.4","@angular/platform-browser-dynamic":"^20.3.4","@angular/router":"^20.3.4","@ngrx/effects":"^20.0.0","@ngrx/operators":"^20.0.0","@ngrx/store":"^20.0.0","@ngrx/store-devtools":"^20.0.0","@tailwindcss/postcss":"^4.1.15","@types/d3":"^7.4.3",ajv:"^6.12.6","color-convert":"2.0.1",d3:"^7.8.5","d3-hierarchy":"^2.0.0",dequal:"^2.0.3",electron:"38.4.0","fake-indexeddb":"^6.2.4",fflate:"^0.8.2","font-awesome":"^4.7.0","hotkeys-js":"^3.8.2",html2canvas:"^1.4.1",idb:"^8.0.0",ignore:"^7.0.5",klona:"^2.0.4","marked-mangle":"^1.1.11","material-icons":"^1.10.4",md5:"^2.3.0","ngx-color":"^7.3.3",pako:"^2.0.4","percent-round":"^2.2.1",qrcode:"^1.5.3",rxjs:"^7.5.1","safe-stable-stringify":"^2.4.3",shelljs:"^0.10.0",tailwindcss:"^4.1.15",three:"^0.168.0","three-orbit-controls":"^82.1.0","typescript-json-schema":"0.65.1","zone.js":"^0.15.1"},devDependencies:{"@angular/build":"^20.3.5","@angular/cli":"^20.3.5","@angular/compiler":"^20.3.4","@angular/compiler-cli":"^20.3.4","@babel/plugin-transform-class-static-block":"^7.23.3","@cyclonedx/cyclonedx-npm":"^4.0.3","@electron/get":"^4.0.2","@electron/packager":"^19.0.1","@testing-library/angular":"^18.1.0","@testing-library/user-event":"^14.5.2","@types/color-convert":"2.0.4","@types/d3-hierarchy":"^3.0.2","@types/expect-puppeteer":"^5.0.2","@types/jest":"^30.0.0","@types/jest-environment-puppeteer":"^5.0.6","@types/node":"^22.0.0","@types/three":"^0.168.0",autoprefixer:"^10.4.21",bestzip:"^2.2.0",daisyui:"^5.3.7","fast-xml-parser":"^4.4.0","html-loader":"^4.0.0",jest:"^30.2.0","jest-canvas-mock":"^2.4.0","jest-environment-jsdom":"^30.1.0","jest-preset-angular":"15.0.2","jest-puppeteer":"^11.0.0",marked:"^5.0.2",postcss:"^8.5.6",puppeteer:"^24.24.0","ts-jest":"^29.4.5",typescript:"5.8.3","webpack-glsl-loader":"^1.0.1"},optionalDependencies:{"@rollup/rollup-linux-x64-gnu":"^4.24.2"}};var v8={$ref:"#/definitions/ExportCCFile",$schema:"http://json-schema.org/draft-07/schema#",definitions:{AttributeTypes:{properties:{edges:{additionalProperties:{enum:["absolute","relative"],type:"string"},type:"object"},nodes:{additionalProperties:{enum:["absolute","relative"],type:"string"},type:"object"}},type:"object"},CodeMapNode:{properties:{attributes:{$ref:"#/definitions/KeyValuePair"},children:{items:{$ref:"#/definitions/CodeMapNode"},type:"array"},deltas:{additionalProperties:{type:"number"},type:"object"},edgeAttributes:{additionalProperties:{$ref:"#/definitions/EdgeMetricCount"},type:"object"},fixedPosition:{$ref:"#/definitions/FixedPosition"},id:{type:"number"},isExcluded:{type:"boolean"},isFlattened:{type:"boolean"},link:{type:"string"},name:{type:"string"},path:{type:"string"},type:{$ref:"#/definitions/NodeType"}},required:["name","type"],type:"object"},Edge:{properties:{attributes:{$ref:"#/definitions/KeyValuePair"},fromNodeName:{type:"string"},toNodeName:{type:"string"},visible:{$ref:"#/definitions/EdgeVisibility"}},required:["attributes","fromNodeName","toNodeName"],type:"object"},EdgeMetricCount:{properties:{incoming:{type:"number"},outgoing:{type:"number"}},required:["incoming","outgoing"],type:"object"},EdgeVisibility:{enum:["both","from","none","to"],type:"string"},ExportBlacklistItem:{properties:{path:{type:"string"},type:{$ref:"#/definitions/ExportBlacklistType"}},required:["path","type"],type:"object"},ExportBlacklistType:{enum:["exclude","hide"],type:"string"},ExportCCFile:{properties:{apiVersion:{type:"string"},attributeTypes:{anyOf:[{$ref:"#/definitions/OldAttributeTypes"},{$ref:"#/definitions/AttributeTypes"}]},blacklist:{items:{$ref:"#/definitions/ExportBlacklistItem"},type:"array"},edges:{items:{$ref:"#/definitions/Edge"},type:"array"},markedPackages:{items:{$ref:"#/definitions/MarkedPackage"},type:"array"},nodes:{items:{$ref:"#/definitions/CodeMapNode"},type:"array"},projectName:{type:"string"}},required:["apiVersion","nodes","projectName"],type:"object"},FixedPosition:{properties:{height:{type:"number"},left:{type:"number"},top:{type:"number"},width:{type:"number"}},required:["height","left","top","width"],type:"object"},KeyValuePair:{additionalProperties:{type:"number"},type:"object"},MarkedPackage:{properties:{color:{type:"string"},path:{type:"string"}},required:["color","path"],type:"object"},NodeType:{enum:["File","Folder"],type:"string"},OldAttributeTypes:{properties:{edges:{additionalItems:{anyOf:[{additionalProperties:{enum:["absolute","relative"],type:"string"},type:"object"}]},items:[{additionalProperties:{enum:["absolute","relative"],type:"string"},type:"object"}],minItems:0,type:"array"},nodes:{additionalItems:{anyOf:[{additionalProperties:{enum:["absolute","relative"],type:"string"},type:"object"}]},items:[{additionalProperties:{enum:["absolute","relative"],type:"string"},type:"object"}],minItems:0,type:"array"}},type:"object"}}};function Nle(i){var t=0,e=i.children,n=e&&e.length;if(!n)t=1;else for(;--n>=0;)t+=e[n].value;i.value=t}function y8(){return this.eachAfter(Nle)}function x8(i,t){let e=-1;for(let n of this)i.call(t,n,++e,this);return this}function w8(i,t){for(var e=this,n=[e],r,o,a=-1;e=n.pop();)if(i.call(t,e,++a,this),r=e.children)for(o=r.length-1;o>=0;--o)n.push(r[o]);return this}function C8(i,t){for(var e=this,n=[e],r=[],o,a,s,l=-1;e=n.pop();)if(r.push(e),o=e.children)for(a=0,s=o.length;a<s;++a)n.push(o[a]);for(;e=r.pop();)i.call(t,e,++l,this);return this}function M8(i,t){let e=-1;for(let n of this)if(i.call(t,n,++e,this))return n}function S8(i){return this.eachAfter(function(t){for(var e=+i(t.data)||0,n=t.children,r=n&&n.length;--r>=0;)e+=n[r].value;t.value=e})}function E8(i){return this.eachBefore(function(t){t.children&&t.children.sort(i)})}function T8(i){for(var t=this,e=Ule(t,i),n=[t];t!==e;)t=t.parent,n.push(t);for(var r=n.length;i!==e;)n.splice(r,0,i),i=i.parent;return n}function Ule(i,t){if(i===t)return i;var e=i.ancestors(),n=t.ancestors(),r=null;for(i=e.pop(),t=n.pop();i===t;)r=i,i=e.pop(),t=n.pop();return r}function B8(){for(var i=this,t=[i];i=i.parent;)t.push(i);return t}function F8(){return Array.from(this)}function I8(){var i=[];return this.eachBefore(function(t){t.children||i.push(t)}),i}function D8(){var i=this,t=[];return i.each(function(e){e!==i&&t.push({source:e.parent,target:e})}),t}function*k8(){var i=this,t,e=[i],n,r,o;do for(t=e.reverse(),e=[];i=t.pop();)if(yield i,n=i.children)for(r=0,o=n.length;r<o;++r)e.push(n[r]);while(e.length)}function Ni(i,t){i instanceof Map?(i=[void 0,i],t===void 0&&(t=Qle)):t===void 0&&(t=Vle);for(var e=new _1(i),n,r=[e],o,a,s,l;n=r.pop();)if((a=t(n.data))&&(l=(a=Array.from(a)).length))for(n.children=a,s=l-1;s>=0;--s)r.push(o=a[s]=new _1(a[s])),o.parent=n,o.depth=n.depth+1;return e.eachBefore(qle)}function Hle(){return Ni(this).eachBefore(zle)}function Vle(i){return i.children}function Qle(i){return Array.isArray(i)?i[1]:null}function zle(i){i.data.value!==void 0&&(i.value=i.data.value),i.data=i.data.data}function qle(i){var t=0;do i.height=t;while((i=i.parent)&&i.height<++t)}function _1(i){this.data=i,this.depth=this.height=0,this.parent=null}_1.prototype=Ni.prototype={constructor:_1,count:y8,each:x8,eachAfter:C8,eachBefore:w8,find:M8,sum:S8,sort:E8,path:T8,ancestors:B8,descendants:F8,leaves:I8,links:D8,copy:Hle,[Symbol.iterator]:k8};function P8(i){if(typeof i!="function")throw new Error;return i}function vp(){return 0}function yp(i){return function(){return i}}function R8(i){i.x0=Math.round(i.x0),i.y0=Math.round(i.y0),i.x1=Math.round(i.x1),i.y1=Math.round(i.y1)}function O8(i,t,e,n,r){for(var o=i.children,a,s=-1,l=o.length,c=i.value&&(n-t)/i.value;++s<l;)a=o[s],a.y0=e,a.y1=r,a.x0=t,a.x1=t+=a.value*c}function L8(i,t,e,n,r){for(var o=i.children,a,s=-1,l=o.length,c=i.value&&(r-e)/i.value;++s<l;)a=o[s],a.x0=t,a.x1=n,a.y0=e,a.y1=e+=a.value*c}var Gle=(1+Math.sqrt(5))/2;function Wle(i,t,e,n,r,o){for(var a=[],s=t.children,l,c,d=0,h=0,u=s.length,f,_,y=t.value,b,v,M,x,w,k,P;d<u;){f=r-e,_=o-n;do b=s[h++].value;while(!b&&h<u);for(v=M=b,k=Math.max(_/f,f/_)/(y*i),P=b*b*k,w=Math.max(M/P,P/v);h<u;++h){if(b+=c=s[h].value,c<v&&(v=c),c>M&&(M=c),P=b*b*k,x=Math.max(M/P,P/v),x>w){b-=c;break}w=x}a.push(l={value:b,dice:f<_,children:s.slice(d,h)}),l.dice?O8(l,e,n,r,y?n+=_*b/y:o):L8(l,e,n,y?e+=f*b/y:r,o),y-=b,d=h}return a}var N8=(function i(t){function e(n,r,o,a,s){Wle(t,n,r,o,a,s)}return e.ratio=function(n){return i((n=+n)>1?n:1)},e})(Gle);function zB(){var i=N8,t=!1,e=1,n=1,r=[0],o=vp,a=vp,s=vp,l=vp,c=vp;function d(u){return u.x0=u.y0=0,u.x1=e,u.y1=n,u.eachBefore(h),r=[0],t&&u.eachBefore(R8),u}function h(u){var f=r[u.depth],_=u.x0+f,y=u.y0+f,b=u.x1-f,v=u.y1-f;b<_&&(_=b=(_+b)/2),v<y&&(y=v=(y+v)/2),u.x0=_,u.y0=y,u.x1=b,u.y1=v,u.children&&(f=r[u.depth+1]=o(u)/2,_+=c(u)-f,y+=a(u)-f,b-=s(u)-f,v-=l(u)-f,b<_&&(_=b=(_+b)/2),v<y&&(y=v=(y+v)/2),i(u,_,y,b,v))}return d.round=function(u){return arguments.length?(t=!!u,d):t},d.size=function(u){return arguments.length?(e=+u[0],n=+u[1],d):[e,n]},d.tile=function(u){return arguments.length?(i=P8(u),d):i},d.padding=function(u){return arguments.length?d.paddingInner(u).paddingOuter(u):d.paddingInner()},d.paddingInner=function(u){return arguments.length?(o=typeof u=="function"?u:yp(+u),d):o},d.paddingOuter=function(u){return arguments.length?d.paddingTop(u).paddingRight(u).paddingBottom(u).paddingLeft(u):d.paddingTop()},d.paddingTop=function(u){return arguments.length?(a=typeof u=="function"?u:yp(+u),d):a},d.paddingRight=function(u){return arguments.length?(s=typeof u=="function"?u:yp(+u),d):s},d.paddingBottom=function(u){return arguments.length?(l=typeof u=="function"?u:yp(+u),d):l},d.paddingLeft=function(u){return arguments.length?(c=typeof u=="function"?u:yp(+u),d):c},d}var KB=el(j8());function Bf(i){let t=2;if(i.startsWith("/"))t=1;else if(!i.startsWith("./"))return i;return i.slice(t)}function $8(i){let t=[];if(i!==void 0)for(let{data:e}of Ni(i))e.type!=="Folder"&&t.push(e);return t}function YB(i,t){let e=ZB(t);return e.ignoredNodePaths.ignores(Bf(i.path))===e.condition}function ZB(i){i=Bf(i.trimStart());let t=!0;i.startsWith("!")&&(i=i.slice(1),t=!1);let e=(0,KB.default)();for(let n of i.split(","))n=n.trimStart(),!n.startsWith("*")&&!n.endsWith("*")&&(n=n.startsWith('"')&&n.endsWith('"')?n.slice(1,-1):`*${n}*`),n.length!==0&&e.add(Bf(n));return{ignoredNodePaths:e,condition:t}}function X8(i,t){return ga(i,t,"exclude")||ga(i,t,"flatten")}function ga(i,t,e){if(t.length===0)return!1;let n=(0,KB.default)();for(let r of t)r.type===e&&n.add(Bf(r.path));return n.ignores(Bf(i))}function Ff(i,t){if(!t)return;let e;for(let n of t)(!e||e.path.length<n.path.length)&&(i.path.startsWith(`${n.path}/`)||i.path===n.path)&&(e=n);if(e)return e.color}function Yi(i){return i.children===void 0||i.children.length===0}var x1=(function(i){return i[i.SMALL_MAP=1]="SMALL_MAP",i[i.MEDIUM_MAP=.5]="MEDIUM_MAP",i[i.BIG_MAP=.25]="BIG_MAP",i})(x1||{});function If(i){let e=bN(i);switch(!0){case e>=7*1048576:return x1.BIG_MAP;case e>=2*1048576:return x1.MEDIUM_MAP;default:return x1.SMALL_MAP}}var Y8=Zl.codecharta.apiVersion,dl={fileIsInvalid:"File is empty or invalid.",apiVersionIsInvalid:"API Version is empty or invalid.",majorApiVersionIsOutdated:"API Version Outdated: Update CodeCharta API Version to match cc.json.",minorApiVersionOutdated:"Minor API Version Outdated.",nodesNotUnique:"Node names in combination with node types are not unique.",nodesEmpty:"The nodes array is empty. At least one node is required.",notAllFoldersAreFixed:"If at least one direct sub-folder of root is marked as fixed, all direct sub-folders of root must be fixed.",fixedFoldersOutOfBounds:"Coordinates of fixed folders must be within a range of 0 and 100.",fixedFoldersOverlapped:"Folders may not overlap.",fixedFoldersNotAllowed:"Fixated folders may not be defined in API-Version < 1.2.",fileAlreadyExists:"File already exists.",blacklistError:"Excluding all buildings is not possible.",fileContainsAuthorsAttribute:"File contains unsupported 'authors' attribute. This attribute will be ignored. Node containing the attribute: "};function Z8(i){return!i||!i.nodes?[]:t6(i.nodes)}function J8(i){let t=[];return i&&Ace(i)&&t.push(`${dl.minorApiVersionOutdated} Found: ${i.apiVersion}`),t}function e6(i){let t=[];switch(!0){case!i:t.push(dl.fileIsInvalid);break;case!mce(i):t.push(dl.apiVersionIsInvalid);break;case pce(i):t.push(dl.majorApiVersionIsOutdated);break}return t.length===0&&t.push(...fce(i)),t}function fce(i){let t=[];if(t.length===0){let n=new K8.default({allErrors:!0}).compile(v8);n(i)?i.nodes.length===0?t.push(dl.nodesEmpty):t.push(..._ce(i.nodes[0]),...n6(i)):t.push(...n.errors.map(o=>gce(o)))}return t}function mce(i){let{apiVersion:t}=i,e=t!==void 0,r=/\d+\.\d+/.test(t);return e&&r}function pce(i){return Z0(i.apiVersion).major>Z0(Y8).major}function Ace(i){return Z0(i.apiVersion).minor>Z0(Y8).minor}function t6(i){let t=[];for(let e of i)e.attributes?.authors&&(delete e.attributes.authors,t.push(`${dl.fileContainsAuthorsAttribute}"${e.name}"`)),e.children&&t.push(...t6(e.children));return t}function Z0(i){return{major:Number(i.split(".")[0]),minor:Number(i.split(".")[1])}}function gce(i){let t=i.keyword.charAt(0).toUpperCase()+i.keyword.slice(1),e=i.dataPath.slice(1);return`${t} error: ${e} ${i.message}`}function _ce(i){let t=[],e=new Set;return e.add(`${i.name}|${i.type}`),i6(i,t,e,`/${i.name}`),t}function i6(i,t,e,n){if(!Yi(i))for(let r of i.children){let o=`${n}/${r.name}`;e.has(`${o}|${r.type}`)?t.push(`${dl.nodesNotUnique} Found duplicate of ${r.type} with path: ${o}`):(e.add(`${o}|${r.type}`),i6(r,t,e,o))}}function bce(i,t,e,n,r,o){for(let a of i)if(a.fixedPosition===void 0)t.push(`${a.name}`);else{let s=Z0(e.apiVersion);if(s.major<1||s.major===1&&s.minor<2){n.push(`${dl.fixedFoldersNotAllowed} Found: ${e.apiVersion}`);return}yce(a)&&r.push(Y0(a));for(let l of i)l.fixedPosition!==void 0&&a!==l&&vce(a.fixedPosition,l.fixedPosition)&&!o.has(`${Y0(l)} and ${Y0(a)}`)&&o.add(`${Y0(a)} and ${Y0(l)}`)}}function n6(i,t=i.nodes[0].children){let e=[],n=[],r=[],o=new Set;bce(t,n,i,e,r,o),n.length>0&&n.length!==t.length&&e.push(`${dl.notAllFoldersAreFixed} Found: ${n.join(", ")}`),r.length>0&&e.push(`${dl.fixedFoldersOutOfBounds} Found: ${r.join(", ")}`),o.size>0&&e.push(`${dl.fixedFoldersOverlapped} Found: ${[...o].join(", ")}`);for(let a of t)a.children&&e.push(...n6(i,a.children));return e}function Y0(i){return`${i.name} ${JSON.stringify(i.fixedPosition)}`}function vce(i,t){return w1(i.left,i.top,t)||w1(i.left,i.top+i.height,t)||w1(i.left+i.width,i.top,t)||w1(i.left+i.width,i.top+i.height,t)}function w1(i,t,e){return i>=e.left&&i<=e.left+e.width&&t>=e.top&&t<=e.top+e.height}function yce({fixedPosition:{left:i,top:t,width:e,height:n}}){return i<0||t<0||i+e>100||t+n>100||e<0||n<0}var C1=i=>{i.sort((t,e)=>{let n=t.name.toLowerCase(),r=e.name.toLowerCase();return n>r?1:r>n?-1:0})};var Cp="unary",M1=(i,t)=>{if(i.length===0)return[];let e=new Map,n=new Map,r=new Map;for(let{file:a}of i)for(let s of Ni(a.map))if(Yi(s)&&s.data.path&&!ga(s.data.path,t,"exclude"))for(let l of Object.keys(s.data.attributes)){let c=n.get(l),d=r.get(l);e.get(l)||e.set(l,[]),e.get(l).push(s.data.attributes[l]),(d===void 0||d>=s.data.attributes[l])&&r.set(l,s.data.attributes[l]),(c===void 0||c<=s.data.attributes[l])&&n.set(l,s.data.attributes[l])}let o=[];n.set(Cp,1),r.set(Cp,1);for(let[a,s]of n)o.push({name:a,values:e.get(a),maxValue:s,minValue:r.get(a)});return C1(o),o};var J0={decorateMap(i,t,e){for(let{data:n}of Ni(i)){n.isFlattened=!1,n.isExcluded=!1;for(let r of e)r.type==="flatten"?n.isFlattened=n.isFlattened||YB(n,r.path):n.isExcluded=n.isExcluded||YB(n,r.path)&&Yi(n)}i.isExcluded=!1,this.decorateMapWithMetricData(i,t)},decorateMapWithMetricData(i,t){let{nodeMetricData:e,edgeMetricData:n}=t,r=0;for(let{data:o}of Ni(i)){o.id=r,r++,o.attributes===void 0&&(o.attributes={}),Yi(o)&&(o.attributes[Cp]=1);for(let a of e)o.attributes[a.name]===void 0&&(o.attributes[a.name]=0),o.deltas!==void 0&&o.deltas[a.name]===void 0&&(o.deltas[a.name]=0);o.edgeAttributes===void 0&&(o.edgeAttributes={});for(let a of n)o.edgeAttributes[a.name]===void 0&&(o.edgeAttributes[a.name]={incoming:0,outgoing:0});xce(o)}},decorateMapWithPathAttribute(i){for(let t of Ni(i.map))t.data.path=t.parent?`${t.parent.data.path}/${t.data.name}`:`/${t.data.name}`;return i},decorateParentNodesWithAggregatedAttributes(i,t,e){let n=new Map,r=Object.keys(i.attributes),o=Object.keys(i.edgeAttributes);Ni(i).eachAfter(function({data:s,parent:l}){if(!(s.isExcluded||!l)){for(let c of r){let d=`${c}${s.path}`,h=`${c}${l.data.path}`;e.nodes[c]===al.relative?(Cce(n,d,h,s,c,t),wce(n,h,s,c,t)):(l.data.attributes[c]+=s.attributes[c],t&&l.data.deltas&&(l.data.deltas[c]=l.data.deltas[c]??0,l.data.deltas[c]+=s.deltas[c]??0))}t&&l.data.fileCount&&(l.data.fileCount.added+=s.fileCount.added,l.data.fileCount.changed+=s.fileCount.changed,l.data.fileCount.removed+=s.fileCount.removed);for(let c of o){let d=s.edgeAttributes[c];if(!d)continue;let h=`${c}${s.path}`,u=`${c}${l.data.path}`;e.edges[c]===al.relative?(o6(n,`INCOMING${h}`,`INCOMING${u}`,s,c,"incoming"),o6(n,`OUTGOING${h}`,`OUTGOING${u}`,s,c,"outgoing"),r6(n,`INCOMING${u}`,s,c,"incoming"),r6(n,`OUTGOING${u}`,s,c,"outgoing")):(l.data.edgeAttributes[c].incoming+=d.incoming,l.data.edgeAttributes[c].outgoing+=d.outgoing)}}});for(let a of o)e.edges[a]===al.relative&&(i.edgeAttributes[a].incoming=Df(n.get(`INCOMING${a}${i.path}`)),i.edgeAttributes[a].outgoing=Df(n.get(`OUTGOING${a}${i.path}`)));for(let a of r)e.nodes[a]===al.relative&&(i.attributes[a]=Df(n.get(`MEDIAN${a}${i.path}`)),t&&i.deltas&&(i.deltas[a]=Df(n.get(`DELTA${a}${i.path}`))))}};function xce(i){if(!(i.children?.length===1&&i.children[0]?.fixedPosition)&&i.children?.length===1&&i.children[0].children?.length>0){let[t]=i.children;i.children=t.children,i.name+=`/${t.name}`,i.path+=`/${t.name}`,t.link&&(i.link=t.link)}}function r6(i,t,e,n,r){e.edgeAttributes[n][r]!==0&&eF(i,t,e,e.edgeAttributes[n][r])}function wce(i,t,e,n,r){e.attributes[n]!==0&&eF(i,`MEDIAN${t}`,e,e.attributes[n]),r&&e.deltas&&e.deltas[n]!==0&&eF(i,`DELTA${t}`,e,e.deltas[n])}function Cce(i,t,e,n,r,o){if(Yi(n))return;let a=i.get(`MEDIAN${t}`);if(a!==void 0&&(n.attributes[r]=Df(a),JB(i,`MEDIAN${e}`,a)),o&&n.deltas){let s=i.get(`DELTA${t}`);s!==void 0&&(n.deltas[r]=Df(s),JB(i,`DELTA${e}`,s))}}function o6(i,t,e,n,r,o){if(Yi(n))return;let a=i.get(t);a!==void 0&&(n.edgeAttributes[r][o]=Df(a),JB(i,e,a))}function JB(i,t,e){let n=i.get(t);n===void 0?i.set(t,e):Sce(n,e)}function eF(i,t,e,n){let r=i.get(t);r===void 0?i.set(t,[n]):Yi(e)&&Mce(r,n)}function Df(i){if(i===void 0||i.length===0)return 0;let t=(i.length-1)/2;return(i[Math.floor(t)]+i[Math.ceil(t)])/2}function Mce(i,t){let e=0,n=i.length-1,r=0;if(n<0||i[n]<=t){i.push(t);return}if(i[0]>=t){i.unshift(t);return}for(;e<=n;)if(r=Math.floor((e+n)/2),i[r]<t)e=r+1;else if(n=r-1,i[n]<=t){i.splice(r,0,t);return}}function Sce(i,t){let e=0;for(let n=0;n<i.length;n++){let r=0;for(;i[n]>t[e]&&(r++,e++,e!==t.length););if(r>0&&(i.splice(n,0,...t.slice(e-r,e)),e===t.length))return}i.push(...t.slice(e))}function tF(i){return{fileName:i.fileMeta.fileName,fileSize:i.fileMeta.exportedFileSize,content:Ece(i)}}function Ece(i){return{projectName:i.fileMeta.projectName,apiVersion:i.fileMeta.apiVersion,fileChecksum:i.fileMeta.fileChecksum,nodes:[i.map],attributeTypes:i.settings.fileSettings.attributeTypes,attributeDescriptors:i.settings.fileSettings.attributeDescriptors,edges:i.settings.fileSettings.edges,markedPackages:i.settings.fileSettings.markedPackages,blacklist:i.settings.fileSettings.blacklist.map(t=>{switch(t.type){case"flatten":return{path:t.path,type:"hide"};case"exclude":return{path:t.path,type:t.type}}})}}function a6(i,t,e,n,r,o){let a=!1;for(let s of e){let l={fileName:s?.fileName,errors:[],warnings:[]};l.warnings.push(...Z8(s?.content)),l.errors.push(...e6(s?.content)),l.errors.length===0&&(l.warnings.push(...J8(s?.content)),Tce(i,t,s,r,o)&&(a=!0)),(l.errors.length>0||l.warnings.length>0)&&n.push(l)}return a}function Tce(i,t,e,n,r){n()&&(i.length=0,r(),localStorage.removeItem("scenarios"));let o=_N(e);J0.decorateMapWithPathAttribute(o);let a=o.fileMeta.fileChecksum,s=o.fileMeta.fileName,l=new Map(i.map(h=>[h.file.fileMeta.fileName,h.file.fileMeta.fileChecksum])),c=new Map(i.map((h,u)=>[h.file.fileMeta.fileChecksum,u])),d=c.has(a);return l.has(s)&&(s=Bce(s,l,a),o.fileMeta.fileName=s),d?(i[c.get(a)].file.fileMeta.fileName=s,t.unshift(s),!1):(i.push({file:o,selectedAs:vi.None}),t.push(s),!0)}function Bce(i,t,e){if(t.get(i)===e)return i;let n=!1,r=1,o=i;for(;!n;){let a=i.indexOf(".");o=a>=0?[i.slice(0,a),"_",r,i.slice(a)].join(""):`${i}_${r}`,(t.get(o)===e||!t.has(o))&&(n=!0),r++}return o}var _a={rootName:"root",rootPath:"/root",updateRoot(i){this.rootName=i,this.rootPath=`/${i}`}};var ud=et("CURRENT_FILES_ARE_SAMPLE_FILES",rt());var S1="File(s) could not be loaded",Fce="File(s) are already loaded",ul=(()=>{class i{static{this.CC_FILE_EXTENSION=".cc.json"}constructor(e,n,r){this.store=e,this.state=n,this.dialog=r,this.referenceFileSubscription=this.store.select(ky).pipe(Oi(o=>{o&&_a.updateRoot(o.map.name)})).subscribe()}ngOnDestroy(){this.referenceFileSubscription.unsubscribe()}loadFiles(e){let n=Po(this.state.getValue().files),r=[],o=[],a=a6(n,r,e,o,()=>this.state.getValue().appStatus.currentFilesAreSampleFiles,()=>this.store.dispatch(ud({value:!1})));if(o.length>0&&this.dialog.open(es,{data:dN(o)}),r.length===0)throw new Error(S1);this.store.dispatch(od({value:n}));let s=r[0],l=this.state.getValue().files.find(c=>c.file.fileMeta.fileName===s).file.map.name;if(this.store.dispatch(D0({fileNames:r})),_a.updateRoot(l),!a)throw new Error(Fce)}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie),Me(bi),Me(fn))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Ice=/_\d{4}(?:-\d{1,2}){2}_\d{1,2}-\d{1,2}\./,Na=(()=>{class i{static{this.JSON_EXTENSION=".json"}static getNewFileName(e,n){return`${this.getFileNameWithoutTimestamp(e,n)}_${this.getNewTimestamp()}`}static getNewTimestamp(){let e=new Date;return i.getFormattedTimestamp(e)}static getFormattedTimestamp(e){return e.toISOString().slice(0,16).replace("T","_").replace(":","-")}static getFileNameWithoutTimestamp(e,n){if(!n){let r=Ice.exec(e);if(r)return e.slice(0,r.index);if(e.endsWith(ul.CC_FILE_EXTENSION))return e.slice(0,-ul.CC_FILE_EXTENSION.length);if(e.endsWith(i.JSON_EXTENSION))return e.slice(0,-i.JSON_EXTENSION.length)}return e}static withoutCCExtension(e){return e.replace(/(\.cc)?(\.json)?(\.gz)?$/,"")}}return i})();var xu=class{static downloadCurrentMap(t,e,n,r,o){let a=this.getProjectDataAsCCJsonFormat(t,e,n,r),s=o+ul.CC_FILE_EXTENSION;this.downloadData(JSON.stringify(a),s)}static getProjectDataAsCCJsonFormat(t,e,n,r){return{projectName:e.projectName,apiVersion:e.apiVersion,fileChecksum:e.fileChecksum,nodes:[this.undecorateMap(t)],attributeTypes:r.includes("AttributeTypes")?this.getAttributeTypesForJSON(n.attributeTypes):{},attributeDescriptors:r.includes("AttributeDescriptors")?this.getAttributeDescriptorsForJSON(n.attributeDescriptors):{},edges:r.includes("Edges")?this.undecorateEdges(n.edges):[],markedPackages:r.includes("MarkedPackages")?n.markedPackages:[],blacklist:this.getBlacklistToDownload(r,n.blacklist)}}static getBlacklistToDownload(t,e){let n=[];return t.includes("Flattens")&&n.push(...this.getFilteredBlacklist(e,"flatten").map(r=>({path:r.path,type:"hide"}))),t.includes("Excludes")&&n.push(...this.getFilteredBlacklist(e,"exclude")),n}static getAttributeTypesForJSON(t){return Object.keys(t.edges).length===0&&Object.keys(t.nodes).length===0?{}:t}static getAttributeDescriptorsForJSON(t){return Object.keys(t).length===0?{}:t}static getFilteredBlacklist(t,e){return t.filter(n=>n.type===e)}static undecorateMap(t){let e=Po(t);for(let{data:n}of Ni(e))delete n.isExcluded,delete n.isFlattened,delete n.edgeAttributes,delete n.path,n.type===Zn.FOLDER?n.attributes={}:delete n.attributes[Cp];return e}static undecorateEdges(t){let e=Po(t);for(let n of e)delete n.visible;return e}static downloadData(t,e){let n=new Blob([t],{type:"text/json"}),r=document.createEvent("MouseEvents"),o=document.createElement("a");o.download=e,o.href=window.URL.createObjectURL(n),o.dataset.downloadurl=["text/json",o.download,o.href].join(":"),r.initMouseEvent("click",!0,!1,window,0,0,0,0,0,!1,!1,!1,!1,0,null),o.dispatchEvent(r)}};var ts=et("SET_STATE",rt());function s6(i){return i.type===ts.type}var nF=".cc.config.json",Dce="1.0.1",kce="1.0.1",l6="CodeCharta::customConfigs",Bn=class i{static{this.customConfigs=i.loadCustomConfigsFromLocalStorage()}static{this.customConfigChange$=new Ol(null)}static setCustomConfigsToLocalStorage(){let t={version:Dce,customConfigs:[...i.customConfigs]};localStorage.setItem(l6,JSON.stringify(t,Af)),i.customConfigChange$.next(null)}static loadCustomConfigsFromLocalStorage(){let t=this.getCcLocalStorage();return new Map(t?.customConfigs)}static getCcLocalStorage(){return JSON.parse(localStorage.getItem(l6),PT)}static addCustomConfig(t){i.customConfigs.set(t.id,t),i.setCustomConfigsToLocalStorage()}static editCustomConfigNote(t,e){let n=i.customConfigs.get(t);n.note=e,i.customConfigs.set(t,n),i.setCustomConfigsToLocalStorage()}static getCustomConfigSettings(t){return i.customConfigs.get(t)}static hasCustomConfigByName(t,e,n){for(let r of i.customConfigs.values())if(r.name===n&&r.mapSelectionMode===t&&this.areEqual(e,r.assignedMaps))return!0;return!1}static areEqual(t,e){return t.size!==e.size?!1:[...t.entries()].every(([n,r])=>e.has(n)&&e.get(n)===r)}static getCustomConfigs(){return i.customConfigs}static importCustomConfigs(t){let e=JSON.parse(t,PT);for(let n of e.customConfigs.values()){if(i.getCustomConfigSettings(n.id))continue;i.hasCustomConfigByName(n.mapSelectionMode,n.assignedMaps,n.name)&&(n.name+=` (${Na.getFormattedTimestamp(new Date(n.creationTime))})`);let o=$e({id:n.id,name:n.name,creationTime:n.creationTime,assignedMaps:n.assignedMaps,customConfigVersion:n.customConfigVersion,mapSelectionMode:n.mapSelectionMode,stateSettings:n.stateSettings,camera:n.camera},n.note&&{note:n.note});i.addCustomConfig(o)}}static downloadCustomConfigs(t){let e={downloadApiVersion:kce,timestamp:Date.now(),customConfigs:t},n=Na.getNewTimestamp()+nF;xu.downloadData(JSON.stringify(e,Af),n)}static createExportCustomConfigFromConfig(t){return $e({},t)}static getCustomConfigsAmountByMapAndMode(t,e){let n=0;for(let r of i.customConfigs.values())[...r.assignedMaps.values()].join(" ")===t&&r.mapSelectionMode===e&&n++;return n}static getConfigNameSuggestionByFileState({mapSelectionMode:t,assignedMaps:e}){let n=[...e.values()].join(" "),r=i.getCustomConfigsAmountByMapAndMode(n,t)+1;return`${n} #${r}`}static deleteCustomConfigs(t){for(let e of t)i.customConfigs.delete(e.id);i.setCustomConfigsToLocalStorage()}static deleteCustomConfig(t){i.customConfigs.delete(t),i.setCustomConfigsToLocalStorage()}static sortCustomConfigDropDownGroupList(t,e){if(!e.hasApplicableItems){if(t.hasApplicableItems||t.mapSelectionMode<e.mapSelectionMode)return-1;if(t.mapSelectionMode===e.mapSelectionMode)return 0}return 1}static applyCustomConfig(t,e,n,r,o){let a=this.getCustomConfigSettings(t);e.dispatch(ts({value:a.stateSettings})),a.camera&&(n.setPosition(a.camera.camera),r.setControlTarget(a.camera.cameraTarget)),o.render()}};var E1=()=>{let i=document.createElement("INPUT");return i.setAttribute("type","file"),i.setAttribute("accept",".json,.gz"),i.setAttribute("multiple",""),document.body.appendChild(i),i};var u6=el(Jy());var Mp="base";function h6(i){let{gameObjectPositions:t,cycles:e=[]}=JSON.parse(i),n={checksum:"",data:{projectName:"GameObjects",fileChecksum:"",apiVersion:"1.3",nodes:[]}},r=[{name:Mp,type:Zn.FOLDER,attributes:{},children:[]}];Pce(t);let o=t.find(s=>s.name==="root"),a=Vce(o.scale);t.push(a);for(let s of t){let l=s.name.split(".");l[0]!==Mp&&f6(l,r[0].children,Mp,s,t,o)}return n.data.nodes=r,n.data.edges=e.map(s=>Uce(s)),n.data.attributeTypes=Hce(),n.checksum=(0,u6.default)(JSON.stringify(n.data)),n}function Pce(i){for(let t of i)t.name.startsWith("root")||(t.name=t.name.startsWith(".")?`root${t.name}`:`root.${t.name}`)}function f6(i,t,e,n,r,o){if(i.length===0)return;let[a]=i,s={name:a,type:c6(i)?Zn.FILE:Zn.FOLDER,attributes:{}};c6(i)?s=Oce(a,s,n):s.children=[],Rce(t,a)?s=t.find(d=>d.name===a):t.push(s);let l=r.find(d=>d.name===e);s.fixedPosition=Lce(s,l,n,o.name);let c=e===Mp?s.name:`${e}.${s.name}`;f6(i.slice(1),s.children,c,n,r,o)}function c6(i){return i.length===1}function Rce(i,t){return i.some(e=>e.name===t)}function Oce(i,t,e){let n=$e({},t);return n.attributes={height:e.scale.y},{name:i,type:Zn.FOLDER,attributes:{},children:[n]}}function Lce(i,t,e,n){let r;if(i.type===Zn.FOLDER){let o=t.position.x-t.scale.x/2,a=t.position.z-t.scale.z/2,s=e.position.x-e.scale.x/2,l=e.position.z-e.scale.z/2,c=T1((s-o)/t.scale.x*100,2),d=T1((l-a)/t.scale.z*100,2),h=T1(e.scale.z/t.scale.z*100,2),u=T1(e.scale.x/t.scale.x*100,2);r={left:d,top:c,width:h,height:u}}return i.name===n&&(r=Nce(r)),r}function T1(i,t){let e=Math.pow(10,t);return Math.round(i*e)/e}function Nce(i){let t=$e({},i);return t.top=Math.floor(50-t.height/2),t.left=Math.floor(50-t.width/2),t}function d6(i){let t=i.replaceAll(".","/"),n=i.split(".").slice(-1);return`/${Mp}/${t}/${n}`}function Uce(i){return{fromNodeName:d6(i.from),toNodeName:d6(i.to),attributes:{coupling:100}}}function Hce(){return{edges:{coupling:al.relative}}}function Vce(i){let t=Math.max(i.x,i.z);return{name:Mp,position:{x:0,y:0,z:0},scale:{x:t,y:0,z:t}}}var p6=el(QB());var m6={$id:"http://example.com/example.json",$schema:"http://json-schema.org/draft-07/schema",default:{},description:"This is the JSON Schema for the GameObjectsPositions structure",examples:[{gameObjectPositions:[{name:"root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.HelloWorldTest",position:{x:69,y:18.5,z:228.5},scale:{x:9,y:5,z:9}},{name:"root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.TryCatchFinallyTest",position:{x:66,y:22.5,z:177.5},scale:{x:1,y:13,z:1}}],cycles:[{from:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParser",to:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParserParameter"}]}],required:["gameObjectPositions"],title:"The root schema",type:"object",properties:{gameObjectPositions:{$id:"#/properties/gameObjectPositions",type:"array",title:"The gameObjectPositions schema",description:"Defines the position and scale of GameObjects",default:[],examples:[[{name:"root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.HelloWorldTest",position:{x:69,y:18.5,z:228.5},scale:{x:9,y:5,z:9}},{name:"root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.SwitchCaseTest",position:{x:65,y:22,z:181},scale:{x:2,y:12,z:2}}]],additionalItems:!0,items:{$id:"#/properties/gameObjectPositions/items",anyOf:[{$id:"#/properties/gameObjectPositions/items/anyOf/0",type:"object",title:"The first anyOf schema",description:"Defines the properties of a GameObject",default:{},examples:[{name:"root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.HelloWorldTest",position:{x:69,y:18.5,z:228.5},scale:{x:9,y:5,z:9}}],required:["name","position","scale"],properties:{name:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/name",type:"string",title:"The name schema",description:"An explanation about the purpose of this instance.",default:"",examples:["root.analysis.import.SourceCodeParser.src.test.kotlin.de.maibornwolff.codecharta.analysis.importer.sourcecodeparser.oop.core.extract.HelloWorldTest"]},position:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/position",type:"object",title:"The position schema",description:"The position in absolute values",default:{},examples:[{x:69,y:18.5,z:228.5}],required:["x","y","z"],properties:{x:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/position/properties/x",type:"number",title:"The x schema",description:"x position",default:0,examples:[69]},y:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/position/properties/y",type:"number",title:"The y schema",description:"y position",default:0,examples:[18.5]},z:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/position/properties/z",type:"number",title:"The z schema",description:"z position",default:0,examples:[228.5]}},additionalProperties:!0},scale:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/scale",type:"object",title:"The scale schema",description:"The scale of GameObjects",default:{},examples:[{x:9,y:5,z:9}],required:["x","y","z"],properties:{x:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/scale/properties/x",type:"number",title:"The x schema",description:"x scale",default:0,examples:[9]},y:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/scale/properties/y",type:"number",title:"The y schema",description:"y scale",default:0,examples:[5]},z:{$id:"#/properties/gameObjectPositions/items/anyOf/0/properties/scale/properties/z",type:"number",title:"The z schema",description:"z scale",default:0,examples:[9]}},additionalProperties:!0}},additionalProperties:!0}]}},cycles:{$id:"#/properties/cycles",type:"array",title:"The cycles schema",description:"Defines the cycles between GameObjects",default:[],examples:[[{from:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParser",to:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParserParameter"}]],additionalItems:!0,items:{$id:"#/properties/cycles/items",anyOf:[{$id:"#/properties/cycles/items/anyOf/0",type:"object",title:"The first anyOf schema",description:"A cycle between two GameObjects",default:{},examples:[{from:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParser",to:"root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParserParameter"}],required:["from","to"],properties:{from:{$id:"#/properties/cycles/items/anyOf/0/properties/from",type:"string",title:"The from schema",description:"from GameObject",default:"",examples:["root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParser"]},to:{$id:"#/properties/cycles/items/anyOf/0/properties/to",type:"string",title:"The to schema",description:"to GameObject",default:"",examples:["root.analysis.import.SCMLogParser.src.main.java.de.maibornwolff.codecharta.analysis.importer.scmlogparser.SCMLogParserParameter"]}},additionalProperties:!0}]}}},additionalProperties:!0};function A6(i){return new p6.default({allErrors:!0}).validate(m6,JSON.parse(i))}function Ip(i){let t=i.length;for(;--t>=0;)i[t]=0}var zce=0,t7=1,qce=2,Gce=3,Wce=258,EF=29,m_=256,a_=m_+1+EF,Tp=30,TF=19,i7=2*a_+1,kf=15,rF=16,jce=7,BF=256,n7=16,r7=17,o7=18,_F=new Uint8Array([0,0,0,0,0,0,0,0,1,1,1,1,2,2,2,2,3,3,3,3,4,4,4,4,5,5,5,5,0]),P1=new Uint8Array([0,0,0,0,1,1,2,2,3,3,4,4,5,5,6,6,7,7,8,8,9,9,10,10,11,11,12,12,13,13]),$ce=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,2,3,7]),a7=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]),Xce=512,fd=new Array((a_+2)*2);Ip(fd);var n_=new Array(Tp*2);Ip(n_);var s_=new Array(Xce);Ip(s_);var l_=new Array(Wce-Gce+1);Ip(l_);var FF=new Array(EF);Ip(FF);var R1=new Array(Tp);Ip(R1);function oF(i,t,e,n,r){this.static_tree=i,this.extra_bits=t,this.extra_base=e,this.elems=n,this.max_length=r,this.has_stree=i&&i.length}var s7,l7,c7;function aF(i,t){this.dyn_tree=i,this.max_code=0,this.stat_desc=t}var d7=i=>i<256?s_[i]:s_[256+(i>>>7)],c_=(i,t)=>{i.pending_buf[i.pending++]=t&255,i.pending_buf[i.pending++]=t>>>8&255},Ua=(i,t,e)=>{i.bi_valid>rF-e?(i.bi_buf|=t<<i.bi_valid&65535,c_(i,i.bi_buf),i.bi_buf=t>>rF-i.bi_valid,i.bi_valid+=e-rF):(i.bi_buf|=t<<i.bi_valid&65535,i.bi_valid+=e)},ec=(i,t,e)=>{Ua(i,e[t*2],e[t*2+1])},u7=(i,t)=>{let e=0;do e|=i&1,i>>>=1,e<<=1;while(--t>0);return e>>>1},Kce=i=>{i.bi_valid===16?(c_(i,i.bi_buf),i.bi_buf=0,i.bi_valid=0):i.bi_valid>=8&&(i.pending_buf[i.pending++]=i.bi_buf&255,i.bi_buf>>=8,i.bi_valid-=8)},Yce=(i,t)=>{let e=t.dyn_tree,n=t.max_code,r=t.stat_desc.static_tree,o=t.stat_desc.has_stree,a=t.stat_desc.extra_bits,s=t.stat_desc.extra_base,l=t.stat_desc.max_length,c,d,h,u,f,_,y=0;for(u=0;u<=kf;u++)i.bl_count[u]=0;for(e[i.heap[i.heap_max]*2+1]=0,c=i.heap_max+1;c<i7;c++)d=i.heap[c],u=e[e[d*2+1]*2+1]+1,u>l&&(u=l,y++),e[d*2+1]=u,!(d>n)&&(i.bl_count[u]++,f=0,d>=s&&(f=a[d-s]),_=e[d*2],i.opt_len+=_*(u+f),o&&(i.static_len+=_*(r[d*2+1]+f)));if(y!==0){do{for(u=l-1;i.bl_count[u]===0;)u--;i.bl_count[u]--,i.bl_count[u+1]+=2,i.bl_count[l]--,y-=2}while(y>0);for(u=l;u!==0;u--)for(d=i.bl_count[u];d!==0;)h=i.heap[--c],!(h>n)&&(e[h*2+1]!==u&&(i.opt_len+=(u-e[h*2+1])*e[h*2],e[h*2+1]=u),d--)}},h7=(i,t,e)=>{let n=new Array(kf+1),r=0,o,a;for(o=1;o<=kf;o++)r=r+e[o-1]<<1,n[o]=r;for(a=0;a<=t;a++){let s=i[a*2+1];s!==0&&(i[a*2]=u7(n[s]++,s))}},Zce=()=>{let i,t,e,n,r,o=new Array(kf+1);for(e=0,n=0;n<EF-1;n++)for(FF[n]=e,i=0;i<1<<_F[n];i++)l_[e++]=n;for(l_[e-1]=n,r=0,n=0;n<16;n++)for(R1[n]=r,i=0;i<1<<P1[n];i++)s_[r++]=n;for(r>>=7;n<Tp;n++)for(R1[n]=r<<7,i=0;i<1<<P1[n]-7;i++)s_[256+r++]=n;for(t=0;t<=kf;t++)o[t]=0;for(i=0;i<=143;)fd[i*2+1]=8,i++,o[8]++;for(;i<=255;)fd[i*2+1]=9,i++,o[9]++;for(;i<=279;)fd[i*2+1]=7,i++,o[7]++;for(;i<=287;)fd[i*2+1]=8,i++,o[8]++;for(h7(fd,a_+1,o),i=0;i<Tp;i++)n_[i*2+1]=5,n_[i*2]=u7(i,5);s7=new oF(fd,_F,m_+1,a_,kf),l7=new oF(n_,P1,0,Tp,kf),c7=new oF(new Array(0),$ce,0,TF,jce)},f7=i=>{let t;for(t=0;t<a_;t++)i.dyn_ltree[t*2]=0;for(t=0;t<Tp;t++)i.dyn_dtree[t*2]=0;for(t=0;t<TF;t++)i.bl_tree[t*2]=0;i.dyn_ltree[BF*2]=1,i.opt_len=i.static_len=0,i.sym_next=i.matches=0},m7=i=>{i.bi_valid>8?c_(i,i.bi_buf):i.bi_valid>0&&(i.pending_buf[i.pending++]=i.bi_buf),i.bi_buf=0,i.bi_valid=0},g6=(i,t,e,n)=>{let r=t*2,o=e*2;return i[r]<i[o]||i[r]===i[o]&&n[t]<=n[e]},sF=(i,t,e)=>{let n=i.heap[e],r=e<<1;for(;r<=i.heap_len&&(r<i.heap_len&&g6(t,i.heap[r+1],i.heap[r],i.depth)&&r++,!g6(t,n,i.heap[r],i.depth));)i.heap[e]=i.heap[r],e=r,r<<=1;i.heap[e]=n},_6=(i,t,e)=>{let n,r,o=0,a,s;if(i.sym_next!==0)do n=i.pending_buf[i.sym_buf+o++]&255,n+=(i.pending_buf[i.sym_buf+o++]&255)<<8,r=i.pending_buf[i.sym_buf+o++],n===0?ec(i,r,t):(a=l_[r],ec(i,a+m_+1,t),s=_F[a],s!==0&&(r-=FF[a],Ua(i,r,s)),n--,a=d7(n),ec(i,a,e),s=P1[a],s!==0&&(n-=R1[a],Ua(i,n,s)));while(o<i.sym_next);ec(i,BF,t)},bF=(i,t)=>{let e=t.dyn_tree,n=t.stat_desc.static_tree,r=t.stat_desc.has_stree,o=t.stat_desc.elems,a,s,l=-1,c;for(i.heap_len=0,i.heap_max=i7,a=0;a<o;a++)e[a*2]!==0?(i.heap[++i.heap_len]=l=a,i.depth[a]=0):e[a*2+1]=0;for(;i.heap_len<2;)c=i.heap[++i.heap_len]=l<2?++l:0,e[c*2]=1,i.depth[c]=0,i.opt_len--,r&&(i.static_len-=n[c*2+1]);for(t.max_code=l,a=i.heap_len>>1;a>=1;a--)sF(i,e,a);c=o;do a=i.heap[1],i.heap[1]=i.heap[i.heap_len--],sF(i,e,1),s=i.heap[1],i.heap[--i.heap_max]=a,i.heap[--i.heap_max]=s,e[c*2]=e[a*2]+e[s*2],i.depth[c]=(i.depth[a]>=i.depth[s]?i.depth[a]:i.depth[s])+1,e[a*2+1]=e[s*2+1]=c,i.heap[1]=c++,sF(i,e,1);while(i.heap_len>=2);i.heap[--i.heap_max]=i.heap[1],Yce(i,t),h7(e,l,i.bl_count)},b6=(i,t,e)=>{let n,r=-1,o,a=t[1],s=0,l=7,c=4;for(a===0&&(l=138,c=3),t[(e+1)*2+1]=65535,n=0;n<=e;n++)o=a,a=t[(n+1)*2+1],!(++s<l&&o===a)&&(s<c?i.bl_tree[o*2]+=s:o!==0?(o!==r&&i.bl_tree[o*2]++,i.bl_tree[n7*2]++):s<=10?i.bl_tree[r7*2]++:i.bl_tree[o7*2]++,s=0,r=o,a===0?(l=138,c=3):o===a?(l=6,c=3):(l=7,c=4))},v6=(i,t,e)=>{let n,r=-1,o,a=t[1],s=0,l=7,c=4;for(a===0&&(l=138,c=3),n=0;n<=e;n++)if(o=a,a=t[(n+1)*2+1],!(++s<l&&o===a)){if(s<c)do ec(i,o,i.bl_tree);while(--s!==0);else o!==0?(o!==r&&(ec(i,o,i.bl_tree),s--),ec(i,n7,i.bl_tree),Ua(i,s-3,2)):s<=10?(ec(i,r7,i.bl_tree),Ua(i,s-3,3)):(ec(i,o7,i.bl_tree),Ua(i,s-11,7));s=0,r=o,a===0?(l=138,c=3):o===a?(l=6,c=3):(l=7,c=4)}},Jce=i=>{let t;for(b6(i,i.dyn_ltree,i.l_desc.max_code),b6(i,i.dyn_dtree,i.d_desc.max_code),bF(i,i.bl_desc),t=TF-1;t>=3&&i.bl_tree[a7[t]*2+1]===0;t--);return i.opt_len+=3*(t+1)+5+5+4,t},ede=(i,t,e,n)=>{let r;for(Ua(i,t-257,5),Ua(i,e-1,5),Ua(i,n-4,4),r=0;r<n;r++)Ua(i,i.bl_tree[a7[r]*2+1],3);v6(i,i.dyn_ltree,t-1),v6(i,i.dyn_dtree,e-1)},tde=i=>{let t=4093624447,e;for(e=0;e<=31;e++,t>>>=1)if(t&1&&i.dyn_ltree[e*2]!==0)return 0;if(i.dyn_ltree[18]!==0||i.dyn_ltree[20]!==0||i.dyn_ltree[26]!==0)return 1;for(e=32;e<m_;e++)if(i.dyn_ltree[e*2]!==0)return 1;return 0},y6=!1,ide=i=>{y6||(Zce(),y6=!0),i.l_desc=new aF(i.dyn_ltree,s7),i.d_desc=new aF(i.dyn_dtree,l7),i.bl_desc=new aF(i.bl_tree,c7),i.bi_buf=0,i.bi_valid=0,f7(i)},p7=(i,t,e,n)=>{Ua(i,(zce<<1)+(n?1:0),3),m7(i),c_(i,e),c_(i,~e),e&&i.pending_buf.set(i.window.subarray(t,t+e),i.pending),i.pending+=e},nde=i=>{Ua(i,t7<<1,3),ec(i,BF,fd),Kce(i)},rde=(i,t,e,n)=>{let r,o,a=0;i.level>0?(i.strm.data_type===2&&(i.strm.data_type=tde(i)),bF(i,i.l_desc),bF(i,i.d_desc),a=Jce(i),r=i.opt_len+3+7>>>3,o=i.static_len+3+7>>>3,o<=r&&(r=o)):r=o=e+5,e+4<=r&&t!==-1?p7(i,t,e,n):i.strategy===4||o===r?(Ua(i,(t7<<1)+(n?1:0),3),_6(i,fd,n_)):(Ua(i,(qce<<1)+(n?1:0),3),ede(i,i.l_desc.max_code+1,i.d_desc.max_code+1,a+1),_6(i,i.dyn_ltree,i.dyn_dtree)),f7(i),n&&m7(i)},ode=(i,t,e)=>(i.pending_buf[i.sym_buf+i.sym_next++]=t,i.pending_buf[i.sym_buf+i.sym_next++]=t>>8,i.pending_buf[i.sym_buf+i.sym_next++]=e,t===0?i.dyn_ltree[e*2]++:(i.matches++,t--,i.dyn_ltree[(l_[e]+m_+1)*2]++,i.dyn_dtree[d7(t)*2]++),i.sym_next===i.sym_end),ade=ide,sde=p7,lde=rde,cde=ode,dde=nde,ude={_tr_init:ade,_tr_stored_block:sde,_tr_flush_block:lde,_tr_tally:cde,_tr_align:dde},hde=(i,t,e,n)=>{let r=i&65535|0,o=i>>>16&65535|0,a=0;for(;e!==0;){a=e>2e3?2e3:e,e-=a;do r=r+t[n++]|0,o=o+r|0;while(--a);r%=65521,o%=65521}return r|o<<16|0},d_=hde,fde=()=>{let i,t=[];for(var e=0;e<256;e++){i=e;for(var n=0;n<8;n++)i=i&1?3988292384^i>>>1:i>>>1;t[e]=i}return t},mde=new Uint32Array(fde()),pde=(i,t,e,n)=>{let r=mde,o=n+e;i^=-1;for(let a=n;a<o;a++)i=i>>>8^r[(i^t[a])&255];return i^-1},vo=pde,Of={2:"need dictionary",1:"stream end",0:"","-1":"file error","-2":"stream error","-3":"data error","-4":"insufficient memory","-5":"buffer error","-6":"incompatible version"},Dp={Z_NO_FLUSH:0,Z_PARTIAL_FLUSH:1,Z_SYNC_FLUSH:2,Z_FULL_FLUSH:3,Z_FINISH:4,Z_BLOCK:5,Z_TREES:6,Z_OK:0,Z_STREAM_END:1,Z_NEED_DICT:2,Z_ERRNO:-1,Z_STREAM_ERROR:-2,Z_DATA_ERROR:-3,Z_MEM_ERROR:-4,Z_BUF_ERROR:-5,Z_NO_COMPRESSION:0,Z_BEST_SPEED:1,Z_BEST_COMPRESSION:9,Z_DEFAULT_COMPRESSION:-1,Z_FILTERED:1,Z_HUFFMAN_ONLY:2,Z_RLE:3,Z_FIXED:4,Z_DEFAULT_STRATEGY:0,Z_BINARY:0,Z_TEXT:1,Z_UNKNOWN:2,Z_DEFLATED:8},{_tr_init:Ade,_tr_stored_block:vF,_tr_flush_block:gde,_tr_tally:Mu,_tr_align:_de}=ude,{Z_NO_FLUSH:Su,Z_PARTIAL_FLUSH:bde,Z_FULL_FLUSH:vde,Z_FINISH:Bs,Z_BLOCK:x6,Z_OK:Ro,Z_STREAM_END:w6,Z_STREAM_ERROR:tc,Z_DATA_ERROR:yde,Z_BUF_ERROR:lF,Z_DEFAULT_COMPRESSION:xde,Z_FILTERED:wde,Z_HUFFMAN_ONLY:B1,Z_RLE:Cde,Z_FIXED:Mde,Z_DEFAULT_STRATEGY:Sde,Z_UNKNOWN:Ede,Z_DEFLATED:N1}=Dp,Tde=9,Bde=15,Fde=8,Ide=29,Dde=256,yF=Dde+1+Ide,kde=30,Pde=19,Rde=2*yF+1,Ode=15,mn=3,Cu=258,ic=Cu+mn+1,Lde=32,Bp=42,IF=57,xF=69,wF=73,CF=91,MF=103,Pf=113,t_=666,ba=1,kp=2,Lf=3,Pp=4,Nde=3,Rf=(i,t)=>(i.msg=Of[t],t),C6=i=>i*2-(i>4?9:0),wu=i=>{let t=i.length;for(;--t>=0;)i[t]=0},Ude=i=>{let t,e,n,r=i.w_size;t=i.hash_size,n=t;do e=i.head[--n],i.head[n]=e>=r?e-r:0;while(--t);t=r,n=t;do e=i.prev[--n],i.prev[n]=e>=r?e-r:0;while(--t)},Hde=(i,t,e)=>(t<<i.hash_shift^e)&i.hash_mask,Eu=Hde,is=i=>{let t=i.state,e=t.pending;e>i.avail_out&&(e=i.avail_out),e!==0&&(i.output.set(t.pending_buf.subarray(t.pending_out,t.pending_out+e),i.next_out),i.next_out+=e,t.pending_out+=e,i.total_out+=e,i.avail_out-=e,t.pending-=e,t.pending===0&&(t.pending_out=0))},ns=(i,t)=>{gde(i,i.block_start>=0?i.block_start:-1,i.strstart-i.block_start,t),i.block_start=i.strstart,is(i.strm)},Fn=(i,t)=>{i.pending_buf[i.pending++]=t},e_=(i,t)=>{i.pending_buf[i.pending++]=t>>>8&255,i.pending_buf[i.pending++]=t&255},SF=(i,t,e,n)=>{let r=i.avail_in;return r>n&&(r=n),r===0?0:(i.avail_in-=r,t.set(i.input.subarray(i.next_in,i.next_in+r),e),i.state.wrap===1?i.adler=d_(i.adler,t,r,e):i.state.wrap===2&&(i.adler=vo(i.adler,t,r,e)),i.next_in+=r,i.total_in+=r,r)},A7=(i,t)=>{let e=i.max_chain_length,n=i.strstart,r,o,a=i.prev_length,s=i.nice_match,l=i.strstart>i.w_size-ic?i.strstart-(i.w_size-ic):0,c=i.window,d=i.w_mask,h=i.prev,u=i.strstart+Cu,f=c[n+a-1],_=c[n+a];i.prev_length>=i.good_match&&(e>>=2),s>i.lookahead&&(s=i.lookahead);do if(r=t,!(c[r+a]!==_||c[r+a-1]!==f||c[r]!==c[n]||c[++r]!==c[n+1])){n+=2,r++;do;while(c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&c[++n]===c[++r]&&n<u);if(o=Cu-(u-n),n=u-Cu,o>a){if(i.match_start=t,a=o,o>=s)break;f=c[n+a-1],_=c[n+a]}}while((t=h[t&d])>l&&--e!==0);return a<=i.lookahead?a:i.lookahead},Fp=i=>{let t=i.w_size,e,n,r;do{if(n=i.window_size-i.lookahead-i.strstart,i.strstart>=t+(t-ic)&&(i.window.set(i.window.subarray(t,t+t-n),0),i.match_start-=t,i.strstart-=t,i.block_start-=t,i.insert>i.strstart&&(i.insert=i.strstart),Ude(i),n+=t),i.strm.avail_in===0)break;if(e=SF(i.strm,i.window,i.strstart+i.lookahead,n),i.lookahead+=e,i.lookahead+i.insert>=mn)for(r=i.strstart-i.insert,i.ins_h=i.window[r],i.ins_h=Eu(i,i.ins_h,i.window[r+1]);i.insert&&(i.ins_h=Eu(i,i.ins_h,i.window[r+mn-1]),i.prev[r&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=r,r++,i.insert--,!(i.lookahead+i.insert<mn)););}while(i.lookahead<ic&&i.strm.avail_in!==0)},g7=(i,t)=>{let e=i.pending_buf_size-5>i.w_size?i.w_size:i.pending_buf_size-5,n,r,o,a=0,s=i.strm.avail_in;do{if(n=65535,o=i.bi_valid+42>>3,i.strm.avail_out<o||(o=i.strm.avail_out-o,r=i.strstart-i.block_start,n>r+i.strm.avail_in&&(n=r+i.strm.avail_in),n>o&&(n=o),n<e&&(n===0&&t!==Bs||t===Su||n!==r+i.strm.avail_in)))break;a=t===Bs&&n===r+i.strm.avail_in?1:0,vF(i,0,0,a),i.pending_buf[i.pending-4]=n,i.pending_buf[i.pending-3]=n>>8,i.pending_buf[i.pending-2]=~n,i.pending_buf[i.pending-1]=~n>>8,is(i.strm),r&&(r>n&&(r=n),i.strm.output.set(i.window.subarray(i.block_start,i.block_start+r),i.strm.next_out),i.strm.next_out+=r,i.strm.avail_out-=r,i.strm.total_out+=r,i.block_start+=r,n-=r),n&&(SF(i.strm,i.strm.output,i.strm.next_out,n),i.strm.next_out+=n,i.strm.avail_out-=n,i.strm.total_out+=n)}while(a===0);return s-=i.strm.avail_in,s&&(s>=i.w_size?(i.matches=2,i.window.set(i.strm.input.subarray(i.strm.next_in-i.w_size,i.strm.next_in),0),i.strstart=i.w_size,i.insert=i.strstart):(i.window_size-i.strstart<=s&&(i.strstart-=i.w_size,i.window.set(i.window.subarray(i.w_size,i.w_size+i.strstart),0),i.matches<2&&i.matches++,i.insert>i.strstart&&(i.insert=i.strstart)),i.window.set(i.strm.input.subarray(i.strm.next_in-s,i.strm.next_in),i.strstart),i.strstart+=s,i.insert+=s>i.w_size-i.insert?i.w_size-i.insert:s),i.block_start=i.strstart),i.high_water<i.strstart&&(i.high_water=i.strstart),a?Pp:t!==Su&&t!==Bs&&i.strm.avail_in===0&&i.strstart===i.block_start?kp:(o=i.window_size-i.strstart,i.strm.avail_in>o&&i.block_start>=i.w_size&&(i.block_start-=i.w_size,i.strstart-=i.w_size,i.window.set(i.window.subarray(i.w_size,i.w_size+i.strstart),0),i.matches<2&&i.matches++,o+=i.w_size,i.insert>i.strstart&&(i.insert=i.strstart)),o>i.strm.avail_in&&(o=i.strm.avail_in),o&&(SF(i.strm,i.window,i.strstart,o),i.strstart+=o,i.insert+=o>i.w_size-i.insert?i.w_size-i.insert:o),i.high_water<i.strstart&&(i.high_water=i.strstart),o=i.bi_valid+42>>3,o=i.pending_buf_size-o>65535?65535:i.pending_buf_size-o,e=o>i.w_size?i.w_size:o,r=i.strstart-i.block_start,(r>=e||(r||t===Bs)&&t!==Su&&i.strm.avail_in===0&&r<=o)&&(n=r>o?o:r,a=t===Bs&&i.strm.avail_in===0&&n===r?1:0,vF(i,i.block_start,n,a),i.block_start+=n,is(i.strm)),a?Lf:ba)},cF=(i,t)=>{let e,n;for(;;){if(i.lookahead<ic){if(Fp(i),i.lookahead<ic&&t===Su)return ba;if(i.lookahead===0)break}if(e=0,i.lookahead>=mn&&(i.ins_h=Eu(i,i.ins_h,i.window[i.strstart+mn-1]),e=i.prev[i.strstart&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=i.strstart),e!==0&&i.strstart-e<=i.w_size-ic&&(i.match_length=A7(i,e)),i.match_length>=mn)if(n=Mu(i,i.strstart-i.match_start,i.match_length-mn),i.lookahead-=i.match_length,i.match_length<=i.max_lazy_match&&i.lookahead>=mn){i.match_length--;do i.strstart++,i.ins_h=Eu(i,i.ins_h,i.window[i.strstart+mn-1]),e=i.prev[i.strstart&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=i.strstart;while(--i.match_length!==0);i.strstart++}else i.strstart+=i.match_length,i.match_length=0,i.ins_h=i.window[i.strstart],i.ins_h=Eu(i,i.ins_h,i.window[i.strstart+1]);else n=Mu(i,0,i.window[i.strstart]),i.lookahead--,i.strstart++;if(n&&(ns(i,!1),i.strm.avail_out===0))return ba}return i.insert=i.strstart<mn-1?i.strstart:mn-1,t===Bs?(ns(i,!0),i.strm.avail_out===0?Lf:Pp):i.sym_next&&(ns(i,!1),i.strm.avail_out===0)?ba:kp},Sp=(i,t)=>{let e,n,r;for(;;){if(i.lookahead<ic){if(Fp(i),i.lookahead<ic&&t===Su)return ba;if(i.lookahead===0)break}if(e=0,i.lookahead>=mn&&(i.ins_h=Eu(i,i.ins_h,i.window[i.strstart+mn-1]),e=i.prev[i.strstart&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=i.strstart),i.prev_length=i.match_length,i.prev_match=i.match_start,i.match_length=mn-1,e!==0&&i.prev_length<i.max_lazy_match&&i.strstart-e<=i.w_size-ic&&(i.match_length=A7(i,e),i.match_length<=5&&(i.strategy===wde||i.match_length===mn&&i.strstart-i.match_start>4096)&&(i.match_length=mn-1)),i.prev_length>=mn&&i.match_length<=i.prev_length){r=i.strstart+i.lookahead-mn,n=Mu(i,i.strstart-1-i.prev_match,i.prev_length-mn),i.lookahead-=i.prev_length-1,i.prev_length-=2;do++i.strstart<=r&&(i.ins_h=Eu(i,i.ins_h,i.window[i.strstart+mn-1]),e=i.prev[i.strstart&i.w_mask]=i.head[i.ins_h],i.head[i.ins_h]=i.strstart);while(--i.prev_length!==0);if(i.match_available=0,i.match_length=mn-1,i.strstart++,n&&(ns(i,!1),i.strm.avail_out===0))return ba}else if(i.match_available){if(n=Mu(i,0,i.window[i.strstart-1]),n&&ns(i,!1),i.strstart++,i.lookahead--,i.strm.avail_out===0)return ba}else i.match_available=1,i.strstart++,i.lookahead--}return i.match_available&&(n=Mu(i,0,i.window[i.strstart-1]),i.match_available=0),i.insert=i.strstart<mn-1?i.strstart:mn-1,t===Bs?(ns(i,!0),i.strm.avail_out===0?Lf:Pp):i.sym_next&&(ns(i,!1),i.strm.avail_out===0)?ba:kp},Vde=(i,t)=>{let e,n,r,o,a=i.window;for(;;){if(i.lookahead<=Cu){if(Fp(i),i.lookahead<=Cu&&t===Su)return ba;if(i.lookahead===0)break}if(i.match_length=0,i.lookahead>=mn&&i.strstart>0&&(r=i.strstart-1,n=a[r],n===a[++r]&&n===a[++r]&&n===a[++r])){o=i.strstart+Cu;do;while(n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&n===a[++r]&&r<o);i.match_length=Cu-(o-r),i.match_length>i.lookahead&&(i.match_length=i.lookahead)}if(i.match_length>=mn?(e=Mu(i,1,i.match_length-mn),i.lookahead-=i.match_length,i.strstart+=i.match_length,i.match_length=0):(e=Mu(i,0,i.window[i.strstart]),i.lookahead--,i.strstart++),e&&(ns(i,!1),i.strm.avail_out===0))return ba}return i.insert=0,t===Bs?(ns(i,!0),i.strm.avail_out===0?Lf:Pp):i.sym_next&&(ns(i,!1),i.strm.avail_out===0)?ba:kp},Qde=(i,t)=>{let e;for(;;){if(i.lookahead===0&&(Fp(i),i.lookahead===0)){if(t===Su)return ba;break}if(i.match_length=0,e=Mu(i,0,i.window[i.strstart]),i.lookahead--,i.strstart++,e&&(ns(i,!1),i.strm.avail_out===0))return ba}return i.insert=0,t===Bs?(ns(i,!0),i.strm.avail_out===0?Lf:Pp):i.sym_next&&(ns(i,!1),i.strm.avail_out===0)?ba:kp};function Jl(i,t,e,n,r){this.good_length=i,this.max_lazy=t,this.nice_length=e,this.max_chain=n,this.func=r}var i_=[new Jl(0,0,0,0,g7),new Jl(4,4,8,4,cF),new Jl(4,5,16,8,cF),new Jl(4,6,32,32,cF),new Jl(4,4,16,16,Sp),new Jl(8,16,32,32,Sp),new Jl(8,16,128,128,Sp),new Jl(8,32,128,256,Sp),new Jl(32,128,258,1024,Sp),new Jl(32,258,258,4096,Sp)],zde=i=>{i.window_size=2*i.w_size,wu(i.head),i.max_lazy_match=i_[i.level].max_lazy,i.good_match=i_[i.level].good_length,i.nice_match=i_[i.level].nice_length,i.max_chain_length=i_[i.level].max_chain,i.strstart=0,i.block_start=0,i.lookahead=0,i.insert=0,i.match_length=i.prev_length=mn-1,i.match_available=0,i.ins_h=0};function qde(){this.strm=null,this.status=0,this.pending_buf=null,this.pending_buf_size=0,this.pending_out=0,this.pending=0,this.wrap=0,this.gzhead=null,this.gzindex=0,this.method=N1,this.last_flush=-1,this.w_size=0,this.w_bits=0,this.w_mask=0,this.window=null,this.window_size=0,this.prev=null,this.head=null,this.ins_h=0,this.hash_size=0,this.hash_bits=0,this.hash_mask=0,this.hash_shift=0,this.block_start=0,this.match_length=0,this.prev_match=0,this.match_available=0,this.strstart=0,this.match_start=0,this.lookahead=0,this.prev_length=0,this.max_chain_length=0,this.max_lazy_match=0,this.level=0,this.strategy=0,this.good_match=0,this.nice_match=0,this.dyn_ltree=new Uint16Array(Rde*2),this.dyn_dtree=new Uint16Array((2*kde+1)*2),this.bl_tree=new Uint16Array((2*Pde+1)*2),wu(this.dyn_ltree),wu(this.dyn_dtree),wu(this.bl_tree),this.l_desc=null,this.d_desc=null,this.bl_desc=null,this.bl_count=new Uint16Array(Ode+1),this.heap=new Uint16Array(2*yF+1),wu(this.heap),this.heap_len=0,this.heap_max=0,this.depth=new Uint16Array(2*yF+1),wu(this.depth),this.sym_buf=0,this.lit_bufsize=0,this.sym_next=0,this.sym_end=0,this.opt_len=0,this.static_len=0,this.matches=0,this.insert=0,this.bi_buf=0,this.bi_valid=0}var p_=i=>{if(!i)return 1;let t=i.state;return!t||t.strm!==i||t.status!==Bp&&t.status!==IF&&t.status!==xF&&t.status!==wF&&t.status!==CF&&t.status!==MF&&t.status!==Pf&&t.status!==t_?1:0},_7=i=>{if(p_(i))return Rf(i,tc);i.total_in=i.total_out=0,i.data_type=Ede;let t=i.state;return t.pending=0,t.pending_out=0,t.wrap<0&&(t.wrap=-t.wrap),t.status=t.wrap===2?IF:t.wrap?Bp:Pf,i.adler=t.wrap===2?0:1,t.last_flush=-2,Ade(t),Ro},b7=i=>{let t=_7(i);return t===Ro&&zde(i.state),t},Gde=(i,t)=>p_(i)||i.state.wrap!==2?tc:(i.state.gzhead=t,Ro),v7=(i,t,e,n,r,o)=>{if(!i)return tc;let a=1;if(t===xde&&(t=6),n<0?(a=0,n=-n):n>15&&(a=2,n-=16),r<1||r>Tde||e!==N1||n<8||n>15||t<0||t>9||o<0||o>Mde||n===8&&a!==1)return Rf(i,tc);n===8&&(n=9);let s=new qde;return i.state=s,s.strm=i,s.status=Bp,s.wrap=a,s.gzhead=null,s.w_bits=n,s.w_size=1<<s.w_bits,s.w_mask=s.w_size-1,s.hash_bits=r+7,s.hash_size=1<<s.hash_bits,s.hash_mask=s.hash_size-1,s.hash_shift=~~((s.hash_bits+mn-1)/mn),s.window=new Uint8Array(s.w_size*2),s.head=new Uint16Array(s.hash_size),s.prev=new Uint16Array(s.w_size),s.lit_bufsize=1<<r+6,s.pending_buf_size=s.lit_bufsize*4,s.pending_buf=new Uint8Array(s.pending_buf_size),s.sym_buf=s.lit_bufsize,s.sym_end=(s.lit_bufsize-1)*3,s.level=t,s.strategy=o,s.method=e,b7(i)},Wde=(i,t)=>v7(i,t,N1,Bde,Fde,Sde),jde=(i,t)=>{if(p_(i)||t>x6||t<0)return i?Rf(i,tc):tc;let e=i.state;if(!i.output||i.avail_in!==0&&!i.input||e.status===t_&&t!==Bs)return Rf(i,i.avail_out===0?lF:tc);let n=e.last_flush;if(e.last_flush=t,e.pending!==0){if(is(i),i.avail_out===0)return e.last_flush=-1,Ro}else if(i.avail_in===0&&C6(t)<=C6(n)&&t!==Bs)return Rf(i,lF);if(e.status===t_&&i.avail_in!==0)return Rf(i,lF);if(e.status===Bp&&e.wrap===0&&(e.status=Pf),e.status===Bp){let r=N1+(e.w_bits-8<<4)<<8,o=-1;if(e.strategy>=B1||e.level<2?o=0:e.level<6?o=1:e.level===6?o=2:o=3,r|=o<<6,e.strstart!==0&&(r|=Lde),r+=31-r%31,e_(e,r),e.strstart!==0&&(e_(e,i.adler>>>16),e_(e,i.adler&65535)),i.adler=1,e.status=Pf,is(i),e.pending!==0)return e.last_flush=-1,Ro}if(e.status===IF){if(i.adler=0,Fn(e,31),Fn(e,139),Fn(e,8),e.gzhead)Fn(e,(e.gzhead.text?1:0)+(e.gzhead.hcrc?2:0)+(e.gzhead.extra?4:0)+(e.gzhead.name?8:0)+(e.gzhead.comment?16:0)),Fn(e,e.gzhead.time&255),Fn(e,e.gzhead.time>>8&255),Fn(e,e.gzhead.time>>16&255),Fn(e,e.gzhead.time>>24&255),Fn(e,e.level===9?2:e.strategy>=B1||e.level<2?4:0),Fn(e,e.gzhead.os&255),e.gzhead.extra&&e.gzhead.extra.length&&(Fn(e,e.gzhead.extra.length&255),Fn(e,e.gzhead.extra.length>>8&255)),e.gzhead.hcrc&&(i.adler=vo(i.adler,e.pending_buf,e.pending,0)),e.gzindex=0,e.status=xF;else if(Fn(e,0),Fn(e,0),Fn(e,0),Fn(e,0),Fn(e,0),Fn(e,e.level===9?2:e.strategy>=B1||e.level<2?4:0),Fn(e,Nde),e.status=Pf,is(i),e.pending!==0)return e.last_flush=-1,Ro}if(e.status===xF){if(e.gzhead.extra){let r=e.pending,o=(e.gzhead.extra.length&65535)-e.gzindex;for(;e.pending+o>e.pending_buf_size;){let s=e.pending_buf_size-e.pending;if(e.pending_buf.set(e.gzhead.extra.subarray(e.gzindex,e.gzindex+s),e.pending),e.pending=e.pending_buf_size,e.gzhead.hcrc&&e.pending>r&&(i.adler=vo(i.adler,e.pending_buf,e.pending-r,r)),e.gzindex+=s,is(i),e.pending!==0)return e.last_flush=-1,Ro;r=0,o-=s}let a=new Uint8Array(e.gzhead.extra);e.pending_buf.set(a.subarray(e.gzindex,e.gzindex+o),e.pending),e.pending+=o,e.gzhead.hcrc&&e.pending>r&&(i.adler=vo(i.adler,e.pending_buf,e.pending-r,r)),e.gzindex=0}e.status=wF}if(e.status===wF){if(e.gzhead.name){let r=e.pending,o;do{if(e.pending===e.pending_buf_size){if(e.gzhead.hcrc&&e.pending>r&&(i.adler=vo(i.adler,e.pending_buf,e.pending-r,r)),is(i),e.pending!==0)return e.last_flush=-1,Ro;r=0}e.gzindex<e.gzhead.name.length?o=e.gzhead.name.charCodeAt(e.gzindex++)&255:o=0,Fn(e,o)}while(o!==0);e.gzhead.hcrc&&e.pending>r&&(i.adler=vo(i.adler,e.pending_buf,e.pending-r,r)),e.gzindex=0}e.status=CF}if(e.status===CF){if(e.gzhead.comment){let r=e.pending,o;do{if(e.pending===e.pending_buf_size){if(e.gzhead.hcrc&&e.pending>r&&(i.adler=vo(i.adler,e.pending_buf,e.pending-r,r)),is(i),e.pending!==0)return e.last_flush=-1,Ro;r=0}e.gzindex<e.gzhead.comment.length?o=e.gzhead.comment.charCodeAt(e.gzindex++)&255:o=0,Fn(e,o)}while(o!==0);e.gzhead.hcrc&&e.pending>r&&(i.adler=vo(i.adler,e.pending_buf,e.pending-r,r))}e.status=MF}if(e.status===MF){if(e.gzhead.hcrc){if(e.pending+2>e.pending_buf_size&&(is(i),e.pending!==0))return e.last_flush=-1,Ro;Fn(e,i.adler&255),Fn(e,i.adler>>8&255),i.adler=0}if(e.status=Pf,is(i),e.pending!==0)return e.last_flush=-1,Ro}if(i.avail_in!==0||e.lookahead!==0||t!==Su&&e.status!==t_){let r=e.level===0?g7(e,t):e.strategy===B1?Qde(e,t):e.strategy===Cde?Vde(e,t):i_[e.level].func(e,t);if((r===Lf||r===Pp)&&(e.status=t_),r===ba||r===Lf)return i.avail_out===0&&(e.last_flush=-1),Ro;if(r===kp&&(t===bde?_de(e):t!==x6&&(vF(e,0,0,!1),t===vde&&(wu(e.head),e.lookahead===0&&(e.strstart=0,e.block_start=0,e.insert=0))),is(i),i.avail_out===0))return e.last_flush=-1,Ro}return t!==Bs?Ro:e.wrap<=0?w6:(e.wrap===2?(Fn(e,i.adler&255),Fn(e,i.adler>>8&255),Fn(e,i.adler>>16&255),Fn(e,i.adler>>24&255),Fn(e,i.total_in&255),Fn(e,i.total_in>>8&255),Fn(e,i.total_in>>16&255),Fn(e,i.total_in>>24&255)):(e_(e,i.adler>>>16),e_(e,i.adler&65535)),is(i),e.wrap>0&&(e.wrap=-e.wrap),e.pending!==0?Ro:w6)},$de=i=>{if(p_(i))return tc;let t=i.state.status;return i.state=null,t===Pf?Rf(i,yde):Ro},Xde=(i,t)=>{let e=t.length;if(p_(i))return tc;let n=i.state,r=n.wrap;if(r===2||r===1&&n.status!==Bp||n.lookahead)return tc;if(r===1&&(i.adler=d_(i.adler,t,e,0)),n.wrap=0,e>=n.w_size){r===0&&(wu(n.head),n.strstart=0,n.block_start=0,n.insert=0);let l=new Uint8Array(n.w_size);l.set(t.subarray(e-n.w_size,e),0),t=l,e=n.w_size}let o=i.avail_in,a=i.next_in,s=i.input;for(i.avail_in=e,i.next_in=0,i.input=t,Fp(n);n.lookahead>=mn;){let l=n.strstart,c=n.lookahead-(mn-1);do n.ins_h=Eu(n,n.ins_h,n.window[l+mn-1]),n.prev[l&n.w_mask]=n.head[n.ins_h],n.head[n.ins_h]=l,l++;while(--c);n.strstart=l,n.lookahead=mn-1,Fp(n)}return n.strstart+=n.lookahead,n.block_start=n.strstart,n.insert=n.lookahead,n.lookahead=0,n.match_length=n.prev_length=mn-1,n.match_available=0,i.next_in=a,i.input=s,i.avail_in=o,n.wrap=r,Ro},Kde=Wde,Yde=v7,Zde=b7,Jde=_7,eue=Gde,tue=jde,iue=$de,nue=Xde,rue="pako deflate (from Nodeca project)",r_={deflateInit:Kde,deflateInit2:Yde,deflateReset:Zde,deflateResetKeep:Jde,deflateSetHeader:eue,deflate:tue,deflateEnd:iue,deflateSetDictionary:nue,deflateInfo:rue},oue=(i,t)=>Object.prototype.hasOwnProperty.call(i,t),aue=function(i){let t=Array.prototype.slice.call(arguments,1);for(;t.length;){let e=t.shift();if(e){if(typeof e!="object")throw new TypeError(e+"must be non-object");for(let n in e)oue(e,n)&&(i[n]=e[n])}}return i},sue=i=>{let t=0;for(let n=0,r=i.length;n<r;n++)t+=i[n].length;let e=new Uint8Array(t);for(let n=0,r=0,o=i.length;n<o;n++){let a=i[n];e.set(a,r),r+=a.length}return e},U1={assign:aue,flattenChunks:sue},y7=!0;try{String.fromCharCode.apply(null,new Uint8Array(1))}catch{y7=!1}var u_=new Uint8Array(256);for(let i=0;i<256;i++)u_[i]=i>=252?6:i>=248?5:i>=240?4:i>=224?3:i>=192?2:1;u_[254]=u_[254]=1;var lue=i=>{if(typeof TextEncoder=="function"&&TextEncoder.prototype.encode)return new TextEncoder().encode(i);let t,e,n,r,o,a=i.length,s=0;for(r=0;r<a;r++)e=i.charCodeAt(r),(e&64512)===55296&&r+1<a&&(n=i.charCodeAt(r+1),(n&64512)===56320&&(e=65536+(e-55296<<10)+(n-56320),r++)),s+=e<128?1:e<2048?2:e<65536?3:4;for(t=new Uint8Array(s),o=0,r=0;o<s;r++)e=i.charCodeAt(r),(e&64512)===55296&&r+1<a&&(n=i.charCodeAt(r+1),(n&64512)===56320&&(e=65536+(e-55296<<10)+(n-56320),r++)),e<128?t[o++]=e:e<2048?(t[o++]=192|e>>>6,t[o++]=128|e&63):e<65536?(t[o++]=224|e>>>12,t[o++]=128|e>>>6&63,t[o++]=128|e&63):(t[o++]=240|e>>>18,t[o++]=128|e>>>12&63,t[o++]=128|e>>>6&63,t[o++]=128|e&63);return t},cue=(i,t)=>{if(t<65534&&i.subarray&&y7)return String.fromCharCode.apply(null,i.length===t?i:i.subarray(0,t));let e="";for(let n=0;n<t;n++)e+=String.fromCharCode(i[n]);return e},due=(i,t)=>{let e=t||i.length;if(typeof TextDecoder=="function"&&TextDecoder.prototype.decode)return new TextDecoder().decode(i.subarray(0,t));let n,r,o=new Array(e*2);for(r=0,n=0;n<e;){let a=i[n++];if(a<128){o[r++]=a;continue}let s=u_[a];if(s>4){o[r++]=65533,n+=s-1;continue}for(a&=s===2?31:s===3?15:7;s>1&&n<e;)a=a<<6|i[n++]&63,s--;if(s>1){o[r++]=65533;continue}a<65536?o[r++]=a:(a-=65536,o[r++]=55296|a>>10&1023,o[r++]=56320|a&1023)}return cue(o,r)},uue=(i,t)=>{t=t||i.length,t>i.length&&(t=i.length);let e=t-1;for(;e>=0&&(i[e]&192)===128;)e--;return e<0||e===0?t:e+u_[i[e]]>t?e:t},h_={string2buf:lue,buf2string:due,utf8border:uue};function hue(){this.input=null,this.next_in=0,this.avail_in=0,this.total_in=0,this.output=null,this.next_out=0,this.avail_out=0,this.total_out=0,this.msg="",this.state=null,this.data_type=2,this.adler=0}var x7=hue,w7=Object.prototype.toString,{Z_NO_FLUSH:fue,Z_SYNC_FLUSH:mue,Z_FULL_FLUSH:pue,Z_FINISH:Aue,Z_OK:O1,Z_STREAM_END:gue,Z_DEFAULT_COMPRESSION:_ue,Z_DEFAULT_STRATEGY:bue,Z_DEFLATED:vue}=Dp;function A_(i){this.options=U1.assign({level:_ue,method:vue,chunkSize:16384,windowBits:15,memLevel:8,strategy:bue},i||{});let t=this.options;t.raw&&t.windowBits>0?t.windowBits=-t.windowBits:t.gzip&&t.windowBits>0&&t.windowBits<16&&(t.windowBits+=16),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new x7,this.strm.avail_out=0;let e=r_.deflateInit2(this.strm,t.level,t.method,t.windowBits,t.memLevel,t.strategy);if(e!==O1)throw new Error(Of[e]);if(t.header&&r_.deflateSetHeader(this.strm,t.header),t.dictionary){let n;if(typeof t.dictionary=="string"?n=h_.string2buf(t.dictionary):w7.call(t.dictionary)==="[object ArrayBuffer]"?n=new Uint8Array(t.dictionary):n=t.dictionary,e=r_.deflateSetDictionary(this.strm,n),e!==O1)throw new Error(Of[e]);this._dict_set=!0}}A_.prototype.push=function(i,t){let e=this.strm,n=this.options.chunkSize,r,o;if(this.ended)return!1;for(t===~~t?o=t:o=t===!0?Aue:fue,typeof i=="string"?e.input=h_.string2buf(i):w7.call(i)==="[object ArrayBuffer]"?e.input=new Uint8Array(i):e.input=i,e.next_in=0,e.avail_in=e.input.length;;){if(e.avail_out===0&&(e.output=new Uint8Array(n),e.next_out=0,e.avail_out=n),(o===mue||o===pue)&&e.avail_out<=6){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(r=r_.deflate(e,o),r===gue)return e.next_out>0&&this.onData(e.output.subarray(0,e.next_out)),r=r_.deflateEnd(this.strm),this.onEnd(r),this.ended=!0,r===O1;if(e.avail_out===0){this.onData(e.output);continue}if(o>0&&e.next_out>0){this.onData(e.output.subarray(0,e.next_out)),e.avail_out=0;continue}if(e.avail_in===0)break}return!0};A_.prototype.onData=function(i){this.chunks.push(i)};A_.prototype.onEnd=function(i){i===O1&&(this.result=U1.flattenChunks(this.chunks)),this.chunks=[],this.err=i,this.msg=this.strm.msg};function DF(i,t){let e=new A_(t);if(e.push(i,!0),e.err)throw e.msg||Of[e.err];return e.result}function yue(i,t){return t=t||{},t.raw=!0,DF(i,t)}function xue(i,t){return t=t||{},t.gzip=!0,DF(i,t)}var wue=A_,Cue=DF,Mue=yue,Sue=xue,Eue=Dp,Tue={Deflate:wue,deflate:Cue,deflateRaw:Mue,gzip:Sue,constants:Eue},F1=16209,Bue=16191,Fue=function(t,e){let n,r,o,a,s,l,c,d,h,u,f,_,y,b,v,M,x,w,k,P,D,O,T,B,L=t.state;n=t.next_in,T=t.input,r=n+(t.avail_in-5),o=t.next_out,B=t.output,a=o-(e-t.avail_out),s=o+(t.avail_out-257),l=L.dmax,c=L.wsize,d=L.whave,h=L.wnext,u=L.window,f=L.hold,_=L.bits,y=L.lencode,b=L.distcode,v=(1<<L.lenbits)-1,M=(1<<L.distbits)-1;e:do{_<15&&(f+=T[n++]<<_,_+=8,f+=T[n++]<<_,_+=8),x=y[f&v];t:for(;;){if(w=x>>>24,f>>>=w,_-=w,w=x>>>16&255,w===0)B[o++]=x&65535;else if(w&16){k=x&65535,w&=15,w&&(_<w&&(f+=T[n++]<<_,_+=8),k+=f&(1<<w)-1,f>>>=w,_-=w),_<15&&(f+=T[n++]<<_,_+=8,f+=T[n++]<<_,_+=8),x=b[f&M];i:for(;;){if(w=x>>>24,f>>>=w,_-=w,w=x>>>16&255,w&16){if(P=x&65535,w&=15,_<w&&(f+=T[n++]<<_,_+=8,_<w&&(f+=T[n++]<<_,_+=8)),P+=f&(1<<w)-1,P>l){t.msg="invalid distance too far back",L.mode=F1;break e}if(f>>>=w,_-=w,w=o-a,P>w){if(w=P-w,w>d&&L.sane){t.msg="invalid distance too far back",L.mode=F1;break e}if(D=0,O=u,h===0){if(D+=c-w,w<k){k-=w;do B[o++]=u[D++];while(--w);D=o-P,O=B}}else if(h<w){if(D+=c+h-w,w-=h,w<k){k-=w;do B[o++]=u[D++];while(--w);if(D=0,h<k){w=h,k-=w;do B[o++]=u[D++];while(--w);D=o-P,O=B}}}else if(D+=h-w,w<k){k-=w;do B[o++]=u[D++];while(--w);D=o-P,O=B}for(;k>2;)B[o++]=O[D++],B[o++]=O[D++],B[o++]=O[D++],k-=3;k&&(B[o++]=O[D++],k>1&&(B[o++]=O[D++]))}else{D=o-P;do B[o++]=B[D++],B[o++]=B[D++],B[o++]=B[D++],k-=3;while(k>2);k&&(B[o++]=B[D++],k>1&&(B[o++]=B[D++]))}}else if((w&64)===0){x=b[(x&65535)+(f&(1<<w)-1)];continue i}else{t.msg="invalid distance code",L.mode=F1;break e}break}}else if((w&64)===0){x=y[(x&65535)+(f&(1<<w)-1)];continue t}else if(w&32){L.mode=Bue;break e}else{t.msg="invalid literal/length code",L.mode=F1;break e}break}}while(n<r&&o<s);k=_>>3,n-=k,_-=k<<3,f&=(1<<_)-1,t.next_in=n,t.next_out=o,t.avail_in=n<r?5+(r-n):5-(n-r),t.avail_out=o<s?257+(s-o):257-(o-s),L.hold=f,L.bits=_},Ep=15,M6=852,S6=592,E6=0,dF=1,T6=2,Iue=new Uint16Array([3,4,5,6,7,8,9,10,11,13,15,17,19,23,27,31,35,43,51,59,67,83,99,115,131,163,195,227,258,0,0]),Due=new Uint8Array([16,16,16,16,16,16,16,16,17,17,17,17,18,18,18,18,19,19,19,19,20,20,20,20,21,21,21,21,16,72,78]),kue=new Uint16Array([1,2,3,4,5,7,9,13,17,25,33,49,65,97,129,193,257,385,513,769,1025,1537,2049,3073,4097,6145,8193,12289,16385,24577,0,0]),Pue=new Uint8Array([16,16,16,16,17,17,18,18,19,19,20,20,21,21,22,22,23,23,24,24,25,25,26,26,27,27,28,28,29,29,64,64]),Rue=(i,t,e,n,r,o,a,s)=>{let l=s.bits,c=0,d=0,h=0,u=0,f=0,_=0,y=0,b=0,v=0,M=0,x,w,k,P,D,O=null,T,B=new Uint16Array(Ep+1),L=new Uint16Array(Ep+1),G=null,W,oe,pe;for(c=0;c<=Ep;c++)B[c]=0;for(d=0;d<n;d++)B[t[e+d]]++;for(f=l,u=Ep;u>=1&&B[u]===0;u--);if(f>u&&(f=u),u===0)return r[o++]=1<<24|64<<16|0,r[o++]=1<<24|64<<16|0,s.bits=1,0;for(h=1;h<u&&B[h]===0;h++);for(f<h&&(f=h),b=1,c=1;c<=Ep;c++)if(b<<=1,b-=B[c],b<0)return-1;if(b>0&&(i===E6||u!==1))return-1;for(L[1]=0,c=1;c<Ep;c++)L[c+1]=L[c]+B[c];for(d=0;d<n;d++)t[e+d]!==0&&(a[L[t[e+d]]++]=d);if(i===E6?(O=G=a,T=20):i===dF?(O=Iue,G=Due,T=257):(O=kue,G=Pue,T=0),M=0,d=0,c=h,D=o,_=f,y=0,k=-1,v=1<<f,P=v-1,i===dF&&v>M6||i===T6&&v>S6)return 1;for(;;){W=c-y,a[d]+1<T?(oe=0,pe=a[d]):a[d]>=T?(oe=G[a[d]-T],pe=O[a[d]-T]):(oe=96,pe=0),x=1<<c-y,w=1<<_,h=w;do w-=x,r[D+(M>>y)+w]=W<<24|oe<<16|pe|0;while(w!==0);for(x=1<<c-1;M&x;)x>>=1;if(x!==0?(M&=x-1,M+=x):M=0,d++,--B[c]===0){if(c===u)break;c=t[e+a[d]]}if(c>f&&(M&P)!==k){for(y===0&&(y=f),D+=h,_=c-y,b=1<<_;_+y<u&&(b-=B[_+y],!(b<=0));)_++,b<<=1;if(v+=1<<_,i===dF&&v>M6||i===T6&&v>S6)return 1;k=M&P,r[k]=f<<24|_<<16|D-o|0}}return M!==0&&(r[D+M]=c-y<<24|64<<16|0),s.bits=f,0},o_=Rue,Oue=0,C7=1,M7=2,{Z_FINISH:B6,Z_BLOCK:Lue,Z_TREES:I1,Z_OK:Nf,Z_STREAM_END:Nue,Z_NEED_DICT:Uue,Z_STREAM_ERROR:Fs,Z_DATA_ERROR:S7,Z_MEM_ERROR:E7,Z_BUF_ERROR:Hue,Z_DEFLATED:F6}=Dp,H1=16180,I6=16181,D6=16182,k6=16183,P6=16184,R6=16185,O6=16186,L6=16187,N6=16188,U6=16189,L1=16190,hd=16191,uF=16192,H6=16193,hF=16194,V6=16195,Q6=16196,z6=16197,q6=16198,D1=16199,k1=16200,G6=16201,W6=16202,j6=16203,$6=16204,X6=16205,fF=16206,K6=16207,Y6=16208,pr=16209,T7=16210,B7=16211,Vue=852,Que=592,zue=15,que=zue,Z6=i=>(i>>>24&255)+(i>>>8&65280)+((i&65280)<<8)+((i&255)<<24);function Gue(){this.strm=null,this.mode=0,this.last=!1,this.wrap=0,this.havedict=!1,this.flags=0,this.dmax=0,this.check=0,this.total=0,this.head=null,this.wbits=0,this.wsize=0,this.whave=0,this.wnext=0,this.window=null,this.hold=0,this.bits=0,this.length=0,this.offset=0,this.extra=0,this.lencode=null,this.distcode=null,this.lenbits=0,this.distbits=0,this.ncode=0,this.nlen=0,this.ndist=0,this.have=0,this.next=null,this.lens=new Uint16Array(320),this.work=new Uint16Array(288),this.lendyn=null,this.distdyn=null,this.sane=0,this.back=0,this.was=0}var Uf=i=>{if(!i)return 1;let t=i.state;return!t||t.strm!==i||t.mode<H1||t.mode>B7?1:0},F7=i=>{if(Uf(i))return Fs;let t=i.state;return i.total_in=i.total_out=t.total=0,i.msg="",t.wrap&&(i.adler=t.wrap&1),t.mode=H1,t.last=0,t.havedict=0,t.flags=-1,t.dmax=32768,t.head=null,t.hold=0,t.bits=0,t.lencode=t.lendyn=new Int32Array(Vue),t.distcode=t.distdyn=new Int32Array(Que),t.sane=1,t.back=-1,Nf},I7=i=>{if(Uf(i))return Fs;let t=i.state;return t.wsize=0,t.whave=0,t.wnext=0,F7(i)},D7=(i,t)=>{let e;if(Uf(i))return Fs;let n=i.state;return t<0?(e=0,t=-t):(e=(t>>4)+5,t<48&&(t&=15)),t&&(t<8||t>15)?Fs:(n.window!==null&&n.wbits!==t&&(n.window=null),n.wrap=e,n.wbits=t,I7(i))},k7=(i,t)=>{if(!i)return Fs;let e=new Gue;i.state=e,e.strm=i,e.window=null,e.mode=H1;let n=D7(i,t);return n!==Nf&&(i.state=null),n},Wue=i=>k7(i,que),J6=!0,mF,pF,jue=i=>{if(J6){mF=new Int32Array(512),pF=new Int32Array(32);let t=0;for(;t<144;)i.lens[t++]=8;for(;t<256;)i.lens[t++]=9;for(;t<280;)i.lens[t++]=7;for(;t<288;)i.lens[t++]=8;for(o_(C7,i.lens,0,288,mF,0,i.work,{bits:9}),t=0;t<32;)i.lens[t++]=5;o_(M7,i.lens,0,32,pF,0,i.work,{bits:5}),J6=!1}i.lencode=mF,i.lenbits=9,i.distcode=pF,i.distbits=5},P7=(i,t,e,n)=>{let r,o=i.state;return o.window===null&&(o.wsize=1<<o.wbits,o.wnext=0,o.whave=0,o.window=new Uint8Array(o.wsize)),n>=o.wsize?(o.window.set(t.subarray(e-o.wsize,e),0),o.wnext=0,o.whave=o.wsize):(r=o.wsize-o.wnext,r>n&&(r=n),o.window.set(t.subarray(e-n,e-n+r),o.wnext),n-=r,n?(o.window.set(t.subarray(e-n,e),0),o.wnext=n,o.whave=o.wsize):(o.wnext+=r,o.wnext===o.wsize&&(o.wnext=0),o.whave<o.wsize&&(o.whave+=r))),0},$ue=(i,t)=>{let e,n,r,o,a,s,l,c,d,h,u,f,_,y,b=0,v,M,x,w,k,P,D,O,T=new Uint8Array(4),B,L,G=new Uint8Array([16,17,18,0,8,7,9,6,10,5,11,4,12,3,13,2,14,1,15]);if(Uf(i)||!i.output||!i.input&&i.avail_in!==0)return Fs;e=i.state,e.mode===hd&&(e.mode=uF),a=i.next_out,r=i.output,l=i.avail_out,o=i.next_in,n=i.input,s=i.avail_in,c=e.hold,d=e.bits,h=s,u=l,O=Nf;e:for(;;)switch(e.mode){case H1:if(e.wrap===0){e.mode=uF;break}for(;d<16;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}if(e.wrap&2&&c===35615){e.wbits===0&&(e.wbits=15),e.check=0,T[0]=c&255,T[1]=c>>>8&255,e.check=vo(e.check,T,2,0),c=0,d=0,e.mode=I6;break}if(e.head&&(e.head.done=!1),!(e.wrap&1)||(((c&255)<<8)+(c>>8))%31){i.msg="incorrect header check",e.mode=pr;break}if((c&15)!==F6){i.msg="unknown compression method",e.mode=pr;break}if(c>>>=4,d-=4,D=(c&15)+8,e.wbits===0&&(e.wbits=D),D>15||D>e.wbits){i.msg="invalid window size",e.mode=pr;break}e.dmax=1<<e.wbits,e.flags=0,i.adler=e.check=1,e.mode=c&512?U6:hd,c=0,d=0;break;case I6:for(;d<16;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}if(e.flags=c,(e.flags&255)!==F6){i.msg="unknown compression method",e.mode=pr;break}if(e.flags&57344){i.msg="unknown header flags set",e.mode=pr;break}e.head&&(e.head.text=c>>8&1),e.flags&512&&e.wrap&4&&(T[0]=c&255,T[1]=c>>>8&255,e.check=vo(e.check,T,2,0)),c=0,d=0,e.mode=D6;case D6:for(;d<32;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}e.head&&(e.head.time=c),e.flags&512&&e.wrap&4&&(T[0]=c&255,T[1]=c>>>8&255,T[2]=c>>>16&255,T[3]=c>>>24&255,e.check=vo(e.check,T,4,0)),c=0,d=0,e.mode=k6;case k6:for(;d<16;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}e.head&&(e.head.xflags=c&255,e.head.os=c>>8),e.flags&512&&e.wrap&4&&(T[0]=c&255,T[1]=c>>>8&255,e.check=vo(e.check,T,2,0)),c=0,d=0,e.mode=P6;case P6:if(e.flags&1024){for(;d<16;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}e.length=c,e.head&&(e.head.extra_len=c),e.flags&512&&e.wrap&4&&(T[0]=c&255,T[1]=c>>>8&255,e.check=vo(e.check,T,2,0)),c=0,d=0}else e.head&&(e.head.extra=null);e.mode=R6;case R6:if(e.flags&1024&&(f=e.length,f>s&&(f=s),f&&(e.head&&(D=e.head.extra_len-e.length,e.head.extra||(e.head.extra=new Uint8Array(e.head.extra_len)),e.head.extra.set(n.subarray(o,o+f),D)),e.flags&512&&e.wrap&4&&(e.check=vo(e.check,n,f,o)),s-=f,o+=f,e.length-=f),e.length))break e;e.length=0,e.mode=O6;case O6:if(e.flags&2048){if(s===0)break e;f=0;do D=n[o+f++],e.head&&D&&e.length<65536&&(e.head.name+=String.fromCharCode(D));while(D&&f<s);if(e.flags&512&&e.wrap&4&&(e.check=vo(e.check,n,f,o)),s-=f,o+=f,D)break e}else e.head&&(e.head.name=null);e.length=0,e.mode=L6;case L6:if(e.flags&4096){if(s===0)break e;f=0;do D=n[o+f++],e.head&&D&&e.length<65536&&(e.head.comment+=String.fromCharCode(D));while(D&&f<s);if(e.flags&512&&e.wrap&4&&(e.check=vo(e.check,n,f,o)),s-=f,o+=f,D)break e}else e.head&&(e.head.comment=null);e.mode=N6;case N6:if(e.flags&512){for(;d<16;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}if(e.wrap&4&&c!==(e.check&65535)){i.msg="header crc mismatch",e.mode=pr;break}c=0,d=0}e.head&&(e.head.hcrc=e.flags>>9&1,e.head.done=!0),i.adler=e.check=0,e.mode=hd;break;case U6:for(;d<32;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}i.adler=e.check=Z6(c),c=0,d=0,e.mode=L1;case L1:if(e.havedict===0)return i.next_out=a,i.avail_out=l,i.next_in=o,i.avail_in=s,e.hold=c,e.bits=d,Uue;i.adler=e.check=1,e.mode=hd;case hd:if(t===Lue||t===I1)break e;case uF:if(e.last){c>>>=d&7,d-=d&7,e.mode=fF;break}for(;d<3;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}switch(e.last=c&1,c>>>=1,d-=1,c&3){case 0:e.mode=H6;break;case 1:if(jue(e),e.mode=D1,t===I1){c>>>=2,d-=2;break e}break;case 2:e.mode=Q6;break;case 3:i.msg="invalid block type",e.mode=pr}c>>>=2,d-=2;break;case H6:for(c>>>=d&7,d-=d&7;d<32;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}if((c&65535)!==(c>>>16^65535)){i.msg="invalid stored block lengths",e.mode=pr;break}if(e.length=c&65535,c=0,d=0,e.mode=hF,t===I1)break e;case hF:e.mode=V6;case V6:if(f=e.length,f){if(f>s&&(f=s),f>l&&(f=l),f===0)break e;r.set(n.subarray(o,o+f),a),s-=f,o+=f,l-=f,a+=f,e.length-=f;break}e.mode=hd;break;case Q6:for(;d<14;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}if(e.nlen=(c&31)+257,c>>>=5,d-=5,e.ndist=(c&31)+1,c>>>=5,d-=5,e.ncode=(c&15)+4,c>>>=4,d-=4,e.nlen>286||e.ndist>30){i.msg="too many length or distance symbols",e.mode=pr;break}e.have=0,e.mode=z6;case z6:for(;e.have<e.ncode;){for(;d<3;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}e.lens[G[e.have++]]=c&7,c>>>=3,d-=3}for(;e.have<19;)e.lens[G[e.have++]]=0;if(e.lencode=e.lendyn,e.lenbits=7,B={bits:e.lenbits},O=o_(Oue,e.lens,0,19,e.lencode,0,e.work,B),e.lenbits=B.bits,O){i.msg="invalid code lengths set",e.mode=pr;break}e.have=0,e.mode=q6;case q6:for(;e.have<e.nlen+e.ndist;){for(;b=e.lencode[c&(1<<e.lenbits)-1],v=b>>>24,M=b>>>16&255,x=b&65535,!(v<=d);){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}if(x<16)c>>>=v,d-=v,e.lens[e.have++]=x;else{if(x===16){for(L=v+2;d<L;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}if(c>>>=v,d-=v,e.have===0){i.msg="invalid bit length repeat",e.mode=pr;break}D=e.lens[e.have-1],f=3+(c&3),c>>>=2,d-=2}else if(x===17){for(L=v+3;d<L;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}c>>>=v,d-=v,D=0,f=3+(c&7),c>>>=3,d-=3}else{for(L=v+7;d<L;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}c>>>=v,d-=v,D=0,f=11+(c&127),c>>>=7,d-=7}if(e.have+f>e.nlen+e.ndist){i.msg="invalid bit length repeat",e.mode=pr;break}for(;f--;)e.lens[e.have++]=D}}if(e.mode===pr)break;if(e.lens[256]===0){i.msg="invalid code -- missing end-of-block",e.mode=pr;break}if(e.lenbits=9,B={bits:e.lenbits},O=o_(C7,e.lens,0,e.nlen,e.lencode,0,e.work,B),e.lenbits=B.bits,O){i.msg="invalid literal/lengths set",e.mode=pr;break}if(e.distbits=6,e.distcode=e.distdyn,B={bits:e.distbits},O=o_(M7,e.lens,e.nlen,e.ndist,e.distcode,0,e.work,B),e.distbits=B.bits,O){i.msg="invalid distances set",e.mode=pr;break}if(e.mode=D1,t===I1)break e;case D1:e.mode=k1;case k1:if(s>=6&&l>=258){i.next_out=a,i.avail_out=l,i.next_in=o,i.avail_in=s,e.hold=c,e.bits=d,Fue(i,u),a=i.next_out,r=i.output,l=i.avail_out,o=i.next_in,n=i.input,s=i.avail_in,c=e.hold,d=e.bits,e.mode===hd&&(e.back=-1);break}for(e.back=0;b=e.lencode[c&(1<<e.lenbits)-1],v=b>>>24,M=b>>>16&255,x=b&65535,!(v<=d);){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}if(M&&(M&240)===0){for(w=v,k=M,P=x;b=e.lencode[P+((c&(1<<w+k)-1)>>w)],v=b>>>24,M=b>>>16&255,x=b&65535,!(w+v<=d);){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}c>>>=w,d-=w,e.back+=w}if(c>>>=v,d-=v,e.back+=v,e.length=x,M===0){e.mode=X6;break}if(M&32){e.back=-1,e.mode=hd;break}if(M&64){i.msg="invalid literal/length code",e.mode=pr;break}e.extra=M&15,e.mode=G6;case G6:if(e.extra){for(L=e.extra;d<L;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}e.length+=c&(1<<e.extra)-1,c>>>=e.extra,d-=e.extra,e.back+=e.extra}e.was=e.length,e.mode=W6;case W6:for(;b=e.distcode[c&(1<<e.distbits)-1],v=b>>>24,M=b>>>16&255,x=b&65535,!(v<=d);){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}if((M&240)===0){for(w=v,k=M,P=x;b=e.distcode[P+((c&(1<<w+k)-1)>>w)],v=b>>>24,M=b>>>16&255,x=b&65535,!(w+v<=d);){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}c>>>=w,d-=w,e.back+=w}if(c>>>=v,d-=v,e.back+=v,M&64){i.msg="invalid distance code",e.mode=pr;break}e.offset=x,e.extra=M&15,e.mode=j6;case j6:if(e.extra){for(L=e.extra;d<L;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}e.offset+=c&(1<<e.extra)-1,c>>>=e.extra,d-=e.extra,e.back+=e.extra}if(e.offset>e.dmax){i.msg="invalid distance too far back",e.mode=pr;break}e.mode=$6;case $6:if(l===0)break e;if(f=u-l,e.offset>f){if(f=e.offset-f,f>e.whave&&e.sane){i.msg="invalid distance too far back",e.mode=pr;break}f>e.wnext?(f-=e.wnext,_=e.wsize-f):_=e.wnext-f,f>e.length&&(f=e.length),y=e.window}else y=r,_=a-e.offset,f=e.length;f>l&&(f=l),l-=f,e.length-=f;do r[a++]=y[_++];while(--f);e.length===0&&(e.mode=k1);break;case X6:if(l===0)break e;r[a++]=e.length,l--,e.mode=k1;break;case fF:if(e.wrap){for(;d<32;){if(s===0)break e;s--,c|=n[o++]<<d,d+=8}if(u-=l,i.total_out+=u,e.total+=u,e.wrap&4&&u&&(i.adler=e.check=e.flags?vo(e.check,r,u,a-u):d_(e.check,r,u,a-u)),u=l,e.wrap&4&&(e.flags?c:Z6(c))!==e.check){i.msg="incorrect data check",e.mode=pr;break}c=0,d=0}e.mode=K6;case K6:if(e.wrap&&e.flags){for(;d<32;){if(s===0)break e;s--,c+=n[o++]<<d,d+=8}if(e.wrap&4&&c!==(e.total&4294967295)){i.msg="incorrect length check",e.mode=pr;break}c=0,d=0}e.mode=Y6;case Y6:O=Nue;break e;case pr:O=S7;break e;case T7:return E7;case B7:default:return Fs}return i.next_out=a,i.avail_out=l,i.next_in=o,i.avail_in=s,e.hold=c,e.bits=d,(e.wsize||u!==i.avail_out&&e.mode<pr&&(e.mode<fF||t!==B6))&&P7(i,i.output,i.next_out,u-i.avail_out),h-=i.avail_in,u-=i.avail_out,i.total_in+=h,i.total_out+=u,e.total+=u,e.wrap&4&&u&&(i.adler=e.check=e.flags?vo(e.check,r,u,i.next_out-u):d_(e.check,r,u,i.next_out-u)),i.data_type=e.bits+(e.last?64:0)+(e.mode===hd?128:0)+(e.mode===D1||e.mode===hF?256:0),(h===0&&u===0||t===B6)&&O===Nf&&(O=Hue),O},Xue=i=>{if(Uf(i))return Fs;let t=i.state;return t.window&&(t.window=null),i.state=null,Nf},Kue=(i,t)=>{if(Uf(i))return Fs;let e=i.state;return(e.wrap&2)===0?Fs:(e.head=t,t.done=!1,Nf)},Yue=(i,t)=>{let e=t.length,n,r,o;return Uf(i)||(n=i.state,n.wrap!==0&&n.mode!==L1)?Fs:n.mode===L1&&(r=1,r=d_(r,t,e,0),r!==n.check)?S7:(o=P7(i,t,e,e),o?(n.mode=T7,E7):(n.havedict=1,Nf))},Zue=I7,Jue=D7,ehe=F7,the=Wue,ihe=k7,nhe=$ue,rhe=Xue,ohe=Kue,ahe=Yue,she="pako inflate (from Nodeca project)",md={inflateReset:Zue,inflateReset2:Jue,inflateResetKeep:ehe,inflateInit:the,inflateInit2:ihe,inflate:nhe,inflateEnd:rhe,inflateGetHeader:ohe,inflateSetDictionary:ahe,inflateInfo:she};function lhe(){this.text=0,this.time=0,this.xflags=0,this.os=0,this.extra=null,this.extra_len=0,this.name="",this.comment="",this.hcrc=0,this.done=!1}var che=lhe,R7=Object.prototype.toString,{Z_NO_FLUSH:dhe,Z_FINISH:uhe,Z_OK:f_,Z_STREAM_END:AF,Z_NEED_DICT:gF,Z_STREAM_ERROR:hhe,Z_DATA_ERROR:e7,Z_MEM_ERROR:fhe}=Dp;function g_(i){this.options=U1.assign({chunkSize:1024*64,windowBits:15,to:""},i||{});let t=this.options;t.raw&&t.windowBits>=0&&t.windowBits<16&&(t.windowBits=-t.windowBits,t.windowBits===0&&(t.windowBits=-15)),t.windowBits>=0&&t.windowBits<16&&!(i&&i.windowBits)&&(t.windowBits+=32),t.windowBits>15&&t.windowBits<48&&(t.windowBits&15)===0&&(t.windowBits|=15),this.err=0,this.msg="",this.ended=!1,this.chunks=[],this.strm=new x7,this.strm.avail_out=0;let e=md.inflateInit2(this.strm,t.windowBits);if(e!==f_)throw new Error(Of[e]);if(this.header=new che,md.inflateGetHeader(this.strm,this.header),t.dictionary&&(typeof t.dictionary=="string"?t.dictionary=h_.string2buf(t.dictionary):R7.call(t.dictionary)==="[object ArrayBuffer]"&&(t.dictionary=new Uint8Array(t.dictionary)),t.raw&&(e=md.inflateSetDictionary(this.strm,t.dictionary),e!==f_)))throw new Error(Of[e])}g_.prototype.push=function(i,t){let e=this.strm,n=this.options.chunkSize,r=this.options.dictionary,o,a,s;if(this.ended)return!1;for(t===~~t?a=t:a=t===!0?uhe:dhe,R7.call(i)==="[object ArrayBuffer]"?e.input=new Uint8Array(i):e.input=i,e.next_in=0,e.avail_in=e.input.length;;){for(e.avail_out===0&&(e.output=new Uint8Array(n),e.next_out=0,e.avail_out=n),o=md.inflate(e,a),o===gF&&r&&(o=md.inflateSetDictionary(e,r),o===f_?o=md.inflate(e,a):o===e7&&(o=gF));e.avail_in>0&&o===AF&&e.state.wrap>0&&i[e.next_in]!==0;)md.inflateReset(e),o=md.inflate(e,a);switch(o){case hhe:case e7:case gF:case fhe:return this.onEnd(o),this.ended=!0,!1}if(s=e.avail_out,e.next_out&&(e.avail_out===0||o===AF))if(this.options.to==="string"){let l=h_.utf8border(e.output,e.next_out),c=e.next_out-l,d=h_.buf2string(e.output,l);e.next_out=c,e.avail_out=n-c,c&&e.output.set(e.output.subarray(l,l+c),0),this.onData(d)}else this.onData(e.output.length===e.next_out?e.output:e.output.subarray(0,e.next_out));if(!(o===f_&&s===0)){if(o===AF)return o=md.inflateEnd(this.strm),this.onEnd(o),this.ended=!0,!0;if(e.avail_in===0)break}}return!0};g_.prototype.onData=function(i){this.chunks.push(i)};g_.prototype.onEnd=function(i){i===f_&&(this.options.to==="string"?this.result=this.chunks.join(""):this.result=U1.flattenChunks(this.chunks)),this.chunks=[],this.err=i,this.msg=this.strm.msg};function kF(i,t){let e=new g_(t);if(e.push(i),e.err)throw e.msg||Of[e.err];return e.result}function mhe(i,t){return t=t||{},t.raw=!0,kF(i,t)}var phe=g_,Ahe=kF,ghe=mhe,_he=kF,bhe=Dp,vhe={Inflate:phe,inflate:Ahe,inflateRaw:ghe,ungzip:_he,constants:bhe},{Deflate:AUe,deflate:gUe,deflateRaw:_Ue,gzip:bUe}=Tue,{Inflate:vUe,inflate:yUe,inflateRaw:xUe,ungzip:yhe}=vhe;var V1=yhe;var Q1=i=>{let t=[];for(let e=0;e<i.length;e++)t.push(xhe(i[e]));return t},xhe=i=>ft(null,null,function*(){return new Promise(t=>{let e=i.name.endsWith(".gz"),n=new FileReader;e?n.readAsArrayBuffer(i):n.readAsText(i,"utf8");let r;n.onload=o=>{let a=o.target.result.toString();r=e?V1(o.target.result,{to:"string"}):a,a.includes("gameObjectPositions")&&A6(a)&&(r=JSON.stringify(h6(a)))},n.onloadend=()=>{t(r)}})});var z1=(()=>{class i{constructor(e,n){this.store=e,this.loadFileService=n,this.isUploading=!1}uploadFiles(){let e=E1();e.addEventListener("change",()=>{this.uploadFilesOnEvent(e)}),e.click()}uploadFilesOnEvent(e){return ft(this,null,function*(){try{this.isUploading=!0,this.store.dispatch(Ya({value:!0})),this.store.dispatch(ol({value:!0}));let n=yield Promise.all(Q1(e.files)),{customConfigs:r,ccFiles:o}=this.splitCustomConfigsAndCCFiles(e.files,n);for(let a of r)Bn.importCustomConfigs(a);o.length>0&&this.loadFileService.loadFiles(o)}catch{this.store.dispatch(Ya({value:!1})),this.store.dispatch(ol({value:!1}))}finally{this.isUploading=!1}})}splitCustomConfigsAndCCFiles(e,n){let r=[],o=[];for(let[a,s]of n.entries()){let l=e[a].name;l.includes(nF)?r.push(s):o.push({fileName:l,fileSize:e[a].size,content:$0(s)})}return{customConfigs:r,ccFiles:o}}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie),Me(ul))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var L7=(()=>{class i{constructor(e){this.uploadFilesService=e}uploadFiles(){this.uploadFilesService.uploadFiles()}static{this.\u0275fac=function(n){return new(n||i)(se(z1))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-upload-files-button"]],decls:1,vars:1,consts:[["title","Load cc.json files",3,"click","icon"]],template:function(n,r){n&1&&(S(0,"cc-action-icon",0),he("click",function(){return r.uploadFiles()}),F()),n&2&&z("icon","fa fa-folder-open folder-icon")},dependencies:[La],encapsulation:2})}}return i})();var PF=typeof navigator<"u"?navigator.userAgent.toLowerCase().indexOf("firefox")>0:!1;function RF(i,t,e,n){i.addEventListener?i.addEventListener(t,e,n):i.attachEvent&&i.attachEvent("on".concat(t),e)}function __(i,t,e,n){i.removeEventListener?i.removeEventListener(t,e,n):i.detachEvent&&i.detachEvent("on".concat(t),e)}function H7(i,t){let e=t.slice(0,t.length-1);for(let n=0;n<e.length;n++)e[n]=i[e[n].toLowerCase()];return e}function V7(i){typeof i!="string"&&(i=""),i=i.replace(/\s/g,"");let t=i.split(","),e=t.lastIndexOf("");for(;e>=0;)t[e-1]+=",",t.splice(e,1),e=t.lastIndexOf("");return t}function whe(i,t){let e=i.length>=t.length?i:t,n=i.length>=t.length?t:i,r=!0;for(let o=0;o<e.length;o++)n.indexOf(e[o])===-1&&(r=!1);return r}var y_={backspace:8,"\u232B":8,tab:9,clear:12,enter:13,"\u21A9":13,return:13,esc:27,escape:27,space:32,left:37,up:38,right:39,down:40,arrowup:38,arrowdown:40,arrowleft:37,arrowright:39,del:46,delete:46,ins:45,insert:45,home:36,end:35,pageup:33,pagedown:34,capslock:20,num_0:96,num_1:97,num_2:98,num_3:99,num_4:100,num_5:101,num_6:102,num_7:103,num_8:104,num_9:105,num_multiply:106,num_add:107,num_enter:108,num_subtract:109,num_decimal:110,num_divide:111,"\u21EA":20,",":188,".":190,"/":191,"`":192,"-":PF?173:189,"=":PF?61:187,";":PF?59:186,"'":222,"{":219,"}":221,"[":219,"]":221,"\\":220},fl={"\u21E7":16,shift:16,"\u2325":18,alt:18,option:18,"\u2303":17,ctrl:17,control:17,"\u2318":91,cmd:91,meta:91,command:91},b_={16:"shiftKey",18:"altKey",17:"ctrlKey",91:"metaKey",shiftKey:16,ctrlKey:17,altKey:18,metaKey:91},Oo={16:!1,18:!1,17:!1,91:!1},Mr={};for(let i=1;i<20;i++)y_["f".concat(i)]=111+i;var Ar=[],v_=null,Q7="all",pd=new Map,Rp=i=>y_[i.toLowerCase()]||fl[i.toLowerCase()]||i.toUpperCase().charCodeAt(0),Che=i=>Object.keys(y_).find(t=>y_[t]===i),Mhe=i=>Object.keys(fl).find(t=>fl[t]===i);function z7(i){Q7=i||"all"}function x_(){return Q7||"all"}function She(){return Ar.slice(0)}function Ehe(){return Ar.map(i=>Che(i)||Mhe(i)||String.fromCharCode(i))}function The(){let i=[];return Object.keys(Mr).forEach(t=>{Mr[t].forEach(e=>{let{key:n,scope:r,mods:o,shortcut:a}=e;i.push({scope:r,shortcut:a,mods:o,keys:n.split("+").map(s=>Rp(s))})})}),i}function Bhe(i){let t=i.target||i.srcElement,{tagName:e}=t,n=!0,r=e==="INPUT"&&!["checkbox","radio","range","button","file","reset","submit","color"].includes(t.type);return(t.isContentEditable||(r||e==="TEXTAREA"||e==="SELECT")&&!t.readOnly)&&(n=!1),n}function Fhe(i){return typeof i=="string"&&(i=Rp(i)),Ar.indexOf(i)!==-1}function Ihe(i,t){let e,n;i||(i=x_());for(let r in Mr)if(Object.prototype.hasOwnProperty.call(Mr,r))for(e=Mr[r],n=0;n<e.length;)e[n].scope===i?e.splice(n,1).forEach(a=>{let{element:s}=a;return LF(s)}):n++;x_()===i&&z7(t||"all")}function Dhe(i){let t=i.keyCode||i.which||i.charCode;i.key&&i.key.toLowerCase()==="capslock"&&(t=Rp(i.key));let e=Ar.indexOf(t);if(e>=0&&Ar.splice(e,1),i.key&&i.key.toLowerCase()==="meta"&&Ar.splice(0,Ar.length),(t===93||t===224)&&(t=91),t in Oo){Oo[t]=!1;for(let n in fl)fl[n]===t&&(hl[n]=!1)}}function q7(i){if(typeof i>"u")Object.keys(Mr).forEach(r=>{Array.isArray(Mr[r])&&Mr[r].forEach(o=>q1(o)),delete Mr[r]}),LF(null);else if(Array.isArray(i))i.forEach(r=>{r.key&&q1(r)});else if(typeof i=="object")i.key&&q1(i);else if(typeof i=="string"){for(var t=arguments.length,e=new Array(t>1?t-1:0),n=1;n<t;n++)e[n-1]=arguments[n];let[r,o]=e;typeof r=="function"&&(o=r,r=""),q1({key:i,scope:r,method:o,splitKey:"+"})}}var q1=i=>{let{key:t,scope:e,method:n,splitKey:r="+"}=i;V7(t).forEach(a=>{let s=a.split(r),l=s.length,c=s[l-1],d=c==="*"?"*":Rp(c);if(!Mr[d])return;e||(e=x_());let h=l>1?H7(fl,s):[],u=[];Mr[d]=Mr[d].filter(f=>{let y=(n?f.method===n:!0)&&f.scope===e&&whe(f.mods,h);return y&&u.push(f.element),!y}),u.forEach(f=>LF(f))})};function N7(i,t,e,n){if(t.element!==n)return;let r;if(t.scope===e||t.scope==="all"){r=t.mods.length>0;for(let o in Oo)Object.prototype.hasOwnProperty.call(Oo,o)&&(!Oo[o]&&t.mods.indexOf(+o)>-1||Oo[o]&&t.mods.indexOf(+o)===-1)&&(r=!1);(t.mods.length===0&&!Oo[16]&&!Oo[18]&&!Oo[17]&&!Oo[91]||r||t.shortcut==="*")&&(t.keys=[],t.keys=t.keys.concat(Ar),t.method(i,t)===!1&&(i.preventDefault?i.preventDefault():i.returnValue=!1,i.stopPropagation&&i.stopPropagation(),i.cancelBubble&&(i.cancelBubble=!0)))}}function U7(i,t){let e=Mr["*"],n=i.keyCode||i.which||i.charCode;if(i.key&&i.key.toLowerCase()==="capslock"||!hl.filter.call(this,i))return;if((n===93||n===224)&&(n=91),Ar.indexOf(n)===-1&&n!==229&&Ar.push(n),["metaKey","ctrlKey","altKey","shiftKey"].forEach(s=>{let l=b_[s];i[s]&&Ar.indexOf(l)===-1?Ar.push(l):!i[s]&&Ar.indexOf(l)>-1?Ar.splice(Ar.indexOf(l),1):s==="metaKey"&&i[s]&&(Ar=Ar.filter(c=>c in b_||c===n))}),n in Oo){Oo[n]=!0;for(let s in fl)if(Object.prototype.hasOwnProperty.call(fl,s)){let l=b_[fl[s]];hl[s]=i[l]}if(!e)return}for(let s in Oo)Object.prototype.hasOwnProperty.call(Oo,s)&&(Oo[s]=i[b_[s]]);i.getModifierState&&!(i.altKey&&!i.ctrlKey)&&i.getModifierState("AltGraph")&&(Ar.indexOf(17)===-1&&Ar.push(17),Ar.indexOf(18)===-1&&Ar.push(18),Oo[17]=!0,Oo[18]=!0);let r=x_();if(e)for(let s=0;s<e.length;s++)e[s].scope===r&&(i.type==="keydown"&&e[s].keydown||i.type==="keyup"&&e[s].keyup)&&N7(i,e[s],r,t);if(!(n in Mr))return;let o=Mr[n],a=o.length;for(let s=0;s<a;s++)if((i.type==="keydown"&&o[s].keydown||i.type==="keyup"&&o[s].keyup)&&o[s].key){let l=o[s],{splitKey:c}=l,d=l.key.split(c),h=[];for(let u=0;u<d.length;u++)h.push(Rp(d[u]));h.sort().join("")===Ar.sort().join("")&&N7(i,l,r,t)}}function hl(i,t,e){Ar=[];let n=V7(i),r=[],o="all",a=document,s=0,l=!1,c=!0,d="+",h=!1,u=!1;for(e===void 0&&typeof t=="function"&&(e=t),Object.prototype.toString.call(t)==="[object Object]"&&(t.scope&&(o=t.scope),t.element&&(a=t.element),t.keyup&&(l=t.keyup),t.keydown!==void 0&&(c=t.keydown),t.capture!==void 0&&(h=t.capture),typeof t.splitKey=="string"&&(d=t.splitKey),t.single===!0&&(u=!0)),typeof t=="string"&&(o=t),u&&q7(i,o);s<n.length;s++)i=n[s].split(d),r=[],i.length>1&&(r=H7(fl,i)),i=i[i.length-1],i=i==="*"?"*":Rp(i),i in Mr||(Mr[i]=[]),Mr[i].push({keyup:l,keydown:c,scope:o,mods:r,shortcut:n[s],method:e,key:n[s],splitKey:d,element:a});if(typeof a<"u"&&window){if(!pd.has(a)){let f=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;return U7(y,a)},_=function(){let y=arguments.length>0&&arguments[0]!==void 0?arguments[0]:window.event;U7(y,a),Dhe(y)};pd.set(a,{keydownListener:f,keyupListenr:_,capture:h}),RF(a,"keydown",f,h),RF(a,"keyup",_,h)}if(!v_){let f=()=>{Ar=[]};v_={listener:f,capture:h},RF(window,"focus",f,h)}}}function khe(i){let t=arguments.length>1&&arguments[1]!==void 0?arguments[1]:"all";Object.keys(Mr).forEach(e=>{Mr[e].filter(r=>r.scope===t&&r.shortcut===i).forEach(r=>{r&&r.method&&r.method()})})}function LF(i){let t=Object.values(Mr).flat();if(t.findIndex(n=>{let{element:r}=n;return r===i})<0){let{keydownListener:n,keyupListenr:r,capture:o}=pd.get(i)||{};n&&r&&(__(i,"keyup",r,o),__(i,"keydown",n,o),pd.delete(i))}if((t.length<=0||pd.size<=0)&&(Object.keys(pd).forEach(r=>{let{keydownListener:o,keyupListenr:a,capture:s}=pd.get(r)||{};o&&a&&(__(r,"keyup",a,s),__(r,"keydown",o,s),pd.delete(r))}),pd.clear(),Object.keys(Mr).forEach(r=>delete Mr[r]),v_)){let{listener:r,capture:o}=v_;__(window,"focus",r,o),v_=null}}var OF={getPressedKeyString:Ehe,setScope:z7,getScope:x_,deleteScope:Ihe,getPressedKeyCodes:She,getAllKeyCodes:The,isPressed:Fhe,filter:Bhe,trigger:khe,unbind:q7,keyMap:y_,modifier:fl,modifierMap:b_};for(let i in OF)Object.prototype.hasOwnProperty.call(OF,i)&&(hl[i]=OF[i]);if(typeof window<"u"){let i=window.hotkeys;hl.noConflict=t=>(t&&window.hotkeys===hl&&(window.hotkeys=i),hl),window.hotkeys=hl}var TV=el(G7());var wa={LEFT:0,MIDDLE:1,RIGHT:2,ROTATE:0,DOLLY:1,PAN:2},dc={ROTATE:0,PAN:1,DOLLY_PAN:2,DOLLY_ROTATE:3},Phe=0,W7=1,Rhe=2;var cH=1,Ohe=2,xd=3,Lu=0,ra=1,wd=2,rc=0,oA=1,j7=2,$7=3,X7=4,Lhe=5,jf=100,Nhe=101,Uhe=102,Hhe=103,Vhe=104,Qhe=200,zhe=201,qhe=202,Ghe=203,bI=204,vI=205,Whe=206,jhe=207,$he=208,Xhe=209,Khe=210,Yhe=211,Zhe=212,Jhe=213,efe=214,tfe=0,ife=1,nfe=2,Bx=3,rfe=4,ofe=5,afe=6,sfe=7,O3=0,lfe=1,cfe=2,Ru=0,dfe=1,ufe=2,hfe=3,ffe=4,mfe=5,pfe=6,Afe=7;var K7=300,dA=301,uA=302,yI=303,xI=304,lw=306,hA=1e3,Xf=1001,wI=1002,ks=1003,gfe=1004;var G1=1005;var as=1006,HF=1007;var Kf=1008;var Sd=1009,dH=1010,uH=1011,N_=1012,L3=1013,Zf=1014,Cd=1015,nm=1016,N3=1017,U3=1018,fA=1020,hH=35902,fH=1021,mH=1022,ss=1023,pH=1024,AH=1025,aA=1026,mA=1027,gH=1028,H3=1029,_H=1030,V3=1031;var Q3=1033,Cx=33776,Mx=33777,Sx=33778,Ex=33779,CI=35840,MI=35841,SI=35842,EI=35843,TI=36196,BI=37492,FI=37496,II=37808,DI=37809,kI=37810,PI=37811,RI=37812,OI=37813,LI=37814,NI=37815,UI=37816,HI=37817,VI=37818,QI=37819,zI=37820,qI=37821,Tx=36492,GI=36494,WI=36495,bH=36283,jI=36284,$I=36285,XI=36286;var Fx=2300,KI=2301,VF=2302,Y7=2400,Z7=2401,J7=2402;var _fe=3200,bfe=3201;var z3=0,vfe=1,Pu="",Ds="srgb",Qu="srgb-linear",q3="display-p3",cw="display-p3-linear",Ix="linear",sr="srgb",Dx="rec709",kx="p3";var Op=7680;var e9=519,yfe=512,xfe=513,wfe=514,vH=515,Cfe=516,Mfe=517,Sfe=518,Efe=519,YI=35044;var t9="300 es",Md=2e3,Px=2001,Ed=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,a=r.length;o<a;o++)r[o].call(this,t);t.target=null}}},ia=["00","01","02","03","04","05","06","07","08","09","0a","0b","0c","0d","0e","0f","10","11","12","13","14","15","16","17","18","19","1a","1b","1c","1d","1e","1f","20","21","22","23","24","25","26","27","28","29","2a","2b","2c","2d","2e","2f","30","31","32","33","34","35","36","37","38","39","3a","3b","3c","3d","3e","3f","40","41","42","43","44","45","46","47","48","49","4a","4b","4c","4d","4e","4f","50","51","52","53","54","55","56","57","58","59","5a","5b","5c","5d","5e","5f","60","61","62","63","64","65","66","67","68","69","6a","6b","6c","6d","6e","6f","70","71","72","73","74","75","76","77","78","79","7a","7b","7c","7d","7e","7f","80","81","82","83","84","85","86","87","88","89","8a","8b","8c","8d","8e","8f","90","91","92","93","94","95","96","97","98","99","9a","9b","9c","9d","9e","9f","a0","a1","a2","a3","a4","a5","a6","a7","a8","a9","aa","ab","ac","ad","ae","af","b0","b1","b2","b3","b4","b5","b6","b7","b8","b9","ba","bb","bc","bd","be","bf","c0","c1","c2","c3","c4","c5","c6","c7","c8","c9","ca","cb","cc","cd","ce","cf","d0","d1","d2","d3","d4","d5","d6","d7","d8","d9","da","db","dc","dd","de","df","e0","e1","e2","e3","e4","e5","e6","e7","e8","e9","ea","eb","ec","ed","ee","ef","f0","f1","f2","f3","f4","f5","f6","f7","f8","f9","fa","fb","fc","fd","fe","ff"],i9=1234567,k_=Math.PI/180,U_=180/Math.PI;function oc(){let i=Math.random()*4294967295|0,t=Math.random()*4294967295|0,e=Math.random()*4294967295|0,n=Math.random()*4294967295|0;return(ia[i&255]+ia[i>>8&255]+ia[i>>16&255]+ia[i>>24&255]+"-"+ia[t&255]+ia[t>>8&255]+"-"+ia[t>>16&15|64]+ia[t>>24&255]+"-"+ia[e&63|128]+ia[e>>8&255]+"-"+ia[e>>16&255]+ia[e>>24&255]+ia[n&255]+ia[n>>8&255]+ia[n>>16&255]+ia[n>>24&255]).toLowerCase()}function xo(i,t,e){return Math.max(t,Math.min(e,i))}function G3(i,t){return(i%t+t)%t}function Tfe(i,t,e,n,r){return n+(i-t)*(r-n)/(e-t)}function Bfe(i,t,e){return i!==t?(e-i)/(t-i):0}function P_(i,t,e){return(1-e)*i+e*t}function Ffe(i,t,e,n){return P_(i,t,1-Math.exp(-e*n))}function Ife(i,t=1){return t-Math.abs(G3(i,t*2)-t)}function Dfe(i,t,e){return i<=t?0:i>=e?1:(i=(i-t)/(e-t),i*i*(3-2*i))}function kfe(i,t,e){return i<=t?0:i>=e?1:(i=(i-t)/(e-t),i*i*i*(i*(i*6-15)+10))}function Pfe(i,t){return i+Math.floor(Math.random()*(t-i+1))}function Rfe(i,t){return i+Math.random()*(t-i)}function Ofe(i){return i*(.5-Math.random())}function Lfe(i){i!==void 0&&(i9=i);let t=i9+=1831565813;return t=Math.imul(t^t>>>15,t|1),t^=t+Math.imul(t^t>>>7,t|61),((t^t>>>14)>>>0)/4294967296}function Nfe(i){return i*k_}function Ufe(i){return i*U_}function Hfe(i){return(i&i-1)===0&&i!==0}function Vfe(i){return Math.pow(2,Math.ceil(Math.log(i)/Math.LN2))}function Qfe(i){return Math.pow(2,Math.floor(Math.log(i)/Math.LN2))}function zfe(i,t,e,n,r){let o=Math.cos,a=Math.sin,s=o(e/2),l=a(e/2),c=o((t+n)/2),d=a((t+n)/2),h=o((t-n)/2),u=a((t-n)/2),f=o((n-t)/2),_=a((n-t)/2);switch(r){case"XYX":i.set(s*d,l*h,l*u,s*c);break;case"YZY":i.set(l*u,s*d,l*h,s*c);break;case"ZXZ":i.set(l*h,l*u,s*d,s*c);break;case"XZX":i.set(s*d,l*_,l*f,s*c);break;case"YXY":i.set(l*f,s*d,l*_,s*c);break;case"ZYZ":i.set(l*_,l*f,s*d,s*c);break;default:console.warn("THREE.MathUtils: .setQuaternionFromProperEuler() encountered an unknown order: "+r)}}function _l(i,t){switch(t.constructor){case Float32Array:return i;case Uint32Array:return i/4294967295;case Uint16Array:return i/65535;case Uint8Array:return i/255;case Int32Array:return Math.max(i/2147483647,-1);case Int16Array:return Math.max(i/32767,-1);case Int8Array:return Math.max(i/127,-1);default:throw new Error("Invalid component type.")}}function Hn(i,t){switch(t.constructor){case Float32Array:return i;case Uint32Array:return Math.round(i*4294967295);case Uint16Array:return Math.round(i*65535);case Uint8Array:return Math.round(i*255);case Int32Array:return Math.round(i*2147483647);case Int16Array:return Math.round(i*32767);case Int8Array:return Math.round(i*127);default:throw new Error("Invalid component type.")}}var yH={DEG2RAD:k_,RAD2DEG:U_,generateUUID:oc,clamp:xo,euclideanModulo:G3,mapLinear:Tfe,inverseLerp:Bfe,lerp:P_,damp:Ffe,pingpong:Ife,smoothstep:Dfe,smootherstep:kfe,randInt:Pfe,randFloat:Rfe,randFloatSpread:Ofe,seededRandom:Lfe,degToRad:Nfe,radToDeg:Ufe,isPowerOfTwo:Hfe,ceilPowerOfTwo:Vfe,floorPowerOfTwo:Qfe,setQuaternionFromProperEuler:zfe,normalize:Hn,denormalize:_l},qe=class i{constructor(t=0,e=0){i.prototype.isVector2=!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){return 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){return 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=Math.trunc(this.x),this.y=Math.trunc(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}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(xo(n,-1,1))}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){return 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,a=this.y-t.y;return this.x=o*n-a*r+t.x,this.y=o*r+a*n+t.y,this}random(){return this.x=Math.random(),this.y=Math.random(),this}*[Symbol.iterator](){yield this.x,yield this.y}},Bi=class i{constructor(t,e,n,r,o,a,s,l,c){i.prototype.isMatrix3=!0,this.elements=[1,0,0,0,1,0,0,0,1],t!==void 0&&this.set(t,e,n,r,o,a,s,l,c)}set(t,e,n,r,o,a,s,l,c){let d=this.elements;return d[0]=t,d[1]=r,d[2]=s,d[3]=e,d[4]=o,d[5]=l,d[6]=n,d[7]=a,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,a=n[0],s=n[3],l=n[6],c=n[1],d=n[4],h=n[7],u=n[2],f=n[5],_=n[8],y=r[0],b=r[3],v=r[6],M=r[1],x=r[4],w=r[7],k=r[2],P=r[5],D=r[8];return o[0]=a*y+s*M+l*k,o[3]=a*b+s*x+l*P,o[6]=a*v+s*w+l*D,o[1]=c*y+d*M+h*k,o[4]=c*b+d*x+h*P,o[7]=c*v+d*w+h*D,o[2]=u*y+f*M+_*k,o[5]=u*b+f*x+_*P,o[8]=u*v+f*w+_*D,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],a=t[4],s=t[5],l=t[6],c=t[7],d=t[8];return e*a*d-e*s*c-n*o*d+n*s*l+r*o*c-r*a*l}invert(){let t=this.elements,e=t[0],n=t[1],r=t[2],o=t[3],a=t[4],s=t[5],l=t[6],c=t[7],d=t[8],h=d*a-s*c,u=s*l-d*o,f=c*o-a*l,_=e*h+n*u+r*f;if(_===0)return this.set(0,0,0,0,0,0,0,0,0);let y=1/_;return t[0]=h*y,t[1]=(r*c-d*n)*y,t[2]=(s*n-r*a)*y,t[3]=u*y,t[4]=(d*e-r*l)*y,t[5]=(r*o-s*e)*y,t[6]=f*y,t[7]=(n*l-c*e)*y,t[8]=(a*e-n*o)*y,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,a,s){let l=Math.cos(o),c=Math.sin(o);return this.set(n*l,n*c,-n*(l*a+c*s)+a+t,-r*c,r*l,-r*(-c*a+l*s)+s+e,0,0,1),this}scale(t,e){return this.premultiply(QF.makeScale(t,e)),this}rotate(t){return this.premultiply(QF.makeRotation(-t)),this}translate(t,e){return this.premultiply(QF.makeTranslation(t,e)),this}makeTranslation(t,e){return t.isVector2?this.set(1,0,t.x,0,1,t.y,0,0,1):this.set(1,0,t,0,1,e,0,0,1),this}makeRotation(t){let e=Math.cos(t),n=Math.sin(t);return this.set(e,-n,0,n,e,0,0,0,1),this}makeScale(t,e){return this.set(t,0,0,0,e,0,0,0,1),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)}},QF=new Bi;function xH(i){for(let t=i.length-1;t>=0;--t)if(i[t]>=65535)return!0;return!1}function Rx(i){return document.createElementNS("http://www.w3.org/1999/xhtml",i)}function qfe(){let i=Rx("canvas");return i.style.display="block",i}var n9={};function sA(i){i in n9||(n9[i]=!0,console.warn(i))}function Gfe(i,t,e){return new Promise(function(n,r){function o(){switch(i.clientWaitSync(t,i.SYNC_FLUSH_COMMANDS_BIT,0)){case i.WAIT_FAILED:r();break;case i.TIMEOUT_EXPIRED:setTimeout(o,e);break;default:n()}}setTimeout(o,e)})}var r9=new Bi().set(.8224621,.177538,0,.0331941,.9668058,0,.0170827,.0723974,.9105199),o9=new Bi().set(1.2249401,-.2249404,0,-.0420569,1.0420571,0,-.0196376,-.0786361,1.0982735),w_={[Qu]:{transfer:Ix,primaries:Dx,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i,fromReference:i=>i},[Ds]:{transfer:sr,primaries:Dx,luminanceCoefficients:[.2126,.7152,.0722],toReference:i=>i.convertSRGBToLinear(),fromReference:i=>i.convertLinearToSRGB()},[cw]:{transfer:Ix,primaries:kx,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.applyMatrix3(o9),fromReference:i=>i.applyMatrix3(r9)},[q3]:{transfer:sr,primaries:kx,luminanceCoefficients:[.2289,.6917,.0793],toReference:i=>i.convertSRGBToLinear().applyMatrix3(o9),fromReference:i=>i.applyMatrix3(r9).convertLinearToSRGB()}},Wfe=new Set([Qu,cw]),On={enabled:!0,_workingColorSpace:Qu,get workingColorSpace(){return this._workingColorSpace},set workingColorSpace(i){if(!Wfe.has(i))throw new Error(`Unsupported working color space, "${i}".`);this._workingColorSpace=i},convert:function(i,t,e){if(this.enabled===!1||t===e||!t||!e)return i;let n=w_[t].toReference,r=w_[e].fromReference;return r(n(i))},fromWorkingColorSpace:function(i,t){return this.convert(i,this._workingColorSpace,t)},toWorkingColorSpace:function(i,t){return this.convert(i,t,this._workingColorSpace)},getPrimaries:function(i){return w_[i].primaries},getTransfer:function(i){return i===Pu?Ix:w_[i].transfer},getLuminanceCoefficients:function(i,t=this._workingColorSpace){return i.fromArray(w_[t].luminanceCoefficients)}};function lA(i){return i<.04045?i*.0773993808:Math.pow(i*.9478672986+.0521327014,2.4)}function zF(i){return i<.0031308?i*12.92:1.055*Math.pow(i,.41666)-.055}var Lp,ZI=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{Lp===void 0&&(Lp=Rx("canvas")),Lp.width=t.width,Lp.height=t.height;let n=Lp.getContext("2d");t instanceof ImageData?n.putImageData(t,0,0):n.drawImage(t,0,0,t.width,t.height),e=Lp}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")}static sRGBToLinear(t){if(typeof HTMLImageElement<"u"&&t instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&t instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&t instanceof ImageBitmap){let e=Rx("canvas");e.width=t.width,e.height=t.height;let n=e.getContext("2d");n.drawImage(t,0,0,t.width,t.height);let r=n.getImageData(0,0,t.width,t.height),o=r.data;for(let a=0;a<o.length;a++)o[a]=lA(o[a]/255)*255;return n.putImageData(r,0,0),e}else if(t.data){let e=t.data.slice(0);for(let n=0;n<e.length;n++)e instanceof Uint8Array||e instanceof Uint8ClampedArray?e[n]=Math.floor(lA(e[n]/255)*255):e[n]=lA(e[n]);return{data:e,width:t.width,height:t.height}}else return console.warn("THREE.ImageUtils.sRGBToLinear(): Unsupported image type. No color space conversion applied."),t}},jfe=0,Ox=class{constructor(t=null){this.isSource=!0,Object.defineProperty(this,"id",{value:jfe++}),this.uuid=oc(),this.data=t,this.dataReady=!0,this.version=0}set needsUpdate(t){t===!0&&this.version++}toJSON(t){let e=t===void 0||typeof t=="string";if(!e&&t.images[this.uuid]!==void 0)return t.images[this.uuid];let n={uuid:this.uuid,url:""},r=this.data;if(r!==null){let o;if(Array.isArray(r)){o=[];for(let a=0,s=r.length;a<s;a++)r[a].isDataTexture?o.push(qF(r[a].image)):o.push(qF(r[a]))}else o=qF(r);n.url=o}return e||(t.images[this.uuid]=n),n}};function qF(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof ImageBitmap<"u"&&i instanceof ImageBitmap?ZI.getDataURL(i):i.data?{data:Array.from(i.data),width:i.width,height:i.height,type:i.data.constructor.name}:(console.warn("THREE.Texture: Unable to serialize Texture."),{})}var $fe=0,uc=(()=>{class i extends Ed{constructor(e=i.DEFAULT_IMAGE,n=i.DEFAULT_MAPPING,r=Xf,o=Xf,a=as,s=Kf,l=ss,c=Sd,d=i.DEFAULT_ANISOTROPY,h=Pu){super(),this.isTexture=!0,Object.defineProperty(this,"id",{value:$fe++}),this.uuid=oc(),this.name="",this.source=new Ox(e),this.mipmaps=[],this.mapping=n,this.channel=0,this.wrapS=r,this.wrapT=o,this.magFilter=a,this.minFilter=s,this.anisotropy=d,this.format=l,this.internalFormat=null,this.type=c,this.offset=new qe(0,0),this.repeat=new qe(1,1),this.center=new qe(0,0),this.rotation=0,this.matrixAutoUpdate=!0,this.matrix=new Bi,this.generateMipmaps=!0,this.premultiplyAlpha=!1,this.flipY=!0,this.unpackAlignment=4,this.colorSpace=h,this.userData={},this.version=0,this.onUpdate=null,this.isRenderTargetTexture=!1,this.pmremVersion=0}get image(){return this.source.data}set image(e=null){this.source.data=e}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.source=e.source,this.mipmaps=e.mipmaps.slice(0),this.mapping=e.mapping,this.channel=e.channel,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.colorSpace=e.colorSpace,this.userData=JSON.parse(JSON.stringify(e.userData)),this.needsUpdate=!0,this}toJSON(e){let n=e===void 0||typeof e=="string";if(!n&&e.textures[this.uuid]!==void 0)return e.textures[this.uuid];let r={metadata:{version:4.6,type:"Texture",generator:"Texture.toJSON"},uuid:this.uuid,name:this.name,image:this.source.toJSON(e).uuid,mapping:this.mapping,channel:this.channel,repeat:[this.repeat.x,this.repeat.y],offset:[this.offset.x,this.offset.y],center:[this.center.x,this.center.y],rotation:this.rotation,wrap:[this.wrapS,this.wrapT],format:this.format,internalFormat:this.internalFormat,type:this.type,colorSpace:this.colorSpace,minFilter:this.minFilter,magFilter:this.magFilter,anisotropy:this.anisotropy,flipY:this.flipY,generateMipmaps:this.generateMipmaps,premultiplyAlpha:this.premultiplyAlpha,unpackAlignment:this.unpackAlignment};return Object.keys(this.userData).length>0&&(r.userData=this.userData),n||(e.textures[this.uuid]=r),r}dispose(){this.dispatchEvent({type:"dispose"})}transformUv(e){if(this.mapping!==K7)return e;if(e.applyMatrix3(this.matrix),e.x<0||e.x>1)switch(this.wrapS){case hA:e.x=e.x-Math.floor(e.x);break;case Xf:e.x=e.x<0?0:1;break;case wI: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 hA:e.y=e.y-Math.floor(e.y);break;case Xf:e.y=e.y<0?0:1;break;case wI: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++,this.source.needsUpdate=!0)}set needsPMREMUpdate(e){e===!0&&this.pmremVersion++}}return i.DEFAULT_IMAGE=null,i.DEFAULT_MAPPING=K7,i.DEFAULT_ANISOTROPY=1,i})(),ro=class i{constructor(t=0,e=0,n=0,r=1){i.prototype.isVector4=!0,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){return 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){return 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,a=t.elements;return this.x=a[0]*e+a[4]*n+a[8]*r+a[12]*o,this.y=a[1]*e+a[5]*n+a[9]*r+a[13]*o,this.z=a[2]*e+a[6]*n+a[10]*r+a[14]*o,this.w=a[3]*e+a[7]*n+a[11]*r+a[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],h=l[8],u=l[1],f=l[5],_=l[9],y=l[2],b=l[6],v=l[10];if(Math.abs(d-u)<.01&&Math.abs(h-y)<.01&&Math.abs(_-b)<.01){if(Math.abs(d+u)<.1&&Math.abs(h+y)<.1&&Math.abs(_+b)<.1&&Math.abs(c+f+v-3)<.1)return this.set(1,0,0,0),this;e=Math.PI;let x=(c+1)/2,w=(f+1)/2,k=(v+1)/2,P=(d+u)/4,D=(h+y)/4,O=(_+b)/4;return x>w&&x>k?x<.01?(n=0,r=.707106781,o=.707106781):(n=Math.sqrt(x),r=P/n,o=D/n):w>k?w<.01?(n=.707106781,r=0,o=.707106781):(r=Math.sqrt(w),n=P/r,o=O/r):k<.01?(n=.707106781,r=.707106781,o=0):(o=Math.sqrt(k),n=D/o,r=O/o),this.set(n,r,o,e),this}let M=Math.sqrt((b-_)*(b-_)+(h-y)*(h-y)+(u-d)*(u-d));return Math.abs(M)<.001&&(M=1),this.x=(b-_)/M,this.y=(h-y)/M,this.z=(u-d)/M,this.w=Math.acos((c+f+v-1)/2),this}setFromMatrixPosition(t){let e=t.elements;return this.x=e[12],this.y=e[13],this.z=e[14],this.w=e[15],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=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this.w=Math.trunc(this.w),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this.w=-this.w,this}dot(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){return 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}},JI=class extends Ed{constructor(t=1,e=1,n={}){super(),this.isRenderTarget=!0,this.width=t,this.height=e,this.depth=1,this.scissor=new ro(0,0,t,e),this.scissorTest=!1,this.viewport=new ro(0,0,t,e);let r={width:t,height:e,depth:1};n=Object.assign({generateMipmaps:!1,internalFormat:null,minFilter:as,depthBuffer:!0,stencilBuffer:!1,resolveDepthBuffer:!0,resolveStencilBuffer:!0,depthTexture:null,samples:0,count:1},n);let o=new uc(r,n.mapping,n.wrapS,n.wrapT,n.magFilter,n.minFilter,n.format,n.type,n.anisotropy,n.colorSpace);o.flipY=!1,o.generateMipmaps=n.generateMipmaps,o.internalFormat=n.internalFormat,this.textures=[];let a=n.count;for(let s=0;s<a;s++)this.textures[s]=o.clone(),this.textures[s].isRenderTargetTexture=!0;this.depthBuffer=n.depthBuffer,this.stencilBuffer=n.stencilBuffer,this.resolveDepthBuffer=n.resolveDepthBuffer,this.resolveStencilBuffer=n.resolveStencilBuffer,this.depthTexture=n.depthTexture,this.samples=n.samples}get texture(){return this.textures[0]}set texture(t){this.textures[0]=t}setSize(t,e,n=1){if(this.width!==t||this.height!==e||this.depth!==n){this.width=t,this.height=e,this.depth=n;for(let r=0,o=this.textures.length;r<o;r++)this.textures[r].image.width=t,this.textures[r].image.height=e,this.textures[r].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){this.width=t.width,this.height=t.height,this.depth=t.depth,this.scissor.copy(t.scissor),this.scissorTest=t.scissorTest,this.viewport.copy(t.viewport),this.textures.length=0;for(let n=0,r=t.textures.length;n<r;n++)this.textures[n]=t.textures[n].clone(),this.textures[n].isRenderTargetTexture=!0;let e=Object.assign({},t.texture.image);return this.texture.source=new Ox(e),this.depthBuffer=t.depthBuffer,this.stencilBuffer=t.stencilBuffer,this.resolveDepthBuffer=t.resolveDepthBuffer,this.resolveStencilBuffer=t.resolveStencilBuffer,t.depthTexture!==null&&(this.depthTexture=t.depthTexture.clone()),this.samples=t.samples,this}dispose(){this.dispatchEvent({type:"dispose"})}},ls=class extends JI{constructor(t=1,e=1,n={}){super(t,e,n),this.isWebGLRenderTarget=!0}},Lx=class extends uc{constructor(t=null,e=1,n=1,r=1){super(null),this.isDataArrayTexture=!0,this.image={data:t,width:e,height:n,depth:r},this.magFilter=ks,this.minFilter=ks,this.wrapR=Xf,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1,this.layerUpdates=new Set}addLayerUpdate(t){this.layerUpdates.add(t)}clearLayerUpdates(){this.layerUpdates.clear()}};var e3=class extends uc{constructor(t=null,e=1,n=1,r=1){super(null),this.isData3DTexture=!0,this.image={data:t,width:e,height:n,depth:r},this.magFilter=ks,this.minFilter=ks,this.wrapR=Xf,this.generateMipmaps=!1,this.flipY=!1,this.unpackAlignment=1}};var bl=class{constructor(t=0,e=0,n=0,r=1){this.isQuaternion=!0,this._x=t,this._y=e,this._z=n,this._w=r}static slerpFlat(t,e,n,r,o,a,s){let l=n[r+0],c=n[r+1],d=n[r+2],h=n[r+3],u=o[a+0],f=o[a+1],_=o[a+2],y=o[a+3];if(s===0){t[e+0]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h;return}if(s===1){t[e+0]=u,t[e+1]=f,t[e+2]=_,t[e+3]=y;return}if(h!==y||l!==u||c!==f||d!==_){let b=1-s,v=l*u+c*f+d*_+h*y,M=v>=0?1:-1,x=1-v*v;if(x>Number.EPSILON){let k=Math.sqrt(x),P=Math.atan2(k,v*M);b=Math.sin(b*P)/k,s=Math.sin(s*P)/k}let w=s*M;if(l=l*b+u*w,c=c*b+f*w,d=d*b+_*w,h=h*b+y*w,b===1-s){let k=1/Math.sqrt(l*l+c*c+d*d+h*h);l*=k,c*=k,d*=k,h*=k}}t[e]=l,t[e+1]=c,t[e+2]=d,t[e+3]=h}static multiplyQuaternionsFlat(t,e,n,r,o,a){let s=n[r],l=n[r+1],c=n[r+2],d=n[r+3],h=o[a],u=o[a+1],f=o[a+2],_=o[a+3];return t[e]=s*_+d*h+l*f-c*u,t[e+1]=l*_+d*u+c*h-s*f,t[e+2]=c*_+d*f+s*u-l*h,t[e+3]=d*_-s*h-l*u-c*f,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=!0){let n=t._x,r=t._y,o=t._z,a=t._order,s=Math.cos,l=Math.sin,c=s(n/2),d=s(r/2),h=s(o/2),u=l(n/2),f=l(r/2),_=l(o/2);switch(a){case"XYZ":this._x=u*d*h+c*f*_,this._y=c*f*h-u*d*_,this._z=c*d*_+u*f*h,this._w=c*d*h-u*f*_;break;case"YXZ":this._x=u*d*h+c*f*_,this._y=c*f*h-u*d*_,this._z=c*d*_-u*f*h,this._w=c*d*h+u*f*_;break;case"ZXY":this._x=u*d*h-c*f*_,this._y=c*f*h+u*d*_,this._z=c*d*_+u*f*h,this._w=c*d*h-u*f*_;break;case"ZYX":this._x=u*d*h-c*f*_,this._y=c*f*h+u*d*_,this._z=c*d*_-u*f*h,this._w=c*d*h+u*f*_;break;case"YZX":this._x=u*d*h+c*f*_,this._y=c*f*h+u*d*_,this._z=c*d*_-u*f*h,this._w=c*d*h-u*f*_;break;case"XZY":this._x=u*d*h-c*f*_,this._y=c*f*h-u*d*_,this._z=c*d*_+u*f*h,this._w=c*d*h+u*f*_;break;default:console.warn("THREE.Quaternion: .setFromEuler() encountered an unknown order: "+a)}return e===!0&&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],a=e[1],s=e[5],l=e[9],c=e[2],d=e[6],h=e[10],u=n+s+h;if(u>0){let f=.5/Math.sqrt(u+1);this._w=.25/f,this._x=(d-l)*f,this._y=(o-c)*f,this._z=(a-r)*f}else if(n>s&&n>h){let f=2*Math.sqrt(1+n-s-h);this._w=(d-l)/f,this._x=.25*f,this._y=(r+a)/f,this._z=(o+c)/f}else if(s>h){let f=2*Math.sqrt(1+s-n-h);this._w=(o-c)/f,this._x=(r+a)/f,this._y=.25*f,this._z=(l+d)/f}else{let f=2*Math.sqrt(1+h-n-s);this._w=(a-r)/f,this._x=(o+c)/f,this._y=(l+d)/f,this._z=.25*f}return this._onChangeCallback(),this}setFromUnitVectors(t,e){let n=t.dot(e)+1;return n<Number.EPSILON?(n=0,Math.abs(t.x)>Math.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(xo(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){return this.multiplyQuaternions(this,t)}premultiply(t){return this.multiplyQuaternions(t,this)}multiplyQuaternions(t,e){let n=t._x,r=t._y,o=t._z,a=t._w,s=e._x,l=e._y,c=e._z,d=e._w;return this._x=n*d+a*s+r*c-o*l,this._y=r*d+a*l+o*s-n*c,this._z=o*d+a*c+n*l-r*s,this._w=a*d-n*s-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,a=this._w,s=a*t._w+n*t._x+r*t._y+o*t._z;if(s<0?(this._w=-t._w,this._x=-t._x,this._y=-t._y,this._z=-t._z,s=-s):this.copy(t),s>=1)return this._w=a,this._x=n,this._y=r,this._z=o,this;let l=1-s*s;if(l<=Number.EPSILON){let f=1-e;return this._w=f*a+e*this._w,this._x=f*n+e*this._x,this._y=f*r+e*this._y,this._z=f*o+e*this._z,this.normalize(),this}let c=Math.sqrt(l),d=Math.atan2(c,s),h=Math.sin((1-e)*d)/c,u=Math.sin(e*d)/c;return this._w=a*h+this._w*u,this._x=n*h+this._x*u,this._y=r*h+this._y*u,this._z=o*h+this._z*u,this._onChangeCallback(),this}slerpQuaternions(t,e,n){return this.copy(t).slerp(e,n)}random(){let t=2*Math.PI*Math.random(),e=2*Math.PI*Math.random(),n=Math.random(),r=Math.sqrt(1-n),o=Math.sqrt(n);return this.set(r*Math.sin(t),r*Math.cos(t),o*Math.sin(e),o*Math.cos(e))}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._onChangeCallback(),this}toJSON(){return this.toArray()}_onChange(t){return this._onChangeCallback=t,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._w}},ce=class i{constructor(t=0,e=0,n=0){i.prototype.isVector3=!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){return 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){return 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){return 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 this.applyQuaternion(a9.setFromEuler(t))}applyAxisAngle(t,e){return this.applyQuaternion(a9.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,a=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])*a,this.y=(o[1]*e+o[5]*n+o[9]*r+o[13])*a,this.z=(o[2]*e+o[6]*n+o[10]*r+o[14])*a,this}applyQuaternion(t){let e=this.x,n=this.y,r=this.z,o=t.x,a=t.y,s=t.z,l=t.w,c=2*(a*r-s*n),d=2*(s*e-o*r),h=2*(o*n-a*e);return this.x=e+l*c+a*h-s*d,this.y=n+l*d+s*c-o*h,this.z=r+l*h+o*d-a*c,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=Math.trunc(this.x),this.y=Math.trunc(this.y),this.z=Math.trunc(this.z),this}negate(){return this.x=-this.x,this.y=-this.y,this.z=-this.z,this}dot(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){return this.crossVectors(this,t)}crossVectors(t,e){let n=t.x,r=t.y,o=t.z,a=e.x,s=e.y,l=e.z;return this.x=r*l-o*s,this.y=o*a-n*l,this.z=n*s-r*a,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 GF.copy(this).projectOnVector(t),this.sub(GF)}reflect(t){return this.sub(GF.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(xo(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)}setFromEuler(t){return this.x=t._x,this.y=t._y,this.z=t._z,this}setFromColor(t){return this.x=t.r,this.y=t.g,this.z=t.b,this}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){return 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()*Math.PI*2,e=Math.random()*2-1,n=Math.sqrt(1-e*e);return this.x=n*Math.cos(t),this.y=e,this.z=n*Math.sin(t),this}*[Symbol.iterator](){yield this.x,yield this.y,yield this.z}},GF=new ce,a9=new bl,Lo=class{constructor(t=new ce(1/0,1/0,1/0),e=new ce(-1/0,-1/0,-1/0)){this.isBox3=!0,this.min=t,this.max=e}set(t,e){return this.min.copy(t),this.max.copy(e),this}setFromArray(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e+=3)this.expandByPoint(ml.fromArray(t,e));return this}setFromBufferAttribute(t){this.makeEmpty();for(let e=0,n=t.count;e<n;e++)this.expandByPoint(ml.fromBufferAttribute(t,e));return this}setFromPoints(t){this.makeEmpty();for(let e=0,n=t.length;e<n;e++)this.expandByPoint(t[e]);return this}setFromCenterAndSize(t,e){let n=ml.copy(e).multiplyScalar(.5);return this.min.copy(t).sub(n),this.max.copy(t).add(n),this}setFromObject(t,e=!1){return this.makeEmpty(),this.expandByObject(t,e)}clone(){return new this.constructor().copy(this)}copy(t){return this.min.copy(t.min),this.max.copy(t.max),this}makeEmpty(){return this.min.x=this.min.y=this.min.z=1/0,this.max.x=this.max.y=this.max.z=-1/0,this}isEmpty(){return this.max.x<this.min.x||this.max.y<this.min.y||this.max.z<this.min.z}getCenter(t){return this.isEmpty()?t.set(0,0,0):t.addVectors(this.min,this.max).multiplyScalar(.5)}getSize(t){return this.isEmpty()?t.set(0,0,0):t.subVectors(this.max,this.min)}expandByPoint(t){return this.min.min(t),this.max.max(t),this}expandByVector(t){return this.min.sub(t),this.max.add(t),this}expandByScalar(t){return this.min.addScalar(-t),this.max.addScalar(t),this}expandByObject(t,e=!1){t.updateWorldMatrix(!1,!1);let n=t.geometry;if(n!==void 0){let o=n.getAttribute("position");if(e===!0&&o!==void 0&&t.isInstancedMesh!==!0)for(let a=0,s=o.count;a<s;a++)t.isMesh===!0?t.getVertexPosition(a,ml):ml.fromBufferAttribute(o,a),ml.applyMatrix4(t.matrixWorld),this.expandByPoint(ml);else t.boundingBox!==void 0?(t.boundingBox===null&&t.computeBoundingBox(),W1.copy(t.boundingBox)):(n.boundingBox===null&&n.computeBoundingBox(),W1.copy(n.boundingBox)),W1.applyMatrix4(t.matrixWorld),this.union(W1)}let r=t.children;for(let o=0,a=r.length;o<a;o++)this.expandByObject(r[o],e);return this}containsPoint(t){return t.x>=this.min.x&&t.x<=this.max.x&&t.y>=this.min.y&&t.y<=this.max.y&&t.z>=this.min.z&&t.z<=this.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.x>=this.min.x&&t.min.x<=this.max.x&&t.max.y>=this.min.y&&t.min.y<=this.max.y&&t.max.z>=this.min.z&&t.min.z<=this.max.z}intersectsSphere(t){return this.clampPoint(t.center,ml),ml.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(C_),j1.subVectors(this.max,C_),Np.subVectors(t.a,C_),Up.subVectors(t.b,C_),Hp.subVectors(t.c,C_),Tu.subVectors(Up,Np),Bu.subVectors(Hp,Up),Hf.subVectors(Np,Hp);let e=[0,-Tu.z,Tu.y,0,-Bu.z,Bu.y,0,-Hf.z,Hf.y,Tu.z,0,-Tu.x,Bu.z,0,-Bu.x,Hf.z,0,-Hf.x,-Tu.y,Tu.x,0,-Bu.y,Bu.x,0,-Hf.y,Hf.x,0];return!WF(e,Np,Up,Hp,j1)||(e=[1,0,0,0,1,0,0,0,1],!WF(e,Np,Up,Hp,j1))?!1:($1.crossVectors(Tu,Bu),e=[$1.x,$1.y,$1.z],WF(e,Np,Up,Hp,j1))}clampPoint(t,e){return e.copy(t).clamp(this.min,this.max)}distanceToPoint(t){return this.clampPoint(t,ml).distanceTo(t)}getBoundingSphere(t){return this.isEmpty()?t.makeEmpty():(this.getCenter(t.center),t.radius=this.getSize(ml).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:(Ad[0].set(this.min.x,this.min.y,this.min.z).applyMatrix4(t),Ad[1].set(this.min.x,this.min.y,this.max.z).applyMatrix4(t),Ad[2].set(this.min.x,this.max.y,this.min.z).applyMatrix4(t),Ad[3].set(this.min.x,this.max.y,this.max.z).applyMatrix4(t),Ad[4].set(this.max.x,this.min.y,this.min.z).applyMatrix4(t),Ad[5].set(this.max.x,this.min.y,this.max.z).applyMatrix4(t),Ad[6].set(this.max.x,this.max.y,this.min.z).applyMatrix4(t),Ad[7].set(this.max.x,this.max.y,this.max.z).applyMatrix4(t),this.setFromPoints(Ad),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)}},Ad=[new ce,new ce,new ce,new ce,new ce,new ce,new ce,new ce],ml=new ce,W1=new Lo,Np=new ce,Up=new ce,Hp=new ce,Tu=new ce,Bu=new ce,Hf=new ce,C_=new ce,j1=new ce,$1=new ce,Vf=new ce;function WF(i,t,e,n,r){for(let o=0,a=i.length-3;o<=a;o+=3){Vf.fromArray(i,o);let s=r.x*Math.abs(Vf.x)+r.y*Math.abs(Vf.y)+r.z*Math.abs(Vf.z),l=t.dot(Vf),c=e.dot(Vf),d=n.dot(Vf);if(Math.max(-Math.max(l,c,d),Math.min(l,c,d))>s)return!1}return!0}var Xfe=new Lo,M_=new ce,jF=new ce,sc=class{constructor(t=new ce,e=-1){this.isSphere=!0,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):Xfe.setFromPoints(t).getCenter(n);let r=0;for(let o=0,a=t.length;o<a;o++)r=Math.max(r,n.distanceToSquared(t[o]));return this.radius=Math.sqrt(r),this}copy(t){return this.center.copy(t.center),this.radius=t.radius,this}isEmpty(){return this.radius<0}makeEmpty(){return this.center.set(0,0,0),this.radius=-1,this}containsPoint(t){return t.distanceToSquared(this.center)<=this.radius*this.radius}distanceToPoint(t){return t.distanceTo(this.center)-this.radius}intersectsSphere(t){let e=this.radius+t.radius;return t.center.distanceToSquared(this.center)<=e*e}intersectsBox(t){return t.intersectsSphere(this)}intersectsPlane(t){return Math.abs(t.distanceToPoint(this.center))<=this.radius}clampPoint(t,e){let n=this.center.distanceToSquared(t);return e.copy(t),n>this.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){if(this.isEmpty())return this.center.copy(t),this.radius=0,this;M_.subVectors(t,this.center);let e=M_.lengthSq();if(e>this.radius*this.radius){let n=Math.sqrt(e),r=(n-this.radius)*.5;this.center.addScaledVector(M_,r/n),this.radius+=r}return this}union(t){return t.isEmpty()?this:this.isEmpty()?(this.copy(t),this):(this.center.equals(t.center)===!0?this.radius=Math.max(this.radius,t.radius):(jF.subVectors(t.center,this.center).setLength(t.radius),this.expandByPoint(M_.copy(t.center).add(jF)),this.expandByPoint(M_.copy(t.center).sub(jF))),this)}equals(t){return t.center.equals(this.center)&&t.radius===this.radius}clone(){return new this.constructor().copy(this)}},gd=new ce,$F=new ce,X1=new ce,Fu=new ce,XF=new ce,K1=new ce,KF=new ce,Td=class{constructor(t=new ce,e=new ce(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.origin).addScaledVector(this.direction,t)}lookAt(t){return this.direction.copy(t).sub(this.origin).normalize(),this}recast(t){return this.origin.copy(this.at(t,gd)),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.origin).addScaledVector(this.direction,n)}distanceToPoint(t){return Math.sqrt(this.distanceSqToPoint(t))}distanceSqToPoint(t){let e=gd.subVectors(t,this.origin).dot(this.direction);return e<0?this.origin.distanceToSquared(t):(gd.copy(this.origin).addScaledVector(this.direction,e),gd.distanceToSquared(t))}distanceSqToSegment(t,e,n,r){$F.copy(t).add(e).multiplyScalar(.5),X1.copy(e).sub(t).normalize(),Fu.copy(this.origin).sub($F);let o=t.distanceTo(e)*.5,a=-this.direction.dot(X1),s=Fu.dot(this.direction),l=-Fu.dot(X1),c=Fu.lengthSq(),d=Math.abs(1-a*a),h,u,f,_;if(d>0)if(h=a*l-s,u=a*s-l,_=o*d,h>=0)if(u>=-_)if(u<=_){let y=1/d;h*=y,u*=y,f=h*(h+a*u+2*s)+u*(a*h+u+2*l)+c}else u=o,h=Math.max(0,-(a*u+s)),f=-h*h+u*(u+2*l)+c;else u=-o,h=Math.max(0,-(a*u+s)),f=-h*h+u*(u+2*l)+c;else u<=-_?(h=Math.max(0,-(-a*o+s)),u=h>0?-o:Math.min(Math.max(-o,-l),o),f=-h*h+u*(u+2*l)+c):u<=_?(h=0,u=Math.min(Math.max(-o,-l),o),f=u*(u+2*l)+c):(h=Math.max(0,-(a*o+s)),u=h>0?o:Math.min(Math.max(-o,-l),o),f=-h*h+u*(u+2*l)+c);else u=a>0?-o:o,h=Math.max(0,-(a*u+s)),f=-h*h+u*(u+2*l)+c;return n&&n.copy(this.origin).addScaledVector(this.direction,h),r&&r.copy($F).addScaledVector(X1,u),f}intersectSphere(t,e){gd.subVectors(t.center,this.origin);let n=gd.dot(this.direction),r=gd.dot(gd)-n*n,o=t.radius*t.radius;if(r>o)return null;let a=Math.sqrt(o-r),s=n-a,l=n+a;return l<0?null:s<0?this.at(l,e):this.at(s,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,a,s,l,c=1/this.direction.x,d=1/this.direction.y,h=1/this.direction.z,u=this.origin;return c>=0?(n=(t.min.x-u.x)*c,r=(t.max.x-u.x)*c):(n=(t.max.x-u.x)*c,r=(t.min.x-u.x)*c),d>=0?(o=(t.min.y-u.y)*d,a=(t.max.y-u.y)*d):(o=(t.max.y-u.y)*d,a=(t.min.y-u.y)*d),n>a||o>r||((o>n||isNaN(n))&&(n=o),(a<r||isNaN(r))&&(r=a),h>=0?(s=(t.min.z-u.z)*h,l=(t.max.z-u.z)*h):(s=(t.max.z-u.z)*h,l=(t.min.z-u.z)*h),n>l||s>r)||((s>n||n!==n)&&(n=s),(l<r||r!==r)&&(r=l),r<0)?null:this.at(n>=0?n:r,e)}intersectsBox(t){return this.intersectBox(t,gd)!==null}intersectTriangle(t,e,n,r,o){XF.subVectors(e,t),K1.subVectors(n,t),KF.crossVectors(XF,K1);let a=this.direction.dot(KF),s;if(a>0){if(r)return null;s=1}else if(a<0)s=-1,a=-a;else return null;Fu.subVectors(this.origin,t);let l=s*this.direction.dot(K1.crossVectors(Fu,K1));if(l<0)return null;let c=s*this.direction.dot(XF.cross(Fu));if(c<0||l+c>a)return null;let d=-s*Fu.dot(KF);return d<0?null:this.at(d/a,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)}},gr=class i{constructor(t,e,n,r,o,a,s,l,c,d,h,u,f,_,y,b){i.prototype.isMatrix4=!0,this.elements=[1,0,0,0,0,1,0,0,0,0,1,0,0,0,0,1],t!==void 0&&this.set(t,e,n,r,o,a,s,l,c,d,h,u,f,_,y,b)}set(t,e,n,r,o,a,s,l,c,d,h,u,f,_,y,b){let v=this.elements;return v[0]=t,v[4]=e,v[8]=n,v[12]=r,v[1]=o,v[5]=a,v[9]=s,v[13]=l,v[2]=c,v[6]=d,v[10]=h,v[14]=u,v[3]=f,v[7]=_,v[11]=y,v[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/Vp.setFromMatrixColumn(t,0).length(),o=1/Vp.setFromMatrixColumn(t,1).length(),a=1/Vp.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]*a,e[9]=n[9]*a,e[10]=n[10]*a,e[11]=0,e[12]=0,e[13]=0,e[14]=0,e[15]=1,this}makeRotationFromEuler(t){let e=this.elements,n=t.x,r=t.y,o=t.z,a=Math.cos(n),s=Math.sin(n),l=Math.cos(r),c=Math.sin(r),d=Math.cos(o),h=Math.sin(o);if(t.order==="XYZ"){let u=a*d,f=a*h,_=s*d,y=s*h;e[0]=l*d,e[4]=-l*h,e[8]=c,e[1]=f+_*c,e[5]=u-y*c,e[9]=-s*l,e[2]=y-u*c,e[6]=_+f*c,e[10]=a*l}else if(t.order==="YXZ"){let u=l*d,f=l*h,_=c*d,y=c*h;e[0]=u+y*s,e[4]=_*s-f,e[8]=a*c,e[1]=a*h,e[5]=a*d,e[9]=-s,e[2]=f*s-_,e[6]=y+u*s,e[10]=a*l}else if(t.order==="ZXY"){let u=l*d,f=l*h,_=c*d,y=c*h;e[0]=u-y*s,e[4]=-a*h,e[8]=_+f*s,e[1]=f+_*s,e[5]=a*d,e[9]=y-u*s,e[2]=-a*c,e[6]=s,e[10]=a*l}else if(t.order==="ZYX"){let u=a*d,f=a*h,_=s*d,y=s*h;e[0]=l*d,e[4]=_*c-f,e[8]=u*c+y,e[1]=l*h,e[5]=y*c+u,e[9]=f*c-_,e[2]=-c,e[6]=s*l,e[10]=a*l}else if(t.order==="YZX"){let u=a*l,f=a*c,_=s*l,y=s*c;e[0]=l*d,e[4]=y-u*h,e[8]=_*h+f,e[1]=h,e[5]=a*d,e[9]=-s*d,e[2]=-c*d,e[6]=f*h+_,e[10]=u-y*h}else if(t.order==="XZY"){let u=a*l,f=a*c,_=s*l,y=s*c;e[0]=l*d,e[4]=-h,e[8]=c*d,e[1]=u*h+y,e[5]=a*d,e[9]=f*h-_,e[2]=_*h-f,e[6]=s*d,e[10]=y*h+u}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(Kfe,t,Yfe)}lookAt(t,e,n){let r=this.elements;return rs.subVectors(t,e),rs.lengthSq()===0&&(rs.z=1),rs.normalize(),Iu.crossVectors(n,rs),Iu.lengthSq()===0&&(Math.abs(n.z)===1?rs.x+=1e-4:rs.z+=1e-4,rs.normalize(),Iu.crossVectors(n,rs)),Iu.normalize(),Y1.crossVectors(rs,Iu),r[0]=Iu.x,r[4]=Y1.x,r[8]=rs.x,r[1]=Iu.y,r[5]=Y1.y,r[9]=rs.y,r[2]=Iu.z,r[6]=Y1.z,r[10]=rs.z,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,a=n[0],s=n[4],l=n[8],c=n[12],d=n[1],h=n[5],u=n[9],f=n[13],_=n[2],y=n[6],b=n[10],v=n[14],M=n[3],x=n[7],w=n[11],k=n[15],P=r[0],D=r[4],O=r[8],T=r[12],B=r[1],L=r[5],G=r[9],W=r[13],oe=r[2],pe=r[6],ge=r[10],de=r[14],U=r[3],ee=r[7],De=r[11],We=r[15];return o[0]=a*P+s*B+l*oe+c*U,o[4]=a*D+s*L+l*pe+c*ee,o[8]=a*O+s*G+l*ge+c*De,o[12]=a*T+s*W+l*de+c*We,o[1]=d*P+h*B+u*oe+f*U,o[5]=d*D+h*L+u*pe+f*ee,o[9]=d*O+h*G+u*ge+f*De,o[13]=d*T+h*W+u*de+f*We,o[2]=_*P+y*B+b*oe+v*U,o[6]=_*D+y*L+b*pe+v*ee,o[10]=_*O+y*G+b*ge+v*De,o[14]=_*T+y*W+b*de+v*We,o[3]=M*P+x*B+w*oe+k*U,o[7]=M*D+x*L+w*pe+k*ee,o[11]=M*O+x*G+w*ge+k*De,o[15]=M*T+x*W+w*de+k*We,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],a=t[1],s=t[5],l=t[9],c=t[13],d=t[2],h=t[6],u=t[10],f=t[14],_=t[3],y=t[7],b=t[11],v=t[15];return _*(+o*l*h-r*c*h-o*s*u+n*c*u+r*s*f-n*l*f)+y*(+e*l*f-e*c*u+o*a*u-r*a*f+r*c*d-o*l*d)+b*(+e*c*h-e*s*f-o*a*h+n*a*f+o*s*d-n*c*d)+v*(-r*s*d-e*l*h+e*s*u+r*a*h-n*a*u+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],a=t[4],s=t[5],l=t[6],c=t[7],d=t[8],h=t[9],u=t[10],f=t[11],_=t[12],y=t[13],b=t[14],v=t[15],M=h*b*c-y*u*c+y*l*f-s*b*f-h*l*v+s*u*v,x=_*u*c-d*b*c-_*l*f+a*b*f+d*l*v-a*u*v,w=d*y*c-_*h*c+_*s*f-a*y*f-d*s*v+a*h*v,k=_*h*l-d*y*l-_*s*u+a*y*u+d*s*b-a*h*b,P=e*M+n*x+r*w+o*k;if(P===0)return this.set(0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0);let D=1/P;return t[0]=M*D,t[1]=(y*u*o-h*b*o-y*r*f+n*b*f+h*r*v-n*u*v)*D,t[2]=(s*b*o-y*l*o+y*r*c-n*b*c-s*r*v+n*l*v)*D,t[3]=(h*l*o-s*u*o-h*r*c+n*u*c+s*r*f-n*l*f)*D,t[4]=x*D,t[5]=(d*b*o-_*u*o+_*r*f-e*b*f-d*r*v+e*u*v)*D,t[6]=(_*l*o-a*b*o-_*r*c+e*b*c+a*r*v-e*l*v)*D,t[7]=(a*u*o-d*l*o+d*r*c-e*u*c-a*r*f+e*l*f)*D,t[8]=w*D,t[9]=(_*h*o-d*y*o-_*n*f+e*y*f+d*n*v-e*h*v)*D,t[10]=(a*y*o-_*s*o+_*n*c-e*y*c-a*n*v+e*s*v)*D,t[11]=(d*s*o-a*h*o-d*n*c+e*h*c+a*n*f-e*s*f)*D,t[12]=k*D,t[13]=(d*y*r-_*h*r+_*n*u-e*y*u-d*n*b+e*h*b)*D,t[14]=(_*s*r-a*y*r-_*n*l+e*y*l+a*n*b-e*s*b)*D,t[15]=(a*h*r-d*s*r+d*n*l-e*h*l-a*n*u+e*s*u)*D,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 t.isVector3?this.set(1,0,0,t.x,0,1,0,t.y,0,0,1,t.z,0,0,0,1):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,a=t.x,s=t.y,l=t.z,c=o*a,d=o*s;return this.set(c*a+n,c*s-r*l,c*l+r*s,0,c*s+r*l,d*s+n,d*l-r*a,0,c*l-r*s,d*l+r*a,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,a){return this.set(1,n,o,0,t,1,a,0,e,r,1,0,0,0,0,1),this}compose(t,e,n){let r=this.elements,o=e._x,a=e._y,s=e._z,l=e._w,c=o+o,d=a+a,h=s+s,u=o*c,f=o*d,_=o*h,y=a*d,b=a*h,v=s*h,M=l*c,x=l*d,w=l*h,k=n.x,P=n.y,D=n.z;return r[0]=(1-(y+v))*k,r[1]=(f+w)*k,r[2]=(_-x)*k,r[3]=0,r[4]=(f-w)*P,r[5]=(1-(u+v))*P,r[6]=(b+M)*P,r[7]=0,r[8]=(_+x)*D,r[9]=(b-M)*D,r[10]=(1-(u+y))*D,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=Vp.set(r[0],r[1],r[2]).length(),a=Vp.set(r[4],r[5],r[6]).length(),s=Vp.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],pl.copy(this);let c=1/o,d=1/a,h=1/s;return pl.elements[0]*=c,pl.elements[1]*=c,pl.elements[2]*=c,pl.elements[4]*=d,pl.elements[5]*=d,pl.elements[6]*=d,pl.elements[8]*=h,pl.elements[9]*=h,pl.elements[10]*=h,e.setFromRotationMatrix(pl),n.x=o,n.y=a,n.z=s,this}makePerspective(t,e,n,r,o,a,s=Md){let l=this.elements,c=2*o/(e-t),d=2*o/(n-r),h=(e+t)/(e-t),u=(n+r)/(n-r),f,_;if(s===Md)f=-(a+o)/(a-o),_=-2*a*o/(a-o);else if(s===Px)f=-a/(a-o),_=-a*o/(a-o);else throw new Error("THREE.Matrix4.makePerspective(): Invalid coordinate system: "+s);return l[0]=c,l[4]=0,l[8]=h,l[12]=0,l[1]=0,l[5]=d,l[9]=u,l[13]=0,l[2]=0,l[6]=0,l[10]=f,l[14]=_,l[3]=0,l[7]=0,l[11]=-1,l[15]=0,this}makeOrthographic(t,e,n,r,o,a,s=Md){let l=this.elements,c=1/(e-t),d=1/(n-r),h=1/(a-o),u=(e+t)*c,f=(n+r)*d,_,y;if(s===Md)_=(a+o)*h,y=-2*h;else if(s===Px)_=o*h,y=-1*h;else throw new Error("THREE.Matrix4.makeOrthographic(): Invalid coordinate system: "+s);return l[0]=2*c,l[4]=0,l[8]=0,l[12]=-u,l[1]=0,l[5]=2*d,l[9]=0,l[13]=-f,l[2]=0,l[6]=0,l[10]=y,l[14]=-_,l[3]=0,l[7]=0,l[11]=0,l[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}},Vp=new ce,pl=new gr,Kfe=new ce(0,0,0),Yfe=new ce(1,1,1),Iu=new ce,Y1=new ce,rs=new ce,s9=new gr,l9=new bl,Jf=(()=>{class i{constructor(e=0,n=0,r=0,o=i.DEFAULT_ORDER){this.isEuler=!0,this._x=e,this._y=n,this._z=r,this._order=o}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,n,r,o=this._order){return this._x=e,this._y=n,this._z=r,this._order=o,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,n=this._order,r=!0){let o=e.elements,a=o[0],s=o[4],l=o[8],c=o[1],d=o[5],h=o[9],u=o[2],f=o[6],_=o[10];switch(n){case"XYZ":this._y=Math.asin(xo(l,-1,1)),Math.abs(l)<.9999999?(this._x=Math.atan2(-h,_),this._z=Math.atan2(-s,a)):(this._x=Math.atan2(f,d),this._z=0);break;case"YXZ":this._x=Math.asin(-xo(h,-1,1)),Math.abs(h)<.9999999?(this._y=Math.atan2(l,_),this._z=Math.atan2(c,d)):(this._y=Math.atan2(-u,a),this._z=0);break;case"ZXY":this._x=Math.asin(xo(f,-1,1)),Math.abs(f)<.9999999?(this._y=Math.atan2(-u,_),this._z=Math.atan2(-s,d)):(this._y=0,this._z=Math.atan2(c,a));break;case"ZYX":this._y=Math.asin(-xo(u,-1,1)),Math.abs(u)<.9999999?(this._x=Math.atan2(f,_),this._z=Math.atan2(c,a)):(this._x=0,this._z=Math.atan2(-s,d));break;case"YZX":this._z=Math.asin(xo(c,-1,1)),Math.abs(c)<.9999999?(this._x=Math.atan2(-h,d),this._y=Math.atan2(-u,a)):(this._x=0,this._y=Math.atan2(l,_));break;case"XZY":this._z=Math.asin(-xo(s,-1,1)),Math.abs(s)<.9999999?(this._x=Math.atan2(f,d),this._y=Math.atan2(l,a)):(this._x=Math.atan2(-h,_),this._y=0);break;default:console.warn("THREE.Euler: .setFromRotationMatrix() encountered an unknown order: "+n)}return this._order=n,r===!0&&this._onChangeCallback(),this}setFromQuaternion(e,n,r){return s9.makeRotationFromQuaternion(e),this.setFromRotationMatrix(s9,n,r)}setFromVector3(e,n=this._order){return this.set(e.x,e.y,e.z,n)}reorder(e){return l9.setFromEuler(this),this.setFromQuaternion(l9,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=[],n=0){return e[n]=this._x,e[n+1]=this._y,e[n+2]=this._z,e[n+3]=this._order,e}_onChange(e){return this._onChangeCallback=e,this}_onChangeCallback(){}*[Symbol.iterator](){yield this._x,yield this._y,yield this._z,yield this._order}}return i.DEFAULT_ORDER="XYZ",i})(),H_=class{constructor(){this.mask=1}set(t){this.mask=(1<<t|0)>>>0}enable(t){this.mask|=1<<t|0}enableAll(){this.mask=-1}toggle(t){this.mask^=1<<t|0}disable(t){this.mask&=~(1<<t|0)}disableAll(){this.mask=0}test(t){return(this.mask&t.mask)!==0}isEnabled(t){return(this.mask&(1<<t|0))!==0}},Zfe=0,c9=new ce,Qp=new bl,_d=new gr,Z1=new ce,S_=new ce,Jfe=new ce,eme=new bl,d9=new ce(1,0,0),u9=new ce(0,1,0),h9=new ce(0,0,1),f9={type:"added"},tme={type:"removed"},zp={type:"childadded",child:null},YF={type:"childremoved",child:null},Ps=(()=>{class i extends Ed{constructor(){super(),this.isObject3D=!0,Object.defineProperty(this,"id",{value:Zfe++}),this.uuid=oc(),this.name="",this.type="Object3D",this.parent=null,this.children=[],this.up=i.DEFAULT_UP.clone();let e=new ce,n=new Jf,r=new bl,o=new ce(1,1,1);function a(){r.setFromEuler(n,!1)}function s(){n.setFromQuaternion(r,void 0,!1)}n._onChange(a),r._onChange(s),Object.defineProperties(this,{position:{configurable:!0,enumerable:!0,value:e},rotation:{configurable:!0,enumerable:!0,value:n},quaternion:{configurable:!0,enumerable:!0,value:r},scale:{configurable:!0,enumerable:!0,value:o},modelViewMatrix:{value:new gr},normalMatrix:{value:new Bi}}),this.matrix=new gr,this.matrixWorld=new gr,this.matrixAutoUpdate=i.DEFAULT_MATRIX_AUTO_UPDATE,this.matrixWorldAutoUpdate=i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE,this.matrixWorldNeedsUpdate=!1,this.layers=new H_,this.visible=!0,this.castShadow=!1,this.receiveShadow=!1,this.frustumCulled=!0,this.renderOrder=0,this.animations=[],this.userData={}}onBeforeShadow(){}onAfterShadow(){}onBeforeRender(){}onAfterRender(){}applyMatrix4(e){this.matrixAutoUpdate&&this.updateMatrix(),this.matrix.premultiply(e),this.matrix.decompose(this.position,this.quaternion,this.scale)}applyQuaternion(e){return this.quaternion.premultiply(e),this}setRotationFromAxisAngle(e,n){this.quaternion.setFromAxisAngle(e,n)}setRotationFromEuler(e){this.quaternion.setFromEuler(e,!0)}setRotationFromMatrix(e){this.quaternion.setFromRotationMatrix(e)}setRotationFromQuaternion(e){this.quaternion.copy(e)}rotateOnAxis(e,n){return Qp.setFromAxisAngle(e,n),this.quaternion.multiply(Qp),this}rotateOnWorldAxis(e,n){return Qp.setFromAxisAngle(e,n),this.quaternion.premultiply(Qp),this}rotateX(e){return this.rotateOnAxis(d9,e)}rotateY(e){return this.rotateOnAxis(u9,e)}rotateZ(e){return this.rotateOnAxis(h9,e)}translateOnAxis(e,n){return c9.copy(e).applyQuaternion(this.quaternion),this.position.add(c9.multiplyScalar(n)),this}translateX(e){return this.translateOnAxis(d9,e)}translateY(e){return this.translateOnAxis(u9,e)}translateZ(e){return this.translateOnAxis(h9,e)}localToWorld(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(this.matrixWorld)}worldToLocal(e){return this.updateWorldMatrix(!0,!1),e.applyMatrix4(_d.copy(this.matrixWorld).invert())}lookAt(e,n,r){e.isVector3?Z1.copy(e):Z1.set(e,n,r);let o=this.parent;this.updateWorldMatrix(!0,!1),S_.setFromMatrixPosition(this.matrixWorld),this.isCamera||this.isLight?_d.lookAt(S_,Z1,this.up):_d.lookAt(Z1,S_,this.up),this.quaternion.setFromRotationMatrix(_d),o&&(_d.extractRotation(o.matrixWorld),Qp.setFromRotationMatrix(_d),this.quaternion.premultiply(Qp.invert()))}add(e){if(arguments.length>1){for(let n=0;n<arguments.length;n++)this.add(arguments[n]);return this}return e===this?(console.error("THREE.Object3D.add: object can't be added as a child of itself.",e),this):(e&&e.isObject3D?(e.removeFromParent(),e.parent=this,this.children.push(e),e.dispatchEvent(f9),zp.child=e,this.dispatchEvent(zp),zp.child=null):console.error("THREE.Object3D.add: object not an instance of THREE.Object3D.",e),this)}remove(e){if(arguments.length>1){for(let r=0;r<arguments.length;r++)this.remove(arguments[r]);return this}let n=this.children.indexOf(e);return n!==-1&&(e.parent=null,this.children.splice(n,1),e.dispatchEvent(tme),YF.child=e,this.dispatchEvent(YF),YF.child=null),this}removeFromParent(){let e=this.parent;return e!==null&&e.remove(this),this}clear(){return this.remove(...this.children)}attach(e){return this.updateWorldMatrix(!0,!1),_d.copy(this.matrixWorld).invert(),e.parent!==null&&(e.parent.updateWorldMatrix(!0,!1),_d.multiply(e.parent.matrixWorld)),e.applyMatrix4(_d),e.removeFromParent(),e.parent=this,this.children.push(e),e.updateWorldMatrix(!1,!0),e.dispatchEvent(f9),zp.child=e,this.dispatchEvent(zp),zp.child=null,this}getObjectById(e){return this.getObjectByProperty("id",e)}getObjectByName(e){return this.getObjectByProperty("name",e)}getObjectByProperty(e,n){if(this[e]===n)return this;for(let r=0,o=this.children.length;r<o;r++){let s=this.children[r].getObjectByProperty(e,n);if(s!==void 0)return s}}getObjectsByProperty(e,n,r=[]){this[e]===n&&r.push(this);let o=this.children;for(let a=0,s=o.length;a<s;a++)o[a].getObjectsByProperty(e,n,r);return r}getWorldPosition(e){return this.updateWorldMatrix(!0,!1),e.setFromMatrixPosition(this.matrixWorld)}getWorldQuaternion(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(S_,e,Jfe),e}getWorldScale(e){return this.updateWorldMatrix(!0,!1),this.matrixWorld.decompose(S_,eme,e),e}getWorldDirection(e){this.updateWorldMatrix(!0,!1);let n=this.matrixWorld.elements;return e.set(n[8],n[9],n[10]).normalize()}raycast(){}traverse(e){e(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverse(e)}traverseVisible(e){if(this.visible===!1)return;e(this);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].traverseVisible(e)}traverseAncestors(e){let n=this.parent;n!==null&&(e(n),n.traverseAncestors(e))}updateMatrix(){this.matrix.compose(this.position,this.quaternion,this.scale),this.matrixWorldNeedsUpdate=!0}updateMatrixWorld(e){this.matrixAutoUpdate&&this.updateMatrix(),(this.matrixWorldNeedsUpdate||e)&&(this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),this.matrixWorldNeedsUpdate=!1,e=!0);let n=this.children;for(let r=0,o=n.length;r<o;r++)n[r].updateMatrixWorld(e)}updateWorldMatrix(e,n){let r=this.parent;if(e===!0&&r!==null&&r.updateWorldMatrix(!0,!1),this.matrixAutoUpdate&&this.updateMatrix(),this.matrixWorldAutoUpdate===!0&&(this.parent===null?this.matrixWorld.copy(this.matrix):this.matrixWorld.multiplyMatrices(this.parent.matrixWorld,this.matrix)),n===!0){let o=this.children;for(let a=0,s=o.length;a<s;a++)o[a].updateWorldMatrix(!1,!0)}}toJSON(e){let n=e===void 0||typeof e=="string",r={};n&&(e={geometries:{},materials:{},textures:{},images:{},shapes:{},skeletons:{},animations:{},nodes:{}},r.metadata={version:4.6,type:"Object",generator:"Object3D.toJSON"});let o={};o.uuid=this.uuid,o.type=this.type,this.name!==""&&(o.name=this.name),this.castShadow===!0&&(o.castShadow=!0),this.receiveShadow===!0&&(o.receiveShadow=!0),this.visible===!1&&(o.visible=!1),this.frustumCulled===!1&&(o.frustumCulled=!1),this.renderOrder!==0&&(o.renderOrder=this.renderOrder),Object.keys(this.userData).length>0&&(o.userData=this.userData),o.layers=this.layers.mask,o.matrix=this.matrix.toArray(),o.up=this.up.toArray(),this.matrixAutoUpdate===!1&&(o.matrixAutoUpdate=!1),this.isInstancedMesh&&(o.type="InstancedMesh",o.count=this.count,o.instanceMatrix=this.instanceMatrix.toJSON(),this.instanceColor!==null&&(o.instanceColor=this.instanceColor.toJSON())),this.isBatchedMesh&&(o.type="BatchedMesh",o.perObjectFrustumCulled=this.perObjectFrustumCulled,o.sortObjects=this.sortObjects,o.drawRanges=this._drawRanges,o.reservedRanges=this._reservedRanges,o.visibility=this._visibility,o.active=this._active,o.bounds=this._bounds.map(l=>({boxInitialized:l.boxInitialized,boxMin:l.box.min.toArray(),boxMax:l.box.max.toArray(),sphereInitialized:l.sphereInitialized,sphereRadius:l.sphere.radius,sphereCenter:l.sphere.center.toArray()})),o.maxInstanceCount=this._maxInstanceCount,o.maxVertexCount=this._maxVertexCount,o.maxIndexCount=this._maxIndexCount,o.geometryInitialized=this._geometryInitialized,o.geometryCount=this._geometryCount,o.matricesTexture=this._matricesTexture.toJSON(e),this._colorsTexture!==null&&(o.colorsTexture=this._colorsTexture.toJSON(e)),this.boundingSphere!==null&&(o.boundingSphere={center:o.boundingSphere.center.toArray(),radius:o.boundingSphere.radius}),this.boundingBox!==null&&(o.boundingBox={min:o.boundingBox.min.toArray(),max:o.boundingBox.max.toArray()}));function a(l,c){return l[c.uuid]===void 0&&(l[c.uuid]=c.toJSON(e)),c.uuid}if(this.isScene)this.background&&(this.background.isColor?o.background=this.background.toJSON():this.background.isTexture&&(o.background=this.background.toJSON(e).uuid)),this.environment&&this.environment.isTexture&&this.environment.isRenderTargetTexture!==!0&&(o.environment=this.environment.toJSON(e).uuid);else if(this.isMesh||this.isLine||this.isPoints){o.geometry=a(e.geometries,this.geometry);let l=this.geometry.parameters;if(l!==void 0&&l.shapes!==void 0){let c=l.shapes;if(Array.isArray(c))for(let d=0,h=c.length;d<h;d++){let u=c[d];a(e.shapes,u)}else a(e.shapes,c)}}if(this.isSkinnedMesh&&(o.bindMode=this.bindMode,o.bindMatrix=this.bindMatrix.toArray(),this.skeleton!==void 0&&(a(e.skeletons,this.skeleton),o.skeleton=this.skeleton.uuid)),this.material!==void 0)if(Array.isArray(this.material)){let l=[];for(let c=0,d=this.material.length;c<d;c++)l.push(a(e.materials,this.material[c]));o.material=l}else o.material=a(e.materials,this.material);if(this.children.length>0){o.children=[];for(let l=0;l<this.children.length;l++)o.children.push(this.children[l].toJSON(e).object)}if(this.animations.length>0){o.animations=[];for(let l=0;l<this.animations.length;l++){let c=this.animations[l];o.animations.push(a(e.animations,c))}}if(n){let l=s(e.geometries),c=s(e.materials),d=s(e.textures),h=s(e.images),u=s(e.shapes),f=s(e.skeletons),_=s(e.animations),y=s(e.nodes);l.length>0&&(r.geometries=l),c.length>0&&(r.materials=c),d.length>0&&(r.textures=d),h.length>0&&(r.images=h),u.length>0&&(r.shapes=u),f.length>0&&(r.skeletons=f),_.length>0&&(r.animations=_),y.length>0&&(r.nodes=y)}return r.object=o,r;function s(l){let c=[];for(let d in l){let h=l[d];delete h.metadata,c.push(h)}return c}}clone(e){return new this.constructor().copy(this,e)}copy(e,n=!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.matrixWorldAutoUpdate=e.matrixWorldAutoUpdate,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.animations=e.animations.slice(),this.userData=JSON.parse(JSON.stringify(e.userData)),n===!0)for(let r=0;r<e.children.length;r++){let o=e.children[r];this.add(o.clone())}return this}}return i.DEFAULT_UP=new ce(0,1,0),i.DEFAULT_MATRIX_AUTO_UPDATE=!0,i.DEFAULT_MATRIX_WORLD_AUTO_UPDATE=!0,i})(),Al=new ce,bd=new ce,ZF=new ce,vd=new ce,qp=new ce,Gp=new ce,m9=new ce,JF=new ce,eI=new ce,tI=new ce,Yf=class i{constructor(t=new ce,e=new ce,n=new ce){this.a=t,this.b=e,this.c=n}static getNormal(t,e,n,r){r.subVectors(n,e),Al.subVectors(t,e),r.cross(Al);let o=r.lengthSq();return o>0?r.multiplyScalar(1/Math.sqrt(o)):r.set(0,0,0)}static getBarycoord(t,e,n,r,o){Al.subVectors(r,e),bd.subVectors(n,e),ZF.subVectors(t,e);let a=Al.dot(Al),s=Al.dot(bd),l=Al.dot(ZF),c=bd.dot(bd),d=bd.dot(ZF),h=a*c-s*s;if(h===0)return o.set(0,0,0),null;let u=1/h,f=(c*l-s*d)*u,_=(a*d-s*l)*u;return o.set(1-f-_,_,f)}static containsPoint(t,e,n,r){return this.getBarycoord(t,e,n,r,vd)===null?!1:vd.x>=0&&vd.y>=0&&vd.x+vd.y<=1}static getInterpolation(t,e,n,r,o,a,s,l){return this.getBarycoord(t,e,n,r,vd)===null?(l.x=0,l.y=0,"z"in l&&(l.z=0),"w"in l&&(l.w=0),null):(l.setScalar(0),l.addScaledVector(o,vd.x),l.addScaledVector(a,vd.y),l.addScaledVector(s,vd.z),l)}static isFrontFacing(t,e,n,r){return Al.subVectors(n,e),bd.subVectors(t,e),Al.cross(bd).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 Al.subVectors(this.c,this.b),bd.subVectors(this.a,this.b),Al.cross(bd).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)}getInterpolation(t,e,n,r,o){return i.getInterpolation(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,a,s;qp.subVectors(r,n),Gp.subVectors(o,n),JF.subVectors(t,n);let l=qp.dot(JF),c=Gp.dot(JF);if(l<=0&&c<=0)return e.copy(n);eI.subVectors(t,r);let d=qp.dot(eI),h=Gp.dot(eI);if(d>=0&&h<=d)return e.copy(r);let u=l*h-d*c;if(u<=0&&l>=0&&d<=0)return a=l/(l-d),e.copy(n).addScaledVector(qp,a);tI.subVectors(t,o);let f=qp.dot(tI),_=Gp.dot(tI);if(_>=0&&f<=_)return e.copy(o);let y=f*c-l*_;if(y<=0&&c>=0&&_<=0)return s=c/(c-_),e.copy(n).addScaledVector(Gp,s);let b=d*_-f*h;if(b<=0&&h-d>=0&&f-_>=0)return m9.subVectors(o,r),s=(h-d)/(h-d+(f-_)),e.copy(r).addScaledVector(m9,s);let v=1/(b+y+u);return a=y*v,s=u*v,e.copy(n).addScaledVector(qp,a).addScaledVector(Gp,s)}equals(t){return t.a.equals(this.a)&&t.b.equals(this.b)&&t.c.equals(this.c)}},wH={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},Du={h:0,s:0,l:0},J1={h:0,s:0,l:0};function iI(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}var di=class{constructor(t,e,n){return this.isColor=!0,this.r=1,this.g=1,this.b=1,this.set(t,e,n)}set(t,e,n){if(e===void 0&&n===void 0){let r=t;r&&r.isColor?this.copy(r):typeof r=="number"?this.setHex(r):typeof r=="string"&&this.setStyle(r)}else this.setRGB(t,e,n);return this}setScalar(t){return this.r=t,this.g=t,this.b=t,this}setHex(t,e=Ds){return t=Math.floor(t),this.r=(t>>16&255)/255,this.g=(t>>8&255)/255,this.b=(t&255)/255,On.toWorkingColorSpace(this,e),this}setRGB(t,e,n,r=On.workingColorSpace){return this.r=t,this.g=e,this.b=n,On.toWorkingColorSpace(this,r),this}setHSL(t,e,n,r=On.workingColorSpace){if(t=G3(t,1),e=xo(e,0,1),n=xo(n,0,1),e===0)this.r=this.g=this.b=n;else{let o=n<=.5?n*(1+e):n+e-n*e,a=2*n-o;this.r=iI(a,o,t+1/3),this.g=iI(a,o,t),this.b=iI(a,o,t-1/3)}return On.toWorkingColorSpace(this,r),this}setStyle(t,e=Ds){function n(o){o!==void 0&&parseFloat(o)<1&&console.warn("THREE.Color: Alpha component of "+t+" will be ignored.")}let r;if(r=/^(\w+)\(([^\)]*)\)/.exec(t)){let o,a=r[1],s=r[2];switch(a){case"rgb":case"rgba":if(o=/^\s*(\d+)\s*,\s*(\d+)\s*,\s*(\d+)\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(o[4]),this.setRGB(Math.min(255,parseInt(o[1],10))/255,Math.min(255,parseInt(o[2],10))/255,Math.min(255,parseInt(o[3],10))/255,e);if(o=/^\s*(\d+)\%\s*,\s*(\d+)\%\s*,\s*(\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(o[4]),this.setRGB(Math.min(100,parseInt(o[1],10))/100,Math.min(100,parseInt(o[2],10))/100,Math.min(100,parseInt(o[3],10))/100,e);break;case"hsl":case"hsla":if(o=/^\s*(\d*\.?\d+)\s*,\s*(\d*\.?\d+)\%\s*,\s*(\d*\.?\d+)\%\s*(?:,\s*(\d*\.?\d+)\s*)?$/.exec(s))return n(o[4]),this.setHSL(parseFloat(o[1])/360,parseFloat(o[2])/100,parseFloat(o[3])/100,e);break;default:console.warn("THREE.Color: Unknown color model "+t)}}else if(r=/^\#([A-Fa-f\d]+)$/.exec(t)){let o=r[1],a=o.length;if(a===3)return this.setRGB(parseInt(o.charAt(0),16)/15,parseInt(o.charAt(1),16)/15,parseInt(o.charAt(2),16)/15,e);if(a===6)return this.setHex(parseInt(o,16),e);console.warn("THREE.Color: Invalid hex color "+t)}else if(t&&t.length>0)return this.setColorName(t,e);return this}setColorName(t,e=Ds){let n=wH[t.toLowerCase()];return n!==void 0?this.setHex(n,e):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}copySRGBToLinear(t){return this.r=lA(t.r),this.g=lA(t.g),this.b=lA(t.b),this}copyLinearToSRGB(t){return this.r=zF(t.r),this.g=zF(t.g),this.b=zF(t.b),this}convertSRGBToLinear(){return this.copySRGBToLinear(this),this}convertLinearToSRGB(){return this.copyLinearToSRGB(this),this}getHex(t=Ds){return On.fromWorkingColorSpace(na.copy(this),t),Math.round(xo(na.r*255,0,255))*65536+Math.round(xo(na.g*255,0,255))*256+Math.round(xo(na.b*255,0,255))}getHexString(t=Ds){return("000000"+this.getHex(t).toString(16)).slice(-6)}getHSL(t,e=On.workingColorSpace){On.fromWorkingColorSpace(na.copy(this),e);let n=na.r,r=na.g,o=na.b,a=Math.max(n,r,o),s=Math.min(n,r,o),l,c,d=(s+a)/2;if(s===a)l=0,c=0;else{let h=a-s;switch(c=d<=.5?h/(a+s):h/(2-a-s),a){case n:l=(r-o)/h+(r<o?6:0);break;case r:l=(o-n)/h+2;break;case o:l=(n-r)/h+4;break}l/=6}return t.h=l,t.s=c,t.l=d,t}getRGB(t,e=On.workingColorSpace){return On.fromWorkingColorSpace(na.copy(this),e),t.r=na.r,t.g=na.g,t.b=na.b,t}getStyle(t=Ds){On.fromWorkingColorSpace(na.copy(this),t);let e=na.r,n=na.g,r=na.b;return t!==Ds?`color(${t} ${e.toFixed(3)} ${n.toFixed(3)} ${r.toFixed(3)})`:`rgb(${Math.round(e*255)},${Math.round(n*255)},${Math.round(r*255)})`}offsetHSL(t,e,n){return this.getHSL(Du),this.setHSL(Du.h+t,Du.s+e,Du.l+n)}add(t){return this.r+=t.r,this.g+=t.g,this.b+=t.b,this}addColors(t,e){return this.r=t.r+e.r,this.g=t.g+e.g,this.b=t.b+e.b,this}addScalar(t){return this.r+=t,this.g+=t,this.b+=t,this}sub(t){return this.r=Math.max(0,this.r-t.r),this.g=Math.max(0,this.g-t.g),this.b=Math.max(0,this.b-t.b),this}multiply(t){return this.r*=t.r,this.g*=t.g,this.b*=t.b,this}multiplyScalar(t){return this.r*=t,this.g*=t,this.b*=t,this}lerp(t,e){return this.r+=(t.r-this.r)*e,this.g+=(t.g-this.g)*e,this.b+=(t.b-this.b)*e,this}lerpColors(t,e,n){return this.r=t.r+(e.r-t.r)*n,this.g=t.g+(e.g-t.g)*n,this.b=t.b+(e.b-t.b)*n,this}lerpHSL(t,e){this.getHSL(Du),t.getHSL(J1);let n=P_(Du.h,J1.h,e),r=P_(Du.s,J1.s,e),o=P_(Du.l,J1.l,e);return this.setHSL(n,r,o),this}setFromVector3(t){return this.r=t.x,this.g=t.y,this.b=t.z,this}applyMatrix3(t){let e=this.r,n=this.g,r=this.b,o=t.elements;return this.r=o[0]*e+o[3]*n+o[6]*r,this.g=o[1]*e+o[4]*n+o[7]*r,this.b=o[2]*e+o[5]*n+o[8]*r,this}equals(t){return t.r===this.r&&t.g===this.g&&t.b===this.b}fromArray(t,e=0){return this.r=t[e],this.g=t[e+1],this.b=t[e+2],this}toArray(t=[],e=0){return t[e]=this.r,t[e+1]=this.g,t[e+2]=this.b,t}fromBufferAttribute(t,e){return this.r=t.getX(e),this.g=t.getY(e),this.b=t.getZ(e),this}toJSON(){return this.getHex()}*[Symbol.iterator](){yield this.r,yield this.g,yield this.b}},na=new di;di.NAMES=wH;var ime=0,lc=class extends Ed{constructor(){super(),this.isMaterial=!0,Object.defineProperty(this,"id",{value:ime++}),this.uuid=oc(),this.name="",this.type="Material",this.blending=oA,this.side=Lu,this.vertexColors=!1,this.opacity=1,this.transparent=!1,this.alphaHash=!1,this.blendSrc=bI,this.blendDst=vI,this.blendEquation=jf,this.blendSrcAlpha=null,this.blendDstAlpha=null,this.blendEquationAlpha=null,this.blendColor=new di(0,0,0),this.blendAlpha=0,this.depthFunc=Bx,this.depthTest=!0,this.depthWrite=!0,this.stencilWriteMask=255,this.stencilFunc=e9,this.stencilRef=0,this.stencilFuncMask=255,this.stencilFail=Op,this.stencilZFail=Op,this.stencilZPass=Op,this.stencilWrite=!1,this.clippingPlanes=null,this.clipIntersection=!1,this.clipShadows=!1,this.shadowSide=null,this.colorWrite=!0,this.precision=null,this.polygonOffset=!1,this.polygonOffsetFactor=0,this.polygonOffsetUnits=0,this.dithering=!1,this.alphaToCoverage=!1,this.premultipliedAlpha=!1,this.forceSinglePass=!1,this.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}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: parameter '${e}' has value of undefined.`);continue}let r=this[e];if(r===void 0){console.warn(`THREE.Material: '${e}' is not a property of THREE.${this.type}.`);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.6,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!==void 0&&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.dispersion!==void 0&&(n.dispersion=this.dispersion),this.iridescence!==void 0&&(n.iridescence=this.iridescence),this.iridescenceIOR!==void 0&&(n.iridescenceIOR=this.iridescenceIOR),this.iridescenceThicknessRange!==void 0&&(n.iridescenceThicknessRange=this.iridescenceThicknessRange),this.iridescenceMap&&this.iridescenceMap.isTexture&&(n.iridescenceMap=this.iridescenceMap.toJSON(t).uuid),this.iridescenceThicknessMap&&this.iridescenceThicknessMap.isTexture&&(n.iridescenceThicknessMap=this.iridescenceThicknessMap.toJSON(t).uuid),this.anisotropy!==void 0&&(n.anisotropy=this.anisotropy),this.anisotropyRotation!==void 0&&(n.anisotropyRotation=this.anisotropyRotation),this.anisotropyMap&&this.anisotropyMap.isTexture&&(n.anisotropyMap=this.anisotropyMap.toJSON(t).uuid),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.envMapRotation!==void 0&&(n.envMapRotation=this.envMapRotation.toArray()),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&&this.attenuationDistance!==1/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!==oA&&(n.blending=this.blending),this.side!==Lu&&(n.side=this.side),this.vertexColors===!0&&(n.vertexColors=!0),this.opacity<1&&(n.opacity=this.opacity),this.transparent===!0&&(n.transparent=!0),this.blendSrc!==bI&&(n.blendSrc=this.blendSrc),this.blendDst!==vI&&(n.blendDst=this.blendDst),this.blendEquation!==jf&&(n.blendEquation=this.blendEquation),this.blendSrcAlpha!==null&&(n.blendSrcAlpha=this.blendSrcAlpha),this.blendDstAlpha!==null&&(n.blendDstAlpha=this.blendDstAlpha),this.blendEquationAlpha!==null&&(n.blendEquationAlpha=this.blendEquationAlpha),this.blendColor&&this.blendColor.isColor&&(n.blendColor=this.blendColor.getHex()),this.blendAlpha!==0&&(n.blendAlpha=this.blendAlpha),this.depthFunc!==Bx&&(n.depthFunc=this.depthFunc),this.depthTest===!1&&(n.depthTest=this.depthTest),this.depthWrite===!1&&(n.depthWrite=this.depthWrite),this.colorWrite===!1&&(n.colorWrite=this.colorWrite),this.stencilWriteMask!==255&&(n.stencilWriteMask=this.stencilWriteMask),this.stencilFunc!==e9&&(n.stencilFunc=this.stencilFunc),this.stencilRef!==0&&(n.stencilRef=this.stencilRef),this.stencilFuncMask!==255&&(n.stencilFuncMask=this.stencilFuncMask),this.stencilFail!==Op&&(n.stencilFail=this.stencilFail),this.stencilZFail!==Op&&(n.stencilZFail=this.stencilZFail),this.stencilZPass!==Op&&(n.stencilZPass=this.stencilZPass),this.stencilWrite===!0&&(n.stencilWrite=this.stencilWrite),this.rotation!==void 0&&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!==void 0&&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.alphaHash===!0&&(n.alphaHash=!0),this.alphaToCoverage===!0&&(n.alphaToCoverage=!0),this.premultipliedAlpha===!0&&(n.premultipliedAlpha=!0),this.forceSinglePass===!0&&(n.forceSinglePass=!0),this.wireframe===!0&&(n.wireframe=!0),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=!0),this.visible===!1&&(n.visible=!1),this.toneMapped===!1&&(n.toneMapped=!1),this.fog===!1&&(n.fog=!1),Object.keys(this.userData).length>0&&(n.userData=this.userData);function r(o){let a=[];for(let s in o){let l=o[s];delete l.metadata,a.push(l)}return a}if(e){let o=r(t.textures),a=r(t.images);o.length>0&&(n.textures=o),a.length>0&&(n.images=a)}return n}clone(){return new this.constructor().copy(this)}copy(t){this.name=t.name,this.blending=t.blending,this.side=t.side,this.vertexColors=t.vertexColors,this.opacity=t.opacity,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.blendColor.copy(t.blendColor),this.blendAlpha=t.blendAlpha,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.alphaHash=t.alphaHash,this.alphaToCoverage=t.alphaToCoverage,this.premultipliedAlpha=t.premultipliedAlpha,this.forceSinglePass=t.forceSinglePass,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++}onBuild(){console.warn("Material: onBuild() has been removed.")}},Bd=class extends lc{constructor(t){super(),this.isMeshBasicMaterial=!0,this.type="MeshBasicMaterial",this.color=new di(16777215),this.map=null,this.lightMap=null,this.lightMapIntensity=1,this.aoMap=null,this.aoMapIntensity=1,this.specularMap=null,this.alphaMap=null,this.envMap=null,this.envMapRotation=new Jf,this.combine=O3,this.reflectivity=1,this.refractionRatio=.98,this.wireframe=!1,this.wireframeLinewidth=1,this.wireframeLinecap="round",this.wireframeLinejoin="round",this.fog=!0,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.specularMap=t.specularMap,this.alphaMap=t.alphaMap,this.envMap=t.envMap,this.envMapRotation.copy(t.envMapRotation),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.fog=t.fog,this}};var $r=new ce,ex=new qe,Vn=class{constructor(t,e,n=!1){if(Array.isArray(t))throw new TypeError("THREE.BufferAttribute: array should be a Typed Array.");this.isBufferAttribute=!0,this.name="",this.array=t,this.itemSize=e,this.count=t!==void 0?t.length/e:0,this.normalized=n,this.usage=YI,this._updateRange={offset:0,count:-1},this.updateRanges=[],this.gpuType=Cd,this.version=0}onUploadCallback(){}set needsUpdate(t){t===!0&&this.version++}get updateRange(){return sA("THREE.BufferAttribute: updateRange() is deprecated and will be removed in r169. Use addUpdateRange() instead."),this._updateRange}setUsage(t){return this.usage=t,this}addUpdateRange(t,e){this.updateRanges.push({start:t,count:e})}clearUpdateRanges(){this.updateRanges.length=0}copy(t){return this.name=t.name,this.array=new t.array.constructor(t.array),this.itemSize=t.itemSize,this.count=t.count,this.normalized=t.normalized,this.usage=t.usage,this.gpuType=t.gpuType,this}copyAt(t,e,n){t*=this.itemSize,n*=e.itemSize;for(let r=0,o=this.itemSize;r<o;r++)this.array[t+r]=e.array[n+r];return this}copyArray(t){return this.array.set(t),this}applyMatrix3(t){if(this.itemSize===2)for(let e=0,n=this.count;e<n;e++)ex.fromBufferAttribute(this,e),ex.applyMatrix3(t),this.setXY(e,ex.x,ex.y);else if(this.itemSize===3)for(let e=0,n=this.count;e<n;e++)$r.fromBufferAttribute(this,e),$r.applyMatrix3(t),this.setXYZ(e,$r.x,$r.y,$r.z);return this}applyMatrix4(t){for(let e=0,n=this.count;e<n;e++)$r.fromBufferAttribute(this,e),$r.applyMatrix4(t),this.setXYZ(e,$r.x,$r.y,$r.z);return this}applyNormalMatrix(t){for(let e=0,n=this.count;e<n;e++)$r.fromBufferAttribute(this,e),$r.applyNormalMatrix(t),this.setXYZ(e,$r.x,$r.y,$r.z);return this}transformDirection(t){for(let e=0,n=this.count;e<n;e++)$r.fromBufferAttribute(this,e),$r.transformDirection(t),this.setXYZ(e,$r.x,$r.y,$r.z);return this}set(t,e=0){return this.array.set(t,e),this}getComponent(t,e){let n=this.array[t*this.itemSize+e];return this.normalized&&(n=_l(n,this.array)),n}setComponent(t,e,n){return this.normalized&&(n=Hn(n,this.array)),this.array[t*this.itemSize+e]=n,this}getX(t){let e=this.array[t*this.itemSize];return this.normalized&&(e=_l(e,this.array)),e}setX(t,e){return this.normalized&&(e=Hn(e,this.array)),this.array[t*this.itemSize]=e,this}getY(t){let e=this.array[t*this.itemSize+1];return this.normalized&&(e=_l(e,this.array)),e}setY(t,e){return this.normalized&&(e=Hn(e,this.array)),this.array[t*this.itemSize+1]=e,this}getZ(t){let e=this.array[t*this.itemSize+2];return this.normalized&&(e=_l(e,this.array)),e}setZ(t,e){return this.normalized&&(e=Hn(e,this.array)),this.array[t*this.itemSize+2]=e,this}getW(t){let e=this.array[t*this.itemSize+3];return this.normalized&&(e=_l(e,this.array)),e}setW(t,e){return this.normalized&&(e=Hn(e,this.array)),this.array[t*this.itemSize+3]=e,this}setXY(t,e,n){return t*=this.itemSize,this.normalized&&(e=Hn(e,this.array),n=Hn(n,this.array)),this.array[t+0]=e,this.array[t+1]=n,this}setXYZ(t,e,n,r){return t*=this.itemSize,this.normalized&&(e=Hn(e,this.array),n=Hn(n,this.array),r=Hn(r,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this}setXYZW(t,e,n,r,o){return t*=this.itemSize,this.normalized&&(e=Hn(e,this.array),n=Hn(n,this.array),r=Hn(r,this.array),o=Hn(o,this.array)),this.array[t+0]=e,this.array[t+1]=n,this.array[t+2]=r,this.array[t+3]=o,this}onUpload(t){return this.onUploadCallback=t,this}clone(){return new this.constructor(this.array,this.itemSize).copy(this)}toJSON(){let t={itemSize:this.itemSize,type:this.array.constructor.name,array:Array.from(this.array),normalized:this.normalized};return this.name!==""&&(t.name=this.name),this.usage!==YI&&(t.usage=this.usage),t}};var Nx=class extends Vn{constructor(t,e,n){super(new Uint16Array(t),e,n)}};var Ux=class extends Vn{constructor(t,e,n){super(new Uint32Array(t),e,n)}};var Qn=class extends Vn{constructor(t,e,n){super(new Float32Array(t),e,n)}},nme=0,Is=new gr,nI=new Ps,Wp=new ce,os=new Lo,E_=new Lo,yo=new ce,wn=class i extends Ed{constructor(){super(),this.isBufferGeometry=!0,Object.defineProperty(this,"id",{value:nme++}),this.uuid=oc(),this.name="",this.type="BufferGeometry",this.index=null,this.attributes={},this.morphAttributes={},this.morphTargetsRelative=!1,this.groups=[],this.boundingBox=null,this.boundingSphere=null,this.drawRange={start:0,count:1/0},this.userData={}}getIndex(){return this.index}setIndex(t){return Array.isArray(t)?this.index=new(xH(t)?Ux:Nx)(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 Bi().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 Is.makeRotationFromQuaternion(t),this.applyMatrix4(Is),this}rotateX(t){return Is.makeRotationX(t),this.applyMatrix4(Is),this}rotateY(t){return Is.makeRotationY(t),this.applyMatrix4(Is),this}rotateZ(t){return Is.makeRotationZ(t),this.applyMatrix4(Is),this}translate(t,e,n){return Is.makeTranslation(t,e,n),this.applyMatrix4(Is),this}scale(t,e,n){return Is.makeScale(t,e,n),this.applyMatrix4(Is),this}lookAt(t){return nI.lookAt(t),nI.updateMatrix(),this.applyMatrix4(nI.matrix),this}center(){return this.computeBoundingBox(),this.boundingBox.getCenter(Wp).negate(),this.translate(Wp.x,Wp.y,Wp.z),this}setFromPoints(t){let e=[];for(let n=0,r=t.length;n<r;n++){let o=t[n];e.push(o.x,o.y,o.z||0)}return this.setAttribute("position",new Qn(e,3)),this}computeBoundingBox(){this.boundingBox===null&&(this.boundingBox=new Lo);let t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingBox(): GLBufferAttribute requires a manual bounding box.",this),this.boundingBox.set(new ce(-1/0,-1/0,-1/0),new ce(1/0,1/0,1/0));return}if(t!==void 0){if(this.boundingBox.setFromBufferAttribute(t),e)for(let n=0,r=e.length;n<r;n++){let o=e[n];os.setFromBufferAttribute(o),this.morphTargetsRelative?(yo.addVectors(this.boundingBox.min,os.min),this.boundingBox.expandByPoint(yo),yo.addVectors(this.boundingBox.max,os.max),this.boundingBox.expandByPoint(yo)):(this.boundingBox.expandByPoint(os.min),this.boundingBox.expandByPoint(os.max))}}else this.boundingBox.makeEmpty();(isNaN(this.boundingBox.min.x)||isNaN(this.boundingBox.min.y)||isNaN(this.boundingBox.min.z))&&console.error('THREE.BufferGeometry.computeBoundingBox(): Computed min/max have NaN values. The "position" attribute is likely to have NaN values.',this)}computeBoundingSphere(){this.boundingSphere===null&&(this.boundingSphere=new sc);let t=this.attributes.position,e=this.morphAttributes.position;if(t&&t.isGLBufferAttribute){console.error("THREE.BufferGeometry.computeBoundingSphere(): GLBufferAttribute requires a manual bounding sphere.",this),this.boundingSphere.set(new ce,1/0);return}if(t){let n=this.boundingSphere.center;if(os.setFromBufferAttribute(t),e)for(let o=0,a=e.length;o<a;o++){let s=e[o];E_.setFromBufferAttribute(s),this.morphTargetsRelative?(yo.addVectors(os.min,E_.min),os.expandByPoint(yo),yo.addVectors(os.max,E_.max),os.expandByPoint(yo)):(os.expandByPoint(E_.min),os.expandByPoint(E_.max))}os.getCenter(n);let r=0;for(let o=0,a=t.count;o<a;o++)yo.fromBufferAttribute(t,o),r=Math.max(r,n.distanceToSquared(yo));if(e)for(let o=0,a=e.length;o<a;o++){let s=e[o],l=this.morphTargetsRelative;for(let c=0,d=s.count;c<d;c++)yo.fromBufferAttribute(s,c),l&&(Wp.fromBufferAttribute(t,c),yo.add(Wp)),r=Math.max(r,n.distanceToSquared(yo))}this.boundingSphere.radius=Math.sqrt(r),isNaN(this.boundingSphere.radius)&&console.error('THREE.BufferGeometry.computeBoundingSphere(): Computed radius is NaN. The "position" attribute is likely to have NaN values.',this)}}computeTangents(){let t=this.index,e=this.attributes;if(t===null||e.position===void 0||e.normal===void 0||e.uv===void 0){console.error("THREE.BufferGeometry: .computeTangents() failed. Missing required attributes (index, position, normal or uv)");return}let n=e.position,r=e.normal,o=e.uv;this.hasAttribute("tangent")===!1&&this.setAttribute("tangent",new Vn(new Float32Array(4*n.count),4));let a=this.getAttribute("tangent"),s=[],l=[];for(let O=0;O<n.count;O++)s[O]=new ce,l[O]=new ce;let c=new ce,d=new ce,h=new ce,u=new qe,f=new qe,_=new qe,y=new ce,b=new ce;function v(O,T,B){c.fromBufferAttribute(n,O),d.fromBufferAttribute(n,T),h.fromBufferAttribute(n,B),u.fromBufferAttribute(o,O),f.fromBufferAttribute(o,T),_.fromBufferAttribute(o,B),d.sub(c),h.sub(c),f.sub(u),_.sub(u);let L=1/(f.x*_.y-_.x*f.y);isFinite(L)&&(y.copy(d).multiplyScalar(_.y).addScaledVector(h,-f.y).multiplyScalar(L),b.copy(h).multiplyScalar(f.x).addScaledVector(d,-_.x).multiplyScalar(L),s[O].add(y),s[T].add(y),s[B].add(y),l[O].add(b),l[T].add(b),l[B].add(b))}let M=this.groups;M.length===0&&(M=[{start:0,count:t.count}]);for(let O=0,T=M.length;O<T;++O){let B=M[O],L=B.start,G=B.count;for(let W=L,oe=L+G;W<oe;W+=3)v(t.getX(W+0),t.getX(W+1),t.getX(W+2))}let x=new ce,w=new ce,k=new ce,P=new ce;function D(O){k.fromBufferAttribute(r,O),P.copy(k);let T=s[O];x.copy(T),x.sub(k.multiplyScalar(k.dot(T))).normalize(),w.crossVectors(P,T);let L=w.dot(l[O])<0?-1:1;a.setXYZW(O,x.x,x.y,x.z,L)}for(let O=0,T=M.length;O<T;++O){let B=M[O],L=B.start,G=B.count;for(let W=L,oe=L+G;W<oe;W+=3)D(t.getX(W+0)),D(t.getX(W+1)),D(t.getX(W+2))}}computeVertexNormals(){let t=this.index,e=this.getAttribute("position");if(e!==void 0){let n=this.getAttribute("normal");if(n===void 0)n=new Vn(new Float32Array(e.count*3),3),this.setAttribute("normal",n);else for(let u=0,f=n.count;u<f;u++)n.setXYZ(u,0,0,0);let r=new ce,o=new ce,a=new ce,s=new ce,l=new ce,c=new ce,d=new ce,h=new ce;if(t)for(let u=0,f=t.count;u<f;u+=3){let _=t.getX(u+0),y=t.getX(u+1),b=t.getX(u+2);r.fromBufferAttribute(e,_),o.fromBufferAttribute(e,y),a.fromBufferAttribute(e,b),d.subVectors(a,o),h.subVectors(r,o),d.cross(h),s.fromBufferAttribute(n,_),l.fromBufferAttribute(n,y),c.fromBufferAttribute(n,b),s.add(d),l.add(d),c.add(d),n.setXYZ(_,s.x,s.y,s.z),n.setXYZ(y,l.x,l.y,l.z),n.setXYZ(b,c.x,c.y,c.z)}else for(let u=0,f=e.count;u<f;u+=3)r.fromBufferAttribute(e,u+0),o.fromBufferAttribute(e,u+1),a.fromBufferAttribute(e,u+2),d.subVectors(a,o),h.subVectors(r,o),d.cross(h),n.setXYZ(u+0,d.x,d.y,d.z),n.setXYZ(u+1,d.x,d.y,d.z),n.setXYZ(u+2,d.x,d.y,d.z);this.normalizeNormals(),n.needsUpdate=!0}}normalizeNormals(){let t=this.attributes.normal;for(let e=0,n=t.count;e<n;e++)yo.fromBufferAttribute(t,e),yo.normalize(),t.setXYZ(e,yo.x,yo.y,yo.z)}toNonIndexed(){function t(s,l){let c=s.array,d=s.itemSize,h=s.normalized,u=new c.constructor(l.length*d),f=0,_=0;for(let y=0,b=l.length;y<b;y++){s.isInterleavedBufferAttribute?f=l[y]*s.data.stride+s.offset:f=l[y]*d;for(let v=0;v<d;v++)u[_++]=c[f++]}return new Vn(u,d,h)}if(this.index===null)return console.warn("THREE.BufferGeometry.toNonIndexed(): BufferGeometry is already non-indexed."),this;let e=new i,n=this.index.array,r=this.attributes;for(let s in r){let l=r[s],c=t(l,n);e.setAttribute(s,c)}let o=this.morphAttributes;for(let s in o){let l=[],c=o[s];for(let d=0,h=c.length;d<h;d++){let u=c[d],f=t(u,n);l.push(f)}e.morphAttributes[s]=l}e.morphTargetsRelative=this.morphTargetsRelative;let a=this.groups;for(let s=0,l=a.length;s<l;s++){let c=a[s];e.addGroup(c.start,c.count,c.materialIndex)}return e}toJSON(){let t={metadata:{version:4.6,type:"BufferGeometry",generator:"BufferGeometry.toJSON"}};if(t.uuid=this.uuid,t.type=this.type,this.name!==""&&(t.name=this.name),Object.keys(this.userData).length>0&&(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 h=0,u=c.length;h<u;h++){let f=c[h];d.push(f.toJSON(t.data))}d.length>0&&(r[l]=d,o=!0)}o&&(t.data.morphAttributes=r,t.data.morphTargetsRelative=this.morphTargetsRelative);let a=this.groups;a.length>0&&(t.data.groups=JSON.parse(JSON.stringify(a)));let s=this.boundingSphere;return s!==null&&(t.data.boundingSphere={center:s.center.toArray(),radius:s.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=[],h=o[c];for(let u=0,f=h.length;u<f;u++)d.push(h[u].clone(e));this.morphAttributes[c]=d}this.morphTargetsRelative=t.morphTargetsRelative;let a=t.groups;for(let c=0,d=a.length;c<d;c++){let h=a[c];this.addGroup(h.start,h.count,h.materialIndex)}let s=t.boundingBox;s!==null&&(this.boundingBox=s.clone());let l=t.boundingSphere;return l!==null&&(this.boundingSphere=l.clone()),this.drawRange.start=t.drawRange.start,this.drawRange.count=t.drawRange.count,this.userData=t.userData,this}dispose(){this.dispatchEvent({type:"dispose"})}},p9=new gr,Qf=new Td,tx=new sc,A9=new ce,jp=new ce,$p=new ce,Xp=new ce,rI=new ce,ix=new ce,nx=new qe,rx=new qe,ox=new qe,g9=new ce,_9=new ce,b9=new ce,ax=new ce,sx=new ce,Ui=class extends Ps{constructor(t=new wn,e=new Bd){super(),this.isMesh=!0,this.type="Mesh",this.geometry=t,this.material=e,this.updateMorphTargets()}copy(t,e){return super.copy(t,e),t.morphTargetInfluences!==void 0&&(this.morphTargetInfluences=t.morphTargetInfluences.slice()),t.morphTargetDictionary!==void 0&&(this.morphTargetDictionary=Object.assign({},t.morphTargetDictionary)),this.material=Array.isArray(t.material)?t.material.slice():t.material,this.geometry=t.geometry,this}updateMorphTargets(){let e=this.geometry.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,a=r.length;o<a;o++){let s=r[o].name||String(o);this.morphTargetInfluences.push(0),this.morphTargetDictionary[s]=o}}}}getVertexPosition(t,e){let n=this.geometry,r=n.attributes.position,o=n.morphAttributes.position,a=n.morphTargetsRelative;e.fromBufferAttribute(r,t);let s=this.morphTargetInfluences;if(o&&s){ix.set(0,0,0);for(let l=0,c=o.length;l<c;l++){let d=s[l],h=o[l];d!==0&&(rI.fromBufferAttribute(h,t),a?ix.addScaledVector(rI,d):ix.addScaledVector(rI.sub(e),d))}e.add(ix)}return e}raycast(t,e){let n=this.geometry,r=this.material,o=this.matrixWorld;r!==void 0&&(n.boundingSphere===null&&n.computeBoundingSphere(),tx.copy(n.boundingSphere),tx.applyMatrix4(o),Qf.copy(t.ray).recast(t.near),!(tx.containsPoint(Qf.origin)===!1&&(Qf.intersectSphere(tx,A9)===null||Qf.origin.distanceToSquared(A9)>(t.far-t.near)**2))&&(p9.copy(o).invert(),Qf.copy(t.ray).applyMatrix4(p9),!(n.boundingBox!==null&&Qf.intersectsBox(n.boundingBox)===!1)&&this._computeIntersections(t,e,Qf)))}_computeIntersections(t,e,n){let r,o=this.geometry,a=this.material,s=o.index,l=o.attributes.position,c=o.attributes.uv,d=o.attributes.uv1,h=o.attributes.normal,u=o.groups,f=o.drawRange;if(s!==null)if(Array.isArray(a))for(let _=0,y=u.length;_<y;_++){let b=u[_],v=a[b.materialIndex],M=Math.max(b.start,f.start),x=Math.min(s.count,Math.min(b.start+b.count,f.start+f.count));for(let w=M,k=x;w<k;w+=3){let P=s.getX(w),D=s.getX(w+1),O=s.getX(w+2);r=lx(this,v,t,n,c,d,h,P,D,O),r&&(r.faceIndex=Math.floor(w/3),r.face.materialIndex=b.materialIndex,e.push(r))}}else{let _=Math.max(0,f.start),y=Math.min(s.count,f.start+f.count);for(let b=_,v=y;b<v;b+=3){let M=s.getX(b),x=s.getX(b+1),w=s.getX(b+2);r=lx(this,a,t,n,c,d,h,M,x,w),r&&(r.faceIndex=Math.floor(b/3),e.push(r))}}else if(l!==void 0)if(Array.isArray(a))for(let _=0,y=u.length;_<y;_++){let b=u[_],v=a[b.materialIndex],M=Math.max(b.start,f.start),x=Math.min(l.count,Math.min(b.start+b.count,f.start+f.count));for(let w=M,k=x;w<k;w+=3){let P=w,D=w+1,O=w+2;r=lx(this,v,t,n,c,d,h,P,D,O),r&&(r.faceIndex=Math.floor(w/3),r.face.materialIndex=b.materialIndex,e.push(r))}}else{let _=Math.max(0,f.start),y=Math.min(l.count,f.start+f.count);for(let b=_,v=y;b<v;b+=3){let M=b,x=b+1,w=b+2;r=lx(this,a,t,n,c,d,h,M,x,w),r&&(r.faceIndex=Math.floor(b/3),e.push(r))}}}};function rme(i,t,e,n,r,o,a,s){let l;if(t.side===ra?l=n.intersectTriangle(a,o,r,!0,s):l=n.intersectTriangle(r,o,a,t.side===Lu,s),l===null)return null;sx.copy(s),sx.applyMatrix4(i.matrixWorld);let c=e.ray.origin.distanceTo(sx);return c<e.near||c>e.far?null:{distance:c,point:sx.clone(),object:i}}function lx(i,t,e,n,r,o,a,s,l,c){i.getVertexPosition(s,jp),i.getVertexPosition(l,$p),i.getVertexPosition(c,Xp);let d=rme(i,t,e,n,jp,$p,Xp,ax);if(d){r&&(nx.fromBufferAttribute(r,s),rx.fromBufferAttribute(r,l),ox.fromBufferAttribute(r,c),d.uv=Yf.getInterpolation(ax,jp,$p,Xp,nx,rx,ox,new qe)),o&&(nx.fromBufferAttribute(o,s),rx.fromBufferAttribute(o,l),ox.fromBufferAttribute(o,c),d.uv1=Yf.getInterpolation(ax,jp,$p,Xp,nx,rx,ox,new qe)),a&&(g9.fromBufferAttribute(a,s),_9.fromBufferAttribute(a,l),b9.fromBufferAttribute(a,c),d.normal=Yf.getInterpolation(ax,jp,$p,Xp,g9,_9,b9,new ce),d.normal.dot(n.direction)>0&&d.normal.multiplyScalar(-1));let h={a:s,b:l,c,normal:new ce,materialIndex:0};Yf.getNormal(jp,$p,Xp,h.normal),d.face=h}return d}var xa=class i extends wn{constructor(t=1,e=1,n=1,r=1,o=1,a=1){super(),this.type="BoxGeometry",this.parameters={width:t,height:e,depth:n,widthSegments:r,heightSegments:o,depthSegments:a};let s=this;r=Math.floor(r),o=Math.floor(o),a=Math.floor(a);let l=[],c=[],d=[],h=[],u=0,f=0;_("z","y","x",-1,-1,n,e,t,a,o,0),_("z","y","x",1,-1,n,e,-t,a,o,1),_("x","z","y",1,1,t,n,e,r,a,2),_("x","z","y",1,-1,t,n,-e,r,a,3),_("x","y","z",1,-1,t,e,n,r,o,4),_("x","y","z",-1,-1,t,e,-n,r,o,5),this.setIndex(l),this.setAttribute("position",new Qn(c,3)),this.setAttribute("normal",new Qn(d,3)),this.setAttribute("uv",new Qn(h,2));function _(y,b,v,M,x,w,k,P,D,O,T){let B=w/D,L=k/O,G=w/2,W=k/2,oe=P/2,pe=D+1,ge=O+1,de=0,U=0,ee=new ce;for(let De=0;De<ge;De++){let We=De*L-W;for(let vt=0;vt<pe;vt++){let bt=vt*B-G;ee[y]=bt*M,ee[b]=We*x,ee[v]=oe,c.push(ee.x,ee.y,ee.z),ee[y]=0,ee[b]=0,ee[v]=P>0?1:-1,d.push(ee.x,ee.y,ee.z),h.push(vt/D),h.push(1-De/O),de+=1}}for(let De=0;De<O;De++)for(let We=0;We<D;We++){let vt=u+We+pe*De,bt=u+We+pe*(De+1),te=u+(We+1)+pe*(De+1),Z=u+(We+1)+pe*De;l.push(vt,bt,Z),l.push(bt,te,Z),U+=6}s.addGroup(f,U,T),f+=U,u+=de}}copy(t){return super.copy(t),this.parameters=Object.assign({},t.parameters),this}static fromJSON(t){return new i(t.width,t.height,t.depth,t.widthSegments,t.heightSegments,t.depthSegments)}};function pA(i){let t={};for(let e in i){t[e]={};for(let n in i[e]){let r=i[e][n];r&&(r.isColor||r.isMatrix3||r.isMatrix4||r.isVector2||r.isVector3||r.isVector4||r.isTexture||r.isQuaternion)?r.isRenderTargetTexture?(console.warn("UniformsUtils: Textures of render targets cannot be cloned via cloneUniforms() or mergeUniforms()."),t[e][n]=null):t[e][n]=r.clone():Array.isArray(r)?t[e][n]=r.slice():t[e][n]=r}}return t}function ya(i){let t={};for(let e=0;e<i.length;e++){let n=pA(i[e]);for(let r in n)t[r]=n[r]}return t}function ome(i){let t=[];for(let e=0;e<i.length;e++)t.push(i[e].clone());return t}function CH(i){let t=i.getRenderTarget();return t===null?i.outputColorSpace:t.isXRRenderTarget===!0?t.texture.colorSpace:On.workingColorSpace}var Z_={clone:pA,merge:ya},ame=`void main() {
|
|
1239
1239
|
gl_Position = projectionMatrix * modelViewMatrix * vec4( position, 1.0 );
|
|
1240
1240
|
}`,sme=`void main() {
|
|
1241
1241
|
gl_FragColor = vec4( 1.0, 0.0, 0.0, 1.0 );
|
|
@@ -5181,10 +5181,10 @@ THE FONT SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
|
5181
5181
|
`],encapsulation:2,changeDetection:0})}return i})();var PW=(()=>{class i{constructor(e){this.isLoadingMap$=e.select(DW)}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-loading-map-progress-spinner"]],decls:2,vars:4,consts:[["id","loading-gif-map","mode","indeterminate","diameter","22","title","Rendering map"]],template:function(n,r){n&1&&(J(0,"mat-progress-spinner",0),fe(1,"async")),n&2&&pi("visibility",_e(1,2,r.isLoadingMap$)?"visible":"hidden")},dependencies:[$M,dt],styles:["[_nghost-%COMP%]{display:inline-block;vertical-align:middle}"]})}}return i})();var RW=Re(hi,i=>i.isPresentationMode);var OW=(()=>{class i{constructor(e,n){this.store=e,this.elementReference=n,this.isPresentationModeEnabled$=this.store.select(RW)}setPresentationModeEnabled(e){this.store.dispatch(_h({value:e.checked})),this.elementReference.nativeElement.querySelector("mat-slide-toggle").classList.remove("cdk-focused"),this.elementReference.nativeElement.querySelector("mat-slide-toggle").classList.remove("cdk-program-focused"),this.elementReference.nativeElement.querySelector("mat-slide-toggle").classList.remove("mat-mdc-slide-toggle-focused")}static{this.\u0275fac=function(n){return new(n||i)(se(Ie),se(Ft))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-presentation-mode-button"]],decls:6,vars:6,consts:[["aria-label","Presentation Mode Toggle",1,"cc-presentation-mode-button",3,"change","checked","title"],[1,"presentation-mode-icon","fa","fa-television"]],template:function(n,r){n&1&&(S(0,"mat-slide-toggle",0),fe(1,"async"),fe(2,"async"),he("change",function(a){return r.setPresentationModeEnabled(a)}),J(3,"i",1),S(4,"span"),j(5,"Presentation Mode"),F()()),n&2&&z("checked",_e(1,2,r.isPresentationModeEnabled$))("title",_e(2,4,r.isPresentationModeEnabled$)?"Disable flashlight hover effect":"Enable flashlight hover effect")},dependencies:[nh,dt],styles:["i[_ngcontent-%COMP%]{margin-right:4px}"]})}}return i})();var LW=Re(hi,i=>i.experimentalFeaturesEnabled);var NW=Re(hi,i=>i.hideFlatBuildings);var XM=Re(hi,i=>i.resetCameraIfNewFileIsLoaded);var KM=Re(hi,i=>i.layoutAlgorithm);var UW=Re(hi,i=>i.maxTreeMapFiles);function Eo(i,t=0){let e;return(...n)=>{clearTimeout(e),e=setTimeout(()=>{i.apply(this,n),e=null},t)}}var zb=(i,t,e)=>{let n=Number.parseInt(i.target.value);return n<t?t:n>e?e:n};var Mh=(()=>{class i{constructor(){this.step=1,this.disabled=!1}handleSliderOnChange(e){e!==this.value&&this.onChange(e)}handleInputOnChange(e){let n=zb(e,this.min,this.max);n!==this.value&&!Number.isNaN(n)&&this.onChange(n)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=re({type:i,selectors:[["cc-slider"]],inputs:{value:"value",min:"min",max:"max",label:"label",step:"step",disabled:"disabled",onChange:"onChange"},decls:8,vars:10,consts:[[1,"cc-slider-container"],[1,"label"],[1,"slider-with-input"],[3,"disabled","step","min","max"],["matSliderThumb","",3,"input","value"],["appearance","outline","subscriptSizing","dynamic"],["matInput","","type","number",3,"input","value","disabled","min","max"]],template:function(n,r){n&1&&(S(0,"div",0)(1,"mat-label",1),j(2),F(),S(3,"div",2)(4,"mat-slider",3)(5,"input",4),he("input",function(a){return r.handleInputOnChange(a)}),F()(),S(6,"mat-form-field",5)(7,"input",6),he("input",function(a){return r.handleInputOnChange(a)}),F()()()()),n&2&&(E(2),Ai(r.label),E(2),z("disabled",r.disabled)("step",r.step)("min",r.min)("max",r.max),E(),z("value",r.value),E(2),z("value",r.value)("disabled",r.disabled)("min",r.min)("max",r.max))},dependencies:[zr,GC,Pb,Er,da],styles:["[_nghost-%COMP%]{width:100%;margin-top:8px;display:inline-block}"]})}}return i})();function dCe(i,t){if(i&1&&(S(0,"mat-option",2),j(1),F()),i&2){let e=t.$implicit;z("value",e),E(),ct(" ",e," ")}}function uCe(i,t){if(i&1&&(J(0,"cc-slider",3),fe(1,"async")),i&2){let e=me();z("label","Maximum TreeMap Files")("min",1)("max",1e3)("value",_e(1,5,e.maxTreeMapFiles$))("onChange",e.handleChangeMaxTreeMapFiles)}}var HW=(()=>{class i{constructor(e){this.store=e,this.layoutAlgorithms=Object.values(ea),this.layoutAlgorithm$=this.store.select(KM),this.maxTreeMapFiles$=this.store.select(UW),this.handleChangeMaxTreeMapFiles=Eo(n=>{this.store.dispatch(Fc({value:n}))},400)}handleSelectedLayoutAlgorithmChanged(e){this.store.dispatch(Bc({value:e.value}))}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-map-layout-selection"]],decls:9,vars:6,consts:[["appearance","outline","subscriptSizing","dynamic"],[3,"selectionChange","value"],[3,"value"],[1,"cc-tree-maps-max-tree-map-files",3,"label","min","max","value","onChange"]],template:function(n,r){n&1&&(S(0,"mat-form-field",0)(1,"mat-label"),j(2,"Map Layout"),F(),S(3,"mat-select",1),fe(4,"async"),he("selectionChange",function(a){return r.handleSelectedLayoutAlgorithmChanged(a)}),xi(5,dCe,2,2,"mat-option",2,En),F()(),ke(7,uCe,2,7,"cc-slider",3),fe(8,"async")),n&2&&(E(3),z("value",_e(4,2,r.layoutAlgorithm$)),E(2),wi(r.layoutAlgorithms),E(2),Pe(_e(8,4,r.layoutAlgorithm$)==="TreeMapStreet"?7:-1))},dependencies:[Er,zr,Qo,Zr,Mh,dt],encapsulation:2})}}return i})();var YM=Re(hi,i=>i.sharpnessMode);function hCe(i,t){if(i&1&&(S(0,"mat-option",2),j(1),F()),i&2){let e=t.$implicit;z("value",e),E(),ct(" ",e," ")}}var VW=(()=>{class i{constructor(e){this.store=e,this.sharpnessModes=Object.values(Wl),this.sharpnessMode$=this.store.select(YM)}handleSelectedSharpnessModeChanged(e){this.store.dispatch(Ic({value:e.value}))}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-display-quality-selection"]],decls:7,vars:3,consts:[["appearance","outline","subscriptSizing","dynamic"],[3,"selectionChange","value"],[3,"value"]],template:function(n,r){n&1&&(S(0,"mat-form-field",0)(1,"mat-label"),j(2,"Display Quality"),F(),S(3,"mat-select",1),fe(4,"async"),he("selectionChange",function(a){return r.handleSelectedSharpnessModeChanged(a)}),xi(5,hCe,2,2,"mat-option",2,En),F()()),n&2&&(E(3),z("value",_e(4,1,r.sharpnessMode$)),E(2),wi(r.sharpnessModes))},dependencies:[Er,zr,Qo,Zr,dt],encapsulation:2})}}return i})();function qb(i){for(let e of Object.keys(i))if(typeof i[e]=="object"&&i[e]!==null){let{x:n,y:r,z:o}=i[e];n!==void 0||r!==void 0||o!==void 0?i[e]=new ce(n??1,r??1,o??1):qb(i[e])}}var Sh=Re(br,i=>$8(i.unifiedMapNode));var fCe=100,mCe=10,fg=i=>{let t=Math.floor(i.length/fCe);return t<=vm?vm:Math.min(t,mCe)};var pCe="appSettings.amountOfTopLabels",QW=(i,t)=>{let e={},n=0;for(let r of i){let o=r.split("."),a=WM,s=e;for(let[l,c]of o.entries())a[c]!==void 0&&(s[c]||(s[c]={},n++),l===o.length-1?s[c]=a[c]:(a=a[c],s=s[c]))}return n!==0&&qb(e),i.includes(pCe)&&(e.appSettings.amountOfTopLabels=fg(Sh(t))),e};function ACe(i,t){if(i&1&&(Ut(0,"span",2),j(1),qt()),i&2){let e=me();E(),ct(" ",e.label)}}var Oc=(()=>{class i{constructor(e,n){this.store=e,this.state=n}applyDefaultSettings(){let e=QW(this.settingsKeys,this.state.getValue());this.store.dispatch(ts({value:e})),this.callback&&this.callback()}static{this.\u0275fac=function(n){return new(n||i)(se(Ie),se(bi))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-reset-settings-button"]],inputs:{settingsKeys:"settingsKeys",tooltip:"tooltip",label:"label",callback:"callback"},decls:3,vars:2,consts:[[3,"click","title"],[1,"fa","fa-undo"],[1,"reset-settings-button-label"]],template:function(n,r){n&1&&(Ut(0,"button",0),fr("click",function(){return r.applyDefaultSettings()}),Ti(1,"i",1),ke(2,ACe,2,1,"span",2),qt()),n&2&&(sn("title",r.tooltip),E(2),Pe(r.label?2:-1))},styles:["button[_ngcontent-%COMP%]{color:#1b9cfc;background:none;align-items:center;display:flex;gap:4px;margin:0;padding:0}button[_ngcontent-%COMP%] .fa[_ngcontent-%COMP%]{display:flex;align-items:center;justify-content:center;height:40px;width:40px;font-size:18px}button[_ngcontent-%COMP%]:hover .fa[_ngcontent-%COMP%]{border-radius:100%;background-color:#9e9e9e33}"]})}}return i})();var gCe=()=>["appSettings.hideFlatBuildings","appSettings.isWhiteBackground","appSettings.resetCameraIfNewFileIsLoaded","appSettings.layoutAlgorithm","appSettings.maxTreeMapFiles"],zW=(()=>{class i{constructor(e){this.store=e,this.screenshotToClipboardEnabled$=this.store.select(fw),this.experimentalFeaturesEnabled$=this.store.select(LW),this.isWhiteBackground$=this.store.select(kw),this.hideFlatBuildings$=this.store.select(NW),this.resetCameraIfNewFileIsLoaded$=this.store.select(XM)}handleResetCameraIfNewFileIsLoadedChanged(e){this.store.dispatch(vh({value:e.checked}))}handleHideFlatBuildingsChanged(e){this.store.dispatch(Cc({value:e.checked}))}handleIsWhiteBackgroundChanged(e){this.store.dispatch(Ec({value:e.checked}))}handleExperimentalFeaturesEnabledChanged(e){this.store.dispatch(yh({value:e.checked}))}handleScreenshotToClipboardEnabledChanged(e){this.store.dispatch(xh({value:e.checked}))}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-global-configuration-dialog"]],decls:38,vars:17,consts:[["xmlns","http://www.w3.org/1999/html",1,"header"],[1,"cc-global-configuration-dialog-content"],[3,"change","checked"],["title","The camera is reset to the default position when any change in the map layout is made. Layout changes could be area changes, file changes, layout algorithm changes, focussing, excluding etc.",3,"change","checked"],[1,"fa","fa-info-circle"],["title",`Current experimental features:
|
|
5182
5182
|
Dynamic Floor Label Height: Raises folder labels further up to reduce flickering on large maps (Needs site refresh)
|
|
5183
5183
|
Visibility of buildings without area metric: Show buildings without area metric in the map (Needs site refresh)`,3,"change","checked"],["tooltip","Reset global settings to their defaults","label","Reset global settings",3,"settingsKeys"],[1,"cc-global-configuration-links-list"],["href","https://codecharta.com/","target","_blank","rel","noopener noreferrer",1,"weblink"],[1,"fa","fa-external-link","icon-link"],["href","https://codecharta.com/docs/overview/introduction","target","_blank","rel","noopener noreferrer",1,"weblink"],["href","https://github.com/MaibornWolff/codecharta/","target","_blank","rel","noopener noreferrer",1,"weblink"],["align","end"],["mat-flat-button","","mat-dialog-close",""]],template:function(n,r){n&1&&(S(0,"mat-toolbar",0)(1,"h2"),j(2,"Global Configuration"),F()(),S(3,"mat-dialog-content")(4,"div",1),J(5,"cc-map-layout-selection")(6,"cc-display-quality-selection"),S(7,"mat-slide-toggle",2),fe(8,"async"),he("change",function(a){return r.handleHideFlatBuildingsChanged(a)}),j(9," Hide Flattened Buildings "),F(),S(10,"mat-slide-toggle",3),fe(11,"async"),he("change",function(a){return r.handleResetCameraIfNewFileIsLoadedChanged(a)}),j(12," Reset camera when map layout changes "),J(13,"i",4),F(),S(14,"mat-slide-toggle",2),fe(15,"async"),he("change",function(a){return r.handleIsWhiteBackgroundChanged(a)}),j(16," White Background "),F(),S(17,"mat-slide-toggle",5),fe(18,"async"),he("change",function(a){return r.handleExperimentalFeaturesEnabledChanged(a)}),j(19," Enable Experimental Features "),J(20,"i",4),F(),S(21,"mat-slide-toggle",2),fe(22,"async"),he("change",function(a){return r.handleScreenshotToClipboardEnabledChanged(a)}),j(23," Screenshot to clipboard "),F(),J(24,"cc-reset-settings-button",6),S(25,"div",7)(26,"a",8),J(27,"em",9),j(28,"Website "),F(),S(29,"a",10),J(30,"em",9),j(31,"Documentation "),F(),S(32,"a",11),J(33,"em",9),j(34,"Github "),F()()()(),S(35,"mat-dialog-actions",12)(36,"button",13),j(37,"Close"),F()()),n&2&&(E(7),z("checked",_e(8,6,r.hideFlatBuildings$)),E(3),z("checked",_e(11,8,r.resetCameraIfNewFileIsLoaded$)),E(4),z("checked",_e(15,10,r.isWhiteBackground$)),E(3),z("checked",_e(18,12,r.experimentalFeaturesEnabled$)),E(4),z("checked",_e(22,14,r.screenshotToClipboardEnabled$)),E(3),z("settingsKeys",Oa(16,gCe)))},dependencies:[ca,ar,HW,VW,nh,Oc,Cr,Wi,or,dt],styles:[".cc-global-configuration-dialog-content[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:26px}.cc-global-configuration-links-list[_ngcontent-%COMP%]{display:flex;gap:16px}.cc-global-configuration-links-list[_ngcontent-%COMP%] .weblink[_ngcontent-%COMP%]{display:block;color:#000000de;text-decoration:none}.cc-global-configuration-links-list[_ngcontent-%COMP%] .weblink[_ngcontent-%COMP%] .fa[_ngcontent-%COMP%]{margin:8px}"]})}}return i})();var qW=(()=>{class i{constructor(e){this.dialog=e}showGlobalConfiguration(){this.dialog.open(zW,{panelClass:"cc-global-configuration-dialog"})}static{this.\u0275fac=function(n){return new(n||i)(se(fn))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-global-configuration-button"]],decls:4,vars:1,consts:[["mat-button","","title","Global Configuration",3,"click"],[3,"icon"]],template:function(n,r){n&1&&(S(0,"button",0),he("click",function(){return r.showGlobalConfiguration()}),S(1,"span"),j(2,"Global Configuration"),F(),J(3,"cc-action-icon",1),F()),n&2&&(E(3),z("icon","fa fa-cog"))},dependencies:[Wi,La],styles:["button[_ngcontent-%COMP%]{margin:0}button[_ngcontent-%COMP%] cc-action-icon[_ngcontent-%COMP%]{margin-left:12px}button[_ngcontent-%COMP%]:hover cc-action-icon[_ngcontent-%COMP%]{background-color:#0374c9}span[_ngcontent-%COMP%]{font-size:10pt}"]})}}return i})();function _Ce(i,t){i&1&&J(0,"cc-file-panel")}function bCe(i,t){i&1&&J(0,"cc-hovered-node-path-panel")}var GW=(()=>{class i{constructor(e){this.store=e,this.hoveredNodeId$=this.store.select(Gl)}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-tool-bar"]],decls:12,vars:3,consts:[[1,"right-aligned"]],template:function(n,r){n&1&&(J(0,"cc-upload-files-button")(1,"cc-screenshot-button")(2,"cc-copy-to-clipboard-button")(3,"cc-export-3d-map-button")(4,"cc-reset-map-button"),ke(5,_Ce,1,0,"cc-file-panel"),fe(6,"async"),Kc(7,bCe,1,0,"cc-hovered-node-path-panel"),S(8,"div",0),J(9,"cc-loading-map-progress-spinner")(10,"cc-presentation-mode-button")(11,"cc-global-configuration-button"),F()),n&2&&(E(5),Pe(_e(6,1,r.hoveredNodeId$)===null?5:7))},dependencies:[L7,BV,kV,Cq,hW,BW,IW,PW,OW,qW,dt],styles:["[_nghost-%COMP%]{display:flex;gap:8px;padding-left:8px;align-items:center;background-color:#f0f0f0;height:35px;border-bottom:1px solid #cdcdcd}[_nghost-%COMP%] .right-aligned[_ngcontent-%COMP%]{position:absolute;right:4px;display:inline-flex;align-items:center;width:400px;justify-content:space-between}"]})}}return i})();var WW=(()=>{class i{constructor(e){this.store=e,this.areaMetric$=this.store.select(Or),this.distributionMetric=HM}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-distribution-metric"]],decls:3,vars:3,consts:[[1,"fa","fa-pie-chart"]],template:function(n,r){n&1&&(Ti(0,"i",0),j(1),fe(2,"async")),n&2&&(E(),ct(" ",_e(2,1,r.areaMetric$),`
|
|
5184
|
-
`))},dependencies:[dt],styles:["[_nghost-%COMP%]{min-width:max-content;display:flex;align-items:center;font-size:12px;gap:6px;margin-left:5px;margin-right:5px}"]})}}return i})();var jW=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,selectors:[["","cdkMenuGroup",""]],hostAttrs:["role","group",1,"cdk-menu-group"],exportAs:["cdkMenuGroup"],features:[Si([{provide:rh,useClass:rh}])]})}return i})(),zk=new Je("cdk-menu"),Eh=(function(i){return i[i.nextItem=0]="nextItem",i[i.previousItem=1]="previousItem",i[i.currentItem=2]="currentItem",i})(Eh||{}),Ud=new Je("cdk-menu-stack"),vCe={provide:Ud,deps:[[new Jv,new FE,new Km(Ud)]],useFactory:i=>i||new qk},yCe=i=>({provide:Ud,deps:[[new Jv,new FE,new Km(Ud)]],useFactory:t=>t||qk.inline(i)}),qk=(()=>{class i{id=R(hn).getId("cdk-menu-stack-");_elements=[];_close=new Bt;_empty=new Bt;_hasFocus=new Bt;closed=this._close;hasFocus=this._hasFocus.pipe(Tr(!1),vs(0),tl());emptied=this._empty;_inlineMenuOrientation=null;static inline(e){let n=new i;return n._inlineMenuOrientation=e,n}push(e){this._elements.push(e)}close(e,n){let{focusNextOnEmpty:r,focusParentTrigger:o}=$e({},n);if(this._elements.indexOf(e)>=0){let a;do a=this._elements.pop(),this._close.next({item:a,focusParentTrigger:o});while(a!==e);this.isEmpty()&&this._empty.next(r)}}closeSubMenuOf(e){let n=!1;if(this._elements.indexOf(e)>=0)for(n=this.peek()!==e;this.peek()!==e;)this._close.next({item:this._elements.pop()});return n}closeAll(e){let{focusNextOnEmpty:n,focusParentTrigger:r}=$e({},e);if(!this.isEmpty()){for(;!this.isEmpty();){let o=this._elements.pop();o&&this._close.next({item:o,focusParentTrigger:r})}this._empty.next(n)}}isEmpty(){return!this._elements.length}length(){return this._elements.length}peek(){return this._elements[this._elements.length-1]}hasInlineMenu(){return this._inlineMenuOrientation!=null}inlineMenuOrientation(){return this._inlineMenuOrientation}setHasFocus(e){this._hasFocus.next(e)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Ue({token:i,factory:i.\u0275fac})}return i})(),ZM=new Je("cdk-menu-trigger"),xCe=new Je("cdk-menu-scroll-strategy",{providedIn:"root",factory:()=>{let i=R(_i);return()=>cl(i)}}),$W=(()=>{class i{static _openMenuTrigger;update(e){i._openMenuTrigger!==e&&(i._openMenuTrigger?.close(),i._openMenuTrigger=e)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),XW=(()=>{class i{injector=R(_i);viewContainerRef=R(Hr);menuStack=R(Ud);menuScrollStrategy=R(xCe);menuPosition;opened=new Pt;closed=new Pt;menuTemplateRef;menuData;overlayRef=null;destroyed=new Bt;stopOutsideClicksListener=wr(this.closed,this.destroyed);childMenu;_menuPortal;_childMenuInjector;ngOnDestroy(){this._destroyOverlay(),this.destroyed.next(),this.destroyed.complete()}isOpen(){return!!this.overlayRef?.hasAttached()}registerChildMenu(e){this.childMenu=e}getMenuContentPortal(){let e=this.menuTemplateRef!==this._menuPortal?.templateRef;return this.menuTemplateRef&&(!this._menuPortal||e)&&(this._menuPortal=new Za(this.menuTemplateRef,this.viewContainerRef,this.menuData,this._getChildMenuInjector())),this._menuPortal}isElementInsideMenuStack(e){for(let n=e;n;n=n?.parentElement??null)if(n.getAttribute("data-cdk-menu-stack-id")===this.menuStack.id)return!0;return!1}_destroyOverlay(){this.overlayRef&&(this.overlayRef.dispose(),this.overlayRef=null)}_getChildMenuInjector(){return this._childMenuInjector=this._childMenuInjector||_i.create({providers:[{provide:ZM,useValue:this},{provide:Ud,useValue:this.menuStack}],parent:this.injector}),this._childMenuInjector}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,hostVars:2,hostBindings:function(n,r){n&2&&ni("aria-controls",r.childMenu==null?null:r.childMenu.id)("data-cdk-menu-stack-id",r.menuStack.id)}})}return i})();var Gk=new Je("cdk-menu-aim");function KW(i,t){if(!t.isTrusted)return!1;let e=i.nativeElement,n=t.keyCode;return e.nodeName==="BUTTON"&&!e.disabled?n===13||n===32:e.nodeName==="A"?n===13:!1}var wCe=(()=>{class i extends XW{_elementRef=R(Ft);_ngZone=R(ti);_changeDetectorRef=R(Li);_inputModalityDetector=R(H0);_directionality=R(tr,{optional:!0});_renderer=R(cn);_injector=R(_i);_cleanupMouseenter;_menuTracker=R($W);_parentMenu=R(zk,{optional:!0});_menuAim=R(Gk,{optional:!0});constructor(){super(),this._setRole(),this._registerCloseHandler(),this._subscribeToMenuStackClosed(),this._subscribeToMouseEnter(),this._subscribeToMenuStackHasFocus(),this._setType()}toggle(){this.isOpen()?this.close():this.open()}open(){this._parentMenu||this._menuTracker.update(this),!this.isOpen()&&this.menuTemplateRef!=null&&(this.opened.next(),this.overlayRef=this.overlayRef||Es(this._injector,this._getOverlayConfig()),this.overlayRef.attach(this.getMenuContentPortal()),this._changeDetectorRef.markForCheck(),this._subscribeToOutsideClicks())}close(){this.isOpen()&&(this.closed.next(),this.overlayRef.detach(),this._changeDetectorRef.markForCheck()),this._closeSiblingTriggers()}getMenu(){return this.childMenu}ngOnChanges(e){e.menuPosition&&this.overlayRef&&this.overlayRef.updatePositionStrategy(this._getOverlayPositionStrategy())}ngOnDestroy(){this._cleanupMouseenter(),super.ngOnDestroy()}_toggleOnKeydown(e){let n=this._parentMenu?.orientation==="vertical";switch(e.keyCode){case 32:case 13:!bn(e)&&!KW(this._elementRef,e)&&(this.toggle(),this.childMenu?.focusFirstItem("keyboard"));break;case 39:bn(e)||this._parentMenu&&n&&this._directionality?.value!=="rtl"&&(e.preventDefault(),this.open(),this.childMenu?.focusFirstItem("keyboard"));break;case 37:bn(e)||this._parentMenu&&n&&this._directionality?.value==="rtl"&&(e.preventDefault(),this.open(),this.childMenu?.focusFirstItem("keyboard"));break;case 40:case 38:bn(e)||n||(e.preventDefault(),this.open(),e.keyCode===40?this.childMenu?.focusFirstItem("keyboard"):this.childMenu?.focusLastItem("keyboard"));break}}_handleClick(){this.toggle(),this.childMenu?.focusFirstItem("mouse")}_setHasFocus(e){this._parentMenu||this.menuStack.setHasFocus(e)}_subscribeToMouseEnter(){this._cleanupMouseenter=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"mouseenter",()=>{if(this._inputModalityDetector.mostRecentModality!=="touch"&&!this.menuStack.isEmpty()&&!this.isOpen()){let e=()=>this._ngZone.run(()=>{this._closeSiblingTriggers(),this.open()});this._menuAim?this._menuAim.toggle(e):e()}}))}_closeSiblingTriggers(){this._parentMenu?!this.menuStack.closeSubMenuOf(this._parentMenu)&&this.menuStack.peek()!==this._parentMenu&&this.menuStack.closeAll():this.menuStack.closeAll()}_getOverlayConfig(){return new Ss({positionStrategy:this._getOverlayPositionStrategy(),scrollStrategy:this.menuScrollStrategy(),direction:this._directionality||void 0})}_getOverlayPositionStrategy(){return Xl(this._injector,this._elementRef).withLockedPosition().withFlexibleDimensions(!1).withPositions(this._getOverlayPositions())}_getOverlayPositions(){return this.menuPosition??(!this._parentMenu||this._parentMenu.orientation==="horizontal"?Gy:JT)}_registerCloseHandler(){this._parentMenu||this.menuStack.closed.pipe(ln(this.destroyed)).subscribe(({item:e})=>{e===this.childMenu&&this.close()})}_subscribeToOutsideClicks(){this.overlayRef&&this.overlayRef.outsidePointerEvents().pipe(ln(this.stopOutsideClicksListener)).subscribe(e=>{let n=Ao(e),r=this._elementRef.nativeElement;n!==r&&!r.contains(n)&&(this.isElementInsideMenuStack(n)?this._closeSiblingTriggers():this.menuStack.closeAll())})}_subscribeToMenuStackHasFocus(){this._parentMenu||this.menuStack.hasFocus.pipe(ln(this.destroyed)).subscribe(e=>{e||this.menuStack.closeAll()})}_subscribeToMenuStackClosed(){this._parentMenu||this.menuStack.closed.subscribe(({focusParentTrigger:e})=>{e&&!this.menuStack.length()&&this._elementRef.nativeElement.focus()})}_setRole(){this._parentMenu||this._elementRef.nativeElement.setAttribute("role","button")}_setType(){let e=this._elementRef.nativeElement;e.nodeName==="BUTTON"&&!e.getAttribute("type")&&e.setAttribute("type","button")}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,selectors:[["","cdkMenuTriggerFor",""]],hostAttrs:[1,"cdk-menu-trigger"],hostVars:2,hostBindings:function(n,r){n&1&&he("focusin",function(){return r._setHasFocus(!0)})("focusout",function(){return r._setHasFocus(!1)})("keydown",function(a){return r._toggleOnKeydown(a)})("click",function(){return r._handleClick()}),n&2&&ni("aria-haspopup",r.menuTemplateRef?"menu":null)("aria-expanded",r.menuTemplateRef==null?null:r.isOpen())},inputs:{menuTemplateRef:[0,"cdkMenuTriggerFor","menuTemplateRef"],menuPosition:[0,"cdkMenuPosition","menuPosition"],menuData:[0,"cdkMenuTriggerData","menuData"]},outputs:{opened:"cdkMenuOpened",closed:"cdkMenuClosed"},exportAs:["cdkMenuTriggerFor"],features:[Si([{provide:ZM,useExisting:i},vCe]),nn,Di]})}return i})(),CCe=(()=>{class i{_dir=R(tr,{optional:!0});_elementRef=R(Ft);_ngZone=R(ti);_inputModalityDetector=R(H0);_renderer=R(cn);_cleanupMouseEnter;_menuAim=R(Gk,{optional:!0});_menuStack=R(Ud);_parentMenu=R(zk,{optional:!0});_menuTrigger=R(wCe,{optional:!0,self:!0});disabled=!1;typeaheadLabel;triggered=new Pt;get hasMenu(){return this._menuTrigger?.menuTemplateRef!=null}_tabindex=-1;closeOnSpacebarTrigger=!0;destroyed=new Bt;constructor(){this._setupMouseEnter(),this._setType(),this._isStandaloneItem()&&(this._tabindex=0)}ngOnDestroy(){this._cleanupMouseEnter?.(),this.destroyed.next(),this.destroyed.complete()}focus(){this._elementRef.nativeElement.focus()}trigger(e){let{keepOpen:n}=$e({},e);!this.disabled&&!this.hasMenu&&(this.triggered.next(),n||this._menuStack.closeAll({focusParentTrigger:!0}))}isMenuOpen(){return!!this._menuTrigger?.isOpen()}getMenu(){return this._menuTrigger?.getMenu()}getMenuTrigger(){return this._menuTrigger}getLabel(){return this.typeaheadLabel||this._elementRef.nativeElement.textContent?.trim()||""}_resetTabIndex(){this._isStandaloneItem()||(this._tabindex=-1)}_setTabIndex(e){this.disabled||(!e||!this._menuStack.isEmpty())&&(this._tabindex=0)}_handleClick(e){this.disabled?(e.preventDefault(),e.stopPropagation()):this.trigger()}_onKeydown(e){switch(e.keyCode){case 32:case 13:if(!bn(e)&&!KW(this._elementRef,e)){let n=this._elementRef.nativeElement.nodeName;n!=="A"&&n!=="BUTTON"&&e.preventDefault(),this.trigger({keepOpen:e.keyCode===32&&!this.closeOnSpacebarTrigger})}break;case 39:bn(e)||this._parentMenu&&this._isParentVertical()&&(this._dir?.value!=="rtl"?this._forwardArrowPressed(e):this._backArrowPressed(e));break;case 37:bn(e)||this._parentMenu&&this._isParentVertical()&&(this._dir?.value!=="rtl"?this._backArrowPressed(e):this._forwardArrowPressed(e));break}}_isStandaloneItem(){return!this._parentMenu}_backArrowPressed(e){let n=this._parentMenu;(this._menuStack.hasInlineMenu()||this._menuStack.length()>1)&&(e.preventDefault(),this._menuStack.close(n,{focusNextOnEmpty:this._menuStack.inlineMenuOrientation()==="horizontal"?Eh.previousItem:Eh.currentItem,focusParentTrigger:!0}))}_forwardArrowPressed(e){!this.hasMenu&&this._menuStack.inlineMenuOrientation()==="horizontal"&&(e.preventDefault(),this._menuStack.closeAll({focusNextOnEmpty:Eh.nextItem,focusParentTrigger:!0}))}_setupMouseEnter(){if(!this._isStandaloneItem()){let e=()=>this._ngZone.run(()=>this._menuStack.closeSubMenuOf(this._parentMenu));this._cleanupMouseEnter=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"mouseenter",()=>{this._inputModalityDetector.mostRecentModality!=="touch"&&!this._menuStack.isEmpty()&&!this.hasMenu&&(this._menuAim?this._menuAim.toggle(e):e())}))}}_isParentVertical(){return this._parentMenu?.orientation==="vertical"}_setType(){let e=this._elementRef.nativeElement;e.nodeName==="BUTTON"&&!e.getAttribute("type")&&e.setAttribute("type","button")}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,selectors:[["","cdkMenuItem",""]],hostAttrs:["role","menuitem",1,"cdk-menu-item"],hostVars:4,hostBindings:function(n,r){n&1&&he("blur",function(){return r._resetTabIndex()})("focus",function(){return r._setTabIndex()})("click",function(a){return r._handleClick(a)})("keydown",function(a){return r._onKeydown(a)}),n&2&&(sn("tabIndex",r._tabindex),ni("aria-disabled",r.disabled||null),yt("cdk-menu-item-disabled",r.disabled))},inputs:{disabled:[2,"cdkMenuItemDisabled","disabled",kt],typeaheadLabel:[0,"cdkMenuitemTypeaheadLabel","typeaheadLabel"]},outputs:{triggered:"cdkMenuItemTriggered"},exportAs:["cdkMenuItem"]})}return i})(),Qk=class{_renderer;_items;_eventCleanups;_itemsSubscription;entered=new Bt;exited=new Bt;activeElement;previousElement;constructor(t,e){this._renderer=t,this._items=e,this._bindEvents(),this.entered.subscribe(n=>this.activeElement=n),this.exited.subscribe(()=>{this.previousElement=this.activeElement,this.activeElement=void 0})}destroy(){this._cleanupEvents(),this._itemsSubscription?.unsubscribe()}_bindEvents(){this._itemsSubscription=this._items.changes.pipe(Tr(this._items)).subscribe(()=>{this._cleanupEvents(),this._eventCleanups=[],this._items.forEach(t=>{let e=t._elementRef.nativeElement;this._eventCleanups.push(this._renderer.listen(e,"mouseenter",()=>{this.entered.next(t)}),this._renderer.listen(e,"mouseout",()=>{this.exited.next(t)}))})})}_cleanupEvents(){this._eventCleanups?.forEach(t=>t()),this._eventCleanups=void 0}},MCe=(()=>{class i extends jW{_focusMonitor=R(go);ngZone=R(ti);_renderer=R(cn);nativeElement=R(Ft).nativeElement;menuStack=R(Ud);menuAim=R(Gk,{optional:!0,self:!0});dir=R(tr,{optional:!0});_allItems;id=R(hn).getId("cdk-menu-");items=new Xc;orientation="vertical";isInline=!1;keyManager;destroyed=new Bt;triggerItem;pointerTracker;_menuStackHasFocus=Gi(!1);_tabIndexSignal=Ir(()=>{let e=this._menuStackHasFocus()?-1:0;return this.isInline?e:null});ngAfterContentInit(){this.isInline||this.menuStack.push(this),this._setItems(),this._setKeyManager(),this._handleFocus(),this._subscribeToMenuStackHasFocus(),this._subscribeToMenuOpen(),this._subscribeToMenuStackClosed(),this._setUpPointerTracker()}ngOnDestroy(){this._focusMonitor.stopMonitoring(this.nativeElement),this.keyManager?.destroy(),this.destroyed.next(),this.destroyed.complete(),this.pointerTracker?.destroy()}focusFirstItem(e="program"){this.keyManager.setFocusOrigin(e),this.keyManager.setFirstItemActive()}focusLastItem(e="program"){this.keyManager.setFocusOrigin(e),this.keyManager.setLastItemActive()}setActiveMenuItem(e){this.keyManager?.setActiveItem(e)}_getTabIndex(){return this._tabIndexSignal()}closeOpenMenu(e,n){let{focusParentTrigger:r}=$e({},n),o=this.keyManager,a=this.triggerItem;e===a?.getMenuTrigger()?.getMenu()&&(a?.getMenuTrigger()?.close(),r&&(a?o.setActiveItem(a):o.setFirstItemActive()))}_setItems(){this._allItems.changes.pipe(Tr(this._allItems),ln(this.destroyed)).subscribe(e=>{this.items.reset(e.filter(n=>n._parentMenu===this)),this.items.notifyOnChanges()})}_setKeyManager(){this.keyManager=new cd(this.items).withWrap().withTypeAhead().withHomeAndEnd().skipPredicate(()=>!1),this.orientation==="horizontal"?this.keyManager.withHorizontalOrientation(this.dir?.value||"ltr"):this.keyManager.withVerticalOrientation()}_subscribeToMenuOpen(){let e=wr(this.items.changes,this.destroyed);this.items.changes.pipe(Tr(this.items),nf(n=>n.filter(r=>r.hasMenu).map(r=>r.getMenuTrigger().opened.pipe(Y4(r),ln(e)))),G4(),Do(n=>(this.triggerItem=n,n.getMenuTrigger().closed)),ln(this.destroyed)).subscribe(()=>this.triggerItem=void 0)}_subscribeToMenuStackClosed(){this.menuStack.closed.pipe(ln(this.destroyed)).subscribe(({item:e,focusParentTrigger:n})=>this.closeOpenMenu(e,{focusParentTrigger:n}))}_subscribeToMenuStackHasFocus(){this.isInline&&this.menuStack.hasFocus.pipe(ln(this.destroyed)).subscribe(e=>{this._menuStackHasFocus.set(e)})}_setUpPointerTracker(){this.menuAim&&(this.ngZone.runOutsideAngular(()=>{this.pointerTracker=new Qk(this._renderer,this.items)}),this.menuAim.initialize(this,this.pointerTracker))}_handleFocus(){this._focusMonitor.monitor(this.nativeElement,!1).pipe(ln(this.destroyed)).subscribe(e=>{e!==null&&e!=="mouse"&&this.focusFirstItem(e)})}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Fr(i)))(r||i)}})();static \u0275dir=wt({type:i,contentQueries:function(n,r,o){if(n&1&&_n(o,CCe,5),n&2){let a;mt(a=pt())&&(r._allItems=a)}},hostAttrs:["role","menu"],hostVars:4,hostBindings:function(n,r){n&1&&he("focusin",function(){return r.menuStack.setHasFocus(!0)})("focusout",function(){return r.menuStack.setHasFocus(!1)}),n&2&&(sn("tabIndex",r._getTabIndex())("id",r.id),ni("aria-orientation",r.orientation)("data-cdk-menu-stack-id",r.menuStack.id))},inputs:{id:"id"},features:[nn]})}return i})(),YW=(()=>{class i extends MCe{_parentTrigger=R(ZM,{optional:!0});closed=new Pt;orientation="vertical";isInline=!this._parentTrigger;constructor(){super(),this.destroyed.subscribe(this.closed),this._parentTrigger?.registerChildMenu(this)}ngAfterContentInit(){super.ngAfterContentInit(),this._subscribeToMenuStackEmptied()}ngOnDestroy(){super.ngOnDestroy(),this.closed.complete()}_handleKeyEvent(e){let n=this.keyManager;switch(e.keyCode){case 37:case 39:bn(e)||(e.preventDefault(),n.setFocusOrigin("keyboard"),n.onKeydown(e));break;case 27:bn(e)||(e.preventDefault(),this.menuStack.close(this,{focusNextOnEmpty:Eh.currentItem,focusParentTrigger:!0}));break;case 9:bn(e,"altKey","metaKey","ctrlKey")||this.menuStack.closeAll({focusParentTrigger:!0});break;default:n.onKeydown(e)}}_toggleMenuFocus(e){let n=this.keyManager;switch(e){case Eh.nextItem:n.setFocusOrigin("keyboard"),n.setNextItemActive();break;case Eh.previousItem:n.setFocusOrigin("keyboard"),n.setPreviousItemActive();break;case Eh.currentItem:n.activeItem&&(n.setFocusOrigin("keyboard"),n.setActiveItem(n.activeItem));break}}_subscribeToMenuStackEmptied(){this.menuStack.emptied.pipe(ln(this.destroyed)).subscribe(e=>this._toggleMenuFocus(e))}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,selectors:[["","cdkMenu",""]],hostAttrs:["role","menu",1,"cdk-menu"],hostVars:2,hostBindings:function(n,r){n&1&&he("keydown",function(a){return r._handleKeyEvent(a)}),n&2&&yt("cdk-menu-inline",r.isInline)},outputs:{closed:"closed"},exportAs:["cdkMenu"],features:[Si([{provide:jW,useExisting:i},{provide:zk,useExisting:i},yCe("vertical")]),nn]})}return i})();var SCe=Gy.map(i=>{let t=i.overlayX==="start"?2:-2,e=i.overlayY==="top"?2:-2;return ei($e({},i),{offsetX:t,offsetY:e})}),ZW=(()=>{class i extends XW{_injector=R(_i);_directionality=R(tr,{optional:!0});_menuTracker=R($W);_changeDetectorRef=R(Li);disabled=!1;constructor(){super(),this._setMenuStackCloseListener()}open(e){this._open(null,e),this._changeDetectorRef.markForCheck()}close(){this.menuStack.closeAll()}_openOnContextMenu(e){this.disabled||(e.preventDefault(),e.stopPropagation(),this._menuTracker.update(this),this._open(e,{x:e.clientX,y:e.clientY}),e.button===2?this.childMenu?.focusFirstItem("mouse"):e.button===0?this.childMenu?.focusFirstItem("keyboard"):this.childMenu?.focusFirstItem("program"))}_getOverlayConfig(e){return new Ss({positionStrategy:this._getOverlayPositionStrategy(e),scrollStrategy:this.menuScrollStrategy(),direction:this._directionality||void 0})}_getOverlayPositionStrategy(e){return Xl(this._injector,e).withLockedPosition().withGrowAfterOpen().withPositions(this.menuPosition??SCe)}_setMenuStackCloseListener(){this.menuStack.closed.pipe(ln(this.destroyed)).subscribe(({item:e})=>{e===this.childMenu&&this.isOpen()&&(this.closed.next(),this.overlayRef.detach(),this.childMenu=void 0,this._changeDetectorRef.markForCheck())})}_subscribeToOutsideClicks(e){if(this.overlayRef){let n=this.overlayRef.outsidePointerEvents();if(e){let[r,o]=j4(n,({type:a})=>a==="auxclick");n=wr(o.pipe(BE((a,s)=>e.ctrlKey&&s===0&&a.ctrlKey)),r.pipe(ys(1)))}n.pipe(ln(this.stopOutsideClicksListener)).subscribe(r=>{this.isElementInsideMenuStack(Ao(r))||this.menuStack.closeAll()})}}_open(e,n){this.disabled||(this.isOpen()?(this.menuStack.closeSubMenuOf(this.childMenu),this.overlayRef.getConfig().positionStrategy.setOrigin(n),this.overlayRef.updatePosition()):(this.opened.next(),this.overlayRef?(this.overlayRef.getConfig().positionStrategy.setOrigin(n),this.overlayRef.updatePosition()):this.overlayRef=Es(this._injector,this._getOverlayConfig(n)),this.overlayRef.attach(this.getMenuContentPortal()),this._subscribeToOutsideClicks(e)))}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,selectors:[["","cdkContextMenuTriggerFor",""]],hostVars:1,hostBindings:function(n,r){n&1&&he("contextmenu",function(a){return r._openOnContextMenu(a)}),n&2&&ni("data-cdk-menu-stack-id",null)},inputs:{menuTemplateRef:[0,"cdkContextMenuTriggerFor","menuTemplateRef"],menuPosition:[0,"cdkContextMenuPosition","menuPosition"],menuData:[0,"cdkContextMenuTriggerData","menuData"],disabled:[2,"cdkContextMenuDisabled","disabled",kt]},outputs:{opened:"cdkContextMenuOpened",closed:"cdkContextMenuClosed"},exportAs:["cdkContextMenuTriggerFor"],features:[Si([{provide:ZM,useExisting:i},{provide:Ud,useClass:qk}]),nn]})}return i})();var Gb=i=>Re(kr,t=>ECe(i,t)),ECe=(i,t)=>{let e=t.filter(n=>n.type===i);return e.sort((n,r)=>n.path.localeCompare(r.path)),e};var mg=i=>(i=i.trim(),i.startsWith("*")||i.endsWith("*")||i.startsWith("/")||i.startsWith("./")?i:!i.startsWith('"')&&!i.endsWith('"')?i.startsWith("!")?i:`*${i}*`:i);var JM=(i,t)=>{let e=[],n=t.split(",");if(n[0].startsWith("!")){n[0]=n[0].slice(1);for(let r of n)r.length>0&&e.push({path:`!${mg(r)}`,type:i})}else for(let r of n)if(r.length>0){if(r.startsWith("!"))break;r=mg(r),e.push({path:r,type:i})}return e};var JW="BlacklistExtensionAction",Wk=(i,...t)=>({type:JW,action:{type:i},extensions:t}),ej=(()=>{class i{constructor(e,n){this.actions$=e,this.store=n,this.searchPattern2BlacklistItems$=this.actions$.pipe(qr(JW),Et(r=>({blackListType:r.action.type,extensionToBlacklist:JM(r.action.type,r.extensions.join(","))})),cu()),this.blackListExtensions$=Pi(()=>this.searchPattern2BlacklistItems$.pipe(Yt(r=>r.blackListType==="flatten"||r.blackListType==="exclude"),Oi(r=>{this.store.dispatch(yc({items:r.extensionToBlacklist}))})),{dispatch:!1})}static{this.\u0275fac=function(n){return new(n||i)(Me(Jr),Me(Ie))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var tj=Re(lp,i=>i.selectedBuildingId);var eo=Re(tj,wl,(i,t)=>t?.get(i));var eS=Re(br,Or,(i,t)=>BA.getMetricDistribution(i.unifiedMapNode,t));var tS=Re(Ch,eo,Or,eS,(i,t,e,n)=>{let r=i||t;return!r||r.type===Zn.FILE?n:BA.getMetricDistribution(r,e)});function TCe(i){return`*.${i}`}function BCe(i,t){return i===om?t.others.filter(e=>e.fileExtension!==cs).map(e=>e.fileExtension):[i]}function iS(i,t,e){return BCe(i,t).map(r=>{let o=TCe(r);return e?.type===Zn.FOLDER?`${e.path}/**/${o}`:o})}var ij=(()=>{class i{constructor(e){this.store=e,this.operationContext$=Yo([this.store.select(tS),this.store.select(Ch),this.store.select(eo),this.store.select(Gb("flatten"))]).pipe(Et(([n,r,o,a])=>({distribution:n,node:r||o,flattenedItems:a})))}show(e){this.operationContext$.pipe(kn(1)).subscribe(n=>{let r=iS(e,n.distribution,n.node),o=this.createFlattenedItemsMap(n.flattenedItems),a=r.map(s=>o.get(s));this.store.dispatch(tM({items:a}))})}exclude(e){this.operationContext$.pipe(kn(1)).subscribe(n=>{let r=iS(e,n.distribution,n.node);this.store.dispatch(Wk("exclude",...r))})}flatten(e){this.operationContext$.pipe(kn(1)).subscribe(n=>{let r=iS(e,n.distribution,n.node);this.store.dispatch(Wk("flatten",...r))})}getIsFlattenedByFileExtension(e){return this.operationContext$.pipe(Et(n=>iS(e,n.distribution,n.node).every(o=>n.flattenedItems.some(a=>a.path===o))))}createFlattenedItemsMap(e){let n=new Map;for(let r of e)n.set(r.path,r);return n}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var nj=(()=>{class i{constructor(e,n){this.threeSceneService=e,this.store=n,this.metricDistribution$=this.store.select(eS),this.fileExtensionsOfOthers=new Set,this.fileExtensionsOfNone=new Set,this.metricDistribution$.pipe(J4(),Yt(r=>!!r)).subscribe(r=>{this.fileExtensionsOfOthers.clear();for(let o of r.others)this.fileExtensionsOfOthers.add(o.fileExtension);this.fileExtensionsOfNone.clear();for(let o of r.none)this.fileExtensionsOfNone.add(o.fileExtension)})}highlightExtension(e){switch(e){case om:this.threeSceneService.highlightBuildingsByExtension(this.fileExtensionsOfOthers);break;case cs:this.threeSceneService.highlightBuildingsWithoutExtensions();break;default:this.threeSceneService.highlightBuildingsByExtension(new Set([e]));break}}clearHighlightingOnFileExtensions(){this.threeSceneService.applyClearHightlights()}static{this.\u0275fac=function(n){return new(n||i)(Me(vr),Me(Ie))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function DCe(i,t){if(i&1){let e=st();S(0,"button",8),he("click",function(){Ve(e);let r=me(3);return Qe(r.show(r.fileExtension()))}),J(1,"i",9),S(2,"span"),j(3,"Show"),F()()}}function kCe(i,t){if(i&1){let e=st();S(0,"button",10),he("click",function(){Ve(e);let r=me(3);return Qe(r.flatten(r.fileExtension()))}),J(1,"img",11),S(2,"span"),j(3,"Flatten"),F()()}i&2&&(E(),z("width",17)("height",17))}function PCe(i,t){if(i&1){let e=st();S(0,"mat-card",3),ke(1,DCe,4,0,"button",4)(2,kCe,4,2,"button",5),S(3,"button",6),he("click",function(){Ve(e);let r=me(2);return Qe(r.exclude(r.fileExtension()))}),J(4,"i",7),S(5,"span"),j(6,"Exclude"),F()()()}if(i&2){let e=me(2);E(),Pe(e.isFlattened()?1:2)}}function RCe(i,t){if(i&1&&ke(0,PCe,7,1,"mat-card",3),i&2){let e=me();Pe(e.hasFileExtension()?0:-1)}}var rj=(()=>{class i{constructor(e,n){this.blackListExtensionService=e,this.highlightBuildingsByFileExtensionService=n,this.item=c0.required(),this.showAbsoluteValues=c0.required(),this.toggleShowAbsoluteValues=IO(),this.isFlattened=Gi(!1),this.fileExtension=Ir(()=>this.item().fileExtension),this.hasFileExtension=Ir(()=>this.fileExtension()!=="None"),this.formattedTitle=Ir(()=>this.formatTitle(this.showAbsoluteValues(),this.item(),this.fileExtension()))}ngOnInit(){this.flattenSubscription=this.blackListExtensionService.getIsFlattenedByFileExtension(this.fileExtension()).subscribe(e=>this.isFlattened.set(e))}ngOnDestroy(){this.flattenSubscription?.unsubscribe()}flatten(e){this.blackListExtensionService.flatten(e)}exclude(e){this.blackListExtensionService.exclude(e)}show(e){this.blackListExtensionService.show(e)}onHoverFileExtensionBar(e){this.highlightBuildingsByFileExtensionService.highlightExtension(e)}onUnhoverFileExtensionBar(){this.highlightBuildingsByFileExtensionService.clearHighlightingOnFileExtensions()}formatTitle(e,n,r){return e&&n.absoluteMetricValue||!e&&n.relativeMetricValue?e?`${r} ${n.absoluteMetricValue.toLocaleString()}`:`${r} ${n.relativeMetricValue.toFixed(2)}%`:"No data available"}get backgroundColor(){return this.item().color}get flexGrow(){return this.item().relativeMetricValue}get flexBasis(){return"0"}static{this.\u0275fac=function(n){return new(n||i)(se(ij),se(nj))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-file-extension-bar-segment"]],hostVars:6,hostBindings:function(n,r){n&2&&pi("background-color",r.backgroundColor)("flex-grow",r.flexGrow)("flex-basis",r.flexBasis)},inputs:{item:[1,"item"],showAbsoluteValues:[1,"showAbsoluteValues"]},outputs:{toggleShowAbsoluteValues:"toggleShowAbsoluteValues"},decls:5,vars:3,consts:[["contextMenu",""],[1,"cc-bar-section",3,"click","cdkContextMenuTriggerFor"],["data-test-id","formattedTitle",1,"cc-bar-section-text",3,"mouseover","mouseleave","title"],["cdkMenu",""],["mat-menu-item","","data-test-id","showBuilding"],["mat-menu-item","","data-test-id","flattenBuilding"],["mat-menu-item","","data-test-id","excludeBuilding",3,"click"],[1,"fa","fa-ban","menu-icon"],["mat-menu-item","","data-test-id","showBuilding",3,"click"],[1,"fa","fa-eye","menu-icon"],["mat-menu-item","","data-test-id","flattenBuilding",3,"click"],["alt","flattenIcon","ngSrc","/codeCharta/assets/flatten.png",1,"png-icon","menu-icon",3,"width","height"]],template:function(n,r){if(n&1){let o=st();S(0,"span",1),he("click",function(){return Ve(o),Qe(r.toggleShowAbsoluteValues.emit())}),S(1,"div",2),he("mouseover",function(){return Ve(o),Qe(r.onHoverFileExtensionBar(r.fileExtension()))})("mouseleave",function(){return Ve(o),Qe(r.onUnhoverFileExtensionBar())}),j(2),F()(),Sn(3,RCe,1,1,"ng-template",null,0,il)}if(n&2){let o=Pn(4);z("cdkContextMenuTriggerFor",o),E(),z("title",r.formattedTitle()),E(),ct(" ",r.formattedTitle()," ")}},dependencies:[ZW,_c,YW,Am,gL],styles:["[_nghost-%COMP%]{min-width:max-content;cursor:pointer;color:#fff;text-align:center;overflow:hidden}.cc-bar-section[_ngcontent-%COMP%] .cc-bar-section-text[_ngcontent-%COMP%]{font-size:10px;margin:2px 0;white-space:nowrap;padding:0 10px}"]})}}return i})();var oj=(()=>{class i{constructor(e){this.store=e,this.hoveredNodeMetricDistribution$=this.store.select(tS)}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var LCe=(i,t)=>t.fileExtension;function NCe(i,t){if(i&1){let e=st();S(0,"cc-file-extension-bar-segment",4),he("toggleShowAbsoluteValues",function(){Ve(e);let r=me();return Qe(r.toggleShowAbsoluteValues())}),F()}if(i&2){let e=t.$implicit,n=me();z("item",e)("showAbsoluteValues",n.showAbsoluteValues)}}var aj=(()=>{class i{constructor(e){this.metricDistributionService=e,this.showAbsoluteValues=!1}ngOnInit(){this.metricDistributionService.hoveredNodeMetricDistribution$.subscribe(e=>{this.metricDistribution=e})}toggleShowAbsoluteValues(){this.showAbsoluteValues=!this.showAbsoluteValues}static{this.\u0275fac=function(n){return new(n||i)(se(oj))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-file-extension-bar"]],decls:5,vars:0,consts:[[1,"cc-distribution"],["title","Distribution metric"],[1,"cc-bar"],[3,"item","showAbsoluteValues"],[3,"toggleShowAbsoluteValues","item","showAbsoluteValues"]],template:function(n,r){n&1&&(S(0,"div",0),J(1,"cc-distribution-metric",1),S(2,"div",2),xi(3,NCe,1,2,"cc-file-extension-bar-segment",3,LCe),F()()),n&2&&(E(3),wi(r.metricDistribution.visible))},dependencies:[WW,rj],styles:[".cc-distribution[_ngcontent-%COMP%]{display:flex;height:17px;width:100%}.cc-distribution[_ngcontent-%COMP%] .cc-bar[_ngcontent-%COMP%]{display:flex;gap:1px;width:100%}"]})}}return i})();var nS=Re(hi,i=>i.isSearchPanelPinned);var UCe=["*"],pg=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=re({type:i,selectors:[["cc-ribbon-bar-panel-settings"]],ngContentSelectors:UCe,decls:1,vars:0,template:function(n,r){n&1&&(ki(),Gt(0))},styles:["[_nghost-%COMP%]{z-index:1;display:flex;flex-direction:column;padding:6px;position:absolute;left:6px;top:45px;background:#fff;border:1px solid #b5b5b5;box-shadow:0 1px 3px #0003,0 1px 1px #00000024,0 2px 1px -1px #0000001f}"]})}}return i})();var HCe=["toggle"],VCe=["toggleHeader"],QCe=[[["cc-ribbon-bar-panel-settings"]],[["",8,"toggleheader"]],"*"],zCe=["cc-ribbon-bar-panel-settings",".toggleHeader","*"];function qCe(i,t){if(i&1){let e=st();S(0,"div",6,0),he("click",function(){Ve(e);let r=me();return Qe(r.toggleSettings())}),Gt(2,1),F()}}function GCe(i,t){i&1&&(S(0,"div",4),Gt(1,2),F())}function WCe(i,t){if(i&1&&J(0,"i"),i&2){let e=me(2);Xi("fa fa-angle-"+(e.isExpanded?"up":"down"))}}function jCe(i,t){if(i&1){let e=st();S(0,"div",7,1),he("click",function(){Ve(e);let r=me();return Qe(r.toggleSettings())}),j(2),ke(3,WCe,1,2,"i",8),F()}if(i&2){let e=me();E(2),ct(" ",e.title," "),E(),Pe(e.hasSettings?3:-1)}}var Wb=(()=>{class i{get hasSettings(){return!!this.settingsRef}constructor(e){this.viewReference=e,this.collapseOnPanelClick=!0,this.separator=!1,this.isExpanded=!1,this.isHeaderExpandable=!1,this.isPinned=!1,this.toggleSettingsChange=new Pt}ngOnInit(){this.mouseDownListener=e=>this.collapseOnOutsideClick(e),document.addEventListener("mousedown",this.mouseDownListener)}ngOnDestroy(){this.mouseDownListener&&document.removeEventListener("mousedown",this.mouseDownListener)}toggleSettings(){this.isExpanded=!this.isExpanded,this.toggleSettingsChange.emit(this.isExpanded)}collapseOnOutsideClick(e){if(this.isPinned)return;let n=e.target,r=document.querySelector(".cdk-overlay-container"),o=this.viewReference.element.nativeElement.contains(n),a=r?r.contains(n):!1,s=this.settingsRef?.nativeElement?.contains(n)??!1,l=this.toggleSettingsRef.nativeElement.contains(n),c=this.toggleHeaderRef?.nativeElement.contains(n)??!1;!a&&!s&&!l&&!c&&(!o||this.collapseOnPanelClick)&&(this.isExpanded=!1)}static{this.\u0275fac=function(n){return new(n||i)(se(Hr))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-ribbon-bar-panel"]],contentQueries:function(n,r,o){if(n&1&&_n(o,pg,5,Ft),n&2){let a;mt(a=pt())&&(r.settingsRef=a.first)}},viewQuery:function(n,r){if(n&1&&(Nt(HCe,5),Nt(VCe,5)),n&2){let o;mt(o=pt())&&(r.toggleSettingsRef=o.first),mt(o=pt())&&(r.toggleHeaderRef=o.first)}},hostVars:6,hostBindings:function(n,r){n&2&&yt("separator",r.separator)("expanded",r.isExpanded)("expandable",r.hasSettings)},inputs:{title:"title",collapseOnPanelClick:"collapseOnPanelClick",separator:"separator",isHeaderExpandable:"isHeaderExpandable",isPinned:"isPinned"},outputs:{toggleSettingsChange:"toggleSettingsChange"},ngContentSelectors:zCe,decls:6,vars:2,consts:[["toggleHeader",""],["toggle",""],["appearance","outlined"],[1,"section"],[1,"section-header"],[1,"section-title"],[1,"section-header",3,"click"],[1,"section-title",3,"click"],[3,"class"]],template:function(n,r){n&1&&(ki(QCe),S(0,"mat-card",2)(1,"div",3),ke(2,qCe,3,0,"div",4)(3,GCe,2,0,"div",4),ke(4,jCe,4,2,"div",5),F(),Gt(5),F()),n&2&&(E(2),Pe(r.isHeaderExpandable?2:3),E(2),Pe(r.title||r.hasSettings?4:-1))},dependencies:[_c],styles:["mat-card[_ngcontent-%COMP%]{padding:0;height:46px;border-radius:0;border-top:1px solid #cdcdcd;flex:1 1 0}[_nghost-%COMP%]:not(.expanded) mat-card[_ngcontent-%COMP%]{overflow:hidden}.section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%]{margin:0 5px;height:31px;color:#444;overflow:hidden;padding:5px}.section[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{font-size:8pt;color:gray;text-align:center;transition:background-color .4s;border-bottom:1px solid transparent;white-space:nowrap;margin:0 5px}.separator[_nghost-%COMP%] .section[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{border-top:1px solid rgba(0,0,0,.12)}.expandable[_nghost-%COMP%] .section[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]:hover{background-color:#e0e0e0;cursor:pointer}"]})}}return i})();var $Ce=i=>i===""||i==="!"||i===",",Ag=Re(Ls,$Ce);var rS=(i,t,e)=>{let n=e.trim().split(",");if(e.trim().startsWith("!")){n[0]=n[0].slice(1);for(let r of n){let o=`!${mg(r)}`;if(i.some(a=>o===a.path&&t===a.type))return!0}return!1}for(let r of n)if(i.some(o=>mg(r)===o.path&&t===o.type))return!0;return!1};var sj=Re(Ls,Ag,kr,(i,t,e)=>t?!0:rS(e,"flatten",i));var lj=Re(Ls,Ag,kr,(i,t,e)=>t?!0:rS(e,"exclude",i));var cj=(i,t,e)=>{let n=[...t,...e];for(let{file:r}of i)if(!XCe(r,n))return!1;return!0},XCe=(i,t)=>{for(let e of Ni(i.map))if(KCe(e,t))return!1;return!0},KCe=(i,t)=>Yi(i)&&i.data.path&&!ga(i.data.path,t,"exclude");var oS=(()=>{class i{constructor(e,n,r){this.actions$=e,this.store=n,this.dialog=r,this.doBlacklistItemsResultInEmptyMap$=this.actions$.pipe(qr(ig),hr(this.store.select(ir),this.store.select(kr)),Et(([o,a,s])=>({items:o.items,resultsInEmptyMap:cj(a,s,o.items)})),cu()),this.showErrorDialogIfBlacklistItemsResultInEmptyMap$=Pi(()=>this.doBlacklistItemsResultInEmptyMap$.pipe(Yt(o=>o.resultsInEmptyMap),Oi(()=>{this.dialog.open(es,{data:{title:"Blacklist Error",message:"Excluding all buildings is not possible."}})})),{dispatch:!1}),this.addBlacklistItems$=Pi(()=>this.doBlacklistItemsResultInEmptyMap$.pipe(Yt(o=>!o.resultsInEmptyMap),Et(o=>yc({items:o.items}))))}static{this.\u0275fac=function(n){return new(n||i)(Me(Jr),Me(Ie),Me(fn))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var dj=i=>({type:"BlacklistSearchPatternAction",action:{type:i}}),uj=(()=>{class i{constructor(e,n,r){this.actions$=e,this.store=n,this.addBlacklistItemsIfNotResultsInEmptyMapEffect=r,this.searchPattern2BlacklistItems$=this.actions$.pipe(qr("BlacklistSearchPatternAction"),hr(this.store.select(Ls)),Et(([o,a])=>({type:o.action.type,blacklistItems:JM(o.action.type,a)})),cu()),this.flattenSearchPattern$=Pi(()=>this.searchPattern2BlacklistItems$.pipe(Yt(o=>o.type==="flatten"),Oi(o=>{this.store.dispatch(yc({items:o.blacklistItems})),this.store.dispatch(ja({value:""}))})),{dispatch:!1}),this.excludeSearchPattern$=Pi(()=>this.searchPattern2BlacklistItems$.pipe(Yt(o=>o.type==="exclude"),Oi(()=>{this.addBlacklistItemsIfNotResultsInEmptyMapEffect.doBlacklistItemsResultInEmptyMap$.pipe(kn(1),Yt(o=>!o.resultsInEmptyMap),Oi(()=>{this.store.dispatch(ja({value:""}))})).subscribe()}),Et(o=>ig({items:o.blacklistItems}))))}static{this.\u0275fac=function(n){return new(n||i)(Me(Jr),Me(Ie),Me(oS))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var gg=(()=>{class i{get vertical(){return this._vertical}set vertical(e){this._vertical=_o(e)}_vertical=!1;get inset(){return this._inset}set inset(e){this._inset=_o(e)}_inset=!1;static \u0275fac=function(n){return new(n||i)};static \u0275cmp=re({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(n,r){n&2&&(ni("aria-orientation",r.vertical?"vertical":"horizontal"),yt("mat-divider-vertical",r.vertical)("mat-divider-horizontal",!r.vertical)("mat-divider-inset",r.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(n,r){},styles:[`.mat-divider{display:block;margin:0;border-top-style:solid;border-top-color:var(--mat-divider-color, var(--mat-sys-outline-variant));border-top-width:var(--mat-divider-width, 1px)}.mat-divider.mat-divider-vertical{border-top:0;border-right-style:solid;border-right-color:var(--mat-divider-color, var(--mat-sys-outline-variant));border-right-width:var(--mat-divider-width, 1px)}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}
|
|
5184
|
+
`))},dependencies:[dt],styles:["[_nghost-%COMP%]{min-width:max-content;display:flex;align-items:center;font-size:12px;gap:6px;margin-left:5px;margin-right:5px}"]})}}return i})();var jW=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,selectors:[["","cdkMenuGroup",""]],hostAttrs:["role","group",1,"cdk-menu-group"],exportAs:["cdkMenuGroup"],features:[Si([{provide:rh,useClass:rh}])]})}return i})(),zk=new Je("cdk-menu"),Eh=(function(i){return i[i.nextItem=0]="nextItem",i[i.previousItem=1]="previousItem",i[i.currentItem=2]="currentItem",i})(Eh||{}),Ud=new Je("cdk-menu-stack"),vCe={provide:Ud,deps:[[new Jv,new FE,new Km(Ud)]],useFactory:i=>i||new qk},yCe=i=>({provide:Ud,deps:[[new Jv,new FE,new Km(Ud)]],useFactory:t=>t||qk.inline(i)}),qk=(()=>{class i{id=R(hn).getId("cdk-menu-stack-");_elements=[];_close=new Bt;_empty=new Bt;_hasFocus=new Bt;closed=this._close;hasFocus=this._hasFocus.pipe(Tr(!1),vs(0),tl());emptied=this._empty;_inlineMenuOrientation=null;static inline(e){let n=new i;return n._inlineMenuOrientation=e,n}push(e){this._elements.push(e)}close(e,n){let{focusNextOnEmpty:r,focusParentTrigger:o}=$e({},n);if(this._elements.indexOf(e)>=0){let a;do a=this._elements.pop(),this._close.next({item:a,focusParentTrigger:o});while(a!==e);this.isEmpty()&&this._empty.next(r)}}closeSubMenuOf(e){let n=!1;if(this._elements.indexOf(e)>=0)for(n=this.peek()!==e;this.peek()!==e;)this._close.next({item:this._elements.pop()});return n}closeAll(e){let{focusNextOnEmpty:n,focusParentTrigger:r}=$e({},e);if(!this.isEmpty()){for(;!this.isEmpty();){let o=this._elements.pop();o&&this._close.next({item:o,focusParentTrigger:r})}this._empty.next(n)}}isEmpty(){return!this._elements.length}length(){return this._elements.length}peek(){return this._elements[this._elements.length-1]}hasInlineMenu(){return this._inlineMenuOrientation!=null}inlineMenuOrientation(){return this._inlineMenuOrientation}setHasFocus(e){this._hasFocus.next(e)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Ue({token:i,factory:i.\u0275fac})}return i})(),ZM=new Je("cdk-menu-trigger"),xCe=new Je("cdk-menu-scroll-strategy",{providedIn:"root",factory:()=>{let i=R(_i);return()=>cl(i)}}),$W=(()=>{class i{static _openMenuTrigger;update(e){i._openMenuTrigger!==e&&(i._openMenuTrigger?.close(),i._openMenuTrigger=e)}static \u0275fac=function(n){return new(n||i)};static \u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}return i})(),XW=(()=>{class i{injector=R(_i);viewContainerRef=R(Hr);menuStack=R(Ud);menuScrollStrategy=R(xCe);menuPosition;opened=new Pt;closed=new Pt;menuTemplateRef;menuData;overlayRef=null;destroyed=new Bt;stopOutsideClicksListener=wr(this.closed,this.destroyed);childMenu;_menuPortal;_childMenuInjector;ngOnDestroy(){this._destroyOverlay(),this.destroyed.next(),this.destroyed.complete()}isOpen(){return!!this.overlayRef?.hasAttached()}registerChildMenu(e){this.childMenu=e}getMenuContentPortal(){let e=this.menuTemplateRef!==this._menuPortal?.templateRef;return this.menuTemplateRef&&(!this._menuPortal||e)&&(this._menuPortal=new Za(this.menuTemplateRef,this.viewContainerRef,this.menuData,this._getChildMenuInjector())),this._menuPortal}isElementInsideMenuStack(e){for(let n=e;n;n=n?.parentElement??null)if(n.getAttribute("data-cdk-menu-stack-id")===this.menuStack.id)return!0;return!1}_destroyOverlay(){this.overlayRef&&(this.overlayRef.dispose(),this.overlayRef=null)}_getChildMenuInjector(){return this._childMenuInjector=this._childMenuInjector||_i.create({providers:[{provide:ZM,useValue:this},{provide:Ud,useValue:this.menuStack}],parent:this.injector}),this._childMenuInjector}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,hostVars:2,hostBindings:function(n,r){n&2&&ni("aria-controls",r.childMenu==null?null:r.childMenu.id)("data-cdk-menu-stack-id",r.menuStack.id)}})}return i})();var Gk=new Je("cdk-menu-aim");function KW(i,t){if(!t.isTrusted)return!1;let e=i.nativeElement,n=t.keyCode;return e.nodeName==="BUTTON"&&!e.disabled?n===13||n===32:e.nodeName==="A"?n===13:!1}var wCe=(()=>{class i extends XW{_elementRef=R(Ft);_ngZone=R(ti);_changeDetectorRef=R(Li);_inputModalityDetector=R(H0);_directionality=R(tr,{optional:!0});_renderer=R(cn);_injector=R(_i);_cleanupMouseenter;_menuTracker=R($W);_parentMenu=R(zk,{optional:!0});_menuAim=R(Gk,{optional:!0});constructor(){super(),this._setRole(),this._registerCloseHandler(),this._subscribeToMenuStackClosed(),this._subscribeToMouseEnter(),this._subscribeToMenuStackHasFocus(),this._setType()}toggle(){this.isOpen()?this.close():this.open()}open(){this._parentMenu||this._menuTracker.update(this),!this.isOpen()&&this.menuTemplateRef!=null&&(this.opened.next(),this.overlayRef=this.overlayRef||Es(this._injector,this._getOverlayConfig()),this.overlayRef.attach(this.getMenuContentPortal()),this._changeDetectorRef.markForCheck(),this._subscribeToOutsideClicks())}close(){this.isOpen()&&(this.closed.next(),this.overlayRef.detach(),this._changeDetectorRef.markForCheck()),this._closeSiblingTriggers()}getMenu(){return this.childMenu}ngOnChanges(e){e.menuPosition&&this.overlayRef&&this.overlayRef.updatePositionStrategy(this._getOverlayPositionStrategy())}ngOnDestroy(){this._cleanupMouseenter(),super.ngOnDestroy()}_toggleOnKeydown(e){let n=this._parentMenu?.orientation==="vertical";switch(e.keyCode){case 32:case 13:!bn(e)&&!KW(this._elementRef,e)&&(this.toggle(),this.childMenu?.focusFirstItem("keyboard"));break;case 39:bn(e)||this._parentMenu&&n&&this._directionality?.value!=="rtl"&&(e.preventDefault(),this.open(),this.childMenu?.focusFirstItem("keyboard"));break;case 37:bn(e)||this._parentMenu&&n&&this._directionality?.value==="rtl"&&(e.preventDefault(),this.open(),this.childMenu?.focusFirstItem("keyboard"));break;case 40:case 38:bn(e)||n||(e.preventDefault(),this.open(),e.keyCode===40?this.childMenu?.focusFirstItem("keyboard"):this.childMenu?.focusLastItem("keyboard"));break}}_handleClick(){this.toggle(),this.childMenu?.focusFirstItem("mouse")}_setHasFocus(e){this._parentMenu||this.menuStack.setHasFocus(e)}_subscribeToMouseEnter(){this._cleanupMouseenter=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"mouseenter",()=>{if(this._inputModalityDetector.mostRecentModality!=="touch"&&!this.menuStack.isEmpty()&&!this.isOpen()){let e=()=>this._ngZone.run(()=>{this._closeSiblingTriggers(),this.open()});this._menuAim?this._menuAim.toggle(e):e()}}))}_closeSiblingTriggers(){this._parentMenu?!this.menuStack.closeSubMenuOf(this._parentMenu)&&this.menuStack.peek()!==this._parentMenu&&this.menuStack.closeAll():this.menuStack.closeAll()}_getOverlayConfig(){return new Ss({positionStrategy:this._getOverlayPositionStrategy(),scrollStrategy:this.menuScrollStrategy(),direction:this._directionality||void 0})}_getOverlayPositionStrategy(){return Xl(this._injector,this._elementRef).withLockedPosition().withFlexibleDimensions(!1).withPositions(this._getOverlayPositions())}_getOverlayPositions(){return this.menuPosition??(!this._parentMenu||this._parentMenu.orientation==="horizontal"?Gy:JT)}_registerCloseHandler(){this._parentMenu||this.menuStack.closed.pipe(ln(this.destroyed)).subscribe(({item:e})=>{e===this.childMenu&&this.close()})}_subscribeToOutsideClicks(){this.overlayRef&&this.overlayRef.outsidePointerEvents().pipe(ln(this.stopOutsideClicksListener)).subscribe(e=>{let n=Ao(e),r=this._elementRef.nativeElement;n!==r&&!r.contains(n)&&(this.isElementInsideMenuStack(n)?this._closeSiblingTriggers():this.menuStack.closeAll())})}_subscribeToMenuStackHasFocus(){this._parentMenu||this.menuStack.hasFocus.pipe(ln(this.destroyed)).subscribe(e=>{e||this.menuStack.closeAll()})}_subscribeToMenuStackClosed(){this._parentMenu||this.menuStack.closed.subscribe(({focusParentTrigger:e})=>{e&&!this.menuStack.length()&&this._elementRef.nativeElement.focus()})}_setRole(){this._parentMenu||this._elementRef.nativeElement.setAttribute("role","button")}_setType(){let e=this._elementRef.nativeElement;e.nodeName==="BUTTON"&&!e.getAttribute("type")&&e.setAttribute("type","button")}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,selectors:[["","cdkMenuTriggerFor",""]],hostAttrs:[1,"cdk-menu-trigger"],hostVars:2,hostBindings:function(n,r){n&1&&he("focusin",function(){return r._setHasFocus(!0)})("focusout",function(){return r._setHasFocus(!1)})("keydown",function(a){return r._toggleOnKeydown(a)})("click",function(){return r._handleClick()}),n&2&&ni("aria-haspopup",r.menuTemplateRef?"menu":null)("aria-expanded",r.menuTemplateRef==null?null:r.isOpen())},inputs:{menuTemplateRef:[0,"cdkMenuTriggerFor","menuTemplateRef"],menuPosition:[0,"cdkMenuPosition","menuPosition"],menuData:[0,"cdkMenuTriggerData","menuData"]},outputs:{opened:"cdkMenuOpened",closed:"cdkMenuClosed"},exportAs:["cdkMenuTriggerFor"],features:[Si([{provide:ZM,useExisting:i},vCe]),nn,Di]})}return i})(),CCe=(()=>{class i{_dir=R(tr,{optional:!0});_elementRef=R(Ft);_ngZone=R(ti);_inputModalityDetector=R(H0);_renderer=R(cn);_cleanupMouseEnter;_menuAim=R(Gk,{optional:!0});_menuStack=R(Ud);_parentMenu=R(zk,{optional:!0});_menuTrigger=R(wCe,{optional:!0,self:!0});disabled=!1;typeaheadLabel;triggered=new Pt;get hasMenu(){return this._menuTrigger?.menuTemplateRef!=null}_tabindex=-1;closeOnSpacebarTrigger=!0;destroyed=new Bt;constructor(){this._setupMouseEnter(),this._setType(),this._isStandaloneItem()&&(this._tabindex=0)}ngOnDestroy(){this._cleanupMouseEnter?.(),this.destroyed.next(),this.destroyed.complete()}focus(){this._elementRef.nativeElement.focus()}trigger(e){let{keepOpen:n}=$e({},e);!this.disabled&&!this.hasMenu&&(this.triggered.next(),n||this._menuStack.closeAll({focusParentTrigger:!0}))}isMenuOpen(){return!!this._menuTrigger?.isOpen()}getMenu(){return this._menuTrigger?.getMenu()}getMenuTrigger(){return this._menuTrigger}getLabel(){return this.typeaheadLabel||this._elementRef.nativeElement.textContent?.trim()||""}_resetTabIndex(){this._isStandaloneItem()||(this._tabindex=-1)}_setTabIndex(e){this.disabled||(!e||!this._menuStack.isEmpty())&&(this._tabindex=0)}_handleClick(e){this.disabled?(e.preventDefault(),e.stopPropagation()):this.trigger()}_onKeydown(e){switch(e.keyCode){case 32:case 13:if(!bn(e)&&!KW(this._elementRef,e)){let n=this._elementRef.nativeElement.nodeName;n!=="A"&&n!=="BUTTON"&&e.preventDefault(),this.trigger({keepOpen:e.keyCode===32&&!this.closeOnSpacebarTrigger})}break;case 39:bn(e)||this._parentMenu&&this._isParentVertical()&&(this._dir?.value!=="rtl"?this._forwardArrowPressed(e):this._backArrowPressed(e));break;case 37:bn(e)||this._parentMenu&&this._isParentVertical()&&(this._dir?.value!=="rtl"?this._backArrowPressed(e):this._forwardArrowPressed(e));break}}_isStandaloneItem(){return!this._parentMenu}_backArrowPressed(e){let n=this._parentMenu;(this._menuStack.hasInlineMenu()||this._menuStack.length()>1)&&(e.preventDefault(),this._menuStack.close(n,{focusNextOnEmpty:this._menuStack.inlineMenuOrientation()==="horizontal"?Eh.previousItem:Eh.currentItem,focusParentTrigger:!0}))}_forwardArrowPressed(e){!this.hasMenu&&this._menuStack.inlineMenuOrientation()==="horizontal"&&(e.preventDefault(),this._menuStack.closeAll({focusNextOnEmpty:Eh.nextItem,focusParentTrigger:!0}))}_setupMouseEnter(){if(!this._isStandaloneItem()){let e=()=>this._ngZone.run(()=>this._menuStack.closeSubMenuOf(this._parentMenu));this._cleanupMouseEnter=this._ngZone.runOutsideAngular(()=>this._renderer.listen(this._elementRef.nativeElement,"mouseenter",()=>{this._inputModalityDetector.mostRecentModality!=="touch"&&!this._menuStack.isEmpty()&&!this.hasMenu&&(this._menuAim?this._menuAim.toggle(e):e())}))}}_isParentVertical(){return this._parentMenu?.orientation==="vertical"}_setType(){let e=this._elementRef.nativeElement;e.nodeName==="BUTTON"&&!e.getAttribute("type")&&e.setAttribute("type","button")}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,selectors:[["","cdkMenuItem",""]],hostAttrs:["role","menuitem",1,"cdk-menu-item"],hostVars:4,hostBindings:function(n,r){n&1&&he("blur",function(){return r._resetTabIndex()})("focus",function(){return r._setTabIndex()})("click",function(a){return r._handleClick(a)})("keydown",function(a){return r._onKeydown(a)}),n&2&&(sn("tabIndex",r._tabindex),ni("aria-disabled",r.disabled||null),yt("cdk-menu-item-disabled",r.disabled))},inputs:{disabled:[2,"cdkMenuItemDisabled","disabled",kt],typeaheadLabel:[0,"cdkMenuitemTypeaheadLabel","typeaheadLabel"]},outputs:{triggered:"cdkMenuItemTriggered"},exportAs:["cdkMenuItem"]})}return i})(),Qk=class{_renderer;_items;_eventCleanups;_itemsSubscription;entered=new Bt;exited=new Bt;activeElement;previousElement;constructor(t,e){this._renderer=t,this._items=e,this._bindEvents(),this.entered.subscribe(n=>this.activeElement=n),this.exited.subscribe(()=>{this.previousElement=this.activeElement,this.activeElement=void 0})}destroy(){this._cleanupEvents(),this._itemsSubscription?.unsubscribe()}_bindEvents(){this._itemsSubscription=this._items.changes.pipe(Tr(this._items)).subscribe(()=>{this._cleanupEvents(),this._eventCleanups=[],this._items.forEach(t=>{let e=t._elementRef.nativeElement;this._eventCleanups.push(this._renderer.listen(e,"mouseenter",()=>{this.entered.next(t)}),this._renderer.listen(e,"mouseout",()=>{this.exited.next(t)}))})})}_cleanupEvents(){this._eventCleanups?.forEach(t=>t()),this._eventCleanups=void 0}},MCe=(()=>{class i extends jW{_focusMonitor=R(go);ngZone=R(ti);_renderer=R(cn);nativeElement=R(Ft).nativeElement;menuStack=R(Ud);menuAim=R(Gk,{optional:!0,self:!0});dir=R(tr,{optional:!0});_allItems;id=R(hn).getId("cdk-menu-");items=new Xc;orientation="vertical";isInline=!1;keyManager;destroyed=new Bt;triggerItem;pointerTracker;_menuStackHasFocus=Gi(!1);_tabIndexSignal=Ir(()=>{let e=this._menuStackHasFocus()?-1:0;return this.isInline?e:null});ngAfterContentInit(){this.isInline||this.menuStack.push(this),this._setItems(),this._setKeyManager(),this._handleFocus(),this._subscribeToMenuStackHasFocus(),this._subscribeToMenuOpen(),this._subscribeToMenuStackClosed(),this._setUpPointerTracker()}ngOnDestroy(){this._focusMonitor.stopMonitoring(this.nativeElement),this.keyManager?.destroy(),this.destroyed.next(),this.destroyed.complete(),this.pointerTracker?.destroy()}focusFirstItem(e="program"){this.keyManager.setFocusOrigin(e),this.keyManager.setFirstItemActive()}focusLastItem(e="program"){this.keyManager.setFocusOrigin(e),this.keyManager.setLastItemActive()}setActiveMenuItem(e){this.keyManager?.setActiveItem(e)}_getTabIndex(){return this._tabIndexSignal()}closeOpenMenu(e,n){let{focusParentTrigger:r}=$e({},n),o=this.keyManager,a=this.triggerItem;e===a?.getMenuTrigger()?.getMenu()&&(a?.getMenuTrigger()?.close(),r&&(a?o.setActiveItem(a):o.setFirstItemActive()))}_setItems(){this._allItems.changes.pipe(Tr(this._allItems),ln(this.destroyed)).subscribe(e=>{this.items.reset(e.filter(n=>n._parentMenu===this)),this.items.notifyOnChanges()})}_setKeyManager(){this.keyManager=new cd(this.items).withWrap().withTypeAhead().withHomeAndEnd().skipPredicate(()=>!1),this.orientation==="horizontal"?this.keyManager.withHorizontalOrientation(this.dir?.value||"ltr"):this.keyManager.withVerticalOrientation()}_subscribeToMenuOpen(){let e=wr(this.items.changes,this.destroyed);this.items.changes.pipe(Tr(this.items),nf(n=>n.filter(r=>r.hasMenu).map(r=>r.getMenuTrigger().opened.pipe(Y4(r),ln(e)))),G4(),Do(n=>(this.triggerItem=n,n.getMenuTrigger().closed)),ln(this.destroyed)).subscribe(()=>this.triggerItem=void 0)}_subscribeToMenuStackClosed(){this.menuStack.closed.pipe(ln(this.destroyed)).subscribe(({item:e,focusParentTrigger:n})=>this.closeOpenMenu(e,{focusParentTrigger:n}))}_subscribeToMenuStackHasFocus(){this.isInline&&this.menuStack.hasFocus.pipe(ln(this.destroyed)).subscribe(e=>{this._menuStackHasFocus.set(e)})}_setUpPointerTracker(){this.menuAim&&(this.ngZone.runOutsideAngular(()=>{this.pointerTracker=new Qk(this._renderer,this.items)}),this.menuAim.initialize(this,this.pointerTracker))}_handleFocus(){this._focusMonitor.monitor(this.nativeElement,!1).pipe(ln(this.destroyed)).subscribe(e=>{e!==null&&e!=="mouse"&&this.focusFirstItem(e)})}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Fr(i)))(r||i)}})();static \u0275dir=wt({type:i,contentQueries:function(n,r,o){if(n&1&&_n(o,CCe,5),n&2){let a;mt(a=pt())&&(r._allItems=a)}},hostAttrs:["role","menu"],hostVars:4,hostBindings:function(n,r){n&1&&he("focusin",function(){return r.menuStack.setHasFocus(!0)})("focusout",function(){return r.menuStack.setHasFocus(!1)}),n&2&&(sn("tabIndex",r._getTabIndex())("id",r.id),ni("aria-orientation",r.orientation)("data-cdk-menu-stack-id",r.menuStack.id))},inputs:{id:"id"},features:[nn]})}return i})(),YW=(()=>{class i extends MCe{_parentTrigger=R(ZM,{optional:!0});closed=new Pt;orientation="vertical";isInline=!this._parentTrigger;constructor(){super(),this.destroyed.subscribe(this.closed),this._parentTrigger?.registerChildMenu(this)}ngAfterContentInit(){super.ngAfterContentInit(),this._subscribeToMenuStackEmptied()}ngOnDestroy(){super.ngOnDestroy(),this.closed.complete()}_handleKeyEvent(e){let n=this.keyManager;switch(e.keyCode){case 37:case 39:bn(e)||(e.preventDefault(),n.setFocusOrigin("keyboard"),n.onKeydown(e));break;case 27:bn(e)||(e.preventDefault(),this.menuStack.close(this,{focusNextOnEmpty:Eh.currentItem,focusParentTrigger:!0}));break;case 9:bn(e,"altKey","metaKey","ctrlKey")||this.menuStack.closeAll({focusParentTrigger:!0});break;default:n.onKeydown(e)}}_toggleMenuFocus(e){let n=this.keyManager;switch(e){case Eh.nextItem:n.setFocusOrigin("keyboard"),n.setNextItemActive();break;case Eh.previousItem:n.setFocusOrigin("keyboard"),n.setPreviousItemActive();break;case Eh.currentItem:n.activeItem&&(n.setFocusOrigin("keyboard"),n.setActiveItem(n.activeItem));break}}_subscribeToMenuStackEmptied(){this.menuStack.emptied.pipe(ln(this.destroyed)).subscribe(e=>this._toggleMenuFocus(e))}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,selectors:[["","cdkMenu",""]],hostAttrs:["role","menu",1,"cdk-menu"],hostVars:2,hostBindings:function(n,r){n&1&&he("keydown",function(a){return r._handleKeyEvent(a)}),n&2&&yt("cdk-menu-inline",r.isInline)},outputs:{closed:"closed"},exportAs:["cdkMenu"],features:[Si([{provide:jW,useExisting:i},{provide:zk,useExisting:i},yCe("vertical")]),nn]})}return i})();var SCe=Gy.map(i=>{let t=i.overlayX==="start"?2:-2,e=i.overlayY==="top"?2:-2;return ei($e({},i),{offsetX:t,offsetY:e})}),ZW=(()=>{class i extends XW{_injector=R(_i);_directionality=R(tr,{optional:!0});_menuTracker=R($W);_changeDetectorRef=R(Li);disabled=!1;constructor(){super(),this._setMenuStackCloseListener()}open(e){this._open(null,e),this._changeDetectorRef.markForCheck()}close(){this.menuStack.closeAll()}_openOnContextMenu(e){this.disabled||(e.preventDefault(),e.stopPropagation(),this._menuTracker.update(this),this._open(e,{x:e.clientX,y:e.clientY}),e.button===2?this.childMenu?.focusFirstItem("mouse"):e.button===0?this.childMenu?.focusFirstItem("keyboard"):this.childMenu?.focusFirstItem("program"))}_getOverlayConfig(e){return new Ss({positionStrategy:this._getOverlayPositionStrategy(e),scrollStrategy:this.menuScrollStrategy(),direction:this._directionality||void 0})}_getOverlayPositionStrategy(e){return Xl(this._injector,e).withLockedPosition().withGrowAfterOpen().withPositions(this.menuPosition??SCe)}_setMenuStackCloseListener(){this.menuStack.closed.pipe(ln(this.destroyed)).subscribe(({item:e})=>{e===this.childMenu&&this.isOpen()&&(this.closed.next(),this.overlayRef.detach(),this.childMenu=void 0,this._changeDetectorRef.markForCheck())})}_subscribeToOutsideClicks(e){if(this.overlayRef){let n=this.overlayRef.outsidePointerEvents();if(e){let[r,o]=j4(n,({type:a})=>a==="auxclick");n=wr(o.pipe(BE((a,s)=>e.ctrlKey&&s===0&&a.ctrlKey)),r.pipe(ys(1)))}n.pipe(ln(this.stopOutsideClicksListener)).subscribe(r=>{this.isElementInsideMenuStack(Ao(r))||this.menuStack.closeAll()})}}_open(e,n){this.disabled||(this.isOpen()?(this.menuStack.closeSubMenuOf(this.childMenu),this.overlayRef.getConfig().positionStrategy.setOrigin(n),this.overlayRef.updatePosition()):(this.opened.next(),this.overlayRef?(this.overlayRef.getConfig().positionStrategy.setOrigin(n),this.overlayRef.updatePosition()):this.overlayRef=Es(this._injector,this._getOverlayConfig(n)),this.overlayRef.attach(this.getMenuContentPortal()),this._subscribeToOutsideClicks(e)))}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,selectors:[["","cdkContextMenuTriggerFor",""]],hostVars:1,hostBindings:function(n,r){n&1&&he("contextmenu",function(a){return r._openOnContextMenu(a)}),n&2&&ni("data-cdk-menu-stack-id",null)},inputs:{menuTemplateRef:[0,"cdkContextMenuTriggerFor","menuTemplateRef"],menuPosition:[0,"cdkContextMenuPosition","menuPosition"],menuData:[0,"cdkContextMenuTriggerData","menuData"],disabled:[2,"cdkContextMenuDisabled","disabled",kt]},outputs:{opened:"cdkContextMenuOpened",closed:"cdkContextMenuClosed"},exportAs:["cdkContextMenuTriggerFor"],features:[Si([{provide:ZM,useExisting:i},{provide:Ud,useClass:qk}]),nn]})}return i})();var Gb=i=>Re(kr,t=>ECe(i,t)),ECe=(i,t)=>{let e=t.filter(n=>n.type===i);return e.sort((n,r)=>n.path.localeCompare(r.path)),e};var mg=i=>(i=i.trim(),i.startsWith("*")||i.endsWith("*")||i.startsWith("/")||i.startsWith("./")?i:!i.startsWith('"')&&!i.endsWith('"')?i.startsWith("!")?i:`*${i}*`:i);var JM=(i,t)=>{let e=[],n=t.split(",");if(n[0].startsWith("!")){n[0]=n[0].slice(1);for(let r of n)r.length>0&&e.push({path:`!${mg(r)}`,type:i})}else for(let r of n)if(r.length>0){if(r.startsWith("!"))break;r=mg(r),e.push({path:r,type:i})}return e};var JW="BlacklistExtensionAction",Wk=(i,...t)=>({type:JW,action:{type:i},extensions:t}),ej=(()=>{class i{constructor(e,n){this.actions$=e,this.store=n,this.searchPattern2BlacklistItems$=this.actions$.pipe(qr(JW),Et(r=>({blackListType:r.action.type,extensionToBlacklist:JM(r.action.type,r.extensions.join(","))})),cu()),this.blackListExtensions$=Pi(()=>this.searchPattern2BlacklistItems$.pipe(Yt(r=>r.blackListType==="flatten"||r.blackListType==="exclude"),Oi(r=>{this.store.dispatch(yc({items:r.extensionToBlacklist}))})),{dispatch:!1})}static{this.\u0275fac=function(n){return new(n||i)(Me(Jr),Me(Ie))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var tj=Re(lp,i=>i.selectedBuildingId);var eo=Re(tj,wl,(i,t)=>t?.get(i));var eS=Re(br,Or,(i,t)=>BA.getMetricDistribution(i.unifiedMapNode,t));var tS=Re(Ch,eo,Or,eS,(i,t,e,n)=>{let r=i||t;return!r||r.type===Zn.FILE?n:BA.getMetricDistribution(r,e)});function TCe(i){return`*.${i}`}function BCe(i,t){return i===om?t.others.filter(e=>e.fileExtension!==cs).map(e=>e.fileExtension):[i]}function iS(i,t,e){return BCe(i,t).map(r=>{let o=TCe(r);return e?.type===Zn.FOLDER?`${e.path}/**/${o}`:o})}var ij=(()=>{class i{constructor(e){this.store=e,this.operationContext$=Yo([this.store.select(tS),this.store.select(Ch),this.store.select(eo),this.store.select(Gb("flatten"))]).pipe(Et(([n,r,o,a])=>({distribution:n,node:r||o,flattenedItems:a})))}show(e){this.operationContext$.pipe(kn(1)).subscribe(n=>{let r=iS(e,n.distribution,n.node),o=this.createFlattenedItemsMap(n.flattenedItems),a=r.map(s=>o.get(s));this.store.dispatch(tM({items:a}))})}exclude(e){this.operationContext$.pipe(kn(1)).subscribe(n=>{let r=iS(e,n.distribution,n.node);this.store.dispatch(Wk("exclude",...r))})}flatten(e){this.operationContext$.pipe(kn(1)).subscribe(n=>{let r=iS(e,n.distribution,n.node);this.store.dispatch(Wk("flatten",...r))})}getIsFlattenedByFileExtension(e){return this.operationContext$.pipe(Et(n=>iS(e,n.distribution,n.node).every(o=>n.flattenedItems.some(a=>a.path===o))))}createFlattenedItemsMap(e){let n=new Map;for(let r of e)n.set(r.path,r);return n}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var nj=(()=>{class i{constructor(e,n){this.threeSceneService=e,this.store=n,this.metricDistribution$=this.store.select(eS),this.fileExtensionsOfOthers=new Set,this.fileExtensionsOfNone=new Set,this.metricDistribution$.pipe(J4(),Yt(r=>!!r)).subscribe(r=>{this.fileExtensionsOfOthers.clear();for(let o of r.others)this.fileExtensionsOfOthers.add(o.fileExtension);this.fileExtensionsOfNone.clear();for(let o of r.none)this.fileExtensionsOfNone.add(o.fileExtension)})}highlightExtension(e){switch(e){case om:this.threeSceneService.highlightBuildingsByExtension(this.fileExtensionsOfOthers);break;case cs:this.threeSceneService.highlightBuildingsWithoutExtensions();break;default:this.threeSceneService.highlightBuildingsByExtension(new Set([e]));break}}clearHighlightingOnFileExtensions(){this.threeSceneService.applyClearHightlights()}static{this.\u0275fac=function(n){return new(n||i)(Me(vr),Me(Ie))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function DCe(i,t){if(i&1){let e=st();S(0,"button",8),he("click",function(){Ve(e);let r=me(3);return Qe(r.show(r.fileExtension()))}),J(1,"i",9),S(2,"span"),j(3,"Show"),F()()}}function kCe(i,t){if(i&1){let e=st();S(0,"button",10),he("click",function(){Ve(e);let r=me(3);return Qe(r.flatten(r.fileExtension()))}),J(1,"img",11),S(2,"span"),j(3,"Flatten"),F()()}i&2&&(E(),z("width",17)("height",17))}function PCe(i,t){if(i&1){let e=st();S(0,"mat-card",3),ke(1,DCe,4,0,"button",4)(2,kCe,4,2,"button",5),S(3,"button",6),he("click",function(){Ve(e);let r=me(2);return Qe(r.exclude(r.fileExtension()))}),J(4,"i",7),S(5,"span"),j(6,"Exclude"),F()()()}if(i&2){let e=me(2);E(),Pe(e.isFlattened()?1:2)}}function RCe(i,t){if(i&1&&ke(0,PCe,7,1,"mat-card",3),i&2){let e=me();Pe(e.hasFileExtension()?0:-1)}}var rj=(()=>{class i{constructor(e,n){this.blackListExtensionService=e,this.highlightBuildingsByFileExtensionService=n,this.item=c0.required(),this.showAbsoluteValues=c0.required(),this.toggleShowAbsoluteValues=IO(),this.isFlattened=Gi(!1),this.fileExtension=Ir(()=>this.item().fileExtension),this.hasFileExtension=Ir(()=>this.fileExtension()!=="None"),this.formattedTitle=Ir(()=>this.formatTitle(this.showAbsoluteValues(),this.item(),this.fileExtension()))}ngOnInit(){this.flattenSubscription=this.blackListExtensionService.getIsFlattenedByFileExtension(this.fileExtension()).subscribe(e=>this.isFlattened.set(e))}ngOnDestroy(){this.flattenSubscription?.unsubscribe()}flatten(e){this.blackListExtensionService.flatten(e)}exclude(e){this.blackListExtensionService.exclude(e)}show(e){this.blackListExtensionService.show(e)}onHoverFileExtensionBar(e){this.highlightBuildingsByFileExtensionService.highlightExtension(e)}onUnhoverFileExtensionBar(){this.highlightBuildingsByFileExtensionService.clearHighlightingOnFileExtensions()}formatTitle(e,n,r){return e&&n.absoluteMetricValue||!e&&n.relativeMetricValue?e?`${r} ${n.absoluteMetricValue.toLocaleString()}`:`${r} ${n.relativeMetricValue.toFixed(2)}%`:"No data available"}get backgroundColor(){return this.item().color}get flexGrow(){return this.item().relativeMetricValue}get flexBasis(){return"0"}static{this.\u0275fac=function(n){return new(n||i)(se(ij),se(nj))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-file-extension-bar-segment"]],hostVars:6,hostBindings:function(n,r){n&2&&pi("background-color",r.backgroundColor)("flex-grow",r.flexGrow)("flex-basis",r.flexBasis)},inputs:{item:[1,"item"],showAbsoluteValues:[1,"showAbsoluteValues"]},outputs:{toggleShowAbsoluteValues:"toggleShowAbsoluteValues"},decls:5,vars:3,consts:[["contextMenu",""],[1,"cc-bar-section",3,"click","cdkContextMenuTriggerFor"],["data-test-id","formattedTitle",1,"cc-bar-section-text",3,"mouseover","mouseleave","title"],["cdkMenu",""],["mat-menu-item","","data-test-id","showBuilding"],["mat-menu-item","","data-test-id","flattenBuilding"],["mat-menu-item","","data-test-id","excludeBuilding",3,"click"],[1,"fa","fa-ban","menu-icon"],["mat-menu-item","","data-test-id","showBuilding",3,"click"],[1,"fa","fa-eye","menu-icon"],["mat-menu-item","","data-test-id","flattenBuilding",3,"click"],["alt","flattenIcon","ngSrc","codeCharta/assets/flatten.png",1,"png-icon","menu-icon",3,"width","height"]],template:function(n,r){if(n&1){let o=st();S(0,"span",1),he("click",function(){return Ve(o),Qe(r.toggleShowAbsoluteValues.emit())}),S(1,"div",2),he("mouseover",function(){return Ve(o),Qe(r.onHoverFileExtensionBar(r.fileExtension()))})("mouseleave",function(){return Ve(o),Qe(r.onUnhoverFileExtensionBar())}),j(2),F()(),Sn(3,RCe,1,1,"ng-template",null,0,il)}if(n&2){let o=Pn(4);z("cdkContextMenuTriggerFor",o),E(),z("title",r.formattedTitle()),E(),ct(" ",r.formattedTitle()," ")}},dependencies:[ZW,_c,YW,Am,gL],styles:["[_nghost-%COMP%]{min-width:max-content;cursor:pointer;color:#fff;text-align:center;overflow:hidden}.cc-bar-section[_ngcontent-%COMP%] .cc-bar-section-text[_ngcontent-%COMP%]{font-size:10px;margin:2px 0;white-space:nowrap;padding:0 10px}"]})}}return i})();var oj=(()=>{class i{constructor(e){this.store=e,this.hoveredNodeMetricDistribution$=this.store.select(tS)}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var LCe=(i,t)=>t.fileExtension;function NCe(i,t){if(i&1){let e=st();S(0,"cc-file-extension-bar-segment",4),he("toggleShowAbsoluteValues",function(){Ve(e);let r=me();return Qe(r.toggleShowAbsoluteValues())}),F()}if(i&2){let e=t.$implicit,n=me();z("item",e)("showAbsoluteValues",n.showAbsoluteValues)}}var aj=(()=>{class i{constructor(e){this.metricDistributionService=e,this.showAbsoluteValues=!1}ngOnInit(){this.metricDistributionService.hoveredNodeMetricDistribution$.subscribe(e=>{this.metricDistribution=e})}toggleShowAbsoluteValues(){this.showAbsoluteValues=!this.showAbsoluteValues}static{this.\u0275fac=function(n){return new(n||i)(se(oj))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-file-extension-bar"]],decls:5,vars:0,consts:[[1,"cc-distribution"],["title","Distribution metric"],[1,"cc-bar"],[3,"item","showAbsoluteValues"],[3,"toggleShowAbsoluteValues","item","showAbsoluteValues"]],template:function(n,r){n&1&&(S(0,"div",0),J(1,"cc-distribution-metric",1),S(2,"div",2),xi(3,NCe,1,2,"cc-file-extension-bar-segment",3,LCe),F()()),n&2&&(E(3),wi(r.metricDistribution.visible))},dependencies:[WW,rj],styles:[".cc-distribution[_ngcontent-%COMP%]{display:flex;height:17px;width:100%}.cc-distribution[_ngcontent-%COMP%] .cc-bar[_ngcontent-%COMP%]{display:flex;gap:1px;width:100%}"]})}}return i})();var nS=Re(hi,i=>i.isSearchPanelPinned);var UCe=["*"],pg=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=re({type:i,selectors:[["cc-ribbon-bar-panel-settings"]],ngContentSelectors:UCe,decls:1,vars:0,template:function(n,r){n&1&&(ki(),Gt(0))},styles:["[_nghost-%COMP%]{z-index:1;display:flex;flex-direction:column;padding:6px;position:absolute;left:6px;top:45px;background:#fff;border:1px solid #b5b5b5;box-shadow:0 1px 3px #0003,0 1px 1px #00000024,0 2px 1px -1px #0000001f}"]})}}return i})();var HCe=["toggle"],VCe=["toggleHeader"],QCe=[[["cc-ribbon-bar-panel-settings"]],[["",8,"toggleheader"]],"*"],zCe=["cc-ribbon-bar-panel-settings",".toggleHeader","*"];function qCe(i,t){if(i&1){let e=st();S(0,"div",6,0),he("click",function(){Ve(e);let r=me();return Qe(r.toggleSettings())}),Gt(2,1),F()}}function GCe(i,t){i&1&&(S(0,"div",4),Gt(1,2),F())}function WCe(i,t){if(i&1&&J(0,"i"),i&2){let e=me(2);Xi("fa fa-angle-"+(e.isExpanded?"up":"down"))}}function jCe(i,t){if(i&1){let e=st();S(0,"div",7,1),he("click",function(){Ve(e);let r=me();return Qe(r.toggleSettings())}),j(2),ke(3,WCe,1,2,"i",8),F()}if(i&2){let e=me();E(2),ct(" ",e.title," "),E(),Pe(e.hasSettings?3:-1)}}var Wb=(()=>{class i{get hasSettings(){return!!this.settingsRef}constructor(e){this.viewReference=e,this.collapseOnPanelClick=!0,this.separator=!1,this.isExpanded=!1,this.isHeaderExpandable=!1,this.isPinned=!1,this.toggleSettingsChange=new Pt}ngOnInit(){this.mouseDownListener=e=>this.collapseOnOutsideClick(e),document.addEventListener("mousedown",this.mouseDownListener)}ngOnDestroy(){this.mouseDownListener&&document.removeEventListener("mousedown",this.mouseDownListener)}toggleSettings(){this.isExpanded=!this.isExpanded,this.toggleSettingsChange.emit(this.isExpanded)}collapseOnOutsideClick(e){if(this.isPinned)return;let n=e.target,r=document.querySelector(".cdk-overlay-container"),o=this.viewReference.element.nativeElement.contains(n),a=r?r.contains(n):!1,s=this.settingsRef?.nativeElement?.contains(n)??!1,l=this.toggleSettingsRef.nativeElement.contains(n),c=this.toggleHeaderRef?.nativeElement.contains(n)??!1;!a&&!s&&!l&&!c&&(!o||this.collapseOnPanelClick)&&(this.isExpanded=!1)}static{this.\u0275fac=function(n){return new(n||i)(se(Hr))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-ribbon-bar-panel"]],contentQueries:function(n,r,o){if(n&1&&_n(o,pg,5,Ft),n&2){let a;mt(a=pt())&&(r.settingsRef=a.first)}},viewQuery:function(n,r){if(n&1&&(Nt(HCe,5),Nt(VCe,5)),n&2){let o;mt(o=pt())&&(r.toggleSettingsRef=o.first),mt(o=pt())&&(r.toggleHeaderRef=o.first)}},hostVars:6,hostBindings:function(n,r){n&2&&yt("separator",r.separator)("expanded",r.isExpanded)("expandable",r.hasSettings)},inputs:{title:"title",collapseOnPanelClick:"collapseOnPanelClick",separator:"separator",isHeaderExpandable:"isHeaderExpandable",isPinned:"isPinned"},outputs:{toggleSettingsChange:"toggleSettingsChange"},ngContentSelectors:zCe,decls:6,vars:2,consts:[["toggleHeader",""],["toggle",""],["appearance","outlined"],[1,"section"],[1,"section-header"],[1,"section-title"],[1,"section-header",3,"click"],[1,"section-title",3,"click"],[3,"class"]],template:function(n,r){n&1&&(ki(QCe),S(0,"mat-card",2)(1,"div",3),ke(2,qCe,3,0,"div",4)(3,GCe,2,0,"div",4),ke(4,jCe,4,2,"div",5),F(),Gt(5),F()),n&2&&(E(2),Pe(r.isHeaderExpandable?2:3),E(2),Pe(r.title||r.hasSettings?4:-1))},dependencies:[_c],styles:["mat-card[_ngcontent-%COMP%]{padding:0;height:46px;border-radius:0;border-top:1px solid #cdcdcd;flex:1 1 0}[_nghost-%COMP%]:not(.expanded) mat-card[_ngcontent-%COMP%]{overflow:hidden}.section[_ngcontent-%COMP%] .section-header[_ngcontent-%COMP%]{margin:0 5px;height:31px;color:#444;overflow:hidden;padding:5px}.section[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{font-size:8pt;color:gray;text-align:center;transition:background-color .4s;border-bottom:1px solid transparent;white-space:nowrap;margin:0 5px}.separator[_nghost-%COMP%] .section[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]{border-top:1px solid rgba(0,0,0,.12)}.expandable[_nghost-%COMP%] .section[_ngcontent-%COMP%] .section-title[_ngcontent-%COMP%]:hover{background-color:#e0e0e0;cursor:pointer}"]})}}return i})();var $Ce=i=>i===""||i==="!"||i===",",Ag=Re(Ls,$Ce);var rS=(i,t,e)=>{let n=e.trim().split(",");if(e.trim().startsWith("!")){n[0]=n[0].slice(1);for(let r of n){let o=`!${mg(r)}`;if(i.some(a=>o===a.path&&t===a.type))return!0}return!1}for(let r of n)if(i.some(o=>mg(r)===o.path&&t===o.type))return!0;return!1};var sj=Re(Ls,Ag,kr,(i,t,e)=>t?!0:rS(e,"flatten",i));var lj=Re(Ls,Ag,kr,(i,t,e)=>t?!0:rS(e,"exclude",i));var cj=(i,t,e)=>{let n=[...t,...e];for(let{file:r}of i)if(!XCe(r,n))return!1;return!0},XCe=(i,t)=>{for(let e of Ni(i.map))if(KCe(e,t))return!1;return!0},KCe=(i,t)=>Yi(i)&&i.data.path&&!ga(i.data.path,t,"exclude");var oS=(()=>{class i{constructor(e,n,r){this.actions$=e,this.store=n,this.dialog=r,this.doBlacklistItemsResultInEmptyMap$=this.actions$.pipe(qr(ig),hr(this.store.select(ir),this.store.select(kr)),Et(([o,a,s])=>({items:o.items,resultsInEmptyMap:cj(a,s,o.items)})),cu()),this.showErrorDialogIfBlacklistItemsResultInEmptyMap$=Pi(()=>this.doBlacklistItemsResultInEmptyMap$.pipe(Yt(o=>o.resultsInEmptyMap),Oi(()=>{this.dialog.open(es,{data:{title:"Blacklist Error",message:"Excluding all buildings is not possible."}})})),{dispatch:!1}),this.addBlacklistItems$=Pi(()=>this.doBlacklistItemsResultInEmptyMap$.pipe(Yt(o=>!o.resultsInEmptyMap),Et(o=>yc({items:o.items}))))}static{this.\u0275fac=function(n){return new(n||i)(Me(Jr),Me(Ie),Me(fn))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var dj=i=>({type:"BlacklistSearchPatternAction",action:{type:i}}),uj=(()=>{class i{constructor(e,n,r){this.actions$=e,this.store=n,this.addBlacklistItemsIfNotResultsInEmptyMapEffect=r,this.searchPattern2BlacklistItems$=this.actions$.pipe(qr("BlacklistSearchPatternAction"),hr(this.store.select(Ls)),Et(([o,a])=>({type:o.action.type,blacklistItems:JM(o.action.type,a)})),cu()),this.flattenSearchPattern$=Pi(()=>this.searchPattern2BlacklistItems$.pipe(Yt(o=>o.type==="flatten"),Oi(o=>{this.store.dispatch(yc({items:o.blacklistItems})),this.store.dispatch(ja({value:""}))})),{dispatch:!1}),this.excludeSearchPattern$=Pi(()=>this.searchPattern2BlacklistItems$.pipe(Yt(o=>o.type==="exclude"),Oi(()=>{this.addBlacklistItemsIfNotResultsInEmptyMapEffect.doBlacklistItemsResultInEmptyMap$.pipe(kn(1),Yt(o=>!o.resultsInEmptyMap),Oi(()=>{this.store.dispatch(ja({value:""}))})).subscribe()}),Et(o=>ig({items:o.blacklistItems}))))}static{this.\u0275fac=function(n){return new(n||i)(Me(Jr),Me(Ie),Me(oS))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var gg=(()=>{class i{get vertical(){return this._vertical}set vertical(e){this._vertical=_o(e)}_vertical=!1;get inset(){return this._inset}set inset(e){this._inset=_o(e)}_inset=!1;static \u0275fac=function(n){return new(n||i)};static \u0275cmp=re({type:i,selectors:[["mat-divider"]],hostAttrs:["role","separator",1,"mat-divider"],hostVars:7,hostBindings:function(n,r){n&2&&(ni("aria-orientation",r.vertical?"vertical":"horizontal"),yt("mat-divider-vertical",r.vertical)("mat-divider-horizontal",!r.vertical)("mat-divider-inset",r.inset))},inputs:{vertical:"vertical",inset:"inset"},decls:0,vars:0,template:function(n,r){},styles:[`.mat-divider{display:block;margin:0;border-top-style:solid;border-top-color:var(--mat-divider-color, var(--mat-sys-outline-variant));border-top-width:var(--mat-divider-width, 1px)}.mat-divider.mat-divider-vertical{border-top:0;border-right-style:solid;border-right-color:var(--mat-divider-color, var(--mat-sys-outline-variant));border-right-width:var(--mat-divider-width, 1px)}.mat-divider.mat-divider-inset{margin-left:80px}[dir=rtl] .mat-divider.mat-divider-inset{margin-left:auto;margin-right:80px}
|
|
5185
5185
|
`],encapsulation:2,changeDetection:0})}return i})();function ZCe(i,t){if(i&1){let e=st();S(0,"button",12),he("click",function(){Ve(e);let r=me();return Qe(r.resetSearchPattern())}),J(1,"i",13),F()}}var hj=(()=>{class i{constructor(e){this.store=e,this.searchPattern$=this.store.select(Ls),this.isSearchPatternEmpty$=this.store.select(Ag),this.isFlattenPatternDisabled$=this.store.select(sj),this.isExcludePatternDisabled$=this.store.select(lj),this.setSearchPatternDebounced=Eo(n=>this.setSearchPattern(n),400)}setSearchPattern(e){let n=e.target;this.store.dispatch(ja({value:n.value}))}resetSearchPattern(){this.store.dispatch(ja({value:""}))}blacklistSearchPattern(e){this.store.dispatch(dj(e))}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-search-bar"]],decls:21,vars:13,consts:[["menu","matMenu"],[1,"fa","fa-search","cc-search-icon"],[1,"cc-search-input"],["type","text","placeholder","Search: *.js, **/app/*",3,"input","value"],["data-testid","search-bar-clear-button",1,"cc-small-action-button","cc-clear-icon"],["title","Add to Blacklist",1,"cc-small-action-button",3,"matMenuTriggerFor"],[1,"fa","fa-ellipsis-h"],["mat-menu-item","","disabled",""],["mat-menu-item","","data-testid","search-bar-flatten-button",3,"click","disabled"],[1,"fa","fa-eye-slash"],["mat-menu-item","","data-testid","search-bar-exclude-button",3,"click","disabled"],[1,"fa","fa-ban"],["data-testid","search-bar-clear-button",1,"cc-small-action-button","cc-clear-icon",3,"click"],[1,"fa","fa-times"]],template:function(n,r){if(n&1){let o=st();J(0,"i",1),S(1,"div",2)(2,"input",3),fe(3,"async"),he("input",function(s){return Ve(o),Qe(r.setSearchPatternDebounced(s))}),F(),ke(4,ZCe,2,0,"button",4),fe(5,"async"),F(),S(6,"button",5),J(7,"i",6),F(),S(8,"mat-menu",null,0)(10,"button",7),j(11,"Add Pattern to Blacklist"),F(),J(12,"mat-divider"),S(13,"button",8),fe(14,"async"),he("click",function(){return Ve(o),Qe(r.blacklistSearchPattern("flatten"))}),J(15,"i",9),j(16," Flatten "),F(),S(17,"button",10),fe(18,"async"),he("click",function(){return Ve(o),Qe(r.blacklistSearchPattern("exclude"))}),J(19,"i",11),j(20," Exclude "),F()()}if(n&2){let o=Pn(9);E(2),z("value",_e(3,5,r.searchPattern$)),E(2),Pe(_e(5,7,r.isSearchPatternEmpty$)?-1:4),E(2),z("matMenuTriggerFor",o),E(7),z("disabled",_e(14,9,r.isFlattenPatternDisabled$)),E(4),z("disabled",_e(18,11,r.isExcludePatternDisabled$))}},dependencies:[bc,za,Am,gg,dt],styles:["[_nghost-%COMP%]{display:inline-block;text-wrap:nowrap}[_nghost-%COMP%] .cc-search-icon[_ngcontent-%COMP%]{margin-right:8px;min-width:16px}[_nghost-%COMP%] .cc-search-input[_ngcontent-%COMP%]{display:inline-block;position:relative}[_nghost-%COMP%] .cc-search-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]{width:204px;border-width:0 0 1px;border-color:#d3d3d3;outline:0;font-size:11pt;height:24px}[_nghost-%COMP%] .cc-search-input[_ngcontent-%COMP%] input[_ngcontent-%COMP%]:focus{border-color:#0374c9;box-shadow:0 1px #0374c9}[_nghost-%COMP%] .cc-search-input[_ngcontent-%COMP%] > *[_ngcontent-%COMP%]{vertical-align:middle;display:inline-block;position:relative;height:30px}[_nghost-%COMP%] .cc-search-input[_ngcontent-%COMP%] .cc-clear-icon[_ngcontent-%COMP%]{position:absolute;right:0;margin:0;height:24px;width:24px;display:flex;justify-content:center;align-items:center;top:0}[_nghost-%COMP%] button[_ngcontent-%COMP%]{background-color:transparent;box-shadow:none;margin-top:2px;font-size:14px}[_nghost-%COMP%] button.cc-small-action-button[_ngcontent-%COMP%]{margin:0 5px;display:inline-block;height:24px;width:24px;vertical-align:top}[_nghost-%COMP%] button[_ngcontent-%COMP%]:hover{background-color:#d3d3d3;border-radius:50%}"]})}}return i})();var fj=Re(kr,i=>i.length===0);var JCe=["button"],eMe=["*"];function tMe(i,t){if(i&1&&(S(0,"div",2),J(1,"mat-pseudo-checkbox",6),F()),i&2){let e=me();E(),z("disabled",e.disabled)}}var mj=new Je("MAT_BUTTON_TOGGLE_DEFAULT_OPTIONS",{providedIn:"root",factory:iMe});function iMe(){return{hideSingleSelectionIndicator:!1,hideMultipleSelectionIndicator:!1,disabledInteractive:!1}}var pj=new Je("MatButtonToggleGroup"),nMe={provide:Ca,useExisting:Br(()=>jb),multi:!0},aS=class{source;value;constructor(t,e){this.source=t,this.value=e}},jb=(()=>{class i{_changeDetector=R(Li);_dir=R(tr,{optional:!0});_multiple=!1;_disabled=!1;_disabledInteractive=!1;_selectionModel;_rawValue;_controlValueAccessorChangeFn=()=>{};_onTouched=()=>{};_buttonToggles;appearance;get name(){return this._name}set name(e){this._name=e,this._markButtonsForCheck()}_name=R(hn).getId("mat-button-toggle-group-");vertical;get value(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e.map(n=>n.value):e[0]?e[0].value:void 0}set value(e){this._setSelectionByValue(e),this.valueChange.emit(this.value)}valueChange=new Pt;get selected(){let e=this._selectionModel?this._selectionModel.selected:[];return this.multiple?e:e[0]||null}get multiple(){return this._multiple}set multiple(e){this._multiple=e,this._markButtonsForCheck()}get disabled(){return this._disabled}set disabled(e){this._disabled=e,this._markButtonsForCheck()}get disabledInteractive(){return this._disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e,this._markButtonsForCheck()}get dir(){return this._dir&&this._dir.value==="rtl"?"rtl":"ltr"}change=new Pt;get hideSingleSelectionIndicator(){return this._hideSingleSelectionIndicator}set hideSingleSelectionIndicator(e){this._hideSingleSelectionIndicator=e,this._markButtonsForCheck()}_hideSingleSelectionIndicator;get hideMultipleSelectionIndicator(){return this._hideMultipleSelectionIndicator}set hideMultipleSelectionIndicator(e){this._hideMultipleSelectionIndicator=e,this._markButtonsForCheck()}_hideMultipleSelectionIndicator;constructor(){let e=R(mj,{optional:!0});this.appearance=e&&e.appearance?e.appearance:"standard",this.hideSingleSelectionIndicator=e?.hideSingleSelectionIndicator??!1,this.hideMultipleSelectionIndicator=e?.hideMultipleSelectionIndicator??!1}ngOnInit(){this._selectionModel=new pm(this.multiple,void 0,!1)}ngAfterContentInit(){this._selectionModel.select(...this._buttonToggles.filter(e=>e.checked)),this.multiple||this._initializeTabIndex()}writeValue(e){this.value=e,this._changeDetector.markForCheck()}registerOnChange(e){this._controlValueAccessorChangeFn=e}registerOnTouched(e){this._onTouched=e}setDisabledState(e){this.disabled=e}_keydown(e){if(this.multiple||this.disabled||bn(e))return;let r=e.target.id,o=this._buttonToggles.toArray().findIndex(s=>s.buttonId===r),a=null;switch(e.keyCode){case 32:case 13:a=this._buttonToggles.get(o)||null;break;case 38:a=this._getNextButton(o,-1);break;case 37:a=this._getNextButton(o,this.dir==="ltr"?-1:1);break;case 40:a=this._getNextButton(o,1);break;case 39:a=this._getNextButton(o,this.dir==="ltr"?1:-1);break;default:return}a&&(e.preventDefault(),a._onButtonClick(),a.focus())}_emitChangeEvent(e){let n=new aS(e,this.value);this._rawValue=n.value,this._controlValueAccessorChangeFn(n.value),this.change.emit(n)}_syncButtonToggle(e,n,r=!1,o=!1){!this.multiple&&this.selected&&!e.checked&&(this.selected.checked=!1),this._selectionModel?n?this._selectionModel.select(e):this._selectionModel.deselect(e):o=!0,o?Promise.resolve().then(()=>this._updateModelValue(e,r)):this._updateModelValue(e,r)}_isSelected(e){return this._selectionModel&&this._selectionModel.isSelected(e)}_isPrechecked(e){return typeof this._rawValue>"u"?!1:this.multiple&&Array.isArray(this._rawValue)?this._rawValue.some(n=>e.value!=null&&n===e.value):e.value===this._rawValue}_initializeTabIndex(){if(this._buttonToggles.forEach(e=>{e.tabIndex=-1}),this.selected)this.selected.tabIndex=0;else for(let e=0;e<this._buttonToggles.length;e++){let n=this._buttonToggles.get(e);if(!n.disabled){n.tabIndex=0;break}}}_getNextButton(e,n){let r=this._buttonToggles;for(let o=1;o<=r.length;o++){let a=(e+n*o+r.length)%r.length,s=r.get(a);if(s&&!s.disabled)return s}return null}_setSelectionByValue(e){if(this._rawValue=e,!this._buttonToggles)return;let n=this._buttonToggles.toArray();if(this.multiple&&e?(Array.isArray(e),this._clearSelection(),e.forEach(r=>this._selectValue(r,n))):(this._clearSelection(),this._selectValue(e,n)),!this.multiple&&n.every(r=>r.tabIndex===-1)){for(let r of n)if(!r.disabled){r.tabIndex=0;break}}}_clearSelection(){this._selectionModel.clear(),this._buttonToggles.forEach(e=>{e.checked=!1,this.multiple||(e.tabIndex=-1)})}_selectValue(e,n){for(let r of n)if(r.value===e){r.checked=!0,this._selectionModel.select(r),this.multiple||(r.tabIndex=0);break}}_updateModelValue(e,n){n&&this._emitChangeEvent(e),this.valueChange.emit(this.value)}_markButtonsForCheck(){this._buttonToggles?.forEach(e=>e._markForCheck())}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,selectors:[["mat-button-toggle-group"]],contentQueries:function(n,r,o){if(n&1&&_n(o,xm,5),n&2){let a;mt(a=pt())&&(r._buttonToggles=a)}},hostAttrs:[1,"mat-button-toggle-group"],hostVars:6,hostBindings:function(n,r){n&1&&he("keydown",function(a){return r._keydown(a)}),n&2&&(ni("role",r.multiple?"group":"radiogroup")("aria-disabled",r.disabled),yt("mat-button-toggle-vertical",r.vertical)("mat-button-toggle-group-appearance-standard",r.appearance==="standard"))},inputs:{appearance:"appearance",name:"name",vertical:[2,"vertical","vertical",kt],value:"value",multiple:[2,"multiple","multiple",kt],disabled:[2,"disabled","disabled",kt],disabledInteractive:[2,"disabledInteractive","disabledInteractive",kt],hideSingleSelectionIndicator:[2,"hideSingleSelectionIndicator","hideSingleSelectionIndicator",kt],hideMultipleSelectionIndicator:[2,"hideMultipleSelectionIndicator","hideMultipleSelectionIndicator",kt]},outputs:{valueChange:"valueChange",change:"change"},exportAs:["matButtonToggleGroup"],features:[Si([nMe,{provide:pj,useExisting:i}])]})}return i})(),xm=(()=>{class i{_changeDetectorRef=R(Li);_elementRef=R(Ft);_focusMonitor=R(go);_idGenerator=R(hn);_animationDisabled=vn();_checked=!1;ariaLabel;ariaLabelledby=null;_buttonElement;buttonToggleGroup;get buttonId(){return`${this.id}-button`}id;name;value;get tabIndex(){return this._tabIndex()}set tabIndex(e){this._tabIndex.set(e)}_tabIndex;disableRipple;get appearance(){return this.buttonToggleGroup?this.buttonToggleGroup.appearance:this._appearance}set appearance(e){this._appearance=e}_appearance;get checked(){return this.buttonToggleGroup?this.buttonToggleGroup._isSelected(this):this._checked}set checked(e){e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&this.buttonToggleGroup._syncButtonToggle(this,this._checked),this._changeDetectorRef.markForCheck())}get disabled(){return this._disabled||this.buttonToggleGroup&&this.buttonToggleGroup.disabled}set disabled(e){this._disabled=e}_disabled=!1;get disabledInteractive(){return this._disabledInteractive||this.buttonToggleGroup!==null&&this.buttonToggleGroup.disabledInteractive}set disabledInteractive(e){this._disabledInteractive=e}_disabledInteractive;change=new Pt;constructor(){R(Tn).load(bo);let e=R(pj,{optional:!0}),n=R(new Vl("tabindex"),{optional:!0})||"",r=R(mj,{optional:!0});this._tabIndex=Gi(parseInt(n)||0),this.buttonToggleGroup=e,this.appearance=r&&r.appearance?r.appearance:"standard",this.disabledInteractive=r?.disabledInteractive??!1}ngOnInit(){let e=this.buttonToggleGroup;this.id=this.id||this._idGenerator.getId("mat-button-toggle-"),e&&(e._isPrechecked(this)?this.checked=!0:e._isSelected(this)!==this._checked&&e._syncButtonToggle(this,this._checked))}ngAfterViewInit(){this._animationDisabled||this._elementRef.nativeElement.classList.add("mat-button-toggle-animations-enabled"),this._focusMonitor.monitor(this._elementRef,!0)}ngOnDestroy(){let e=this.buttonToggleGroup;this._focusMonitor.stopMonitoring(this._elementRef),e&&e._isSelected(this)&&e._syncButtonToggle(this,!1,!1,!0)}focus(e){this._buttonElement.nativeElement.focus(e)}_onButtonClick(){if(this.disabled)return;let e=this.isSingleSelector()?!0:!this._checked;if(e!==this._checked&&(this._checked=e,this.buttonToggleGroup&&(this.buttonToggleGroup._syncButtonToggle(this,this._checked,!0),this.buttonToggleGroup._onTouched())),this.isSingleSelector()){let n=this.buttonToggleGroup._buttonToggles.find(r=>r.tabIndex===0);n&&(n.tabIndex=-1),this.tabIndex=0}this.change.emit(new aS(this,this.value))}_markForCheck(){this._changeDetectorRef.markForCheck()}_getButtonName(){return this.isSingleSelector()?this.buttonToggleGroup.name:this.name||null}isSingleSelector(){return this.buttonToggleGroup&&!this.buttonToggleGroup.multiple}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=re({type:i,selectors:[["mat-button-toggle"]],viewQuery:function(n,r){if(n&1&&Nt(JCe,5),n&2){let o;mt(o=pt())&&(r._buttonElement=o.first)}},hostAttrs:["role","presentation",1,"mat-button-toggle"],hostVars:14,hostBindings:function(n,r){n&1&&he("focus",function(){return r.focus()}),n&2&&(ni("aria-label",null)("aria-labelledby",null)("id",r.id)("name",null),yt("mat-button-toggle-standalone",!r.buttonToggleGroup)("mat-button-toggle-checked",r.checked)("mat-button-toggle-disabled",r.disabled)("mat-button-toggle-disabled-interactive",r.disabledInteractive)("mat-button-toggle-appearance-standard",r.appearance==="standard"))},inputs:{ariaLabel:[0,"aria-label","ariaLabel"],ariaLabelledby:[0,"aria-labelledby","ariaLabelledby"],id:"id",name:"name",value:"value",tabIndex:"tabIndex",disableRipple:[2,"disableRipple","disableRipple",kt],appearance:"appearance",checked:[2,"checked","checked",kt],disabled:[2,"disabled","disabled",kt],disabledInteractive:[2,"disabledInteractive","disabledInteractive",kt]},outputs:{change:"change"},exportAs:["matButtonToggle"],ngContentSelectors:eMe,decls:7,vars:13,consts:[["button",""],["type","button",1,"mat-button-toggle-button","mat-focus-indicator",3,"click","id","disabled"],[1,"mat-button-toggle-checkbox-wrapper"],[1,"mat-button-toggle-label-content"],[1,"mat-button-toggle-focus-overlay"],["matRipple","",1,"mat-button-toggle-ripple",3,"matRippleTrigger","matRippleDisabled"],["state","checked","aria-hidden","true","appearance","minimal",3,"disabled"]],template:function(n,r){if(n&1){let o=st();ki(),S(0,"button",1,0),he("click",function(){return Ve(o),Qe(r._onButtonClick())}),ke(2,tMe,2,1,"div",2),S(3,"span",3),Gt(4),F()(),J(5,"span",4)(6,"span",5)}if(n&2){let o=Pn(1);z("id",r.buttonId)("disabled",r.disabled&&!r.disabledInteractive||null),ni("role",r.isSingleSelector()?"radio":"button")("tabindex",r.disabled&&!r.disabledInteractive?-1:r.tabIndex)("aria-pressed",r.isSingleSelector()?null:r.checked)("aria-checked",r.isSingleSelector()?r.checked:null)("name",r._getButtonName())("aria-label",r.ariaLabel)("aria-labelledby",r.ariaLabelledby)("aria-disabled",r.disabled&&r.disabledInteractive?"true":null),E(2),Pe(r.buttonToggleGroup&&(!r.buttonToggleGroup.multiple&&!r.buttonToggleGroup.hideSingleSelectionIndicator||r.buttonToggleGroup.multiple&&!r.buttonToggleGroup.hideMultipleSelectionIndicator)?2:-1),E(4),z("matRippleTrigger",o)("matRippleDisabled",r.disableRipple||r.disabled)}},dependencies:[Ja,UC],styles:[`.mat-button-toggle-standalone,.mat-button-toggle-group{position:relative;display:inline-flex;flex-direction:row;white-space:nowrap;overflow:hidden;-webkit-tap-highlight-color:rgba(0,0,0,0);border-radius:var(--mat-button-toggle-legacy-shape);transform:translateZ(0)}.mat-button-toggle-standalone:not([class*=mat-elevation-z]),.mat-button-toggle-group:not([class*=mat-elevation-z]){box-shadow:0px 3px 1px -2px rgba(0, 0, 0, 0.2), 0px 2px 2px 0px rgba(0, 0, 0, 0.14), 0px 1px 5px 0px rgba(0, 0, 0, 0.12)}@media(forced-colors: active){.mat-button-toggle-standalone,.mat-button-toggle-group{outline:solid 1px}}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{border-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard .mat-pseudo-checkbox,.mat-button-toggle-group-appearance-standard .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container))}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard:not([class*=mat-elevation-z]),.mat-button-toggle-group-appearance-standard:not([class*=mat-elevation-z]){box-shadow:none}@media(forced-colors: active){.mat-button-toggle-standalone.mat-button-toggle-appearance-standard,.mat-button-toggle-group-appearance-standard{outline:0}}.mat-button-toggle-vertical{flex-direction:column}.mat-button-toggle-vertical .mat-button-toggle-label-content{display:block}.mat-button-toggle{white-space:nowrap;position:relative;color:var(--mat-button-toggle-legacy-text-color);font-family:var(--mat-button-toggle-legacy-label-text-font);font-size:var(--mat-button-toggle-legacy-label-text-size);line-height:var(--mat-button-toggle-legacy-label-text-line-height);font-weight:var(--mat-button-toggle-legacy-label-text-weight);letter-spacing:var(--mat-button-toggle-legacy-label-text-tracking);--mat-pseudo-checkbox-minimal-selected-checkmark-color: var(--mat-button-toggle-legacy-selected-state-text-color)}.mat-button-toggle.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-legacy-focus-state-layer-opacity)}.mat-button-toggle .mat-icon svg{vertical-align:top}.mat-button-toggle-checkbox-wrapper{display:inline-block;justify-content:flex-start;align-items:center;width:0;height:18px;line-height:18px;overflow:hidden;box-sizing:border-box;position:absolute;top:50%;left:16px;transform:translate3d(0, -50%, 0)}[dir=rtl] .mat-button-toggle-checkbox-wrapper{left:auto;right:16px}.mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:12px}[dir=rtl] .mat-button-toggle-appearance-standard .mat-button-toggle-checkbox-wrapper{left:auto;right:12px}.mat-button-toggle-checked .mat-button-toggle-checkbox-wrapper{width:18px}.mat-button-toggle-animations-enabled .mat-button-toggle-checkbox-wrapper{transition:width 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-checkbox-wrapper{transition:none}.mat-button-toggle-checked{color:var(--mat-button-toggle-legacy-selected-state-text-color);background-color:var(--mat-button-toggle-legacy-selected-state-background-color)}.mat-button-toggle-disabled{pointer-events:none;color:var(--mat-button-toggle-legacy-disabled-state-text-color);background-color:var(--mat-button-toggle-legacy-disabled-state-background-color);--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-legacy-disabled-state-text-color)}.mat-button-toggle-disabled.mat-button-toggle-checked{background-color:var(--mat-button-toggle-legacy-disabled-selected-state-background-color)}.mat-button-toggle-disabled-interactive{pointer-events:auto}.mat-button-toggle-appearance-standard{color:var(--mat-button-toggle-text-color, var(--mat-sys-on-surface));background-color:var(--mat-button-toggle-background-color, transparent);font-family:var(--mat-button-toggle-label-text-font, var(--mat-sys-label-large-font));font-size:var(--mat-button-toggle-label-text-size, var(--mat-sys-label-large-size));line-height:var(--mat-button-toggle-label-text-line-height, var(--mat-sys-label-large-line-height));font-weight:var(--mat-button-toggle-label-text-weight, var(--mat-sys-label-large-weight));letter-spacing:var(--mat-button-toggle-label-text-tracking, var(--mat-sys-label-large-tracking))}.mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}[dir=rtl] .mat-button-toggle-group-appearance-standard .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle-appearance-standard+.mat-button-toggle-appearance-standard{border-left:none;border-right:none;border-top:solid 1px var(--mat-button-toggle-divider-color, var(--mat-sys-outline))}.mat-button-toggle-appearance-standard.mat-button-toggle-checked{color:var(--mat-button-toggle-selected-state-text-color, var(--mat-sys-on-secondary-container));background-color:var(--mat-button-toggle-selected-state-background-color, var(--mat-sys-secondary-container))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled{color:var(--mat-button-toggle-disabled-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-state-background-color, transparent)}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled .mat-pseudo-checkbox{--mat-pseudo-checkbox-minimal-disabled-selected-checkmark-color: var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent))}.mat-button-toggle-appearance-standard.mat-button-toggle-disabled.mat-button-toggle-checked{color:var(--mat-button-toggle-disabled-selected-state-text-color, color-mix(in srgb, var(--mat-sys-on-surface) 38%, transparent));background-color:var(--mat-button-toggle-disabled-selected-state-background-color, color-mix(in srgb, var(--mat-sys-on-surface) 12%, transparent))}.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{background-color:var(--mat-button-toggle-state-layer-color, var(--mat-sys-on-surface))}.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mat-button-toggle-appearance-standard.cdk-keyboard-focused .mat-button-toggle-focus-overlay{opacity:var(--mat-button-toggle-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}@media(hover: none){.mat-button-toggle-appearance-standard:hover .mat-button-toggle-focus-overlay{display:none}}.mat-button-toggle-label-content{-webkit-user-select:none;user-select:none;display:inline-block;padding:0 16px;line-height:var(--mat-button-toggle-legacy-height);position:relative}.mat-button-toggle-appearance-standard .mat-button-toggle-label-content{padding:0 12px;line-height:var(--mat-button-toggle-height, 40px)}.mat-button-toggle-label-content>*{vertical-align:middle}.mat-button-toggle-focus-overlay{top:0;left:0;right:0;bottom:0;position:absolute;border-radius:inherit;pointer-events:none;opacity:0;background-color:var(--mat-button-toggle-legacy-state-layer-color)}@media(forced-colors: active){.mat-button-toggle-checked .mat-button-toggle-focus-overlay{border-bottom:solid 500px;opacity:.5;height:0}.mat-button-toggle-checked:hover .mat-button-toggle-focus-overlay{opacity:.6}.mat-button-toggle-checked.mat-button-toggle-appearance-standard .mat-button-toggle-focus-overlay{border-bottom:solid 500px}}.mat-button-toggle .mat-button-toggle-ripple{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-button-toggle-button{border:0;background:none;color:inherit;padding:0;margin:0;font:inherit;outline:none;width:100%;cursor:pointer}.mat-button-toggle-animations-enabled .mat-button-toggle-button{transition:padding 150ms 45ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-button-toggle-vertical .mat-button-toggle-button{transition:none}.mat-button-toggle-disabled .mat-button-toggle-button{cursor:default}.mat-button-toggle-button::-moz-focus-inner{border:0}.mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:30px}[dir=rtl] .mat-button-toggle-checked .mat-button-toggle-button:has(.mat-button-toggle-checkbox-wrapper){padding-left:0;padding-right:30px}.mat-button-toggle-standalone.mat-button-toggle-appearance-standard{--mat-focus-indicator-border-radius: var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard:not(.mat-button-toggle-vertical) .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:last-of-type .mat-button-toggle-button::before{border-bottom-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-bottom-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}.mat-button-toggle-group-appearance-standard.mat-button-toggle-vertical .mat-button-toggle:first-of-type .mat-button-toggle-button::before{border-top-right-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large));border-top-left-radius:var(--mat-button-toggle-shape, var(--mat-sys-corner-extra-large))}
|
|
5186
5186
|
`],encapsulation:2,changeDetection:0})}return i})();var Aj=(()=>{class i{constructor(e){this.hideBlacklistItemsIndicator$=e.select(fj)}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-search-panel-mode-selector"]],inputs:{searchPanelMode:"searchPanelMode",updateSearchPanelMode:"updateSearchPanelMode"},decls:4,vars:3,consts:[["id","blacklist","value","blacklist",3,"click"],[1,"fa","fa-eye-slash"],[1,"has-blacklist-items-indicator",3,"hidden"]],template:function(n,r){n&1&&(S(0,"mat-button-toggle",0),he("click",function(){return r.updateSearchPanelMode("blacklist")}),J(1,"i",1)(2,"div",2),fe(3,"async"),F()),n&2&&(E(2),z("hidden",_e(3,1,r.hideBlacklistItemsIndicator$)))},dependencies:[xm,dt],styles:["[_nghost-%COMP%] mat-button-toggle[_ngcontent-%COMP%]{height:100%;align-items:center}[_nghost-%COMP%] .has-blacklist-items-indicator[_ngcontent-%COMP%]{position:absolute;margin-left:18px;margin-top:-32px;border-radius:50%;background-color:red;width:5px;height:5px}[_nghost-%COMP%] .mat-button-toggle-checked[_ngcontent-%COMP%] .mat-pseudo-checkbox[_ngcontent-%COMP%]{display:none}"]})}}return i})();var rMe=["*"],oMe=`.mdc-list{margin:0;padding:8px 0;list-style-type:none}.mdc-list:focus{outline:none}.mdc-list-item{display:flex;position:relative;justify-content:flex-start;overflow:hidden;padding:0;align-items:stretch;cursor:pointer;padding-left:16px;padding-right:16px;background-color:var(--mat-list-list-item-container-color, transparent);border-radius:var(--mat-list-list-item-container-shape, var(--mat-sys-corner-none))}.mdc-list-item.mdc-list-item--selected{background-color:var(--mat-list-list-item-selected-container-color)}.mdc-list-item:focus{outline:0}.mdc-list-item.mdc-list-item--disabled{cursor:auto}.mdc-list-item.mdc-list-item--with-one-line{height:var(--mat-list-list-item-one-line-container-height, 48px)}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__start{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-one-line .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-two-lines{height:var(--mat-list-list-item-two-line-container-height, 64px)}.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-two-lines .mdc-list-item__end{align-self:center;margin-top:0}.mdc-list-item.mdc-list-item--with-three-lines{height:var(--mat-list-list-item-three-line-container-height, 88px)}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__start{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:16px}.mdc-list-item.mdc-list-item--selected::before,.mdc-list-item.mdc-list-item--selected:focus::before,.mdc-list-item:not(.mdc-list-item--selected):focus::before{position:absolute;box-sizing:border-box;width:100%;height:100%;top:0;left:0;content:"";pointer-events:none}a.mdc-list-item{color:inherit;text-decoration:none}.mdc-list-item__start{fill:currentColor;flex-shrink:0;pointer-events:none}.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mat-list-list-item-leading-icon-color, var(--mat-sys-on-surface-variant));width:var(--mat-list-list-item-leading-icon-size, 24px);height:var(--mat-list-list-item-leading-icon-size, 24px);margin-left:16px;margin-right:32px}[dir=rtl] .mdc-list-item--with-leading-icon .mdc-list-item__start{margin-left:32px;margin-right:16px}.mdc-list-item--with-leading-icon:hover .mdc-list-item__start{color:var(--mat-list-list-item-hover-leading-icon-color)}.mdc-list-item--with-leading-avatar .mdc-list-item__start{width:var(--mat-list-list-item-leading-avatar-size, 40px);height:var(--mat-list-list-item-leading-avatar-size, 40px);margin-left:16px;margin-right:16px;border-radius:50%}.mdc-list-item--with-leading-avatar .mdc-list-item__start,[dir=rtl] .mdc-list-item--with-leading-avatar .mdc-list-item__start{margin-left:16px;margin-right:16px;border-radius:50%}.mdc-list-item__end{flex-shrink:0;pointer-events:none}.mdc-list-item--with-trailing-meta .mdc-list-item__end{font-family:var(--mat-list-list-item-trailing-supporting-text-font, var(--mat-sys-label-small-font));line-height:var(--mat-list-list-item-trailing-supporting-text-line-height, var(--mat-sys-label-small-line-height));font-size:var(--mat-list-list-item-trailing-supporting-text-size, var(--mat-sys-label-small-size));font-weight:var(--mat-list-list-item-trailing-supporting-text-weight, var(--mat-sys-label-small-weight));letter-spacing:var(--mat-list-list-item-trailing-supporting-text-tracking, var(--mat-sys-label-small-tracking))}.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mat-list-list-item-trailing-icon-color, var(--mat-sys-on-surface-variant));width:var(--mat-list-list-item-trailing-icon-size, 24px);height:var(--mat-list-list-item-trailing-icon-size, 24px)}.mdc-list-item--with-trailing-icon:hover .mdc-list-item__end{color:var(--mat-list-list-item-hover-trailing-icon-color)}.mdc-list-item.mdc-list-item--with-trailing-meta .mdc-list-item__end{color:var(--mat-list-list-item-trailing-supporting-text-color, var(--mat-sys-on-surface-variant))}.mdc-list-item--selected.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mat-list-list-item-selected-trailing-icon-color, var(--mat-sys-primary))}.mdc-list-item__content{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;align-self:center;flex:1;pointer-events:none}.mdc-list-item--with-two-lines .mdc-list-item__content,.mdc-list-item--with-three-lines .mdc-list-item__content{align-self:stretch}.mdc-list-item__primary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;color:var(--mat-list-list-item-label-text-color, var(--mat-sys-on-surface));font-family:var(--mat-list-list-item-label-text-font, var(--mat-sys-body-large-font));line-height:var(--mat-list-list-item-label-text-line-height, var(--mat-sys-body-large-line-height));font-size:var(--mat-list-list-item-label-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-list-list-item-label-text-weight, var(--mat-sys-body-large-weight));letter-spacing:var(--mat-list-list-item-label-text-tracking, var(--mat-sys-body-large-tracking))}.mdc-list-item:hover .mdc-list-item__primary-text{color:var(--mat-list-list-item-hover-label-text-color, var(--mat-sys-on-surface))}.mdc-list-item:focus .mdc-list-item__primary-text{color:var(--mat-list-list-item-focus-label-text-color, var(--mat-sys-on-surface))}.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-three-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-three-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-three-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item__secondary-text{text-overflow:ellipsis;white-space:nowrap;overflow:hidden;display:block;margin-top:0;color:var(--mat-list-list-item-supporting-text-color, var(--mat-sys-on-surface-variant));font-family:var(--mat-list-list-item-supporting-text-font, var(--mat-sys-body-medium-font));line-height:var(--mat-list-list-item-supporting-text-line-height, var(--mat-sys-body-medium-line-height));font-size:var(--mat-list-list-item-supporting-text-size, var(--mat-sys-body-medium-size));font-weight:var(--mat-list-list-item-supporting-text-weight, var(--mat-sys-body-medium-weight));letter-spacing:var(--mat-list-list-item-supporting-text-tracking, var(--mat-sys-body-medium-tracking))}.mdc-list-item__secondary-text::before{display:inline-block;width:0;height:20px;content:"";vertical-align:0}.mdc-list-item--with-three-lines .mdc-list-item__secondary-text{white-space:normal;line-height:20px}.mdc-list-item--with-overline .mdc-list-item__secondary-text{white-space:nowrap;line-height:auto}.mdc-list-item--with-leading-radio.mdc-list-item,.mdc-list-item--with-leading-checkbox.mdc-list-item,.mdc-list-item--with-leading-icon.mdc-list-item,.mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:0;padding-right:16px}[dir=rtl] .mdc-list-item--with-leading-radio.mdc-list-item,[dir=rtl] .mdc-list-item--with-leading-checkbox.mdc-list-item,[dir=rtl] .mdc-list-item--with-leading-icon.mdc-list-item,[dir=rtl] .mdc-list-item--with-leading-avatar.mdc-list-item{padding-left:16px;padding-right:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text{display:block;margin-top:0;line-height:normal;margin-bottom:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines .mdc-list-item__primary-text::after{display:inline-block;width:0;height:20px;content:"";vertical-align:-20px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end{display:block;margin-top:0;line-height:normal}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before,.mdc-list-item--with-leading-icon.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before,.mdc-list-item--with-leading-avatar.mdc-list-item--with-two-lines.mdc-list-item--with-trailing-meta .mdc-list-item__end::before{display:inline-block;width:0;height:32px;content:"";vertical-align:0}.mdc-list-item--with-trailing-icon.mdc-list-item,[dir=rtl] .mdc-list-item--with-trailing-icon.mdc-list-item{padding-left:0;padding-right:0}.mdc-list-item--with-trailing-icon .mdc-list-item__end{margin-left:16px;margin-right:16px}.mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:16px;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-meta.mdc-list-item{padding-left:0;padding-right:16px}.mdc-list-item--with-trailing-meta .mdc-list-item__end{-webkit-user-select:none;user-select:none;margin-left:28px;margin-right:16px}[dir=rtl] .mdc-list-item--with-trailing-meta .mdc-list-item__end{margin-left:16px;margin-right:28px}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end,.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end{display:block;line-height:normal;align-self:flex-start;margin-top:0}.mdc-list-item--with-trailing-meta.mdc-list-item--with-three-lines .mdc-list-item__end::before,.mdc-list-item--with-trailing-meta.mdc-list-item--with-two-lines .mdc-list-item__end::before{display:inline-block;width:0;height:28px;content:"";vertical-align:0}.mdc-list-item--with-leading-radio .mdc-list-item__start,.mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:8px;margin-right:24px}[dir=rtl] .mdc-list-item--with-leading-radio .mdc-list-item__start,[dir=rtl] .mdc-list-item--with-leading-checkbox .mdc-list-item__start{margin-left:24px;margin-right:8px}.mdc-list-item--with-leading-radio.mdc-list-item--with-two-lines .mdc-list-item__start,.mdc-list-item--with-leading-checkbox.mdc-list-item--with-two-lines .mdc-list-item__start{align-self:flex-start;margin-top:8px}.mdc-list-item--with-trailing-radio.mdc-list-item,.mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:16px;padding-right:0}[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item,[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item{padding-left:0;padding-right:16px}.mdc-list-item--with-trailing-radio.mdc-list-item--with-leading-icon,.mdc-list-item--with-trailing-radio.mdc-list-item--with-leading-avatar,.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-leading-icon,.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-leading-avatar{padding-left:0}[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item--with-leading-icon,[dir=rtl] .mdc-list-item--with-trailing-radio.mdc-list-item--with-leading-avatar,[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item--with-leading-icon,[dir=rtl] .mdc-list-item--with-trailing-checkbox.mdc-list-item--with-leading-avatar{padding-right:0}.mdc-list-item--with-trailing-radio .mdc-list-item__end,.mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:24px;margin-right:8px}[dir=rtl] .mdc-list-item--with-trailing-radio .mdc-list-item__end,[dir=rtl] .mdc-list-item--with-trailing-checkbox .mdc-list-item__end{margin-left:8px;margin-right:24px}.mdc-list-item--with-trailing-radio.mdc-list-item--with-three-lines .mdc-list-item__end,.mdc-list-item--with-trailing-checkbox.mdc-list-item--with-three-lines .mdc-list-item__end{align-self:flex-start;margin-top:8px}.mdc-list-group__subheader{margin:.75rem 16px}.mdc-list-item--disabled .mdc-list-item__start,.mdc-list-item--disabled .mdc-list-item__content,.mdc-list-item--disabled .mdc-list-item__end{opacity:1}.mdc-list-item--disabled .mdc-list-item__primary-text,.mdc-list-item--disabled .mdc-list-item__secondary-text{opacity:var(--mat-list-list-item-disabled-label-text-opacity, 0.3)}.mdc-list-item--disabled.mdc-list-item--with-leading-icon .mdc-list-item__start{color:var(--mat-list-list-item-disabled-leading-icon-color, var(--mat-sys-on-surface));opacity:var(--mat-list-list-item-disabled-leading-icon-opacity, 0.38)}.mdc-list-item--disabled.mdc-list-item--with-trailing-icon .mdc-list-item__end{color:var(--mat-list-list-item-disabled-trailing-icon-color, var(--mat-sys-on-surface));opacity:var(--mat-list-list-item-disabled-trailing-icon-opacity, 0.38)}.mat-mdc-list-item.mat-mdc-list-item-both-leading-and-trailing,[dir=rtl] .mat-mdc-list-item.mat-mdc-list-item-both-leading-and-trailing{padding-left:0;padding-right:0}.mdc-list-item.mdc-list-item--disabled .mdc-list-item__primary-text{color:var(--mat-list-list-item-disabled-label-text-color, var(--mat-sys-on-surface))}.mdc-list-item:hover::before{background-color:var(--mat-list-list-item-hover-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-list-list-item-hover-state-layer-opacity, var(--mat-sys-hover-state-layer-opacity))}.mdc-list-item.mdc-list-item--disabled::before{background-color:var(--mat-list-list-item-disabled-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-list-list-item-disabled-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mdc-list-item:focus::before{background-color:var(--mat-list-list-item-focus-state-layer-color, var(--mat-sys-on-surface));opacity:var(--mat-list-list-item-focus-state-layer-opacity, var(--mat-sys-focus-state-layer-opacity))}.mdc-list-item--disabled .mdc-radio,.mdc-list-item--disabled .mdc-checkbox{opacity:var(--mat-list-list-item-disabled-label-text-opacity, 0.3)}.mdc-list-item--with-leading-avatar .mat-mdc-list-item-avatar{border-radius:var(--mat-list-list-item-leading-avatar-shape, var(--mat-sys-corner-full));background-color:var(--mat-list-list-item-leading-avatar-color, var(--mat-sys-primary-container))}.mat-mdc-list-item-icon{font-size:var(--mat-list-list-item-leading-icon-size, 24px)}@media(forced-colors: active){a.mdc-list-item--activated::after{content:"";position:absolute;top:50%;right:16px;transform:translateY(-50%);width:10px;height:0;border-bottom:solid 10px;border-radius:10px}a.mdc-list-item--activated [dir=rtl]::after{right:auto;left:16px}}.mat-mdc-list-base{display:block}.mat-mdc-list-base .mdc-list-item__start,.mat-mdc-list-base .mdc-list-item__end,.mat-mdc-list-base .mdc-list-item__content{pointer-events:auto}.mat-mdc-list-item,.mat-mdc-list-option{width:100%;box-sizing:border-box;-webkit-tap-highlight-color:rgba(0,0,0,0)}.mat-mdc-list-item:not(.mat-mdc-list-item-interactive),.mat-mdc-list-option:not(.mat-mdc-list-item-interactive){cursor:default}.mat-mdc-list-item .mat-divider-inset,.mat-mdc-list-option .mat-divider-inset{position:absolute;left:0;right:0;bottom:0}.mat-mdc-list-item .mat-mdc-list-item-avatar~.mat-divider-inset,.mat-mdc-list-option .mat-mdc-list-item-avatar~.mat-divider-inset{margin-left:72px}[dir=rtl] .mat-mdc-list-item .mat-mdc-list-item-avatar~.mat-divider-inset,[dir=rtl] .mat-mdc-list-option .mat-mdc-list-item-avatar~.mat-divider-inset{margin-right:72px}.mat-mdc-list-item-interactive::before{top:0;left:0;right:0;bottom:0;position:absolute;content:"";opacity:0;pointer-events:none;border-radius:inherit}.mat-mdc-list-item>.mat-focus-indicator{top:0;left:0;right:0;bottom:0;position:absolute;pointer-events:none}.mat-mdc-list-item:focus>.mat-focus-indicator::before{content:""}.mat-mdc-list-item.mdc-list-item--with-three-lines .mat-mdc-list-item-line.mdc-list-item__secondary-text{white-space:nowrap;line-height:normal}.mat-mdc-list-item.mdc-list-item--with-three-lines .mat-mdc-list-item-unscoped-content.mdc-list-item__secondary-text{display:-webkit-box;-webkit-box-orient:vertical;-webkit-line-clamp:2}mat-action-list button{background:none;color:inherit;border:none;font:inherit;outline:inherit;-webkit-tap-highlight-color:rgba(0,0,0,0);text-align:start}mat-action-list button::-moz-focus-inner{border:0}.mdc-list-item--with-leading-icon .mdc-list-item__start{margin-inline-start:var(--mat-list-list-item-leading-icon-start-space, 16px);margin-inline-end:var(--mat-list-list-item-leading-icon-end-space, 16px)}.mat-mdc-nav-list .mat-mdc-list-item{border-radius:var(--mat-list-active-indicator-shape, var(--mat-sys-corner-full));--mat-focus-indicator-border-radius: var(--mat-list-active-indicator-shape, var(--mat-sys-corner-full))}.mat-mdc-nav-list .mat-mdc-list-item.mdc-list-item--activated{background-color:var(--mat-list-active-indicator-color, var(--mat-sys-secondary-container))}
|
|
5187
|
-
`,aMe=["unscopedContent"],sMe=["text"],lMe=[[["","matListItemAvatar",""],["","matListItemIcon",""]],[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["","matListItemMeta",""]],[["mat-divider"]]],cMe=["[matListItemAvatar],[matListItemIcon]","[matListItemTitle]","[matListItemLine]","*","[matListItemMeta]","mat-divider"];var dMe=new Je("ListOption"),uMe=(()=>{class i{_elementRef=R(Ft);constructor(){}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]})}return i})(),hMe=(()=>{class i{_elementRef=R(Ft);constructor(){}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]})}return i})(),fMe=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,selectors:[["","matListItemMeta",""]],hostAttrs:[1,"mat-mdc-list-item-meta","mdc-list-item__end"]})}return i})(),gj=(()=>{class i{_listOption=R(dMe,{optional:!0});constructor(){}_isAlignedAtStart(){return!this._listOption||this._listOption?._getTogglePosition()==="after"}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,hostVars:4,hostBindings:function(n,r){n&2&&yt("mdc-list-item__start",r._isAlignedAtStart())("mdc-list-item__end",!r._isAlignedAtStart())}})}return i})(),mMe=(()=>{class i extends gj{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Fr(i)))(r||i)}})();static \u0275dir=wt({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[nn]})}return i})(),pMe=(()=>{class i extends gj{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Fr(i)))(r||i)}})();static \u0275dir=wt({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[nn]})}return i})(),AMe=new Je("MAT_LIST_CONFIG"),jk=(()=>{class i{_isNonInteractive=!0;get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=_o(e)}_disableRipple=!1;get disabled(){return this._disabled()}set disabled(e){this._disabled.set(_o(e))}_disabled=Gi(!1);_defaultOptions=R(AMe,{optional:!0});static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,hostVars:1,hostBindings:function(n,r){n&2&&ni("aria-disabled",r.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}})}return i})(),gMe=(()=>{class i{_elementRef=R(Ft);_ngZone=R(ti);_listBase=R(jk,{optional:!0});_platform=R(Ki);_hostElement;_isButtonElement;_noopAnimations=vn();_avatars;_icons;set lines(e){this._explicitLines=ma(e,null),this._updateItemLines(!1)}_explicitLines=null;get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(e){this._disableRipple=_o(e)}_disableRipple=!1;get disabled(){return this._disabled()||!!this._listBase?.disabled}set disabled(e){this._disabled.set(_o(e))}_disabled=Gi(!1);_subscriptions=new rr;_rippleRenderer=null;_hasUnscopedTextContent=!1;rippleConfig;get rippleDisabled(){return this.disableRipple||!!this.rippleConfig.disabled}constructor(){R(Tn).load(bo);let e=R(Sf,{optional:!0});this.rippleConfig=e||{},this._hostElement=this._elementRef.nativeElement,this._isButtonElement=this._hostElement.nodeName.toLowerCase()==="button",this._listBase&&!this._listBase._isNonInteractive&&this._initInteractiveListItem(),this._isButtonElement&&!this._hostElement.hasAttribute("type")&&this._hostElement.setAttribute("type","button")}ngAfterViewInit(){this._monitorProjectedLinesAndTitle(),this._updateItemLines(!0)}ngOnDestroy(){this._subscriptions.unsubscribe(),this._rippleRenderer!==null&&this._rippleRenderer._removeTriggerEvents()}_hasIconOrAvatar(){return!!(this._avatars.length||this._icons.length)}_initInteractiveListItem(){this._hostElement.classList.add("mat-mdc-list-item-interactive"),this._rippleRenderer=new Mf(this,this._ngZone,this._hostElement,this._platform,R(_i)),this._rippleRenderer.setupTriggerEvents(this._hostElement)}_monitorProjectedLinesAndTitle(){this._ngZone.runOutsideAngular(()=>{this._subscriptions.add(wr(this._lines.changes,this._titles.changes).subscribe(()=>this._updateItemLines(!1)))})}_updateItemLines(e){if(!this._lines||!this._titles||!this._unscopedContent)return;e&&this._checkDomForUnscopedTextContent();let n=this._explicitLines??this._inferLinesFromContent(),r=this._unscopedContent.nativeElement;if(this._hostElement.classList.toggle("mat-mdc-list-item-single-line",n<=1),this._hostElement.classList.toggle("mdc-list-item--with-one-line",n<=1),this._hostElement.classList.toggle("mdc-list-item--with-two-lines",n===2),this._hostElement.classList.toggle("mdc-list-item--with-three-lines",n===3),this._hasUnscopedTextContent){let o=this._titles.length===0&&n===1;r.classList.toggle("mdc-list-item__primary-text",o),r.classList.toggle("mdc-list-item__secondary-text",!o)}else r.classList.remove("mdc-list-item__primary-text"),r.classList.remove("mdc-list-item__secondary-text")}_inferLinesFromContent(){let e=this._titles.length+this._lines.length;return this._hasUnscopedTextContent&&(e+=1),e}_checkDomForUnscopedTextContent(){this._hasUnscopedTextContent=Array.from(this._unscopedContent.nativeElement.childNodes).filter(e=>e.nodeType!==e.COMMENT_NODE).some(e=>!!(e.textContent&&e.textContent.trim()))}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,contentQueries:function(n,r,o){if(n&1&&(_n(o,mMe,4),_n(o,pMe,4)),n&2){let a;mt(a=pt())&&(r._avatars=a),mt(a=pt())&&(r._icons=a)}},hostVars:4,hostBindings:function(n,r){n&2&&(ni("aria-disabled",r.disabled)("disabled",r._isButtonElement&&r.disabled||null),yt("mdc-list-item--disabled",r.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}})}return i})();var sS=(()=>{class i extends jk{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Fr(i)))(r||i)}})();static \u0275cmp=re({type:i,selectors:[["mat-list"]],hostAttrs:[1,"mat-mdc-list","mat-mdc-list-base","mdc-list"],exportAs:["matList"],features:[Si([{provide:jk,useExisting:i}]),nn],ngContentSelectors:rMe,decls:1,vars:0,template:function(n,r){n&1&&(ki(),Gt(0))},styles:[oMe],encapsulation:2,changeDetection:0})}return i})(),lS=(()=>{class i extends gMe{_lines;_titles;_meta;_unscopedContent;_itemText;get activated(){return this._activated}set activated(e){this._activated=_o(e)}_activated=!1;_getAriaCurrent(){return this._hostElement.nodeName==="A"&&this._activated?"page":null}_hasBothLeadingAndTrailing(){return this._meta.length!==0&&(this._avatars.length!==0||this._icons.length!==0)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Fr(i)))(r||i)}})();static \u0275cmp=re({type:i,selectors:[["mat-list-item"],["a","mat-list-item",""],["button","mat-list-item",""]],contentQueries:function(n,r,o){if(n&1&&(_n(o,hMe,5),_n(o,uMe,5),_n(o,fMe,5)),n&2){let a;mt(a=pt())&&(r._lines=a),mt(a=pt())&&(r._titles=a),mt(a=pt())&&(r._meta=a)}},viewQuery:function(n,r){if(n&1&&(Nt(aMe,5),Nt(sMe,5)),n&2){let o;mt(o=pt())&&(r._unscopedContent=o.first),mt(o=pt())&&(r._itemText=o.first)}},hostAttrs:[1,"mat-mdc-list-item","mdc-list-item"],hostVars:13,hostBindings:function(n,r){n&2&&(ni("aria-current",r._getAriaCurrent()),yt("mdc-list-item--activated",r.activated)("mdc-list-item--with-leading-avatar",r._avatars.length!==0)("mdc-list-item--with-leading-icon",r._icons.length!==0)("mdc-list-item--with-trailing-meta",r._meta.length!==0)("mat-mdc-list-item-both-leading-and-trailing",r._hasBothLeadingAndTrailing())("_mat-animation-noopable",r._noopAnimations))},inputs:{activated:"activated"},exportAs:["matListItem"],features:[nn],ngContentSelectors:cMe,decls:10,vars:0,consts:[["unscopedContent",""],[1,"mdc-list-item__content"],[1,"mat-mdc-list-item-unscoped-content",3,"cdkObserveContent"],[1,"mat-focus-indicator"]],template:function(n,r){if(n&1){let o=st();ki(lMe),Gt(0),S(1,"span",1),Gt(2,1),Gt(3,2),S(4,"span",2,0),he("cdkObserveContent",function(){return Ve(o),Qe(r._updateItemLines(!0))}),Gt(6,3),F()(),Gt(7,4),Gt(8,5),J(9,"div",3)}},dependencies:[g5],encapsulation:2,changeDetection:0})}return i})();function _Me(i,t){i&1&&(S(0,"mat-list-item"),j(1,"Add pattern via search or node context-menu"),F())}function bMe(i,t){if(i&1){let e=st();S(0,"mat-list-item",4)(1,"button",5),he("click",function(){let r=Ve(e).$implicit,o=me(2);return Qe(o.removeBlacklistEntry(r))}),J(2,"em",6),j(3),F()()}if(i&2){let e=t.$implicit;z("title",e.path),E(3),ct(" ",e.path," ")}}function vMe(i,t){if(i&1&&(S(0,"div"),ke(1,_Me,2,0,"mat-list-item"),xi(2,bMe,4,2,"mat-list-item",4,En),F()),i&2){let e=t;E(),Pe(e.length===0?1:-1),E(),wi(e)}}function yMe(i,t){i&1&&(S(0,"mat-list-item"),j(1,"Add pattern via search or node context-menu"),F())}function xMe(i,t){if(i&1){let e=st();S(0,"mat-list-item",4)(1,"button",5),he("click",function(){let r=Ve(e).$implicit,o=me(2);return Qe(o.removeBlacklistEntry(r))}),J(2,"em",6),j(3),F()()}if(i&2){let e=t.$implicit;z("title",e.path),E(3),ct(" ",e.path," ")}}function wMe(i,t){if(i&1&&(S(0,"div"),ke(1,yMe,2,0,"mat-list-item"),xi(2,xMe,4,2,"mat-list-item",4,En),F()),i&2){let e=t;E(),Pe(e.length===0?1:-1),E(),wi(e)}}var _j=(()=>{class i{constructor(e){this.store=e,this.flattenedItems$=this.store.select(Gb("flatten")),this.excludedItems$=this.store.select(Gb("exclude"))}removeBlacklistEntry(e){this.store.dispatch(dh({item:e}))}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-blacklist-panel"]],decls:14,vars:6,consts:[[1,"cc-blacklist-panel-list"],[1,"cc-header-text"],["matTooltip","Flattened nodes are shown as flat/short buildings and are included in folder metrics",1,"fa","fa-question-circle-o"],["matTooltip","Excluded buildings are not shown in the map and are not included in folder metrics",1,"fa","fa-question-circle-o"],[3,"title"],["mat-button","",3,"click"],["title","Remove list item",1,"fa","fa-minus-square"]],template:function(n,r){if(n&1&&(S(0,"mat-list",0)(1,"div")(2,"h3",1),j(3,"Flattened"),F(),J(4,"em",2),F(),ke(5,vMe,4,1,"div"),fe(6,"async"),F(),S(7,"mat-list",0)(8,"div")(9,"h3",1),j(10,"Excluded"),F(),J(11,"em",3),F(),ke(12,wMe,4,1,"div"),fe(13,"async"),F()),n&2){let o,a;E(5),Pe((o=_e(6,2,r.flattenedItems$))?5:-1,o),E(7),Pe((a=_e(13,4,r.excludedItems$))?12:-1,a)}},dependencies:[sS,ym,lS,Wi,dt],styles:["[_nghost-%COMP%] .cc-header-text[_ngcontent-%COMP%]{display:inline-block;margin:0 .25em 0 0}"]})}}return i})();var cS=(i,t,e)=>t.reduce((n,r)=>ga(r.path,e,i)?n+1:n,0),CMe=(i,t,e)=>{let n=i.filter(r=>Yi(r));return{fileCount:`${n.length}/${e.length}`,flattenCount:`${cS("flatten",n,t)}/${cS("flatten",e,t)}`,excludeCount:`${cS("exclude",n,t)}/${cS("exclude",e,t)}`}},bj=Re(ww,kr,Sh,CMe);var vj=(()=>{class i{constructor(e){this.store=e}ngOnInit(){this.isSearchPanelPinned$=this.store.select(nS)}onClick(){this.store.dispatch(dg())}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-thumb-tack-button"]],decls:3,vars:3,consts:[["title","Pin file explorer",1,"box-rounded",3,"click","ngClass"],[1,"fa","fa-thumb-tack"]],template:function(n,r){n&1&&(S(0,"button",0),fe(1,"async"),he("click",function(){return r.onClick()}),J(2,"i",1),F()),n&2&&z("ngClass",_e(1,1,r.isSearchPanelPinned$)?"pinned":"")},dependencies:[ko,dt],styles:[".pinned[_ngcontent-%COMP%]{background-color:#979797}button[_ngcontent-%COMP%]{height:25px;background:#e6e6e6;padding:1px 8px}.box-rounded[_ngcontent-%COMP%]{display:inline-block;font-weight:400;line-height:17px;font-size:10pt;margin-top:2px;min-width:20px;border-radius:4px;text-align:center}"]})}}return i})();var dS=Re(hi,i=>i.sortingOrderAscending);var yj=(()=>{class i{constructor(e){this.store=e}ngOnInit(){this.sortingOrderAscending$=this.store.select(dS)}onClick(){this.store.dispatch(sg())}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-sorting-button"]],decls:4,vars:7,consts:[[1,"box-rounded",3,"click","title"],[3,"className"]],template:function(n,r){n&1&&(Ut(0,"button",0),fe(1,"async"),fr("click",function(){return r.onClick()}),Ti(2,"i",1),fe(3,"async"),qt()),n&2&&(sn("title",fo("Toggle sort order (currently ",_e(1,3,r.sortingOrderAscending$)?"ascending":"descending",")")),E(2),sn("className",_e(3,5,r.sortingOrderAscending$)?"fa fa-sort-amount-asc":"fa fa-sort-amount-desc"))},dependencies:[dt],styles:["button[_ngcontent-%COMP%]{height:25px;background:#e6e6e6;padding:1px 8px}.box-rounded[_ngcontent-%COMP%]{display:inline-block;font-weight:400;line-height:17px;font-size:10pt;margin-top:2px;min-width:20px;border-radius:4px;text-align:center}"]})}}return i})();var uS=Re(_r,i=>i.sortingOption);function MMe(i,t){if(i&1&&(S(0,"mat-option",1),j(1),F()),i&2){let e=t.$implicit;z("value",e),E(),ct(" ",e," ")}}var xj=(()=>{class i{constructor(e){this.store=e,this.sortingOptions=Object.values(mu),this.selectedSortingOption$=e.select(uS)}handleSelectedSortingOptionChanged(e){this.store.dispatch(fh({value:e.value}))}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-sorting-option"]],decls:4,vars:3,consts:[["title","Sort by","panelClass","cc-sorting-option",1,"sorting-option-select",3,"selectionChange","value"],[3,"value"]],template:function(n,r){n&1&&(S(0,"mat-select",0),fe(1,"async"),he("selectionChange",function(a){return r.handleSelectedSortingOptionChanged(a)}),xi(2,MMe,2,2,"mat-option",1,En),F()),n&2&&(z("value",_e(1,1,r.selectedSortingOption$)),E(2),wi(r.sortingOptions))},dependencies:[Qo,Zr,dt],styles:[".sorting-option-select[_ngcontent-%COMP%]{max-width:88px}"]})}}return i})();function SMe(i,t){if(i&1&&(S(0,"span",0),j(1),J(2,"i",1),F(),S(3,"span",2),j(4),J(5,"img",3),F(),S(6,"span",4),j(7),J(8,"i",5),F(),S(9,"div",6),J(10,"cc-thumb-tack-button"),F(),S(11,"div",6),J(12,"cc-sorting-button")(13,"cc-sorting-option"),F()),i&2){let e=t;E(),Ai(e.fileCount),E(3),Ai(e.flattenCount),E(3),Ai(e.excludeCount)}}var wj=(()=>{class i{constructor(e){this.matchingFileCounters$=e.select(bj)}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-matching-files-counter"]],decls:2,vars:3,consts:[["title","Files matching search pattern",1,"box-rounded","node-count"],[1,"fa","fa-file"],["title","Files flattened",1,"box-rounded","node-count",2,"display","inline-flex"],["alt","flattenIcon","src","/codeCharta/assets/flatten.png",1,"fa","png-icon-files-counter"],["title","Files excluded",1,"box-rounded","node-count"],[1,"fa","fa-ban"],[1,"clickable-component"]],template:function(n,r){if(n&1&&(ke(0,SMe,14,3),fe(1,"async")),n&2){let o;Pe((o=_e(1,1,r.matchingFileCounters$))?0:-1,o)}},dependencies:[vj,yj,xj,dt],styles:["[_nghost-%COMP%] .node-count[_ngcontent-%COMP%]{background:#eee;color:#000;padding:4px 8px;margin-right:8px}[_nghost-%COMP%] .node-count[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-left:6px}[_nghost-%COMP%] .box-rounded[_ngcontent-%COMP%]{display:inline-block;font-weight:400;line-height:17px;font-size:10pt;margin-top:2px;min-width:20px;border-radius:4px;text-align:center}[_nghost-%COMP%] .png-icon-files-counter[_ngcontent-%COMP%]{width:19px;height:16px;margin-left:6px}[_nghost-%COMP%] .clickable-component[_ngcontent-%COMP%]{display:inline-block;color:#000;margin-left:-9px}"]})}}return i})();function Lc(i){if(typeof i!="object")return i;var t,e,n=Object.prototype.toString.call(i);if(n==="[object Object]"){if(i.constructor!==Object&&typeof i.constructor=="function"){e=new i.constructor;for(t in i)i.hasOwnProperty(t)&&e[t]!==i[t]&&(e[t]=Lc(i[t]))}else{e={};for(t in i)t==="__proto__"?Object.defineProperty(e,t,{value:Lc(i[t]),configurable:!0,enumerable:!0,writable:!0}):e[t]=Lc(i[t])}return e}if(n==="[object Array]"){for(t=i.length,e=Array(t);t--;)e[t]=Lc(i[t]);return e}return n==="[object Set]"?(e=new Set,i.forEach(function(r){e.add(Lc(r))}),e):n==="[object Map]"?(e=new Map,i.forEach(function(r,o){e.set(Lc(o),Lc(r))}),e):n==="[object Date]"?new Date(+i):n==="[object RegExp]"?(e=new RegExp(i.source,i.flags),e.lastIndex=i.lastIndex,e):n==="[object DataView]"?new i.constructor(Lc(i.buffer)):n==="[object ArrayBuffer]"?i.slice(0):n.slice(-6)==="Array]"?new i.constructor(i):i}var EMe=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),Cj=i=>(t,e)=>{let n=EMe.compare(t.name,e.name);return i?n:n*-1},TMe=i=>(t,e)=>{let n=t.attributes.unary-e.attributes.unary;return i?n:n*-1},BMe=(i,t)=>(e,n)=>{let r=e.attributes[i]??0,o=n.attributes[i]??0;return(t?r-o:o-r)||Cj(t)(e,n)},FMe=(i,t,e)=>{switch(i){case mu.AREA_SIZE:return BMe(e,t);case mu.NUMBER_OF_FILES:return TMe(t);default:return Cj(t)}},IMe=(i,t)=>{let e=[],n=[];for(let r of t.children)r.type===Zn.FOLDER?e.push(r):n.push(r);return e.sort(i),n.sort(i),[...e,...n]},$k=(i,t,e,n)=>{if(!i?.children||i.children.length===0)return i;for(let o of i.children)o.type===Zn.FOLDER&&$k(o,t,e,n);let r=FMe(t,e,n);return i.children=IMe(r,i),i};var Mj=Re(br,uS,dS,Or,(i,t,e,n)=>$k(Lc(i.unifiedMapNode),t,e,n));var hS=Re(lp,i=>i.rightClickedNodeData);var fS=(()=>{class i{transform(e,n){return $b(e,n)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275pipe=an({name:"areaMetricValid",type:i,pure:!0})}}return i})();function $b(i,t){return i.deltas?.[t]<0||i.attributes?.[t]>0}var Sj=(()=>{class i{transform(e,n){return Yi(e)?"fa fa-file-o":n?"fa fa-folder-open":"fa fa-folder"}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275pipe=an({name:"mapTreeViewItemIconClass",type:i,pure:!0})}}return i})();var Ej=(()=>{class i{static{this.defaultColor="#000000"}static{this.areMetricZeroColor="#BDBDBD"}constructor(e){this.state=e}transform(e){let{areaMetric:n}=this.state.getValue().dynamicSettings;return $b(e,n)?Yi(e)?void 0:Ff(e,this.state.getValue().fileSettings.markedPackages)||i.defaultColor:i.areMetricZeroColor}static{this.\u0275fac=function(n){return new(n||i)(se(bi,16))}}static{this.\u0275pipe=an({name:"mapTreeViewItemIconColor",type:i,pure:!1})}}return i})();var Tj=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=re({type:i,selectors:[["cc-map-tree-view-item-icon"]],inputs:{node:"node",isOpen:"isOpen"},decls:3,vars:9,consts:[["role","img","aria-hidden","true"]],template:function(n,r){n&1&&(Ti(0,"span",0),fe(1,"mapTreeViewItemIconClass"),fe(2,"mapTreeViewItemIconColor")),n&2&&(Xi(dn(1,4,r.node,r.isOpen)),pi("color",_e(2,7,r.node)))},dependencies:[Sj,Ej],encapsulation:2})}}return i})();var Bj=Re(br,i=>i.unifiedMapNode?.attributes.unary);var mS=(()=>{class i{transform(e){return Yi(e)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275pipe=an({name:"isNodeLeaf",type:i,pure:!0})}}return i})();function DMe(i,t){if(i&1&&(S(0,"span"),j(1),fe(2,"async"),F()),i&2){let e=me(2);E(),ct("",(100*e.unaryValue/_e(2,1,e.rootUnary$)).toFixed(0),"%")}}function kMe(i,t){i&1&&j(0,"File")}function PMe(i,t){i&1&&j(0,"Files")}function RMe(i,t){if(i&1&&(S(0,"span",2),j(1),Sn(2,kMe,1,0,"ng-template",3)(3,PMe,1,0,"ng-template",4),F()),i&2){let e=me(2);z("ngPlural",e.unaryValue),E(),ct(" ",e.unaryValue," ")}}function OMe(i,t){if(i&1&&(S(0,"span",1),ke(1,DMe,3,3,"span")(2,RMe,4,2,"span",2),F()),i&2){let e=me();E(),Pe(e.isHovered?2:1)}}var Fj=(()=>{class i{constructor(e){this.searchedNodePaths$=e.select(tb),this.rootUnary$=e.select(Bj),this.areaMetric$=e.select(Or)}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-map-tree-view-item-name"]],inputs:{node:"node",isHovered:"isHovered",unaryValue:"unaryValue",unaryPercentage:"unaryPercentage"},decls:7,vars:17,consts:[[1,"node-name"],[1,"unary-number"],[3,"ngPlural"],["ngPluralCase","=1"],["ngPluralCase","other"]],template:function(n,r){n&1&&(S(0,"span",0),fe(1,"async"),fe(2,"areaMetricValid"),fe(3,"async"),j(4),F(),ke(5,OMe,3,1,"span",1),fe(6,"isNodeLeaf")),n&2&&(yt("flattened",r.node.isFlattened)("noAreaMetric",!dn(2,10,r.node,_e(1,8,r.areaMetric$)))("tree-search-result",_e(3,13,r.searchedNodePaths$).has(r.node.path)),E(4),ct(" ",r.node.name,`
|
|
5187
|
+
`,aMe=["unscopedContent"],sMe=["text"],lMe=[[["","matListItemAvatar",""],["","matListItemIcon",""]],[["","matListItemTitle",""]],[["","matListItemLine",""]],"*",[["","matListItemMeta",""]],[["mat-divider"]]],cMe=["[matListItemAvatar],[matListItemIcon]","[matListItemTitle]","[matListItemLine]","*","[matListItemMeta]","mat-divider"];var dMe=new Je("ListOption"),uMe=(()=>{class i{_elementRef=R(Ft);constructor(){}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,selectors:[["","matListItemTitle",""]],hostAttrs:[1,"mat-mdc-list-item-title","mdc-list-item__primary-text"]})}return i})(),hMe=(()=>{class i{_elementRef=R(Ft);constructor(){}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,selectors:[["","matListItemLine",""]],hostAttrs:[1,"mat-mdc-list-item-line","mdc-list-item__secondary-text"]})}return i})(),fMe=(()=>{class i{static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,selectors:[["","matListItemMeta",""]],hostAttrs:[1,"mat-mdc-list-item-meta","mdc-list-item__end"]})}return i})(),gj=(()=>{class i{_listOption=R(dMe,{optional:!0});constructor(){}_isAlignedAtStart(){return!this._listOption||this._listOption?._getTogglePosition()==="after"}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,hostVars:4,hostBindings:function(n,r){n&2&&yt("mdc-list-item__start",r._isAlignedAtStart())("mdc-list-item__end",!r._isAlignedAtStart())}})}return i})(),mMe=(()=>{class i extends gj{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Fr(i)))(r||i)}})();static \u0275dir=wt({type:i,selectors:[["","matListItemAvatar",""]],hostAttrs:[1,"mat-mdc-list-item-avatar"],features:[nn]})}return i})(),pMe=(()=>{class i extends gj{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Fr(i)))(r||i)}})();static \u0275dir=wt({type:i,selectors:[["","matListItemIcon",""]],hostAttrs:[1,"mat-mdc-list-item-icon"],features:[nn]})}return i})(),AMe=new Je("MAT_LIST_CONFIG"),jk=(()=>{class i{_isNonInteractive=!0;get disableRipple(){return this._disableRipple}set disableRipple(e){this._disableRipple=_o(e)}_disableRipple=!1;get disabled(){return this._disabled()}set disabled(e){this._disabled.set(_o(e))}_disabled=Gi(!1);_defaultOptions=R(AMe,{optional:!0});static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,hostVars:1,hostBindings:function(n,r){n&2&&ni("aria-disabled",r.disabled)},inputs:{disableRipple:"disableRipple",disabled:"disabled"}})}return i})(),gMe=(()=>{class i{_elementRef=R(Ft);_ngZone=R(ti);_listBase=R(jk,{optional:!0});_platform=R(Ki);_hostElement;_isButtonElement;_noopAnimations=vn();_avatars;_icons;set lines(e){this._explicitLines=ma(e,null),this._updateItemLines(!1)}_explicitLines=null;get disableRipple(){return this.disabled||this._disableRipple||this._noopAnimations||!!this._listBase?.disableRipple}set disableRipple(e){this._disableRipple=_o(e)}_disableRipple=!1;get disabled(){return this._disabled()||!!this._listBase?.disabled}set disabled(e){this._disabled.set(_o(e))}_disabled=Gi(!1);_subscriptions=new rr;_rippleRenderer=null;_hasUnscopedTextContent=!1;rippleConfig;get rippleDisabled(){return this.disableRipple||!!this.rippleConfig.disabled}constructor(){R(Tn).load(bo);let e=R(Sf,{optional:!0});this.rippleConfig=e||{},this._hostElement=this._elementRef.nativeElement,this._isButtonElement=this._hostElement.nodeName.toLowerCase()==="button",this._listBase&&!this._listBase._isNonInteractive&&this._initInteractiveListItem(),this._isButtonElement&&!this._hostElement.hasAttribute("type")&&this._hostElement.setAttribute("type","button")}ngAfterViewInit(){this._monitorProjectedLinesAndTitle(),this._updateItemLines(!0)}ngOnDestroy(){this._subscriptions.unsubscribe(),this._rippleRenderer!==null&&this._rippleRenderer._removeTriggerEvents()}_hasIconOrAvatar(){return!!(this._avatars.length||this._icons.length)}_initInteractiveListItem(){this._hostElement.classList.add("mat-mdc-list-item-interactive"),this._rippleRenderer=new Mf(this,this._ngZone,this._hostElement,this._platform,R(_i)),this._rippleRenderer.setupTriggerEvents(this._hostElement)}_monitorProjectedLinesAndTitle(){this._ngZone.runOutsideAngular(()=>{this._subscriptions.add(wr(this._lines.changes,this._titles.changes).subscribe(()=>this._updateItemLines(!1)))})}_updateItemLines(e){if(!this._lines||!this._titles||!this._unscopedContent)return;e&&this._checkDomForUnscopedTextContent();let n=this._explicitLines??this._inferLinesFromContent(),r=this._unscopedContent.nativeElement;if(this._hostElement.classList.toggle("mat-mdc-list-item-single-line",n<=1),this._hostElement.classList.toggle("mdc-list-item--with-one-line",n<=1),this._hostElement.classList.toggle("mdc-list-item--with-two-lines",n===2),this._hostElement.classList.toggle("mdc-list-item--with-three-lines",n===3),this._hasUnscopedTextContent){let o=this._titles.length===0&&n===1;r.classList.toggle("mdc-list-item__primary-text",o),r.classList.toggle("mdc-list-item__secondary-text",!o)}else r.classList.remove("mdc-list-item__primary-text"),r.classList.remove("mdc-list-item__secondary-text")}_inferLinesFromContent(){let e=this._titles.length+this._lines.length;return this._hasUnscopedTextContent&&(e+=1),e}_checkDomForUnscopedTextContent(){this._hasUnscopedTextContent=Array.from(this._unscopedContent.nativeElement.childNodes).filter(e=>e.nodeType!==e.COMMENT_NODE).some(e=>!!(e.textContent&&e.textContent.trim()))}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,contentQueries:function(n,r,o){if(n&1&&(_n(o,mMe,4),_n(o,pMe,4)),n&2){let a;mt(a=pt())&&(r._avatars=a),mt(a=pt())&&(r._icons=a)}},hostVars:4,hostBindings:function(n,r){n&2&&(ni("aria-disabled",r.disabled)("disabled",r._isButtonElement&&r.disabled||null),yt("mdc-list-item--disabled",r.disabled))},inputs:{lines:"lines",disableRipple:"disableRipple",disabled:"disabled"}})}return i})();var sS=(()=>{class i extends jk{static \u0275fac=(()=>{let e;return function(r){return(e||(e=Fr(i)))(r||i)}})();static \u0275cmp=re({type:i,selectors:[["mat-list"]],hostAttrs:[1,"mat-mdc-list","mat-mdc-list-base","mdc-list"],exportAs:["matList"],features:[Si([{provide:jk,useExisting:i}]),nn],ngContentSelectors:rMe,decls:1,vars:0,template:function(n,r){n&1&&(ki(),Gt(0))},styles:[oMe],encapsulation:2,changeDetection:0})}return i})(),lS=(()=>{class i extends gMe{_lines;_titles;_meta;_unscopedContent;_itemText;get activated(){return this._activated}set activated(e){this._activated=_o(e)}_activated=!1;_getAriaCurrent(){return this._hostElement.nodeName==="A"&&this._activated?"page":null}_hasBothLeadingAndTrailing(){return this._meta.length!==0&&(this._avatars.length!==0||this._icons.length!==0)}static \u0275fac=(()=>{let e;return function(r){return(e||(e=Fr(i)))(r||i)}})();static \u0275cmp=re({type:i,selectors:[["mat-list-item"],["a","mat-list-item",""],["button","mat-list-item",""]],contentQueries:function(n,r,o){if(n&1&&(_n(o,hMe,5),_n(o,uMe,5),_n(o,fMe,5)),n&2){let a;mt(a=pt())&&(r._lines=a),mt(a=pt())&&(r._titles=a),mt(a=pt())&&(r._meta=a)}},viewQuery:function(n,r){if(n&1&&(Nt(aMe,5),Nt(sMe,5)),n&2){let o;mt(o=pt())&&(r._unscopedContent=o.first),mt(o=pt())&&(r._itemText=o.first)}},hostAttrs:[1,"mat-mdc-list-item","mdc-list-item"],hostVars:13,hostBindings:function(n,r){n&2&&(ni("aria-current",r._getAriaCurrent()),yt("mdc-list-item--activated",r.activated)("mdc-list-item--with-leading-avatar",r._avatars.length!==0)("mdc-list-item--with-leading-icon",r._icons.length!==0)("mdc-list-item--with-trailing-meta",r._meta.length!==0)("mat-mdc-list-item-both-leading-and-trailing",r._hasBothLeadingAndTrailing())("_mat-animation-noopable",r._noopAnimations))},inputs:{activated:"activated"},exportAs:["matListItem"],features:[nn],ngContentSelectors:cMe,decls:10,vars:0,consts:[["unscopedContent",""],[1,"mdc-list-item__content"],[1,"mat-mdc-list-item-unscoped-content",3,"cdkObserveContent"],[1,"mat-focus-indicator"]],template:function(n,r){if(n&1){let o=st();ki(lMe),Gt(0),S(1,"span",1),Gt(2,1),Gt(3,2),S(4,"span",2,0),he("cdkObserveContent",function(){return Ve(o),Qe(r._updateItemLines(!0))}),Gt(6,3),F()(),Gt(7,4),Gt(8,5),J(9,"div",3)}},dependencies:[g5],encapsulation:2,changeDetection:0})}return i})();function _Me(i,t){i&1&&(S(0,"mat-list-item"),j(1,"Add pattern via search or node context-menu"),F())}function bMe(i,t){if(i&1){let e=st();S(0,"mat-list-item",4)(1,"button",5),he("click",function(){let r=Ve(e).$implicit,o=me(2);return Qe(o.removeBlacklistEntry(r))}),J(2,"em",6),j(3),F()()}if(i&2){let e=t.$implicit;z("title",e.path),E(3),ct(" ",e.path," ")}}function vMe(i,t){if(i&1&&(S(0,"div"),ke(1,_Me,2,0,"mat-list-item"),xi(2,bMe,4,2,"mat-list-item",4,En),F()),i&2){let e=t;E(),Pe(e.length===0?1:-1),E(),wi(e)}}function yMe(i,t){i&1&&(S(0,"mat-list-item"),j(1,"Add pattern via search or node context-menu"),F())}function xMe(i,t){if(i&1){let e=st();S(0,"mat-list-item",4)(1,"button",5),he("click",function(){let r=Ve(e).$implicit,o=me(2);return Qe(o.removeBlacklistEntry(r))}),J(2,"em",6),j(3),F()()}if(i&2){let e=t.$implicit;z("title",e.path),E(3),ct(" ",e.path," ")}}function wMe(i,t){if(i&1&&(S(0,"div"),ke(1,yMe,2,0,"mat-list-item"),xi(2,xMe,4,2,"mat-list-item",4,En),F()),i&2){let e=t;E(),Pe(e.length===0?1:-1),E(),wi(e)}}var _j=(()=>{class i{constructor(e){this.store=e,this.flattenedItems$=this.store.select(Gb("flatten")),this.excludedItems$=this.store.select(Gb("exclude"))}removeBlacklistEntry(e){this.store.dispatch(dh({item:e}))}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-blacklist-panel"]],decls:14,vars:6,consts:[[1,"cc-blacklist-panel-list"],[1,"cc-header-text"],["matTooltip","Flattened nodes are shown as flat/short buildings and are included in folder metrics",1,"fa","fa-question-circle-o"],["matTooltip","Excluded buildings are not shown in the map and are not included in folder metrics",1,"fa","fa-question-circle-o"],[3,"title"],["mat-button","",3,"click"],["title","Remove list item",1,"fa","fa-minus-square"]],template:function(n,r){if(n&1&&(S(0,"mat-list",0)(1,"div")(2,"h3",1),j(3,"Flattened"),F(),J(4,"em",2),F(),ke(5,vMe,4,1,"div"),fe(6,"async"),F(),S(7,"mat-list",0)(8,"div")(9,"h3",1),j(10,"Excluded"),F(),J(11,"em",3),F(),ke(12,wMe,4,1,"div"),fe(13,"async"),F()),n&2){let o,a;E(5),Pe((o=_e(6,2,r.flattenedItems$))?5:-1,o),E(7),Pe((a=_e(13,4,r.excludedItems$))?12:-1,a)}},dependencies:[sS,ym,lS,Wi,dt],styles:["[_nghost-%COMP%] .cc-header-text[_ngcontent-%COMP%]{display:inline-block;margin:0 .25em 0 0}"]})}}return i})();var cS=(i,t,e)=>t.reduce((n,r)=>ga(r.path,e,i)?n+1:n,0),CMe=(i,t,e)=>{let n=i.filter(r=>Yi(r));return{fileCount:`${n.length}/${e.length}`,flattenCount:`${cS("flatten",n,t)}/${cS("flatten",e,t)}`,excludeCount:`${cS("exclude",n,t)}/${cS("exclude",e,t)}`}},bj=Re(ww,kr,Sh,CMe);var vj=(()=>{class i{constructor(e){this.store=e}ngOnInit(){this.isSearchPanelPinned$=this.store.select(nS)}onClick(){this.store.dispatch(dg())}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-thumb-tack-button"]],decls:3,vars:3,consts:[["title","Pin file explorer",1,"box-rounded",3,"click","ngClass"],[1,"fa","fa-thumb-tack"]],template:function(n,r){n&1&&(S(0,"button",0),fe(1,"async"),he("click",function(){return r.onClick()}),J(2,"i",1),F()),n&2&&z("ngClass",_e(1,1,r.isSearchPanelPinned$)?"pinned":"")},dependencies:[ko,dt],styles:[".pinned[_ngcontent-%COMP%]{background-color:#979797}button[_ngcontent-%COMP%]{height:25px;background:#e6e6e6;padding:1px 8px}.box-rounded[_ngcontent-%COMP%]{display:inline-block;font-weight:400;line-height:17px;font-size:10pt;margin-top:2px;min-width:20px;border-radius:4px;text-align:center}"]})}}return i})();var dS=Re(hi,i=>i.sortingOrderAscending);var yj=(()=>{class i{constructor(e){this.store=e}ngOnInit(){this.sortingOrderAscending$=this.store.select(dS)}onClick(){this.store.dispatch(sg())}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-sorting-button"]],decls:4,vars:7,consts:[[1,"box-rounded",3,"click","title"],[3,"className"]],template:function(n,r){n&1&&(Ut(0,"button",0),fe(1,"async"),fr("click",function(){return r.onClick()}),Ti(2,"i",1),fe(3,"async"),qt()),n&2&&(sn("title",fo("Toggle sort order (currently ",_e(1,3,r.sortingOrderAscending$)?"ascending":"descending",")")),E(2),sn("className",_e(3,5,r.sortingOrderAscending$)?"fa fa-sort-amount-asc":"fa fa-sort-amount-desc"))},dependencies:[dt],styles:["button[_ngcontent-%COMP%]{height:25px;background:#e6e6e6;padding:1px 8px}.box-rounded[_ngcontent-%COMP%]{display:inline-block;font-weight:400;line-height:17px;font-size:10pt;margin-top:2px;min-width:20px;border-radius:4px;text-align:center}"]})}}return i})();var uS=Re(_r,i=>i.sortingOption);function MMe(i,t){if(i&1&&(S(0,"mat-option",1),j(1),F()),i&2){let e=t.$implicit;z("value",e),E(),ct(" ",e," ")}}var xj=(()=>{class i{constructor(e){this.store=e,this.sortingOptions=Object.values(mu),this.selectedSortingOption$=e.select(uS)}handleSelectedSortingOptionChanged(e){this.store.dispatch(fh({value:e.value}))}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-sorting-option"]],decls:4,vars:3,consts:[["title","Sort by","panelClass","cc-sorting-option",1,"sorting-option-select",3,"selectionChange","value"],[3,"value"]],template:function(n,r){n&1&&(S(0,"mat-select",0),fe(1,"async"),he("selectionChange",function(a){return r.handleSelectedSortingOptionChanged(a)}),xi(2,MMe,2,2,"mat-option",1,En),F()),n&2&&(z("value",_e(1,1,r.selectedSortingOption$)),E(2),wi(r.sortingOptions))},dependencies:[Qo,Zr,dt],styles:[".sorting-option-select[_ngcontent-%COMP%]{max-width:88px}"]})}}return i})();function SMe(i,t){if(i&1&&(S(0,"span",0),j(1),J(2,"i",1),F(),S(3,"span",2),j(4),J(5,"img",3),F(),S(6,"span",4),j(7),J(8,"i",5),F(),S(9,"div",6),J(10,"cc-thumb-tack-button"),F(),S(11,"div",6),J(12,"cc-sorting-button")(13,"cc-sorting-option"),F()),i&2){let e=t;E(),Ai(e.fileCount),E(3),Ai(e.flattenCount),E(3),Ai(e.excludeCount)}}var wj=(()=>{class i{constructor(e){this.matchingFileCounters$=e.select(bj)}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-matching-files-counter"]],decls:2,vars:3,consts:[["title","Files matching search pattern",1,"box-rounded","node-count"],[1,"fa","fa-file"],["title","Files flattened",1,"box-rounded","node-count",2,"display","inline-flex"],["alt","flattenIcon","src","codeCharta/assets/flatten.png",1,"fa","png-icon-files-counter"],["title","Files excluded",1,"box-rounded","node-count"],[1,"fa","fa-ban"],[1,"clickable-component"]],template:function(n,r){if(n&1&&(ke(0,SMe,14,3),fe(1,"async")),n&2){let o;Pe((o=_e(1,1,r.matchingFileCounters$))?0:-1,o)}},dependencies:[vj,yj,xj,dt],styles:["[_nghost-%COMP%] .node-count[_ngcontent-%COMP%]{background:#eee;color:#000;padding:4px 8px;margin-right:8px}[_nghost-%COMP%] .node-count[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-left:6px}[_nghost-%COMP%] .box-rounded[_ngcontent-%COMP%]{display:inline-block;font-weight:400;line-height:17px;font-size:10pt;margin-top:2px;min-width:20px;border-radius:4px;text-align:center}[_nghost-%COMP%] .png-icon-files-counter[_ngcontent-%COMP%]{width:19px;height:16px;margin-left:6px}[_nghost-%COMP%] .clickable-component[_ngcontent-%COMP%]{display:inline-block;color:#000;margin-left:-9px}"]})}}return i})();function Lc(i){if(typeof i!="object")return i;var t,e,n=Object.prototype.toString.call(i);if(n==="[object Object]"){if(i.constructor!==Object&&typeof i.constructor=="function"){e=new i.constructor;for(t in i)i.hasOwnProperty(t)&&e[t]!==i[t]&&(e[t]=Lc(i[t]))}else{e={};for(t in i)t==="__proto__"?Object.defineProperty(e,t,{value:Lc(i[t]),configurable:!0,enumerable:!0,writable:!0}):e[t]=Lc(i[t])}return e}if(n==="[object Array]"){for(t=i.length,e=Array(t);t--;)e[t]=Lc(i[t]);return e}return n==="[object Set]"?(e=new Set,i.forEach(function(r){e.add(Lc(r))}),e):n==="[object Map]"?(e=new Map,i.forEach(function(r,o){e.set(Lc(o),Lc(r))}),e):n==="[object Date]"?new Date(+i):n==="[object RegExp]"?(e=new RegExp(i.source,i.flags),e.lastIndex=i.lastIndex,e):n==="[object DataView]"?new i.constructor(Lc(i.buffer)):n==="[object ArrayBuffer]"?i.slice(0):n.slice(-6)==="Array]"?new i.constructor(i):i}var EMe=new Intl.Collator(void 0,{numeric:!0,sensitivity:"base"}),Cj=i=>(t,e)=>{let n=EMe.compare(t.name,e.name);return i?n:n*-1},TMe=i=>(t,e)=>{let n=t.attributes.unary-e.attributes.unary;return i?n:n*-1},BMe=(i,t)=>(e,n)=>{let r=e.attributes[i]??0,o=n.attributes[i]??0;return(t?r-o:o-r)||Cj(t)(e,n)},FMe=(i,t,e)=>{switch(i){case mu.AREA_SIZE:return BMe(e,t);case mu.NUMBER_OF_FILES:return TMe(t);default:return Cj(t)}},IMe=(i,t)=>{let e=[],n=[];for(let r of t.children)r.type===Zn.FOLDER?e.push(r):n.push(r);return e.sort(i),n.sort(i),[...e,...n]},$k=(i,t,e,n)=>{if(!i?.children||i.children.length===0)return i;for(let o of i.children)o.type===Zn.FOLDER&&$k(o,t,e,n);let r=FMe(t,e,n);return i.children=IMe(r,i),i};var Mj=Re(br,uS,dS,Or,(i,t,e,n)=>$k(Lc(i.unifiedMapNode),t,e,n));var hS=Re(lp,i=>i.rightClickedNodeData);var fS=(()=>{class i{transform(e,n){return $b(e,n)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275pipe=an({name:"areaMetricValid",type:i,pure:!0})}}return i})();function $b(i,t){return i.deltas?.[t]<0||i.attributes?.[t]>0}var Sj=(()=>{class i{transform(e,n){return Yi(e)?"fa fa-file-o":n?"fa fa-folder-open":"fa fa-folder"}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275pipe=an({name:"mapTreeViewItemIconClass",type:i,pure:!0})}}return i})();var Ej=(()=>{class i{static{this.defaultColor="#000000"}static{this.areMetricZeroColor="#BDBDBD"}constructor(e){this.state=e}transform(e){let{areaMetric:n}=this.state.getValue().dynamicSettings;return $b(e,n)?Yi(e)?void 0:Ff(e,this.state.getValue().fileSettings.markedPackages)||i.defaultColor:i.areMetricZeroColor}static{this.\u0275fac=function(n){return new(n||i)(se(bi,16))}}static{this.\u0275pipe=an({name:"mapTreeViewItemIconColor",type:i,pure:!1})}}return i})();var Tj=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=re({type:i,selectors:[["cc-map-tree-view-item-icon"]],inputs:{node:"node",isOpen:"isOpen"},decls:3,vars:9,consts:[["role","img","aria-hidden","true"]],template:function(n,r){n&1&&(Ti(0,"span",0),fe(1,"mapTreeViewItemIconClass"),fe(2,"mapTreeViewItemIconColor")),n&2&&(Xi(dn(1,4,r.node,r.isOpen)),pi("color",_e(2,7,r.node)))},dependencies:[Sj,Ej],encapsulation:2})}}return i})();var Bj=Re(br,i=>i.unifiedMapNode?.attributes.unary);var mS=(()=>{class i{transform(e){return Yi(e)}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275pipe=an({name:"isNodeLeaf",type:i,pure:!0})}}return i})();function DMe(i,t){if(i&1&&(S(0,"span"),j(1),fe(2,"async"),F()),i&2){let e=me(2);E(),ct("",(100*e.unaryValue/_e(2,1,e.rootUnary$)).toFixed(0),"%")}}function kMe(i,t){i&1&&j(0,"File")}function PMe(i,t){i&1&&j(0,"Files")}function RMe(i,t){if(i&1&&(S(0,"span",2),j(1),Sn(2,kMe,1,0,"ng-template",3)(3,PMe,1,0,"ng-template",4),F()),i&2){let e=me(2);z("ngPlural",e.unaryValue),E(),ct(" ",e.unaryValue," ")}}function OMe(i,t){if(i&1&&(S(0,"span",1),ke(1,DMe,3,3,"span")(2,RMe,4,2,"span",2),F()),i&2){let e=me();E(),Pe(e.isHovered?2:1)}}var Fj=(()=>{class i{constructor(e){this.searchedNodePaths$=e.select(tb),this.rootUnary$=e.select(Bj),this.areaMetric$=e.select(Or)}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-map-tree-view-item-name"]],inputs:{node:"node",isHovered:"isHovered",unaryValue:"unaryValue",unaryPercentage:"unaryPercentage"},decls:7,vars:17,consts:[[1,"node-name"],[1,"unary-number"],[3,"ngPlural"],["ngPluralCase","=1"],["ngPluralCase","other"]],template:function(n,r){n&1&&(S(0,"span",0),fe(1,"async"),fe(2,"areaMetricValid"),fe(3,"async"),j(4),F(),ke(5,OMe,3,1,"span",1),fe(6,"isNodeLeaf")),n&2&&(yt("flattened",r.node.isFlattened)("noAreaMetric",!dn(2,10,r.node,_e(1,8,r.areaMetric$)))("tree-search-result",_e(3,13,r.searchedNodePaths$).has(r.node.path)),E(4),ct(" ",r.node.name,`
|
|
5188
5188
|
`),E(),Pe(_e(6,15,r.node)?-1:5))},dependencies:[Ay,rT,dt,fS,mS],styles:[".unary-number[_ngcontent-%COMP%]{color:#a3a3a3;font-size:.8em;margin-top:1px}.node-name.flattened[_ngcontent-%COMP%]{color:gray}.node-name.noAreaMetric[_ngcontent-%COMP%]{color:#bdbdbd}.tree-search-result[_ngcontent-%COMP%]{background-color:#fc801bab}"]})}}return i})();function LMe(i,t){i&1&&Ti(0,"i",1)}var Ij=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=re({type:i,selectors:[["cc-map-tree-view-item-option-buttons"]],inputs:{isFlattened:"isFlattened",openNodeContextMenu:"openNodeContextMenu"},decls:5,vars:1,consts:[["role","button","aria-hidden","true",1,"right-aligned"],["title","Flattened",1,"flattened","fa","fa-eye-slash"],[1,"small-action-button"],["title","Open Node-Context-Menu",3,"click"],[1,"fa","fa-ellipsis-h"]],template:function(n,r){n&1&&(Ut(0,"span",0),ke(1,LMe,1,0,"i",1),Ut(2,"div",2)(3,"button",3),fr("click",function(a){return r.openNodeContextMenu(a)}),Ti(4,"i",4),qt()()()),n&2&&(E(),Pe(r.isFlattened?1:-1))},styles:["button[_ngcontent-%COMP%]{display:inline-block;height:19px;width:24px;min-height:0;margin:0;background-color:transparent;box-shadow:none;vertical-align:top}button[_ngcontent-%COMP%]:hover{background-color:#ddd;color:#000000de}button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{position:absolute;top:2px;left:6px}.right-aligned[_ngcontent-%COMP%]{position:absolute;right:6px}.right-aligned[_ngcontent-%COMP%] i.flattened[_ngcontent-%COMP%]{color:gray}"]})}}return i})();var pS=class extends ju{constructor(t,e){super(t,e),this.screenSpacePanning=!1,this.mouseButtons={LEFT:wa.PAN,MIDDLE:wa.DOLLY,RIGHT:wa.ROTATE},this.touches={ONE:dc.PAN,TWO:dc.DOLLY_ROTATE}}};var yr=(()=>{class i{static{this.CAMERA_CHANGED_EVENT_NAME="camera-changed"}constructor(e,n,r){this.threeCameraService=e,this.threeSceneService=n,this.threeRendererService=r,this.MAX_ZOOM=200,this.MIN_ZOOM=10,this.eventEmitter=new Wu,this.zoomPercentage$=new Ol(100)}setControlTarget(e){this.controls.target.set(e.x,e.y,e.z)}updateControls(){this.controls.update()}rotateCameraInVectorDirection(e,n,r){let o=this.getZoom();this.lookAtDirectionFromTarget(e,n,r),this.applyOldZoom(o),this.threeRendererService.render(),this.onInput(this.threeCameraService.camera)}autoFitTo(){setTimeout(()=>{let e=this.getBoundingSphere();if(e.radius===-1)return;let n=this.cameraPerspectiveLengthCalculation(e);this.threeCameraService.camera.position.set(n,n,e.center.z),this.updateControls(),this.focusCameraViewToCenter(e),this.threeRendererService.render(),this.onInput(this.threeCameraService.camera);let o=1.3;this.controls.maxDistance=n*4,this.controls.minDistance=e.radius/(10*o),this.setZoomPercentage(140)})}cameraPerspectiveLengthCalculation(e){let o=this.threeCameraService.camera.fov*Math.PI/180*1.3,a=e.radius/Math.tan(o/2);return Math.sqrt(Math.pow(a,2)+Math.pow(a,2))}focusCameraViewToCenter(e){let n=e.center.clone();n.setY(0),this.controls.target.set(n.x,n.y,n.z),this.threeCameraService.camera.lookAt(n),this.threeCameraService.camera.updateProjectionMatrix()}getBoundingSphere(){return new Lo().setFromObject(this.threeSceneService.mapGeometry).getBoundingSphere(new sc)}lookAtDirectionFromTarget(e,n,r){this.threeCameraService.camera.position.set(this.controls.target.x,this.controls.target.y,this.controls.target.z);let o=new Ui(new xa(20,20,20),new Jx);this.threeSceneService.scene.add(o),o.position.set(this.controls.target.x,this.controls.target.y,this.controls.target.z),o.translateX(e),o.translateY(n),o.translateZ(r),this.threeCameraService.camera.lookAt(o.getWorldPosition(o.position)),this.threeSceneService.scene.remove(o)}getZoom(){return this.threeCameraService.camera.position.distanceTo(this.controls.target)}applyOldZoom(e){this.threeCameraService.camera.translateZ(e)}init(e){this.controls=new pS(this.threeCameraService.camera,e),this.controls.mouseButtons={LEFT:wa.ROTATE,MIDDLE:wa.DOLLY,RIGHT:wa.PAN},this.controls.zoomToCursor=!0;let n=r=>{this.controls.zoomToCursor=!r.altKey};window.addEventListener("keydown",n),window.addEventListener("keyup",n),window.addEventListener("mousemove",n),this.controls.minPolarAngle=0,this.controls.maxPolarAngle=Math.PI/2,this.controls.listenToKeyEvents(window),this.controls.addEventListener("change",()=>{this.onInput(this.threeCameraService.camera),this.updateZoomPercentage(),this.threeRendererService.render()}),this.updateZoomPercentage()}onInput(e){this.setControlTarget(this.controls.target),this.eventEmitter.emit("onCameraChanged",{camera:e})}subscribe(e,n){this.eventEmitter.on(e,r=>{n(r)})}getZoomPercentage(e){let n=this.controls.minDistance,r=this.controls.maxDistance;if(e<=n)return this.MAX_ZOOM;if(e>=r)return this.MIN_ZOOM;let o=r-n;return this.MAX_ZOOM-(e-n)/o*(this.MAX_ZOOM-this.MIN_ZOOM)}getDistanceFromZoomPercentage(e){let n=this.controls.minDistance,o=this.controls.maxDistance-n;return n+(this.MAX_ZOOM-e)/(this.MAX_ZOOM-this.MIN_ZOOM)*o}updateZoomPercentage(){let e=this.threeCameraService.camera.position.distanceTo(this.controls.target),n=this.getZoomPercentage(e);this.zoomPercentage$.next(n)}setZoomPercentage(e){let n=this.getDistanceFromZoomPercentage(e),r=new ce().subVectors(this.threeCameraService.camera.position,this.controls.target).normalize();this.threeCameraService.camera.position.copy(this.controls.target).add(r.multiplyScalar(n)),this.updateControls(),this.zoomPercentage$.next(e)}static{this.\u0275fac=function(n){return new(n||i)(Me(Kr),Me(vr),Me(Rr))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var AS=(()=>{class i{constructor(e,n,r,o){this.state=e,this.threeCameraService=n,this.threeSceneService=r,this.threeMapControlsService=o,this.mapLabelColors=sa.labelColorAndAlpha,this.LABEL_COLOR_RGB=Ji.convertHexToRgba(this.mapLabelColors.rgb),this.LABEL_WIDTH_DIVISOR=2100,this.LABEL_HEIGHT_DIVISOR=35,this.LABEL_CORNER_RADIUS=40,this.LABEL_SCALE_FACTOR=.7,this.LABEL_HEIGHT_COEFFICIENT=15/4,this.LABEL_HEIGHT_POSITION=60,this.previousScaling=new ce(1,1,1),this.lineCount=1,this.nodeHeight=0,this.labels=new Array,this.threeMapControlsService.subscribe("onCameraChanged",()=>this.onCameraChanged())}addLeafLabel(e,n,r=!1){let{appSettings:o,dynamicSettings:a}=this.state.getValue(),{scaling:s,layoutAlgorithm:l,showMetricLabelNodeName:c,showMetricLabelNameValue:d}=o,{margin:h,heightMetric:u}=a,f=new ce(s.x,s.y,s.z),_="";if(c||r&&!d)_=`${e.name}`;else if(!d)return;d&&(_!==""&&(_+=`
|
|
5189
5189
|
`),_+=`${e.attributes[u]} ${u}`);let y=this.makeText(_,30,e),b=e.height+Math.abs(e.heightDelta??0);b=b*f.y>n*f.y?b:n,this.nodeHeight=this.nodeHeight>b?this.nodeHeight:b;let v=e.x0-jn,M=e.z0,x=e.y0-jn,w=(v+e.width/2)*f.x,k=(M+this.nodeHeight)*f.y,P=(M+e.height)*f.y,D=(x+e.length/2)*f.z,O=this.LABEL_HEIGHT_COEFFICIENT*h*this.LABEL_SCALE_FACTOR,T=O+y.heightValue/2;switch(l){case ea.StreetMap:case ea.TreeMapStreet:T/=10,this.LABEL_HEIGHT_POSITION=0,y.line=this.makeLine(w,k+T,P,D);break;default:y.line=this.makeLine(w,k+O/2,P,D)}y.sprite.position.set(w,k+T,D),y.sprite.material.color=new di(this.mapLabelColors.rgb),y.sprite.material.opacity=this.mapLabelColors.alpha,y.sprite.userData={node:e},this.threeSceneService.labels.add(y.sprite),this.threeSceneService.labels.add(y.line),this.labels.push(y)}clearLabels(){this.threeSceneService.resetLabel(),this.threeSceneService.resetLineHighlight(),this.dispose(this.labels),this.labels=[],this.nodeHeight=0,this.LABEL_HEIGHT_POSITION=60,this.dispose(this.threeSceneService.labels.children),this.threeSceneService.labels.children=[]}disposeSprite(e){e.material.dispose(),e.material.map.dispose(),e.geometry.dispose()}disposeLine(e){e.material.dispose(),e.geometry.dispose()}dispose(e){for(let n of e)n instanceof q_&&this.disposeSprite(n),n instanceof vl&&this.disposeLine(n),n.sprite!==void 0&&this.disposeSprite(n.sprite),n.line!==void 0&&this.disposeLine(n.line)}clearTemporaryLabel(e){let n=this.labels.findIndex(({node:r})=>r===e);n>-1&&(this.labels.splice(n,1),this.dispose(this.threeSceneService.labels.children),this.threeSceneService.labels.children.length-=2,this.threeSceneService.resetLineHighlight())}scale(){let{scaling:e}=this.state.getValue().appSettings,n=new ce(e.x,e.y,e.z),{margin:r}=this.state.getValue().dynamicSettings,o=new ce(0,this.LABEL_HEIGHT_COEFFICIENT*r*this.LABEL_SCALE_FACTOR,0);for(let a of this.labels){let s=n.clone();a.sprite.position.sub(o).divide(this.previousScaling).multiply(s).add(o),s.y>1&&(s.y=1);let c=a.line.geometry.attributes.position;c.setX(0,c.getX(0)*s.x),c.setY(0,c.getY(0)*s.y),c.setZ(0,c.getZ(0)*s.z),c.setX(1,a.sprite.position.x),c.setY(1,a.sprite.position.y),c.setZ(1,a.sprite.position.z),c.needsUpdate=!0}this.previousScaling.copy(n)}onCameraChanged(){for(let e of this.labels)this.setLabelSize(e.sprite,e,e.sprite.material.map.image.width)}makeText(e,n,r){let o=document.createElement("canvas"),a=o.getContext("2d");a.font=`${n}px Roboto`;let s=25,l=e.split(`
|
|
5190
5190
|
`),c=a.measureText(l[0]).width,d=a.measureText(l[1]).width;o.width=c>d?c+s:d+s,o.height=s+n*l.length,a.font=`${n}px Roboto`,a.fillStyle="rgba(255,255,255,1)",a.lineJoin="round",a.lineCap="round",a.lineWidth=5,i.drawRectangleWithRoundedCorners(a,0,0,o.width,o.height,this.LABEL_CORNER_RADIUS),a.fillStyle="rgba(0,0,0,1)",a.textAlign="center",a.textBaseline="middle";for(let[_,y]of l.entries())a.fillText(y,o.width/2,o.height*(_+1)/(l.length+1));let h=new uc(o);h.minFilter=as,h.needsUpdate=!0;let u=new z_({map:h}),f=new q_(u);return this.lineCount=l.length,this.setLabelSize(f,null,o.width),{sprite:f,heightValue:o.height,line:null,lineCount:l.length,node:r}}static drawRectangleWithRoundedCorners(e,n,r,o,a,s){o<2*s&&(s=o/2),a<2*s&&(s=a/2),e.beginPath(),e.moveTo(n+s,r),e.arcTo(n+o,r,n+o,r+a,s),e.arcTo(n+o,r+a,n,r+a,s),e.arcTo(n,r+a,n,r,s),e.arcTo(n,r,n+o,r,s),e.closePath(),e.fill()}setLabelSize(e,n,r=e.material.map.image.width){let o=new Lo().setFromObject(this.threeSceneService.mapGeometry).getBoundingSphere(new sc).center;if(this.threeCameraService.camera){let a=this.threeCameraService.camera.position.distanceTo(o);n!==null&&(this.lineCount=n.lineCount),this.lineCount>1?e.scale.set(a/this.LABEL_WIDTH_DIVISOR*r,a/25,1):e.scale.set(a/this.LABEL_WIDTH_DIVISOR*r,a/this.LABEL_HEIGHT_DIVISOR,1)}}makeLine(e,n,r,o){let a=new cc({color:this.LABEL_COLOR_RGB,linewidth:2}),s=new wn().setFromPoints([new ce(e,r,o),new ce(e,n+this.LABEL_HEIGHT_POSITION,o)]);return new vl(s,a)}static{this.\u0275fac=function(n){return new(n||i)(Me(bi),Me(Kr),Me(vr),Me(yr))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var gS=(()=>{class i{constructor(e){this.threeMapControlsService=e,this.eventEmitter=new Wu,this.currentlyHovered=null,this.isDragging=!1}init(e,n,r){this.cubeGroup=e,this.camera=n,this.renderer=r,this.initOrbitalControl(n,r),this.initRendererEventListeners(r)}resetIsDragging(){this.isDragging=!1}initOrbitalControl(e,n){this.controls=new ju(e,n.domElement),this.controls.maxPolarAngle=Math.PI/2,this.controls.enableZoom=!1,this.controls.enablePan=!1,this.controls.rotateSpeed=1}initRendererEventListeners(e){e.domElement.addEventListener("mousemove",n=>this.onDocumentMouseMove(n)),e.domElement.addEventListener("mouseup",n=>this.onDocumentMouseUp(n)),e.domElement.addEventListener("mousedown",n=>this.onDocumentMouseClick(n,"mousedown")),e.domElement.addEventListener("dblclick",n=>this.onDocumentMouseClick(n,"dblclick")),e.domElement.addEventListener("mouseleave",n=>this.onWindowMouseLeave(n)),e.domElement.addEventListener("mouseenter",()=>this.onDocumentMouseEnter())}onDocumentMouseClick(e,n){this.isDragging=!0,this.checkMouseIntersection(e,n)}onWindowMouseLeave(e){(e.relatedTarget==null||!(e.relatedTarget instanceof HTMLCanvasElement))&&this.enableRotation(!1)}onDocumentMouseEnter(){this.enableRotation(!0)}enableRotation(e){this.controls.enableRotate=e}checkMouseIntersection(e,n){this.getCubeIntersectedByMouse(e)||this.eventEmitter.emit("viewCubeEventPropagation",{type:n,event:e})}getCubeIntersectedByMouse(e){let n=this.transformIntoCanvasVector(e),r=new yA;r.setFromCamera(n,this.camera);let o=[];for(let s of Ni(this.cubeGroup))Yi(s)&&o.push(s.data);let[a]=r.intersectObjects(o);return a?a.object:null}transformIntoCanvasVector(e){let{domElement:n}=this.renderer,r=this.renderer.getPixelRatio(),o=n.getBoundingClientRect(),a=(e.clientX-o.left)/n.width*r*2-1,s=-((e.clientY-o.top)/n.height*r)*2+1;return new qe(a,s)}propagateMovement(){if(this.isDragging){let e=this.camera.position;this.threeMapControlsService.rotateCameraInVectorDirection(-e.x,-e.y,-e.z)}return this.isDragging}onDocumentMouseMove(e){if(this.propagateMovement())return;let n=this.getCubeIntersectedByMouse(e);n?this.currentlyHovered&&n.uuid!==this.currentlyHovered.uuid?this.triggerViewCubeUnhoverEvent():this.currentlyHovered||this.triggerViewCubeHoverEvent(n):(this.currentlyHovered&&this.triggerViewCubeUnhoverEvent(),this.eventEmitter.emit("viewCubeEventPropagation",{type:"mousemove",event:e}))}onDocumentMouseUp(e){this.isDragging=!1;let n=this.getCubeIntersectedByMouse(e);n?this.eventEmitter.emit("viewCubeClicked",{cube:n}):this.eventEmitter.emit("viewCubeEventPropagation",{type:"mouseup",event:e})}triggerViewCubeHoverEvent(e){this.currentlyHovered=e,Hd.changeCursorIndicator(Nc.Pointer),this.eventEmitter.emit("viewCubeHoveredEvent",{cube:e})}triggerViewCubeUnhoverEvent(){this.currentlyHovered=null,Hd.changeCursorIndicator(Nc.Default),this.eventEmitter.emit("viewCubeUnHoveredEvent")}subscribe(e,n){this.eventEmitter.on(e,r=>{n(r)})}static{this.\u0275fac=function(n){return new(n||i)(Me(yr))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Xb=function(){var i=0,t=document.createElement("div");t.style.cssText="position:fixed;top:0;left:0;cursor:pointer;opacity:0.9;z-index:10000",t.addEventListener("click",function(d){d.preventDefault(),n(++i%t.children.length)},!1);function e(d){return t.appendChild(d.dom),d}function n(d){for(var h=0;h<t.children.length;h++)t.children[h].style.display=h===d?"block":"none";i=d}var r=(performance||Date).now(),o=r,a=0,s=e(new Xb.Panel("FPS","#0ff","#002")),l=e(new Xb.Panel("MS","#0f0","#020"));if(self.performance&&self.performance.memory)var c=e(new Xb.Panel("MB","#f08","#201"));return n(0),{REVISION:16,dom:t,addPanel:e,showPanel:n,begin:function(){r=(performance||Date).now()},end:function(){a++;var d=(performance||Date).now();if(l.update(d-r,200),d>=o+1e3&&(s.update(a*1e3/(d-o),100),o=d,a=0,c)){var h=performance.memory;c.update(h.usedJSHeapSize/1048576,h.jsHeapSizeLimit/1048576)}return d},update:function(){r=this.end()},domElement:t,setMode:n}};Xb.Panel=function(i,t,e){var n=1/0,r=0,o=Math.round,a=o(window.devicePixelRatio||1),s=80*a,l=48*a,c=3*a,d=2*a,h=3*a,u=15*a,f=74*a,_=30*a,y=document.createElement("canvas");y.width=s,y.height=l,y.style.cssText="width:80px;height:48px";var b=y.getContext("2d");return b.font="bold "+9*a+"px Helvetica,Arial,sans-serif",b.textBaseline="top",b.fillStyle=e,b.fillRect(0,0,s,l),b.fillStyle=t,b.fillText(i,c,d),b.fillRect(h,u,f,_),b.fillStyle=e,b.globalAlpha=.9,b.fillRect(h,u,f,_),{dom:y,update:function(v,M){n=Math.min(n,v),r=Math.max(r,v),b.fillStyle=e,b.globalAlpha=1,b.fillRect(0,0,s,u),b.fillStyle=t,b.fillText(o(v)+" "+i+" ("+o(n)+"-"+o(r)+")",c,d),b.drawImage(y,h+a,u,f-a,_,h,u,f-a,_),b.fillRect(h+f-a,u,a,_),b.fillStyle=e,b.globalAlpha=.9,b.fillRect(h+f-a,u,a,o((1-v/M)*_))}}};var _g=Xb;var NMe=1e3,_S=(()=>{class i{constructor(e){this.threeRendererService=e,this.isDevelopmentMode=Jm(),this.init=n=>{this.isDevelopmentMode&&(this.stats=new _g,this.stats.dom.style.position="absolute",this.stats.dom.style.left="0",this.stats.dom.style.top="0",n.append(this.stats.dom),this.generateStatPanels(),this.prevTime=this.getTimeFunctor().now())},this.getTimeFunctor=()=>typeof performance>"u"?Date:performance,this.generateStatPanels=()=>{this.trianglesPanel={panel:this.stats.addPanel(new _g.Panel("triangles","#ff8","#221")),maxHeight:0},this.glCallsPanel={panel:this.stats.addPanel(new _g.Panel("calls","#f8f","#212")),maxHeight:0},this.geometryMemoryPanel={panel:this.stats.addPanel(new _g.Panel("geo. mem","#f08","#221")),maxHeight:0},this.textureMemoryPanel={panel:this.stats.addPanel(new _g.Panel("tex. mem","#0f8","#221")),maxHeight:0},this.stats.showPanel(3)},this.updateStats=()=>{if(this.isDevelopmentMode){let n=this.getTimeFunctor().now();if(n>=this.prevTime+NMe){this.prevTime=n;let r=this.threeRendererService.getInfo(),o=this.threeRendererService.getMemoryInfo();this.processPanel(this.trianglesPanel,r.triangles),this.processPanel(this.glCallsPanel,r.calls),this.processPanel(this.geometryMemoryPanel,o.geometries),this.processPanel(this.textureMemoryPanel,o.textures)}this.stats.update()}},this.resetPanels=()=>{if(this.isDevelopmentMode)for(let n of[this.trianglesPanel,this.glCallsPanel,this.geometryMemoryPanel,this.textureMemoryPanel])n!==void 0&&(n.maxHeight=0)},this.processPanel=(n,r)=>{n.maxHeight=Math.max(n.maxHeight,r),n.panel.update(r,n.maxHeight*1.3)},this.destroy=()=>{this.isDevelopmentMode&&this.stats.dom.remove()}}static{this.\u0275fac=function(n){return new(n||i)(Me(Rr))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var bS=(()=>{class i{constructor(e,n,r,o,a){this.threeSceneService=e,this.threeCameraService=n,this.threeMapControlsService=r,this.threeRendererService=o,this.threeStatsService=a,this.onWindowResize=()=>{this.threeSceneService.scene.updateMatrixWorld(!1),this.threeRendererService.renderer.setSize(window.innerWidth,window.innerHeight),this.threeCameraService.camera.aspect=window.innerWidth/window.innerHeight,this.threeCameraService.camera.updateProjectionMatrix(),this.animate()},this.onFocusIn=s=>{s.target.nodeName==="INPUT"&&this.threeMapControlsService.controls.stopListenToKeyEvents()},this.onFocusOut=s=>{s.target.nodeName==="INPUT"&&this.threeMapControlsService.controls.listenToKeyEvents(window)}}init(e){this.threeCameraService.init(window.innerWidth,window.innerHeight);let n=this.threeCameraService.camera,r=this.threeSceneService.scene;n.lookAt(r.position),r.add(n),this.threeRendererService.init(window.innerWidth,window.innerHeight,r,n),this.threeStatsService.init(e),this.threeMapControlsService.init(this.threeRendererService.renderer.domElement),e.append(this.threeRendererService.renderer.domElement),window.addEventListener("resize",this.onWindowResize),window.addEventListener("focusin",this.onFocusIn),window.addEventListener("focusout",this.onFocusOut),this.animate(),this.animateStats()}restart(e){this.stopAnimate(),this.destroy(),this.init(e),this.autoFitTo(),this.animate(),this.animateStats()}enableRotation(e){this.threeMapControlsService.controls.enableRotate=e}animate(){this.threeMapControlsService.controls.update(),this.threeRendererService.render()}animateStats(){this.animationFrameId=requestAnimationFrame(()=>this.animateStats()),this.threeStatsService.updateStats()}getRenderCanvas(){return this.threeRendererService.renderer.domElement}getRenderLoseExtention(){return this.threeRendererService.renderer.getContext().getExtension("WEBGL_lose_context")}autoFitTo(){this.threeMapControlsService.autoFitTo()}stopAnimate(){cancelAnimationFrame(this.animationFrameId)}dispose(){this.threeRendererService?.composer?.dispose(),this.threeRendererService?.renderer?.dispose()}destroy(){window.removeEventListener("resize",this.onWindowResize),window.removeEventListener("focusin",this.onFocusIn),window.removeEventListener("focusout",this.onFocusOut),this.dispose(),this.threeStatsService.destroy(),this.getRenderCanvas().remove(),this.dispose()}static{this.\u0275fac=function(n){return new(n||i)(Me(vr),Me(Kr),Me(yr),Me(Rr),Me(_S))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var vS=(function(i){return i[i.LeftClick=0]="LeftClick",i[i.RightClick=2]="RightClick",i})(vS||{}),Nc=(function(i){return i.Default="default",i.Grabbing="grabbing",i.Pointer="pointer",i.Moving="move",i})(Nc||{}),Hd=(()=>{class i{constructor(e,n,r,o,a,s,l,c,d){this.threeCameraService=e,this.threeRendererService=n,this.threeSceneService=r,this.store=o,this.state=a,this.codeMapLabelService=s,this.viewCubeMouseEvents=l,this.threeViewerService=c,this.idToBuilding=d,this.THRESHOLD_FOR_MOUSE_MOVEMENT_TRACKING=3,this.mouse={x:0,y:0},this.oldMouse={x:0,y:0},this.mouseOnLastClick={x:0,y:0},this.isGrabbing=!1,this.isMoving=!1,this.raycaster=new yA,this.labelHoveredBuilding=null,this.labelSelectedBuilding=null,this.subscriptions=[this.store.select(ir).pipe(Oi(()=>this.onFilesSelectionChanged())).subscribe(),this.store.select(kr).pipe(Oi(h=>this.onBlacklistChanged(h))).subscribe(),this.store.select(Gl).pipe(Oi(h=>{h!==null?this.hoverNode(h):this.unhoverNode(!1)})).subscribe()],this.onViewCubeEventPropagation=h=>{switch(h.type){case"mousemove":this.onDocumentMouseMove(h.event);break;case"mouseup":this.onDocumentMouseUp(h.event);break;case"mousedown":this.onDocumentMouseDown(h.event);break;case"dblclick":this.onDocumentDoubleClick();break}},this.onDocumentMouseMove=h=>{this.mouse.x=h.clientX,this.mouse.y=h.clientY,this.updateHovering(),this.viewCubeMouseEvents.propagateMovement()}}ngOnDestroy(){for(let e of this.subscriptions)e.unsubscribe()}static changeCursorIndicator(e){document.body.style.cursor=e}start(){this.threeRendererService.renderer.domElement.addEventListener("mousemove",Eo(this.onDocumentMouseMove,1)),this.threeRendererService.renderer.domElement.addEventListener("mouseup",e=>this.onDocumentMouseUp(e)),this.threeRendererService.renderer.domElement.addEventListener("mousedown",e=>this.onDocumentMouseDown(e)),this.threeRendererService.renderer.domElement.addEventListener("dblclick",()=>this.onDocumentDoubleClick()),this.threeRendererService.renderer.domElement.addEventListener("mouseleave",e=>this.onDocumentMouseLeave(e)),this.threeRendererService.renderer.domElement.addEventListener("mouseenter",()=>this.onDocumentMouseEnter()),this.threeRendererService.renderer.domElement.addEventListener("wheel",Eo(()=>this.threeRendererService.render())),this.viewCubeMouseEvents.subscribe("viewCubeEventPropagation",this.onViewCubeEventPropagation)}hoverNode(e){if(this.isGrabbingOrMoving())return;let{buildings:n}=this.threeSceneService.getMapMesh().getMeshDescription();for(let r of n)if(r.node.id===e){this.hoverBuilding(r,!1);break}this.threeRendererService.render()}unhoverNode(e=!0){this.unhoverBuilding(e),this.threeRendererService.render()}onFilesSelectionChanged(){this.threeSceneService.clearSelection(),this.threeSceneService.clearConstantHighlight(),this.clearLabelHoveredBuilding()}onBlacklistChanged(e){let n=this.threeSceneService.getSelectedBuilding();this.clearLabelHoveredBuilding(),n&&X8(n.node.path,e)&&this.threeSceneService.clearSelection(),this.unhoverBuilding()}updateHovering(){if(this.hasMouseMoved(this.oldMouse)){let e=this.threeSceneService.labels?.children;if(this.isGrabbingOrMoving()){this.threeSceneService.resetLabel(),this.clearLabelHoveredBuilding(),this.threeRendererService.render();return}this.oldMouse.x=this.mouse.x,this.oldMouse.y=this.mouse.y;let n=this.threeSceneService.getMapMesh();if(n){this.threeCameraService.camera.updateMatrixWorld(!1);let r="",o=this.transformHTMLToSceneCoordinates(),a=this.threeCameraService.camera;a.isPerspectiveCamera&&this.raycaster.setFromCamera(o,a);let s=this.calculateHoveredLabel(e);s&&(this.threeSceneService.animateLabel(s.object,this.raycaster,e),r=s.object.userData.node.path),this.intersectedBuilding=r!==""?n.getBuildingByPath(r):n.checkMouseRayMeshIntersection(o,a);let l=this.threeSceneService.getHighlightedBuilding(),c=this.intersectedBuilding;l?.id!==c?.id&&(this.clearLabelHoveredBuilding(),this.threeSceneService.resetLabel(),this.unhoverBuilding(),c&&!this.isGrabbingOrMoving()&&(this.setLabelHoveredLeaf(c,e),this.hoverBuilding(c)))}}}setLabelHoveredLeaf(e,n){if(e?.node?.isLeaf){let r=this.threeSceneService.getLabelForHoveredNode(e,n)??this.drawLabelHoveredBuilding(e);this.threeSceneService.animateLabel(r,this.raycaster,n)}}drawLabelHoveredBuilding(e){this.codeMapLabelService.addLeafLabel(e.node,0,!0);let r=this.threeSceneService.labels?.children,o=this.threeSceneService.getLabelForHoveredNode(e,r);return this.labelHoveredBuilding=e.node,o}drawLabelSelectedBuilding(e){if(this.clearLabelHoveredBuilding(),this.labelSelectedBuilding!==null&&this.codeMapLabelService.clearTemporaryLabel(this.labelSelectedBuilding),!e?.node?.isLeaf)return;this.codeMapLabelService.addLeafLabel(e.node,0,!0);let n=this.threeSceneService.labels?.children,r=this.threeSceneService.getLabelForHoveredNode(e,n);return this.threeSceneService.animateLabel(r,this.raycaster,n),this.labelSelectedBuilding=e.node,r}clearLabelHoveredBuilding(){this.labelHoveredBuilding!==null&&(this.codeMapLabelService.clearTemporaryLabel(this.labelHoveredBuilding),this.labelHoveredBuilding=null)}clearLabelSelectedBuilding(){this.labelSelectedBuilding!==null&&(this.codeMapLabelService.clearTemporaryLabel(this.labelSelectedBuilding),this.labelSelectedBuilding=null)}EnableOrbitalsRotation(e){this.threeViewerService.enableRotation(e),this.viewCubeMouseEvents.enableRotation(e)}onDocumentMouseEnter(){this.EnableOrbitalsRotation(!0)}onDocumentMouseLeave(e){e.relatedTarget instanceof HTMLCanvasElement||this.EnableOrbitalsRotation(!1)}onDocumentDoubleClick(){let e=this.threeSceneService.getHighlightedBuilding(),n=this.threeSceneService.getSelectedBuilding(),r=e?.node.link;if(r&&!this.hasMouseMoved(this.mouseOnLastClick)&&window.open(r,"_blank"),n?.node.isLeaf){let o=n.node.link;if(o){window.open(o,"_blank");return}}}onDocumentMouseDown(e){e.button===vS.RightClick&&(this.isMoving=!0,i.changeCursorIndicator(Nc.Moving)),e.button===vS.LeftClick&&(this.isGrabbing=!0,i.changeCursorIndicator(Nc.Grabbing)),this.mouseOnLastClick={x:e.clientX,y:e.clientY},document.activeElement.blur()}onDocumentMouseUp(e){this.viewCubeMouseEvents.resetIsDragging(),e.button===vS.LeftClick?this.onLeftClick():this.onRightClick(),this.intersectedBuilding!==void 0?i.changeCursorIndicator(Nc.Pointer):i.changeCursorIndicator(Nc.Default)}calculateHoveredLabel(e){let n=null;for(let r=0;r<e?.length;r+=2){let o=this.raycaster.intersectObject(this.threeSceneService.labels.children[r]);o.length>0&&(n===null?n=o[0]:n=n.distance<o[0].distance?n:o[0])}return n}onRightClick(){this.isMoving=!1,this.intersectedBuilding&&!this.hasMouseMovedMoreThanThreePixels(this.mouseOnLastClick)&&this.store.dispatch(El({value:{nodeId:this.intersectedBuilding.node.id,xPositionOfRightClickEvent:this.mouse.x,yPositionOfRightClickEvent:this.mouse.y}})),this.threeRendererService.render()}onLeftClick(){this.isGrabbing=!1,this.hasMouseMovedMoreThanThreePixels(this.mouseOnLastClick)||(this.intersectedBuilding?(this.threeSceneService.selectBuilding(this.intersectedBuilding),this.drawLabelSelectedBuilding(this.intersectedBuilding)):(this.threeSceneService.clearSelection(),this.clearLabelSelectedBuilding()),this.threeSceneService.clearConstantHighlight()),this.threeRendererService.render()}hasMouseMovedMoreThanThreePixels({x:e,y:n}){return Math.abs(this.mouse.x-e)>this.THRESHOLD_FOR_MOUSE_MOVEMENT_TRACKING||Math.abs(this.mouse.y-n)>this.THRESHOLD_FOR_MOUSE_MOVEMENT_TRACKING}hasMouseMoved({x:e,y:n}){return this.mouse.x!==e||this.mouse.y!==n}isGrabbingOrMoving(){return this.isGrabbing||this.isMoving}hoverBuilding(e,n=!0){i.changeCursorIndicator(Nc.Pointer);let o=wl(this.state.getValue()).get(e.node.id);for(let{data:a}of Ni(o)){let s=this.idToBuilding.get(a.id);s&&this.threeSceneService.addBuildingsToHighlightingList(s)}this.threeSceneService.applyHighlights(),n&&this.store.dispatch(Rc({value:e.node.id}))}transformHTMLToSceneCoordinates(){let{renderer:e,renderer:{domElement:n}}=this.threeRendererService,r=e.getPixelRatio(),o=n.getBoundingClientRect(),a=this.mouse.x/n.width*r*2-1,s=-((this.mouse.y-o.top)/n.height*r)*2+1;return{x:a,y:s}}unhoverBuilding(e=!0){this.isGrabbingOrMoving()||i.changeCursorIndicator(Nc.Default),this.threeSceneService.getConstantHighlight().size>0?this.threeSceneService.clearHoverHighlight():this.threeSceneService.clearHighlight(),e&&this.store.dispatch(Rc({value:null}))}static{this.\u0275fac=function(n){return new(n||i)(Me(Kr),Me(Rr),Me(vr),Me(Ie),Me(bi),Me(AS),Me(gS),Me(bS),Me(mc))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var UMe=(i,t)=>t.name;function HMe(i,t){if(i&1&&J(0,"cc-map-tree-view-item-option-buttons",4),i&2){let e=me(2);z("isFlattened",e.node.isFlattened)("openNodeContextMenu",e.openNodeContextMenu)}}function VMe(i,t){if(i&1&&(S(0,"div"),J(1,"cc-map-tree-view-level",5),F()),i&2){let e=t.$implicit,n=me(3);E(),z("node",e)("depth",n.depth+1)}}function QMe(i,t){if(i&1&&xi(0,VMe,2,2,"div",null,UMe),i&2){let e=me(2);wi(e.node.children)}}function zMe(i,t){if(i&1){let e=st();S(0,"div"),fe(1,"isNodeLeaf"),S(2,"div",1),fe(3,"async"),fe(4,"async"),fe(5,"async"),fe(6,"areaMetricValid"),he("mouseenter",function(){Ve(e);let r=me();return Qe(r.onMouseEnter())})("mouseleave",function(){Ve(e);let r=me();return Qe(r.onMouseLeave())})("click",function(){Ve(e);let r=me();return Qe(r.onClick())})("contextmenu",function(r){Ve(e);let o=me();return Qe(o.openNodeContextMenu(r))}),J(7,"cc-map-tree-view-item-icon",2)(8,"cc-map-tree-view-item-name",3),fe(9,"async"),ke(10,HMe,1,2,"cc-map-tree-view-item-option-buttons",4),fe(11,"async"),fe(12,"async"),fe(13,"areaMetricValid"),F(),S(14,"div"),ke(15,QMe,2,0),F()()}if(i&2){let e,n=me();Xi(BO("tree-element-",n.depth," ",_e(1,24,n.node)?"tree-leaf":"tree-parent")),E(2),Xi(fo("tree-element-label-",n.depth," tree-element-label")),yt("hovered",_e(3,26,n.hoveredNodeId$)===n.node.id)("marked",((e=_e(4,28,n.rightClickedNodeData$))==null?null:e.nodeId)===n.node.id),z("id",mr(n.node.path))("title",dn(6,32,n.node,_e(5,30,n.areaMetric$))?"":"No Node Area for Chosen Metric"),E(5),z("node",n.node)("isOpen",n.isOpen),E(),z("node",n.node)("isHovered",_e(9,35,n.hoveredNodeId$)===n.node.id)("unaryValue",n.node.attributes.unary),E(2),Pe(_e(11,37,n.hoveredNodeId$)===n.node.id&&dn(13,41,n.node,_e(12,39,n.areaMetric$))?10:-1),E(4),Xi(fo("tree-element-children tree-element-children-",n.depth)),E(),Pe(n.isOpen?15:-1)}}var Oj=(()=>{class i{constructor(e,n,r,o,a){this.store=e,this.threeSceneService=n,this.idToBuildingService=r,this.threeRendererService=o,this.codeMapMouseEventService=a,this.hoveredNodeId$=this.store.select(Gl),this.rightClickedNodeData$=this.store.select(hS),this.areaMetric$=this.store.select(Or),this.isOpen=!1,this.areMetricValid=!1,this.openNodeContextMenu=s=>{s.preventDefault(),s.stopPropagation(),this.areaMetric$.subscribe(l=>this.areMetricValid=$b(this.node,l)).unsubscribe(),this.areMetricValid&&(this.store.dispatch(El({value:{nodeId:this.node.id,xPositionOfRightClickEvent:s.clientX,yPositionOfRightClickEvent:s.clientY}})),document.querySelector(".tree-element-0").addEventListener("scroll",this.scrollFunction))},this.scrollFunction=()=>{this.store.dispatch(El({value:null})),document.querySelector(".tree-element-0").removeEventListener("scroll",this.scrollFunction)}}ngOnInit(){this.isOpen=this.depth===0}onMouseEnter(){let e=this.idToBuildingService.get(this.node.id),n=this.threeSceneService.labels?.children;this.codeMapMouseEventService.setLabelHoveredLeaf(e,n),this.codeMapMouseEventService.hoverNode(this.node.id),this.store.dispatch(Rc({value:this.node.id}))}onMouseLeave(){this.threeSceneService.resetLabel(),this.codeMapMouseEventService.unhoverNode(),this.codeMapMouseEventService.clearLabelHoveredBuilding(),this.store.dispatch(Rc({value:null}))}onClick(){this.isOpen=!this.isOpen;let e=this.idToBuildingService.get(this.node.id);this.codeMapMouseEventService.drawLabelSelectedBuilding(e),this.threeSceneService.selectBuilding(e),this.threeSceneService.clearConstantHighlight(),this.threeRendererService.render()}static{this.\u0275fac=function(n){return new(n||i)(se(Ie),se(vr),se(mc),se(Rr),se(Hd))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-map-tree-view-level"]],inputs:{node:"node",depth:"depth"},decls:1,vars:1,consts:[[3,"class"],[3,"mouseenter","mouseleave","click","contextmenu","id","title"],[3,"node","isOpen"],[3,"node","isHovered","unaryValue"],[3,"isFlattened","openNodeContextMenu"],[3,"node","depth"]],template:function(n,r){n&1&&ke(0,zMe,16,44,"div",0),n&2&&Pe(r.node.isExcluded?-1:0)},dependencies:[i,Tj,Fj,Ij,dt,fS,mS],styles:["[_nghost-%COMP%]{white-space:nowrap}.tree-element-label[_ngcontent-%COMP%]{cursor:default}.tree-element-label[_ngcontent-%COMP%]:focus{outline:none}.tree-element-label[_ngcontent-%COMP%]:hover, .tree-element-label.hovered[_ngcontent-%COMP%]{background-color:#efefef;border-radius:2px;cursor:pointer}.tree-element-label.marked[_ngcontent-%COMP%]{background-color:#efefef;border-radius:2px}.tree-element-0[_ngcontent-%COMP%]{overflow-y:auto;max-height:400px;margin-left:3px;margin-top:10px}.tree-element-0[_ngcontent-%COMP%] div[_ngcontent-%COMP%]{margin:0;padding:0;position:relative}.tree-element-0[_ngcontent-%COMP%] .tree-element-children[_ngcontent-%COMP%]{margin-left:19px;margin-right:4px}"]})}}return i})();function qMe(i,t){i&1&&J(0,"cc-map-tree-view-level",0),i&2&&z("node",t)("depth",0)}var Lj=(()=>{class i{constructor(e){this.mapTreeViewNode$=e.select(Mj)}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-map-tree-view"]],decls:2,vars:3,consts:[[3,"node","depth"]],template:function(n,r){if(n&1&&(ke(0,qMe,1,2,"cc-map-tree-view-level",0),fe(1,"async")),n&2){let o;Pe((o=_e(1,1,r.mapTreeViewNode$))?0:-1,o)}},dependencies:[Oj,dt],encapsulation:2})}}return i})();var Nj=(()=>{class i{constructor(e){this.store=e,this.searchPanelMode="minimized",this.updateSearchPanelMode=n=>{this.searchPanelMode=this.searchPanelMode===n?"minimized":n,this.panelRef.isExpanded=this.searchPanelMode!=="minimized"}}ngOnInit(){this.isSearchPanelPinnedSubscription=this.store.select(nS).subscribe(e=>{this.isSearchPanelPinned=e})}ngOnDestroy(){this.isSearchPanelPinnedSubscription.unsubscribe()}openSearchPanel(){this.searchPanelMode="treeView",this.panelRef.isExpanded=!0}onToggleSettings(e){this.searchPanelMode=e?"treeView":"minimized"}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-search-panel"]],viewQuery:function(n,r){if(n&1&&Nt(Wb,5),n&2){let o;mt(o=pt())&&(r.panelRef=o.first)}},decls:7,vars:7,consts:[["title","File/Node Explorer",3,"toggleSettingsChange","isPinned","collapseOnPanelClick"],[3,"click"],[3,"searchPanelMode","updateSearchPanelMode"],[3,"hidden"]],template:function(n,r){n&1&&(S(0,"cc-ribbon-bar-panel",0),he("toggleSettingsChange",function(a){return r.onToggleSettings(a)}),S(1,"cc-search-bar",1),he("click",function(){return r.openSearchPanel()}),F(),J(2,"cc-search-panel-mode-selector",2),S(3,"cc-ribbon-bar-panel-settings"),J(4,"cc-blacklist-panel",3)(5,"cc-matching-files-counter",3)(6,"cc-map-tree-view",3),F()()),n&2&&(z("isPinned",r.isSearchPanelPinned)("collapseOnPanelClick",!1),E(2),z("searchPanelMode",r.searchPanelMode)("updateSearchPanelMode",r.updateSearchPanelMode),E(2),z("hidden",r.searchPanelMode!=="blacklist"),E(),z("hidden",r.searchPanelMode!=="treeView"),E(),z("hidden",r.searchPanelMode!=="treeView"))},dependencies:[Wb,hj,Aj,pg,_j,wj,Lj],styles:["cc-search-panel[_ngcontent-%COMP%] .search-panel-card[_ngcontent-%COMP%]{border-left:none;width:100%}cc-search-panel[_ngcontent-%COMP%] .search-panel-card[_ngcontent-%COMP%] .section-body[_ngcontent-%COMP%]{display:flex;flex-direction:column;padding:6px;position:absolute;top:45px;background:#fff;border:1px solid #b5b5b5;box-shadow:0 1px 3px #0003,0 1px 1px #00000024,0 2px 1px -1px #0000001f}cc-search-panel[_ngcontent-%COMP%] .search-panel-card[_ngcontent-%COMP%] .section-body.hidden[_ngcontent-%COMP%]{display:none;pointer-events:none}cc-blacklist-panel[_ngcontent-%COMP%]{overflow-y:auto;max-height:calc(100vh - 120px)}"]})}}return i})();var GMe=["*"],bg=(()=>{class i{static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=re({type:i,selectors:[["cc-ribbon-bar-menu-button"]],inputs:{icon:"icon",title:"title"},ngContentSelectors:GMe,decls:3,vars:3,consts:[[3,"title"]],template:function(n,r){n&1&&(ki(),Ut(0,"button",0),Ti(1,"i"),Gt(2),qt()),n&2&&(sn("title",r.title),E(),Xi("fa "+r.icon))},styles:["button[_ngcontent-%COMP%]{height:22px;line-height:22px;min-width:45px;margin:0;padding:0;font-size:9pt;background-color:#e6e6e6f5;color:#444}button[_ngcontent-%COMP%]:hover{background-color:#c8c8c8}"]})}}return i})();var Uj=[{name:"Complexity",settings:{appSettings:{},dynamicSettings:{areaMetric:"rloc",heightMetric:"sonar_complexity",colorMetric:"sonar_complexity",distributionMetric:"rloc"}}},{name:"Average Complexity*",settings:{appSettings:{},dynamicSettings:{areaMetric:"unary",heightMetric:"Average Complexity*",colorMetric:"Average Complexity*",distributionMetric:"unary"}}},{name:"Coverage",settings:{appSettings:{},dynamicSettings:{areaMetric:"rloc",heightMetric:"sonar_complexity",colorMetric:"line_coverage",distributionMetric:"rloc"}}},{name:"Code Churn",settings:{appSettings:{},dynamicSettings:{areaMetric:"rloc",heightMetric:"abs_code_churn",colorMetric:"weeks_with_commits",distributionMetric:"rloc"}}}];var Tl=class i{static{this.SCENARIOS_LOCAL_STORAGE_VERSION="1.0.0"}static{this.SCENARIOS_LOCAL_STORAGE_ELEMENT="scenarios"}static{this.scenarios=i.loadScenarios()}static getScenarioItems(t){let e=[];for(let n of this.scenarios.values())e.push({scenarioName:n.name,isScenarioApplicable:this.isScenarioApplicable(n,t),icons:[{faIconClass:"fa-video-camera",isSaved:!!n.camera,tooltip:"Camera angle"},{faIconClass:"fa-arrows-alt",isSaved:!!n.area,tooltip:"Area metric"},{faIconClass:"fa-arrows-v",isSaved:!!n.height,tooltip:"Height metric"},{faIconClass:"fa-paint-brush",isSaved:!!n.color,tooltip:"Color metric"},{faIconClass:"fa-exchange",isSaved:!!n.edge,tooltip:"Edge metric"}]});return e}static isScenarioApplicable(t,e){let{area:n,color:r,height:o,edge:a}=t;if(n||r||o){let s=new Set(e.nodeMetricData.map(l=>l.name));if(n&&!s.has(n.areaMetric)||r&&!s.has(r.colorMetric)||o&&!s.has(o.heightMetric))return!1}return!(a&&!e.edgeMetricData.some(s=>s.name===a.edgeMetric))}static getPreLoadScenarios(){let t=this.importScenarios(Uj),e=new Map;for(let n of t)e.set(n.name,this.transformScenarioAsSettingsToScenario(n));return e}static transformScenarioAsSettingsToScenario(t){let e={name:t.name},{dynamicSettings:n,appSettings:r}=t.settings;return n.areaMetric!==void 0&&(e.area={areaMetric:n.areaMetric,margin:n.margin}),n.heightMetric!==void 0&&(e.height={heightMetric:n.heightMetric,labelSlider:r.amountOfTopLabels,heightSlider:r.scaling}),n.colorMetric!==void 0&&(e.color={colorMetric:n.colorMetric,colorRange:n.colorRange,mapColors:r.mapColors}),n.edgeMetric!==void 0&&(e.edge={edgeMetric:n.edgeMetric,edgeHeight:r.edgeHeight,edgePreview:r.amountOfEdgePreviews}),e}static setScenariosToLocalStorage(t){let e={version:this.SCENARIOS_LOCAL_STORAGE_VERSION,scenarios:[...t]};localStorage.setItem(this.SCENARIOS_LOCAL_STORAGE_ELEMENT,JSON.stringify(e))}static loadScenarios(){let t=JSON.parse(localStorage.getItem(this.SCENARIOS_LOCAL_STORAGE_ELEMENT));if(t)return new Map(t.scenarios);let e=this.getPreLoadScenarios();return this.setScenariosToLocalStorage(e),e}static addScenario(t,e){let n=i.createNewScenario(t,e);this.scenarios.set(n.name,n),this.setScenariosToLocalStorage(this.scenarios)}static createNewScenario(t,e){let n={name:t};for(let r of e.filter(o=>o.isSelected))switch(r.metricType){case"Camera-Position":n.camera={camera:r.savedValues.camera,cameraTarget:r.savedValues.cameraTarget};break;case"Area-Metric":n.area={areaMetric:r.metricName,margin:r.savedValues};break;case"Height-Metric":n.height={heightMetric:r.metricName,heightSlider:r.savedValues.heightSlider,labelSlider:r.savedValues.labelSlider};break;case"Color-Metric":n.color={colorMetric:r.metricName,colorRange:r.savedValues.colorRange,mapColors:r.savedValues.mapColors};break;case"Edge-Metric":n.edge={edgeMetric:r.metricName,edgePreview:r.savedValues.edgePreview,edgeHeight:r.savedValues.edgeHeight};break;default:throw new Error(`Unknown metric type "${r.metricType}" detected`)}return n}static deleteScenario(t){this.scenarios.delete(t),this.setScenariosToLocalStorage(this.scenarios)}static getScenarioSettings(t){let e={},n={};return t&&(t.area&&(e.areaMetric=t.area.areaMetric,e.margin=t.area.margin),t.height&&(e.heightMetric=t.height.heightMetric,n.amountOfTopLabels=t.height.labelSlider,n.scaling=t.height.heightSlider),t.color&&(e.colorMetric=t.color.colorMetric,e.colorRange=t.color.colorRange,n.mapColors=t.color.mapColors),t.edge&&(e.edgeMetric=t.edge.edgeMetric,n.edgeHeight=t.edge.edgeHeight,n.amountOfEdgePreviews=t.edge.edgePreview)),{appSettings:n,dynamicSettings:e}}static importScenarios(t){for(let e of t)qb(e.settings),e.camera&&(e.camera.camera=new ce(e.camera.camera.x,e.camera.camera.y,e.camera.camera.z),e.camera.cameraTarget=new ce(e.camera.camera.x,e.camera.camera.y,e.camera.camera.z));return t}static isScenarioExisting(t){return this.scenarios.has(t)}};function Hj(){return i=>i.value.length===0?{Error:"Scenario name is required"}:Tl.isScenarioExisting(i.value)?{Error:"A Scenario with this name already exists"}:null}var Vj=(i,t)=>{let{dynamicSettings:e,appSettings:n,fileSettings:r}=i,o=[{metricType:"Camera-Position",metricName:"",savedValues:$e({},t),isSelected:!0,isDisabled:!1},{metricType:"Area-Metric",metricName:e.areaMetric,savedValues:e.margin,isSelected:!0,isDisabled:!1},{metricType:"Height-Metric",metricName:e.heightMetric,savedValues:{heightSlider:n.scaling,labelSlider:n.amountOfTopLabels},isSelected:!0,isDisabled:!1},{metricType:"Color-Metric",metricName:e.colorMetric,savedValues:{colorRange:e.colorRange,mapColors:n.mapColors},isSelected:!0,isDisabled:!1}];return r.edges.length>0&&o.push({metricType:"Edge-Metric",metricName:e.edgeMetric,savedValues:{edgePreview:n.amountOfEdgePreviews,edgeHeight:n.edgeHeight},isSelected:!0,isDisabled:!1}),o};function jMe(i,t){if(i&1&&(S(0,"mat-error"),j(1),F()),i&2){let e=me();E(),Ai(e.scenarioName.getError("Error"))}}function $Me(i,t){if(i&1){let e=st();S(0,"mat-slide-toggle",6),he("change",function(){let r=Ve(e).$implicit,o=me();return Qe(o.handleScenarioMetricPropertySelectionChange(r))}),j(1),F()}if(i&2){let e=t.$implicit;z("checked",e.isSelected),E(),ct(" ",e.metricName?e.metricType+" ("+e.metricName+")":e.metricType," ")}}function XMe(i,t){i&1&&(S(0,"mat-error"),j(1,"You cannot create an empty Scenario."),F())}var Qj=(()=>{class i{constructor(e,n,r){this.state=e,this.scenarioName=new PC("",[Hj()]),this.areAnyScenarioMetricPropertiesSelected=!0,this.scenarioContent=Vj(this.state.getValue(),{camera:n.camera.position.clone(),cameraTarget:r.controls.target.clone()})}handleScenarioMetricPropertySelectionChange(e){e.isSelected=!e.isSelected,this.areAnyScenarioMetricPropertiesSelected=this.scenarioContent.some(n=>n.isSelected)}addCustomScenario(){Tl.addScenario(this.scenarioName.value,this.scenarioContent)}static{this.\u0275fac=function(n){return new(n||i)(se(bi),se(Kr),se(yr))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-add-custom-scenario-dialog"]],decls:19,vars:4,consts:[["xmlns","http://www.w3.org/1999/html",1,"header"],["subscriptSizing","dynamic"],["matInput","",3,"formControl"],[1,"cc-add-custom-scenario-toggles"],[3,"checked"],["mat-flat-button","","mat-dialog-close","",3,"click","disabled"],[3,"change","checked"]],template:function(n,r){n&1&&(S(0,"mat-toolbar",0)(1,"h2"),j(2,"Add Scenario"),F()(),S(3,"mat-dialog-content")(4,"p")(5,"mat-form-field",1)(6,"mat-label"),j(7,"Scenario Name"),F(),J(8,"input",2),ke(9,jMe,2,1,"mat-error"),F()(),S(10,"p"),j(11,"The scenario includes:"),F(),S(12,"div",3),xi(13,$Me,2,2,"mat-slide-toggle",4,En),ke(15,XMe,2,0,"mat-error"),F()(),S(16,"mat-dialog-actions")(17,"button",5),he("click",function(){return r.addCustomScenario()}),j(18," ADD "),F()()),n&2&&(E(8),z("formControl",r.scenarioName),E(),Pe(r.scenarioName.invalid?9:-1),E(4),wi(r.scenarioContent),E(2),Pe(r.areAnyScenarioMetricPropertiesSelected?-1:15),E(2),z("disabled",r.scenarioName.invalid||!r.areAnyScenarioMetricPropertiesSelected))},dependencies:[ca,ar,Er,zr,da,gc,zs,Ac,RC,Eb,Ib,nh,Cr,Wi,or],styles:[".cc-add-custom-scenario-toggles[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:8px}mat-slide-toggle[_ngcontent-%COMP%]{display:block}"]})}}return i})();var wm=i=>{let t=i.maxValue-i.minValue,e=Math.round(t/3),n=e+i.minValue,r=e*2+i.minValue;return{from:n,to:r}};var yS=(()=>{class i{constructor(e,n,r,o,a){this.state=e,this.store=n,this.dialog=r,this.threeCameraService=o,this.threeOrbitControlsService=a}getScenarios(){return Tl.getScenarioItems(In(this.state.getValue()))}applyScenario(e){let n=Tl.scenarios.get(e),r=Tl.getScenarioSettings(n);this.store.dispatch(ts({value:r})),r.appSettings.amountOfTopLabels||this.store.select(Sh).pipe(lu()).subscribe(o=>{let a=fg(o);this.store.dispatch(Ma({value:a}))}),r.appSettings.mapColors||this.store.dispatch(Uo({value:sa})),r.appSettings.edgeHeight||this.store.dispatch(Ws({value:cg})),r.appSettings.amountOfEdgePreviews||this.store.dispatch(hs({value:wh})),r.appSettings.scaling||this.store.dispatch(js({value:lg})),r.dynamicSettings.colorRange||this.store.select(aa).pipe(lu()).subscribe(o=>{this.store.dispatch(Mo({value:wm(o)}))}),r.dynamicSettings.margin||this.store.dispatch(Gs({value:ug})),r.dynamicSettings.edgeMetric||this.store.select(In).pipe(lu()).subscribe(o=>{this.store.dispatch(qo({value:o.edgeMetricData[0]?.name}))}),n.camera&&(this.threeCameraService.setPosition(n.camera.camera),this.threeOrbitControlsService.setControlTarget(n.camera.cameraTarget),this.threeOrbitControlsService.updateControls())}removeScenario(e){e!=="Complexity"?(Tl.deleteScenario(e),this.dialog.open(es,{data:{title:"Info",message:`${e} deleted.`}})):this.dialog.open(es,{data:{title:"Error",message:`${e} cannot be deleted as it is the default Scenario.`}})}static{this.\u0275fac=function(n){return new(n||i)(Me(bi),Me(Ie),Me(fn),Me(Kr),Me(yr))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function KMe(i,t){if(i&1&&(S(0,"span",5),J(1,"i"),F()),i&2){let e=t.$implicit;z("title",e.tooltip),E(),Xi(fo("fa ",e.faIconClass)),yt("cc-is-saved",e.isSaved)}}function YMe(i,t){if(i&1){let e=st();S(0,"div",0)(1,"button",4),he("click",function(){let r=Ve(e).$implicit,o=me();return Qe(o.scenarioService.applyScenario(r.scenarioName))}),j(2),F(),xi(3,KMe,2,6,"span",5,En),S(5,"button",6),he("click",function(){let r=Ve(e).$implicit,o=me();return Qe(o.scenarioService.removeScenario(r.scenarioName))}),J(6,"i",7),F()()}if(i&2){let e=t.$implicit;E(),z("disabled",!e.isScenarioApplicable),E(),ct(" ",e.scenarioName," "),E(),wi(e.icons)}}var qj=(()=>{class i{constructor(e,n){this.scenarioService=e,this.dialog=n,this.scenarios=[]}addScenario(){this.dialog.open(Qj,{panelClass:"cc-add-custom-scenario"})}static{this.\u0275fac=function(n){return new(n||i)(se(yS),se(fn))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-scenarios"]],inputs:{scenarios:"scenarios"},decls:8,vars:0,consts:[[1,"cc-row"],["disabled","",1,"cc-apply-scenario-button"],["title","Create a custom scenario",1,"cc-action-button","cc-add",3,"click"],[1,"fa","fa-plus"],["title","Apply scenario",1,"cc-apply-scenario-button",3,"click","disabled"],[1,"cc-scenario-content-icons",3,"title"],["title","Remove custom scenario",1,"cc-action-button","cc-remove",3,"click"],[1,"fa","fa-minus-square"]],template:function(n,r){n&1&&(S(0,"div",0)(1,"button",1),j(2,"Metric Scenarios"),F(),S(3,"button",2),he("click",function(){return r.addScenario()}),J(4,"i",3),F()(),J(5,"mat-divider"),xi(6,YMe,7,2,"div",0,En)),n&2&&(E(6),wi(r.scenarios))},dependencies:[gg],styles:[".cc-row[_ngcontent-%COMP%]{display:flex;height:48px;align-items:center}.cc-row[_ngcontent-%COMP%] [disabled][_ngcontent-%COMP%]{color:#00000061}.cc-row[_ngcontent-%COMP%] .cc-apply-scenario-button[_ngcontent-%COMP%]{padding-left:16px;padding-right:16px;height:100%;flex:1;text-align:left;background-color:unset}.cc-row[_ngcontent-%COMP%] .cc-apply-scenario-button[_ngcontent-%COMP%]:hover:not([disabled]){background-color:#9e9e9e33}.cc-row[_ngcontent-%COMP%] .cc-action-button[_ngcontent-%COMP%]{width:52px;height:100%;display:inline-flex;justify-content:center;align-items:center}.cc-row[_ngcontent-%COMP%] .cc-action-button.cc-add[_ngcontent-%COMP%]{background-color:#1b9cfc}.cc-row[_ngcontent-%COMP%] .cc-action-button.cc-remove[_ngcontent-%COMP%]{border-left:1px solid rgba(0,0,0,.12);color:#b30000;background-color:unset}.cc-row[_ngcontent-%COMP%] .cc-action-button.cc-remove[_ngcontent-%COMP%]:hover:not([disabled]){background-color:#9e9e9e33}.cc-row[_ngcontent-%COMP%] i.fa[_ngcontent-%COMP%]{font-size:x-small}.cc-row[_ngcontent-%COMP%] .cc-scenario-content-icons[_ngcontent-%COMP%]{padding:0 8px;color:#d3d3d3}.cc-row[_ngcontent-%COMP%] .cc-scenario-content-icons[_ngcontent-%COMP%] i.fa.cc-is-saved[_ngcontent-%COMP%]{color:#000}"]})}}return i})();var Gj=(()=>{class i{constructor(e){this.scenarioService=e,this.scenarios=[]}loadScenarios(){this.scenarios=this.scenarioService.getScenarios()}static{this.\u0275fac=function(n){return new(n||i)(se(yS))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-show-scenarios-button"]],decls:4,vars:3,consts:[["menu","matMenu"],["icon","fa-star",3,"click","title","matMenuTriggerFor"],[1,"cc-scenarios-menu"],[3,"scenarios"]],template:function(n,r){if(n&1){let o=st();S(0,"cc-ribbon-bar-menu-button",1),he("click",function(){return Ve(o),Qe(r.loadScenarios())}),F(),S(1,"mat-menu",2,0),J(3,"cc-scenarios",3),F()}if(n&2){let o=Pn(2);z("title","Open the scenario list")("matMenuTriggerFor",o),E(3),z("scenarios",r.scenarios)}},dependencies:[bg,bc,za,qj],styles:["[_nghost-%COMP%]{display:flex;justify-content:center}"]})}}return i})();var Wj=(()=>{class i{upload(){let e=E1();e.addEventListener("change",()=>{this.uploadOnEvent(e)}),e.click()}uploadOnEvent(e){return ft(this,null,function*(){let n=yield Promise.all(Q1(e.files));for(let r of n)try{Bn.importCustomConfigs(r)}catch{}})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=re({type:i,selectors:[["cc-upload-custom-config-button"]],decls:2,vars:0,consts:[["title","Upload Custom View (.cc.config.json file).",1,"action-button",3,"click"],[1,"fa","fa-folder-open"]],template:function(n,r){n&1&&(Ut(0,"button",0),fr("click",function(){return r.upload()}),Ti(1,"i",1),qt())},styles:["button[_ngcontent-%COMP%]{margin:0 3px;min-width:12%;height:48px;width:48px;border-radius:100%;line-height:48px;background-color:#fff;color:#1b9cfc}button[_ngcontent-%COMP%]:disabled, button[disabled][_ngcontent-%COMP%]{background-color:#e6e6e6;color:#ccc}button[_ngcontent-%COMP%] i.fa[_ngcontent-%COMP%]{font-size:12px;margin-left:0}"]})}}return i})();var ZMe=".cc.config.json",JMe="1.0.1";function jj(i){let t={downloadApiVersion:JMe,timestamp:Date.now(),customConfigs:i},e=Na.getNewTimestamp()+ZMe;xu.downloadData(JSON.stringify(t,Af),e)}var $j=({assignedMaps:i})=>{let t=new Map,e=Bn.getCustomConfigs();for(let[n,r]of e.entries())eSe(r.assignedMaps,i)&&t.set(n,Bn.createExportCustomConfigFromConfig(r));return t};function eSe(i,t){return[...i.keys()].some(n=>t.has(n))}function Xj({assignedMaps:i}){let t={applicableItems:new Map,nonApplicableItems:new Map},e=new Map;for(let n of Bn.loadCustomConfigsFromLocalStorage().values()){let r=[...n.assignedMaps.values()],o=`${r.join("_")}_${n.mapSelectionMode}`,a=[...n.assignedMaps.keys()].some(v=>i.has(v));e.has(o)||e.set(o,{mapNames:r.join(" "),mapSelectionMode:n.mapSelectionMode,hasApplicableItems:a,customConfigItems:[]});let{positive:s,neutral:l,negative:c,selected:d,positiveDelta:h,negativeDelta:u}=n.stateSettings.appSettings.mapColors,{areaMetric:f,heightMetric:_,colorMetric:y,edgeMetric:b}=n.stateSettings.dynamicSettings;e.get(o).customConfigItems.push($e({id:n.id,name:n.name,assignedMaps:n.assignedMaps,mapSelectionMode:n.mapSelectionMode,metrics:{areaMetric:f,heightMetric:_,colorMetric:y,edgeMetric:b},mapColors:{positive:s,neutral:l,negative:c,selected:d,positiveDelta:h,negativeDelta:u},isApplicable:a},n.note&&{note:n.note})),e.get(o).hasApplicableItems?t.applicableItems.set(o,e.get(o)):t.nonApplicableItems.set(o,e.get(o))}return t}var vg=(function(i){return i.MULTIPLE="STANDARD",i.DELTA="DELTA",i})(vg||{});var tSe=i=>{let t=new Map,e;for(let{selectedAs:n,file:r}of i)e=n===vi.Partial?vg.MULTIPLE:vg.DELTA,t.set(r.fileMeta.fileChecksum,r.fileMeta.fileName);return{mapSelectionMode:e,assignedMaps:t}},Vd=Re(ir,tSe);var xS=(()=>{class i{constructor(e){this.store=e,this.downloadableCustomConfigs$=Yo([this.store.select(Vd),Bn.customConfigChange$]).pipe(Et(([n])=>$j(n))),this.customConfigItemGroups$=Yo([this.store.select(Vd),Bn.customConfigChange$]).pipe(Et(([n])=>Xj(n)))}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var Yj=(()=>{class i{constructor(e){this.downloadCustomConfigService=e}ngOnInit(){this.subscription=this.downloadCustomConfigService.downloadableCustomConfigs$.subscribe(e=>{this.downloadableConfigs=e})}ngOnDestroy(){this.subscription.unsubscribe()}downloadPreloadedCustomConfigs(){jj(this.downloadableConfigs)}static{this.\u0275fac=function(n){return new(n||i)(se(xS))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-download-custom-configs-button"]],decls:2,vars:1,consts:[["title","Download Custom View related to currently uploaded maps, if any.",3,"click","disabled"],[1,"fa","fa-download"]],template:function(n,r){n&1&&(Ut(0,"button",0),fr("click",function(){return r.downloadPreloadedCustomConfigs()}),Ti(1,"i",1),qt()),n&2&&sn("disabled",r.downloadableConfigs.size===0)},styles:["button[_ngcontent-%COMP%]{margin:0 3px;min-width:12%;height:48px;width:48px;border-radius:100%;line-height:48px;background-color:#fff;color:#1b9cfc}button[_ngcontent-%COMP%]:disabled, button[disabled][_ngcontent-%COMP%]{background-color:#e6e6e6;color:#ccc}button[_ngcontent-%COMP%] i.fa[_ngcontent-%COMP%]{font-size:12px;margin-left:0}"]})}}return i})();var Zj=el(Jy());var iSe="1.0.0";function Jj(i,t,e,n){let{mapSelectionMode:r,assignedMaps:o}=Vd(t),a=$e({id:"",name:i,creationTime:Date.now(),mapSelectionMode:r,assignedMaps:o,customConfigVersion:iSe,stateSettings:{appSettings:void 0,dynamicSettings:void 0,fileSettings:void 0},camera:e},n&&{note:n});return nSe(a),rSe(a),oSe(a),e$(t,a.stateSettings),a.stateSettings.fileSettings.edges=[],a.id=(0,Zj.default)(JSON.stringify(a,Af)),a}function nSe(i){i.stateSettings.appSettings={showMetricLabelNameValue:!1,showMetricLabelNodeName:!1,colorLabels:{positive:!1,negative:!1,neutral:!1},amountOfEdgePreviews:0,amountOfTopLabels:0,edgeHeight:0,hideFlatBuildings:!1,invertHeight:!1,invertArea:!1,isLoadingFile:!1,isLoadingMap:!1,isPresentationMode:!1,isWhiteBackground:!1,resetCameraIfNewFileIsLoaded:!1,scaling:void 0,showIncomingEdges:!0,showOutgoingEdges:!0,showOnlyBuildingsWithEdges:!1,isEdgeMetricVisible:!0,sortingOrderAscending:!1,isSearchPanelPinned:!1,experimentalFeaturesEnabled:!1,screenshotToClipboardEnabled:!1,layoutAlgorithm:void 0,maxTreeMapFiles:0,sharpnessMode:void 0,isColorMetricLinkedToHeightMetric:!1,enableFloorLabels:!0,mapColors:{labelColorAndAlpha:{alpha:0,rgb:""},base:"",flat:"",incomingEdge:"",markingColors:[],negative:"",negativeDelta:"",neutral:"",outgoingEdge:"",positive:"",positiveDelta:"",selected:""}}}function rSe(i){i.stateSettings.dynamicSettings={areaMetric:"",colorMetric:"",distributionMetric:"",edgeMetric:"",focusedNodePath:[],heightMetric:"",margin:0,searchPattern:"",sortingOption:void 0,colorRange:{from:0,to:0},colorMode:void 0}}function oSe(i){i.stateSettings.fileSettings={blacklist:void 0,edges:[],attributeDescriptors:{},markedPackages:[]}}function e$(i,t){for(let[e,n]of Object.entries(i))Object.prototype.hasOwnProperty.call(t,e)&&(typeof n!="object"||Array.isArray(n)||n===null||t[e]===void 0?t[e]=n:e$(n,t[e]))}var t$=(()=>{class i{constructor(e){this.data=e}static{this.\u0275fac=function(n){return new(n||i)(se(Ts))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-confirmation-dialog"]],decls:10,vars:4,consts:[[1,"confirmation-message"],["mat-dialog-title",""],["mat-dialog-content",""],["mat-dialog-actions",""],["mat-button","",3,"mat-dialog-close"],["mat-button","","cdkFocusInitial","",1,"submit-button",3,"mat-dialog-close"]],template:function(n,r){n&1&&(S(0,"div",0)(1,"h1",1),j(2),F(),S(3,"div",2),j(4),F()(),S(5,"div",3)(6,"button",4),j(7,"CANCEL"),F(),S(8,"button",5),j(9,"OK"),F()()),n&2&&(E(2),Ai(r.data.title),E(2),Ai(r.data.message),E(2),z("mat-dialog-close",!1),E(2),z("mat-dialog-close",!0))},dependencies:[Cf,ar,Cr,Wi,or],encapsulation:2})}}return i})();var i$=()=>{let t="";for(let[n,r]of Object.entries(localStorage))t+=n+r;return 3+t.length*16/8/1024<=768};var aSe=6;function n$(){let i=new Set,t=Bn.getCustomConfigs(),e=new Map,n=1e3*60*60*24*30;for(let[r,o]of t.entries())o?.creationTime===void 0&&(o.creationTime=Date.now()),(Date.now()-o.creationTime)/n>=aSe&&(e.set(r,Bn.createExportCustomConfigFromConfig(o)),i.add(o));return e.size>0&&Bn.downloadCustomConfigs(e),i}function sSe(i,t){if(i&1){let e=st();S(0,"span",0),j(1,"Do you want to download and then purge old unused Configs to make space for new ones?"),F(),S(2,"button",1),he("click",function(){Ve(e);let r=me();return Qe(r.showPurgeConfirmDialog())}),j(3," DOWNLOAD & PURGE... "),F()}}var r$=(()=>{class i{constructor(e){this.dialog=e,this.isLocalStorageSizeValid=!0}ngOnInit(){this.isLocalStorageSizeValid=i$()}showPurgeConfirmDialog(){let e=n$();if(e.size===0){this.dialog.open(es,{data:{title:"Download Error",message:"Could not download and purge old configs automatically! Please try it by yourself."}});return}this.dialog.open(t$,{panelClass:"cc-confirmation-dialog",data:{title:"Confirm to purge old Configs",message:"Are you sure to delete old Configs now?"}}).afterClosed().subscribe(r=>{r&&Bn.deleteCustomConfigs([...e])})}static{this.\u0275fac=function(n){return new(n||i)(se(fn))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-download-and-purge-configs"]],decls:1,vars:1,consts:[[1,"exceed-local-storage-message"],["mat-flat-button","","title","Download old unused Custom Views as a backup file and then delete them in the browser.",1,"exceed-local-storage-button",3,"click"]],template:function(n,r){n&1&&ke(0,sSe,4,0),n&2&&Pe(r.isLocalStorageSizeValid?-1:0)},dependencies:[Wi],styles:["[_nghost-%COMP%]{text-align:right;display:flex;flex-wrap:wrap;justify-content:center}.exceed-local-storage-message[_ngcontent-%COMP%]{display:block;text-align:left;padding:0 16px;color:#b02929}.exceed-local-storage-button[_ngcontent-%COMP%]{color:#fff;background-color:#b02929}.exceed-local-storage-button[_ngcontent-%COMP%]:hover{background-color:#8c1f1f}"]})}}return i})();function lSe(i,t){if(i&1&&(S(0,"mat-error"),j(1),F()),i&2){let e=me();E(),Ai(e.getErrorMessage())}}var wS=(()=>{class i{constructor(e,n,r){this.state=e,this.threeCameraService=n,this.threeOrbitControlsService=r}ngOnInit(){let e=Vd(this.state.getValue());this.customConfigName=new PC("",[th.required,cSe(e)]),this.customConfigName.setValue(Bn.getConfigNameSuggestionByFileState(e))}getErrorMessage(){return this.customConfigName.hasError("required")?"Please enter a view name.":this.customConfigName.hasError("Error")?this.customConfigName.getError("Error"):""}addCustomConfig(){let e=Jj(this.customConfigName.value,this.state.getValue(),{camera:this.threeCameraService.camera.position,cameraTarget:this.threeOrbitControlsService.controls.target},this.customConfigNote);Bn.addCustomConfig(e)}static{this.\u0275fac=function(n){return new(n||i)(se(bi),se(Kr),se(yr))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-add-custom-config-dialog"]],decls:24,vars:4,consts:[["xmlns","http://www.w3.org/1999/html",1,"header"],["matInput","","required","",1,"cc-custom-config-input",3,"formControl"],["cdkAutosizeMinRows","8","cdkTextareaAutosize","","matInput","","required","",1,"cc-custom-config-input",3,"ngModelChange","ngModel"],[1,"cc-add-custom-config"],["mat-flat-button","","mat-dialog-close","",3,"click","disabled"]],template:function(n,r){n&1&&(S(0,"mat-toolbar",0)(1,"h2"),j(2,"Add Custom View"),F()(),S(3,"mat-dialog-content")(4,"p")(5,"mat-form-field")(6,"mat-label"),j(7,"Save individual configurations for your map."),F(),J(8,"input",1),S(9,"mat-hint"),j(10,"Config View Name"),F(),ke(11,lSe,2,1,"mat-error"),F()(),S(12,"p")(13,"mat-form-field")(14,"mat-label"),j(15,"Provide custom note for configuration (optional)"),F(),S(16,"textarea",2),Ra("ngModelChange",function(a){return Pa(r.customConfigNote,a)||(r.customConfigNote=a),a}),j(17," "),F(),S(18,"mat-hint"),j(19,"Config Note"),F()()()(),S(20,"mat-dialog-actions",3),J(21,"cc-download-and-purge-configs"),S(22,"button",4),he("click",function(){return r.addCustomConfig()}),j(23,"ADD"),F()()),n&2&&(E(8),z("formControl",r.customConfigName),E(3),Pe(r.customConfigName.invalid?11:-1),E(5),ka("ngModel",r.customConfigNote),E(6),z("disabled",r.customConfigName.invalid))},dependencies:[ca,ar,Er,zr,da,gc,zs,Ac,$D,Od,RC,Eb,Fb,Ib,WC,Cr,r$,Wi,or],encapsulation:2})}}return i})();function cSe(i){return t=>{let e=t.value;return Bn.hasCustomConfigByName(i.mapSelectionMode,i.assignedMaps,e)?{Error:"A Custom View with this name already exists."}:null}}var o$=(()=>{class i{constructor(e){this.dialog=e}showAddCustomConfigDialog(){this.dialog.open(wS,{panelClass:"cc-add-custom-config-dialog"})}static{this.\u0275fac=function(n){return new(n||i)(se(fn))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-add-custom-config-button"]],decls:2,vars:0,consts:[["title","Create new Custom View",3,"click"],[1,"fa","fa-plus"]],template:function(n,r){n&1&&(Ut(0,"button",0),fr("click",function(){return r.showAddCustomConfigDialog()}),Ti(1,"i",1),qt())},styles:["button[_ngcontent-%COMP%]{margin:0 3px;min-width:12%;height:48px;width:48px;border-radius:100%;line-height:48px;background-color:#fff;color:#1b9cfc}button[_ngcontent-%COMP%]:disabled, button[disabled][_ngcontent-%COMP%]{background-color:#e6e6e6;color:#ccc}button[_ngcontent-%COMP%] i.fa[_ngcontent-%COMP%]{font-size:12px;margin-left:0}"]})}}return i})();var Kk=new Je("CdkAccordion"),a$=(()=>{class i{_stateChanges=new Bt;_openCloseAllActions=new Bt;id=R(hn).getId("cdk-accordion-");multi=!1;openAll(){this.multi&&this._openCloseAllActions.next(!0)}closeAll(){this._openCloseAllActions.next(!1)}ngOnChanges(e){this._stateChanges.next(e)}ngOnDestroy(){this._stateChanges.complete(),this._openCloseAllActions.complete()}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,selectors:[["cdk-accordion"],["","cdkAccordion",""]],inputs:{multi:[2,"multi","multi",kt]},exportAs:["cdkAccordion"],features:[Si([{provide:Kk,useExisting:i}]),Di]})}return i})(),s$=(()=>{class i{accordion=R(Kk,{optional:!0,skipSelf:!0});_changeDetectorRef=R(Li);_expansionDispatcher=R(rh);_openCloseAllSubscription=rr.EMPTY;closed=new Pt;opened=new Pt;destroyed=new Pt;expandedChange=new Pt;id=R(hn).getId("cdk-accordion-child-");get expanded(){return this._expanded}set expanded(e){if(this._expanded!==e){if(this._expanded=e,this.expandedChange.emit(e),e){this.opened.emit();let n=this.accordion?this.accordion.id:this.id;this._expansionDispatcher.notify(this.id,n)}else this.closed.emit();this._changeDetectorRef.markForCheck()}}_expanded=!1;get disabled(){return this._disabled()}set disabled(e){this._disabled.set(e)}_disabled=Gi(!1);_removeUniqueSelectionListener=()=>{};constructor(){}ngOnInit(){this._removeUniqueSelectionListener=this._expansionDispatcher.listen((e,n)=>{this.accordion&&!this.accordion.multi&&this.accordion.id===n&&this.id!==e&&(this.expanded=!1)}),this.accordion&&(this._openCloseAllSubscription=this._subscribeToOpenCloseAllActions())}ngOnDestroy(){this.opened.complete(),this.closed.complete(),this.destroyed.emit(),this.destroyed.complete(),this._removeUniqueSelectionListener(),this._openCloseAllSubscription.unsubscribe()}toggle(){this.disabled||(this.expanded=!this.expanded)}close(){this.disabled||(this.expanded=!1)}open(){this.disabled||(this.expanded=!0)}_subscribeToOpenCloseAllActions(){return this.accordion._openCloseAllActions.subscribe(e=>{this.disabled||(this.expanded=e)})}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,selectors:[["cdk-accordion-item"],["","cdkAccordionItem",""]],inputs:{expanded:[2,"expanded","expanded",kt],disabled:[2,"disabled","disabled",kt]},outputs:{closed:"closed",opened:"opened",destroyed:"destroyed",expandedChange:"expandedChange"},exportAs:["cdkAccordionItem"],features:[Si([{provide:Kk,useValue:void 0}])]})}return i})();var dSe=["body"],uSe=["bodyWrapper"],hSe=[[["mat-expansion-panel-header"]],"*",[["mat-action-row"]]],fSe=["mat-expansion-panel-header","*","mat-action-row"];function mSe(i,t){}var pSe=[[["mat-panel-title"]],[["mat-panel-description"]],"*"],ASe=["mat-panel-title","mat-panel-description","*"];function gSe(i,t){i&1&&(Ut(0,"span",1),Zo(),Ut(1,"svg",2),Ti(2,"path",3),qt()())}var Yk=new Je("MAT_ACCORDION"),l$=new Je("MAT_EXPANSION_PANEL"),_Se=(()=>{class i{_template=R(Ka);_expansionPanel=R(l$,{optional:!0});constructor(){}static \u0275fac=function(n){return new(n||i)};static \u0275dir=wt({type:i,selectors:[["ng-template","matExpansionPanelContent",""]]})}return i})(),c$=new Je("MAT_EXPANSION_PANEL_DEFAULT_OPTIONS"),Zk=(()=>{class i extends s${_viewContainerRef=R(Hr);_animationsDisabled=vn();_document=R(yi);_ngZone=R(ti);_elementRef=R(Ft);_renderer=R(cn);_cleanupTransitionEnd;get hideToggle(){return this._hideToggle||this.accordion&&this.accordion.hideToggle}set hideToggle(e){this._hideToggle=e}_hideToggle=!1;get togglePosition(){return this._togglePosition||this.accordion&&this.accordion.togglePosition}set togglePosition(e){this._togglePosition=e}_togglePosition;afterExpand=new Pt;afterCollapse=new Pt;_inputChanges=new Bt;accordion=R(Yk,{optional:!0,skipSelf:!0});_lazyContent;_body;_bodyWrapper;_portal;_headerId=R(hn).getId("mat-expansion-panel-header-");constructor(){super();let e=R(c$,{optional:!0});this._expansionDispatcher=R(rh),e&&(this.hideToggle=e.hideToggle)}_hasSpacing(){return this.accordion?this.expanded&&this.accordion.displayMode==="default":!1}_getExpandedState(){return this.expanded?"expanded":"collapsed"}toggle(){this.expanded=!this.expanded}close(){this.expanded=!1}open(){this.expanded=!0}ngAfterContentInit(){this._lazyContent&&this._lazyContent._expansionPanel===this&&this.opened.pipe(Tr(null),Yt(()=>this.expanded&&!this._portal),kn(1)).subscribe(()=>{this._portal=new Za(this._lazyContent._template,this._viewContainerRef)}),this._setupAnimationEvents()}ngOnChanges(e){this._inputChanges.next(e)}ngOnDestroy(){super.ngOnDestroy(),this._cleanupTransitionEnd?.(),this._inputChanges.complete()}_containsFocus(){if(this._body){let e=this._document.activeElement,n=this._body.nativeElement;return e===n||n.contains(e)}return!1}_transitionEndListener=({target:e,propertyName:n})=>{e===this._bodyWrapper?.nativeElement&&n==="grid-template-rows"&&this._ngZone.run(()=>{this.expanded?this.afterExpand.emit():this.afterCollapse.emit()})};_setupAnimationEvents(){this._ngZone.runOutsideAngular(()=>{this._animationsDisabled?(this.opened.subscribe(()=>this._ngZone.run(()=>this.afterExpand.emit())),this.closed.subscribe(()=>this._ngZone.run(()=>this.afterCollapse.emit()))):setTimeout(()=>{let e=this._elementRef.nativeElement;this._cleanupTransitionEnd=this._renderer.listen(e,"transitionend",this._transitionEndListener),e.classList.add("mat-expansion-panel-animations-enabled")},200)})}static \u0275fac=function(n){return new(n||i)};static \u0275cmp=re({type:i,selectors:[["mat-expansion-panel"]],contentQueries:function(n,r,o){if(n&1&&_n(o,_Se,5),n&2){let a;mt(a=pt())&&(r._lazyContent=a.first)}},viewQuery:function(n,r){if(n&1&&(Nt(dSe,5),Nt(uSe,5)),n&2){let o;mt(o=pt())&&(r._body=o.first),mt(o=pt())&&(r._bodyWrapper=o.first)}},hostAttrs:[1,"mat-expansion-panel"],hostVars:4,hostBindings:function(n,r){n&2&&yt("mat-expanded",r.expanded)("mat-expansion-panel-spacing",r._hasSpacing())},inputs:{hideToggle:[2,"hideToggle","hideToggle",kt],togglePosition:"togglePosition"},outputs:{afterExpand:"afterExpand",afterCollapse:"afterCollapse"},exportAs:["matExpansionPanel"],features:[Si([{provide:Yk,useValue:void 0},{provide:l$,useExisting:i}]),nn,Di],ngContentSelectors:fSe,decls:9,vars:4,consts:[["bodyWrapper",""],["body",""],[1,"mat-expansion-panel-content-wrapper"],["role","region",1,"mat-expansion-panel-content",3,"id"],[1,"mat-expansion-panel-body"],[3,"cdkPortalOutlet"]],template:function(n,r){n&1&&(ki(hSe),Gt(0),S(1,"div",2,0)(3,"div",3,1)(5,"div",4),Gt(6,1),Sn(7,mSe,0,0,"ng-template",5),F(),Gt(8,2),F()()),n&2&&(E(),ni("inert",r.expanded?null:""),E(2),z("id",r.id),ni("aria-labelledby",r._headerId),E(4),z("cdkPortalOutlet",r._portal))},dependencies:[_f],styles:[`.mat-expansion-panel{box-sizing:content-box;display:block;margin:0;overflow:hidden;position:relative;background:var(--mat-expansion-container-background-color, var(--mat-sys-surface));color:var(--mat-expansion-container-text-color, var(--mat-sys-on-surface));border-radius:var(--mat-expansion-container-shape, 12px)}.mat-expansion-panel.mat-expansion-panel-animations-enabled{transition:margin 225ms cubic-bezier(0.4, 0, 0.2, 1),box-shadow 280ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel:not([class*=mat-elevation-z]){box-shadow:var(--mat-expansion-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-accordion .mat-expansion-panel:not(.mat-expanded),.mat-accordion .mat-expansion-panel:not(.mat-expansion-panel-spacing){border-radius:0}.mat-accordion .mat-expansion-panel:first-of-type{border-top-right-radius:var(--mat-expansion-container-shape, 12px);border-top-left-radius:var(--mat-expansion-container-shape, 12px)}.mat-accordion .mat-expansion-panel:last-of-type{border-bottom-right-radius:var(--mat-expansion-container-shape, 12px);border-bottom-left-radius:var(--mat-expansion-container-shape, 12px)}@media(forced-colors: active){.mat-expansion-panel{outline:solid 1px}}.mat-expansion-panel-content-wrapper{display:grid;grid-template-rows:0fr;grid-template-columns:100%}.mat-expansion-panel-animations-enabled .mat-expansion-panel-content-wrapper{transition:grid-template-rows 225ms cubic-bezier(0.4, 0, 0.2, 1)}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{grid-template-rows:1fr}@supports not (grid-template-rows: 0fr){.mat-expansion-panel-content-wrapper{height:0}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper{height:auto}}.mat-expansion-panel-content{display:flex;flex-direction:column;overflow:visible;min-height:0;visibility:hidden;font-family:var(--mat-expansion-container-text-font, var(--mat-sys-body-large-font));font-size:var(--mat-expansion-container-text-size, var(--mat-sys-body-large-size));font-weight:var(--mat-expansion-container-text-weight, var(--mat-sys-body-large-weight));line-height:var(--mat-expansion-container-text-line-height, var(--mat-sys-body-large-line-height));letter-spacing:var(--mat-expansion-container-text-tracking, var(--mat-sys-body-large-tracking))}.mat-expansion-panel-animations-enabled .mat-expansion-panel-content{transition:visibility 190ms linear}.mat-expansion-panel.mat-expanded>.mat-expansion-panel-content-wrapper>.mat-expansion-panel-content{visibility:visible}.mat-expansion-panel-body{padding:0 24px 16px}.mat-expansion-panel-spacing{margin:16px 0}.mat-accordion>.mat-expansion-panel-spacing:first-child,.mat-accordion>*:first-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-top:0}.mat-accordion>.mat-expansion-panel-spacing:last-child,.mat-accordion>*:last-child:not(.mat-expansion-panel) .mat-expansion-panel-spacing{margin-bottom:0}.mat-action-row{border-top-style:solid;border-top-width:1px;display:flex;flex-direction:row;justify-content:flex-end;padding:16px 8px 16px 24px;border-top-color:var(--mat-expansion-actions-divider-color, var(--mat-sys-outline))}.mat-action-row .mat-button-base,.mat-action-row .mat-mdc-button-base{margin-left:8px}[dir=rtl] .mat-action-row .mat-button-base,[dir=rtl] .mat-action-row .mat-mdc-button-base{margin-left:0;margin-right:8px}
|
|
@@ -5207,7 +5207,7 @@ Low Values: ${e.hintLowValue}`:"",o.length>0?`${r}:${o}`:r}static{this.\u0275fac
|
|
|
5207
5207
|
v${-this.frameHeight}`).attr("fill","none").attr("stroke","#888").attr("stroke-width","1px")}drawAxes(e,n,r){e.append("g").attr("id","axis-x").attr("transform",`translate(${this.framePadding},${this.frameHeight})`).call(gP(n).ticks(5)).attr("font-size","13px").attr("color","#888"),e.append("g").attr("id","axis-y").attr("transform",`translate(0,${this.framePadding})`).call(_P(r).ticks(5).tickFormat(function(o){return o>=1e4?`${Pm(".0f")(o/1e3)}k`:o>=1e3?`${Pm(".1f")(o/1e3)}k`:o.toString()})).attr("font-size","13px").attr("color","#888")}createXScale(){return Rg().domain(XS(this.percentileRanks,e=>e.x)).range([0,this.frameWidth-2*this.framePadding])}createYScale(){let e=[0,Zb(this.percentileRanks,r=>r.y)],n=[Zb(this.percentileRanks,r=>r.y),0];return Rg().domain(this.isAttributeDirectionInverted?n:e).range([this.frameHeight-2*this.framePadding,0])}drawLabels(e){e.append("text").attr("id","y-label").attr("class","y label").attr("text-anchor","middle").attr("transform","rotate(-90)").attr("x",-this.frameHeight/2-this.frameMarginTop).attr("y",this.frameMarginLeft-this.yLabelXOffset).attr("fill","#888").text(`${this.colorMetric}`),e.append("text").attr("id","x-label").attr("class","x label").attr("text-anchor","middle").attr("x",this.frameWidth/2).attr("y",this.frameHeight+this.frameMarginTop+this.xLabelYOffset).attr("fill","#888").text(`Quantiles (% of ${this.colorMetric})`)}drawAreas(e,n){let r=n(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentRightValue):this.calculatePercentileFromMetricValue(this.currentLeftValue)),o=n(this.isAttributeDirectionInverted?this.calculateReversedPercentileFromMetricValue(this.currentLeftValue):this.calculatePercentileFromMetricValue(this.currentRightValue));e.append("rect").attr("class","left-area").attr("x",this.framePadding).attr("width",r).attr("height",this.frameHeight).style("fill",this.isAttributeDirectionInverted?this.rightColor:this.leftColor).style("fill-opacity","0.3"),e.append("rect").attr("class","middle-area").attr("x",r+this.framePadding).attr("width",o-r).attr("height",this.frameHeight).style("fill",this.middleColor).style("fill-opacity","0.3"),e.append("rect").attr("class","right-area").attr("x",o+this.framePadding).attr("width",this.frameWidth-2*this.framePadding-o).attr("height",this.frameHeight).style("fill",this.isAttributeDirectionInverted?this.leftColor:this.rightColor).style("fill-opacity","0.3")}drawLine(e){e.append("path").attr("id","diagram-path").datum(this.percentileRanks).attr("fill","none").attr("stroke","#888").attr("stroke-width",1).attr("d",YP().curve(ZP).x(n=>this.createXScale()(n.x)).y(n=>this.createYScale()(n.y))).attr("transform",`translate(${this.framePadding}, ${this.framePadding})`)}calculatePercentileRanks(e){let n=[...new Set(e)].sort((a,s)=>a-s),r=e.length,o=[{x:0,y:n[0]}];for(let a of n){let l=e.filter(c=>c<=a).length/r*100;o.push({x:l,y:a})}return o}calculateReversedPercentileRanks(e){let n=[...new Set(e)].sort((a,s)=>a-s).reverse(),r=e.length,o=[{x:0,y:n[0]}];for(let a of n){let l=e.filter(c=>c>=a).length/r*100;o.push({x:l,y:a})}return o.sort((a,s)=>a.x-s.x)}calculatePercentileFromMetricValue(e){if(e===this.minValue)return 0;if(e===this.maxValue)return 100;let n=null;for(let r of this.percentileRanks)if(r.y<e)n=r.x;else return n}calculateReversedPercentileFromMetricValue(e){if(e===this.maxValue)return 0;if(e===this.minValue)return 100;let n=null;for(let r of this.percentileRanks)if(r.y>e)n=r.x;else return n}addCrossHair(e,n,r){let o=e.append("text").attr("class","cross-tooltip").attr("fill","#000").attr("font-size","13px").style("display","none"),a=e.append("line").attr("class","dashed-vertical-line").attr("stroke","#000").attr("stroke-width","0.7px").attr("stroke-dasharray","4").style("display","none"),s=e.append("line").attr("class","straight-vertical-line").attr("stroke","#000").attr("stroke-width","0.7px").style("display","none"),l=e.append("line").attr("class","horizontal-line").attr("stroke","#000").attr("stroke-width","0.7px").style("display","none"),c=e.append("rect").attr("class","mouse-event-rect").attr("width",this.frameWidth).attr("height",this.frameHeight+this.frameMarginBottom/2).attr("fill","none").attr("pointer-events","all");this.addOnMouseMoveEvent(c,n,r,o,a,s,l),this.addOnMouseOutEvent(c,o,a,s,l)}addOnMouseMoveEvent(e,n,r,o,a,s,l){e.on("mousemove",c=>{let d=CP(c)[0],h=Math.round(n.invert(d-this.framePadding));h=Math.max(0,Math.min(h,100));let u=this.percentileToMetricValueMap.get(h),f=r(u)+this.framePadding,_=d<this.frameWidth/2?d+10:d-80,y=f<this.frameHeight/2?f+20:f-20;o.style("display","block").attr("x",_).attr("y",y).text(`Quantile: ${h}`).append("tspan").attr("x",_).attr("dy","1.2em").text(`Value: ${u}`),a.attr("x1",d).attr("x2",d).attr("y2",this.frameHeight).style("display","block"),s.attr("x1",d).attr("x2",d).attr("y1",f).attr("y2",this.frameHeight).style("display","block"),l.attr("x2",d).attr("y1",f).attr("y2",f).style("display","block")})}addOnMouseOutEvent(e,n,r,o,a){e.on("mouseout",()=>{n.style("display","none"),r.style("display","none"),o.style("display","none"),a.style("display","none")})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=re({type:i,selectors:[["cc-metric-color-range-diagram"]],inputs:{minValue:"minValue",maxValue:"maxValue",colorMetric:"colorMetric",values:"values",currentLeftValue:"currentLeftValue",currentRightValue:"currentRightValue",leftColor:"leftColor",middleColor:"middleColor",rightColor:"rightColor",isAttributeDirectionInverted:"isAttributeDirectionInverted"},features:[Di],decls:1,vars:0,consts:[["id","cc-range-diagram-container",1,"cc-range-diagram-container"]],template:function(n,r){n&1&&Ti(0,"div",0)},styles:["[_nghost-%COMP%]{display:flex;justify-content:center}"]})}}return i})();var PY=(()=>{class i{transform(e,n,r,o){switch(e){case"positive":{let a=o==="unary",s=r.minValue===n.from,l=r.maxValue===n.from;return a?`${r.minValue} - ${r.maxValue}`:s?"-":l?`${r.minValue} to ${this.formatNumber(n.from)}`:`${r.minValue} to ${this.formatNumber(n.from-1)}`}case"neutral":{let a=n.from===n.to,s=n.to===r.maxValue;return a?"-":s?`${this.formatNumber(n.from)} to ${this.formatNumber(n.to)}`:`${this.formatNumber(n.from)} to ${this.formatNumber(n.to-1)}`}case"negative":return r.maxValue===n.to?"-":`${this.formatNumber(n.to)} to ${this.formatNumber(r.maxValue)}`;case"positiveDelta":return"+\u0394 positive delta";case"negativeDelta":return"\u2013\u0394 negative delta";case"selected":return"selected";case"outgoingEdge":return"Outgoing Edge";case"incomingEdge":return"Incoming Edge"}}formatNumber(e){return(e||0).toLocaleString()}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275pipe=an({name:"mapColorLabel",type:i,pure:!0})}}return i})();var vBe=i=>[i],Og=(()=>{class i{constructor(e){this.store=e,this.colorMetric$=this.store.select(oa),this.mapColors$=this.store.select(Ns),this.colorRange$=this.store.select(jS),this.nodeMetricRange$=this.store.select(aa)}handleColorChange(e){this.store.dispatch(Uo({value:{[this.mapColorFor]:e}}))}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-color-picker-for-map-color"]],inputs:{mapColorFor:"mapColorFor"},decls:6,vars:17,consts:[[3,"colorChange","hexColor","labels"]],template:function(n,r){n&1&&(S(0,"cc-labelled-color-picker",0),fe(1,"async"),fe(2,"async"),fe(3,"async"),fe(4,"async"),fe(5,"mapColorLabel"),he("colorChange",function(a){return r.handleColorChange(a)}),F()),n&2&&z("hexColor",_e(1,2,r.mapColors$)[r.mapColorFor])("labels",oy(15,vBe,FO(5,10,r.mapColorFor,_e(2,4,r.colorRange$),_e(3,6,r.nodeMetricRange$),_e(4,8,r.colorMetric$))))},dependencies:[$A,dt,PY],encapsulation:2})}}return i})();var yBe=()=>["appSettings.mapColors.positiveDelta","appSettings.mapColors.negativeDelta","appSettings.mapColors.selected"],xBe=()=>["appSettings.mapColors.positive","appSettings.mapColors.negative","appSettings.mapColors.neutral","appSettings.mapColors.selected"],wBe=()=>["appSettings.mapColors.positiveDelta","appSettings.mapColors.negativeDelta"];function CBe(i,t){if(i&1){let e=st();S(0,"div"),J(1,"cc-metric-color-range-slider",4),fe(2,"async"),fe(3,"async"),fe(4,"async"),fe(5,"async"),fe(6,"async"),fe(7,"async"),fe(8,"async"),fe(9,"async"),J(10,"cc-reset-settings-button",5)(11,"cc-metric-color-range-diagram",6),fe(12,"async"),fe(13,"async"),fe(14,"async"),fe(15,"async"),fe(16,"async"),fe(17,"async"),fe(18,"async"),fe(19,"async"),fe(20,"async"),fe(21,"async"),S(22,"mat-form-field",7)(23,"mat-label"),j(24,"Gradient Mode"),F(),S(25,"mat-select",8),fe(26,"async"),he("selectionChange",function(r){Ve(e);let o=me();return Qe(o.handleColorModeChange(r.value))}),S(27,"div",9),he("mousedown",function(r){return Ve(e),Qe(r.stopPropagation())}),S(28,"mat-option",10),j(29,"Absolute"),F(),S(30,"mat-option",11),j(31,"Focused Gradient"),F(),S(32,"mat-option",12),j(33,"Weighted Gradient"),F(),S(34,"mat-option",13),j(35,"True Gradient"),F()()()()()}if(i&2){let e=me();E(),z("minValue",_e(2,22,e.sliderValues$).min)("maxValue",_e(3,24,e.sliderValues$).max)("currentLeftValue",_e(4,26,e.sliderValues$).from)("currentRightValue",_e(5,28,e.sliderValues$).to)("leftColor",_e(6,30,e.sliderColors$).leftColor)("middleColor",_e(7,32,e.sliderColors$).middleColor)("rightColor",_e(8,34,e.sliderColors$).rightColor)("handleValueChange",e.handleValueChange)("isAttributeDirectionInversed",_e(9,36,e.isAttributeDescriptionInversed$)),E(9),z("settingsKeys",Oa(60,wBe))("callback",e.resetColorRange),E(),z("minValue",_e(12,38,e.sliderValues$).min)("maxValue",_e(13,40,e.sliderValues$).max)("currentLeftValue",_e(14,42,e.sliderValues$).from)("currentRightValue",_e(15,44,e.sliderValues$).to)("leftColor",_e(16,46,e.sliderColors$).leftColor)("middleColor",_e(17,48,e.sliderColors$).middleColor)("rightColor",_e(18,50,e.sliderColors$).rightColor)("colorMetric",_e(19,52,e.colorMetric$))("values",_e(20,54,e.sliderValues$).values)("isAttributeDirectionInverted",_e(21,56,e.isAttributeDescriptionInversed$)),E(14),z("value",_e(26,58,e.colorMode$))}}function MBe(i,t){if(i&1){let e=st();S(0,"div",1),J(1,"cc-color-picker-for-map-color",0),S(2,"mat-checkbox",14),fe(3,"async"),he("change",function(r){Ve(e);let o=me();return Qe(o.toggleColorLabel(r,"positive"))}),j(4,"Show labels"),F()(),S(5,"div",1),J(6,"cc-color-picker-for-map-color",0),S(7,"mat-checkbox",14),fe(8,"async"),he("change",function(r){Ve(e);let o=me();return Qe(o.toggleColorLabel(r,"neutral"))}),j(9,"Show labels"),F()(),S(10,"div",1),J(11,"cc-color-picker-for-map-color",0),S(12,"mat-checkbox",14),fe(13,"async"),he("change",function(r){Ve(e);let o=me();return Qe(o.toggleColorLabel(r,"negative"))}),j(14,"Show labels"),F()()}if(i&2){let e=me();E(),z("mapColorFor","positive"),E(),z("checked",_e(3,6,e.colorLabels$).positive),E(4),z("mapColorFor","neutral"),E(),z("checked",_e(8,8,e.colorLabels$).neutral),E(4),z("mapColorFor","negative"),E(),z("checked",_e(13,10,e.colorLabels$).negative)}}function SBe(i,t){i&1&&J(0,"cc-color-picker-for-map-color",0)(1,"cc-color-picker-for-map-color",0),i&2&&(z("mapColorFor","positiveDelta"),E(),z("mapColorFor","negativeDelta"))}function EBe(i,t){if(i&1){let e=st();S(0,"mat-checkbox",14),he("change",function(r){Ve(e);let o=me();return Qe(o.handleIsColorRangeInvertedChange(r.checked))}),j(1,"Invert Colors"),F()}if(i&2){let e=me();z("checked",e.isColorRangeInverted)}}function TBe(i,t){if(i&1){let e=st();S(0,"mat-checkbox",14),he("change",function(r){Ve(e);let o=me();return Qe(o.handleAreDeltaColorsInverted(r.checked))}),j(1,"Invert Colors"),F()}if(i&2){let e=me();z("checked",e.areDeltaColorsInverted)}}var RY=(()=>{class i{constructor(e,n){this.store=e,this.state=n,this.colorMode$=this.store.select(YC),this.colorLabels$=this.store.select(Tg),this.colorMetric$=this.store.select(oa),this.isDeltaState$=this.store.select(So),this.sliderValues$=this.store.select(AX),this.sliderColors$=this.store.select(pX),this.isAttributeDescriptionInversed$=this.checkIsAttributeDirectionReversed(),this.isColorRangeInverted=!1,this.areDeltaColorsInverted=!1,this.newLeftValue=null,this.newRightValue=null,this.handleValueChange=({newLeftValue:r,newRightValue:o})=>{this.newLeftValue=r??this.newLeftValue,this.newRightValue=o??this.newRightValue,this.updateColorRangeDebounced()},this.updateColorRangeDebounced=Eo(()=>{let r={};this.newLeftValue!==null&&(r.from=this.newLeftValue),this.newRightValue!==null&&(r.to=this.newRightValue),this.store.dispatch(Mo({value:r})),this.newLeftValue=null,this.newRightValue=null},400),this.resetInvertColorCheckboxes=()=>{this.isColorRangeInverted=!1,this.areDeltaColorsInverted=!1},this.resetColorRange=()=>{let r=aa(this.state.getValue());this.store.dispatch(Mo({value:wm(r)}))}}checkIsAttributeDirectionReversed(){return this.colorMetric$.pipe(Et(e=>this.state.getValue().fileSettings.attributeDescriptors[e]?.direction===1))}handleColorModeChange(e){this.store.dispatch(qs({value:e}))}toggleColorLabel(e,n){this.store.dispatch(Dc({value:{[n]:e.checked}}))}handleIsColorRangeInvertedChange(e){this.isColorRangeInverted=e,this.store.dispatch(zu())}handleAreDeltaColorsInverted(e){this.areDeltaColorsInverted=e,this.store.dispatch(qu())}static{this.\u0275fac=function(n){return new(n||i)(se(Ie),se(bi))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-color-settings-panel"]],decls:13,vars:18,consts:[[3,"mapColorFor"],[1,"color-row"],["tooltip","Reset color values to default","label","Reset colors",3,"settingsKeys","callback"],[3,"checked"],[3,"minValue","maxValue","currentLeftValue","currentRightValue","leftColor","middleColor","rightColor","handleValueChange","isAttributeDirectionInversed"],["tooltip","Reset slider thresholds to default","label","Reset thresholds",3,"settingsKeys","callback"],[3,"minValue","maxValue","currentLeftValue","currentRightValue","leftColor","middleColor","rightColor","colorMetric","values","isAttributeDirectionInverted"],["appearance","outline","subscriptSizing","dynamic",1,"gradient-mode-selector"],[3,"selectionChange","value"],[3,"mousedown"],["value","absolute"],["value","focusedGradient"],["value","weightedGradient"],["value","trueGradient"],[3,"change","checked"]],template:function(n,r){n&1&&(ke(0,CBe,36,61,"div"),fe(1,"async"),fe(2,"async"),ke(3,MBe,15,12),fe(4,"async"),Kc(5,SBe,2,2),J(6,"cc-color-picker-for-map-color",0),S(7,"div",1),J(8,"cc-reset-settings-button",2),fe(9,"async"),ke(10,EBe,2,1,"mat-checkbox",3),fe(11,"async"),Kc(12,TBe,2,1,"mat-checkbox",3),F()),n&2&&(Pe(!_e(1,6,r.isDeltaState$)&&_e(2,8,r.colorMetric$)!=="unary"?0:-1),E(3),Pe(_e(4,10,r.isDeltaState$)?5:3),E(3),z("mapColorFor","selected"),E(2),z("settingsKeys",_e(9,12,r.isDeltaState$)?Oa(16,yBe):Oa(17,xBe))("callback",r.resetInvertColorCheckboxes),E(2),Pe(_e(11,14,r.isDeltaState$)?12:10))},dependencies:[mX,Oc,kY,Er,zr,Qo,Zr,Og,Xs,dt],styles:[".gradient-mode-selector[_ngcontent-%COMP%]{--mat-form-field-container-vertical-padding: 8px;--mat-form-field-container-height: 16px;margin:5px 10px;width:93%}.color-row[_ngcontent-%COMP%]{display:flex;align-items:center}cc-color-picker-for-map-color[_ngcontent-%COMP%]{width:50%}cc-reset-settings-button[_ngcontent-%COMP%]{width:50%}"]})}}return i})();var Lg=Re(hi,i=>i.isEdgeMetricVisible);function BBe(i,t){i&1&&(S(0,"cc-rounded-box"),J(1,"cc-metric-chooser-type",3),j(2),F()),i&2&&(E(),z("metricFor","edgeMetric"),E(),ct(" ",t," "))}function FBe(i,t){if(i&1&&(S(0,"cc-metric-chooser",1),fe(1,"async"),S(2,"div",2),ke(3,BBe,3,2,"cc-rounded-box"),fe(4,"async"),F()()),i&2){let e,n=me();yt("is-edge-metric-disabled",!_e(1,6,n.isEdgeMetricVisible$)),z("selectedMetricName",t)("searchPlaceholder","Edge Metric (highest value)")("handleMetricChanged",n.handleEdgeMetricChanged),E(3),Pe((e=_e(4,8,n.edgeValue$))?3:-1,e)}}var OY=(()=>{class i{constructor(e,n){this.store=e,this.nodeSelectionService=n,this.edgeValue$=this.createEdgeValue(),this.edgeMetric$=this.store.select(Wo),this.isEdgeMetricVisible$=this.store.select(Lg),this.formatHoveredEdgeValue=(r,o)=>{if(!o)return null;let a=o.edgeAttributes[r];return a?`${this.formatValue(a.incoming)} / ${this.formatValue(a.outgoing)}`:null},this.formatValue=r=>typeof r=="number"?r.toLocaleString():"-"}handleEdgeMetricChanged(e){this.store.dispatch(qo({value:e}))}createEdgeValue(){return Yo([this.store.select(Wo),this.nodeSelectionService.createNodeObservable()]).pipe(Et(([e,n])=>this.formatHoveredEdgeValue(e,n)))}static{this.\u0275fac=function(n){return new(n||i)(se(Ie),se(Eg))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-edge-metric-chooser"]],decls:2,vars:3,consts:[["icon","fa-exchange","type","edge","title","Change edge metric",3,"is-edge-metric-disabled","selectedMetricName","searchPlaceholder","handleMetricChanged"],["icon","fa-exchange","type","edge","title","Change edge metric",3,"selectedMetricName","searchPlaceholder","handleMetricChanged"],["hoveredInformation","",1,"cc-metric-chooser-container"],["attributeType","edges",3,"metricFor"]],template:function(n,r){if(n&1&&(ke(0,FBe,5,10,"cc-metric-chooser",0),fe(1,"async")),n&2){let o;Pe((o=_e(1,1,r.edgeMetric$))?0:-1,o)}},dependencies:[Ph,TS,VS,dt],styles:["cc-rounded-box[_ngcontent-%COMP%]{position:absolute;top:10%;right:28px}"]})}}return i})();var LY=Re(hi,i=>i.edgeHeight);var NY=Re(hi,i=>i.showOnlyBuildingsWithEdges);var T2=Re(In,Wo,Ih,Dh,IBe);function IBe({edgeMetricData:i,nodeEdgeMetricsMap:t,nodeMetricData:e},n,r,o){let a=t.get(n);if(!a||!r&&!o)return 0;let l=0;for(let c of a.values()){let d=r&&c.incoming>0,h=o&&c.outgoing>0;(d||h)&&l++}return l}var UY=(()=>{class i{constructor(e){this.store=e}ngOnInit(){this.isEdgeMetricVisible$=this.store.select(Lg)}toggleEdgeMetric(){this.store.dispatch(bh())}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-edge-metric-toggle"]],decls:3,vars:3,consts:[[1,"edgeMetricCheckbox",3,"change","checked"]],template:function(n,r){n&1&&(S(0,"mat-checkbox",0),fe(1,"async"),he("change",function(){return r.toggleEdgeMetric()}),j(2,` Disable edge metric
|
|
5208
5208
|
`),F()),n&2&&z("checked",!_e(1,1,r.isEdgeMetricVisible$))},dependencies:[Xs,dt],encapsulation:2})}}return i})();var DBe=()=>["appSettings.amountOfEdgePreviews","appSettings.edgeHeight","appSettings.mapColors.outgoingEdge","appSettings.showOutgoingEdges","appSettings.mapColors.incomingEdge","appSettings.showIncomingEdges","appSettings.showOnlyBuildingsWithEdges","appSettings.isEdgeMetricVisible"],HY=(()=>{class i{constructor(e){this.store=e,this.amountOfBuildingsWithSelectedEdgeMetric$=this.store.select(T2),this.edgePreviewLabel$=this.amountOfBuildingsWithSelectedEdgeMetric$.pipe(Et(n=>`Preview the edges of up to ${n} buildings with the highest amount of incoming and outgoing edges`)),this.amountOfEdgePreviews$=this.store.select(Sg),this.edgeHeight$=this.store.select(LY),this.showOutgoingEdges$=this.store.select(Dh),this.showIncomingEdges$=this.store.select(Ih),this.showOnlyBuildingsWithEdges$=this.store.select(NY),this.applySettingsAmountOfEdgePreviews=n=>{this.store.dispatch(hs({value:n}))},this.applySettingsEdgeHeight=n=>{this.store.dispatch(Ws({value:n}))}}applyShowOutgoingEdges(e){this.store.dispatch(lh({value:e}))}applyShowIncomingEdges(e){this.store.dispatch(ch({value:e}))}applyShowOnlyBuildingsWithEdges(e){this.store.dispatch(Tc({value:e.checked}))}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-edge-settings-panel"]],decls:25,vars:41,consts:[[3,"title","label","value","onChange","min","max","disabled"],["title","Adjust the curve height",3,"label","value","onChange","min","max","disabled"],[1,"wrapper"],[1,"edge-row"],[3,"mapColorFor"],[3,"change","checked"],[3,"change","checked","disabled"],["tooltip","Reset edge metric settings to their defaults","label","Reset edge metric settings",3,"settingsKeys"]],template:function(n,r){n&1&&(J(0,"cc-slider",0),fe(1,"async"),fe(2,"async"),fe(3,"async"),fe(4,"async"),J(5,"cc-slider",1),fe(6,"async"),fe(7,"async"),S(8,"div",2)(9,"div",3),J(10,"cc-color-picker-for-map-color",4),S(11,"mat-checkbox",5),fe(12,"async"),he("change",function(a){return r.applyShowOutgoingEdges(a.checked)}),j(13,"Show"),F()(),S(14,"div",3),J(15,"cc-color-picker-for-map-color",4),S(16,"mat-checkbox",5),fe(17,"async"),he("change",function(a){return r.applyShowIncomingEdges(a.checked)}),j(18,"Show"),F()()(),S(19,"mat-checkbox",6),fe(20,"async"),fe(21,"async"),he("change",function(a){return r.applyShowOnlyBuildingsWithEdges(a)}),j(22,` Only show nodes with edges
|
|
5209
5209
|
`),F(),J(23,"cc-edge-metric-toggle")(24,"cc-reset-settings-button",7)),n&2&&(z("title",_e(1,20,r.edgePreviewLabel$))("label","Preview")("value",_e(2,22,r.amountOfEdgePreviews$))("onChange",r.applySettingsAmountOfEdgePreviews)("min",0)("max",_e(3,24,r.amountOfBuildingsWithSelectedEdgeMetric$))("disabled",_e(4,26,r.amountOfBuildingsWithSelectedEdgeMetric$)===0),E(5),z("label","Height")("value",_e(6,28,r.edgeHeight$))("onChange",r.applySettingsEdgeHeight)("min",1)("max",9)("disabled",_e(7,30,r.amountOfBuildingsWithSelectedEdgeMetric$)===0),E(5),z("mapColorFor","outgoingEdge"),E(),z("checked",_e(12,32,r.showOutgoingEdges$)),E(4),z("mapColorFor","incomingEdge"),E(),z("checked",_e(17,34,r.showIncomingEdges$)),E(3),z("checked",_e(20,36,r.showOnlyBuildingsWithEdges$))("disabled",_e(21,38,r.amountOfBuildingsWithSelectedEdgeMetric$)===0),E(5),z("settingsKeys",Oa(40,DBe)))},dependencies:[Mh,Og,Xs,UY,Oc,dt],styles:[".edge-row[_ngcontent-%COMP%]{display:flex;align-items:center;gap:105px}"]})}}return i})();function kBe(i,t){i&1&&(S(0,"mat-card",8),J(1,"cc-link-color-metric-to-height-metric-button"),F(),S(2,"cc-ribbon-bar-panel",9),J(3,"cc-color-metric-chooser"),S(4,"cc-ribbon-bar-panel-settings"),J(5,"cc-color-settings-panel",4),F()()),i&2&&(E(2),z("separator",!0))}function PBe(i,t){i&1&&(S(0,"cc-ribbon-bar-panel",6),J(1,"cc-edge-metric-chooser"),S(2,"cc-ribbon-bar-panel-settings"),J(3,"cc-edge-settings-panel",4),F()()),i&2&&z("separator",!0)}function RBe(i,t){i&1&&(S(0,"cc-ribbon-bar-panel",7)(1,"div",10),J(2,"i",11),S(3,"span"),j(4,"Color Settings"),F()(),S(5,"cc-ribbon-bar-panel-settings"),J(6,"cc-color-settings-panel",4),F()()),i&2&&z("separator",!0)("isHeaderExpandable",!0)}var VY=(()=>{class i{constructor(e){this.store=e,this.isDeltaState$=this.store.select(So),this.hasEdgeMetric$=this.store.select(In).pipe(Et(n=>n.edgeMetricData.length>0))}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-ribbon-bar"]],decls:21,vars:11,consts:[["id","scenario-card","title","Metric Scenarios"],["id","custom-configs-card","title","Custom Views"],["id","ai-card","title","Suspicious Metrics"],["id","area-metric-card","title","Area Metric Options",1,"ribbon-bar-panel-wide",3,"separator"],[1,"cc-metric-settings-panel"],["id","height-metric-card","title","Height Metric Options",1,"ribbon-bar-panel-wide",3,"separator"],["id","edge-metric-card","title","Edge Metric Options",1,"ribbon-bar-panel-wide",3,"separator"],["id","color-settings-card",1,"ribbon-bar-panel-wide",3,"separator","isHeaderExpandable"],["appearance","outlined",1,"color-height-metric-link"],["id","color-metric-card","title","Color Metric Options",1,"ribbon-bar-panel-wide",3,"separator"],[1,"color-settings-header","toggleHeader"],[1,"fa","fa-paint-brush","color-icon"]],template:function(n,r){n&1&&(J(0,"cc-search-panel"),S(1,"cc-ribbon-bar-panel",0),J(2,"cc-show-scenarios-button"),F(),S(3,"cc-ribbon-bar-panel",1),J(4,"cc-custom-configs"),F(),S(5,"cc-ribbon-bar-panel",2),J(6,"cc-artificial-intelligence"),F(),S(7,"cc-ribbon-bar-panel",3),J(8,"cc-area-metric-chooser"),S(9,"cc-ribbon-bar-panel-settings"),J(10,"cc-area-settings-panel",4),F()(),S(11,"cc-ribbon-bar-panel",5),J(12,"cc-height-metric-chooser"),S(13,"cc-ribbon-bar-panel-settings"),J(14,"cc-height-settings-panel",4),F()(),ke(15,kBe,6,1),fe(16,"async"),ke(17,PBe,4,1,"cc-ribbon-bar-panel",6),fe(18,"async"),ke(19,RBe,7,2,"cc-ribbon-bar-panel",7),fe(20,"async")),n&2&&(E(7),z("separator",!0),E(4),z("separator",!0),E(4),Pe(_e(16,5,r.isDeltaState$)?-1:15),E(2),Pe(_e(18,7,r.hasEdgeMetric$)?17:-1),E(2),Pe(_e(20,9,r.isDeltaState$)?19:-1))},dependencies:[Nj,Wb,Gj,y$,O$,J$,pg,eX,tX,aX,_c,sX,lX,RY,OY,HY,dt],styles:["[_nghost-%COMP%]{z-index:10;width:100%;display:flex;flex-wrap:nowrap}cc-ribbon-bar-panel[_ngcontent-%COMP%]{flex:0}cc-ribbon-bar-panel.ribbon-bar-panel-wide[_ngcontent-%COMP%]{flex-grow:1}cc-ribbon-bar-panel[_ngcontent-%COMP%] cc-ribbon-bar-panel-settings[_ngcontent-%COMP%]{font-size:.9em;left:0;right:auto}cc-ribbon-bar-panel[_ngcontent-%COMP%]:last-child cc-ribbon-bar-panel-settings[_ngcontent-%COMP%]{left:auto;right:0}mat-card.color-height-metric-link[_ngcontent-%COMP%]{display:flex;justify-content:center;flex-grow:0;padding:0;height:46px;border-radius:0;border-top:1px solid #cdcdcd}.color-settings-header[_ngcontent-%COMP%]{display:flex;gap:8px;line-height:24px;align-items:baseline}"]})}}return i})();var Uh=()=>new _A({color:16580095}),Om=()=>new _A({color:16580095}),Av=()=>new _A({color:16580095});var B2=class i{static buildCube(t){let e=1/t,n=(1-e)/2,r=new xa(e,n,n),o=new xa(n,e+n,n),a=new xa(n,n,n),s=new xa(e,e,n),l=new xa(e,e+n,n);return i.newBuildCubeGroup(r,o,a,s,l)}static newBuildCubeGroup(t,e,n,r,o){let a=new wo,{group:s,frontLeft:l,frontCenter:c,frontRight:d,middleLeft:h,middleCenter:u,middleRight:f,backLeft:_,backCenter:y,backRight:b}=i.buildCubeTopFace(t,n,r);a.add(s);let{group:v,frontLeftEdge:M,frontCenterFace:x,frontRightEdge:w,middleLeftFace:k,middleRightFace:P,backLeftEdge:D,backCenterFace:O,backRightEdge:T}=i.buildCubeSides(e,o);return a.add(v),{group:a,top:{front:{left:l,center:c,right:d},middle:{left:h,center:u,right:f},back:{left:_,center:y,right:b}},sides:{front:{left:M,center:x,right:w},middle:{left:k,right:P},back:{left:D,center:O,right:T}}}}static buildCubeTopFace(t,e,n){let r=new Ui(e,Av()),o=new Ui(t,Uh()),a=new Ui(e,Av()),s=new Ui(t,Uh()),l=new Ui(n,Om()),c=new Ui(t,Om()),d=new Ui(e,Av()),h=new Ui(t,Uh()),u=new Ui(e,Av()),f=n.parameters.height/2+e.parameters.height/2;r.position.x-=f,r.position.y-=f,o.position.y-=f,a.position.x+=f,a.position.y-=f,s.position.x-=f,s.rotation.z=Math.PI/2,c.position.x+=f,c.rotation.z=Math.PI/2,d.position.x-=f,d.position.y+=f,h.position.y+=f,u.position.x+=f,u.position.y+=f;let _=new wo;return _.rotation.x=Math.PI/2,_.position.y+=f,_.add(r),_.add(o),_.add(a),_.add(s),_.add(l),_.add(c),_.add(d),_.add(h),_.add(u),{group:_,frontLeft:r,frontCenter:o,frontRight:a,middleLeft:s,middleCenter:l,middleRight:c,backLeft:d,backCenter:h,backRight:u}}static buildCubeSides(t,e){let n=new Ui(t,Uh()),r=new Ui(e,Om()),o=new Ui(t,Uh()),a=new Ui(e,Om()),s=new Ui(e,Om()),l=new Ui(t,Uh()),c=new Ui(e,Om()),d=new Ui(t,Uh()),h=e.parameters.width/2+t.parameters.width/2,u=t.parameters.width/2;n.position.x-=h,n.position.z+=h,r.position.z+=h,o.position.x+=h,o.position.z+=h,a.position.x-=h,a.rotation.y=Math.PI/2,s.position.x+=h,s.rotation.y=Math.PI/2,l.position.x-=h,l.position.z-=h,c.position.z-=h,d.position.x+=h,d.position.z-=h;let f=new wo;return f.position.y-=u,f.add(n),f.add(r),f.add(o),f.add(a),f.add(s),f.add(l),f.add(c),f.add(d),{group:f,frontLeftEdge:n,frontCenterFace:r,frontRightEdge:o,middleLeftFace:a,middleRightFace:s,backLeftEdge:l,backCenterFace:c,backRightEdge:d}}};var QY=(()=>{class i{constructor(e){this.threeMapControlsService=e}centerMap(){this.threeMapControlsService.autoFitTo()}static{this.\u0275fac=function(n){return new(n||i)(se(yr))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-center-map-button"]],decls:2,vars:0,consts:[["aria-label","Center map in View","title","Center map",1,"cc-shadow",3,"click"],[1,"fa","fa-compass"]],template:function(n,r){n&1&&(Ut(0,"button",0),fr("click",function(){return r.centerMap()}),Ti(1,"i",1),qt())},styles:["button[_ngcontent-%COMP%]{position:absolute;right:15px;width:36px;height:36px;font-size:28px;border-radius:100%;color:#fff;background-color:#1b9cfc}button.cc-shadow[_ngcontent-%COMP%]{box-shadow:0 1px 5px #0003!important}button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{margin-top:2px}button[_ngcontent-%COMP%]:hover{cursor:pointer;background-color:#0374c9}"]})}}return i})();var zY=(()=>{class i{constructor(e,n){this.threeMapControlsService=e,this.cdr=n}ngOnInit(){this.maxZoom=this.threeMapControlsService.MAX_ZOOM,this.minZoom=this.threeMapControlsService.MIN_ZOOM,this.threeMapControlsService.zoomPercentage$.subscribe(e=>{this.zoomPercentage=e,this.cdr.detectChanges()})}onInput(e){let n=e.target,r=Number.parseFloat(n.value);this.threeMapControlsService.setZoomPercentage(r)}zoomIn(){this.threeMapControlsService.setZoomPercentage(Math.min(this.zoomPercentage+10,this.maxZoom))}zoomOut(){this.threeMapControlsService.setZoomPercentage(Math.max(this.zoomPercentage-10,this.minZoom))}static{this.\u0275fac=function(n){return new(n||i)(se(yr),se(Li))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-zoom-slider"]],decls:8,vars:4,consts:[[1,"zoom-slider"],["data-testid","zoomOut",1,"zoom-button",3,"click"],["type","range","id","zoomRange","data-testid","zoomRange",3,"input","min","max","value"],["data-testid","zoomIn",1,"zoom-button",3,"click"],["id","zoomValue"]],template:function(n,r){n&1&&(Ut(0,"div",0)(1,"button",1),fr("click",function(){return r.zoomOut()}),j(2,"-"),qt(),Ut(3,"input",2),fr("input",function(a){return r.onInput(a)}),qt(),Ut(4,"button",3),fr("click",function(){return r.zoomIn()}),j(5,"+"),qt(),Ut(6,"span",4),j(7),qt()()),n&2&&(E(3),sn("min",r.minZoom)("max",r.maxZoom)("value",r.zoomPercentage),E(4),ct("",r.zoomPercentage==null?null:r.zoomPercentage.toFixed(0),"%"))},styles:[".mat-elevation-z0[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z0[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-0, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow, 0px 0px 0px 0px --mat-sys-shadow)}.mat-elevation-z1[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z1[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-1, 0px 2px 1px -1px --mat-sys-shadow, 0px 1px 1px 0px --mat-sys-shadow, 0px 1px 3px 0px --mat-sys-shadow)}.mat-elevation-z2[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z2[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-2, 0px 3px 1px -2px --mat-sys-shadow, 0px 2px 2px 0px --mat-sys-shadow, 0px 1px 5px 0px --mat-sys-shadow)}.mat-elevation-z3[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z3[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-3, 0px 3px 3px -2px --mat-sys-shadow, 0px 3px 4px 0px --mat-sys-shadow, 0px 1px 8px 0px --mat-sys-shadow)}.mat-elevation-z4[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z4[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-4, 0px 2px 4px -1px --mat-sys-shadow, 0px 4px 5px 0px --mat-sys-shadow, 0px 1px 10px 0px --mat-sys-shadow)}.mat-elevation-z5[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z5[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-5, 0px 3px 5px -1px --mat-sys-shadow, 0px 5px 8px 0px --mat-sys-shadow, 0px 1px 14px 0px --mat-sys-shadow)}.mat-elevation-z6[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z6[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-6, 0px 3px 5px -1px --mat-sys-shadow, 0px 6px 10px 0px --mat-sys-shadow, 0px 1px 18px 0px --mat-sys-shadow)}.mat-elevation-z7[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z7[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-7, 0px 4px 5px -2px --mat-sys-shadow, 0px 7px 10px 1px --mat-sys-shadow, 0px 2px 16px 1px --mat-sys-shadow)}.mat-elevation-z8[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z8[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-8, 0px 5px 5px -3px --mat-sys-shadow, 0px 8px 10px 1px --mat-sys-shadow, 0px 3px 14px 2px --mat-sys-shadow)}.mat-elevation-z9[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z9[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-9, 0px 5px 6px -3px --mat-sys-shadow, 0px 9px 12px 1px --mat-sys-shadow, 0px 3px 16px 2px --mat-sys-shadow)}.mat-elevation-z10[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z10[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-10, 0px 6px 6px -3px --mat-sys-shadow, 0px 10px 14px 1px --mat-sys-shadow, 0px 4px 18px 3px --mat-sys-shadow)}.mat-elevation-z11[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z11[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-11, 0px 6px 7px -4px --mat-sys-shadow, 0px 11px 15px 1px --mat-sys-shadow, 0px 4px 20px 3px --mat-sys-shadow)}.mat-elevation-z12[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z12[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-12, 0px 7px 8px -4px --mat-sys-shadow, 0px 12px 17px 2px --mat-sys-shadow, 0px 5px 22px 4px --mat-sys-shadow)}.mat-elevation-z13[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z13[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-13, 0px 7px 8px -4px --mat-sys-shadow, 0px 13px 19px 2px --mat-sys-shadow, 0px 5px 24px 4px --mat-sys-shadow)}.mat-elevation-z14[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z14[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-14, 0px 7px 9px -4px --mat-sys-shadow, 0px 14px 21px 2px --mat-sys-shadow, 0px 5px 26px 4px --mat-sys-shadow)}.mat-elevation-z15[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z15[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-15, 0px 8px 9px -5px --mat-sys-shadow, 0px 15px 22px 2px --mat-sys-shadow, 0px 6px 28px 5px --mat-sys-shadow)}.mat-elevation-z16[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z16[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-16, 0px 8px 10px -5px --mat-sys-shadow, 0px 16px 24px 2px --mat-sys-shadow, 0px 6px 30px 5px --mat-sys-shadow)}.mat-elevation-z17[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z17[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-17, 0px 8px 11px -5px --mat-sys-shadow, 0px 17px 26px 2px --mat-sys-shadow, 0px 6px 32px 5px --mat-sys-shadow)}.mat-elevation-z18[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z18[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-18, 0px 9px 11px -5px --mat-sys-shadow, 0px 18px 28px 2px --mat-sys-shadow, 0px 7px 34px 6px --mat-sys-shadow)}.mat-elevation-z19[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z19[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-19, 0px 9px 12px -6px --mat-sys-shadow, 0px 19px 29px 2px --mat-sys-shadow, 0px 7px 36px 6px --mat-sys-shadow)}.mat-elevation-z20[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z20[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-20, 0px 10px 13px -6px --mat-sys-shadow, 0px 20px 31px 3px --mat-sys-shadow, 0px 8px 38px 7px --mat-sys-shadow)}.mat-elevation-z21[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z21[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-21, 0px 10px 13px -6px --mat-sys-shadow, 0px 21px 33px 3px --mat-sys-shadow, 0px 8px 40px 7px --mat-sys-shadow)}.mat-elevation-z22[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z22[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-22, 0px 10px 14px -6px --mat-sys-shadow, 0px 22px 35px 3px --mat-sys-shadow, 0px 8px 42px 7px --mat-sys-shadow)}.mat-elevation-z23[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z23[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-23, 0px 11px 14px -7px --mat-sys-shadow, 0px 23px 36px 3px --mat-sys-shadow, 0px 9px 44px 8px --mat-sys-shadow)}.mat-elevation-z24[_ngcontent-%COMP%], .mat-mdc-elevation-specific.mat-elevation-z24[_ngcontent-%COMP%]{box-shadow:var(--mat-app-elevation-shadow-level-24, 0px 11px 15px -7px --mat-sys-shadow, 0px 24px 38px 3px --mat-sys-shadow, 0px 9px 46px 8px --mat-sys-shadow)}html[_ngcontent-%COMP%]{--mat-sys-on-surface: initial}.mat-app-background[_ngcontent-%COMP%]{background-color:var(--mat-app-background-color, var(--mat-sys-background, transparent));color:var(--mat-app-text-color, var(--mat-sys-on-background, inherit))}[_ngcontent-%COMP%]:root{--mat-dialog-container-min-width: 500px;--mat-dialog-actions-alignment: flex-end;--mat-toolbar-container-background-color: #1b9cfc;--mat-toolbar-container-text-color: #fff;--mat-button-text-horizontal-padding: 8px}[_ngcontent-%COMP%]:root .mat-mdc-checkbox.mat-accent[_ngcontent-%COMP%]{--mat-checkbox-selected-checkmark-color: #fff !important}[_ngcontent-%COMP%]:root .cdk-overlay-pane.cc-incompatible-maps-dialog[_ngcontent-%COMP%]{--mat-dialog-supporting-text-color: vars.$cc-font-color}.zoom-slider[_ngcontent-%COMP%]{display:flex;align-items:center;gap:10px;width:150px;position:absolute;top:190px;right:26px;margin:10px}.zoom-slider[_ngcontent-%COMP%] .zoom-button[_ngcontent-%COMP%], .zoom-slider[_ngcontent-%COMP%] #zoomValue[_ngcontent-%COMP%]{font-size:10px;color:#737373}.zoom-slider[_ngcontent-%COMP%] .zoom-button.zoom-button[_ngcontent-%COMP%], .zoom-slider[_ngcontent-%COMP%] #zoomValue.zoom-button[_ngcontent-%COMP%]{background:none;border:none;font-size:16px;cursor:pointer;padding:0;margin:0}input[type=range][_ngcontent-%COMP%]{-webkit-appearance:none;color:#737373;width:100px;height:3px;background:#737373;outline:none;opacity:.7;transition:opacity .2s}input[type=range][_ngcontent-%COMP%]::-webkit-slider-thumb{-webkit-appearance:none;appearance:none;width:3px;height:10px;background:#737373;cursor:pointer}input[type=range][_ngcontent-%COMP%]::-moz-range-thumb{width:3px;height:10px;background:#737373;cursor:pointer}"],changeDetection:0})}}return i})();var qY=(()=>{class i{constructor(e,n,r){this.elementReference=e,this.threeMapControlsService=n,this.viewCubeMouseEvents=r,this.WIDTH=200,this.HEIGHT=200,this.LENGTH_VIEWCUBE=1,this.hoverInfo={cube:null,originalMaterial:null},this.cubeDefinition={top:null,sides:null},this.onCameraChanged=o=>{let a=this.calculateCameraPosition(o.camera);this.setCameraPosition(a),this.renderer.render(this.scene,this.camera)},this.onCubeHovered=o=>{this.hoverInfo={cube:o.cube,originalMaterial:o.cube.material},this.hoverInfo.cube.material.emissive=new di(16777215),this.renderer.render(this.scene,this.camera)},this.onCubeUnhovered=()=>{this.hoverInfo.cube.material.emissive=new di(0),this.hoverInfo.cube=null,this.renderer.render(this.scene,this.camera)},this.onCubeClicked=o=>{switch(o.cube){case this.cubeDefinition.top.front.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,-1,1);break;case this.cubeDefinition.top.front.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,-1,1);break;case this.cubeDefinition.top.front.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,-1,1);break;case this.cubeDefinition.top.middle.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,-1,0);break;case this.cubeDefinition.top.middle.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,-1,0);break;case this.cubeDefinition.top.middle.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,-1,0);break;case this.cubeDefinition.top.back.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,-1,-1);break;case this.cubeDefinition.top.back.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,-1,-1);break;case this.cubeDefinition.top.back.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,-1,-1);break;case this.cubeDefinition.sides.front.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,0,-1);break;case this.cubeDefinition.sides.front.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,0,0);break;case this.cubeDefinition.sides.front.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,0,-1);break;case this.cubeDefinition.sides.middle.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,0,0);break;case this.cubeDefinition.sides.middle.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,0,0);break;case this.cubeDefinition.sides.back.left:this.threeMapControlsService.rotateCameraInVectorDirection(1,0,1);break;case this.cubeDefinition.sides.back.center:this.threeMapControlsService.rotateCameraInVectorDirection(0,0,1);break;case this.cubeDefinition.sides.back.right:this.threeMapControlsService.rotateCameraInVectorDirection(-1,0,1);break}}}ngOnInit(){this.initScene(),this.initLights(),this.initRenderer(this.elementReference.nativeElement),this.initCube(),this.initAxesHelper(),this.initCamera(),this.viewCubeMouseEvents.init(this.cubeGroup,this.camera,this.renderer),this.threeMapControlsService.subscribe("onCameraChanged",this.onCameraChanged),this.viewCubeMouseEvents.subscribe("viewCubeHoveredEvent",this.onCubeHovered),this.viewCubeMouseEvents.subscribe("viewCubeUnHoveredEvent",this.onCubeUnhovered),this.viewCubeMouseEvents.subscribe("viewCubeClicked",this.onCubeClicked)}initAxesHelper(){let e=new aw(1.3),n=-(this.LENGTH_VIEWCUBE/2)+.01;e.position.x+=n,e.position.y+=n,e.position.z+=n,this.scene.add(e)}initCube(){let{group:e,top:n,sides:r}=B2.buildCube(1.9);this.cubeGroup=e,this.cubeDefinition.top=n,this.cubeDefinition.sides=r;let o=new rw(this.cubeGroup,new di(0));this.scene.add(this.cubeGroup),this.scene.add(o)}setCameraPosition(e){this.camera.position.set(e.x,e.y,e.z),this.camera.lookAt(0,0,0),this.camera.updateProjectionMatrix()}calculateCameraPosition(e){let n=this.threeMapControlsService.controls.target.clone();return e.position.clone().sub(n).normalize().multiplyScalar(3)}initScene(){this.scene=new Uu}initRenderer(e){this.renderer=new Nu({alpha:!0,antialias:!0}),this.renderer.setSize(this.WIDTH,this.HEIGHT),this.renderer.setPixelRatio(window.devicePixelRatio),e.appendChild(this.renderer.domElement)}initCamera(){this.camera=new no(45,this.WIDTH/this.HEIGHT,.1,1e3),this.camera.position.z=4}initLights(){this.lights=new wo;let e=new vA(7368816,2.8),n=new Vu(14737632,1.8);n.position.set(50,10,8).normalize();let r=new Vu(14737632,1.8);r.position.set(-50,10,-8).normalize(),this.lights.add(e),this.lights.add(n),this.lights.add(r),this.scene.add(this.lights)}static{this.\u0275fac=function(n){return new(n||i)(se(Ft),se(yr),se(gS))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-view-cube"]],decls:2,vars:0,template:function(n,r){n&1&&J(0,"cc-center-map-button")(1,"cc-zoom-slider")},dependencies:[QY,zY],styles:["[_nghost-%COMP%]{transition:right .3s ease;position:absolute;z-index:11;right:0;top:10px}.sideBarVisible[_nghost-%COMP%]{right:350px}"]})}}return i})();var OBe=i=>{if(i)return{all:i.attributes?.unary??0,added:i.fileCount?.added??0,removed:i.fileCount?.removed??0,changed:i.fileCount?.changed??0}},GY=Re(eo,OBe);function LBe(i,t){if(i&1&&(Ut(0,"span",2),j(1," | "),Ut(2,"span",3),j(3),qt(),j(4," | "),Ut(5,"span",4),j(6),qt(),j(7," | "),Ut(8,"span",5),j(9),qt()()),i&2){let e=me();E(3),ct(" \u0394",e.added),E(3),ct(" \u0394",e.removed>0?-e.removed:0),E(3),ct(" \u0394",e.changed)}}function NBe(i,t){if(i&1&&(Ut(0,"span",2),j(1),ke(2,LBe,10,3,"span",2),fe(3,"async"),j(4," ) "),qt()),i&2){let e=t,n=me(2);E(),xs(" ( ",e.all," ",e.all===1?"file":"files"," "),E(),Pe(n.node.children!=null&&n.node.children.length&&_e(3,3,n.isDeltaMode$)?2:-1)}}function UBe(i,t){if(i&1&&(Ut(0,"span",1),j(1),ke(2,NBe,5,5,"span",2),fe(3,"async"),qt()),i&2){let e,n=me();E(),ct(" ",n.node.path," "),E(),Pe((e=_e(3,2,(n.node.children==null?null:n.node.children.length)&&n.fileCount$))?2:-1,e)}}var WY=(()=>{class i{constructor(e){this.fileCount$=e.select(GY),this.isDeltaMode$=e.select(So)}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-node-path"]],inputs:{node:"node"},decls:2,vars:1,consts:[[1,"cc-node-path"],[1,"file-path"],[1,"cc-node-file-count"],["title","Number of added files",1,"added-files"],["title","Number of removed files",1,"removed-files"],["title","Number of files with metric changes",1,"files-with-metric-changes"]],template:function(n,r){n&1&&(Ut(0,"p",0),ke(1,UBe,4,4,"span",1),qt()),n&2&&(E(),Pe(r.node?1:-1))},dependencies:[dt],styles:[".cc-node-path[_ngcontent-%COMP%]{color:gray;margin:5px 0}.cc-node-path[_ngcontent-%COMP%] .file-path[_ngcontent-%COMP%]{word-wrap:break-word}.cc-node-path[_ngcontent-%COMP%] .cc-node-file-count[_ngcontent-%COMP%]{background:#f0f0f0;border-radius:3px;padding:1px 3px;color:#000}.cc-node-path[_ngcontent-%COMP%] .cc-node-file-count[_ngcontent-%COMP%] .added-files[_ngcontent-%COMP%]{color:#64d051}.cc-node-path[_ngcontent-%COMP%] .cc-node-file-count[_ngcontent-%COMP%] .removed-files[_ngcontent-%COMP%]{color:#ff0e0e}.cc-node-path[_ngcontent-%COMP%] .cc-node-file-count[_ngcontent-%COMP%] .changed-files[_ngcontent-%COMP%]{color:#0e2eff}"]})}}return i})();var Hh=(()=>{class i{constructor(e){this.threeSceneService=e,this.isOpen=!1,this.threeSceneService.subscribe("onBuildingSelected",()=>{this.isOpen=!0}),this.threeSceneService.subscribe("onBuildingDeselected",()=>{this.isOpen=!1})}static{this.\u0275fac=function(n){return new(n||i)(Me(vr))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();function HBe(i,t){if(i&1&&(S(0,"div",1)(1,"a",4)(2,"h2"),j(3),F(),J(4,"i",5),F()()),i&2){let e=me(2);z("matTooltip",mr(e.node.link))("matTooltipShowDelay",200),E(),z("href",mr(e.node.link),Nl),E(2),ct("",e.node.name,"\xA0")}}function VBe(i,t){if(i&1){let e=st();S(0,"i",0),he("click",function(){Ve(e);let r=me();return Qe(r.closeSideBar())}),F(),ke(1,HBe,5,6,"div",1),S(2,"p",2),j(3),fe(4,"removeExtension"),F(),J(5,"cc-node-path",3)}if(i&2){let e=me();E(),Pe(e.node.link?1:-1),E(2),Ai(_e(4,3,e.fileName)),E(2),z("node",e.node)}}var jY=(()=>{class i{constructor(e){this.isAttributeSideBarVisibleService=e}closeSideBar(){this.isAttributeSideBarVisibleService.isOpen=!1}static{this.\u0275fac=function(n){return new(n||i)(se(Hh))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-attribute-side-bar-header-section"]],inputs:{node:"node",fileName:"fileName"},decls:1,vars:1,consts:[[1,"close-icon","fa","fa-times",3,"click"],["data-testid","file-link",1,"node-name",3,"matTooltip","matTooltipShowDelay"],[1,"node-origin"],[3,"node"],["target","_blank","rel","noopener noreferrer",1,"node-link",3,"href"],[1,"fa","fa-external-link"]],template:function(n,r){n&1&&ke(0,VBe,6,5),n&2&&Pe(r.node?0:-1)},dependencies:[ym,WY,hg],styles:["[_nghost-%COMP%]{display:flex;flex-direction:column}[_nghost-%COMP%] .close-icon[_ngcontent-%COMP%], [_nghost-%COMP%] .node-link[_ngcontent-%COMP%]{color:gray;padding:0;cursor:pointer;outline:none;transition:.2s}[_nghost-%COMP%] .close-icon[_ngcontent-%COMP%]:hover, [_nghost-%COMP%] .node-link[_ngcontent-%COMP%]:hover{color:#444}[_nghost-%COMP%] .close-icon[_ngcontent-%COMP%]{align-self:flex-end;font-size:20px}[_nghost-%COMP%] .node-name[_ngcontent-%COMP%]{width:90%;cursor:pointer}[_nghost-%COMP%] .node-name[_ngcontent-%COMP%] .node-link[_ngcontent-%COMP%]{font-size:11pt}[_nghost-%COMP%] .node-name[_ngcontent-%COMP%] .node-link[_ngcontent-%COMP%] h2[_ngcontent-%COMP%]{color:#000;display:inline}[_nghost-%COMP%] .node-origin[_ngcontent-%COMP%], [_nghost-%COMP%] .cc-node-path[_ngcontent-%COMP%]{color:gray;margin:5px 0}[_nghost-%COMP%] .node-origin[_ngcontent-%COMP%] .file-path[_ngcontent-%COMP%], [_nghost-%COMP%] .cc-node-path[_ngcontent-%COMP%] .file-path[_ngcontent-%COMP%]{word-wrap:break-word}[_nghost-%COMP%] .node-origin[_ngcontent-%COMP%] .cc-node-file-count[_ngcontent-%COMP%], [_nghost-%COMP%] .cc-node-path[_ngcontent-%COMP%] .cc-node-file-count[_ngcontent-%COMP%]{background:#f0f0f0;border-radius:3px;padding:1px 3px;color:#000}[_nghost-%COMP%] .node-origin[_ngcontent-%COMP%] .cc-node-file-count[_ngcontent-%COMP%] .added-files[_ngcontent-%COMP%], [_nghost-%COMP%] .cc-node-path[_ngcontent-%COMP%] .cc-node-file-count[_ngcontent-%COMP%] .added-files[_ngcontent-%COMP%]{color:#64d051}[_nghost-%COMP%] .node-origin[_ngcontent-%COMP%] .cc-node-file-count[_ngcontent-%COMP%] .removed-files[_ngcontent-%COMP%], [_nghost-%COMP%] .cc-node-path[_ngcontent-%COMP%] .cc-node-file-count[_ngcontent-%COMP%] .removed-files[_ngcontent-%COMP%]{color:#ff0e0e}[_nghost-%COMP%] .node-origin[_ngcontent-%COMP%] .cc-node-file-count[_ngcontent-%COMP%] .changed-files[_ngcontent-%COMP%], [_nghost-%COMP%] .cc-node-path[_ngcontent-%COMP%] .cc-node-file-count[_ngcontent-%COMP%] .changed-files[_ngcontent-%COMP%]{color:#0e2eff}"]})}}return i})();var QBe=i=>i&&!Yi(i),Ng=Re(eo,QBe);var $Y=Re(eo,Bh,(i,t)=>{if(i)return{area:{name:t.areaMetric,value:i.attributes[t.areaMetric]},height:{name:t.heightMetric,value:i.attributes[t.heightMetric]},color:{name:t.colorMetric,value:i.attributes[t.colorMetric]},edge:zBe(t.edgeMetric,i)}});function zBe(i,t){return i==null?null:{name:i,incoming:t.edgeAttributes[i]?t.edgeAttributes[i].incoming??0:0,outgoing:t.edgeAttributes[i]?t.edgeAttributes[i].outgoing??0:0}}var Ug=(()=>{class i{constructor(e){this.store=e,this.attributeTypes$=this.store.select(EA)}setToAbsolute(){this.setAttributeType(al.absolute)}setToRelative(){this.setAttributeType(al.relative)}setAttributeType(e){this.store.dispatch(ZA({category:this.metricType,name:this.metricName,attributeType:e}))}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-attribute-type-selector"]],inputs:{metricName:"metricName",metricType:"metricType"},decls:6,vars:3,consts:[[3,"value"],["title","Select Sum","value","absolute",3,"click"],["title","Select Median","value","relative",3,"click"]],template:function(n,r){n&1&&(S(0,"mat-button-toggle-group",0),fe(1,"async"),S(2,"mat-button-toggle",1),he("click",function(){return r.setToAbsolute()}),j(3,"\u03A3"),F(),S(4,"mat-button-toggle",2),he("click",function(){return r.setToRelative()}),j(5,"x\u0342"),F()()),n&2&&z("value",_e(1,1,r.attributeTypes$)[r.metricType][r.metricName]??"absolute")},dependencies:[jb,xm,dt],encapsulation:2})}}return i})();function qBe(i,t){if(i&1&&(Ut(0,"span"),fe(1,"async"),j(2),fe(3,"number"),qt()),i&2){let e=t,n=me();pi("color",_e(1,3,n.mapColors$)[e>0?"positiveDelta":"negativeDelta"]),E(2),ct(" \u0394",dn(3,5,e,"1.1-2")," ")}}var I2=(()=>{class i{constructor(e){this.store=e}ngOnInit(){this.selectedNode$=this.store.select(eo),this.mapColors$=this.store.select(Ns)}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-metric-delta-selected"]],inputs:{metricName:"metricName"},decls:2,vars:3,consts:[[3,"color"]],template:function(n,r){if(n&1&&(ke(0,qBe,4,8,"span",0),fe(1,"async")),n&2){let o;Pe((o=(o=_e(1,1,r.selectedNode$))==null||o.deltas==null?null:o.deltas[r.metricName])?0:-1,o)}},dependencies:[dt,id],styles:["[_nghost-%COMP%]:has(span){margin-top:5px}"]})}}return i})();function GBe(i,t){if(i&1&&J(0,"cc-attribute-type-selector",2),i&2){let e=me();z("metricName",e.metric.name)("metricType","nodes")}}function WBe(i,t){if(i&1&&(S(0,"a",5),j(1),J(2,"i",7),F()),i&2){let e=me();z("href",t,Nl),E(),ct(" ",e.metric.name," ")}}function jBe(i,t){if(i&1&&(S(0,"span",6),j(1),F()),i&2){let e=me();E(),Ai(e.metric.name)}}var XY=(()=>{class i{constructor(e){this.showAttributeTypeSelector$=e.select(Ng)}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-attribute-side-bar-primary-metric"]],inputs:{iconName:"iconName",metric:"metric",metricLink:"metricLink"},decls:11,vars:11,consts:[[1,"primary-metric-box"],[1,"primary-metric-row"],[1,"attribute-type-select",3,"metricName","metricType"],[1,"primary-metric-value"],[3,"metricName"],["target","_blank",1,"metric-name",3,"href"],[1,"metric-name"],[1,"fa","fa-external-link"]],template:function(n,r){if(n&1&&(S(0,"div",0)(1,"div",1),J(2,"i"),ke(3,GBe,1,2,"cc-attribute-type-selector",2),fe(4,"async"),S(5,"span",3),j(6),fe(7,"number"),F()(),J(8,"cc-metric-delta-selected",4),ke(9,WBe,3,2,"a",5)(10,jBe,2,1,"span",6),F()),n&2){let o;E(2),Xi(r.iconName),E(),Pe(_e(4,6,r.showAttributeTypeSelector$)?3:-1),E(3),Ai(dn(7,8,r.metric.value,"1.0-0")),E(2),z("metricName",r.metric.name),E(),Pe((o=r.metricLink)?9:10,o)}},dependencies:[Ug,I2,dt,id],styles:[".primary-metric-box[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;width:100%}.primary-metric-row[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:5px}.metric-name[_ngcontent-%COMP%]{margin-top:5px;color:gray;word-break:break-word;vertical-align:middle}.primary-metric-value[_ngcontent-%COMP%]{margin-right:-5px}i.fa[_ngcontent-%COMP%]{font-size:12pt;min-width:17px;text-align:center}"]})}}return i})();function $Be(i,t){if(i&1&&J(0,"cc-attribute-type-selector",8),i&2){let e=me();z("metricName",e.name)("metricType","edges")}}function XBe(i,t){if(i&1&&(S(0,"a",10),j(1),J(2,"i",12),F()),i&2){let e=me();z("href",t,Nl),E(),ct(" ",e.name," (in/out) ")}}function KBe(i,t){if(i&1&&(S(0,"span",11),j(1),F()),i&2){let e=me();E(),ct("",e.name," (in/out)")}}function YBe(i,t){if(i&1&&(S(0,"td",3),fe(1,"attributeDescriptorTooltip"),S(2,"div",5)(3,"div",6),J(4,"i",7),ke(5,$Be,1,2,"cc-attribute-type-selector",8),fe(6,"async"),S(7,"span",9),j(8),fe(9,"number"),S(10,"span"),j(11,"/"),F(),j(12),fe(13,"number"),F()(),ke(14,XBe,3,2,"a",10)(15,KBe,2,1,"span",11),F()()),i&2){let e,n=t,r=me(2),o=me();z("title",dn(1,5,r[n.name],n.name)),E(5),Pe(_e(6,8,o.showAttributeTypeSelector$)?5:-1),E(3),ct(" ",dn(9,10,n.incoming,"1.0-0")," "),E(4),ct(" ",dn(13,13,n.outgoing,"1.0-0")," "),E(2),Pe((e=r[n.name]==null?null:r[n.name].link)?14:15,e)}}function ZBe(i,t){i&1&&(S(0,"td")(1,"span",11),j(2,"No edge metric available"),F()())}function JBe(i,t){if(i&1&&(S(0,"table",1)(1,"th",2),j(2,"Primary Metrics"),F(),S(3,"tr")(4,"td",3),fe(5,"attributeDescriptorTooltip"),J(6,"cc-attribute-side-bar-primary-metric",4),F(),S(7,"td",3),fe(8,"attributeDescriptorTooltip"),J(9,"cc-attribute-side-bar-primary-metric",4),F()(),S(10,"tr")(11,"td",3),fe(12,"attributeDescriptorTooltip"),J(13,"cc-attribute-side-bar-primary-metric",4),F(),ke(14,YBe,16,16,"td",3)(15,ZBe,3,0,"td"),F()()),i&2){let e,n=t,r=me();E(4),z("title",dn(5,13,r[n.area.name],n.area.name)),E(2),z("iconName","fa fa-arrows-alt")("metric",n.area)("metricLink",r[n.area.name]==null?null:r[n.area.name].link),E(),z("title",dn(8,16,r[n.height.name],n.height.name)),E(2),z("iconName","fa fa-arrows-v")("metric",n.height)("metricLink",r[n.height.name]==null?null:r[n.height.name].link),E(2),z("title",dn(12,19,r[n.color.name],n.color.name)),E(2),z("iconName","fa fa-paint-brush")("metric",n.color)("metricLink",r[n.color.name]==null?null:r[n.color.name].link),E(),Pe((e=n.edge)?14:15,e)}}function eFe(i,t){if(i&1&&(S(0,"div",0),ke(1,JBe,16,22,"table",1),fe(2,"async"),F()),i&2){let e,n=me();E(),Pe((e=_e(2,1,n.primaryMetrics$))?1:-1,e)}}var KY=(()=>{class i{constructor(e){this.store=e,this.primaryMetrics$=this.store.select($Y),this.showAttributeTypeSelector$=this.store.select(Ng),this.attributeDescriptors$=this.store.select(Th)}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-attribute-side-bar-primary-metrics"]],decls:2,vars:3,consts:[[1,"metric-box"],["aria-hidden","true",1,"primary-metrics"],["scope","col"],[3,"title"],[3,"iconName","metric","metricLink"],[1,"primary-metric-box"],[1,"primary-metric-row"],[1,"fa","fa-exchange"],[1,"attribute-type-select",3,"metricName","metricType"],[1,"text-content"],["target","_blank",1,"metric-name",3,"href"],[1,"metric-name"],[1,"fa","fa-external-link"]],template:function(n,r){if(n&1&&(ke(0,eFe,3,3,"div",0),fe(1,"async")),n&2){let o;Pe((o=_e(1,1,r.attributeDescriptors$))?0:-1,o)}},dependencies:[XY,Ug,dt,id,kh],styles:["[_nghost-%COMP%] .metric-box[_ngcontent-%COMP%] i.fa.fa-external-link[_ngcontent-%COMP%], [_nghost-%COMP%] .metrics-wrapper[_ngcontent-%COMP%] i.fa.fa-external-link[_ngcontent-%COMP%]{font-size:10px;min-width:10px;text-align:center}[_nghost-%COMP%] .metric-box[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:link, [_nghost-%COMP%] .metric-box[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited, [_nghost-%COMP%] .metrics-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:link, [_nghost-%COMP%] .metrics-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{text-decoration:none}[_nghost-%COMP%] .metric-box[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, [_nghost-%COMP%] .metrics-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:#00f;text-decoration:solid;text-decoration-line:underline}[_nghost-%COMP%] .metric-box[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:active, [_nghost-%COMP%] .metrics-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:active{color:red}.metric-box[_ngcontent-%COMP%]{border-radius:5px;background-color:#f0f0f0;padding:5px}.metric-box.scrollable-content[_ngcontent-%COMP%]{max-height:100%;overflow:auto}.metric-box[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:left}.metric-box[_ngcontent-%COMP%] table.primary-metrics[_ngcontent-%COMP%]{table-layout:fixed;width:100%;border-collapse:collapse}.metric-box[_ngcontent-%COMP%] table.primary-metrics[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:not(:last-child) td[_ngcontent-%COMP%]{border-bottom:3px solid white}.metric-box[_ngcontent-%COMP%] table.primary-metrics[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:5px}.metric-box[_ngcontent-%COMP%] table.primary-metrics[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{border-right:3px solid white}.metric-box[_ngcontent-%COMP%] table.primary-metrics[_ngcontent-%COMP%] .primary-metric-box[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;width:100%}.metric-box[_ngcontent-%COMP%] table.primary-metrics[_ngcontent-%COMP%] .primary-metric-row[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:5px}.metric-box[_ngcontent-%COMP%] table.primary-metrics[_ngcontent-%COMP%] i.fa[_ngcontent-%COMP%]{font-size:12pt;min-width:17px;text-align:center}.metric-box[_ngcontent-%COMP%] table.secondary-metrics[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-left:5px}.metric-box[_ngcontent-%COMP%] table.secondary-metrics[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding-left:4px}.metric-box[_ngcontent-%COMP%] table.secondary-metrics[_ngcontent-%COMP%] .secondary-metric-box[_ngcontent-%COMP%]{border-radius:3px;padding:4px;vertical-align:middle;background:#d5d5d5}.metric-box[_ngcontent-%COMP%] table.secondary-metrics[_ngcontent-%COMP%] .secondary-metric-row[_ngcontent-%COMP%]{flex-wrap:nowrap}.metric-box[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .metric-name[_ngcontent-%COMP%]{color:gray;word-break:break-word;vertical-align:middle;margin-top:5px}.metric-box[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .delta-value-box[_ngcontent-%COMP%]{vertical-align:middle}.secondary-metric-row[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:5px}"]})}}return i})();var tFe=i=>!!i?.deltas,YY=Re(eo,tFe);var iFe=(i,t)=>{if(!t)return[];let e=Object.values(i);return Object.keys(t.attributes).filter(r=>r!=="unary"&&!e.includes(r)).sort((r,o)=>r.localeCompare(o)).map(r=>({name:r,value:t.attributes[r]}))},ZY=Re(Bh,eo,iFe);var nFe=(i,t)=>t.name;function rFe(i,t){if(i&1&&J(0,"cc-attribute-type-selector",8),i&2){let e=me().$implicit;z("metricName",e.name)("metricType","nodes")}}function oFe(i,t){if(i&1&&(S(0,"a",12),j(1),J(2,"i",14),F()),i&2){let e=me().$implicit;z("href",t,Nl),E(),ct(" ",e.name," ")}}function aFe(i,t){if(i&1&&(S(0,"span",13),j(1),F()),i&2){let e=me().$implicit;E(),Ai(e.name)}}function sFe(i,t){if(i&1&&(S(0,"tr",5),fe(1,"attributeDescriptorTooltip"),S(2,"td",6)(3,"div",7),ke(4,rFe,1,2,"cc-attribute-type-selector",8),fe(5,"async"),S(6,"span",9),j(7),fe(8,"number"),F()()(),S(9,"td",10),fe(10,"async"),J(11,"cc-metric-delta-selected",11),F(),S(12,"td"),ke(13,oFe,3,2,"a",12)(14,aFe,2,1,"span",13),F()()),i&2){let e,n=t.$implicit,r=me(),o=me();z("title",dn(1,6,r[n.name],n.name)),E(4),Pe(_e(5,9,o.showAttributeTypeSelector$)?4:-1),E(3),Ai(dn(8,11,n.value,"1.0-0")),E(2),z("hidden",!_e(10,14,o.showDeltaValue$)),E(2),z("metricName",n.name),E(2),Pe((e=r[n.name]==null?null:r[n.name].link)?13:14,e)}}function lFe(i,t){if(i&1&&(S(0,"div",2)(1,"table",3)(2,"tr")(3,"th",4),j(4,"Secondary Metrics"),F()(),xi(5,sFe,15,16,"tr",5,nFe),fe(7,"async"),F()()),i&2){let e=me();E(5),wi(_e(7,0,e.secondaryMetrics$))}}var JY=(()=>{class i{constructor(e){this.store=e,this.secondaryMetrics$=this.store.select(ZY),this.showAttributeTypeSelector$=this.store.select(Ng),this.showDeltaValue$=this.store.select(YY),this.attributeDescriptors$=this.store.select(Th)}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-attribute-side-bar-secondary-metrics"]],decls:4,vars:3,consts:[[1,"secondary-metrics-wrapper"],[1,"metrics-wrapper"],[1,"metric-box","scrollable-content"],["aria-hidden","true",1,"secondary-metrics"],["scope","col","colspan","2"],[3,"title"],[1,"secondary-metric-box"],[1,"secondary-metric-row"],[1,"attribute-type-select",3,"metricName","metricType"],[1,"metric-value"],[1,"delta-value-box",3,"hidden"],[3,"metricName"],["target","_blank",1,"metric-name",3,"href"],[1,"metric-name"],[1,"fa","fa-external-link"]],template:function(n,r){if(n&1&&(S(0,"div",0)(1,"div",1),ke(2,lFe,8,2,"div",2),fe(3,"async"),F()()),n&2){let o;E(2),Pe((o=_e(3,1,r.attributeDescriptors$))?2:-1,o)}},dependencies:[Ug,I2,dt,id,kh],styles:["[_nghost-%COMP%] .metric-box[_ngcontent-%COMP%] i.fa.fa-external-link[_ngcontent-%COMP%], [_nghost-%COMP%] .metrics-wrapper[_ngcontent-%COMP%] i.fa.fa-external-link[_ngcontent-%COMP%]{font-size:10px;min-width:10px;text-align:center}[_nghost-%COMP%] .metric-box[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:link, [_nghost-%COMP%] .metric-box[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited, [_nghost-%COMP%] .metrics-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:link, [_nghost-%COMP%] .metrics-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:visited{text-decoration:none}[_nghost-%COMP%] .metric-box[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover, [_nghost-%COMP%] .metrics-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:hover{color:#00f;text-decoration:solid;text-decoration-line:underline}[_nghost-%COMP%] .metric-box[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:active, [_nghost-%COMP%] .metrics-wrapper[_ngcontent-%COMP%] a[_ngcontent-%COMP%]:active{color:red}.metric-box[_ngcontent-%COMP%]{border-radius:5px;background-color:#f0f0f0;padding:5px}.metric-box.scrollable-content[_ngcontent-%COMP%]{max-height:100%;overflow:auto}.metric-box[_ngcontent-%COMP%] table[_ngcontent-%COMP%] th[_ngcontent-%COMP%]{text-align:left}.metric-box[_ngcontent-%COMP%] table.primary-metrics[_ngcontent-%COMP%]{table-layout:fixed;width:100%;border-collapse:collapse}.metric-box[_ngcontent-%COMP%] table.primary-metrics[_ngcontent-%COMP%] tr[_ngcontent-%COMP%]:not(:last-child) td[_ngcontent-%COMP%]{border-bottom:3px solid white}.metric-box[_ngcontent-%COMP%] table.primary-metrics[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding:5px}.metric-box[_ngcontent-%COMP%] table.primary-metrics[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{border-right:3px solid white}.metric-box[_ngcontent-%COMP%] table.primary-metrics[_ngcontent-%COMP%] .primary-metric-box[_ngcontent-%COMP%]{display:flex;flex-direction:column;height:100%;width:100%}.metric-box[_ngcontent-%COMP%] table.primary-metrics[_ngcontent-%COMP%] .primary-metric-row[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:5px}.metric-box[_ngcontent-%COMP%] table.primary-metrics[_ngcontent-%COMP%] i.fa[_ngcontent-%COMP%]{font-size:12pt;min-width:17px;text-align:center}.metric-box[_ngcontent-%COMP%] table.secondary-metrics[_ngcontent-%COMP%] td[_ngcontent-%COMP%]{padding-left:5px}.metric-box[_ngcontent-%COMP%] table.secondary-metrics[_ngcontent-%COMP%] td[_ngcontent-%COMP%]:first-child{padding-left:4px}.metric-box[_ngcontent-%COMP%] table.secondary-metrics[_ngcontent-%COMP%] .secondary-metric-box[_ngcontent-%COMP%]{border-radius:3px;padding:4px;vertical-align:middle;background:#d5d5d5}.metric-box[_ngcontent-%COMP%] table.secondary-metrics[_ngcontent-%COMP%] .secondary-metric-row[_ngcontent-%COMP%]{flex-wrap:nowrap}.metric-box[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .metric-name[_ngcontent-%COMP%]{color:gray;word-break:break-word;vertical-align:middle;margin-top:5px}.metric-box[_ngcontent-%COMP%] table[_ngcontent-%COMP%] .delta-value-box[_ngcontent-%COMP%]{vertical-align:middle}.secondary-metric-row[_ngcontent-%COMP%]{display:flex;align-items:center;flex-wrap:wrap;gap:5px}",'.secondary-metrics-wrapper[_ngcontent-%COMP%]{position:relative}.secondary-metrics-wrapper[_ngcontent-%COMP%]:after{content:"";clear:both;display:block}.secondary-metrics-wrapper[_ngcontent-%COMP%] .metrics-wrapper[_ngcontent-%COMP%]{position:absolute;width:100%;height:100%;padding-top:12px}']})}}return i})();var eZ=(()=>{class i{constructor(e,n){this.isAttributeSideBarVisibleService=e,this.store=n,this.selectedNode$=this.store.select(eo),this.fileName$=this.store.select(br).pipe(Et(r=>r.unifiedFileMeta?.fileName??""))}static{this.\u0275fac=function(n){return new(n||i)(se(Hh),se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-attribute-side-bar"]],decls:6,vars:8,consts:[[1,"side-bar-container","cc-shadow"],[3,"node","fileName"]],template:function(n,r){n&1&&(S(0,"div",0),J(1,"cc-attribute-side-bar-header-section",1),fe(2,"async"),fe(3,"async"),J(4,"cc-attribute-side-bar-primary-metrics")(5,"cc-attribute-side-bar-secondary-metrics"),F()),n&2&&(yt("expanded",r.isAttributeSideBarVisibleService.isOpen),E(),z("node",_e(2,4,r.selectedNode$))("fileName",_e(3,6,r.fileName$)))},dependencies:[jY,KY,JY,dt],styles:['[_nghost-%COMP%] .side-bar-container[_ngcontent-%COMP%]{transition:right .3s ease;width:350px;height:calc(100% - 98px);padding:8px;font-size:11pt;position:absolute;right:-355px;background:#fff}[_nghost-%COMP%] .side-bar-container.expanded[_ngcontent-%COMP%]{display:block;right:0}[_nghost-%COMP%] .side-bar-container.cc-shadow[_ngcontent-%COMP%]{box-shadow:0 1px 5px #0003!important}[_nghost-%COMP%] .side-bar-container[_ngcontent-%COMP%]:before{content:"";height:100%;float:left}']})}}return i})();var tZ=(()=>{class i{constructor(e,n,r,o,a){this.isAttributeSideBarVisibleService=e,this.store=n,this.threeViewerService=r,this.codeMapMouseEventService=o,this.elementReference=a,this.isLoadingFile$=this.store.select(Mg),this.restartOnSharpnessModeChangesSubscription=this.store.select(YM).pipe(ys(1),Oi(()=>{this.threeViewerService.restart(this.elementReference.nativeElement.querySelector("#codeMap")),this.codeMapMouseEventService.start()})).subscribe()}ngAfterViewInit(){this.threeViewerService.init(this.elementReference.nativeElement.querySelector("#codeMap")),this.codeMapMouseEventService.start()}ngOnDestroy(){this.restartOnSharpnessModeChangesSubscription.unsubscribe()}static{this.\u0275fac=function(n){return new(n||i)(se(Hh),se(Ie),se(bS),se(Hd),se(Ft))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-code-map"]],decls:4,vars:6,consts:[["id","codeMap"]],template:function(n,r){n&1&&(S(0,"div",0),fe(1,"async"),J(2,"cc-view-cube")(3,"cc-attribute-side-bar"),F()),n&2&&(yt("hidden",_e(1,4,r.isLoadingFile$)),E(2),yt("sideBarVisible",r.isAttributeSideBarVisibleService.isOpen))},dependencies:[qY,eZ,dt],styles:["[_nghost-%COMP%] .hidden[_ngcontent-%COMP%]{display:none}[_nghost-%COMP%] #codeMap[_ngcontent-%COMP%]{position:fixed;z-index:0;top:98px;left:0;width:100%;height:100%}"]})}}return i})();function cFe(i,t){if(i&1&&(Ut(0,"a",2)(1,"span",3),j(2),qt(),j(3),Ti(4,"i",4),qt()),i&2){let e=me(),n=me(2);sn("href",t,Nl),E(2),Ai(e),E(),ct(" (",n.metricName,") ")}}function dFe(i,t){if(i&1&&(Ut(0,"span",3),j(1),qt(),j(2)),i&2){let e=me(),n=me(2);E(),Ai(e),E(),ct(" (",n.metricName,") ")}}function uFe(i,t){if(i&1&&(CO(0,0),Ut(1,"div",1),fe(2,"attributeDescriptorTooltip"),j(3),ke(4,cFe,5,3,"a",2)(5,dFe,3,2),qt(),MO()),i&2){let e,n=me(),r=me();E(),sn("title",dn(2,3,n[r.metricName],r.metricName)),E(2),ct(" ",r.metricSpecification," metric: "),E(),Pe((e=n[r.metricName].link)?4:5,e)}}function hFe(i,t){if(i&1&&(Ut(0,"span",3),j(1),qt(),j(2)),i&2){let e=me(3);E(),Ai(t),E(),ct(" (",e.metricName,") ")}}function fFe(i,t){if(i&1&&(Ut(0,"span",3),j(1),qt()),i&2){let e=me(3);E(),ct(" ",e.metricName," ")}}function mFe(i,t){if(i&1&&(Ut(0,"div"),j(1),ke(2,hFe,3,2)(3,fFe,2,1,"span",3),qt()),i&2){let e,n=me(2);E(),ct(" ",n.metricSpecification," metric: "),E(),Pe((e=n.fallbackTitles.get(n.metricName))?2:3,e)}}function pFe(i,t){if(i&1&&ke(0,uFe,6,6,"ng-container",0)(1,mFe,4,2,"div"),i&2){let e,n=t,r=me();Pe((e=n[r.metricName]==null?null:n[r.metricName].title)?0:1,e)}}var iZ=(()=>{class i{constructor(e){this.store=e,this.attributeDescriptors$=this.store.select(Th),this.fallbackTitles=Cl}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-legend-block"]],inputs:{metricName:"metricName",metricSpecification:"metricSpecification"},decls:2,vars:3,consts:[[1,"legend-block"],[3,"title"],["target","_blank",3,"href"],[1,"bold"],[1,"fa","fa-external-link"]],template:function(n,r){if(n&1&&(ke(0,pFe,2,1),fe(1,"async")),n&2){let o;Pe((o=_e(1,1,r.attributeDescriptors$))?0:-1,o)}},dependencies:[dt,kh],styles:["[_nghost-%COMP%] a[_ngcontent-%COMP%]:link, [_nghost-%COMP%] a[_ngcontent-%COMP%]:visited{text-decoration:none;color:#000}[_nghost-%COMP%] a[_ngcontent-%COMP%]:hover{color:#00f;text-decoration:solid;text-decoration-line:underline}[_nghost-%COMP%] a[_ngcontent-%COMP%]:active{color:red}[_nghost-%COMP%] i.fa.fa-external-link[_ngcontent-%COMP%]{font-size:10px;min-width:10px;text-align:center}[_nghost-%COMP%] span[_ngcontent-%COMP%]{display:inline-block}[_nghost-%COMP%] span.bold[_ngcontent-%COMP%]{font-weight:600}"]})}}return i})();var D2=Re(fc,i=>i.markedPackages);var nZ=Re(D2,i=>i.reduce((t,{color:e,path:n})=>(Object.prototype.hasOwnProperty.call(t,e)||(t[e]=[]),t[e].push(n),t),{}));function AFe(i,t){if(i&1){let e=st();S(0,"cc-labelled-color-picker",1),he("colorChange",function(r){let o=Ve(e).$implicit,a=me(2);return Qe(a.handleColorChange(r,o.value))}),F()}if(i&2){let e=t.$implicit;z("hexColor",e.key)("labels",e.value)}}function gFe(i,t){if(i&1&&(J(0,"hr"),xi(1,AFe,1,2,"cc-labelled-color-picker",0,xO().trackMarkedPackage,!0),fe(3,"async"),fe(4,"keyvalue")),i&2){let e=me();E(),wi(dn(4,2,_e(3,0,e.markedPackagesMap$),e.sortMarkedPackagesMap))}}var rZ=(()=>{class i{constructor(e){this.store=e,this.markedPackagesMap$=e.select(nZ),this.hasMarkedPackages$=this.markedPackagesMap$.pipe(Et(n=>Object.keys(n).length>0))}handleColorChange(e,n){this.store.dispatch(xc({packages:n.map(r=>({color:e,path:r}))}))}trackMarkedPackage(e,{value:n}){return n.join(",")}sortMarkedPackagesMap(e,n){return e.value[0].localeCompare(n.value[0])}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-legend-marked-packages"]],decls:2,vars:3,consts:[[3,"hexColor","labels"],[3,"colorChange","hexColor","labels"]],template:function(n,r){n&1&&(ke(0,gFe,5,5),fe(1,"async")),n&2&&Pe(_e(1,1,r.hasMarkedPackages$)?0:-1)},dependencies:[$A,dt,ff],styles:["[_nghost-%COMP%] cc-labelled-color-picker[_ngcontent-%COMP%]{display:block}"]})}}return i})();function _Fe(i,t){i&1&&J(0,"cc-legend-block",5),i&2&&z("metricName",t)}function bFe(i,t){if(i&1&&(S(0,"div"),J(1,"cc-legend-block",3),fe(2,"async"),J(3,"cc-legend-block",4),fe(4,"async"),ke(5,_Fe,1,1,"cc-legend-block",5),fe(6,"async"),J(7,"hr")(8,"cc-legend-block",6),fe(9,"async"),J(10,"cc-color-picker-for-map-color",1)(11,"cc-color-picker-for-map-color",1)(12,"cc-color-picker-for-map-color",1),F()),i&2){let e,n=me();E(),z("metricName",_e(2,7,n.areaMetric$)),E(2),z("metricName",_e(4,9,n.heightMetric$)),E(2),Pe((e=_e(6,11,n.edgeMetric$))?5:-1,e),E(3),z("metricName",_e(9,13,n.colorMetric$)),E(2),z("mapColorFor","positive"),E(),z("mapColorFor","neutral"),E(),z("mapColorFor","negative")}}function vFe(i,t){i&1&&(S(0,"div"),J(1,"cc-color-picker-for-map-color",1)(2,"cc-color-picker-for-map-color",1),F()),i&2&&(E(),z("mapColorFor","positiveDelta"),E(),z("mapColorFor","negativeDelta"))}function yFe(i,t){i&1&&J(0,"hr")(1,"cc-color-picker-for-map-color",1)(2,"cc-color-picker-for-map-color",1),i&2&&(E(),z("mapColorFor","outgoingEdge"),E(),z("mapColorFor","incomingEdge"))}var oZ=(()=>{class i{constructor(e,n,r){this.store=e,this.isAttributeSideBarVisibleService=n,this.viewReference=r,this.isLegendVisible=!1,this.isDeltaState$=this.store.select(So),this.heightMetric$=this.store.select(Pc),this.areaMetric$=this.store.select(Or),this.colorMetric$=this.store.select(oa),this.edgeMetric$=this.store.select(Wo)}ngOnInit(){this.mouseDownListener=e=>this.collapseOnOutsideClick(e),document.addEventListener("mousedown",this.mouseDownListener)}ngOnDestroy(){this.mouseDownListener&&document.removeEventListener("mousedown",this.mouseDownListener)}toggleIsLegendVisible(){this.isLegendVisible=!this.isLegendVisible}collapseOnOutsideClick(e){let n=e.target;if(this.isLegendVisible){let r=this.viewReference.element.nativeElement.contains(n),o=document.querySelector(".cdk-overlay-container"),a=o?o.contains(n):!1;!r&&!a&&(this.isLegendVisible=!1)}}static{this.\u0275fac=function(n){return new(n||i)(se(Ie),se(Hh),se(Hr))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-legend-panel"]],decls:11,vars:15,consts:[["id","legend-panel",1,"block-wrapper"],[3,"mapColorFor"],["mat-button","","id","legend-panel-button",1,"panel-button",3,"click","title"],["metricSpecification","Area",3,"metricName"],["metricSpecification","Height",3,"metricName"],["metricSpecification","Edge",3,"metricName"],["metricSpecification","Color",3,"metricName"]],template:function(n,r){n&1&&(S(0,"div",0),ke(1,bFe,13,15,"div"),fe(2,"async"),Kc(3,vFe,3,2,"div"),J(4,"hr")(5,"cc-color-picker-for-map-color",1),ke(6,yFe,3,2),fe(7,"async"),J(8,"cc-legend-marked-packages"),F(),S(9,"button",2),he("click",function(){return r.toggleIsLegendVisible()}),j(10,` LEGEND
|
|
5210
|
-
`),F()),n&2&&(yt("visible",r.isLegendVisible)("isAttributeSideBarVisible",r.isAttributeSideBarVisibleService.isOpen),E(),Pe(_e(2,11,r.isDeltaState$)?3:1),E(4),z("mapColorFor","selected"),E(),Pe(_e(7,13,r.edgeMetric$)?6:-1),E(3),yt("isAttributeSideBarVisible",r.isAttributeSideBarVisibleService.isOpen),z("title",mr(r.isLegendVisible?"Hide panel":"Show panel")))},dependencies:[iZ,Og,rZ,Wi,dt],styles:["[_nghost-%COMP%] .rotated-button[_ngcontent-%COMP%], [_nghost-%COMP%] .panel-button[_ngcontent-%COMP%]{position:fixed;transform:rotate(90deg);border-radius:0 0 5px 5px;height:36px;right:-35px;color:#fff;-webkit-user-select:none;user-select:none;background-color:#1b9cfc}[_nghost-%COMP%] .rotated-button[_ngcontent-%COMP%]:hover, [_nghost-%COMP%] .panel-button[_ngcontent-%COMP%]:hover{background-color:#0374c9}[_nghost-%COMP%] .rotated-button.isAttributeSideBarVisible[_ngcontent-%COMP%], [_nghost-%COMP%] .isAttributeSideBarVisible.panel-button[_ngcontent-%COMP%]{right:316px}[_nghost-%COMP%] .panel-button[_ngcontent-%COMP%]{margin:6px 8px;bottom:55px;width:88px;font-size:10pt;transition:right .3s ease}[_nghost-%COMP%] .block-wrapper[_ngcontent-%COMP%]{background-color:#fff;border:1px solid #cdcdcd;position:fixed;bottom:35px;padding:10px;right:40px;visibility:hidden;border-radius:5px;min-width:200px;max-width:30%;transition:right .3s ease}[_nghost-%COMP%] .block-wrapper.isAttributeSideBarVisible[_ngcontent-%COMP%]{right:390px}[_nghost-%COMP%] .block-wrapper.visible[_ngcontent-%COMP%]{visibility:visible}[_nghost-%COMP%] .block-wrapper[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border-right-style:none;border-left-style:none;border-bottom-style:none;color:#000}"]})}}return i})();var aZ=(()=>{class i{constructor(e){this.isLoadingFile$=e.select(Mg)}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-loading-file-progress-spinner"]],decls:3,vars:4,consts:[["id","loading-gif-file"],["mode","indeterminate","diameter","96"]],template:function(n,r){n&1&&(S(0,"div",0),fe(1,"async"),J(2,"mat-progress-spinner",1),F()),n&2&&pi("visibility",_e(1,2,r.isLoadingFile$)?"visible":"hidden")},dependencies:[$M,dt],styles:["#loading-gif-file[_ngcontent-%COMP%]{position:fixed;left:0;top:0;width:100%;height:100%;z-index:40;background-color:#fffc;display:inline-block;text-align:center}#loading-gif-file[_ngcontent-%COMP%] mat-progress-spinner.mat-mdc-progress-spinner[_ngcontent-%COMP%]{display:inline-block;margin:22% auto 0}"]})}}return i})();var sZ=(()=>{class i{constructor(){this.version=Zl.version}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=re({type:i,selectors:[["cc-logo"]],decls:9,vars:1,consts:[[1,"logo"],["href","https://github.com/MaibornWolff/codecharta","target","_blank","rel","noopener noreferrer"],["src","
|
|
5210
|
+
`),F()),n&2&&(yt("visible",r.isLegendVisible)("isAttributeSideBarVisible",r.isAttributeSideBarVisibleService.isOpen),E(),Pe(_e(2,11,r.isDeltaState$)?3:1),E(4),z("mapColorFor","selected"),E(),Pe(_e(7,13,r.edgeMetric$)?6:-1),E(3),yt("isAttributeSideBarVisible",r.isAttributeSideBarVisibleService.isOpen),z("title",mr(r.isLegendVisible?"Hide panel":"Show panel")))},dependencies:[iZ,Og,rZ,Wi,dt],styles:["[_nghost-%COMP%] .rotated-button[_ngcontent-%COMP%], [_nghost-%COMP%] .panel-button[_ngcontent-%COMP%]{position:fixed;transform:rotate(90deg);border-radius:0 0 5px 5px;height:36px;right:-35px;color:#fff;-webkit-user-select:none;user-select:none;background-color:#1b9cfc}[_nghost-%COMP%] .rotated-button[_ngcontent-%COMP%]:hover, [_nghost-%COMP%] .panel-button[_ngcontent-%COMP%]:hover{background-color:#0374c9}[_nghost-%COMP%] .rotated-button.isAttributeSideBarVisible[_ngcontent-%COMP%], [_nghost-%COMP%] .isAttributeSideBarVisible.panel-button[_ngcontent-%COMP%]{right:316px}[_nghost-%COMP%] .panel-button[_ngcontent-%COMP%]{margin:6px 8px;bottom:55px;width:88px;font-size:10pt;transition:right .3s ease}[_nghost-%COMP%] .block-wrapper[_ngcontent-%COMP%]{background-color:#fff;border:1px solid #cdcdcd;position:fixed;bottom:35px;padding:10px;right:40px;visibility:hidden;border-radius:5px;min-width:200px;max-width:30%;transition:right .3s ease}[_nghost-%COMP%] .block-wrapper.isAttributeSideBarVisible[_ngcontent-%COMP%]{right:390px}[_nghost-%COMP%] .block-wrapper.visible[_ngcontent-%COMP%]{visibility:visible}[_nghost-%COMP%] .block-wrapper[_ngcontent-%COMP%] hr[_ngcontent-%COMP%]{border-right-style:none;border-left-style:none;border-bottom-style:none;color:#000}"]})}}return i})();var aZ=(()=>{class i{constructor(e){this.isLoadingFile$=e.select(Mg)}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-loading-file-progress-spinner"]],decls:3,vars:4,consts:[["id","loading-gif-file"],["mode","indeterminate","diameter","96"]],template:function(n,r){n&1&&(S(0,"div",0),fe(1,"async"),J(2,"mat-progress-spinner",1),F()),n&2&&pi("visibility",_e(1,2,r.isLoadingFile$)?"visible":"hidden")},dependencies:[$M,dt],styles:["#loading-gif-file[_ngcontent-%COMP%]{position:fixed;left:0;top:0;width:100%;height:100%;z-index:40;background-color:#fffc;display:inline-block;text-align:center}#loading-gif-file[_ngcontent-%COMP%] mat-progress-spinner.mat-mdc-progress-spinner[_ngcontent-%COMP%]{display:inline-block;margin:22% auto 0}"]})}}return i})();var sZ=(()=>{class i{constructor(){this.version=Zl.version}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=re({type:i,selectors:[["cc-logo"]],decls:9,vars:1,consts:[[1,"logo"],["href","https://github.com/MaibornWolff/codecharta","target","_blank","rel","noopener noreferrer"],["src","codeCharta/assets/codecharta_logo.svg","alt","CodeCharta","rel","noopener noreferrer"],["id","logo-version"],["target","_blank","href","https://www.maibornwolff.de/en/"]],template:function(n,r){n&1&&(Ut(0,"div",0)(1,"a",1),Ti(2,"img",2),qt(),Ut(3,"p",3),j(4),qt(),Ut(5,"p"),j(6,"Made with \u2764 by "),Ut(7,"a",4),j(8,"MaibornWolff"),qt()()()),n&2&&(E(4),ct("Version ",r.version))},styles:[".logo[_ngcontent-%COMP%]{position:absolute;left:2em;bottom:1em;z-index:1;flex-direction:column;display:flex;align-items:flex-start}.logo[_ngcontent-%COMP%] img[_ngcontent-%COMP%]{object-fit:contain;width:5em;height:auto}.logo[_ngcontent-%COMP%] p[_ngcontent-%COMP%]{color:#5a585a;font-weight:700;font-size:10px;text-align:center;margin:0;z-index:-1}"]})}}return i})();function xFe(i,t){i&1&&(S(0,"div"),J(1,"cc-tool-bar")(2,"cc-ribbon-bar")(3,"cc-file-extension-bar")(4,"cc-code-map")(5,"cc-legend-panel")(6,"cc-loading-file-progress-spinner")(7,"cc-logo"),F())}var lZ=(()=>{class i{constructor(e,n){this.store=e,this.loadInitialFileService=n,this.isInitialized=Gi(!1)}ngOnInit(){this.store.dispatch(Ya({value:!0})),this.loadInitialFileService.loadFilesOrSampleFiles().then(()=>{this.isInitialized.set(!0)})}static{this.\u0275fac=function(n){return new(n||i)(se(Ie),se(XA))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-code-charta"]],decls:1,vars:1,template:function(n,r){n&1&&ke(0,xFe,8,0,"div"),n&2&&Pe(r.isInitialized()?0:-1)},dependencies:[GW,aj,VY,tZ,oZ,aZ,sZ],encapsulation:2})}}return i})();var cZ=(()=>{class i{constructor(e){this.store=e,this.unfocusNodes$=Pi(()=>this.store.select(ir).pipe(Et(()=>wc())))}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var dZ=`# Change Log - Visualization
|
|
5211
5211
|
|
|
5212
5212
|
All notable changes to this project will be documented in this file.
|
|
5213
5213
|
|
|
@@ -8394,6 +8394,6 @@ ${t}</tr>
|
|
|
8394
8394
|
`+(f.tokens?this.parseInline(f.tokens):f.text);n+=e?this.renderer.paragraph(u):u;continue}default:{let O='Token with "'+f.type+'" type was not found.';if(this.options.silent){console.error(O);return}else throw new Error(O)}}}return n}parseInline(t,e){e=e||this.renderer;let n="",r,o,a,s=t.length;for(r=0;r<s;r++){if(o=t[r],this.options.extensions&&this.options.extensions.renderers&&this.options.extensions.renderers[o.type]&&(a=this.options.extensions.renderers[o.type].call({parser:this},o),a!==!1||!["escape","html","link","image","strong","em","codespan","br","del","text"].includes(o.type))){n+=a||"";continue}switch(o.type){case"escape":{n+=e.text(o.text);break}case"html":{n+=e.html(o.text);break}case"link":{n+=e.link(o.href,o.title,this.parseInline(o.tokens,e));break}case"image":{n+=e.image(o.href,o.title,o.text);break}case"strong":{n+=e.strong(this.parseInline(o.tokens,e));break}case"em":{n+=e.em(this.parseInline(o.tokens,e));break}case"codespan":{n+=e.codespan(o.text);break}case"br":{n+=e.br();break}case"del":{n+=e.del(this.parseInline(o.tokens,e));break}case"text":{n+=e.text(o.text);break}default:{let l='Token with "'+o.type+'" type was not found.';if(this.options.silent){console.error(l);return}else throw new Error(l)}}}return n}},Hg=class{constructor(t){this.options=t||Vh}static passThroughHooks=new Set(["preprocess","postprocess"]);preprocess(t){return t}postprocess(t){return t}},tR=class{defaults=iR();options=this.setOptions;parse=this.#e(jd.lex,$d.parse);parseInline=this.#e(jd.lexInline,$d.parseInline);Parser=$d;parser=$d.parse;Renderer=Qg;TextRenderer=gv;Lexer=jd;lexer=jd.lex;Tokenizer=Vg;Slugger=_v;Hooks=Hg;constructor(...t){this.use(...t)}walkTokens(t,e){let n=[];for(let r of t)switch(n=n.concat(e.call(this,r)),r.type){case"table":{for(let o of r.header)n=n.concat(this.walkTokens(o.tokens,e));for(let o of r.rows)for(let a of o)n=n.concat(this.walkTokens(a.tokens,e));break}case"list":{n=n.concat(this.walkTokens(r.items,e));break}default:this.defaults.extensions&&this.defaults.extensions.childTokens&&this.defaults.extensions.childTokens[r.type]?this.defaults.extensions.childTokens[r.type].forEach(o=>{n=n.concat(this.walkTokens(r[o],e))}):r.tokens&&(n=n.concat(this.walkTokens(r.tokens,e)))}return n}use(...t){let e=this.defaults.extensions||{renderers:{},childTokens:{}};return t.forEach(n=>{let r=$e({},n);if(r.async=this.defaults.async||r.async||!1,n.extensions&&(n.extensions.forEach(o=>{if(!o.name)throw new Error("extension name required");if(o.renderer){let a=e.renderers[o.name];a?e.renderers[o.name]=function(...s){let l=o.renderer.apply(this,s);return l===!1&&(l=a.apply(this,s)),l}:e.renderers[o.name]=o.renderer}if(o.tokenizer){if(!o.level||o.level!=="block"&&o.level!=="inline")throw new Error("extension level must be 'block' or 'inline'");e[o.level]?e[o.level].unshift(o.tokenizer):e[o.level]=[o.tokenizer],o.start&&(o.level==="block"?e.startBlock?e.startBlock.push(o.start):e.startBlock=[o.start]:o.level==="inline"&&(e.startInline?e.startInline.push(o.start):e.startInline=[o.start]))}o.childTokens&&(e.childTokens[o.name]=o.childTokens)}),r.extensions=e),n.renderer){let o=this.defaults.renderer||new Qg(this.defaults);for(let a in n.renderer){let s=o[a];o[a]=(...l)=>{let c=n.renderer[a].apply(o,l);return c===!1&&(c=s.apply(o,l)),c}}r.renderer=o}if(n.tokenizer){let o=this.defaults.tokenizer||new Vg(this.defaults);for(let a in n.tokenizer){let s=o[a];o[a]=(...l)=>{let c=n.tokenizer[a].apply(o,l);return c===!1&&(c=s.apply(o,l)),c}}r.tokenizer=o}if(n.hooks){let o=this.defaults.hooks||new Hg;for(let a in n.hooks){let s=o[a];Hg.passThroughHooks.has(a)?o[a]=l=>{if(this.defaults.async)return Promise.resolve(n.hooks[a].call(o,l)).then(d=>s.call(o,d));let c=n.hooks[a].call(o,l);return s.call(o,c)}:o[a]=(...l)=>{let c=n.hooks[a].apply(o,l);return c===!1&&(c=s.apply(o,l)),c}}r.hooks=o}if(n.walkTokens){let o=this.defaults.walkTokens;r.walkTokens=function(a){let s=[];return s.push(n.walkTokens.call(this,a)),o&&(s=s.concat(o.call(this,a))),s}}this.defaults=$e($e({},this.defaults),r)}),this}setOptions(t){return this.defaults=$e($e({},this.defaults),t),this}#e(t,e){return(n,r,o)=>{typeof r=="function"&&(o=r,r=null);let a=$e({},r);r=$e($e({},this.defaults),a);let s=this.#t(r.silent,r.async,o);if(typeof n>"u"||n===null)return s(new Error("marked(): input parameter is undefined or null"));if(typeof n!="string")return s(new Error("marked(): input parameter is of type "+Object.prototype.toString.call(n)+", string expected"));if(OFe(r,o),r.hooks&&(r.hooks.options=r),o){let l=r.highlight,c;try{r.hooks&&(n=r.hooks.preprocess(n)),c=t(n,r)}catch(u){return s(u)}let d=u=>{let f;if(!u)try{r.walkTokens&&this.walkTokens(c,r.walkTokens),f=e(c,r),r.hooks&&(f=r.hooks.postprocess(f))}catch(_){u=_}return r.highlight=l,u?s(u):o(null,f)};if(!l||l.length<3||(delete r.highlight,!c.length))return d();let h=0;this.walkTokens(c,u=>{u.type==="code"&&(h++,setTimeout(()=>{l(u.text,u.lang,(f,_)=>{if(f)return d(f);_!=null&&_!==u.text&&(u.text=_,u.escaped=!0),h--,h===0&&d()})},0))}),h===0&&d();return}if(r.async)return Promise.resolve(r.hooks?r.hooks.preprocess(n):n).then(l=>t(l,r)).then(l=>r.walkTokens?Promise.all(this.walkTokens(l,r.walkTokens)).then(()=>l):l).then(l=>e(l,r)).then(l=>r.hooks?r.hooks.postprocess(l):l).catch(s);try{r.hooks&&(n=r.hooks.preprocess(n));let l=t(n,r);r.walkTokens&&this.walkTokens(l,r.walkTokens);let c=e(l,r);return r.hooks&&(c=r.hooks.postprocess(c)),c}catch(l){return s(l)}}}#t(t,e,n){return r=>{if(r.message+=`
|
|
8395
8395
|
Please report this to https://github.com/markedjs/marked.`,t){let o="<p>An error occurred:</p><pre>"+ha(r.message+"",!0)+"</pre>";if(e)return Promise.resolve(o);if(n){n(null,o);return}return o}if(e)return Promise.reject(r);if(n){n(r);return}throw r}}},Lm=new tR(Vh);function Cn(i,t,e){return Lm.parse(i,t,e)}Cn.options=Cn.setOptions=function(i){return Lm.setOptions(i),Cn.defaults=Lm.defaults,AZ(Cn.defaults),Cn};Cn.getDefaults=iR;Cn.defaults=Vh;Cn.use=function(...i){return Lm.use(...i),Cn.defaults=Lm.defaults,AZ(Cn.defaults),Cn};Cn.walkTokens=function(i,t){return Lm.walkTokens(i,t)};Cn.parseInline=Lm.parseInline;Cn.Parser=$d;Cn.parser=$d.parse;Cn.Renderer=Qg;Cn.TextRenderer=gv;Cn.Lexer=jd;Cn.lexer=jd.lex;Cn.Tokenizer=Vg;Cn.Slugger=_v;Cn.Hooks=Hg;Cn.parse=Cn;var Pkt=Cn.options,Rkt=Cn.setOptions,Okt=Cn.use,Lkt=Cn.walkTokens,Nkt=Cn.parseInline;var Ukt=$d.parse,Hkt=jd.lex;function vZ(){return{mangle:!1,walkTokens(i){if(i.type!=="link"||!i.href.startsWith("mailto:"))return;let t=i.href.substring(7),e=UFe(t);i.href=`mailto:${e}`,!(i.tokens.length!==1||i.tokens[0].type!=="text"||i.tokens[0].text!==t)&&(i.text=e,i.tokens[0].text=e)}}}function UFe(i){let t="",e,n,r=i.length;for(e=0;e<r;e++)n=i.charCodeAt(e),Math.random()>.5&&(n="x"+n.toString(16)),t+="&#"+n+";";return t}function HFe(i,t){if(i&1&&(S(0,"div")(1,"h2"),j(2),F(),J(3,"ul",6),F()),i&2){let e=t.$implicit;E(2),Ai(e.key),E(),z("innerHTML",e.value,ey)}}var yZ=(()=>{class i{constructor(e){this.data=e,this.changes=this.getChangelogChanges()}getChangelogChanges(){Cn.use(vZ());let n=Cn.parse(dZ,{headerIds:!1}).split(`
|
|
8396
8396
|
`),r=this.findVersionLine(n,this.data.currentVersion),o=this.findVersionLine(n,this.data.previousVersion);n=n.slice(r,o+1);let a=["Added \u{1F680}","Fixed \u{1F41E}","Changed","Removed \u{1F5D1}","Chore \u{1F468}\u200D\u{1F4BB} \u{1F469}\u200D\u{1F4BB}"],s={};for(let l of a){let c=new RegExp(`<h3>${l}</h3>`),d=this.getAllIndexes(n,c),h=[];for(let u of d){let f=u+2,_=this.findEndChangesLine(n,u);for(let y of n.slice(f,_))h.push(`${y}<br>`)}h.length>0&&(s[l]=h.join(`
|
|
8397
|
-
`))}return s}getAllIndexes(e,n){return e.reduce((r,o,a)=>(n.test(o)&&r.push(a),r),[])}findVersionLine(e,n){let r=new RegExp(`\\[${n}]`);return e.findIndex(o=>r.test(o))}findEndChangesLine(e,n){return n+e.slice(n+1).findIndex(r=>/<h3>/.test(r)||/<h2>/.test(r))}static{this.\u0275fac=function(n){return new(n||i)(se(Ts))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-change-log-dialog"]],decls:16,vars:5,consts:[["color","primary"],["mat-dialog-content",""],[1,"content"],["mat-dialog-actions",""],["href","https://codecharta.com/news/","target","_blank","rel","noopener noreferrer"],["mat-button","","cdkFocusInitial","",3,"mat-dialog-close"],[3,"innerHTML"]],template:function(n,r){n&1&&(S(0,"mat-toolbar",0),j(1,"Changelog"),F(),S(2,"div",1)(3,"h1"),j(4,"What is new in CodeCharta?"),F(),S(5,"h2"),j(6),F(),S(7,"div",2),xi(8,HFe,4,2,"div",null,En),fe(10,"keyvalue"),F()(),S(11,"div",3)(12,"a",4),j(13,"Know more"),F(),S(14,"button",5),j(15,"CLOSE"),F()()),n&2&&(E(6),xs("",r.data.previousVersion," \u2192 ",r.data.currentVersion),E(2),wi(_e(10,3,r.changes)),E(6),z("mat-dialog-close",!0))},dependencies:[ca,ar,Cr,Wi,or,ff],encapsulation:2})}}return i})();function wZ(i,t){let e=xZ(i),n=xZ(t);if(e.major===n.major&&e.minor===n.minor&&e.patch===n.patch)return 0;if(e.major>n.major)return 1;if(e.major<n.major)return-1;if(e.minor>n.minor)return 1;if(e.minor<n.minor)return-1;if(e.patch>n.patch)return 1;if(e.patch<n.patch)return-1}function xZ(i){let t=i.split(".");return{major:Number.parseInt(t[0])||0,minor:Number.parseInt(t[1])||0,patch:Number.parseInt(t[2])||0}}var CZ=(()=>{class i{constructor(e){this.dialog=e,this.version=Zl.version}synchronizeLocalCodeChartaVersion(){let e=localStorage.getItem("codeChartaVersion");if(e===null){localStorage.setItem("codeChartaVersion",this.version);return}wZ(e,this.version)<0&&(this.dialog.open(yZ,{panelClass:"cc-changelog-dialog",data:{previousVersion:e,currentVersion:this.version}}),localStorage.setItem("codeChartaVersion",this.version))}static{this.\u0275fac=function(n){return new(n||i)(Me(fn))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var VFe="@",QFe=(()=>{class i{doc;delegate;zone;animationType;moduleImpl;_rendererFactoryPromise=null;scheduler=null;injector=R(_i);loadingSchedulerFn=R(zFe,{optional:!0});_engine;constructor(e,n,r,o,a){this.doc=e,this.delegate=n,this.zone=r,this.animationType=o,this.moduleImpl=a}ngOnDestroy(){this._engine?.flush()}loadImpl(){let e=()=>this.moduleImpl??import("./chunk-6JVJ6QD5.js").then(r=>r),n;return this.loadingSchedulerFn?n=this.loadingSchedulerFn(e):n=e(),n.catch(r=>{throw new Mn(5300,!1)}).then(({\u0275createEngine:r,\u0275AnimationRendererFactory:o})=>{this._engine=r(this.animationType,this.doc);let a=new o(this.delegate,this._engine,this.zone);return this.delegate=a,a})}createRenderer(e,n){let r=this.delegate.createRenderer(e,n);if(r.\u0275type===0)return r;typeof r.throwOnSyntheticProps=="boolean"&&(r.throwOnSyntheticProps=!1);let o=new nR(r);return n?.data?.animation&&!this._rendererFactoryPromise&&(this._rendererFactoryPromise=this.loadImpl()),this._rendererFactoryPromise?.then(a=>{let s=a.createRenderer(e,n);o.use(s),this.scheduler??=this.injector.get(cO,null,{optional:!0}),this.scheduler?.notify(10)}).catch(a=>{o.use(r)}),o}begin(){this.delegate.begin?.()}end(){this.delegate.end?.()}whenRenderingDone(){return this.delegate.whenRenderingDone?.()??Promise.resolve()}componentReplaced(e){this._engine?.flush(),this.delegate.componentReplaced?.(e)}static \u0275fac=function(n){iy()};static \u0275prov=Ue({token:i,factory:i.\u0275fac})}return i})(),nR=class{delegate;replay=[];\u0275type=1;constructor(t){this.delegate=t}use(t){if(this.delegate=t,this.replay!==null){for(let e of this.replay)e(t);this.replay=null}}get data(){return this.delegate.data}destroy(){this.replay=null,this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}get destroyNode(){return this.delegate.destroyNode}appendChild(t,e){this.delegate.appendChild(t,e)}insertBefore(t,e,n,r){this.delegate.insertBefore(t,e,n,r)}removeChild(t,e,n,r){this.delegate.removeChild(t,e,n,r)}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){this.shouldReplay(e)&&this.replay.push(r=>r.setProperty(t,e,n)),this.delegate.setProperty(t,e,n)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,n,r){return this.shouldReplay(e)&&this.replay.push(o=>o.listen(t,e,n,r)),this.delegate.listen(t,e,n,r)}shouldReplay(t){return this.replay!==null&&t.startsWith(VFe)}},zFe=new Je("");function MZ(i="animations"){return ty("NgAsyncAnimations"),du([{provide:ho,useFactory:(t,e,n)=>new QFe(t,e,n,i),deps:[yi,y0,ti]},{provide:Ym,useValue:i==="noop"?"NoopAnimations":"BrowserAnimations"}])}var zg=Re(_r,i=>i.focusedNodePath);var SZ=[ir,zg,KM,qS,QS,zS,Or,So];var O2=[Dc,Uo,zu,qu,us,$s,Ec,Sc,Mc,Cc,js,Ws,hs,ch,lh,Ma,Bc,Fc,Ic,qs,qo,Mo,Gs,ja,ph,Ah,wc,gh,Go,zo,Gr,Tc,uh,xc,hh,kc,ts];var qFe=1e3/60,L2=(()=>{class i{constructor(e,n,r,o,a){this.store=e,this.actions$=n,this.uploadFilesService=r,this.threeRendererService=o,this.codeMapRenderService=a,this.actionsRequiringRender$=this.actions$.pipe(qr(...O2)),this.renderCodeMap$=Pi(()=>Yo([this.store.select(br),this.actionsRequiringRender$]).pipe(Yt(([s])=>!!s.unifiedMapNode),oO(qFe,V4,{leading:!1,trailing:!0}),Oi(([s])=>{this.codeMapRenderService.render(s.unifiedMapNode),this.codeMapRenderService.scaleMap(),this.threeRendererService.render()}),cu()),{dispatch:!1}),this.removeLoadingIndicatorAfterRender$=Pi(()=>this.renderCodeMap$.pipe(Yt(()=>!this.uploadFilesService.isUploading),Oi(()=>{this.store.dispatch(Ya({value:!1})),this.store.dispatch(ol({value:!1}))})),{dispatch:!1})}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie),Me(Jr),Me(z1),Me(Rr),Me(HS))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var EZ=(()=>{class i{constructor(e,n,r,o){this.store=e,this.renderCodeMapEffect=n,this.threeMapControlsService=r,this.actions$=o,this.autoFitTo$=Pi(()=>Yo(SZ.map(a=>this.store.select(a))).pipe(ys(1),hr(this.store.select(XM)),Yt(([,a])=>a),Do(()=>this.renderCodeMapEffect.renderCodeMap$.pipe(kn(1))),Oi(()=>{this.threeMapControlsService.autoFitTo()})),{dispatch:!1}),this.autoFitToWhenResetCameraIfNewFileIsLoadedSetToFalse$=Pi(()=>this.actions$.pipe(qr("StartWithGlobalOption:resetCameraIfNewFileIsLoadedSetToFalse"),lu(),Do(()=>this.renderCodeMapEffect.renderCodeMap$.pipe(kn(1))),Oi(()=>{this.threeMapControlsService.autoFitTo()})),{dispatch:!1})}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie),Me(L2),Me(yr),Me(Jr))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var TZ=(()=>{class i{constructor(e){this.store=e,this.linkHeightAndColorMetric$=Pi(()=>Yo([this.store.select(Pc),this.store.select(Bg)]).pipe(Yt(([,n])=>n),Et(([n])=>Gr({value:n}))))}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var qg=Re(hS,wl,(i,t)=>i?t.get(i.nodeId):null);var WFe=Re(Ns,i=>i.markingColors),jFe=(i,t,e)=>{if(t=$Fe(t),i===null)return t.map(r=>({color:r,isMarked:!1}));let n=TM(e,i.path);return t.map(r=>({color:r,isMarked:n!==-1&&r===e[n].color}))},$Fe=i=>Array.isArray(i)?i:Object.values(i),BZ=Re(qg,WFe,D2,jFe);var XFe=(i,t)=>t.color;function KFe(i,t){i&1&&J(0,"i",5)}function YFe(i,t){if(i&1){let e=st();S(0,"button",4),he("click",function(){let r=Ve(e).$implicit,o=me(),a=me();return Qe(r.isMarked?a.unmarkFolder(o.path):a.markFolder(o.path,r.color))}),ke(1,KFe,1,0,"i",5),F()}if(i&2){let e=t.$implicit;pi("background-color",e.color),E(),Pe(e.isMarked?1:-1)}}function ZFe(i,t){if(i&1){let e=st();S(0,"div",1),xi(1,YFe,2,3,"button",2,XFe),fe(3,"async"),S(4,"cc-color-picker",3),he("colorChange",function(r){let o=Ve(e),a=me();return Qe(a.markFolder(o.path,r))}),F()()}if(i&2){let e=me(),n=Pn(3);E(),wi(_e(3,2,e.markFolderItems$)),E(3),z("hexColor","#ff0000")("triggerTemplate",n)}}function JFe(i,t){i&1&&J(0,"div",6)}var FZ=(()=>{class i{constructor(e){this.store=e,this.markFolderItems$=this.store.select(BZ),this.codeMapNode$=this.store.select(qg)}markFolder(e,n){this.store.dispatch(xc({packages:[{path:e,color:n}]}))}unmarkFolder(e){this.store.dispatch(hh({path:e}))}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-mark-folder-row"]],decls:4,vars:3,consts:[["colorPickerTriggerTemplate",""],[1,"row"],["title","Colorize folder",1,"colorButton",3,"background-color"],[3,"colorChange","hexColor","triggerTemplate"],["title","Colorize folder",1,"colorButton",3,"click"],[1,"fa","fa-times"],[1,"cc-color-picker-trigger","fa","fa-paint-brush"]],template:function(n,r){if(n&1&&(ke(0,ZFe,5,4,"div",1),fe(1,"async"),Sn(2,JFe,1,0,"ng-template",null,0,il)),n&2){let o;Pe((o=_e(1,1,r.codeMapNode$))?0:-1,o)}},dependencies:[KC,dt],styles:["[_nghost-%COMP%] .row[_ngcontent-%COMP%]{display:flex}[_nghost-%COMP%] [_ngcontent-%COMP%]:hover{cursor:pointer}[_nghost-%COMP%] .colorButton[_ngcontent-%COMP%]{width:32px;height:32px}[_nghost-%COMP%] .colorButton[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:25px;display:block;color:red;text-shadow:-1px 0 white,0 1px white,1px 0 white,0 -1px white}[_nghost-%COMP%] cc-color-picker[_ngcontent-%COMP%]{width:32px;height:32px}[_nghost-%COMP%] cc-color-picker[_ngcontent-%COMP%] .cc-color-picker-trigger[_ngcontent-%COMP%]{font-size:25px;margin-top:8px}"]})}}return i})();var IZ=Re(zg,i=>i[0]);var DZ=(()=>{class i{transform(e,n){if(!e||!n)return{isNodeFocused:!1,isParentFocused:!1};let r=e===n.path;return{isNodeFocused:r,isParentFocused:!r&&n.path.startsWith(e)}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275pipe=an({name:"isNodeFocused",type:i,pure:!0})}}return i})();function eIe(i,t){if(i&1){let e=st();S(0,"button",1),he("click",function(){Ve(e);let r=me(2);return Qe(r.handleFocusNodeClicked())}),J(1,"i",2),j(2," FOCUS "),F()}}function tIe(i,t){if(i&1){let e=st();S(0,"button",5),he("click",function(){Ve(e);let r=me(3);return Qe(r.handleUnfocusAllNodesClicked())}),J(1,"i",2),j(2," UNFOCUS ALL "),F()}}function iIe(i,t){if(i&1){let e=st();S(0,"button",3),he("click",function(){Ve(e);let r=me(2);return Qe(r.handleUnfocusNodeClicked())}),J(1,"i",2),j(2),F(),ke(3,tIe,3,0,"button",4),fe(4,"async")}if(i&2){let e=me(),n=me();E(2),ct(" ",e.isParentFocused?"UNFOCUS PARENT":"UNFOCUS"," "),E(),Pe(_e(4,2,n.hasPreviousFocusedNodePath$)?3:-1)}}function nIe(i,t){if(i&1&&(ke(0,eIe,3,0,"button",0),ke(1,iIe,5,4)),i&2){let e=t;Pe(e.isNodeFocused?-1:0),E(),Pe(e.isNodeFocused||e.isParentFocused?1:-1)}}var kZ=(()=>{class i{constructor(e){this.store=e,this.currentFocusedNodePath$=this.store.select(IZ),this.hasPreviousFocusedNodePath$=this.store.select(zg).pipe(Et(n=>n.length>1))}handleFocusNodeClicked(){this.store.dispatch(Ah({value:this.codeMapNode.path}))}handleUnfocusNodeClicked(){this.store.dispatch(gh())}handleUnfocusAllNodesClicked(){this.store.dispatch(wc())}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-focus-buttons"]],inputs:{codeMapNode:"codeMapNode"},decls:3,vars:6,consts:[["mat-button","","id","focus-button","title","Only show selected nodes with children-nodes"],["mat-button","","id","focus-button","title","Only show selected nodes with children-nodes",3,"click"],[1,"fa","fa-bullseye"],["mat-button","","aria-label","Remove Focus from node","title","Show previous focused node",3,"click"],["mat-button","","aria-label","Remove Focus from all nodes","title","Show complete map"],["mat-button","","aria-label","Remove Focus from all nodes","title","Show complete map",3,"click"]],template:function(n,r){if(n&1&&(ke(0,nIe,2,2),fe(1,"async"),fe(2,"isNodeFocused")),n&2){let o;Pe((o=dn(2,3,_e(1,1,r.currentFocusedNodePath$),r.codeMapNode))?0:-1,o)}},dependencies:[Wi,dt,DZ],styles:["button[_ngcontent-%COMP%]{width:100%;text-align:left;margin:0;justify-content:left;line-height:30px;min-height:30px}button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{width:17px}button[_ngcontent-%COMP%] .png-icon[_ngcontent-%COMP%]{width:17px;height:17px;margin:5px auto auto;padding:0;display:inline-block;background-repeat:no-repeat no-repeat;pointer-events:none}"]})}}return i})();function rIe(i,t){if(i&1){let e=st();S(0,"button",2),he("click",function(){Ve(e);let r=me();return Qe(r.flattenNode())}),J(1,"img",3),j(2," FLATTEN "),F()}}function oIe(i,t){if(i&1){let e=st();S(0,"button",4),he("click",function(){Ve(e);let r=me();return Qe(r.unFlattenNode())}),J(1,"img",3),j(2," SHOW "),F()}}var PZ=(()=>{class i{constructor(e){this.store=e}flattenNode(){this.store.dispatch(tg({item:{path:this.codeMapNode.path,type:"flatten",nodeType:this.codeMapNode.type}}))}unFlattenNode(){this.store.dispatch(dh({item:{path:this.codeMapNode.path,type:"flatten",nodeType:this.codeMapNode.type}}))}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-flatten-buttons"]],inputs:{codeMapNode:"codeMapNode"},decls:2,vars:1,consts:[["mat-button","","title","Flatten node and children-nodes, but keep an empty space"],["mat-button","","title","Show node and children-nodes"],["mat-button","","title","Flatten node and children-nodes, but keep an empty space",3,"click"],["alt","flattenIcon","src","/codeCharta/assets/flatten.png",1,"png-icon"],["mat-button","","title","Show node and children-nodes",3,"click"]],template:function(n,r){n&1&&ke(0,rIe,3,0,"button",0)(1,oIe,3,0,"button",1),n&2&&Pe(r.codeMapNode!=null&&r.codeMapNode.isFlattened?1:0)},dependencies:[Wi],styles:["button[_ngcontent-%COMP%]{width:100%;text-align:left;margin:0;justify-content:left;line-height:30px;min-height:30px}button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{width:17px}button[_ngcontent-%COMP%] .png-icon[_ngcontent-%COMP%]{width:17px;height:17px;margin:5px auto auto;padding:0;display:inline-block;background-repeat:no-repeat no-repeat;pointer-events:none}"]})}}return i})();function aIe(i,t){if(i&1){let e=st();S(0,"button",2),he("click",function(){Ve(e);let r=me();return Qe(r.addNodeToConstantHighlight())}),J(1,"i",3),j(2," KEEP HIGHLIGHT "),F()}}function sIe(i,t){if(i&1){let e=st();S(0,"button",4),he("click",function(){Ve(e);let r=me();return Qe(r.removeNodeFromConstantHighlight())}),J(1,"i",3),j(2," REMOVE HIGHLIGHT "),F()}}var RZ=(()=>{class i{constructor(e,n){this.threeSceneService=e,this.idToBuilding=n}ngOnChanges(e){e.codeMapNode&&(this.isHighlighted=this.calculateIsHighlighted())}addNodeToConstantHighlight(){this.threeSceneService.addNodeAndChildrenToConstantHighlight(this.codeMapNode)}removeNodeFromConstantHighlight(){this.threeSceneService.removeNodeAndChildrenFromConstantHighlight(this.codeMapNode)}calculateIsHighlighted(){if(!this.codeMapNode)return!1;let e=this.idToBuilding.get(this.codeMapNode.id);return e?this.threeSceneService.getConstantHighlight().has(e.id):!1}static{this.\u0275fac=function(n){return new(n||i)(se(vr),se(mc))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-highlight-buttons"]],inputs:{codeMapNode:"codeMapNode"},features:[Di],decls:2,vars:1,consts:[["mat-button","","title","Highlight node constantly"],["mat-button","","title","Remove constant highlight"],["mat-button","","title","Highlight node constantly",3,"click"],[1,"fa","fa-cubes"],["mat-button","","title","Remove constant highlight",3,"click"]],template:function(n,r){n&1&&ke(0,aIe,3,0,"button",0)(1,sIe,3,0,"button",1),n&2&&Pe(r.isHighlighted?1:0)},dependencies:[Wi],styles:["button[_ngcontent-%COMP%]{width:100%;text-align:left;margin:0;justify-content:left;line-height:30px;min-height:30px}button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{width:17px}button[_ngcontent-%COMP%] .png-icon[_ngcontent-%COMP%]{width:17px;height:17px;margin:5px auto auto;padding:0;display:inline-block;background-repeat:no-repeat no-repeat;pointer-events:none}"]})}}return i})();var OZ=(()=>{class i{constructor(e){this.store=e}excludeNode(){this.store.dispatch(ig({items:[{path:this.codeMapNode.path,type:"exclude",nodeType:this.codeMapNode.type}]}))}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-exclude-button"]],inputs:{codeMapNode:"codeMapNode"},decls:3,vars:0,consts:[["mat-button","","id","exclude-button","title","Exclude node and children-nodes and reorder the CodeMap",3,"click"],[1,"fa","fa-ban"]],template:function(n,r){n&1&&(S(0,"button",0),he("click",function(){return r.excludeNode()}),J(1,"i",1),j(2,` EXCLUDE
|
|
8397
|
+
`))}return s}getAllIndexes(e,n){return e.reduce((r,o,a)=>(n.test(o)&&r.push(a),r),[])}findVersionLine(e,n){let r=new RegExp(`\\[${n}]`);return e.findIndex(o=>r.test(o))}findEndChangesLine(e,n){return n+e.slice(n+1).findIndex(r=>/<h3>/.test(r)||/<h2>/.test(r))}static{this.\u0275fac=function(n){return new(n||i)(se(Ts))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-change-log-dialog"]],decls:16,vars:5,consts:[["color","primary"],["mat-dialog-content",""],[1,"content"],["mat-dialog-actions",""],["href","https://codecharta.com/news/","target","_blank","rel","noopener noreferrer"],["mat-button","","cdkFocusInitial","",3,"mat-dialog-close"],[3,"innerHTML"]],template:function(n,r){n&1&&(S(0,"mat-toolbar",0),j(1,"Changelog"),F(),S(2,"div",1)(3,"h1"),j(4,"What is new in CodeCharta?"),F(),S(5,"h2"),j(6),F(),S(7,"div",2),xi(8,HFe,4,2,"div",null,En),fe(10,"keyvalue"),F()(),S(11,"div",3)(12,"a",4),j(13,"Know more"),F(),S(14,"button",5),j(15,"CLOSE"),F()()),n&2&&(E(6),xs("",r.data.previousVersion," \u2192 ",r.data.currentVersion),E(2),wi(_e(10,3,r.changes)),E(6),z("mat-dialog-close",!0))},dependencies:[ca,ar,Cr,Wi,or,ff],encapsulation:2})}}return i})();function wZ(i,t){let e=xZ(i),n=xZ(t);if(e.major===n.major&&e.minor===n.minor&&e.patch===n.patch)return 0;if(e.major>n.major)return 1;if(e.major<n.major)return-1;if(e.minor>n.minor)return 1;if(e.minor<n.minor)return-1;if(e.patch>n.patch)return 1;if(e.patch<n.patch)return-1}function xZ(i){let t=i.split(".");return{major:Number.parseInt(t[0])||0,minor:Number.parseInt(t[1])||0,patch:Number.parseInt(t[2])||0}}var CZ=(()=>{class i{constructor(e){this.dialog=e,this.version=Zl.version}synchronizeLocalCodeChartaVersion(){let e=localStorage.getItem("codeChartaVersion");if(e===null){localStorage.setItem("codeChartaVersion",this.version);return}wZ(e,this.version)<0&&(this.dialog.open(yZ,{panelClass:"cc-changelog-dialog",data:{previousVersion:e,currentVersion:this.version}}),localStorage.setItem("codeChartaVersion",this.version))}static{this.\u0275fac=function(n){return new(n||i)(Me(fn))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var VFe="@",QFe=(()=>{class i{doc;delegate;zone;animationType;moduleImpl;_rendererFactoryPromise=null;scheduler=null;injector=R(_i);loadingSchedulerFn=R(zFe,{optional:!0});_engine;constructor(e,n,r,o,a){this.doc=e,this.delegate=n,this.zone=r,this.animationType=o,this.moduleImpl=a}ngOnDestroy(){this._engine?.flush()}loadImpl(){let e=()=>this.moduleImpl??import("./chunk-6JVJ6QD5.js").then(r=>r),n;return this.loadingSchedulerFn?n=this.loadingSchedulerFn(e):n=e(),n.catch(r=>{throw new Mn(5300,!1)}).then(({\u0275createEngine:r,\u0275AnimationRendererFactory:o})=>{this._engine=r(this.animationType,this.doc);let a=new o(this.delegate,this._engine,this.zone);return this.delegate=a,a})}createRenderer(e,n){let r=this.delegate.createRenderer(e,n);if(r.\u0275type===0)return r;typeof r.throwOnSyntheticProps=="boolean"&&(r.throwOnSyntheticProps=!1);let o=new nR(r);return n?.data?.animation&&!this._rendererFactoryPromise&&(this._rendererFactoryPromise=this.loadImpl()),this._rendererFactoryPromise?.then(a=>{let s=a.createRenderer(e,n);o.use(s),this.scheduler??=this.injector.get(cO,null,{optional:!0}),this.scheduler?.notify(10)}).catch(a=>{o.use(r)}),o}begin(){this.delegate.begin?.()}end(){this.delegate.end?.()}whenRenderingDone(){return this.delegate.whenRenderingDone?.()??Promise.resolve()}componentReplaced(e){this._engine?.flush(),this.delegate.componentReplaced?.(e)}static \u0275fac=function(n){iy()};static \u0275prov=Ue({token:i,factory:i.\u0275fac})}return i})(),nR=class{delegate;replay=[];\u0275type=1;constructor(t){this.delegate=t}use(t){if(this.delegate=t,this.replay!==null){for(let e of this.replay)e(t);this.replay=null}}get data(){return this.delegate.data}destroy(){this.replay=null,this.delegate.destroy()}createElement(t,e){return this.delegate.createElement(t,e)}createComment(t){return this.delegate.createComment(t)}createText(t){return this.delegate.createText(t)}get destroyNode(){return this.delegate.destroyNode}appendChild(t,e){this.delegate.appendChild(t,e)}insertBefore(t,e,n,r){this.delegate.insertBefore(t,e,n,r)}removeChild(t,e,n,r){this.delegate.removeChild(t,e,n,r)}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){this.shouldReplay(e)&&this.replay.push(r=>r.setProperty(t,e,n)),this.delegate.setProperty(t,e,n)}setValue(t,e){this.delegate.setValue(t,e)}listen(t,e,n,r){return this.shouldReplay(e)&&this.replay.push(o=>o.listen(t,e,n,r)),this.delegate.listen(t,e,n,r)}shouldReplay(t){return this.replay!==null&&t.startsWith(VFe)}},zFe=new Je("");function MZ(i="animations"){return ty("NgAsyncAnimations"),du([{provide:ho,useFactory:(t,e,n)=>new QFe(t,e,n,i),deps:[yi,y0,ti]},{provide:Ym,useValue:i==="noop"?"NoopAnimations":"BrowserAnimations"}])}var zg=Re(_r,i=>i.focusedNodePath);var SZ=[ir,zg,KM,qS,QS,zS,Or,So];var O2=[Dc,Uo,zu,qu,us,$s,Ec,Sc,Mc,Cc,js,Ws,hs,ch,lh,Ma,Bc,Fc,Ic,qs,qo,Mo,Gs,ja,ph,Ah,wc,gh,Go,zo,Gr,Tc,uh,xc,hh,kc,ts];var qFe=1e3/60,L2=(()=>{class i{constructor(e,n,r,o,a){this.store=e,this.actions$=n,this.uploadFilesService=r,this.threeRendererService=o,this.codeMapRenderService=a,this.actionsRequiringRender$=this.actions$.pipe(qr(...O2)),this.renderCodeMap$=Pi(()=>Yo([this.store.select(br),this.actionsRequiringRender$]).pipe(Yt(([s])=>!!s.unifiedMapNode),oO(qFe,V4,{leading:!1,trailing:!0}),Oi(([s])=>{this.codeMapRenderService.render(s.unifiedMapNode),this.codeMapRenderService.scaleMap(),this.threeRendererService.render()}),cu()),{dispatch:!1}),this.removeLoadingIndicatorAfterRender$=Pi(()=>this.renderCodeMap$.pipe(Yt(()=>!this.uploadFilesService.isUploading),Oi(()=>{this.store.dispatch(Ya({value:!1})),this.store.dispatch(ol({value:!1}))})),{dispatch:!1})}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie),Me(Jr),Me(z1),Me(Rr),Me(HS))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var EZ=(()=>{class i{constructor(e,n,r,o){this.store=e,this.renderCodeMapEffect=n,this.threeMapControlsService=r,this.actions$=o,this.autoFitTo$=Pi(()=>Yo(SZ.map(a=>this.store.select(a))).pipe(ys(1),hr(this.store.select(XM)),Yt(([,a])=>a),Do(()=>this.renderCodeMapEffect.renderCodeMap$.pipe(kn(1))),Oi(()=>{this.threeMapControlsService.autoFitTo()})),{dispatch:!1}),this.autoFitToWhenResetCameraIfNewFileIsLoadedSetToFalse$=Pi(()=>this.actions$.pipe(qr("StartWithGlobalOption:resetCameraIfNewFileIsLoadedSetToFalse"),lu(),Do(()=>this.renderCodeMapEffect.renderCodeMap$.pipe(kn(1))),Oi(()=>{this.threeMapControlsService.autoFitTo()})),{dispatch:!1})}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie),Me(L2),Me(yr),Me(Jr))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var TZ=(()=>{class i{constructor(e){this.store=e,this.linkHeightAndColorMetric$=Pi(()=>Yo([this.store.select(Pc),this.store.select(Bg)]).pipe(Yt(([,n])=>n),Et(([n])=>Gr({value:n}))))}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var qg=Re(hS,wl,(i,t)=>i?t.get(i.nodeId):null);var WFe=Re(Ns,i=>i.markingColors),jFe=(i,t,e)=>{if(t=$Fe(t),i===null)return t.map(r=>({color:r,isMarked:!1}));let n=TM(e,i.path);return t.map(r=>({color:r,isMarked:n!==-1&&r===e[n].color}))},$Fe=i=>Array.isArray(i)?i:Object.values(i),BZ=Re(qg,WFe,D2,jFe);var XFe=(i,t)=>t.color;function KFe(i,t){i&1&&J(0,"i",5)}function YFe(i,t){if(i&1){let e=st();S(0,"button",4),he("click",function(){let r=Ve(e).$implicit,o=me(),a=me();return Qe(r.isMarked?a.unmarkFolder(o.path):a.markFolder(o.path,r.color))}),ke(1,KFe,1,0,"i",5),F()}if(i&2){let e=t.$implicit;pi("background-color",e.color),E(),Pe(e.isMarked?1:-1)}}function ZFe(i,t){if(i&1){let e=st();S(0,"div",1),xi(1,YFe,2,3,"button",2,XFe),fe(3,"async"),S(4,"cc-color-picker",3),he("colorChange",function(r){let o=Ve(e),a=me();return Qe(a.markFolder(o.path,r))}),F()()}if(i&2){let e=me(),n=Pn(3);E(),wi(_e(3,2,e.markFolderItems$)),E(3),z("hexColor","#ff0000")("triggerTemplate",n)}}function JFe(i,t){i&1&&J(0,"div",6)}var FZ=(()=>{class i{constructor(e){this.store=e,this.markFolderItems$=this.store.select(BZ),this.codeMapNode$=this.store.select(qg)}markFolder(e,n){this.store.dispatch(xc({packages:[{path:e,color:n}]}))}unmarkFolder(e){this.store.dispatch(hh({path:e}))}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-mark-folder-row"]],decls:4,vars:3,consts:[["colorPickerTriggerTemplate",""],[1,"row"],["title","Colorize folder",1,"colorButton",3,"background-color"],[3,"colorChange","hexColor","triggerTemplate"],["title","Colorize folder",1,"colorButton",3,"click"],[1,"fa","fa-times"],[1,"cc-color-picker-trigger","fa","fa-paint-brush"]],template:function(n,r){if(n&1&&(ke(0,ZFe,5,4,"div",1),fe(1,"async"),Sn(2,JFe,1,0,"ng-template",null,0,il)),n&2){let o;Pe((o=_e(1,1,r.codeMapNode$))?0:-1,o)}},dependencies:[KC,dt],styles:["[_nghost-%COMP%] .row[_ngcontent-%COMP%]{display:flex}[_nghost-%COMP%] [_ngcontent-%COMP%]:hover{cursor:pointer}[_nghost-%COMP%] .colorButton[_ngcontent-%COMP%]{width:32px;height:32px}[_nghost-%COMP%] .colorButton[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{font-size:25px;display:block;color:red;text-shadow:-1px 0 white,0 1px white,1px 0 white,0 -1px white}[_nghost-%COMP%] cc-color-picker[_ngcontent-%COMP%]{width:32px;height:32px}[_nghost-%COMP%] cc-color-picker[_ngcontent-%COMP%] .cc-color-picker-trigger[_ngcontent-%COMP%]{font-size:25px;margin-top:8px}"]})}}return i})();var IZ=Re(zg,i=>i[0]);var DZ=(()=>{class i{transform(e,n){if(!e||!n)return{isNodeFocused:!1,isParentFocused:!1};let r=e===n.path;return{isNodeFocused:r,isParentFocused:!r&&n.path.startsWith(e)}}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275pipe=an({name:"isNodeFocused",type:i,pure:!0})}}return i})();function eIe(i,t){if(i&1){let e=st();S(0,"button",1),he("click",function(){Ve(e);let r=me(2);return Qe(r.handleFocusNodeClicked())}),J(1,"i",2),j(2," FOCUS "),F()}}function tIe(i,t){if(i&1){let e=st();S(0,"button",5),he("click",function(){Ve(e);let r=me(3);return Qe(r.handleUnfocusAllNodesClicked())}),J(1,"i",2),j(2," UNFOCUS ALL "),F()}}function iIe(i,t){if(i&1){let e=st();S(0,"button",3),he("click",function(){Ve(e);let r=me(2);return Qe(r.handleUnfocusNodeClicked())}),J(1,"i",2),j(2),F(),ke(3,tIe,3,0,"button",4),fe(4,"async")}if(i&2){let e=me(),n=me();E(2),ct(" ",e.isParentFocused?"UNFOCUS PARENT":"UNFOCUS"," "),E(),Pe(_e(4,2,n.hasPreviousFocusedNodePath$)?3:-1)}}function nIe(i,t){if(i&1&&(ke(0,eIe,3,0,"button",0),ke(1,iIe,5,4)),i&2){let e=t;Pe(e.isNodeFocused?-1:0),E(),Pe(e.isNodeFocused||e.isParentFocused?1:-1)}}var kZ=(()=>{class i{constructor(e){this.store=e,this.currentFocusedNodePath$=this.store.select(IZ),this.hasPreviousFocusedNodePath$=this.store.select(zg).pipe(Et(n=>n.length>1))}handleFocusNodeClicked(){this.store.dispatch(Ah({value:this.codeMapNode.path}))}handleUnfocusNodeClicked(){this.store.dispatch(gh())}handleUnfocusAllNodesClicked(){this.store.dispatch(wc())}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-focus-buttons"]],inputs:{codeMapNode:"codeMapNode"},decls:3,vars:6,consts:[["mat-button","","id","focus-button","title","Only show selected nodes with children-nodes"],["mat-button","","id","focus-button","title","Only show selected nodes with children-nodes",3,"click"],[1,"fa","fa-bullseye"],["mat-button","","aria-label","Remove Focus from node","title","Show previous focused node",3,"click"],["mat-button","","aria-label","Remove Focus from all nodes","title","Show complete map"],["mat-button","","aria-label","Remove Focus from all nodes","title","Show complete map",3,"click"]],template:function(n,r){if(n&1&&(ke(0,nIe,2,2),fe(1,"async"),fe(2,"isNodeFocused")),n&2){let o;Pe((o=dn(2,3,_e(1,1,r.currentFocusedNodePath$),r.codeMapNode))?0:-1,o)}},dependencies:[Wi,dt,DZ],styles:["button[_ngcontent-%COMP%]{width:100%;text-align:left;margin:0;justify-content:left;line-height:30px;min-height:30px}button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{width:17px}button[_ngcontent-%COMP%] .png-icon[_ngcontent-%COMP%]{width:17px;height:17px;margin:5px auto auto;padding:0;display:inline-block;background-repeat:no-repeat no-repeat;pointer-events:none}"]})}}return i})();function rIe(i,t){if(i&1){let e=st();S(0,"button",2),he("click",function(){Ve(e);let r=me();return Qe(r.flattenNode())}),J(1,"img",3),j(2," FLATTEN "),F()}}function oIe(i,t){if(i&1){let e=st();S(0,"button",4),he("click",function(){Ve(e);let r=me();return Qe(r.unFlattenNode())}),J(1,"img",3),j(2," SHOW "),F()}}var PZ=(()=>{class i{constructor(e){this.store=e}flattenNode(){this.store.dispatch(tg({item:{path:this.codeMapNode.path,type:"flatten",nodeType:this.codeMapNode.type}}))}unFlattenNode(){this.store.dispatch(dh({item:{path:this.codeMapNode.path,type:"flatten",nodeType:this.codeMapNode.type}}))}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-flatten-buttons"]],inputs:{codeMapNode:"codeMapNode"},decls:2,vars:1,consts:[["mat-button","","title","Flatten node and children-nodes, but keep an empty space"],["mat-button","","title","Show node and children-nodes"],["mat-button","","title","Flatten node and children-nodes, but keep an empty space",3,"click"],["alt","flattenIcon","src","codeCharta/assets/flatten.png",1,"png-icon"],["mat-button","","title","Show node and children-nodes",3,"click"]],template:function(n,r){n&1&&ke(0,rIe,3,0,"button",0)(1,oIe,3,0,"button",1),n&2&&Pe(r.codeMapNode!=null&&r.codeMapNode.isFlattened?1:0)},dependencies:[Wi],styles:["button[_ngcontent-%COMP%]{width:100%;text-align:left;margin:0;justify-content:left;line-height:30px;min-height:30px}button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{width:17px}button[_ngcontent-%COMP%] .png-icon[_ngcontent-%COMP%]{width:17px;height:17px;margin:5px auto auto;padding:0;display:inline-block;background-repeat:no-repeat no-repeat;pointer-events:none}"]})}}return i})();function aIe(i,t){if(i&1){let e=st();S(0,"button",2),he("click",function(){Ve(e);let r=me();return Qe(r.addNodeToConstantHighlight())}),J(1,"i",3),j(2," KEEP HIGHLIGHT "),F()}}function sIe(i,t){if(i&1){let e=st();S(0,"button",4),he("click",function(){Ve(e);let r=me();return Qe(r.removeNodeFromConstantHighlight())}),J(1,"i",3),j(2," REMOVE HIGHLIGHT "),F()}}var RZ=(()=>{class i{constructor(e,n){this.threeSceneService=e,this.idToBuilding=n}ngOnChanges(e){e.codeMapNode&&(this.isHighlighted=this.calculateIsHighlighted())}addNodeToConstantHighlight(){this.threeSceneService.addNodeAndChildrenToConstantHighlight(this.codeMapNode)}removeNodeFromConstantHighlight(){this.threeSceneService.removeNodeAndChildrenFromConstantHighlight(this.codeMapNode)}calculateIsHighlighted(){if(!this.codeMapNode)return!1;let e=this.idToBuilding.get(this.codeMapNode.id);return e?this.threeSceneService.getConstantHighlight().has(e.id):!1}static{this.\u0275fac=function(n){return new(n||i)(se(vr),se(mc))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-highlight-buttons"]],inputs:{codeMapNode:"codeMapNode"},features:[Di],decls:2,vars:1,consts:[["mat-button","","title","Highlight node constantly"],["mat-button","","title","Remove constant highlight"],["mat-button","","title","Highlight node constantly",3,"click"],[1,"fa","fa-cubes"],["mat-button","","title","Remove constant highlight",3,"click"]],template:function(n,r){n&1&&ke(0,aIe,3,0,"button",0)(1,sIe,3,0,"button",1),n&2&&Pe(r.isHighlighted?1:0)},dependencies:[Wi],styles:["button[_ngcontent-%COMP%]{width:100%;text-align:left;margin:0;justify-content:left;line-height:30px;min-height:30px}button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{width:17px}button[_ngcontent-%COMP%] .png-icon[_ngcontent-%COMP%]{width:17px;height:17px;margin:5px auto auto;padding:0;display:inline-block;background-repeat:no-repeat no-repeat;pointer-events:none}"]})}}return i})();var OZ=(()=>{class i{constructor(e){this.store=e}excludeNode(){this.store.dispatch(ig({items:[{path:this.codeMapNode.path,type:"exclude",nodeType:this.codeMapNode.type}]}))}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-exclude-button"]],inputs:{codeMapNode:"codeMapNode"},decls:3,vars:0,consts:[["mat-button","","id","exclude-button","title","Exclude node and children-nodes and reorder the CodeMap",3,"click"],[1,"fa","fa-ban"]],template:function(n,r){n&1&&(S(0,"button",0),he("click",function(){return r.excludeNode()}),J(1,"i",1),j(2,` EXCLUDE
|
|
8398
8398
|
`),F())},dependencies:[Wi],styles:["button[_ngcontent-%COMP%]{width:100%;text-align:left;margin:0;justify-content:left;line-height:30px;min-height:30px}button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{width:17px}button[_ngcontent-%COMP%] .png-icon[_ngcontent-%COMP%]{width:17px;height:17px;margin:5px auto auto;padding:0;display:inline-block;background-repeat:no-repeat no-repeat;pointer-events:none}"]})}}return i})();var LZ=(()=>{class i{transform(e){return`${e.lastIndexOf("/")===0?"":"..."}${e.slice(e.lastIndexOf("/"))}`}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275pipe=an({name:"lastPartOfNodePath",type:i,pure:!0})}}return i})();var NZ=(()=>{class i{constructor(){}copyToClipboard(e){return ft(this,null,function*(){yield navigator.clipboard.writeText(e)})}static{this.\u0275fac=function(n){return new(n||i)}}static{this.\u0275cmp=re({type:i,selectors:[["cc-copy-button"]],inputs:{codeMapNode:"codeMapNode"},decls:4,vars:3,consts:[["mat-button","","id","copy-button","title","Copy to clipboard",3,"click"],[1,"fa","fa-light","fa-copy"]],template:function(n,r){n&1&&(S(0,"button",0),he("click",function(){return r.copyToClipboard(r.codeMapNode.path)}),J(1,"i",1),j(2),fe(3,"lastPartOfNodePath"),F()),n&2&&(E(2),ct(" ",_e(3,1,r.codeMapNode.path),`
|
|
8399
8399
|
`))},dependencies:[Wi,LZ],styles:["button[_ngcontent-%COMP%]{width:100%;text-align:left;margin:0;justify-content:left;line-height:30px;min-height:30px}button[_ngcontent-%COMP%] i[_ngcontent-%COMP%]{width:17px}button[_ngcontent-%COMP%] .png-icon[_ngcontent-%COMP%]{width:17px;height:17px;margin:5px auto auto;padding:0;display:inline-block;background-repeat:no-repeat no-repeat;pointer-events:none}"]})}}return i})();function lIe(i,t){i&1&&(S(0,"div"),J(1,"cc-mark-folder-row")(2,"mat-divider"),F())}function cIe(i,t){if(i&1&&(S(0,"mat-card",0),ke(1,lIe,3,0,"div"),S(2,"div",1),J(3,"cc-copy-button",2)(4,"cc-focus-buttons",2)(5,"cc-flatten-buttons",2)(6,"cc-highlight-buttons",2)(7,"cc-exclude-button",2),F()()),i&2){let e=t;E(),Pe((e==null||e.children==null?null:e.children.length)>0?1:-1),E(2),z("codeMapNode",e),E(),z("codeMapNode",e),E(),z("codeMapNode",e),E(),z("codeMapNode",e),E(),z("codeMapNode",e)}}var UZ=(()=>{class i{constructor(e){this.store=e}ngOnInit(){this.codeMapNode$=this.store.select(qg)}static{this.\u0275fac=function(n){return new(n||i)(se(Ie))}}static{this.\u0275cmp=re({type:i,selectors:[["cc-node-context-menu-card"]],decls:2,vars:3,consts:[["appearance","outlined","id","codemap-context-menu"],[1,"button-group"],[3,"codeMapNode"]],template:function(n,r){if(n&1&&(ke(0,cIe,8,6,"mat-card",0),fe(1,"async")),n&2){let o;Pe((o=_e(1,1,r.codeMapNode$))?0:-1,o)}},dependencies:[_c,FZ,gg,kZ,PZ,RZ,OZ,NZ,dt],styles:["#codemap-context-menu[_ngcontent-%COMP%]{padding:12px}#codemap-context-menu[_ngcontent-%COMP%] .button-group[_ngcontent-%COMP%]{display:flex;flex-direction:column;gap:6px;width:100%}"]})}}return i})();var HZ=(()=>{class i{constructor(e,n){this.overlay=e,this.store=n,this.overlayReference=null,this.close=()=>{document.removeEventListener("click",this.onLeftClickHideNodeContextMenu,!0),document.removeEventListener("mousedown",this.onRightClickHideNodeContextMenu,!0),document.getElementById("codeMap").removeEventListener("wheel",this.close,!0),this.store.dispatch(El(null)),this.overlayReference&&this.resetOverlay()},this.onLeftClickHideNodeContextMenu=r=>{this.isEventFromColorPicker(r)||this.close()},this.onRightClickHideNodeContextMenu=r=>{r.button===2&&this.close()}}open(e,n){this.overlayReference&&this.resetOverlay();let r=this.overlay.position().flexibleConnectedTo({x:e,y:n}).withPositions([{originX:"end",originY:"bottom",overlayX:"start",overlayY:"top"}]);this.overlayReference=this.overlay.create({positionStrategy:r,scrollStrategy:this.overlay.scrollStrategies.close()}),this.overlayReference.attach(new jl(UZ)),this.overlayReference.overlayElement.addEventListener("contextmenu",o=>{o.preventDefault()}),document.addEventListener("click",this.onLeftClickHideNodeContextMenu,!1),document.addEventListener("mousedown",this.onRightClickHideNodeContextMenu,!0),document.getElementById("codeMap").addEventListener("wheel",this.close,!0)}resetOverlay(){this.overlayReference.dispose(),this.overlayReference=null}isEventFromColorPicker(e){return e.composedPath().some(r=>r?.nodeName==="CC-COLOR-PICKER"||r?.nodeName==="COLOR-CHROME")}static{this.\u0275fac=function(n){return new(n||i)(Me(eB),Me(Ie))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac,providedIn:"root"})}}return i})();var VZ=(()=>{class i{constructor(e,n){this.actions$=e,this.nodeContextMenu=n,this.openNodeContextMenu$=Pi(()=>this.actions$.pipe(qr(El),Oi(r=>{r.value&&this.nodeContextMenu.open(r.value.xPositionOfRightClickEvent,r.value.yPositionOfRightClickEvent)})),{dispatch:!1})}static{this.\u0275fac=function(n){return new(n||i)(Me(Jr),Me(HZ))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var QZ=(()=>{class i{constructor(e){this.store=e,this.resetSelectedEdgeMetricWhenItDoesntExistAnymore$=Pi(()=>this.store.select(In).pipe(hr(this.store.select(Wo)),Yt(([n,r])=>!n.edgeMetricData.some(o=>o.name===r)),Et(([n])=>n.edgeMetricData[0]?.name),tl(),Et(n=>qo({value:n}))))}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var zZ=[Dc,us,$s,sM,sg,wM,dg,Uo,zu,qu,vh,Tc,rg,bh,Ec,Mc,Sc,Cc,js,Ws,hs,Ma,_h,yh,xh,Bc,Fc,Ic,og,ag,kc];var qZ=[qs,fh,qo,Mo,Gs,ja,ad,ph,wc,Ah,gh,Go,mh,Gr,zo];var GZ=[uh,xc,hh,ng,iM,nM,YA,ZA,JA,eg,tg,yc,dh];var WZ=[[...GZ],[...zZ],[...qZ],[...Dy]].flat();var jZ=(()=>{class i{constructor(e,n){this.actions$=e,this.state=n,this.saveCcState$=Pi(()=>this.actions$.pipe(Yt(r=>r.type!==Rc.type),qr(...WZ),vs(500),Oi(()=>ft(this,null,function*(){let r=this.state.getValue();yield Nq(r)}))),{dispatch:!1})}static{this.\u0275fac=function(n){return new(n||i)(Me(Jr),Me(bi))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var $Z=(()=>{class i{constructor(e,n){this.actions$=e,this.store=n,this.setIsLoadingFile$=Pi(()=>this.store.select(ir).pipe(Et(()=>Ya({value:!0})))),this.setIsLoadingMap$=Pi(()=>this.actions$.pipe(qr(...O2),Et(()=>ol({value:!0}))))}static{this.\u0275fac=function(n){return new(n||i)(Me(Jr),Me(Ie))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var XZ=(()=>{class i{constructor(e){this.store=e,this.resetIsEdgeMetricVisible$=Pi(()=>this.store.select(Wo).pipe(hr(this.store.select(Lg)),Yt(([,n])=>!n),Et(()=>bh())))}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();function KZ(i,t){let e=new Map;if(i.length===1)return i[0].settings.fileSettings.edges;for(let n of i)if(n.settings.fileSettings.edges)for(let r of n.settings.fileSettings.edges){let o={fromNodeName:t?rm(n.fileMeta.fileName,r.fromNodeName):r.fromNodeName,toNodeName:t?rm(n.fileMeta.fileName,r.toNodeName):r.toNodeName,attributes:Po(r.attributes),visible:r.visible},a=e.get(`${o.fromNodeName}|${o.toNodeName}`);if(a!==void 0)for(let s of Object.keys(o.attributes))a.attributes[s]=o.attributes[s];else e.set(`${o.fromNodeName}|${o.toNodeName}`,o)}return[...e.values()]}function YZ(i,t){if(i.length===1)return i[0].settings.fileSettings.markedPackages;let e=new Map;for(let n of i)if(n.settings.fileSettings.markedPackages)for(let r of n.settings.fileSettings.markedPackages){let o={path:t?_w(n.fileMeta.fileName,r.path):r.path,color:r.color};e.set(`${o.path}|${o.color}`,o)}return[...e.values()]}function ZZ(i,t){let e=new Map;if(i.length===1)return i[0].settings.fileSettings.blacklist;for(let n of i)if(n.settings.fileSettings.blacklist)for(let r of n.settings.fileSettings.blacklist){let o={path:t?_w(n.fileMeta.fileName,r.path):r.path,type:r.type};e.set(`${o.path}|${o.type}`,o)}return[...e.values()]}function JZ(i){let t={},e={};for(let n of i){for(let r of Object.keys(n.nodes))t[r]||(t[r]=n.nodes[r]);for(let r of Object.keys(n.edges))e[r]||(e[r]=n.edges[r])}return{nodes:t,edges:e}}function eJ(i){let t={};for(let e of i)for(let n of Object.keys(e))t[n]||(t[n]=e[n]);return t}var tJ=(()=>{class i{constructor(e,n){this.store=e,this.state=n,this.updateFileSettings$=Pi(()=>this.store.select(ir).pipe(Et(()=>{let r=this.state.getValue(),o=NH(r.files),a=Aw(r.files),s=ir(r).map(({file:c})=>c.settings.fileSettings.attributeTypes),l=ir(r).map(({file:c})=>c.settings.fileSettings.attributeDescriptors);return ts({value:{fileSettings:{edges:KZ(o,a),markedPackages:YZ(o,a),blacklist:ZZ(o,a),attributeTypes:JZ(s),attributeDescriptors:eJ(l)}}})})))}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie),Me(bi))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var iJ=(()=>{class i{constructor(e,n){this.store=e,this.state=n,this.updateMapColors$=Pi(()=>this.store.select(oa).pipe(Et(r=>{let o=this.state.getValue(),a=o.fileSettings.attributeDescriptors,s=o.appSettings.mapColors;if(a[r]?.direction===1){let l=JSON.parse(Ga(s)),c=l.negative;return l.negative=l.positive,l.positive=c,Uo({value:l})}return Uo({value:s??sa})})))}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie),Me(bi))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var nJ=(()=>{class i{constructor(e,n){this.store=e,this.state=n,this.updateVisibleTopLabels$=Pi(()=>this.store.select(ir).pipe(rf(),hr(this.store.select(Sh)),Et(([[r,o],a])=>{let l=Ga(r)===Ga(o)?this.state.getValue().appSettings.amountOfTopLabels:fg(a);return Ma({value:l})})))}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie),Me(bi))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var rJ=(()=>{class i{constructor(e,n){this.actions$=e,this.store=n,this.resetColorRange$=Pi(()=>this.actions$.pipe(qr(...Dy),hr(this.store.select(ir)),Do(()=>this.store.select(aa).pipe(ys(1),kn(1))),Et(r=>Mo({value:wm(r)})))),this.resetColorRangeOnColorMetricChange$=Pi(()=>this.actions$.pipe(qr(Gr),Do(()=>this.store.select(aa).pipe(kn(1))),Et(r=>Mo({value:wm(r)}))))}static{this.\u0275fac=function(n){return new(n||i)(Me(Jr),Me(Ie))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var oJ=(()=>{class i{constructor(e){this.store=e,this.updateShowLabels$=Pi(()=>this.store.select(Tg).pipe(hr(this.store.select(WS),this.store.select(GS)),Yt(([n,r,o])=>this.atLeastOneChecked(n)!==(r||o)),nf(([n,r,o])=>this.atLeastOneChecked(n)?[us({value:!0})]:[us({value:!1}),$s({value:!1})])))}atLeastOneChecked(e){return e.positive||e.negative||e.neutral}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var aJ=(()=>{class i{constructor(e){this.store=e,this.updateAmountOfEdgePreviews$=Pi(()=>this.store.select(T2).pipe(hr(this.store.select(Sg)),ys(1),Yt(([n,r])=>r>n||r===0),Et(([n,r])=>r===0?hs({value:wh}):hs({value:n}))))}static{this.\u0275fac=function(n){return new(n||i)(Me(Ie))}}static{this.\u0275prov=Ue({token:i,factory:i.\u0275fac})}}return i})();var sJ={providers:[MZ(),yT(xT()),l5(lW,{metaReducers:[cW]}),Wq([cZ,oS,aJ,VZ,uj,ej,rJ,iG,XZ,L2,EZ,nJ,oJ,TZ,QZ,tJ,$Z,jZ,$q,iJ]),{provide:yO,useFactory:i=>()=>i.synchronizeLocalCodeChartaVersion(),deps:[CZ],multi:!0}]};pT(lZ,sJ);
|