@needle-tools/engine 2.65.1-pre → 2.65.2-pre
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/CHANGELOG.md +4 -0
- package/dist/needle-engine.js +81 -28
- package/dist/needle-engine.umd.cjs +2 -2
- package/lib/engine/extensions/NEEDLE_techniques_webgl.js +5 -2
- package/lib/engine/extensions/NEEDLE_techniques_webgl.js.map +1 -1
- package/lib/engine-components/Animator.d.ts +25 -1
- package/lib/engine-components/Animator.js +64 -37
- package/lib/engine-components/Animator.js.map +1 -1
- package/lib/engine-components/AnimatorController.d.ts +14 -12
- package/lib/engine-components/AnimatorController.js +15 -13
- package/lib/engine-components/AnimatorController.js.map +1 -1
- package/package.json +1 -1
- package/src/engine/extensions/NEEDLE_techniques_webgl.ts +5 -2
- package/src/engine-components/Animator.ts +54 -27
- package/src/engine-components/AnimatorController.ts +15 -13
|
@@ -3400,9 +3400,9 @@ a=extmap-allow-mixed`)!==-1){var u=d.sdp.split(`
|
|
|
3400
3400
|
irradiance += 0.;
|
|
3401
3401
|
#else
|
|
3402
3402
|
irradiance += getLightProbeIrradiance( lightProbe, geometry.normal );
|
|
3403
|
-
#endif`),ZA.lightmap.lightmapScaleOffset={value:new sg(1,1,0,0)};const iO=wA("debugplayerview");var to=(t=>(t.Browser="browser",t.Headset="headset",t.Handheld="handheld",t))(to||{});class eO{constructor(A,g){r(this,"userId");r(this,"context");r(this,"viewDevice","browser");r(this,"removed",!1);r(this,"_object");this.userId=A,this.context=g}get currentObject(){return this._object}set currentObject(A){this._object=A}get isConnected(){return this.context.connection.userIsInRoom(this.userId)}}class tO{constructor(A){r(this,"context");r(this,"playerViews",new Map);this.context=A}setPlayerView(A,g,I){let i=this.playerViews.get(A);i||(i=new eO(A,this.context),this.playerViews.set(A,i)),i.viewDevice=I,i.currentObject=g,i.removed=!1}getPlayerView(A){if(!A)return;if(!this.context.connection.userIsInRoom(A)){this.playerViews.delete(A);return}return this.playerViews.get(A)}removePlayerView(A,g){const I=this.playerViews.get(A);(I==null?void 0:I.viewDevice)===g&&(iO&&console.log("REMOVE",A),I.removed=!0,this.playerViews.delete(A))}}const CO=wA("debugSetup"),oO=wA("stats"),BO=wA("debugactive");var re=(t=>(t[t.EarlyUpdate=0]="EarlyUpdate",t[t.Update=1]="Update",t[t.LateUpdate=2]="LateUpdate",t[t.OnBeforeRender=3]="OnBeforeRender",t[t.OnAfterRender=4]="OnAfterRender",t[t.PrePhysicsStep=9]="PrePhysicsStep",t[t.PostPhysicsStep=10]="PostPhysicsStep",t))(re||{}),Ul=(t=>(t.ImmersiveVR="immersive-vr",t.ImmersiveAR="immersive-ar",t))(Ul||{});function XR(t,A){if(!t)return;const g=(A==null?void 0:A.new_scripts)??Ng.Current.new_scripts;g.includes(t)||g.push(t)}const ee=class{constructor(A){r(this,"name");r(this,"alias");r(this,"isManagedExternally",!1);r(this,"isPaused",!1);r(this,"runInBackground",!1);r(this,"hash");r(this,"domElement");r(this,"_resolutionScaleFactor",1);r(this,"_boundingClientRectFrame",-1);r(this,"_boundingClientRect",null);r(this,"_domX");r(this,"_domY");r(this,"xrSessionMode");r(this,"_currentFrameEvent",-1);r(this,"scene");r(this,"renderer");r(this,"composer",null);r(this,"scripts",[]);r(this,"scripts_pausedChanged",[]);r(this,"scripts_earlyUpdate",[]);r(this,"scripts_update",[]);r(this,"scripts_lateUpdate",[]);r(this,"scripts_onBeforeRender",[]);r(this,"scripts_onAfterRender",[]);r(this,"scripts_WithCorroutines",[]);r(this,"coroutines",{});r(this,"mainCameraComponent");r(this,"post_setup_callbacks",[]);r(this,"pre_update_callbacks",[]);r(this,"pre_render_callbacks",[]);r(this,"post_render_callbacks",[]);r(this,"new_scripts",[]);r(this,"new_script_start",[]);r(this,"new_scripts_pre_setup_callbacks",[]);r(this,"new_scripts_post_setup_callbacks",[]);r(this,"application");r(this,"time");r(this,"input");r(this,"physics");r(this,"connection");r(this,"assets");r(this,"mainLight",null);r(this,"rendererData");r(this,"addressables");r(this,"lightmaps");r(this,"players");r(this,"_sizeChanged",!1);r(this,"_isCreated",!1);r(this,"_isVisible",!1);r(this,"_stats",oO?q2():null);r(this,"_intersectionObserver",null);r(this,"_disposeCallbacks",[]);r(this,"_cameraStack",[]);r(this,"_onBeforeRenderListeners",{});r(this,"_requireDepthTexture",!1);r(this,"_requireColorTexture",!1);r(this,"_renderTarget");r(this,"_isRendering",!1);r(this,"_wasPaused",!1);if(this.name=(A==null?void 0:A.name)||"",this.alias=A==null?void 0:A.alias,this.domElement=(A==null?void 0:A.domElement)||document.body,this.hash=A==null?void 0:A.hash,A!=null&&A.renderer)this.renderer=A.renderer,this.isManagedExternally=!0;else{const i=wA("postfx");this.renderer=new Ln({antialias:!0}),this.renderer.toneMappingExposure=1,this.renderer.toneMapping=ht,this.renderer.setClearColor(new T("lightgrey"),0),this.renderer.antialias=!0,this.renderer.alpha=!1,this.renderer.shadowMap.enabled=!0,this.renderer.shadowMap.type=ow,this.renderer.setSize(this.domWidth,this.domHeight),this.renderer.outputEncoding=Dg,this.renderer.physicallyCorrectLights=!0,this.composer=i?new N2(this.renderer):null}this.scene=new vo,mi.register(this),this.application=new $2(this),this.time=new c2,this.input=new aT(this),this.physics=new fs(this),this.connection=new U2(this),this.assets=new J2,this.rendererData=new T2(this),this.addressables=new z2(this),this.lightmaps=new IO(this),this.players=new tO(this);const g=()=>this._sizeChanged=!0;window.addEventListener("resize",g),this._disposeCallbacks.push(()=>window.removeEventListener("resize",g));const I=new ResizeObserver(i=>this._sizeChanged=!0);I.observe(this.domElement),this._disposeCallbacks.push(()=>I.disconnect()),this._intersectionObserver=new IntersectionObserver(i=>{this._isVisible=i[0].isIntersecting}),this._disposeCallbacks.push(()=>{var i;return(i=this._intersectionObserver)==null?void 0:i.disconnect()})}static get Current(){return this._current}static set Current(A){mi.Current=A,this._current=A}get resolutionScaleFactor(){return this._resolutionScaleFactor}set resolutionScaleFactor(A){if(A!==this._resolutionScaleFactor&&typeof A=="number"){if(A<=0){console.error("Invalid resolution scale factor",A);return}this._resolutionScaleFactor=A,this.updateSize()}}calculateBoundingClientRect(){if(this.isInAR){this._domX=0,this._domY=0;return}this._boundingClientRectFrame!==this.time.frame&&(this._boundingClientRectFrame=this.time.frame,this._boundingClientRect=this.domElement.getBoundingClientRect(),this._domX=this._boundingClientRect.x,this._domY=this._boundingClientRect.y)}get domWidth(){return this.isInAR?window.innerWidth:this.domElement.clientWidth}get domHeight(){return this.isInAR?window.innerHeight:this.domElement.clientHeight}get domX(){return this.calculateBoundingClientRect(),this._domX}get domY(){return this.calculateBoundingClientRect(),this._domY}get isInXR(){var A;return((A=this.renderer.xr)==null?void 0:A.isPresenting)||!1}get isInVR(){return this.xrSessionMode==="immersive-vr"}get isInAR(){return this.xrSessionMode==="immersive-ar"}get xrSession(){var A;return(A=this.renderer.xr)==null?void 0:A.getSession()}get arOverlayElement(){const A=this.domElement;return typeof A.getAROverlayContainer=="function"?A.getAROverlayContainer():this.domElement}get currentFrameEvent(){return this._currentFrameEvent}get mainCamera(){if(this.mainCameraComponent){const A=this.mainCameraComponent;return A.cam||A.buildCamera(),A.cam}return null}get isCreated(){return this._isCreated}internalOnUpdateVisible(){var A,g;(A=this._intersectionObserver)==null||A.disconnect(),(g=this._intersectionObserver)==null||g.observe(this.domElement)}updateSize(){var A,g;if(!this.isManagedExternally&&!this.renderer.xr.isPresenting){this._sizeChanged=!1;const I=this.resolutionScaleFactor,i=this.domWidth*I,e=this.domHeight*I,C=this.mainCamera;this.updateAspect(C),this.renderer.setSize(i,e),this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.domElement.style.width="100%",this.renderer.domElement.style.height="100%",this.composer&&((A=this.composer.setSize)==null||A.call(this.composer,i,e),(g=this.composer.setPixelRatio)==null||g.call(this.composer,window.devicePixelRatio))}}updateAspect(A,g,I){if(!A)return;g===void 0&&(g=this.domWidth),I===void 0&&(I=this.domHeight);const i=A.aspect;A.aspect=g/I,i!==A.aspect&&A.updateProjectionMatrix()}onCreate(A,g){return this._isCreated?(console.warn("Context already created"),null):(this._isCreated=!0,this.internalOnCreate(A,g))}onDestroy(){var A,g,I;if(this._isCreated){this._isCreated=!1,ds(this.scene,!0),(A=this.renderer)==null||A.setAnimationLoop(null),this.isManagedExternally||(g=this.renderer)==null||g.dispose();for(const i of this._disposeCallbacks)try{i()}catch(e){console.error("Error in on dispose callback:",e,i)}(I=this.domElement)!=null&&I.parentElement&&this.domElement.parentElement.removeChild(this.domElement),mi.dispatchCallback(JC.ContextDestroyed,this),mi.unregister(this)}}registerCoroutineUpdate(A,g,I){return this.coroutines[I]||(this.coroutines[I]=[]),this.coroutines[I].push({comp:A,main:g}),g}unregisterCoroutineUpdate(A,g){if(!this.coroutines[g])return;const I=this.coroutines[g].findIndex(i=>i.main===A);I>=0&&this.coroutines[g].splice(I,1)}stopAllCoroutinesFrom(A){for(const g in this.coroutines){const I=this.coroutines[g];for(let i=I.length-1;i>=0;i--)I[i].comp===A&&I.splice(i,1)}}setCurrentCamera(A){var i;if(!A)return;if(A.cam||A.buildCamera(),!A.cam){console.warn("Camera component is missing camera",A);return}const g=this._cameraStack.indexOf(A);g>=0&&this._cameraStack.splice(g,1),this._cameraStack.push(A),this.mainCameraComponent=A;const I=A.cam;I.isPerspectiveCamera&&this.updateAspect(I),(i=this.mainCameraComponent)==null||i.applyClearFlagsIfIsActiveCamera()}removeCamera(A){if(!A)return;const g=this._cameraStack.indexOf(A);if(g>=0&&this._cameraStack.splice(g,1),this.mainCameraComponent===A&&(this.mainCameraComponent=void 0,this._cameraStack.length>0)){const I=this._cameraStack[this._cameraStack.length-1];this.setCurrentCamera(I)}}addBeforeRenderListener(A,g){if(!this._onBeforeRenderListeners[A.uuid]){this._onBeforeRenderListeners[A.uuid]=[];const I=(i,e,C,o,B,s)=>{const n=this._onBeforeRenderListeners[A.uuid];if(n)for(let a=0;a<n.length;a++){const Q=n[a];Q(i,e,C,o,B,s)}};A.onBeforeRender=I}this._onBeforeRenderListeners[A.uuid].push(g)}removeBeforeRenderListener(A,g){if(this._onBeforeRenderListeners[A.uuid]){const I=this._onBeforeRenderListeners[A.uuid],i=I.indexOf(g);i>=0&&I.splice(i,1)}}get isRendering(){return this._isRendering}setRequireDepth(A){this._requireDepthTexture=A}setRequireColor(A){this._requireColorTexture=A}get depthTexture(){var A;return((A=this._renderTarget)==null?void 0:A.depthTexture)||null}get opaqueColorTexture(){var A;return((A=this._renderTarget)==null?void 0:A.texture)||null}get isVisibleToUser(){if(this.isInXR)return!0;if(!this._isVisible)return!1;const A=getComputedStyle(this.domElement);return A.visibility!=="hidden"&&A.display!=="none"&&A.opacity!=="0"}async internalOnCreate(A,g){await this.physics.createWorld();let I=!0;try{ee.Current=this,A&&await A(this,g)}catch(i){console.error(i),I=!1}if(I){this.internalOnUpdateVisible(),this.isManagedExternally||this.domElement.prepend(this.renderer.domElement),ee._current=this,ee._current=this;for(let i=0;i<this.new_scripts.length;i++){const e=this.new_scripts[i];if(e.gameObject!==void 0&&e.gameObject!==null){e.gameObject.userData===void 0&&(e.gameObject.userData={}),e.gameObject.userData.components===void 0&&(e.gameObject.userData.components=[]);const C=e.gameObject.userData.components;C.includes(e)||C.push(e)}}if(this.post_setup_callbacks)for(let i=0;i<this.post_setup_callbacks.length;i++)ee._current=this,await this.post_setup_callbacks[i](this);if(!this.mainCamera){ee._current=this;let i=null;ws(this.scene,e=>{const C=e;if(C!=null&&C.isCamera){if(Br(C.gameObject),!C.activeAndEnabled)return;if(C.tag==="MainCamera")return i=C,!0;i=C}}),i?this.setCurrentCamera(i):(mi.dispatchCallback(JC.MissingCamera,this),this.mainCamera||console.error("MISSING camera",this))}if(ee._current=this,or(this),!this.isManagedExternally&&this.composer&&this.mainCamera){const i=new K2(this.scene,this.mainCamera);this.renderer.setSize(this.domWidth,this.domHeight),this.composer.addPass(i),this.composer.setSize(this.domWidth,this.domHeight)}this._sizeChanged=!0,this._stats&&(this._stats.showPanel(1),this.domElement.appendChild(this._stats.dom)),this.renderer.setAnimationLoop(this.render.bind(this)),CO&&Kp(this.scene,!0),mi.dispatchCallback(JC.ContextCreated,this)}}render(A,g){var e,C;if(this._currentFrameEvent=-1,this.onHandlePaused())return;for((e=this._stats)==null||e.begin(),ee._current=this,this.time.update(),or(this),bh(this.scene),EU(this);this._cameraStack.length>0&&(!this.mainCameraComponent||this.mainCameraComponent.destroyed);){this._cameraStack.splice(this._cameraStack.length-1,1);const o=this._cameraStack[this._cameraStack.length-1];this.setCurrentCamera(o)}if(this.pre_update_callbacks)for(const o in this.pre_update_callbacks)this.pre_update_callbacks[o]();this._currentFrameEvent=0;for(let o=0;o<this.scripts_earlyUpdate.length;o++){const B=this.scripts_earlyUpdate[o];B.activeAndEnabled&&B.earlyUpdate!==void 0&&(ee._current=this,B.earlyUpdate())}if(this.executeCoroutines(0),this.onHandlePaused())return;this._currentFrameEvent=1;for(let o=0;o<this.scripts_update.length;o++){const B=this.scripts_update[o];B.activeAndEnabled&&B.update!==void 0&&(ee._current=this,B.update())}if(this.executeCoroutines(1),this.onHandlePaused())return;this._currentFrameEvent=2;for(let o=0;o<this.scripts_lateUpdate.length;o++){const B=this.scripts_lateUpdate[o];B.activeAndEnabled&&B.lateUpdate!==void 0&&(ee._current=this,B.lateUpdate())}if(this.executeCoroutines(2),this.onHandlePaused())return;const I=1,i=this.time.deltaTime/I;for(let o=0;o<I;o++)this._currentFrameEvent=9,this.executeCoroutines(9),this.physics.step(i),this._currentFrameEvent=10,this.executeCoroutines(10);if(this.physics.postStep(),!this.onHandlePaused()){if(this.isVisibleToUser){this._currentFrameEvent=3;for(let o=0;o<this.scripts_onBeforeRender.length;o++){const B=this.scripts_onBeforeRender[o];B.activeAndEnabled&&B.onBeforeRender!==void 0&&(ee._current=this,B.onBeforeRender(g))}if(this.executeCoroutines(3),this._sizeChanged&&this.updateSize(),this.pre_render_callbacks)for(const o in this.pre_render_callbacks)this.pre_render_callbacks[o]();this.isManagedExternally||(kT(this),this._currentFrameEvent=-10,this.renderNow(),this._currentFrameEvent=4);for(let o=0;o<this.scripts_onAfterRender.length;o++){const B=this.scripts_onAfterRender[o];B.activeAndEnabled&&B.onAfterRender!==void 0&&(ee._current=this,B.onAfterRender())}if(this.executeCoroutines(4),this.post_render_callbacks)for(const o in this.post_render_callbacks)this.post_render_callbacks[o]()}this._currentFrameEvent=-1,this.connection.sendBufferedMessagesNow(),(C=this._stats)==null||C.end()}}renderNow(A){return!A&&(A=this.mainCamera,!A)?!1:(this._isRendering=!0,this.renderRequiredTextures(),this.composer&&!this.isInXR?this.composer.render():this.mainCamera&&this.renderer.render(this.scene,A),this._isRendering=!1,!0)}onHandlePaused(){const A=this.evaluatePaused();if(this._wasPaused!==A){BO&&console.log("Paused?",A,"context:"+this.alias);for(let g=0;g<this.scripts_pausedChanged.length;g++){const I=this.scripts_pausedChanged[g];I.activeAndEnabled&&I.onPausedChanged!==void 0&&(ee._current=this,I.onPausedChanged(A,this._wasPaused))}}return this._wasPaused=A,A}evaluatePaused(){return this.isInXR?!1:this.isPaused?!0:this.runInBackground?!1:!this.isVisibleToUser}renderRequiredTextures(){if(!this.mainCamera||!this._requireDepthTexture&&!this._requireColorTexture)return;if(!this._renderTarget){if(this._renderTarget=new Li(this.domWidth,this.domHeight),this._requireDepthTexture){const I=new ku(this.domWidth,this.domHeight);this._renderTarget.depthTexture=I}this._requireColorTexture&&(this._renderTarget.texture=new Wg,this._renderTarget.texture.generateMipmaps=!1,this._renderTarget.texture.minFilter=eI,this._renderTarget.texture.magFilter=eI,this._renderTarget.texture.format=lI)}const A=this._renderTarget;A.texture&&(A.texture.encoding=this.renderer.outputEncoding);const g=this.renderer.getRenderTarget();this.renderer.setRenderTarget(A),this.renderer.render(this.scene,this.mainCamera),this.renderer.setRenderTarget(g)}executeCoroutines(A){if(this.coroutines[A]){const I=this.coroutines[A];for(let i=0;i<I.length;i++)try{const e=I[i];if(!e.comp||e.comp.destroyed||!e.main||e.comp.enabled===!1){I.splice(i,1),--i;continue}const o=e.chained;if(o&&o.length>0){const a=o[o.length-1].next();if(a.done&&o.pop(),g(a)&&(e.chained||(e.chained=[]),e.chained.push(a.value)),!a.done)continue}const B=e.main.next();if(B.done===!0){I.splice(i,1),--i;continue}const s=B.value;if(g(s)){if(s.next().done)continue;e.chained||(e.chained=[]),e.chained.push(s)}}catch(e){console.error(e)}}function g(I){return!!(I&&I.next&&I.return)}}};let Ng=ee;r(Ng,"_current");const sO=wA("debugaroverlay"),Gs="ar",$R="quit-ar";class nO{constructor(){r(this,"arContainer",null);r(this,"closeARCallback");r(this,"currentSession",null);r(this,"registeredCloseEventElements",[]);r(this,"_createdAROnlyElements",[]);r(this,"_reparentedObjects",[]);this.closeARCallback=this.onRequestedEndAR.bind(this)}get ARContainer(){return this.arContainer}requestEndAR(){this.onRequestedEndAR()}onBegin(A,g,I){this.currentSession=I,this.arContainer=g,A.domElement.querySelectorAll(`.${Gs}`).forEach(C=>{var o;C&&C!==this.arContainer&&(this._reparentedObjects.push({el:C,previousParent:C.parentElement}),(o=this.arContainer)==null||o.appendChild(C))});const e=g.getElementsByClassName($R);if(!e||e.length<=0)console.warn(`Missing quit AR elements, creating fallback X button. Use class name '${$R}' to override.`),this.createFallbackCloseARButton(this.arContainer);else for(let C=0;C<e.length;C++){const o=e[C];o&&(o.addEventListener("click",this.closeARCallback),this.registeredCloseEventElements.push(o))}}onEnd(A){var g;for(const I of this._createdAROnlyElements)I.remove&&I.remove();for(const I of this._reparentedObjects){const i=I.el;(g=I.previousParent)==null||g.appendChild(i)}this._reparentedObjects.length=0,J0()&&setTimeout(()=>{const I=A.renderer.domElement;I&&A.domElement.insertBefore(I,A.domElement.firstChild);const i=document.querySelectorAll("*");for(var e=0;e<i.length;e++){const C=i[e];C&&C._displayChanged!==void 0&&C._displayWas!==void 0&&(C.style.display=C._displayWas)}},10)}findOrCreateARContainer(A){if(A.classList.contains(Gs))return A;if(A.children)for(let i=0;i<A.children.length;i++){const e=A.children[i];if(!(!e||!e.classList)&&e.classList.contains(Gs))return e}const g=document.getElementsByClassName(Gs);if(g&&g.length>0)return g[0];sO&&console.log("No overlay container found in document - generating new ony");const I=document.createElement("div");return I.classList.add(Gs),I.style.position="absolute",I.style.width="100%",I.style.height="100%",I.style.display="flex",I.style.visibility="visible",A.appendChild(I)}onRequestedEndAR(){if(this.currentSession){this.currentSession.end(),this.currentSession=null;for(const A of this.registeredCloseEventElements)A.removeEventListener("click",this.closeARCallback);this.registeredCloseEventElements.length=0}}createFallbackCloseARButton(A){var g=document.createElementNS("http://www.w3.org/2000/svg","svg");g.setAttribute("width","38px"),g.setAttribute("height","38px"),g.style.position="absolute",g.style.right="20px",g.style.top="40px",g.style.zIndex="9999",g.style.pointerEvents="auto",g.addEventListener("click",this.closeARCallback),A.appendChild(g),this._createdAROnlyElements.push(g);var I=document.createElementNS("http://www.w3.org/2000/svg","path");I.setAttribute("d","M 12,12 L 28,28 M 28,12 12,28"),I.setAttribute("stroke","#ddd"),I.setAttribute("stroke-width","3px"),g.appendChild(I),this._createdAROnlyElements.push(I)}}class sA extends LA{constructor(){super(...arguments);r(this,"guid")}static isDestroyed(g){return Op(g)}static setActive(g,I,i=!0){g&&(rr(g,I),bh(g),I&&i&&EU(Ng.Current,g))}static isActiveSelf(g){return IQ(g)}static isActiveInHierarchy(g){return qU(g)}static markAsInstancedRendered(g,I){LU(g,I)}static isUsingInstancing(g){return Tp(g)}static foreachComponent(g,I,i=!0){return ws(g,I,i)}static instantiateSynced(g,I){return g?SU(g,I):null}static instantiate(g,I=null){return cr(g,I)}static destroySynced(g,I,i=!0){if(!g)return;const e=g;I=I??Ng.Current,bp(e,I.connection,i)}static destroy(g,I=!0,i=!0){return ds(g,I,i)}static add(g,I,i){if(!(!g||!I)){if(g===I){console.warn("Can not add object to self",g);return}i||(i=Ng.Current),I.add(g),rr(g,!0),bh(g),i?sA.foreachComponent(g,e=>{cU(e,i),!e.__internalDidAwakeAndStart&&i.new_script_start.includes(e)===!1&&i.new_script_start.push(e)},!0):console.warn("Missing context")}}static remove(g){var I;g&&((I=g.parent)==null||I.remove(g),rr(g,!1),bh(g),sA.foreachComponent(g,i=>{fT(i)},!0))}static invokeOnChildren(g,I,...i){this.invoke(g,I,!0,i)}static invoke(g,I,i=!1,...e){g&&this.foreachComponent(g,C=>{const o=C[I];o&&typeof o=="function"&&o.bind(C)(...e)},i)}static addNewComponent(g,I,i=!0){const e=new I;return Xo(g,e,i),e}static addComponent(g,I){if(I.gameObject==null)throw new Error("Did you mean to create a new component? Use addNewComponent");MU(g,I)}static removeComponent(g){return Hp(g.gameObject,g),g}static getOrAddComponent(g,I){return vp(g,I)}static getComponent(g,I){return g===null?null:AQ(g,I)}static getComponents(g,I,i=null){return g===null?i??[]:sr(g,I,i)}static findByGuid(g,I){return Er(g,I)}static findObjectOfType(g,I,i=!0){return mU(g,I??Ng.Current,i)}static findObjectsOfType(g,I){const i=[];return NU(g,i,I),i}static getComponentInChildren(g,I){return gQ(g,I)}static getComponentsInChildren(g,I,i=null){return nr(g,I,i??void 0)}static getComponentInParent(g,I){return Qr(g,I)}static getComponentsInParent(g,I,i=null){return Hh(g,I,i)}static getAllComponents(g){var e;return[...(e=g.userData)==null?void 0:e.components]}static*iterateComponents(g){var i;const I=(i=g==null?void 0:g.userData)==null?void 0:i.components;if(I&&Array.isArray(I))for(let e=0;e<I.length;e++)yield I[e]}}let Rl=(RI=class{constructor(){r(this,"__context");r(this,"__name");r(this,"gameObject");r(this,"guid","invalid");r(this,"sourceId");r(this,"__didAwake",!1);r(this,"__didStart",!1);r(this,"__didEnable",!1);r(this,"__isEnabled");r(this,"__destroyed",!1);r(this,"_worldPosition");r(this,"_worldQuaternion");r(this,"_worldEuler");r(this,"_worldRotation");r(this,"_eventListeners",new Map);this.__internalNewInstanceCreated()}get isComponent(){return!0}get context(){return this.__context??Ng.Current}set context(A){this.__context=A}get scene(){return this.context.scene}get layer(){var A,g;return(g=(A=this.gameObject)==null?void 0:A.userData)==null?void 0:g.layer}get name(){var A;return(A=this.gameObject)==null?void 0:A.userData.name}set name(A){this.gameObject?(this.gameObject.userData||(this.gameObject.userData={}),this.gameObject.userData.name=A,this.__name=A):this.__name=A}get tag(){var A;return(A=this.gameObject)==null?void 0:A.userData.tag}set tag(A){this.gameObject&&(this.gameObject.userData.tag=A)}get static(){var A;return(A=this.gameObject)==null?void 0:A.userData.static}get hideFlags(){var A;return(A=this.gameObject)==null?void 0:A.userData.hideFlags}get activeAndEnabled(){return!(this.destroyed||this.__isEnabled===!1||!this.__isActiveInHierarchy)}get __isActive(){return this.gameObject.visible}get __isActiveInHierarchy(){if(!this.gameObject)return!1;const A=this.gameObject[Vo];return A===void 0?!0:A}set __isActiveInHierarchy(A){this.gameObject&&(this.gameObject[Vo]=A)}awake(){}onEnable(){}onDisable(){}onDestroy(){this.__destroyed=!0}startCoroutine(A,g=re.Update){return this.context.registerCoroutineUpdate(this,A,g)}stopCoroutine(A,g=re.Update){this.context.unregisterCoroutineUpdate(A,g)}get destroyed(){return this.__destroyed}destroy(){this.__destroyed||this.__internalDestroy()}get __internalDidAwakeAndStart(){return this.__didAwake&&this.__didStart}__internalNewInstanceCreated(){this.__didAwake=!1,this.__didStart=!1,this.__didEnable=!1,this.__isEnabled=void 0,this.__destroyed=!1}__internalAwake(){this.__didAwake||(this.__didAwake=!0,this.awake())}__internalStart(){this.__didStart||(this.__didStart=!0,this.start&&this.start())}__internalEnable(){return this.__didEnable?!1:(this.__didEnable=!0,this.onEnable(),this.__isEnabled=!0,!0)}__internalDisable(){this.__didEnable&&(this.__didEnable=!1,this.onDisable(),this.__isEnabled=!1)}__internalDestroy(){var A;this.__destroyed||(this.__destroyed=!0,(A=this.destroy)==null||A.call(this),UU(this))}get enabled(){return this.__isEnabled??!0}set enabled(A){if(typeof A=="number"&&(A>=.5?A=!0:A=!1),!this.__didAwake){this.__isEnabled=A;return}A?this.__internalEnable():this.__internalDisable()}get worldPosition(){return this._worldPosition||(this._worldPosition=new M),pg(this.gameObject,this._worldPosition),this._worldPosition}set worldPosition(A){Di(this.gameObject,A)}setWorldPosition(A,g,I){RI._worldPositionBuffer.set(A,g,I),this.worldPosition=RI._worldPositionBuffer}get worldQuaternion(){return this._worldQuaternion||(this._worldQuaternion=new kA),Ke(this.gameObject,this._worldQuaternion)}set worldQuaternion(A){iC(this.gameObject,A)}setWorldQuaternion(A,g,I,i){RI._worldQuaternionBuffer.set(A,g,I,i),this.worldQuaternion=RI._worldQuaternionBuffer}get worldEuler(){return this._worldEuler||(this._worldEuler=new TI),this._worldEuler.setFromQuaternion(this.worldQuaternion),this._worldEuler}set worldEuler(A){var g;this._worldQuaternion||(this._worldQuaternion=new kA),(g=this._worldQuaternion)==null||g.setFromEuler(A),this.worldQuaternion=this._worldQuaternion}get worldRotation(){const A=this.worldEuler;this._worldRotation||(this._worldRotation=new M);const g=this._worldRotation;return g.set(A.x,A.y,A.z),g.x=gg.toDegrees(g.x),g.y=gg.toDegrees(g.y),g.z=gg.toDegrees(g.z),g}set worldRotation(A){this.setWorldRotation(A.x,A.y,A.z,!0)}setWorldRotation(A,g,I,i=!0){i&&(A=gg.toRadians(A),g=gg.toRadians(g),I=gg.toRadians(I)),RI._worldEulerBuffer.set(A,g,I),RI._worldQuaternionBuffer.setFromEuler(RI._worldEulerBuffer),this.worldQuaternion=RI._worldQuaternionBuffer}get forward(){return RI._forward.set(0,0,-1).applyQuaternion(this.worldQuaternion)}get right(){return RI._right.set(1,0,0).applyQuaternion(this.worldQuaternion)}get up(){return RI._up.set(0,1,0).applyQuaternion(this.worldQuaternion)}addEventListener(A,g){this._eventListeners[A]=this._eventListeners[A]||[],this._eventListeners[A].push(g)}removeEventListener(A,g){if(!this._eventListeners[A])return;const I=this._eventListeners[A].indexOf(g);I>=0&&this._eventListeners[A].splice(I,1)}dispatchEvent(A){if(!this._eventListeners[A.type])return!1;const g=this._eventListeners[A.type];for(let I=0;I<g.length;I++)g[I](A);return!1}},r(RI,"_worldPositionBuffer",new M),r(RI,"_worldQuaternionBuffer",new kA),r(RI,"_worldEulerBuffer",new TI),r(RI,"_tempQuaternionBuffer2",new kA),r(RI,"_forward",new M),r(RI,"_right",new M),r(RI,"_up",new M),RI);class vA extends Rl{}const QO=Object.freeze(Object.defineProperty({__proto__:null,Behaviour:vA,Component:Rl,GameObject:sA},Symbol.toStringTag,{value:"Module"})),EC=function(t,A){return function(g,I,i){aO(g,I,i,t,A)}};function aO(t,A,g,I,i){if(!(!i&&!I&&!t.onValidate)){if(g!==void 0){console.error("Invalid usage of validate decorator. Only fields can be validated.",t,A,g),Ne("Invalid usage of validate decorator. Only fields can be validated. Property: "+A,qC.Error);return}if(t.__internalAwake){const e=Symbol(A),C=t.__internalAwake;t.__internalAwake=function(){this[e]===void 0&&(this[e]=this[A],Object.defineProperty(this,A,{set:function(o){var B;if(this[Up]===!0)this[e]=o;else{I==null||I.call(this,o);const s=this[e];this[e]=o,(B=this.onValidate)==null||B.call(this,A,s)}},get:function(){return i==null||i.call(this),this[e]}})),C.call(this)}}}}class qy{constructor(A,g,I,i){r(this,"_name");r(this,"_nameHash");r(this,"_normalizedTime");r(this,"_length");r(this,"_speed");this._name=A.name,this._nameHash=A.hash,this._normalizedTime=g,this._length=I,this._speed=i}get name(){return this._name}get nameHash(){return this._nameHash}get normalizedTime(){return this._normalizedTime}get length(){return this._length}get speed(){return this._speed}}function rO(t,A){return{name:"",isLooping:!1,guid:(A==null?void 0:A.generateUUID())??Be.generateUUID(),index:-1,clip:new Mt(t,1,[])}}var ks=(t=>(t[t.If=1]="If",t[t.IfNot=2]="IfNot",t[t.Greater=3]="Greater",t[t.Less=4]="Less",t[t.Equals=6]="Equals",t[t.NotEqual=7]="NotEqual",t))(ks||{}),AF=(t=>(t[t.Float=1]="Float",t[t.Int=3]="Int",t[t.Bool=4]="Bool",t[t.Trigger=9]="Trigger",t))(AF||{});const Co=wA("debuganimatorcontroller"),Fl=wA("debugrootmotion");class Ms{constructor(A){r(this,"normalizedStartOffset",0);r(this,"_speed",1);r(this,"animator");r(this,"model");r(this,"_mixer");r(this,"_activeState");r(this,"_activeStates",[]);r(this,"rootMotionHandler");this.model=A,Co&&console.log(this)}Play(A,g=-1,I=Number.NEGATIVE_INFINITY,i=0){if(g<0)g=0;else if(g>=this.model.layers.length){console.warn("invalid layer");return}const C=this.model.layers[g].stateMachine;for(const o of C.states)if(o.name===A||o.hash===A){Co&&console.log("transition to ",o),this.transitionTo(o,i,I);return}console.warn("Could not find "+A+" to play")}Reset(){this.setStartTransition()}SetBool(A,g){var i,e;const I=typeof A=="string"?"name":"hash";return(e=(i=this.model)==null?void 0:i.parameters)==null?void 0:e.filter(C=>C[I]===A).forEach(C=>C.value=g)}GetBool(A){var I,i,e;const g=typeof A=="string"?"name":"hash";return((e=(i=(I=this.model)==null?void 0:I.parameters)==null?void 0:i.find(C=>C[g]===A))==null?void 0:e.value)??!1}SetFloat(A,g){var i,e;const I=typeof A=="string"?"name":"hash";return(e=(i=this.model)==null?void 0:i.parameters)==null?void 0:e.filter(C=>C[I]===A).forEach(C=>C.value=g)}GetFloat(A){var I,i,e;const g=typeof A=="string"?"name":"hash";return((e=(i=(I=this.model)==null?void 0:I.parameters)==null?void 0:i.find(C=>C[g]===A))==null?void 0:e.value)??0}SetInteger(A,g){var i,e;const I=typeof A=="string"?"name":"hash";return(e=(i=this.model)==null?void 0:i.parameters)==null?void 0:e.filter(C=>C[I]===A).forEach(C=>C.value=g)}GetInteger(A){var I,i,e;const g=typeof A=="string"?"name":"hash";return((e=(i=(I=this.model)==null?void 0:I.parameters)==null?void 0:i.find(C=>C[g]===A))==null?void 0:e.value)??0}SetTrigger(A){var I,i;Co&&console.log("SET TRIGGER",A);const g=typeof A=="string"?"name":"hash";return(i=(I=this.model)==null?void 0:I.parameters)==null?void 0:i.filter(e=>e[g]===A).forEach(e=>e.value=!0)}ResetTrigger(A){var I,i;const g=typeof A=="string"?"name":"hash";return(i=(I=this.model)==null?void 0:I.parameters)==null?void 0:i.filter(e=>e[g]===A).forEach(e=>e.value=!1)}IsInTransition(){return this._activeStates.length>1}SetSpeed(A){this._speed=A}FindState(A){if(!A)return null;if(Array.isArray(this.model.layers)){for(const g of this.model.layers)for(const I of g.stateMachine.states)if(I.name===A)return I}return null}get context(){var A;return(A=this.animator)==null?void 0:A.context}bind(A){this.animator=A,this._mixer=new Gh(this.animator.gameObject),this.createActions(this.animator)}clone(){if(typeof this.model=="string")return console.warn("AnimatorController has not been resolved, can not create model from string",this.model),null;const A=zd(this.model,(I,i,e)=>e==null?!0:!(e.type==="Object3D"||e.isObject3D===!0||dT(e)||e.tracks!==void 0));return console.assert(A!==this.model),new Ms(A)}update(){var g,I;if(!this.animator||(this.evaluateTransitions(),this.updateActiveStates(),!this._activeState))return;const A=this.animator.context.time.deltaTime;this.animator.applyRootMotion&&((g=this.rootMotionHandler)==null||g.onBeforeUpdate()),this._mixer.update(A),this.animator.applyRootMotion&&((I=this.rootMotionHandler)==null||I.onAfterUpdate())}updateActiveStates(){for(let A=0;A<this._activeStates.length;A++){const g=this._activeStates[A],I=g.motion;if(!I.action)this._activeStates.splice(A,1),A--;else{const i=I.action;i.getEffectiveWeight()<=0&&!i.isRunning()&&(Co&&console.debug("REMOVE",g.name,i.getEffectiveWeight(),i.isRunning(),i.isScheduled()),this._activeStates.splice(A,1),A--)}}}setStartTransition(){for(const A of this.model.layers){const g=A.stateMachine;g.defaultState===void 0&&(Co&&console.warn("AnimatorController default state is undefined, will assign state 0 as default",A),g.defaultState=0);const I=g.states[g.defaultState];this.transitionTo(I,0,this.normalizedStartOffset)}}evaluateTransitions(){var e;let A=!1;if(!this._activeState){if(this.setStartTransition(),!this._activeState)return;A=!0}const g=this._activeState,I=g.motion.action;for(const C of g.transitions){if(!C.hasExitTime&&C.conditions.length<=0)continue;let o=!0;for(const B of C.conditions)if(!this.evaluateCondition(B)){o=!1;break}if(o){for(const B of C.conditions){const s=this.model.parameters.find(n=>n.name===B.parameter);(s==null?void 0:s.type)===AF.Trigger&&(s.value=!1)}if(I){const B=g.motion.clip.duration,s=B<=0?1:I.time/B;if(C.hasExitTime?s>=C.exitTime:!0){I.clampWhenFinished=!0,Co&&console.log("transition to "+C.destinationState,C,s,C.exitTime,C.hasExitTime),this.transitionTo(C.destinationState,C.duration,C.offset);return}}else{this.transitionTo(C.destinationState,C.duration,C.offset);return}}}let i=!1;if(g.motion.isLooping&&I&&I.time>=I.getClip().duration&&(i=!0,I.reset(),I.time=0,I.play()),!i&&g&&!A&&I&&this.animator&&g.behaviours){const C=I==null?void 0:I.getClip().duration,o=I.time/C,B=new qy(this._activeState,o,C,this._speed);for(const s of g.behaviours)s.instance&&((e=s.instance.onStateUpdate)==null||e.call(s.instance,this.animator,B,0))}}getState(A,g){return typeof A=="number"&&(A==-1&&(A=this.model.layers[g].stateMachine.defaultState,A===void 0&&(Co&&console.warn("AnimatorController default state is undefined: ",this.model,"Layer: "+g),A=0)),A=this.model.layers[g].stateMachine.states[A]),A}transitionTo(A,g,I){var s,n,a,Q,E,c,h,l;if(!this.animator)return;const i=0;if(A=this.getState(A,i),!(A!=null&&A.motion)||!A.motion.clip)return;const e=this._activeState===A;if(e){const w=A.motion;!w.action_loopback&&w.clip&&(this._mixer.uncacheAction(w.clip,this.animator.gameObject),w.action_loopback=this.createAction(w.clip))}if((s=this._activeState)!=null&&s.behaviours&&this._activeState.motion.action){const w=(n=this._activeState)==null?void 0:n.motion.clip.duration,p=this._activeState.motion.action.time/w,D=new qy(this._activeState,p,w,this._speed);for(const d of this._activeState.behaviours)(Q=(a=d.instance)==null?void 0:a.onStateExit)==null||Q.call(d.instance,this.animator,D,i)}const C=(E=this._activeState)==null?void 0:E.motion.action;C&&C.fadeOut(g),e&&(A.motion.action=A.motion.action_loopback,A.motion.action_loopback=C);const o=this._activeState;this._activeState=A;const B=(c=A.motion)==null?void 0:c.action;if(B){I=Math.max(0,Math.min(1,I)),B.isRunning()&&B.stop(),B.reset(),B.timeScale=this._speed,B.enabled=!0;const w=A.motion.clip.duration;if(B.time=I*w,B.clampWhenFinished=!0,B.setLoop(la,0),g>0?B.fadeIn(g):B.setEffectiveWeight(1),B.play(),this.rootMotionHandler&&this.rootMotionHandler.onStart(B),this._activeStates.includes(A)||this._activeStates.push(A),this._activeState.behaviours){const p=new qy(A,I,w,this._speed);for(const D of this._activeState.behaviours)(l=(h=D.instance)==null?void 0:h.onStateEnter)==null||l.call(D.instance,this.animator,p,i)}}else console.warn("No action",A.motion,this);Co&&console.log("TRANSITION FROM "+(o==null?void 0:o.name)+" TO "+A.name,g,C,B,B==null?void 0:B.getEffectiveTimeScale(),B==null?void 0:B.getEffectiveWeight(),B==null?void 0:B.isRunning(),B==null?void 0:B.isScheduled(),B==null?void 0:B.paused)}createAction(A){var I,i;if(this._mixer.existingAction(A)&&this._mixer.uncacheAction(A,(I=this.animator)==null?void 0:I.gameObject),(i=this.animator)!=null&&i.applyRootMotion){this.rootMotionHandler||(this.rootMotionHandler=new EO(this));const e=this.animator.gameObject;return this.rootMotionHandler.createClip(this._mixer,e,A)}else return this._mixer.clipAction(A)}evaluateCondition(A){const g=this.model.parameters.find(I=>I.name===A.parameter);if(!g)return!1;switch(A.mode){case ks.If:return g.value===!0;case ks.IfNot:return g.value===!1;case ks.Greater:return g.value>A.threshold;case ks.Less:return g.value<A.threshold;case ks.Equals:return g.value===A.threshold;case ks.NotEqual:return g.value!==A.threshold}return!1}createActions(A){var g,I;for(const i of this.model.layers){const e=i.stateMachine;for(let C=0;C<e.states.length;C++){const o=e.states[C];o.transitions||(o.transitions=[]);for(const B of o.transitions)B.conditions||(B.conditions=[]);if(o.motion||(o.motion=rO(o.name)),this.animator&&o.motion.clips){const B=(g=o.motion.clips)==null?void 0:g.find(s=>{var n,a;return s.node.name===((a=(n=this.animator)==null?void 0:n.gameObject)==null?void 0:a.name)});o.motion.clip=B==null?void 0:B.clip}if(!o.motion.clip){const B=new Mt(void 0,void 0,[]);o.motion.clip=B}if((I=o.motion)!=null&&I.clip){const B=o.motion.clip,s=this.createAction(B);o.motion.action=s}if(o.behaviours&&Array.isArray(o.behaviours))for(const B of o.behaviours){if(!(B!=null&&B.typeName))continue;const s=gA.get(B.typeName),n=new s;n.isStateMachineBehaviour&&(n._context=this.context??void 0,cs(n,B.properties),B.instance=n),Co&&console.log("Created animator controller behaviour",o.name,B.typeName,B.properties,n)}}}}*enumerateActions(){for(const A of this.model.layers){const g=A.stateMachine;for(let I=0;I<g.states.length;I++){const i=g.states[I];i!=null&&i.motion&&(i.motion.action&&(yield i.motion.action),i.motion.action_loopback&&(yield i.motion.action_loopback))}}}}class gF{constructor(A,g){r(this,"track");r(this,"createdInterpolant");r(this,"originalEvaluate");r(this,"customEvaluate");this.track=A;const I=A,i=I.createInterpolant.bind(A);I.createInterpolant=()=>(I.createInterpolant=i,this.createdInterpolant=i(),this.originalEvaluate=this.createdInterpolant.evaluate.bind(this.createdInterpolant),this.customEvaluate=e=>{if(!this.originalEvaluate)return;const C=this.originalEvaluate(e);return g(e,C)},this.createdInterpolant.evaluate=this.customEvaluate,this.createdInterpolant)}evaluate(A){this.customEvaluate&&this.customEvaluate(A)}dispose(){this.createdInterpolant&&this.originalEvaluate&&(this.createdInterpolant.evaluate=this.originalEvaluate),this.track=void 0,this.createdInterpolant=null,this.originalEvaluate=void 0,this.customEvaluate=void 0}}const VI=class{constructor(A,g,I,i,e){r(this,"_action");r(this,"root");r(this,"clip");r(this,"positionWrapper",null);r(this,"rotationWrapper",null);r(this,"context");r(this,"positionChange",new M);r(this,"rotationChange",new kA);if(this.context=A,this.root=g,this.clip=I,VI.firstKeyframeRotation[I.uuid]||(VI.firstKeyframeRotation[I.uuid]=new kA),e){const C=e.values;VI.firstKeyframeRotation[I.uuid].set(C[0],C[1],C[2],C[3])}VI.spaceRotation[I.uuid]||(VI.spaceRotation[I.uuid]=new kA),VI.effectiveSpaceRotation[I.uuid]||(VI.effectiveSpaceRotation[I.uuid]=new kA),VI.clipOffsetRotation[I.uuid]=new kA,e&&VI.clipOffsetRotation[I.uuid].set(e.values[0],e.values[1],e.values[2],e.values[3]).invert(),this.handlePosition(I,i),this.handleRotation(I,e)}set action(A){this._action=A}get action(){return this._action}onStart(A){if(A.getClip()!==this.clip)return;const g=VI.lastObjRotation[this.root.uuid];if(VI.spaceRotation[this.clip.uuid].copy(g),Fl){const I=new TI().setFromQuaternion(g);console.log("START",this.clip.name,gg.toDegrees(I.y))}}getClipRotationOffset(){return VI.clipOffsetRotation[this.clip.uuid]}handlePosition(A,g){if(g){const I=this.root;Fl&&I.add(new Vn),VI.lastObjPosition[I.uuid]||(VI.lastObjPosition[I.uuid]=new M);const i=new M,e=new M;let C=0;this.positionWrapper=new gF(g,(o,B)=>{const s=this.action.getEffectiveWeight();if(Fl&&I.position.length()>8&&I.position.set(0,I.position.y,0),o>C){i.set(B[0],B[1],B[2]),i.sub(e),i.multiplyScalar(s),i.applyQuaternion(this.getClipRotationOffset());const n=this.clip.uuid;i.applyQuaternion(VI.spaceRotation[n]),this.positionChange.copy(i)}return e.fromArray(B),C=o,B[0]=0,B[1]=0,B[2]=0,B})}}handleRotation(A,g){if(g){if(Fl){const o=g.values,B=new TI().setFromQuaternion(new kA(o[0],o[1],o[2],o[3]));console.log(A.name,g.name,"FIRST ROTATION IN TRACK",gg.toDegrees(B.y));const s=g.values.length-4,n=new kA().set(o[s],o[s+1],o[s+2],o[s+3]),a=new TI().setFromQuaternion(n);console.log(A.name,g.name,"LAST ROTATION IN TRACK",gg.toDegrees(a.y))}const I=this.root;VI.lastObjRotation[I.uuid]||(VI.lastObjRotation[I.uuid]=new kA);let i=0;const e=new kA,C=new kA;this.rotationWrapper=new gF(g,(o,B)=>(o>i&&(C.set(B[0],B[1],B[2],B[3]),e.invert(),C.multiply(e),this.rotationChange.copy(C)),e.fromArray(B),i=o,B[0]=0,B[1]=0,B[2]=0,B[3]=1,B))}}onBeforeUpdate(){this.positionChange.set(0,0,0),this.rotationChange.set(0,0,0,1)}onAfterUpdate(){const A=this.action.getEffectiveWeight();this.positionChange.multiplyScalar(A),this.rotationChange.slerp(VI.identityQuaternion,1-A)}};let Nt=VI;r(Nt,"lastObjPosition",{}),r(Nt,"lastObjRotation",{}),r(Nt,"firstKeyframeRotation",{}),r(Nt,"spaceRotation",{}),r(Nt,"effectiveSpaceRotation",{}),r(Nt,"clipOffsetRotation",{}),r(Nt,"identityQuaternion",new kA);class EO{constructor(A){r(this,"controller");r(this,"handler",[]);r(this,"root");r(this,"summedPosition",new M);r(this,"summedRotation",new kA);this.controller=A}createClip(A,g,I){this.root=g,g&&"name"in g&&g.name;const i=this.findRootTrack(I,".position"),e=this.findRootTrack(I,".quaternion"),C=new Nt(this.controller.context,g,I,i,e);this.handler.push(C);const o=A.clipAction(I);return C.action=o,o}onStart(A){for(const g of this.handler)g.onStart(A)}onBeforeUpdate(){for(const A of this.handler)A.onBeforeUpdate()}onAfterUpdate(){this.summedPosition.set(0,0,0),this.summedRotation.set(0,0,0,1);for(const A of this.handler)A.onAfterUpdate(),this.summedPosition.add(A.positionChange),this.summedRotation.multiply(A.rotationChange);this.root.position.add(this.summedPosition),this.root.quaternion.multiply(this.summedRotation),Nt.lastObjRotation[this.root.uuid].copy(this.root.quaternion)}findRootTrack(A,g){const I=A.tracks;for(const i of I)if(i.name.endsWith(g))return i;return null}}const ml=function(t){return R(t)},R=function(t){if(t===void 0&&(t=null),!Array.isArray(t))t=IF(t);else for(let A=0;A<t.length;A++){const g=t[A];t[A]=IF(g)}return function(A,g){Object.getOwnPropertyDescriptor(A,"$serializedTypes")||(A.$serializedTypes={});const I=A.$serializedTypes=A.$serializedTypes||{};I[g]=t}};function IF(t){var A,g;switch((g=(A=t==null?void 0:t.prototype)==null?void 0:A.constructor)==null?void 0:g.name){case"Number":case"String":case"Boolean":return null}return t}var cO=Object.defineProperty,hO=Object.getOwnPropertyDescriptor,Nl=(t,A,g,I)=>{for(var i=I>1?void 0:I?hO(A,g):A,e=t.length-1,C;e>=0;e--)(C=t[e])&&(i=(I?C(A,g,i):C(i))||i);return I&&i&&cO(A,g,i),i};const iF=wA("debuganimator");class xe extends vA{constructor(){super(...arguments);r(this,"applyRootMotion",!1);r(this,"hasRootMotion",!1);r(this,"keepAnimatorControllerStateOnDisable",!1);r(this,"speed",1);r(this,"normalizedStartOffset",0);r(this,"_animatorController",null)}set runtimeAnimatorController(g){this._animatorController&&this._animatorController.model===g||(g?g instanceof Ms?this._animatorController=g:(iF&&console.log("Assign animator controller",g,this),this._animatorController=new Ms(g)):this._animatorController=null)}get runtimeAnimatorController(){return this._animatorController}Play(g,I=-1,i=Number.NEGATIVE_INFINITY,e=0){var C;(C=this.runtimeAnimatorController)==null||C.Play(g,I,i,e)}Reset(){var g;(g=this._animatorController)==null||g.Reset()}SetBool(g,I){var i;(i=this.runtimeAnimatorController)==null||i.SetBool(g,I)}GetBool(g){var I;return((I=this.runtimeAnimatorController)==null?void 0:I.GetBool(g))??!1}SetFloat(g,I){var i;(i=this.runtimeAnimatorController)==null||i.SetFloat(g,I)}GetFloat(g){var I;return((I=this.runtimeAnimatorController)==null?void 0:I.GetFloat(g))??-1}SetInteger(g,I){var i;(i=this.runtimeAnimatorController)==null||i.SetInteger(g,I)}GetInteger(g){var I;return((I=this.runtimeAnimatorController)==null?void 0:I.GetInteger(g))??-1}SetTrigger(g){var I;(I=this.runtimeAnimatorController)==null||I.SetTrigger(g)}ResetTrigger(g){var I;(I=this.runtimeAnimatorController)==null||I.ResetTrigger(g)}IsInTransition(){var g;return((g=this.runtimeAnimatorController)==null?void 0:g.IsInTransition())??!1}SetSpeed(g){var I;g!==this.speed&&(this.speed=g,(I=this._animatorController)==null||I.SetSpeed(g))}set minMaxSpeed(g){this.speed=gg.lerp(g.x,g.y,Math.random())}set minMaxOffsetNormalized(g){this.normalizedStartOffset=gg.lerp(g.x,g.y,Math.random()),this.runtimeAnimatorController&&(this.runtimeAnimatorController.normalizedStartOffset=this.normalizedStartOffset)}awake(){if(iF&&console.log("ANIMATOR",this.name,this),!!this.gameObject&&this.runtimeAnimatorController){const g=this.runtimeAnimatorController.clone();g?(console.assert(this.runtimeAnimatorController!==g),this.runtimeAnimatorController=g,console.assert(this.runtimeAnimatorController===g),this.runtimeAnimatorController.bind(this),this.runtimeAnimatorController.SetSpeed(this.speed),this.runtimeAnimatorController.normalizedStartOffset=this.normalizedStartOffset):console.warn("Could not clone animator controller",this.runtimeAnimatorController)}}onDisable(){var g;this.keepAnimatorControllerStateOnDisable||(g=this._animatorController)==null||g.Reset()}onBeforeRender(){this._animatorController&&this._animatorController.update()}}Nl([R()],xe.prototype,"applyRootMotion",2),Nl([R()],xe.prototype,"hasRootMotion",2),Nl([R()],xe.prototype,"keepAnimatorControllerStateOnDisable",2),Nl([R()],xe.prototype,"runtimeAnimatorController",1);var lO=Object.defineProperty,DO=Object.getOwnPropertyDescriptor,Nr=(t,A,g,I)=>{for(var i=I>1?void 0:I?DO(A,g):A,e=t.length-1,C;e>=0;e--)(C=t[e])&&(i=(I?C(A,g,i):C(i))||i);return I&&i&&lO(A,g,i),i};const CB=wA("debuganimation");class Kt extends vA{constructor(){super(...arguments);r(this,"playAutomatically",!0);r(this,"randomStartTime",!0);r(this,"minMaxSpeed");r(this,"minMaxOffsetNormalized");r(this,"loop",!0);r(this,"clampWhenFinished",!1);r(this,"_tempAnimationClipBeforeGameObjectExisted",null);r(this,"mixer");r(this,"_actions",[]);r(this,"_currentActions",[]);r(this,"_handles",[]);r(this,"_didInit",!1)}get clip(){var g;return(g=this.animations)!=null&&g.length?this.animations[0]:null}set clip(g){if(!this.__didAwake){CB&&console.log("Assign clip during serialization",g),this._tempAnimationClipBeforeGameObjectExisted=g;return}g&&(CB&&console.log("Assign clip",g,Boolean(this.gameObject)),this.gameObject.animations||(this.gameObject.animations=[]),!this.animations.includes(g)&&(this.animations.length>0?this.animations.splice(0,0,g):this.animations.push(g)))}set clips(g){this.animations=g}set animations(g){CB&&console.log("assign animations",g),this.gameObject.animations=g}get animations(){return this.gameObject.animations}get currentAction(){return this._currentActions[0]}get currentActions(){return this._currentActions}get actions(){return this._actions}set actions(g){this._actions=g}awake(){CB&&console.log(this),this._tempAnimationClipBeforeGameObjectExisted&&(this.clip=this._tempAnimationClipBeforeGameObjectExisted,this._tempAnimationClipBeforeGameObjectExisted=null),this.playAutomatically&&this.init()}onEnable(){var g;if(this.playAutomatically&&((g=this.animations)==null?void 0:g.length)>0&&this.currentActions.length<=0){const I=Math.floor(Math.random()*this.actions.length);this.play(I)}}start(){this.randomStartTime&&this.currentAction&&(this.currentAction.time=Math.random()*this.currentAction.getClip().duration)}update(){this.mixer&&this.mixer.update(this.context.time.deltaTime)}getAction(g){var I;return(I=this.actions)==null?void 0:I.find(i=>i.getClip().name===g)}get isPlaying(){for(let g=0;g<this._currentActions.length;g++)if(this._currentActions[g].isRunning())return!0;return!1}play(g,I){if(CB&&console.log("PLAY",g),this.init(),!this.mixer){CB&&console.warn("Missing mixer",this);return}g===void 0&&(g=0);let i=g;if(typeof g=="number"){if(g>=this.animations.length){CB&&console.log("No animation at index",g);return}i=this.animations[g]}else typeof g=="string"&&(i=this.animations.find(C=>C.name===g));if(!i){console.error("Could not find clip",g);return}I||(I={}),I.minMaxOffsetNormalized||(I.minMaxOffsetNormalized=this.minMaxOffsetNormalized),I.minMaxSpeed||(I.minMaxSpeed=this.minMaxSpeed),I.loop||(I.loop=this.loop),I.clampWhenFinished||(I.clampWhenFinished=this.clampWhenFinished);for(const C of this.actions)if(C.getClip()===i)return this.internalOnPlay(C,I);const e=this.mixer.clipAction(i);return this.actions.push(e),this.internalOnPlay(e,I)}internalOnPlay(g,I){var i=this.currentAction;if(i===g&&i.isRunning()&&i.time<i.getClip().duration){const B=this.tryFindHandle(g);if(B)return B.getPromise()}const e=(I==null?void 0:I.exclusive)??!0;I!=null&&I.fadeDuration?(e&&(i==null||i.fadeOut(I.fadeDuration)),g.fadeIn(I.fadeDuration)):e&&(i==null||i.stop()),g.reset(),g.enabled=!0,g.time=0,g.timeScale=1;const C=g.getClip();I!=null&&I.minMaxOffsetNormalized&&(g.time=gg.lerp(I.minMaxOffsetNormalized.x,I.minMaxOffsetNormalized.y,Math.random())*C.duration),I!=null&&I.minMaxSpeed&&(g.timeScale=gg.lerp(I.minMaxSpeed.x,I.minMaxSpeed.y,Math.random())),I!=null&&I.clampWhenFinished&&(g.clampWhenFinished=!0),(I==null?void 0:I.startTime)!==void 0&&(g.time=I.startTime),(I==null?void 0:I.loop)!==void 0?g.loop=I.loop?bw:la:g.loop=la,g.play(),CB&&console.log("PLAY",g.getClip().name,g);const o=new dO(g,this.mixer,I,B=>{this._handles.splice(this._handles.indexOf(o),1)});return this._handles.push(o),o.getPromise()}tryFindHandle(g){for(const I of this._handles)if(I.action===g)return I}init(){this._didInit||(this._didInit=!0,this.gameObject&&(this.actions=[],this.mixer=new Gh(this.gameObject)))}}Nr([R()],Kt.prototype,"playAutomatically",2),Nr([R()],Kt.prototype,"randomStartTime",2),Nr([R()],Kt.prototype,"loop",2),Nr([R()],Kt.prototype,"clampWhenFinished",2),Nr([R(Mt)],Kt.prototype,"clips",1);class dO{constructor(A,g,I,i){r(this,"mixer");r(this,"action");r(this,"promise",null);r(this,"resolve",null);r(this,"reject",null);r(this,"_options");r(this,"_resolveCallback",null);r(this,"_rejectCallback",null);r(this,"_loopCallback");r(this,"_finishedCallback");r(this,"_resolvedOrRejectedCallback");this.action=A,this.mixer=g,this._resolvedOrRejectedCallback=i,this._options=I}getPromise(){return this.promise?this.promise:(this.promise=new Promise((A,g)=>{this._resolveCallback=A,this._rejectCallback=g,this.resolve=this.onResolve.bind(this),this.reject=this.onReject.bind(this)}),this._loopCallback=this.onLoop.bind(this),this._finishedCallback=this.onFinished.bind(this),this.mixer.addEventListener("loop",this._loopCallback),this.mixer.addEventListener("finished",this._finishedCallback),this.promise)}_update(){this._options&&this._options.endTime!==void 0&&this.action.time>this._options.endTime&&(this._options.loop===!0?this.action.time=this._options.startTime??0:(this.action.time=this._options.endTime,this.action.timeScale=0,this.onResolve()))}onResolve(){var A,g;this.dispose(),(A=this._resolvedOrRejectedCallback)==null||A.call(this,this),(g=this._resolveCallback)==null||g.call(this,this.action)}onReject(A){var g,I;this.dispose(),(g=this._resolvedOrRejectedCallback)==null||g.call(this,this),(I=this._rejectCallback)==null||I.call(this,A)}onLoop(A){}onFinished(A){A.action===this.action&&this.onResolve()}dispose(){this._loopCallback&&this.mixer.removeEventListener("loop",this._loopCallback),this._finishedCallback&&this.mixer.removeEventListener("finished",this._finishedCallback),this._loopCallback=void 0,this._finishedCallback=void 0}}class QQ extends Yi{constructor(A){super(A),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.animationPointerResolver=null,this.pluginCallbacks=[],this.register(function(g){return new SO(g)}),this.register(function(g){return new mO(g)}),this.register(function(g){return new NO(g)}),this.register(function(g){return new kO(g)}),this.register(function(g){return new MO(g)}),this.register(function(g){return new UO(g)}),this.register(function(g){return new RO(g)}),this.register(function(g){return new yO(g)}),this.register(function(g){return new FO(g)}),this.register(function(g){return new GO(g)}),this.register(function(g){return new uO(g)}),this.register(function(g){return new KO(g)}),this.register(function(g){return new JO(g)}),this.register(function(g){return new fO(g)})}load(A,g,I,i){const e=this;let C;this.resourcePath!==""?C=this.resourcePath:this.path!==""?C=this.path:C=gC.extractUrlBase(A),this.manager.itemStart(A);const o=function(s){i?i(s):console.error(s),e.manager.itemError(A),e.manager.itemEnd(A)},B=new ii(this.manager);B.setPath(this.path),B.setResponseType("arraybuffer"),B.setRequestHeader(this.requestHeader),B.setWithCredentials(this.withCredentials),B.load(A,function(s){try{e.parse(s,C,function(n){g(n),e.manager.itemEnd(A)},o)}catch(n){o(n)}},I,o)}setDRACOLoader(A){return this.dracoLoader=A,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(A){return this.ktx2Loader=A,this}setMeshoptDecoder(A){return this.meshoptDecoder=A,this}setAnimationPointerResolver(A){return this.animationPointerResolver=A,this}register(A){return this.pluginCallbacks.indexOf(A)===-1&&this.pluginCallbacks.push(A),this}unregister(A){return this.pluginCallbacks.indexOf(A)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(A),1),this}parse(A,g,I,i){let e;const C={},o={};if(typeof A=="string")e=JSON.parse(A);else if(A instanceof ArrayBuffer)if(gC.decodeText(new Uint8Array(A,0,4))===eF){try{C[Rg.KHR_BINARY_GLTF]=new qO(A)}catch(n){i&&i(n);return}e=JSON.parse(C[Rg.KHR_BINARY_GLTF].content)}else e=JSON.parse(gC.decodeText(new Uint8Array(A)));else e=A;if(e.asset===void 0||e.asset.version[0]<2){i&&i(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const B=new WO(e,{path:g||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder,animationPointerResolver:this.animationPointerResolver});B.fileLoader.setRequestHeader(this.requestHeader);for(let s=0;s<this.pluginCallbacks.length;s++){const n=this.pluginCallbacks[s](B);o[n.name]=n,C[n.name]=!0}if(e.extensionsUsed)for(let s=0;s<e.extensionsUsed.length;++s){const n=e.extensionsUsed[s],a=e.extensionsRequired||[];switch(n){case Rg.KHR_MATERIALS_UNLIT:C[n]=new pO;break;case Rg.KHR_DRACO_MESH_COMPRESSION:C[n]=new LO(e,this.dracoLoader);break;case Rg.KHR_TEXTURE_TRANSFORM:C[n]=new bO;break;case Rg.KHR_MESH_QUANTIZATION:C[n]=new YO;break;default:a.indexOf(n)>=0&&o[n]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+n+'".')}}B.setExtensions(C),B.setPlugins(o),B.parse(I,i)}parseAsync(A,g){const I=this;return new Promise(function(i,e){I.parse(A,g,i,e)})}}function wO(){let t={};return{get:function(A){return t[A]},add:function(A,g){t[A]=g},remove:function(A){delete t[A]},removeAll:function(){t={}}}}const Rg={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",KHR_ANIMATION_POINTER:"KHR_animation_pointer",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class uO{constructor(A){this.parser=A,this.name=Rg.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const A=this.parser,g=this.parser.json.nodes||[];for(let I=0,i=g.length;I<i;I++){const e=g[I];e.extensions&&e.extensions[this.name]&&e.extensions[this.name].light!==void 0&&A._addNodeRef(this.cache,e.extensions[this.name].light)}}_loadLight(A){const g=this.parser,I="light:"+A;let i=g.cache.get(I);if(i)return i;const e=g.json,B=((e.extensions&&e.extensions[this.name]||{}).lights||[])[A];let s;const n=new T(16777215);B.color!==void 0&&n.fromArray(B.color);const a=B.range!==void 0?B.range:0;switch(B.type){case"directional":s=new wh(n),s.target.position.set(0,0,-1),s.add(s.target);break;case"point":s=new dh(n),s.distance=a;break;case"spot":s=new Dh(n),s.distance=a,B.spot=B.spot||{},B.spot.innerConeAngle=B.spot.innerConeAngle!==void 0?B.spot.innerConeAngle:0,B.spot.outerConeAngle=B.spot.outerConeAngle!==void 0?B.spot.outerConeAngle:Math.PI/4,s.angle=B.spot.outerConeAngle,s.penumbra=1-B.spot.innerConeAngle/B.spot.outerConeAngle,s.target.position.set(0,0,-1),s.add(s.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+B.type)}return s.position.set(0,0,0),s.decay=2,BB(s,B),B.intensity!==void 0&&(s.intensity=B.intensity),s.name=g.createUniqueName(B.name||"light_"+A),i=Promise.resolve(s),g.cache.add(I,i),i}getDependency(A,g){if(A==="light")return this._loadLight(g)}createNodeAttachment(A){const g=this,I=this.parser,e=I.json.nodes[A],o=(e.extensions&&e.extensions[this.name]||{}).light;return o===void 0?null:this._loadLight(o).then(function(B){return I._getNodeRef(g.cache,o,B)})}}let pO=class{constructor(){this.name=Rg.KHR_MATERIALS_UNLIT}getMaterialType(){return tI}extendParams(A,g,I){const i=[];A.color=new T(1,1,1),A.opacity=1;const e=g.pbrMetallicRoughness;if(e){if(Array.isArray(e.baseColorFactor)){const C=e.baseColorFactor;A.color.fromArray(C),A.opacity=C[3]}e.baseColorTexture!==void 0&&i.push(I.assignTexture(A,"map",e.baseColorTexture,Dg))}return Promise.all(i)}};class yO{constructor(A){this.parser=A,this.name=Rg.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(A,g){const i=this.parser.json.materials[A];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const e=i.extensions[this.name].emissiveStrength;return e!==void 0&&(g.emissiveIntensity=e),Promise.resolve()}}let SO=class{constructor(A){this.parser=A,this.name=Rg.KHR_MATERIALS_CLEARCOAT}getMaterialType(A){const I=this.parser.json.materials[A];return!I.extensions||!I.extensions[this.name]?null:VC}extendMaterialParams(A,g){const I=this.parser,i=I.json.materials[A];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const e=[],C=i.extensions[this.name];if(C.clearcoatFactor!==void 0&&(g.clearcoat=C.clearcoatFactor),C.clearcoatTexture!==void 0&&e.push(I.assignTexture(g,"clearcoatMap",C.clearcoatTexture)),C.clearcoatRoughnessFactor!==void 0&&(g.clearcoatRoughness=C.clearcoatRoughnessFactor),C.clearcoatRoughnessTexture!==void 0&&e.push(I.assignTexture(g,"clearcoatRoughnessMap",C.clearcoatRoughnessTexture)),C.clearcoatNormalTexture!==void 0&&(e.push(I.assignTexture(g,"clearcoatNormalMap",C.clearcoatNormalTexture)),C.clearcoatNormalTexture.scale!==void 0)){const o=C.clearcoatNormalTexture.scale;g.clearcoatNormalScale=new QA(o,o)}return Promise.all(e)}};class fO{constructor(A){r(this,"ANIMATION_TARGET_TYPE",{node:"node",material:"material",camera:"camera",light:"light"});r(this,"_animationPointerDebug",!1);r(this,"_havePatchedPropertyBindings",!1);this.parser=A,this.name=Rg.KHR_ANIMATION_POINTER}_patchPropertyBindingFindNode(){if(this._havePatchedPropertyBindings)return;this._havePatchedPropertyBindings=!0;const A=Ug.findNode;Ug.findNode=(g,I)=>{if(I.startsWith(".materials.")){this._animationPointerDebug&&console.log("FIND",I);const i=I.substring(11).substring(I.indexOf(".")),e=i.indexOf("."),C=e<0?i:i.substring(0,e);let o=null;return g.traverse(B=>{var s,n;o!==null||B.type!=="Mesh"||(((s=B.material)==null?void 0:s.uuid)===C||((n=B.material)==null?void 0:n.name)===C)&&(o=B.material,this._animationPointerDebug&&console.log(o,i),o!==null&&(i.endsWith(".map")?o=o.map:i.endsWith(".emissiveMap")&&(o=o.emissiveMap)))}),o}else if(I.startsWith(".nodes.")||I.startsWith(".lights.")||I.startsWith(".cameras.")){const i=I.split(".");let e;for(let C=1;C<i.length;C++){const o=i[C];if(o.length==36)e=g.getObjectByProperty("uuid",o);else if(e&&e[o]){const s=Number.parseInt(o);let n=o;s>=0&&(n=s),e=e[n],this._animationPointerDebug&&console.log(e)}else{const s=g.getObjectByName(o);s&&(e=s)}}if(!e){const C=A(g,i[2]);return C||console.warn(Rg.KHR_ANIMATION_POINTER+": Property binding not found",I,g,g.name,i),C}return this._animationPointerDebug&&console.log("NODE",I,e),e}return A(g,I)}}loadAnimationTargetFromChannel(A){this._havePatchedPropertyBindings||this._patchPropertyBindingFindNode();const g=A.target,I=g.extensions&&g.extensions[Rg.KHR_ANIMATION_POINTER]&&g.path&&g.path==="pointer";if(!I)return null;let i,e=this.ANIMATION_TARGET_TYPE.node,C;if(I){const B=g.extensions[Rg.KHR_ANIMATION_POINTER];let s=B.pointer;if(this._animationPointerDebug&&console.log("Original path: "+s,g),!s){console.warn("Invalid path",B,g);return}if(s.startsWith("/materials/")?e=this.ANIMATION_TARGET_TYPE.material:s.startsWith("/extensions/KHR_lights_punctual/lights/")?e=this.ANIMATION_TARGET_TYPE.light:s.startsWith("/cameras/")&&(e=this.ANIMATION_TARGET_TYPE.camera),C=this._tryResolveTargetId(s,e),C===null||isNaN(C)){console.warn("Failed resolving animation node id: "+C,s);return}else this._animationPointerDebug&&console.log("Resolved node ID for "+e,C);switch(e){case this.ANIMATION_TARGET_TYPE.material:const a=("/materials/"+C.toString()+"/").length,Q=s.substring(0,a);switch(i=s.substring(a),i){case"pbrMetallicRoughness/baseColorFactor":i="color";break;case"pbrMetallicRoughness/roughnessFactor":i="roughness";break;case"pbrMetallicRoughness/metallicFactor":i="metalness";break;case"emissiveFactor":i="emissive";break;case"alphaCutoff":i="alphaTest";break;case"occlusionTexture/strength":i="aoMapIntensity";break;case"normalTexture/scale":i="normalScale";break;case"pbrMetallicRoughness/baseColorTexture/extensions/KHR_texture_transform/scale":i="map/repeat";break;case"pbrMetallicRoughness/baseColorTexture/extensions/KHR_texture_transform/offset":i="map/offset";break;case"emissiveTexture/extensions/KHR_texture_transform/scale":i="emissiveMap/repeat";break;case"emissiveTexture/extensions/KHR_texture_transform/offset":i="emissiveMap/offset";break;case"extensions/KHR_materials_emissive_strength/emissiveStrength":i="emissiveIntensity";break;case"extensions/KHR_materials_transmission/transmissionFactor":i="transmission";break;case"extensions/KHR_materials_ior/ior":i="ior";break;case"extensions/KHR_materials_volume/thicknessFactor":i="thickness";break;case"extensions/KHR_materials_volume/attenuationColor":i="attenuationColor";break;case"extensions/KHR_materials_volume/attenuationDistance":i="attenuationDistance";break;case"extensions/KHR_materials_iridescence/iridescenceFactor":i="iridescence";break;case"extensions/KHR_materials_iridescence/iridescenceIor":i="iridescenceIOR";break;case"extensions/KHR_materials_iridescence/iridescenceThicknessMinimum":i="iridescenceThicknessRange[0]";break;case"extensions/KHR_materials_iridescence/iridescenceThicknessMaximum":i="iridescenceThicknessRange[1]";break;case"extensions/KHR_materials_clearcoat/clearcoatFactor":i="clearcoat";break;case"extensions/KHR_materials_clearcoat/clearcoatRoughnessFactor":i="clearcoatRoughness";break;case"extensions/KHR_materials_sheen/sheenColorFactor":i="sheenColor";break;case"extensions/KHR_materials_sheen/sheenRoughnessFactor":i="sheenRoughness";break;case"extensions/KHR_materials_specular/specularFactor":i="specularIntensity";break;case"extensions/KHR_materials_specular/specularColorFactor":i="specularColor";break}s=Q+i,this._animationPointerDebug&&console.log("PROPERTY PATH",Q,i,s);break;case this.ANIMATION_TARGET_TYPE.node:const E=("/nodes/"+C.toString()+"/").length,c=s.substring(0,E);switch(i=s.substring(E),i){case"translation":i="position";break;case"rotation":i="quaternion";break;case"scale":i="scale";break;case"weights":i="morphTargetInfluences";break}s=c+i;break;case this.ANIMATION_TARGET_TYPE.light:const h=("/extensions/KHR_lights_punctual/lights/"+C.toString()+"/").length;switch(i=s.substring(h),i){case"color":break;case"intensity":break;case"spot/innerConeAngle":i="penumbra";break;case"spot/outerConeAngle":i="angle";break;case"range":i="distance";break}s="/lights/"+C.toString()+"/"+i;break;case this.ANIMATION_TARGET_TYPE.camera:const l=("/cameras/"+C.toString()+"/").length,w=s.substring(0,l);switch(i=s.substring(l),i){case"perspective/yfov":i="fov";break;case"perspective/znear":case"orthographic/znear":i="near";break;case"perspective/zfar":case"orthographic/zfar":i="far";break;case"perspective/aspect":i="aspect";break;case"orthographic/xmag":i="zoom";break;case"orthographic/ymag":i="zoom";break}s=w+i;break}const n=this.parser.options.animationPointerResolver;n&&n.resolvePath&&(s=n.resolvePath(s)),g.extensions[Rg.KHR_ANIMATION_POINTER].pointer=s}if(C===null||isNaN(C)){console.warn("Failed resolving animation node id: "+C,g);return}let o;return e===this.ANIMATION_TARGET_TYPE.node?o=this.parser.getDependency("node",C):e===this.ANIMATION_TARGET_TYPE.material?o=this.parser.getDependency("material",C):e===this.ANIMATION_TARGET_TYPE.light?o=this.parser.getDependency("light",C):e===this.ANIMATION_TARGET_TYPE.camera?o=this.parser.getDependency("camera",C):console.error("Unhandled type",e),o}createAnimationTracks(A,g,I,i,e){if(!(e.extensions&&e.extensions[Rg.KHR_ANIMATION_POINTER]&&e.path&&e.path==="pointer"))return null;let o=e.extensions[Rg.KHR_ANIMATION_POINTER].pointer;if(!o)return null;const B=[];o=o.replaceAll("/",".");const s=o.split(".");s[2]=A.name??A.uuid,o=s.join("."),this._animationPointerDebug&&console.log(A,g,I,e,o);let n;switch(I.itemSize){case 1:n=Oo;break;case 2:case 3:n=_o;break;case 4:o.endsWith(".quaternion")?n=AC:n=Ar;break}const a=i.interpolation!==void 0?sF[i.interpolation]:xC;let Q=QF(I);o.endsWith(".fov")&&(Q=Q.map(c=>c/Math.PI*180));const E=new n(o,g.array,Q,a);if(a==="CUBICSPLINE"&&Hy(E),B.push(E),o&&I.itemSize===4&&o.startsWith(".materials.")&&o.endsWith(".color")){const c=new Float32Array(Q.length/4);for(let l=0,w=Q.length/4;l<w;l+=1)c[l]=Q[l*4+3];const h=new n(o.replace(".color",".opacity"),g.array,c,a);a==="CUBICSPLINE"&&Hy(E),B.push(h)}return B}_tryResolveTargetId(A,g){let I="";return g==="node"?I=A.substring(7):g==="material"?I=A.substring(11):g==="light"?I=A.substring(39):g==="camera"&&(I=A.substring(9)),I=I.substring(0,I.indexOf("/")),Number.parseInt(I)}}let GO=class{constructor(A){this.parser=A,this.name=Rg.KHR_MATERIALS_IRIDESCENCE}getMaterialType(A){const I=this.parser.json.materials[A];return!I.extensions||!I.extensions[this.name]?null:VC}extendMaterialParams(A,g){const I=this.parser,i=I.json.materials[A];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const e=[],C=i.extensions[this.name];return C.iridescenceFactor!==void 0&&(g.iridescence=C.iridescenceFactor),C.iridescenceTexture!==void 0&&e.push(I.assignTexture(g,"iridescenceMap",C.iridescenceTexture)),C.iridescenceIor!==void 0&&(g.iridescenceIOR=C.iridescenceIor),g.iridescenceThicknessRange===void 0&&(g.iridescenceThicknessRange=[100,400]),C.iridescenceThicknessMinimum!==void 0&&(g.iridescenceThicknessRange[0]=C.iridescenceThicknessMinimum),C.iridescenceThicknessMaximum!==void 0&&(g.iridescenceThicknessRange[1]=C.iridescenceThicknessMaximum),C.iridescenceThicknessTexture!==void 0&&e.push(I.assignTexture(g,"iridescenceThicknessMap",C.iridescenceThicknessTexture)),Promise.all(e)}};class kO{constructor(A){this.parser=A,this.name=Rg.KHR_MATERIALS_SHEEN}getMaterialType(A){const I=this.parser.json.materials[A];return!I.extensions||!I.extensions[this.name]?null:VC}extendMaterialParams(A,g){const I=this.parser,i=I.json.materials[A];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const e=[];g.sheenColor=new T(0,0,0),g.sheenRoughness=0,g.sheen=1;const C=i.extensions[this.name];return C.sheenColorFactor!==void 0&&g.sheenColor.fromArray(C.sheenColorFactor),C.sheenRoughnessFactor!==void 0&&(g.sheenRoughness=C.sheenRoughnessFactor),C.sheenColorTexture!==void 0&&e.push(I.assignTexture(g,"sheenColorMap",C.sheenColorTexture,Dg)),C.sheenRoughnessTexture!==void 0&&e.push(I.assignTexture(g,"sheenRoughnessMap",C.sheenRoughnessTexture)),Promise.all(e)}}let MO=class{constructor(A){this.parser=A,this.name=Rg.KHR_MATERIALS_TRANSMISSION}getMaterialType(A){const I=this.parser.json.materials[A];return!I.extensions||!I.extensions[this.name]?null:VC}extendMaterialParams(A,g){const I=this.parser,i=I.json.materials[A];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const e=[],C=i.extensions[this.name];return C.transmissionFactor!==void 0&&(g.transmission=C.transmissionFactor),C.transmissionTexture!==void 0&&e.push(I.assignTexture(g,"transmissionMap",C.transmissionTexture)),Promise.all(e)}},UO=class{constructor(A){this.parser=A,this.name=Rg.KHR_MATERIALS_VOLUME}getMaterialType(A){const I=this.parser.json.materials[A];return!I.extensions||!I.extensions[this.name]?null:VC}extendMaterialParams(A,g){const I=this.parser,i=I.json.materials[A];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const e=[],C=i.extensions[this.name];g.thickness=C.thicknessFactor!==void 0?C.thicknessFactor:0,C.thicknessTexture!==void 0&&e.push(I.assignTexture(g,"thicknessMap",C.thicknessTexture)),g.attenuationDistance=C.attenuationDistance||1/0;const o=C.attenuationColor||[1,1,1];return g.attenuationColor=new T(o[0],o[1],o[2]),Promise.all(e)}};class RO{constructor(A){this.parser=A,this.name=Rg.KHR_MATERIALS_IOR}getMaterialType(A){const I=this.parser.json.materials[A];return!I.extensions||!I.extensions[this.name]?null:VC}extendMaterialParams(A,g){const i=this.parser.json.materials[A];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const e=i.extensions[this.name];return g.ior=e.ior!==void 0?e.ior:1.5,Promise.resolve()}}class FO{constructor(A){this.parser=A,this.name=Rg.KHR_MATERIALS_SPECULAR}getMaterialType(A){const I=this.parser.json.materials[A];return!I.extensions||!I.extensions[this.name]?null:VC}extendMaterialParams(A,g){const I=this.parser,i=I.json.materials[A];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const e=[],C=i.extensions[this.name];g.specularIntensity=C.specularFactor!==void 0?C.specularFactor:1,C.specularTexture!==void 0&&e.push(I.assignTexture(g,"specularIntensityMap",C.specularTexture));const o=C.specularColorFactor||[1,1,1];return g.specularColor=new T(o[0],o[1],o[2]),C.specularColorTexture!==void 0&&e.push(I.assignTexture(g,"specularColorMap",C.specularColorTexture,Dg)),Promise.all(e)}}class mO{constructor(A){this.parser=A,this.name=Rg.KHR_TEXTURE_BASISU}loadTexture(A){const g=this.parser,I=g.json,i=I.textures[A];if(!i.extensions||!i.extensions[this.name])return null;const e=i.extensions[this.name],C=g.options.ktx2Loader;if(!C){if(I.extensionsRequired&&I.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return g.loadTextureImage(A,e.source,C)}}class NO{constructor(A){this.parser=A,this.name=Rg.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(A){const g=this.name,I=this.parser,i=I.json,e=i.textures[A];if(!e.extensions||!e.extensions[g])return null;const C=e.extensions[g],o=i.images[C.source];let B=I.textureLoader;if(o.uri){const s=I.options.manager.getHandler(o.uri);s!==null&&(B=s)}return this.detectSupport().then(function(s){if(s)return I.loadTextureImage(A,C.source,B);if(i.extensionsRequired&&i.extensionsRequired.indexOf(g)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return I.loadTexture(A)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(A){const g=new Image;g.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",g.onload=g.onerror=function(){A(g.height===1)}})),this.isSupported}}class KO{constructor(A){this.name=Rg.EXT_MESHOPT_COMPRESSION,this.parser=A}loadBufferView(A){const g=this.parser.json,I=g.bufferViews[A];if(I.extensions&&I.extensions[this.name]){const i=I.extensions[this.name],e=this.parser.getDependency("buffer",i.buffer),C=this.parser.options.meshoptDecoder;if(!C||!C.supported){if(g.extensionsRequired&&g.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return e.then(function(o){const B=i.byteOffset||0,s=i.byteLength||0,n=i.count,a=i.byteStride,Q=new Uint8Array(o,B,s);return C.decodeGltfBufferAsync?C.decodeGltfBufferAsync(n,a,Q,i.mode,i.filter).then(function(E){return E.buffer}):C.ready.then(function(){const E=new ArrayBuffer(n*a);return C.decodeGltfBuffer(new Uint8Array(E),n,a,Q,i.mode,i.filter),E})})}else return null}}class JO{constructor(A){this.name=Rg.EXT_MESH_GPU_INSTANCING,this.parser=A}createNodeMesh(A){const g=this.parser.json,I=g.nodes[A];if(!I.extensions||!I.extensions[this.name]||I.mesh===void 0)return null;const i=g.meshes[I.mesh];for(const s of i.primitives)if(s.mode!==et.TRIANGLES&&s.mode!==et.TRIANGLE_STRIP&&s.mode!==et.TRIANGLE_FAN&&s.mode!==void 0)return null;const C=I.extensions[this.name].attributes,o=[],B={};for(const s in C)o.push(this.parser.getDependency("accessor",C[s]).then(n=>(B[s]=n,B[s])));return o.length<1?null:(o.push(this.parser.createNodeMesh(A)),Promise.all(o).then(s=>{const n=s.pop(),a=n.isGroup?n.children:[n],Q=s[0].count,E=[];for(const c of a){const h=new $A,l=new M,w=new kA,p=new M(1,1,1),D=new eh(c.geometry,c.material,Q);for(let d=0;d<Q;d++)B.TRANSLATION&&l.fromBufferAttribute(B.TRANSLATION,d),B.ROTATION&&w.fromBufferAttribute(B.ROTATION,d),B.SCALE&&p.fromBufferAttribute(B.SCALE,d),D.setMatrixAt(d,h.compose(l,w,p));for(const d in B)d!=="TRANSLATION"&&d!=="ROTATION"&&d!=="SCALE"&&c.geometry.setAttribute(d,B[d]);LA.prototype.copy.call(D,c),D.frustumCulled=!1,this.parser.assignFinalMaterial(D),E.push(D)}return n.isGroup?(n.clear(),n.add(...E),n):E[0]}))}}const eF="glTF",Kr=12,tF={JSON:1313821514,BIN:5130562};class qO{constructor(A){this.name=Rg.KHR_BINARY_GLTF,this.content=null,this.body=null;const g=new DataView(A,0,Kr);if(this.header={magic:gC.decodeText(new Uint8Array(A.slice(0,4))),version:g.getUint32(4,!0),length:g.getUint32(8,!0)},this.header.magic!==eF)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const I=this.header.length-Kr,i=new DataView(A,Kr);let e=0;for(;e<I;){const C=i.getUint32(e,!0);e+=4;const o=i.getUint32(e,!0);if(e+=4,o===tF.JSON){const B=new Uint8Array(A,Kr+e,C);this.content=gC.decodeText(B)}else if(o===tF.BIN){const B=Kr+e;this.body=A.slice(B,B+C)}e+=C}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class LO{constructor(A,g){if(!g)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=Rg.KHR_DRACO_MESH_COMPRESSION,this.json=A,this.dracoLoader=g,this.dracoLoader.preload()}decodePrimitive(A,g){const I=this.json,i=this.dracoLoader,e=A.extensions[this.name].bufferView,C=A.extensions[this.name].attributes,o={},B={},s={};for(const n in C){const a=by[n]||n.toLowerCase();o[a]=C[n]}for(const n in A.attributes){const a=by[n]||n.toLowerCase();if(C[n]!==void 0){const Q=I.accessors[A.attributes[n]],E=aQ[Q.componentType];s[a]=E.name,B[a]=Q.normalized===!0}}return g.getDependency("bufferView",e).then(function(n){return new Promise(function(a){i.decodeDracoFile(n,function(Q){for(const E in Q.attributes){const c=Q.attributes[E],h=B[E];h!==void 0&&(c.normalized=h)}a(Q)},o,s)})})}}class bO{constructor(){this.name=Rg.KHR_TEXTURE_TRANSFORM}extendTexture(A,g){return g.texCoord!==void 0&&console.warn('THREE.GLTFLoader: Custom UV sets in "'+this.name+'" extension not yet supported.'),g.offset===void 0&&g.rotation===void 0&&g.scale===void 0||(A=A.clone(),g.offset!==void 0&&A.offset.fromArray(g.offset),g.rotation!==void 0&&(A.rotation=g.rotation),g.scale!==void 0&&A.repeat.fromArray(g.scale),A.needsUpdate=!0),A}}class YO{constructor(){this.name=Rg.KHR_MESH_QUANTIZATION}}class CF extends Pn{constructor(A,g,I,i){super(A,g,I,i)}copySampleValue_(A){const g=this.resultBuffer,I=this.sampleValues,i=this.valueSize,e=A*i*3+i;for(let C=0;C!==i;C++)g[C]=I[e+C];return g}interpolate_(A,g,I,i){const e=this.resultBuffer,C=this.sampleValues,o=this.valueSize,B=o*2,s=o*3,n=i-g,a=(I-g)/n,Q=a*a,E=Q*a,c=A*s,h=c-s,l=-2*E+3*Q,w=E-Q,p=1-l,D=w-Q+a;for(let d=0;d!==o;d++){const u=C[h+d+o],y=C[h+d+B]*n,f=C[c+d+o],S=C[c+d]*n;e[d]=p*u+D*y+l*f+w*S}return e}}const xO=new kA;class HO extends CF{interpolate_(A,g,I,i){const e=super.interpolate_(A,g,I,i);return xO.fromArray(e).normalize().toArray(e),e}}const et={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},aQ={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},oF={9728:eI,9729:Tg,9984:cn,9985:Ea,9986:hn,9987:dt},BF={33071:si,33648:YC,10497:Dt},Ly={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},by={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},oB={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},sF={CUBICSPLINE:void 0,LINEAR:xC,STEP:_B},Yy={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function vO(t){return t.DefaultMaterial===void 0&&(t.DefaultMaterial=new $a({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:Se})),t.DefaultMaterial}function Jr(t,A,g){for(const I in g.extensions)t[I]===void 0&&(A.userData.gltfExtensions=A.userData.gltfExtensions||{},A.userData.gltfExtensions[I]=g.extensions[I])}function BB(t,A){A.extras!==void 0&&(typeof A.extras=="object"?Object.assign(t.userData,A.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+A.extras))}function TO(t,A,g){let I=!1,i=!1,e=!1;for(let s=0,n=A.length;s<n;s++){const a=A[s];if(a.POSITION!==void 0&&(I=!0),a.NORMAL!==void 0&&(i=!0),a.COLOR_0!==void 0&&(e=!0),I&&i&&e)break}if(!I&&!i&&!e)return Promise.resolve(t);const C=[],o=[],B=[];for(let s=0,n=A.length;s<n;s++){const a=A[s];if(I){const Q=a.POSITION!==void 0?g.getDependency("accessor",a.POSITION):t.attributes.position;C.push(Q)}if(i){const Q=a.NORMAL!==void 0?g.getDependency("accessor",a.NORMAL):t.attributes.normal;o.push(Q)}if(e){const Q=a.COLOR_0!==void 0?g.getDependency("accessor",a.COLOR_0):t.attributes.color;B.push(Q)}}return Promise.all([Promise.all(C),Promise.all(o),Promise.all(B)]).then(function(s){const n=s[0],a=s[1],Q=s[2];return I&&(t.morphAttributes.position=n),i&&(t.morphAttributes.normal=a),e&&(t.morphAttributes.color=Q),t.morphTargetsRelative=!0,t})}function OO(t,A){if(t.updateMorphTargets(),A.weights!==void 0)for(let g=0,I=A.weights.length;g<I;g++)t.morphTargetInfluences[g]=A.weights[g];if(A.extras&&Array.isArray(A.extras.targetNames)){const g=A.extras.targetNames;if(t.morphTargetInfluences.length===g.length){t.morphTargetDictionary={};for(let I=0,i=g.length;I<i;I++)t.morphTargetDictionary[g[I]]=I}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function _O(t){const A=t.extensions&&t.extensions[Rg.KHR_DRACO_MESH_COMPRESSION];let g;return A?g="draco:"+A.bufferView+":"+A.indices+":"+nF(A.attributes):g=t.indices+":"+nF(t.attributes)+":"+t.mode,g}function nF(t){let A="";const g=Object.keys(t).sort();for(let I=0,i=g.length;I<i;I++)A+=g[I]+":"+t[g[I]]+";";return A}function xy(t){switch(t){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function QF(t){let A=t.array;if(t.normalized){const g=xy(A.constructor),I=new Float32Array(A.length);for(let i=0,e=A.length;i<e;i++)I[i]=A[i]*g;A=I}return A}function Hy(t){t.createInterpolant=function(g){const I=this instanceof AC?HO:CF;return new I(this.times,this.values,this.getValueSize()/3,g)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}function PO(t){return t.search(/\.jpe?g($|\?)/i)>0||t.search(/^data\:image\/jpeg/)===0?"image/jpeg":t.search(/\.webp($|\?)/i)>0||t.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}class WO{constructor(A={},g={}){this.json=A,this.extensions={},this.plugins={},this.options=g,this.cache=new wO,this.associations=new Map,this.primitiveCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let I=!1,i=!1,e=-1;typeof navigator<"u"&&(I=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,i=navigator.userAgent.indexOf("Firefox")>-1,e=i?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||I||i&&e<98?this.textureLoader=new Po(this.options.manager):this.textureLoader=new MM(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new ii(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(A){this.extensions=A}setPlugins(A){this.plugins=A}parse(A,g){const I=this,i=this.json,e=this.extensions;this.cache.removeAll(),this._invokeAll(function(C){return C._markDefs&&C._markDefs()}),Promise.all(this._invokeAll(function(C){return C.beforeRoot&&C.beforeRoot()})).then(function(){return Promise.all([I.getDependencies("scene"),I.getDependencies("animation"),I.getDependencies("camera")])}).then(function(C){const o={scene:C[0][i.scene||0],scenes:C[0],animations:C[1],cameras:C[2],asset:i.asset,parser:I,userData:{}};Jr(e,o,i),BB(o,i),Promise.all(I._invokeAll(function(B){return B.afterRoot&&B.afterRoot(o)})).then(function(){A(o)})}).catch(g)}_markDefs(){const A=this.json.nodes||[],g=this.json.skins||[],I=this.json.meshes||[];for(let i=0,e=g.length;i<e;i++){const C=g[i].joints;for(let o=0,B=C.length;o<B;o++)A[C[o]].isBone=!0}for(let i=0,e=A.length;i<e;i++){const C=A[i];C.mesh!==void 0&&(this._addNodeRef(this.meshCache,C.mesh),C.skin!==void 0&&(I[C.mesh].isSkinnedMesh=!0)),C.camera!==void 0&&this._addNodeRef(this.cameraCache,C.camera)}}_addNodeRef(A,g){g!==void 0&&(A.refs[g]===void 0&&(A.refs[g]=A.uses[g]=0),A.refs[g]++)}_getNodeRef(A,g,I){if(A.refs[g]<=1)return I;const i=I.clone(),e=(C,o)=>{const B=this.associations.get(C);B!=null&&this.associations.set(o,B);for(const[s,n]of C.children.entries())e(n,o.children[s])};return e(I,i),i.name+="_instance_"+A.uses[g]++,i}_invokeOne(A){const g=Object.values(this.plugins);g.push(this);for(let I=0;I<g.length;I++){const i=A(g[I]);if(i)return i}return null}_invokeAll(A){const g=Object.values(this.plugins);g.unshift(this);const I=[];for(let i=0;i<g.length;i++){const e=A(g[i]);e&&I.push(e)}return I}getDependency(A,g){const I=A+":"+g;let i=this.cache.get(I);if(!i){switch(A){case"scene":i=this.loadScene(g);break;case"node":i=this.loadNode(g);break;case"mesh":i=this._invokeOne(function(e){return e.loadMesh&&e.loadMesh(g)});break;case"accessor":i=this.loadAccessor(g);break;case"bufferView":i=this._invokeOne(function(e){return e.loadBufferView&&e.loadBufferView(g)});break;case"buffer":i=this.loadBuffer(g);break;case"material":i=this._invokeOne(function(e){return e.loadMaterial&&e.loadMaterial(g)});break;case"texture":i=this._invokeOne(function(e){return e.loadTexture&&e.loadTexture(g)});break;case"skin":i=this.loadSkin(g);break;case"animation":i=this._invokeOne(function(e){return e.loadAnimation&&e.loadAnimation(g)});break;case"camera":i=this.loadCamera(g);break;case"light":i=this._invokeOne(function(e){return e._loadLight&&e._loadLight(g)});break;default:if(i=this._invokeOne(function(e){return e!=this&&e.getDependency&&e.getDependency(A,g)}),!i)throw new Error("Unknown type: "+A);break}this.cache.add(I,i)}return i}getDependencies(A){let g=this.cache.get(A);if(!g){const I=this,i=this.json[A+(A==="mesh"?"es":"s")]||[];g=Promise.all(i.map(function(e,C){return I.getDependency(A,C)})),this.cache.add(A,g)}return g}loadBuffer(A){const g=this.json.buffers[A],I=this.fileLoader;if(g.type&&g.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+g.type+" buffer type is not supported.");if(g.uri===void 0&&A===0)return Promise.resolve(this.extensions[Rg.KHR_BINARY_GLTF].body);const i=this.options;return new Promise(function(e,C){I.load(gC.resolveURL(g.uri,i.path),e,void 0,function(){C(new Error('THREE.GLTFLoader: Failed to load buffer "'+g.uri+'".'))})})}loadBufferView(A){const g=this.json.bufferViews[A];return this.getDependency("buffer",g.buffer).then(function(I){const i=g.byteLength||0,e=g.byteOffset||0;return I.slice(e,e+i)})}loadAccessor(A){const g=this,I=this.json,i=this.json.accessors[A];if(i.bufferView===void 0&&i.sparse===void 0){const C=Ly[i.type],o=aQ[i.componentType],B=i.normalized===!0,s=new o(i.count*C);return Promise.resolve(new Eg(s,C,B))}const e=[];return i.bufferView!==void 0?e.push(this.getDependency("bufferView",i.bufferView)):e.push(null),i.sparse!==void 0&&(e.push(this.getDependency("bufferView",i.sparse.indices.bufferView)),e.push(this.getDependency("bufferView",i.sparse.values.bufferView))),Promise.all(e).then(function(C){const o=C[0],B=Ly[i.type],s=aQ[i.componentType],n=s.BYTES_PER_ELEMENT,a=n*B,Q=i.byteOffset||0,E=i.bufferView!==void 0?I.bufferViews[i.bufferView].byteStride:void 0,c=i.normalized===!0;let h,l;if(E&&E!==a){const w=Math.floor(Q/E),p="InterleavedBuffer:"+i.bufferView+":"+i.componentType+":"+w+":"+i.count;let D=g.cache.get(p);D||(h=new s(o,w*E,i.count*E/n),D=new ma(h,E/n),g.cache.add(p,D)),l=new To(D,B,Q%E/n,c)}else o===null?h=new s(i.count*B):h=new s(o,Q,i.count*B),l=new Eg(h,B,c);if(i.sparse!==void 0){const w=Ly.SCALAR,p=aQ[i.sparse.indices.componentType],D=i.sparse.indices.byteOffset||0,d=i.sparse.values.byteOffset||0,u=new p(C[1],D,i.sparse.count*w),y=new s(C[2],d,i.sparse.count*B);o!==null&&(l=new Eg(l.array.slice(),l.itemSize,l.normalized));for(let f=0,S=u.length;f<S;f++){const G=u[f];if(l.setX(G,y[f*B]),B>=2&&l.setY(G,y[f*B+1]),B>=3&&l.setZ(G,y[f*B+2]),B>=4&&l.setW(G,y[f*B+3]),B>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return l})}loadTexture(A){const g=this.json,I=this.options,e=g.textures[A].source,C=g.images[e];let o=this.textureLoader;if(C.uri){const B=I.manager.getHandler(C.uri);B!==null&&(o=B)}return this.loadTextureImage(A,e,o)}loadTextureImage(A,g,I){const i=this,e=this.json,C=e.textures[A],o=e.images[g],B=(o.uri||o.bufferView)+":"+C.sampler;if(this.textureCache[B])return this.textureCache[B];const s=this.loadImageSource(g,I).then(function(n){n.flipY=!1,n.name=C.name||o.name||"";const Q=(e.samplers||{})[C.sampler]||{};return n.magFilter=oF[Q.magFilter]||Tg,n.minFilter=oF[Q.minFilter]||dt,n.wrapS=BF[Q.wrapS]||Dt,n.wrapT=BF[Q.wrapT]||Dt,n.anisotropy=4,i.associations.set(n,{textures:A}),n}).catch(function(){return null});return this.textureCache[B]=s,s}loadImageSource(A,g){const I=this,i=this.json,e=this.options;if(this.sourceCache[A]!==void 0)return this.sourceCache[A].then(a=>a.clone());const C=i.images[A],o=self.URL||self.webkitURL;let B=C.uri||"",s=!1;if(C.bufferView!==void 0)B=I.getDependency("bufferView",C.bufferView).then(function(a){s=!0;const Q=new Blob([a],{type:C.mimeType});return B=o.createObjectURL(Q),B});else if(C.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+A+" is missing URI and bufferView");const n=Promise.resolve(B).then(function(a){return new Promise(function(Q,E){let c=Q;g.isImageBitmapLoader===!0&&(c=function(h){const l=new Wg(h);l.needsUpdate=!0,Q(l)}),g.load(gC.resolveURL(a,e.path),c,void 0,E)})}).then(function(a){return s===!0&&o.revokeObjectURL(B),a.userData.mimeType=C.mimeType||PO(C.uri),a}).catch(function(a){throw console.error("THREE.GLTFLoader: Couldn't load texture",B),a});return this.sourceCache[A]=n,n}assignTexture(A,g,I,i){const e=this;return this.getDependency("texture",I.index).then(function(C){if(I.texCoord!==void 0&&I.texCoord!=0&&!(g==="aoMap"&&I.texCoord==1)&&console.warn("THREE.GLTFLoader: Custom UV set "+I.texCoord+" for texture "+g+" not yet supported."),e.extensions[Rg.KHR_TEXTURE_TRANSFORM]){const o=I.extensions!==void 0?I.extensions[Rg.KHR_TEXTURE_TRANSFORM]:void 0;if(o){const B=e.associations.get(C);C=e.extensions[Rg.KHR_TEXTURE_TRANSFORM].extendTexture(C,o),e.associations.set(C,B)}}return i!==void 0&&C&&(C.encoding=i),A[g]=C,C})}assignFinalMaterial(A){const g=A.geometry;let I=A.material;const i=g.attributes.tangent===void 0,e=g.attributes.color!==void 0,C=g.attributes.normal===void 0;if(A.isPoints){const o="PointsMaterial:"+I.uuid;let B=this.cache.get(o);B||(B=new Ch,DI.prototype.copy.call(B,I),B.color.copy(I.color),B.map=I.map,B.sizeAttenuation=!1,this.cache.add(o,B)),I=B}else if(A.isLine){const o="LineBasicMaterial:"+I.uuid;let B=this.cache.get(o);B||(B=new mI,DI.prototype.copy.call(B,I),B.color.copy(I.color),this.cache.add(o,B)),I=B}if(i||e||C){let o="ClonedMaterial:"+I.uuid+":";i&&(o+="derivative-tangents:"),e&&(o+="vertex-colors:"),C&&(o+="flat-shading:");let B=this.cache.get(o);B||(B=I.clone(),e&&(B.vertexColors=!0),C&&(B.flatShading=!0),i&&(B.normalScale&&(B.normalScale.y*=-1),B.clearcoatNormalScale&&(B.clearcoatNormalScale.y*=-1)),this.cache.add(o,B),this.associations.set(B,this.associations.get(I))),I=B}I.aoMap&&g.attributes.uv2===void 0&&g.attributes.uv!==void 0&&g.setAttribute("uv2",g.attributes.uv),A.material=I}getMaterialType(){return $a}loadMaterial(A){const g=this,I=this.json,i=this.extensions,e=I.materials[A];let C;const o={},B=e.extensions||{},s=[];if(B[Rg.KHR_MATERIALS_UNLIT]){const a=i[Rg.KHR_MATERIALS_UNLIT];C=a.getMaterialType(),s.push(a.extendParams(o,e,g))}else{const a=e.pbrMetallicRoughness||{};if(o.color=new T(1,1,1),o.opacity=1,Array.isArray(a.baseColorFactor)){const Q=a.baseColorFactor;o.color.fromArray(Q),o.opacity=Q[3]}a.baseColorTexture!==void 0&&s.push(g.assignTexture(o,"map",a.baseColorTexture,Dg)),o.metalness=a.metallicFactor!==void 0?a.metallicFactor:1,o.roughness=a.roughnessFactor!==void 0?a.roughnessFactor:1,a.metallicRoughnessTexture!==void 0&&(s.push(g.assignTexture(o,"metalnessMap",a.metallicRoughnessTexture)),s.push(g.assignTexture(o,"roughnessMap",a.metallicRoughnessTexture))),C=this._invokeOne(function(Q){return Q.getMaterialType&&Q.getMaterialType(A)}),s.push(Promise.all(this._invokeAll(function(Q){return Q.extendMaterialParams&&Q.extendMaterialParams(A,o)})))}e.doubleSided===!0&&(o.side=HI);const n=e.alphaMode||Yy.OPAQUE;if(n===Yy.BLEND?(o.transparent=!0,o.depthWrite=!1):(o.transparent=!1,n===Yy.MASK&&(o.alphaTest=e.alphaCutoff!==void 0?e.alphaCutoff:.5)),e.normalTexture!==void 0&&C!==tI&&(s.push(g.assignTexture(o,"normalMap",e.normalTexture)),o.normalScale=new QA(1,1),e.normalTexture.scale!==void 0)){const a=e.normalTexture.scale;o.normalScale.set(a,a)}return e.occlusionTexture!==void 0&&C!==tI&&(s.push(g.assignTexture(o,"aoMap",e.occlusionTexture)),e.occlusionTexture.strength!==void 0&&(o.aoMapIntensity=e.occlusionTexture.strength)),e.emissiveFactor!==void 0&&C!==tI&&(o.emissive=new T().fromArray(e.emissiveFactor)),e.emissiveTexture!==void 0&&C!==tI&&s.push(g.assignTexture(o,"emissiveMap",e.emissiveTexture,Dg)),Promise.all(s).then(function(){const a=new C(o);return e.name&&(a.name=e.name),BB(a,e),g.associations.set(a,{materials:A}),e.extensions&&Jr(i,a,e),a})}createUniqueName(A){const g=Ug.sanitizeNodeName(A||"");let I=g;for(let i=1;this.nodeNamesUsed[I];++i)I=g+"_"+i;return this.nodeNamesUsed[I]=!0,I}loadGeometries(A){const g=this,I=this.extensions,i=this.primitiveCache;function e(o){return I[Rg.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(o,g).then(function(B){return rF(B,o,g)})}const C=[];for(let o=0,B=A.length;o<B;o++){const s=A[o],n=_O(s),a=i[n];if(a)C.push(a.promise);else{let Q;s.extensions&&s.extensions[Rg.KHR_DRACO_MESH_COMPRESSION]?Q=e(s):Q=rF(new cg,s,g),i[n]={primitive:s,promise:Q},C.push(Q)}}return Promise.all(C)}loadMesh(A){const g=this,I=this.json,i=this.extensions,e=I.meshes[A],C=e.primitives,o=[];for(let B=0,s=C.length;B<s;B++){const n=C[B].material===void 0?vO(this.cache):this.getDependency("material",C[B].material);o.push(n)}return o.push(g.loadGeometries(C)),Promise.all(o).then(function(B){const s=B.slice(0,B.length-1),n=B[B.length-1],a=[];for(let E=0,c=n.length;E<c;E++){const h=n[E],l=C[E];let w;const p=s[E];if(l.mode===et.TRIANGLES||l.mode===et.TRIANGLE_STRIP||l.mode===et.TRIANGLE_FAN||l.mode===void 0)w=e.isSkinnedMesh===!0?new mu(h,p):new UA(h,p),w.isSkinnedMesh===!0&&!w.geometry.attributes.skinWeight.normalized&&w.normalizeSkinWeights(),l.mode===et.TRIANGLE_STRIP?w.geometry=EF(w.geometry,dG):l.mode===et.TRIANGLE_FAN&&(w.geometry=EF(w.geometry,xw));else if(l.mode===et.LINES)w=new Re(h,p);else if(l.mode===et.LINE_STRIP)w=new NI(h,p);else if(l.mode===et.LINE_LOOP)w=new Ku(h,p);else if(l.mode===et.POINTS)w=new qu(h,p);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+l.mode);Object.keys(w.geometry.morphAttributes).length>0&&OO(w,e),w.name=g.createUniqueName(e.name||"mesh_"+A),BB(w,e),l.extensions&&Jr(i,w,l),g.assignFinalMaterial(w),a.push(w)}for(let E=0,c=a.length;E<c;E++)g.associations.set(a[E],{meshes:A,primitives:E});if(a.length===1)return a[0];const Q=new Gt;g.associations.set(Q,{meshes:A});for(let E=0,c=a.length;E<c;E++)Q.add(a[E]);return Q})}loadCamera(A){let g;const I=this.json.cameras[A],i=I[I.type];if(!i){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return I.type==="perspective"?g=new zg(Be.radToDeg(i.yfov),i.aspectRatio||1,i.znear||1,i.zfar||2e6):I.type==="orthographic"&&(g=new Ho(-i.xmag,i.xmag,i.ymag,-i.ymag,i.znear,i.zfar)),I.name&&(g.name=this.createUniqueName(I.name)),BB(g,I),Promise.resolve(g)}loadSkin(A){const g=this.json.skins[A],I={joints:g.joints};return g.inverseBindMatrices===void 0?Promise.resolve(I):this.getDependency("accessor",g.inverseBindMatrices).then(function(i){return I.inverseBindMatrices=i,I})}loadAnimation(A){const g=this.json,I=this,i=g.animations[A],e=[],C=[],o=[],B=[],s=[];let n=0,a=i.channels.length;for(n=0,a=i.channels.length;n<a;n++){const Q=i.channels[n],E=i.samplers[Q.sampler],c=Q.target,h=i.parameters!==void 0?i.parameters[E.input]:E.input,l=i.parameters!==void 0?i.parameters[E.output]:E.output,w=I._invokeOne(function(p){return p.loadAnimationTargetFromChannel&&p.loadAnimationTargetFromChannel(Q)});e.push(w),C.push(this.getDependency("accessor",h)),o.push(this.getDependency("accessor",l)),B.push(E),s.push(c)}return Promise.all([Promise.all(e),Promise.all(C),Promise.all(o),Promise.all(B),Promise.all(s)]).then(function(Q){const E=Q[0],c=Q[1],h=Q[2],l=Q[3],w=Q[4],p=[];for(n=0,a=E.length;n<a;n++){const d=E[n],u=c[n],y=h[n],f=l[n],S=w[n];if(d===void 0)continue;d.updateMatrix&&(d.updateMatrix(),d.matrixAutoUpdate=!0);const G=I._invokeOne(function(k){return k.createAnimationTracks&&k.createAnimationTracks(d,u,y,f,S)});if(G)for(let k=0;k<G.length;k++)p.push(G[k])}const D=i.name?i.name:"animation_"+A;return new Mt(D,void 0,p)})}createNodeMesh(A){const g=this.json,I=this,i=g.nodes[A];return i.mesh===void 0?null:I.getDependency("mesh",i.mesh).then(function(e){const C=I._getNodeRef(I.meshCache,i.mesh,e);return i.weights!==void 0&&C.traverse(function(o){if(o.isMesh)for(let B=0,s=i.weights.length;B<s;B++)o.morphTargetInfluences[B]=i.weights[B]}),C})}loadNode(A){const g=this.json,I=this.extensions,i=this,e=g.nodes[A],C=e.name?i.createUniqueName(e.name):"";return function(){const o=[],B=i._invokeOne(function(s){return s.createNodeMesh&&s.createNodeMesh(A)});return B&&o.push(B),e.camera!==void 0&&o.push(i.getDependency("camera",e.camera).then(function(s){return i._getNodeRef(i.cameraCache,e.camera,s)})),i._invokeAll(function(s){return s.createNodeAttachment&&s.createNodeAttachment(A)}).forEach(function(s){o.push(s)}),Promise.all(o)}().then(function(o){let B;if(e.isBone===!0?B=new Ih:o.length>1?B=new Gt:o.length===1?B=o[0]:B=new LA,B!==o[0])for(let s=0,n=o.length;s<n;s++)B.add(o[s]);if(e.name&&(B.userData.name=e.name,B.name=C),BB(B,e),e.extensions&&Jr(I,B,e),e.matrix!==void 0){const s=new $A;s.fromArray(e.matrix),B.applyMatrix4(s)}else e.translation!==void 0&&B.position.fromArray(e.translation),e.rotation!==void 0&&B.quaternion.fromArray(e.rotation),e.scale!==void 0&&B.scale.fromArray(e.scale);return i.associations.has(B)||i.associations.set(B,{}),i.associations.get(B).nodes=A,B})}loadScene(A){const g=this.json,I=this.extensions,i=this.json.scenes[A],e=this,C=new Gt;i.name&&(C.name=e.createUniqueName(i.name)),BB(C,i),i.extensions&&Jr(I,C,i);const o=i.nodes||[],B=[];for(let s=0,n=o.length;s<n;s++)B.push(aF(o[s],C,g,e));return Promise.all(B).then(function(){const s=n=>{const a=new Map;for(const[Q,E]of e.associations)(Q instanceof DI||Q instanceof Wg)&&a.set(Q,E);return n.traverse(Q=>{const E=e.associations.get(Q);E!=null&&a.set(Q,E)}),a};return e.associations=s(C),C})}loadAnimationTargetFromChannel(A){const g=A.target,I=g.node!==void 0?g.node:g.id;return this.getDependency("node",I)}createAnimationTracks(A,g,I,i,e){const C=[],o=A.name?A.name:A.uuid,B=[];oB[e.path]===oB.weights?A.traverse(function(Q){Q.morphTargetInfluences&&B.push(Q.name?Q.name:Q.uuid)}):B.push(o);let s;switch(oB[e.path]){case oB.weights:s=Oo;break;case oB.rotation:s=AC;break;case oB.position:case oB.scale:default:switch(I.itemSize){case 1:s=Oo;break;case 2:case 3:s=_o;break;case 4:s=Ar;break}break}const n=i.interpolation!==void 0?sF[i.interpolation]:xC,a=QF(I);for(let Q=0,E=B.length;Q<E;Q++){const c=new s(B[Q]+"."+oB[e.path],g.array,a,n);n==="CUBICSPLINE"&&Hy(c),C.push(c)}return C}}function aF(t,A,g,I){const i=g.nodes[t];return I.getDependency("node",t).then(function(e){if(i.skin===void 0)return e;let C;return I.getDependency("skin",i.skin).then(function(o){C=o;const B=[];for(let s=0,n=C.joints.length;s<n;s++)B.push(I.getDependency("node",C.joints[s]));return Promise.all(B)}).then(function(o){return e.traverse(function(B){if(!B.isMesh)return;const s=[],n=[];for(let a=0,Q=o.length;a<Q;a++){const E=o[a];if(E){s.push(E);const c=new $A;C.inverseBindMatrices!==void 0&&c.fromArray(C.inverseBindMatrices.array,a*16),n.push(c)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',C.joints[a])}B.bind(new qa(s,n),B.matrixWorld)}),e})}).then(function(e){A.add(e);const C=[];if(i.children){const o=i.children;for(let B=0,s=o.length;B<s;B++){const n=o[B];C.push(aF(n,e,g,I))}}return Promise.all(C)})}function jO(t,A,g){const I=A.attributes,i=new bi;if(I.POSITION!==void 0){const o=g.json.accessors[I.POSITION],B=o.min,s=o.max;if(B!==void 0&&s!==void 0){if(i.set(new M(B[0],B[1],B[2]),new M(s[0],s[1],s[2])),o.normalized){const n=xy(aQ[o.componentType]);i.min.multiplyScalar(n),i.max.multiplyScalar(n)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const e=A.targets;if(e!==void 0){const o=new M,B=new M;for(let s=0,n=e.length;s<n;s++){const a=e[s];if(a.POSITION!==void 0){const Q=g.json.accessors[a.POSITION],E=Q.min,c=Q.max;if(E!==void 0&&c!==void 0){if(B.setX(Math.max(Math.abs(E[0]),Math.abs(c[0]))),B.setY(Math.max(Math.abs(E[1]),Math.abs(c[1]))),B.setZ(Math.max(Math.abs(E[2]),Math.abs(c[2]))),Q.normalized){const h=xy(aQ[Q.componentType]);B.multiplyScalar(h)}o.max(B)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}i.expandByVector(o)}t.boundingBox=i;const C=new Zt;i.getCenter(C.center),C.radius=i.min.distanceTo(i.max)/2,t.boundingSphere=C}function rF(t,A,g){const I=A.attributes,i=[];function e(C,o){return g.getDependency("accessor",C).then(function(B){t.setAttribute(o,B)})}for(const C in I){const o=by[C]||C.toLowerCase();o in t.attributes||i.push(e(I[C],o))}if(A.indices!==void 0&&!t.index){const C=g.getDependency("accessor",A.indices).then(function(o){t.setIndex(o)});i.push(C)}return BB(t,A),jO(t,A,g),Promise.all(i).then(function(){return A.targets!==void 0?TO(t,A.targets,g):t})}function EF(t,A){let g=t.getIndex();if(g===null){const C=[],o=t.getAttribute("position");if(o!==void 0){for(let B=0;B<o.count;B++)C.push(B);t.setIndex(C),g=t.getIndex()}else return console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),t}const I=g.count-2,i=[];if(A===xw)for(let C=1;C<=I;C++)i.push(g.getX(0)),i.push(g.getX(C)),i.push(g.getX(C+1));else for(let C=0;C<I;C++)C%2===0?(i.push(g.getX(C)),i.push(g.getX(C+1)),i.push(g.getX(C+2))):(i.push(g.getX(C+2)),i.push(g.getX(C+1)),i.push(g.getX(C)));i.length/3!==I&&console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const e=t.clone();return e.setIndex(i),e}const vy=new WeakMap;class Ty extends Yi{constructor(A){super(A),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(A){return this.decoderPath=A,this}setDecoderConfig(A){return this.decoderConfig=A,this}setWorkerLimit(A){return this.workerLimit=A,this}load(A,g,I,i){const e=new ii(this.manager);e.setPath(this.path),e.setResponseType("arraybuffer"),e.setRequestHeader(this.requestHeader),e.setWithCredentials(this.withCredentials),e.load(A,C=>{this.decodeDracoFile(C,g).catch(i)},I,i)}decodeDracoFile(A,g,I,i){const e={attributeIDs:I||this.defaultAttributeIDs,attributeTypes:i||this.defaultAttributeTypes,useUniqueIDs:!!I};return this.decodeGeometry(A,e).then(g)}decodeGeometry(A,g){const I=JSON.stringify(g);if(vy.has(A)){const B=vy.get(A);if(B.key===I)return B.promise;if(A.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let i;const e=this.workerNextTaskID++,C=A.byteLength,o=this._getWorker(e,C).then(B=>(i=B,new Promise((s,n)=>{i._callbacks[e]={resolve:s,reject:n},i.postMessage({type:"decode",id:e,taskConfig:g,buffer:A},[A])}))).then(B=>this._createGeometry(B.geometry));return o.catch(()=>!0).then(()=>{i&&e&&this._releaseTask(i,e)}),vy.set(A,{key:I,promise:o}),o}_createGeometry(A){const g=new cg;A.index&&g.setIndex(new Eg(A.index.array,1));for(let I=0;I<A.attributes.length;I++){const i=A.attributes[I],e=i.name,C=i.array,o=i.itemSize;g.setAttribute(e,new Eg(C,o))}return g}_loadLibrary(A,g){const I=new ii(this.manager);return I.setPath(this.decoderPath),I.setResponseType(g),I.setWithCredentials(this.withCredentials),new Promise((i,e)=>{I.load(A,i,void 0,e)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const A=typeof WebAssembly!="object"||this.decoderConfig.type==="js",g=[];return A?g.push(this._loadLibrary("draco_decoder.js","text")):(g.push(this._loadLibrary("draco_wasm_wrapper.js","text")),g.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(g).then(I=>{const i=I[0];A||(this.decoderConfig.wasmBinary=I[1]);const e=ZO.toString(),C=["/* draco decoder */",i,"","/* worker */",e.substring(e.indexOf("{")+1,e.lastIndexOf("}"))].join(`
|
|
3403
|
+
#endif`),ZA.lightmap.lightmapScaleOffset={value:new sg(1,1,0,0)};const iO=wA("debugplayerview");var to=(t=>(t.Browser="browser",t.Headset="headset",t.Handheld="handheld",t))(to||{});class eO{constructor(A,g){r(this,"userId");r(this,"context");r(this,"viewDevice","browser");r(this,"removed",!1);r(this,"_object");this.userId=A,this.context=g}get currentObject(){return this._object}set currentObject(A){this._object=A}get isConnected(){return this.context.connection.userIsInRoom(this.userId)}}class tO{constructor(A){r(this,"context");r(this,"playerViews",new Map);this.context=A}setPlayerView(A,g,I){let i=this.playerViews.get(A);i||(i=new eO(A,this.context),this.playerViews.set(A,i)),i.viewDevice=I,i.currentObject=g,i.removed=!1}getPlayerView(A){if(!A)return;if(!this.context.connection.userIsInRoom(A)){this.playerViews.delete(A);return}return this.playerViews.get(A)}removePlayerView(A,g){const I=this.playerViews.get(A);(I==null?void 0:I.viewDevice)===g&&(iO&&console.log("REMOVE",A),I.removed=!0,this.playerViews.delete(A))}}const CO=wA("debugSetup"),oO=wA("stats"),BO=wA("debugactive");var re=(t=>(t[t.EarlyUpdate=0]="EarlyUpdate",t[t.Update=1]="Update",t[t.LateUpdate=2]="LateUpdate",t[t.OnBeforeRender=3]="OnBeforeRender",t[t.OnAfterRender=4]="OnAfterRender",t[t.PrePhysicsStep=9]="PrePhysicsStep",t[t.PostPhysicsStep=10]="PostPhysicsStep",t))(re||{}),Ul=(t=>(t.ImmersiveVR="immersive-vr",t.ImmersiveAR="immersive-ar",t))(Ul||{});function XR(t,A){if(!t)return;const g=(A==null?void 0:A.new_scripts)??Ng.Current.new_scripts;g.includes(t)||g.push(t)}const ee=class{constructor(A){r(this,"name");r(this,"alias");r(this,"isManagedExternally",!1);r(this,"isPaused",!1);r(this,"runInBackground",!1);r(this,"hash");r(this,"domElement");r(this,"_resolutionScaleFactor",1);r(this,"_boundingClientRectFrame",-1);r(this,"_boundingClientRect",null);r(this,"_domX");r(this,"_domY");r(this,"xrSessionMode");r(this,"_currentFrameEvent",-1);r(this,"scene");r(this,"renderer");r(this,"composer",null);r(this,"scripts",[]);r(this,"scripts_pausedChanged",[]);r(this,"scripts_earlyUpdate",[]);r(this,"scripts_update",[]);r(this,"scripts_lateUpdate",[]);r(this,"scripts_onBeforeRender",[]);r(this,"scripts_onAfterRender",[]);r(this,"scripts_WithCorroutines",[]);r(this,"coroutines",{});r(this,"mainCameraComponent");r(this,"post_setup_callbacks",[]);r(this,"pre_update_callbacks",[]);r(this,"pre_render_callbacks",[]);r(this,"post_render_callbacks",[]);r(this,"new_scripts",[]);r(this,"new_script_start",[]);r(this,"new_scripts_pre_setup_callbacks",[]);r(this,"new_scripts_post_setup_callbacks",[]);r(this,"application");r(this,"time");r(this,"input");r(this,"physics");r(this,"connection");r(this,"assets");r(this,"mainLight",null);r(this,"rendererData");r(this,"addressables");r(this,"lightmaps");r(this,"players");r(this,"_sizeChanged",!1);r(this,"_isCreated",!1);r(this,"_isVisible",!1);r(this,"_stats",oO?q2():null);r(this,"_intersectionObserver",null);r(this,"_disposeCallbacks",[]);r(this,"_cameraStack",[]);r(this,"_onBeforeRenderListeners",{});r(this,"_requireDepthTexture",!1);r(this,"_requireColorTexture",!1);r(this,"_renderTarget");r(this,"_isRendering",!1);r(this,"_wasPaused",!1);if(this.name=(A==null?void 0:A.name)||"",this.alias=A==null?void 0:A.alias,this.domElement=(A==null?void 0:A.domElement)||document.body,this.hash=A==null?void 0:A.hash,A!=null&&A.renderer)this.renderer=A.renderer,this.isManagedExternally=!0;else{const i=wA("postfx");this.renderer=new Ln({antialias:!0}),this.renderer.toneMappingExposure=1,this.renderer.toneMapping=ht,this.renderer.setClearColor(new T("lightgrey"),0),this.renderer.antialias=!0,this.renderer.alpha=!1,this.renderer.shadowMap.enabled=!0,this.renderer.shadowMap.type=ow,this.renderer.setSize(this.domWidth,this.domHeight),this.renderer.outputEncoding=Dg,this.renderer.physicallyCorrectLights=!0,this.composer=i?new N2(this.renderer):null}this.scene=new vo,mi.register(this),this.application=new $2(this),this.time=new c2,this.input=new aT(this),this.physics=new fs(this),this.connection=new U2(this),this.assets=new J2,this.rendererData=new T2(this),this.addressables=new z2(this),this.lightmaps=new IO(this),this.players=new tO(this);const g=()=>this._sizeChanged=!0;window.addEventListener("resize",g),this._disposeCallbacks.push(()=>window.removeEventListener("resize",g));const I=new ResizeObserver(i=>this._sizeChanged=!0);I.observe(this.domElement),this._disposeCallbacks.push(()=>I.disconnect()),this._intersectionObserver=new IntersectionObserver(i=>{this._isVisible=i[0].isIntersecting}),this._disposeCallbacks.push(()=>{var i;return(i=this._intersectionObserver)==null?void 0:i.disconnect()})}static get Current(){return this._current}static set Current(A){mi.Current=A,this._current=A}get resolutionScaleFactor(){return this._resolutionScaleFactor}set resolutionScaleFactor(A){if(A!==this._resolutionScaleFactor&&typeof A=="number"){if(A<=0){console.error("Invalid resolution scale factor",A);return}this._resolutionScaleFactor=A,this.updateSize()}}calculateBoundingClientRect(){if(this.isInAR){this._domX=0,this._domY=0;return}this._boundingClientRectFrame!==this.time.frame&&(this._boundingClientRectFrame=this.time.frame,this._boundingClientRect=this.domElement.getBoundingClientRect(),this._domX=this._boundingClientRect.x,this._domY=this._boundingClientRect.y)}get domWidth(){return this.isInAR?window.innerWidth:this.domElement.clientWidth}get domHeight(){return this.isInAR?window.innerHeight:this.domElement.clientHeight}get domX(){return this.calculateBoundingClientRect(),this._domX}get domY(){return this.calculateBoundingClientRect(),this._domY}get isInXR(){var A;return((A=this.renderer.xr)==null?void 0:A.isPresenting)||!1}get isInVR(){return this.xrSessionMode==="immersive-vr"}get isInAR(){return this.xrSessionMode==="immersive-ar"}get xrSession(){var A;return(A=this.renderer.xr)==null?void 0:A.getSession()}get arOverlayElement(){const A=this.domElement;return typeof A.getAROverlayContainer=="function"?A.getAROverlayContainer():this.domElement}get currentFrameEvent(){return this._currentFrameEvent}get mainCamera(){if(this.mainCameraComponent){const A=this.mainCameraComponent;return A.cam||A.buildCamera(),A.cam}return null}get isCreated(){return this._isCreated}internalOnUpdateVisible(){var A,g;(A=this._intersectionObserver)==null||A.disconnect(),(g=this._intersectionObserver)==null||g.observe(this.domElement)}updateSize(){var A,g;if(!this.isManagedExternally&&!this.renderer.xr.isPresenting){this._sizeChanged=!1;const I=this.resolutionScaleFactor,i=this.domWidth*I,e=this.domHeight*I,C=this.mainCamera;this.updateAspect(C),this.renderer.setSize(i,e),this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.domElement.style.width="100%",this.renderer.domElement.style.height="100%",this.composer&&((A=this.composer.setSize)==null||A.call(this.composer,i,e),(g=this.composer.setPixelRatio)==null||g.call(this.composer,window.devicePixelRatio))}}updateAspect(A,g,I){if(!A)return;g===void 0&&(g=this.domWidth),I===void 0&&(I=this.domHeight);const i=A.aspect;A.aspect=g/I,i!==A.aspect&&A.updateProjectionMatrix()}onCreate(A,g){return this._isCreated?(console.warn("Context already created"),null):(this._isCreated=!0,this.internalOnCreate(A,g))}onDestroy(){var A,g,I;if(this._isCreated){this._isCreated=!1,ds(this.scene,!0),(A=this.renderer)==null||A.setAnimationLoop(null),this.isManagedExternally||(g=this.renderer)==null||g.dispose();for(const i of this._disposeCallbacks)try{i()}catch(e){console.error("Error in on dispose callback:",e,i)}(I=this.domElement)!=null&&I.parentElement&&this.domElement.parentElement.removeChild(this.domElement),mi.dispatchCallback(JC.ContextDestroyed,this),mi.unregister(this)}}registerCoroutineUpdate(A,g,I){return this.coroutines[I]||(this.coroutines[I]=[]),this.coroutines[I].push({comp:A,main:g}),g}unregisterCoroutineUpdate(A,g){if(!this.coroutines[g])return;const I=this.coroutines[g].findIndex(i=>i.main===A);I>=0&&this.coroutines[g].splice(I,1)}stopAllCoroutinesFrom(A){for(const g in this.coroutines){const I=this.coroutines[g];for(let i=I.length-1;i>=0;i--)I[i].comp===A&&I.splice(i,1)}}setCurrentCamera(A){var i;if(!A)return;if(A.cam||A.buildCamera(),!A.cam){console.warn("Camera component is missing camera",A);return}const g=this._cameraStack.indexOf(A);g>=0&&this._cameraStack.splice(g,1),this._cameraStack.push(A),this.mainCameraComponent=A;const I=A.cam;I.isPerspectiveCamera&&this.updateAspect(I),(i=this.mainCameraComponent)==null||i.applyClearFlagsIfIsActiveCamera()}removeCamera(A){if(!A)return;const g=this._cameraStack.indexOf(A);if(g>=0&&this._cameraStack.splice(g,1),this.mainCameraComponent===A&&(this.mainCameraComponent=void 0,this._cameraStack.length>0)){const I=this._cameraStack[this._cameraStack.length-1];this.setCurrentCamera(I)}}addBeforeRenderListener(A,g){if(!this._onBeforeRenderListeners[A.uuid]){this._onBeforeRenderListeners[A.uuid]=[];const I=(i,e,C,o,B,s)=>{const n=this._onBeforeRenderListeners[A.uuid];if(n)for(let a=0;a<n.length;a++){const Q=n[a];Q(i,e,C,o,B,s)}};A.onBeforeRender=I}this._onBeforeRenderListeners[A.uuid].push(g)}removeBeforeRenderListener(A,g){if(this._onBeforeRenderListeners[A.uuid]){const I=this._onBeforeRenderListeners[A.uuid],i=I.indexOf(g);i>=0&&I.splice(i,1)}}get isRendering(){return this._isRendering}setRequireDepth(A){this._requireDepthTexture=A}setRequireColor(A){this._requireColorTexture=A}get depthTexture(){var A;return((A=this._renderTarget)==null?void 0:A.depthTexture)||null}get opaqueColorTexture(){var A;return((A=this._renderTarget)==null?void 0:A.texture)||null}get isVisibleToUser(){if(this.isInXR)return!0;if(!this._isVisible)return!1;const A=getComputedStyle(this.domElement);return A.visibility!=="hidden"&&A.display!=="none"&&A.opacity!=="0"}async internalOnCreate(A,g){await this.physics.createWorld();let I=!0;try{ee.Current=this,A&&await A(this,g)}catch(i){console.error(i),I=!1}if(I){this.internalOnUpdateVisible(),this.isManagedExternally||this.domElement.prepend(this.renderer.domElement),ee._current=this,ee._current=this;for(let i=0;i<this.new_scripts.length;i++){const e=this.new_scripts[i];if(e.gameObject!==void 0&&e.gameObject!==null){e.gameObject.userData===void 0&&(e.gameObject.userData={}),e.gameObject.userData.components===void 0&&(e.gameObject.userData.components=[]);const C=e.gameObject.userData.components;C.includes(e)||C.push(e)}}if(this.post_setup_callbacks)for(let i=0;i<this.post_setup_callbacks.length;i++)ee._current=this,await this.post_setup_callbacks[i](this);if(!this.mainCamera){ee._current=this;let i=null;ws(this.scene,e=>{const C=e;if(C!=null&&C.isCamera){if(Br(C.gameObject),!C.activeAndEnabled)return;if(C.tag==="MainCamera")return i=C,!0;i=C}}),i?this.setCurrentCamera(i):(mi.dispatchCallback(JC.MissingCamera,this),this.mainCamera||console.error("MISSING camera",this))}if(ee._current=this,or(this),!this.isManagedExternally&&this.composer&&this.mainCamera){const i=new K2(this.scene,this.mainCamera);this.renderer.setSize(this.domWidth,this.domHeight),this.composer.addPass(i),this.composer.setSize(this.domWidth,this.domHeight)}this._sizeChanged=!0,this._stats&&(this._stats.showPanel(1),this.domElement.appendChild(this._stats.dom)),this.renderer.setAnimationLoop(this.render.bind(this)),CO&&Kp(this.scene,!0),mi.dispatchCallback(JC.ContextCreated,this)}}render(A,g){var e,C;if(this._currentFrameEvent=-1,this.onHandlePaused())return;for((e=this._stats)==null||e.begin(),ee._current=this,this.time.update(),or(this),bh(this.scene),EU(this);this._cameraStack.length>0&&(!this.mainCameraComponent||this.mainCameraComponent.destroyed);){this._cameraStack.splice(this._cameraStack.length-1,1);const o=this._cameraStack[this._cameraStack.length-1];this.setCurrentCamera(o)}if(this.pre_update_callbacks)for(const o in this.pre_update_callbacks)this.pre_update_callbacks[o]();this._currentFrameEvent=0;for(let o=0;o<this.scripts_earlyUpdate.length;o++){const B=this.scripts_earlyUpdate[o];B.activeAndEnabled&&B.earlyUpdate!==void 0&&(ee._current=this,B.earlyUpdate())}if(this.executeCoroutines(0),this.onHandlePaused())return;this._currentFrameEvent=1;for(let o=0;o<this.scripts_update.length;o++){const B=this.scripts_update[o];B.activeAndEnabled&&B.update!==void 0&&(ee._current=this,B.update())}if(this.executeCoroutines(1),this.onHandlePaused())return;this._currentFrameEvent=2;for(let o=0;o<this.scripts_lateUpdate.length;o++){const B=this.scripts_lateUpdate[o];B.activeAndEnabled&&B.lateUpdate!==void 0&&(ee._current=this,B.lateUpdate())}if(this.executeCoroutines(2),this.onHandlePaused())return;const I=1,i=this.time.deltaTime/I;for(let o=0;o<I;o++)this._currentFrameEvent=9,this.executeCoroutines(9),this.physics.step(i),this._currentFrameEvent=10,this.executeCoroutines(10);if(this.physics.postStep(),!this.onHandlePaused()){if(this.isVisibleToUser){this._currentFrameEvent=3;for(let o=0;o<this.scripts_onBeforeRender.length;o++){const B=this.scripts_onBeforeRender[o];B.activeAndEnabled&&B.onBeforeRender!==void 0&&(ee._current=this,B.onBeforeRender(g))}if(this.executeCoroutines(3),this._sizeChanged&&this.updateSize(),this.pre_render_callbacks)for(const o in this.pre_render_callbacks)this.pre_render_callbacks[o]();this.isManagedExternally||(kT(this),this._currentFrameEvent=-10,this.renderNow(),this._currentFrameEvent=4);for(let o=0;o<this.scripts_onAfterRender.length;o++){const B=this.scripts_onAfterRender[o];B.activeAndEnabled&&B.onAfterRender!==void 0&&(ee._current=this,B.onAfterRender())}if(this.executeCoroutines(4),this.post_render_callbacks)for(const o in this.post_render_callbacks)this.post_render_callbacks[o]()}this._currentFrameEvent=-1,this.connection.sendBufferedMessagesNow(),(C=this._stats)==null||C.end()}}renderNow(A){return!A&&(A=this.mainCamera,!A)?!1:(this._isRendering=!0,this.renderRequiredTextures(),this.composer&&!this.isInXR?this.composer.render():this.mainCamera&&this.renderer.render(this.scene,A),this._isRendering=!1,!0)}onHandlePaused(){const A=this.evaluatePaused();if(this._wasPaused!==A){BO&&console.log("Paused?",A,"context:"+this.alias);for(let g=0;g<this.scripts_pausedChanged.length;g++){const I=this.scripts_pausedChanged[g];I.activeAndEnabled&&I.onPausedChanged!==void 0&&(ee._current=this,I.onPausedChanged(A,this._wasPaused))}}return this._wasPaused=A,A}evaluatePaused(){return this.isInXR?!1:this.isPaused?!0:this.runInBackground?!1:!this.isVisibleToUser}renderRequiredTextures(){if(!this.mainCamera||!this._requireDepthTexture&&!this._requireColorTexture)return;if(!this._renderTarget){if(this._renderTarget=new Li(this.domWidth,this.domHeight),this._requireDepthTexture){const I=new ku(this.domWidth,this.domHeight);this._renderTarget.depthTexture=I}this._requireColorTexture&&(this._renderTarget.texture=new Wg,this._renderTarget.texture.generateMipmaps=!1,this._renderTarget.texture.minFilter=eI,this._renderTarget.texture.magFilter=eI,this._renderTarget.texture.format=lI)}const A=this._renderTarget;A.texture&&(A.texture.encoding=this.renderer.outputEncoding);const g=this.renderer.getRenderTarget();this.renderer.setRenderTarget(A),this.renderer.render(this.scene,this.mainCamera),this.renderer.setRenderTarget(g)}executeCoroutines(A){if(this.coroutines[A]){const I=this.coroutines[A];for(let i=0;i<I.length;i++)try{const e=I[i];if(!e.comp||e.comp.destroyed||!e.main||e.comp.enabled===!1){I.splice(i,1),--i;continue}const o=e.chained;if(o&&o.length>0){const a=o[o.length-1].next();if(a.done&&o.pop(),g(a)&&(e.chained||(e.chained=[]),e.chained.push(a.value)),!a.done)continue}const B=e.main.next();if(B.done===!0){I.splice(i,1),--i;continue}const s=B.value;if(g(s)){if(s.next().done)continue;e.chained||(e.chained=[]),e.chained.push(s)}}catch(e){console.error(e)}}function g(I){return!!(I&&I.next&&I.return)}}};let Ng=ee;r(Ng,"_current");const sO=wA("debugaroverlay"),Gs="ar",$R="quit-ar";class nO{constructor(){r(this,"arContainer",null);r(this,"closeARCallback");r(this,"currentSession",null);r(this,"registeredCloseEventElements",[]);r(this,"_createdAROnlyElements",[]);r(this,"_reparentedObjects",[]);this.closeARCallback=this.onRequestedEndAR.bind(this)}get ARContainer(){return this.arContainer}requestEndAR(){this.onRequestedEndAR()}onBegin(A,g,I){this.currentSession=I,this.arContainer=g,A.domElement.querySelectorAll(`.${Gs}`).forEach(C=>{var o;C&&C!==this.arContainer&&(this._reparentedObjects.push({el:C,previousParent:C.parentElement}),(o=this.arContainer)==null||o.appendChild(C))});const e=g.getElementsByClassName($R);if(!e||e.length<=0)console.warn(`Missing quit AR elements, creating fallback X button. Use class name '${$R}' to override.`),this.createFallbackCloseARButton(this.arContainer);else for(let C=0;C<e.length;C++){const o=e[C];o&&(o.addEventListener("click",this.closeARCallback),this.registeredCloseEventElements.push(o))}}onEnd(A){var g;for(const I of this._createdAROnlyElements)I.remove&&I.remove();for(const I of this._reparentedObjects){const i=I.el;(g=I.previousParent)==null||g.appendChild(i)}this._reparentedObjects.length=0,J0()&&setTimeout(()=>{const I=A.renderer.domElement;I&&A.domElement.insertBefore(I,A.domElement.firstChild);const i=document.querySelectorAll("*");for(var e=0;e<i.length;e++){const C=i[e];C&&C._displayChanged!==void 0&&C._displayWas!==void 0&&(C.style.display=C._displayWas)}},10)}findOrCreateARContainer(A){if(A.classList.contains(Gs))return A;if(A.children)for(let i=0;i<A.children.length;i++){const e=A.children[i];if(!(!e||!e.classList)&&e.classList.contains(Gs))return e}const g=document.getElementsByClassName(Gs);if(g&&g.length>0)return g[0];sO&&console.log("No overlay container found in document - generating new ony");const I=document.createElement("div");return I.classList.add(Gs),I.style.position="absolute",I.style.width="100%",I.style.height="100%",I.style.display="flex",I.style.visibility="visible",A.appendChild(I)}onRequestedEndAR(){if(this.currentSession){this.currentSession.end(),this.currentSession=null;for(const A of this.registeredCloseEventElements)A.removeEventListener("click",this.closeARCallback);this.registeredCloseEventElements.length=0}}createFallbackCloseARButton(A){var g=document.createElementNS("http://www.w3.org/2000/svg","svg");g.setAttribute("width","38px"),g.setAttribute("height","38px"),g.style.position="absolute",g.style.right="20px",g.style.top="40px",g.style.zIndex="9999",g.style.pointerEvents="auto",g.addEventListener("click",this.closeARCallback),A.appendChild(g),this._createdAROnlyElements.push(g);var I=document.createElementNS("http://www.w3.org/2000/svg","path");I.setAttribute("d","M 12,12 L 28,28 M 28,12 12,28"),I.setAttribute("stroke","#ddd"),I.setAttribute("stroke-width","3px"),g.appendChild(I),this._createdAROnlyElements.push(I)}}class sA extends LA{constructor(){super(...arguments);r(this,"guid")}static isDestroyed(g){return Op(g)}static setActive(g,I,i=!0){g&&(rr(g,I),bh(g),I&&i&&EU(Ng.Current,g))}static isActiveSelf(g){return IQ(g)}static isActiveInHierarchy(g){return qU(g)}static markAsInstancedRendered(g,I){LU(g,I)}static isUsingInstancing(g){return Tp(g)}static foreachComponent(g,I,i=!0){return ws(g,I,i)}static instantiateSynced(g,I){return g?SU(g,I):null}static instantiate(g,I=null){return cr(g,I)}static destroySynced(g,I,i=!0){if(!g)return;const e=g;I=I??Ng.Current,bp(e,I.connection,i)}static destroy(g,I=!0,i=!0){return ds(g,I,i)}static add(g,I,i){if(!(!g||!I)){if(g===I){console.warn("Can not add object to self",g);return}i||(i=Ng.Current),I.add(g),rr(g,!0),bh(g),i?sA.foreachComponent(g,e=>{cU(e,i),!e.__internalDidAwakeAndStart&&i.new_script_start.includes(e)===!1&&i.new_script_start.push(e)},!0):console.warn("Missing context")}}static remove(g){var I;g&&((I=g.parent)==null||I.remove(g),rr(g,!1),bh(g),sA.foreachComponent(g,i=>{fT(i)},!0))}static invokeOnChildren(g,I,...i){this.invoke(g,I,!0,i)}static invoke(g,I,i=!1,...e){g&&this.foreachComponent(g,C=>{const o=C[I];o&&typeof o=="function"&&o.bind(C)(...e)},i)}static addNewComponent(g,I,i=!0){const e=new I;return Xo(g,e,i),e}static addComponent(g,I){if(I.gameObject==null)throw new Error("Did you mean to create a new component? Use addNewComponent");MU(g,I)}static removeComponent(g){return Hp(g.gameObject,g),g}static getOrAddComponent(g,I){return vp(g,I)}static getComponent(g,I){return g===null?null:AQ(g,I)}static getComponents(g,I,i=null){return g===null?i??[]:sr(g,I,i)}static findByGuid(g,I){return Er(g,I)}static findObjectOfType(g,I,i=!0){return mU(g,I??Ng.Current,i)}static findObjectsOfType(g,I){const i=[];return NU(g,i,I),i}static getComponentInChildren(g,I){return gQ(g,I)}static getComponentsInChildren(g,I,i=null){return nr(g,I,i??void 0)}static getComponentInParent(g,I){return Qr(g,I)}static getComponentsInParent(g,I,i=null){return Hh(g,I,i)}static getAllComponents(g){var e;return[...(e=g.userData)==null?void 0:e.components]}static*iterateComponents(g){var i;const I=(i=g==null?void 0:g.userData)==null?void 0:i.components;if(I&&Array.isArray(I))for(let e=0;e<I.length;e++)yield I[e]}}let Rl=(RI=class{constructor(){r(this,"__context");r(this,"__name");r(this,"gameObject");r(this,"guid","invalid");r(this,"sourceId");r(this,"__didAwake",!1);r(this,"__didStart",!1);r(this,"__didEnable",!1);r(this,"__isEnabled");r(this,"__destroyed",!1);r(this,"_worldPosition");r(this,"_worldQuaternion");r(this,"_worldEuler");r(this,"_worldRotation");r(this,"_eventListeners",new Map);this.__internalNewInstanceCreated()}get isComponent(){return!0}get context(){return this.__context??Ng.Current}set context(A){this.__context=A}get scene(){return this.context.scene}get layer(){var A,g;return(g=(A=this.gameObject)==null?void 0:A.userData)==null?void 0:g.layer}get name(){var A;return(A=this.gameObject)==null?void 0:A.userData.name}set name(A){this.gameObject?(this.gameObject.userData||(this.gameObject.userData={}),this.gameObject.userData.name=A,this.__name=A):this.__name=A}get tag(){var A;return(A=this.gameObject)==null?void 0:A.userData.tag}set tag(A){this.gameObject&&(this.gameObject.userData.tag=A)}get static(){var A;return(A=this.gameObject)==null?void 0:A.userData.static}get hideFlags(){var A;return(A=this.gameObject)==null?void 0:A.userData.hideFlags}get activeAndEnabled(){return!(this.destroyed||this.__isEnabled===!1||!this.__isActiveInHierarchy)}get __isActive(){return this.gameObject.visible}get __isActiveInHierarchy(){if(!this.gameObject)return!1;const A=this.gameObject[Vo];return A===void 0?!0:A}set __isActiveInHierarchy(A){this.gameObject&&(this.gameObject[Vo]=A)}awake(){}onEnable(){}onDisable(){}onDestroy(){this.__destroyed=!0}startCoroutine(A,g=re.Update){return this.context.registerCoroutineUpdate(this,A,g)}stopCoroutine(A,g=re.Update){this.context.unregisterCoroutineUpdate(A,g)}get destroyed(){return this.__destroyed}destroy(){this.__destroyed||this.__internalDestroy()}get __internalDidAwakeAndStart(){return this.__didAwake&&this.__didStart}__internalNewInstanceCreated(){this.__didAwake=!1,this.__didStart=!1,this.__didEnable=!1,this.__isEnabled=void 0,this.__destroyed=!1}__internalAwake(){this.__didAwake||(this.__didAwake=!0,this.awake())}__internalStart(){this.__didStart||(this.__didStart=!0,this.start&&this.start())}__internalEnable(){return this.__didEnable?!1:(this.__didEnable=!0,this.onEnable(),this.__isEnabled=!0,!0)}__internalDisable(){this.__didEnable&&(this.__didEnable=!1,this.onDisable(),this.__isEnabled=!1)}__internalDestroy(){var A;this.__destroyed||(this.__destroyed=!0,(A=this.destroy)==null||A.call(this),UU(this))}get enabled(){return this.__isEnabled??!0}set enabled(A){if(typeof A=="number"&&(A>=.5?A=!0:A=!1),!this.__didAwake){this.__isEnabled=A;return}A?this.__internalEnable():this.__internalDisable()}get worldPosition(){return this._worldPosition||(this._worldPosition=new M),pg(this.gameObject,this._worldPosition),this._worldPosition}set worldPosition(A){Di(this.gameObject,A)}setWorldPosition(A,g,I){RI._worldPositionBuffer.set(A,g,I),this.worldPosition=RI._worldPositionBuffer}get worldQuaternion(){return this._worldQuaternion||(this._worldQuaternion=new kA),Ke(this.gameObject,this._worldQuaternion)}set worldQuaternion(A){iC(this.gameObject,A)}setWorldQuaternion(A,g,I,i){RI._worldQuaternionBuffer.set(A,g,I,i),this.worldQuaternion=RI._worldQuaternionBuffer}get worldEuler(){return this._worldEuler||(this._worldEuler=new TI),this._worldEuler.setFromQuaternion(this.worldQuaternion),this._worldEuler}set worldEuler(A){var g;this._worldQuaternion||(this._worldQuaternion=new kA),(g=this._worldQuaternion)==null||g.setFromEuler(A),this.worldQuaternion=this._worldQuaternion}get worldRotation(){const A=this.worldEuler;this._worldRotation||(this._worldRotation=new M);const g=this._worldRotation;return g.set(A.x,A.y,A.z),g.x=gg.toDegrees(g.x),g.y=gg.toDegrees(g.y),g.z=gg.toDegrees(g.z),g}set worldRotation(A){this.setWorldRotation(A.x,A.y,A.z,!0)}setWorldRotation(A,g,I,i=!0){i&&(A=gg.toRadians(A),g=gg.toRadians(g),I=gg.toRadians(I)),RI._worldEulerBuffer.set(A,g,I),RI._worldQuaternionBuffer.setFromEuler(RI._worldEulerBuffer),this.worldQuaternion=RI._worldQuaternionBuffer}get forward(){return RI._forward.set(0,0,-1).applyQuaternion(this.worldQuaternion)}get right(){return RI._right.set(1,0,0).applyQuaternion(this.worldQuaternion)}get up(){return RI._up.set(0,1,0).applyQuaternion(this.worldQuaternion)}addEventListener(A,g){this._eventListeners[A]=this._eventListeners[A]||[],this._eventListeners[A].push(g)}removeEventListener(A,g){if(!this._eventListeners[A])return;const I=this._eventListeners[A].indexOf(g);I>=0&&this._eventListeners[A].splice(I,1)}dispatchEvent(A){if(!this._eventListeners[A.type])return!1;const g=this._eventListeners[A.type];for(let I=0;I<g.length;I++)g[I](A);return!1}},r(RI,"_worldPositionBuffer",new M),r(RI,"_worldQuaternionBuffer",new kA),r(RI,"_worldEulerBuffer",new TI),r(RI,"_tempQuaternionBuffer2",new kA),r(RI,"_forward",new M),r(RI,"_right",new M),r(RI,"_up",new M),RI);class vA extends Rl{}const QO=Object.freeze(Object.defineProperty({__proto__:null,Behaviour:vA,Component:Rl,GameObject:sA},Symbol.toStringTag,{value:"Module"})),EC=function(t,A){return function(g,I,i){aO(g,I,i,t,A)}};function aO(t,A,g,I,i){if(!(!i&&!I&&!t.onValidate)){if(g!==void 0){console.error("Invalid usage of validate decorator. Only fields can be validated.",t,A,g),Ne("Invalid usage of validate decorator. Only fields can be validated. Property: "+A,qC.Error);return}if(t.__internalAwake){const e=Symbol(A),C=t.__internalAwake;t.__internalAwake=function(){this[e]===void 0&&(this[e]=this[A],Object.defineProperty(this,A,{set:function(o){var B;if(this[Up]===!0)this[e]=o;else{I==null||I.call(this,o);const s=this[e];this[e]=o,(B=this.onValidate)==null||B.call(this,A,s)}},get:function(){return i==null||i.call(this),this[e]}})),C.call(this)}}}}class qy{constructor(A,g,I,i){r(this,"_name");r(this,"_nameHash");r(this,"_normalizedTime");r(this,"_length");r(this,"_speed");this._name=A.name,this._nameHash=A.hash,this._normalizedTime=g,this._length=I,this._speed=i}get name(){return this._name}get nameHash(){return this._nameHash}get normalizedTime(){return this._normalizedTime}get length(){return this._length}get speed(){return this._speed}}function rO(t,A){return{name:"",isLooping:!1,guid:(A==null?void 0:A.generateUUID())??Be.generateUUID(),index:-1,clip:new Mt(t,1,[])}}var ks=(t=>(t[t.If=1]="If",t[t.IfNot=2]="IfNot",t[t.Greater=3]="Greater",t[t.Less=4]="Less",t[t.Equals=6]="Equals",t[t.NotEqual=7]="NotEqual",t))(ks||{}),AF=(t=>(t[t.Float=1]="Float",t[t.Int=3]="Int",t[t.Bool=4]="Bool",t[t.Trigger=9]="Trigger",t))(AF||{});const Co=wA("debuganimatorcontroller"),Fl=wA("debugrootmotion");class Ms{constructor(A){r(this,"normalizedStartOffset",0);r(this,"_speed",1);r(this,"animator");r(this,"model");r(this,"_mixer");r(this,"_activeState");r(this,"_activeStates",[]);r(this,"rootMotionHandler");this.model=A,Co&&console.log(this)}play(A,g=-1,I=Number.NEGATIVE_INFINITY,i=0){if(g<0)g=0;else if(g>=this.model.layers.length){console.warn("invalid layer");return}const C=this.model.layers[g].stateMachine;for(const o of C.states)if(o.name===A||o.hash===A){Co&&console.log("transition to ",o),this.transitionTo(o,i,I);return}console.warn("Could not find "+A+" to play")}reset(){this.setStartTransition()}setBool(A,g){var i,e;const I=typeof A=="string"?"name":"hash";return(e=(i=this.model)==null?void 0:i.parameters)==null?void 0:e.filter(C=>C[I]===A).forEach(C=>C.value=g)}getBool(A){var I,i,e;const g=typeof A=="string"?"name":"hash";return((e=(i=(I=this.model)==null?void 0:I.parameters)==null?void 0:i.find(C=>C[g]===A))==null?void 0:e.value)??!1}setFloat(A,g){var i,e;const I=typeof A=="string"?"name":"hash";return(e=(i=this.model)==null?void 0:i.parameters)==null?void 0:e.filter(C=>C[I]===A).forEach(C=>C.value=g)}getFloat(A){var I,i,e;const g=typeof A=="string"?"name":"hash";return((e=(i=(I=this.model)==null?void 0:I.parameters)==null?void 0:i.find(C=>C[g]===A))==null?void 0:e.value)??0}setInteger(A,g){var i,e;const I=typeof A=="string"?"name":"hash";return(e=(i=this.model)==null?void 0:i.parameters)==null?void 0:e.filter(C=>C[I]===A).forEach(C=>C.value=g)}getInteger(A){var I,i,e;const g=typeof A=="string"?"name":"hash";return((e=(i=(I=this.model)==null?void 0:I.parameters)==null?void 0:i.find(C=>C[g]===A))==null?void 0:e.value)??0}setTrigger(A){var I,i;Co&&console.log("SET TRIGGER",A);const g=typeof A=="string"?"name":"hash";return(i=(I=this.model)==null?void 0:I.parameters)==null?void 0:i.filter(e=>e[g]===A).forEach(e=>e.value=!0)}resetTrigger(A){var I,i;const g=typeof A=="string"?"name":"hash";return(i=(I=this.model)==null?void 0:I.parameters)==null?void 0:i.filter(e=>e[g]===A).forEach(e=>e.value=!1)}isInTransition(){return this._activeStates.length>1}setSpeed(A){this._speed=A}FindState(A){return this.findState(A)}findState(A){if(!A)return null;if(Array.isArray(this.model.layers)){for(const g of this.model.layers)for(const I of g.stateMachine.states)if(I.name===A)return I}return null}get context(){var A;return(A=this.animator)==null?void 0:A.context}bind(A){this.animator=A,this._mixer=new Gh(this.animator.gameObject),this.createActions(this.animator)}clone(){if(typeof this.model=="string")return console.warn("AnimatorController has not been resolved, can not create model from string",this.model),null;const A=zd(this.model,(I,i,e)=>e==null?!0:!(e.type==="Object3D"||e.isObject3D===!0||dT(e)||e.tracks!==void 0));return console.assert(A!==this.model),new Ms(A)}update(){var g,I;if(!this.animator||(this.evaluateTransitions(),this.updateActiveStates(),!this._activeState))return;const A=this.animator.context.time.deltaTime;this.animator.applyRootMotion&&((g=this.rootMotionHandler)==null||g.onBeforeUpdate()),this._mixer.update(A),this.animator.applyRootMotion&&((I=this.rootMotionHandler)==null||I.onAfterUpdate())}updateActiveStates(){for(let A=0;A<this._activeStates.length;A++){const g=this._activeStates[A],I=g.motion;if(!I.action)this._activeStates.splice(A,1),A--;else{const i=I.action;i.getEffectiveWeight()<=0&&!i.isRunning()&&(Co&&console.debug("REMOVE",g.name,i.getEffectiveWeight(),i.isRunning(),i.isScheduled()),this._activeStates.splice(A,1),A--)}}}setStartTransition(){for(const A of this.model.layers){const g=A.stateMachine;g.defaultState===void 0&&(Co&&console.warn("AnimatorController default state is undefined, will assign state 0 as default",A),g.defaultState=0);const I=g.states[g.defaultState];this.transitionTo(I,0,this.normalizedStartOffset)}}evaluateTransitions(){var e;let A=!1;if(!this._activeState){if(this.setStartTransition(),!this._activeState)return;A=!0}const g=this._activeState,I=g.motion.action;for(const C of g.transitions){if(!C.hasExitTime&&C.conditions.length<=0)continue;let o=!0;for(const B of C.conditions)if(!this.evaluateCondition(B)){o=!1;break}if(o){for(const B of C.conditions){const s=this.model.parameters.find(n=>n.name===B.parameter);(s==null?void 0:s.type)===AF.Trigger&&(s.value=!1)}if(I){const B=g.motion.clip.duration,s=B<=0?1:I.time/B;if(C.hasExitTime?s>=C.exitTime:!0){I.clampWhenFinished=!0,Co&&console.log("transition to "+C.destinationState,C,s,C.exitTime,C.hasExitTime),this.transitionTo(C.destinationState,C.duration,C.offset);return}}else{this.transitionTo(C.destinationState,C.duration,C.offset);return}}}let i=!1;if(g.motion.isLooping&&I&&I.time>=I.getClip().duration&&(i=!0,I.reset(),I.time=0,I.play()),!i&&g&&!A&&I&&this.animator&&g.behaviours){const C=I==null?void 0:I.getClip().duration,o=I.time/C,B=new qy(this._activeState,o,C,this._speed);for(const s of g.behaviours)s.instance&&((e=s.instance.onStateUpdate)==null||e.call(s.instance,this.animator,B,0))}}getState(A,g){return typeof A=="number"&&(A==-1&&(A=this.model.layers[g].stateMachine.defaultState,A===void 0&&(Co&&console.warn("AnimatorController default state is undefined: ",this.model,"Layer: "+g),A=0)),A=this.model.layers[g].stateMachine.states[A]),A}transitionTo(A,g,I){var s,n,a,Q,E,c,h,l;if(!this.animator)return;const i=0;if(A=this.getState(A,i),!(A!=null&&A.motion)||!A.motion.clip)return;const e=this._activeState===A;if(e){const w=A.motion;!w.action_loopback&&w.clip&&(this._mixer.uncacheAction(w.clip,this.animator.gameObject),w.action_loopback=this.createAction(w.clip))}if((s=this._activeState)!=null&&s.behaviours&&this._activeState.motion.action){const w=(n=this._activeState)==null?void 0:n.motion.clip.duration,p=this._activeState.motion.action.time/w,D=new qy(this._activeState,p,w,this._speed);for(const d of this._activeState.behaviours)(Q=(a=d.instance)==null?void 0:a.onStateExit)==null||Q.call(d.instance,this.animator,D,i)}const C=(E=this._activeState)==null?void 0:E.motion.action;C&&C.fadeOut(g),e&&(A.motion.action=A.motion.action_loopback,A.motion.action_loopback=C);const o=this._activeState;this._activeState=A;const B=(c=A.motion)==null?void 0:c.action;if(B){I=Math.max(0,Math.min(1,I)),B.isRunning()&&B.stop(),B.reset(),B.timeScale=this._speed,B.enabled=!0;const w=A.motion.clip.duration;if(B.time=I*w,B.clampWhenFinished=!0,B.setLoop(la,0),g>0?B.fadeIn(g):B.setEffectiveWeight(1),B.play(),this.rootMotionHandler&&this.rootMotionHandler.onStart(B),this._activeStates.includes(A)||this._activeStates.push(A),this._activeState.behaviours){const p=new qy(A,I,w,this._speed);for(const D of this._activeState.behaviours)(l=(h=D.instance)==null?void 0:h.onStateEnter)==null||l.call(D.instance,this.animator,p,i)}}else console.warn("No action",A.motion,this);Co&&console.log("TRANSITION FROM "+(o==null?void 0:o.name)+" TO "+A.name,g,C,B,B==null?void 0:B.getEffectiveTimeScale(),B==null?void 0:B.getEffectiveWeight(),B==null?void 0:B.isRunning(),B==null?void 0:B.isScheduled(),B==null?void 0:B.paused)}createAction(A){var I,i;if(this._mixer.existingAction(A)&&this._mixer.uncacheAction(A,(I=this.animator)==null?void 0:I.gameObject),(i=this.animator)!=null&&i.applyRootMotion){this.rootMotionHandler||(this.rootMotionHandler=new EO(this));const e=this.animator.gameObject;return this.rootMotionHandler.createClip(this._mixer,e,A)}else return this._mixer.clipAction(A)}evaluateCondition(A){const g=this.model.parameters.find(I=>I.name===A.parameter);if(!g)return!1;switch(A.mode){case ks.If:return g.value===!0;case ks.IfNot:return g.value===!1;case ks.Greater:return g.value>A.threshold;case ks.Less:return g.value<A.threshold;case ks.Equals:return g.value===A.threshold;case ks.NotEqual:return g.value!==A.threshold}return!1}createActions(A){var g,I;for(const i of this.model.layers){const e=i.stateMachine;for(let C=0;C<e.states.length;C++){const o=e.states[C];o.transitions||(o.transitions=[]);for(const B of o.transitions)B.conditions||(B.conditions=[]);if(o.motion||(o.motion=rO(o.name)),this.animator&&o.motion.clips){const B=(g=o.motion.clips)==null?void 0:g.find(s=>{var n,a;return s.node.name===((a=(n=this.animator)==null?void 0:n.gameObject)==null?void 0:a.name)});o.motion.clip=B==null?void 0:B.clip}if(!o.motion.clip){const B=new Mt(void 0,void 0,[]);o.motion.clip=B}if((I=o.motion)!=null&&I.clip){const B=o.motion.clip,s=this.createAction(B);o.motion.action=s}if(o.behaviours&&Array.isArray(o.behaviours))for(const B of o.behaviours){if(!(B!=null&&B.typeName))continue;const s=gA.get(B.typeName),n=new s;n.isStateMachineBehaviour&&(n._context=this.context??void 0,cs(n,B.properties),B.instance=n),Co&&console.log("Created animator controller behaviour",o.name,B.typeName,B.properties,n)}}}}*enumerateActions(){for(const A of this.model.layers){const g=A.stateMachine;for(let I=0;I<g.states.length;I++){const i=g.states[I];i!=null&&i.motion&&(i.motion.action&&(yield i.motion.action),i.motion.action_loopback&&(yield i.motion.action_loopback))}}}}class gF{constructor(A,g){r(this,"track");r(this,"createdInterpolant");r(this,"originalEvaluate");r(this,"customEvaluate");this.track=A;const I=A,i=I.createInterpolant.bind(A);I.createInterpolant=()=>(I.createInterpolant=i,this.createdInterpolant=i(),this.originalEvaluate=this.createdInterpolant.evaluate.bind(this.createdInterpolant),this.customEvaluate=e=>{if(!this.originalEvaluate)return;const C=this.originalEvaluate(e);return g(e,C)},this.createdInterpolant.evaluate=this.customEvaluate,this.createdInterpolant)}evaluate(A){this.customEvaluate&&this.customEvaluate(A)}dispose(){this.createdInterpolant&&this.originalEvaluate&&(this.createdInterpolant.evaluate=this.originalEvaluate),this.track=void 0,this.createdInterpolant=null,this.originalEvaluate=void 0,this.customEvaluate=void 0}}const VI=class{constructor(A,g,I,i,e){r(this,"_action");r(this,"root");r(this,"clip");r(this,"positionWrapper",null);r(this,"rotationWrapper",null);r(this,"context");r(this,"positionChange",new M);r(this,"rotationChange",new kA);if(this.context=A,this.root=g,this.clip=I,VI.firstKeyframeRotation[I.uuid]||(VI.firstKeyframeRotation[I.uuid]=new kA),e){const C=e.values;VI.firstKeyframeRotation[I.uuid].set(C[0],C[1],C[2],C[3])}VI.spaceRotation[I.uuid]||(VI.spaceRotation[I.uuid]=new kA),VI.effectiveSpaceRotation[I.uuid]||(VI.effectiveSpaceRotation[I.uuid]=new kA),VI.clipOffsetRotation[I.uuid]=new kA,e&&VI.clipOffsetRotation[I.uuid].set(e.values[0],e.values[1],e.values[2],e.values[3]).invert(),this.handlePosition(I,i),this.handleRotation(I,e)}set action(A){this._action=A}get action(){return this._action}onStart(A){if(A.getClip()!==this.clip)return;const g=VI.lastObjRotation[this.root.uuid];if(VI.spaceRotation[this.clip.uuid].copy(g),Fl){const I=new TI().setFromQuaternion(g);console.log("START",this.clip.name,gg.toDegrees(I.y))}}getClipRotationOffset(){return VI.clipOffsetRotation[this.clip.uuid]}handlePosition(A,g){if(g){const I=this.root;Fl&&I.add(new Vn),VI.lastObjPosition[I.uuid]||(VI.lastObjPosition[I.uuid]=new M);const i=new M,e=new M;let C=0;this.positionWrapper=new gF(g,(o,B)=>{const s=this.action.getEffectiveWeight();if(Fl&&I.position.length()>8&&I.position.set(0,I.position.y,0),o>C){i.set(B[0],B[1],B[2]),i.sub(e),i.multiplyScalar(s),i.applyQuaternion(this.getClipRotationOffset());const n=this.clip.uuid;i.applyQuaternion(VI.spaceRotation[n]),this.positionChange.copy(i)}return e.fromArray(B),C=o,B[0]=0,B[1]=0,B[2]=0,B})}}handleRotation(A,g){if(g){if(Fl){const o=g.values,B=new TI().setFromQuaternion(new kA(o[0],o[1],o[2],o[3]));console.log(A.name,g.name,"FIRST ROTATION IN TRACK",gg.toDegrees(B.y));const s=g.values.length-4,n=new kA().set(o[s],o[s+1],o[s+2],o[s+3]),a=new TI().setFromQuaternion(n);console.log(A.name,g.name,"LAST ROTATION IN TRACK",gg.toDegrees(a.y))}const I=this.root;VI.lastObjRotation[I.uuid]||(VI.lastObjRotation[I.uuid]=new kA);let i=0;const e=new kA,C=new kA;this.rotationWrapper=new gF(g,(o,B)=>(o>i&&(C.set(B[0],B[1],B[2],B[3]),e.invert(),C.multiply(e),this.rotationChange.copy(C)),e.fromArray(B),i=o,B[0]=0,B[1]=0,B[2]=0,B[3]=1,B))}}onBeforeUpdate(){this.positionChange.set(0,0,0),this.rotationChange.set(0,0,0,1)}onAfterUpdate(){const A=this.action.getEffectiveWeight();this.positionChange.multiplyScalar(A),this.rotationChange.slerp(VI.identityQuaternion,1-A)}};let Nt=VI;r(Nt,"lastObjPosition",{}),r(Nt,"lastObjRotation",{}),r(Nt,"firstKeyframeRotation",{}),r(Nt,"spaceRotation",{}),r(Nt,"effectiveSpaceRotation",{}),r(Nt,"clipOffsetRotation",{}),r(Nt,"identityQuaternion",new kA);class EO{constructor(A){r(this,"controller");r(this,"handler",[]);r(this,"root");r(this,"summedPosition",new M);r(this,"summedRotation",new kA);this.controller=A}createClip(A,g,I){this.root=g,g&&"name"in g&&g.name;const i=this.findRootTrack(I,".position"),e=this.findRootTrack(I,".quaternion"),C=new Nt(this.controller.context,g,I,i,e);this.handler.push(C);const o=A.clipAction(I);return C.action=o,o}onStart(A){for(const g of this.handler)g.onStart(A)}onBeforeUpdate(){for(const A of this.handler)A.onBeforeUpdate()}onAfterUpdate(){this.summedPosition.set(0,0,0),this.summedRotation.set(0,0,0,1);for(const A of this.handler)A.onAfterUpdate(),this.summedPosition.add(A.positionChange),this.summedRotation.multiply(A.rotationChange);this.root.position.add(this.summedPosition),this.root.quaternion.multiply(this.summedRotation),Nt.lastObjRotation[this.root.uuid].copy(this.root.quaternion)}findRootTrack(A,g){const I=A.tracks;for(const i of I)if(i.name.endsWith(g))return i;return null}}const ml=function(t){return R(t)},R=function(t){if(t===void 0&&(t=null),!Array.isArray(t))t=IF(t);else for(let A=0;A<t.length;A++){const g=t[A];t[A]=IF(g)}return function(A,g){Object.getOwnPropertyDescriptor(A,"$serializedTypes")||(A.$serializedTypes={});const I=A.$serializedTypes=A.$serializedTypes||{};I[g]=t}};function IF(t){var A,g;switch((g=(A=t==null?void 0:t.prototype)==null?void 0:A.constructor)==null?void 0:g.name){case"Number":case"String":case"Boolean":return null}return t}var cO=Object.defineProperty,hO=Object.getOwnPropertyDescriptor,Nl=(t,A,g,I)=>{for(var i=I>1?void 0:I?hO(A,g):A,e=t.length-1,C;e>=0;e--)(C=t[e])&&(i=(I?C(A,g,i):C(i))||i);return I&&i&&cO(A,g,i),i};const iF=wA("debuganimator");class xe extends vA{constructor(){super(...arguments);r(this,"applyRootMotion",!1);r(this,"hasRootMotion",!1);r(this,"keepAnimatorControllerStateOnDisable",!1);r(this,"speed",1);r(this,"normalizedStartOffset",0);r(this,"_animatorController",null)}set runtimeAnimatorController(g){this._animatorController&&this._animatorController.model===g||(g?g instanceof Ms?this._animatorController=g:(iF&&console.log("Assign animator controller",g,this),this._animatorController=new Ms(g)):this._animatorController=null)}get runtimeAnimatorController(){return this._animatorController}Play(g,I=-1,i=Number.NEGATIVE_INFINITY,e=0){this.play(g,I,i,e)}play(g,I=-1,i=Number.NEGATIVE_INFINITY,e=0){var C;(C=this.runtimeAnimatorController)==null||C.play(g,I,i,e)}Reset(){this.reset()}reset(){var g;(g=this._animatorController)==null||g.reset()}SetBool(g,I){this.setBool(g,I)}setBool(g,I){var i;(i=this.runtimeAnimatorController)==null||i.setBool(g,I)}GetBool(g){return this.getBool(g)}getBool(g){var I;return console.log("name",g),((I=this.runtimeAnimatorController)==null?void 0:I.getBool(g))??!1}SetFloat(g,I){this.setFloat(g,I)}setFloat(g,I){var i;(i=this.runtimeAnimatorController)==null||i.setFloat(g,I)}GetFloat(g){return this.getFloat(g)}getFloat(g){var I;return((I=this.runtimeAnimatorController)==null?void 0:I.getFloat(g))??-1}SetInteger(g,I){this.setInteger(g,I)}setInteger(g,I){var i;(i=this.runtimeAnimatorController)==null||i.setInteger(g,I)}GetInteger(g){return this.getInteger(g)}getInteger(g){var I;return((I=this.runtimeAnimatorController)==null?void 0:I.getInteger(g))??-1}SetTrigger(g){this.setTrigger(g)}setTrigger(g){var I;console.log("name",g),(I=this.runtimeAnimatorController)==null||I.setTrigger(g)}ResetTrigger(g){this.resetTrigger(g)}resetTrigger(g){var I;(I=this.runtimeAnimatorController)==null||I.resetTrigger(g)}IsInTransition(){return this.isInTransition()}isInTransition(){var g;return((g=this.runtimeAnimatorController)==null?void 0:g.isInTransition())??!1}SetSpeed(g){return this.setSpeed(g)}setSpeed(g){var I;g!==this.speed&&(this.speed=g,(I=this._animatorController)==null||I.setSpeed(g))}set minMaxSpeed(g){this.speed=gg.lerp(g.x,g.y,Math.random())}set minMaxOffsetNormalized(g){this.normalizedStartOffset=gg.lerp(g.x,g.y,Math.random()),this.runtimeAnimatorController&&(this.runtimeAnimatorController.normalizedStartOffset=this.normalizedStartOffset)}awake(){if(iF&&console.log("ANIMATOR",this.name,this),!!this.gameObject&&this.runtimeAnimatorController){const g=this.runtimeAnimatorController.clone();g?(console.assert(this.runtimeAnimatorController!==g),this.runtimeAnimatorController=g,console.assert(this.runtimeAnimatorController===g),this.runtimeAnimatorController.bind(this),this.runtimeAnimatorController.setSpeed(this.speed),this.runtimeAnimatorController.normalizedStartOffset=this.normalizedStartOffset):console.warn("Could not clone animator controller",this.runtimeAnimatorController)}}onDisable(){var g;this.keepAnimatorControllerStateOnDisable||(g=this._animatorController)==null||g.reset()}onBeforeRender(){this._animatorController&&this._animatorController.update()}}Nl([R()],xe.prototype,"applyRootMotion",2),Nl([R()],xe.prototype,"hasRootMotion",2),Nl([R()],xe.prototype,"keepAnimatorControllerStateOnDisable",2),Nl([R()],xe.prototype,"runtimeAnimatorController",1);var lO=Object.defineProperty,DO=Object.getOwnPropertyDescriptor,Nr=(t,A,g,I)=>{for(var i=I>1?void 0:I?DO(A,g):A,e=t.length-1,C;e>=0;e--)(C=t[e])&&(i=(I?C(A,g,i):C(i))||i);return I&&i&&lO(A,g,i),i};const CB=wA("debuganimation");class Kt extends vA{constructor(){super(...arguments);r(this,"playAutomatically",!0);r(this,"randomStartTime",!0);r(this,"minMaxSpeed");r(this,"minMaxOffsetNormalized");r(this,"loop",!0);r(this,"clampWhenFinished",!1);r(this,"_tempAnimationClipBeforeGameObjectExisted",null);r(this,"mixer");r(this,"_actions",[]);r(this,"_currentActions",[]);r(this,"_handles",[]);r(this,"_didInit",!1)}get clip(){var g;return(g=this.animations)!=null&&g.length?this.animations[0]:null}set clip(g){if(!this.__didAwake){CB&&console.log("Assign clip during serialization",g),this._tempAnimationClipBeforeGameObjectExisted=g;return}g&&(CB&&console.log("Assign clip",g,Boolean(this.gameObject)),this.gameObject.animations||(this.gameObject.animations=[]),!this.animations.includes(g)&&(this.animations.length>0?this.animations.splice(0,0,g):this.animations.push(g)))}set clips(g){this.animations=g}set animations(g){CB&&console.log("assign animations",g),this.gameObject.animations=g}get animations(){return this.gameObject.animations}get currentAction(){return this._currentActions[0]}get currentActions(){return this._currentActions}get actions(){return this._actions}set actions(g){this._actions=g}awake(){CB&&console.log(this),this._tempAnimationClipBeforeGameObjectExisted&&(this.clip=this._tempAnimationClipBeforeGameObjectExisted,this._tempAnimationClipBeforeGameObjectExisted=null),this.playAutomatically&&this.init()}onEnable(){var g;if(this.playAutomatically&&((g=this.animations)==null?void 0:g.length)>0&&this.currentActions.length<=0){const I=Math.floor(Math.random()*this.actions.length);this.play(I)}}start(){this.randomStartTime&&this.currentAction&&(this.currentAction.time=Math.random()*this.currentAction.getClip().duration)}update(){this.mixer&&this.mixer.update(this.context.time.deltaTime)}getAction(g){var I;return(I=this.actions)==null?void 0:I.find(i=>i.getClip().name===g)}get isPlaying(){for(let g=0;g<this._currentActions.length;g++)if(this._currentActions[g].isRunning())return!0;return!1}play(g,I){if(CB&&console.log("PLAY",g),this.init(),!this.mixer){CB&&console.warn("Missing mixer",this);return}g===void 0&&(g=0);let i=g;if(typeof g=="number"){if(g>=this.animations.length){CB&&console.log("No animation at index",g);return}i=this.animations[g]}else typeof g=="string"&&(i=this.animations.find(C=>C.name===g));if(!i){console.error("Could not find clip",g);return}I||(I={}),I.minMaxOffsetNormalized||(I.minMaxOffsetNormalized=this.minMaxOffsetNormalized),I.minMaxSpeed||(I.minMaxSpeed=this.minMaxSpeed),I.loop||(I.loop=this.loop),I.clampWhenFinished||(I.clampWhenFinished=this.clampWhenFinished);for(const C of this.actions)if(C.getClip()===i)return this.internalOnPlay(C,I);const e=this.mixer.clipAction(i);return this.actions.push(e),this.internalOnPlay(e,I)}internalOnPlay(g,I){var i=this.currentAction;if(i===g&&i.isRunning()&&i.time<i.getClip().duration){const B=this.tryFindHandle(g);if(B)return B.getPromise()}const e=(I==null?void 0:I.exclusive)??!0;I!=null&&I.fadeDuration?(e&&(i==null||i.fadeOut(I.fadeDuration)),g.fadeIn(I.fadeDuration)):e&&(i==null||i.stop()),g.reset(),g.enabled=!0,g.time=0,g.timeScale=1;const C=g.getClip();I!=null&&I.minMaxOffsetNormalized&&(g.time=gg.lerp(I.minMaxOffsetNormalized.x,I.minMaxOffsetNormalized.y,Math.random())*C.duration),I!=null&&I.minMaxSpeed&&(g.timeScale=gg.lerp(I.minMaxSpeed.x,I.minMaxSpeed.y,Math.random())),I!=null&&I.clampWhenFinished&&(g.clampWhenFinished=!0),(I==null?void 0:I.startTime)!==void 0&&(g.time=I.startTime),(I==null?void 0:I.loop)!==void 0?g.loop=I.loop?bw:la:g.loop=la,g.play(),CB&&console.log("PLAY",g.getClip().name,g);const o=new dO(g,this.mixer,I,B=>{this._handles.splice(this._handles.indexOf(o),1)});return this._handles.push(o),o.getPromise()}tryFindHandle(g){for(const I of this._handles)if(I.action===g)return I}init(){this._didInit||(this._didInit=!0,this.gameObject&&(this.actions=[],this.mixer=new Gh(this.gameObject)))}}Nr([R()],Kt.prototype,"playAutomatically",2),Nr([R()],Kt.prototype,"randomStartTime",2),Nr([R()],Kt.prototype,"loop",2),Nr([R()],Kt.prototype,"clampWhenFinished",2),Nr([R(Mt)],Kt.prototype,"clips",1);class dO{constructor(A,g,I,i){r(this,"mixer");r(this,"action");r(this,"promise",null);r(this,"resolve",null);r(this,"reject",null);r(this,"_options");r(this,"_resolveCallback",null);r(this,"_rejectCallback",null);r(this,"_loopCallback");r(this,"_finishedCallback");r(this,"_resolvedOrRejectedCallback");this.action=A,this.mixer=g,this._resolvedOrRejectedCallback=i,this._options=I}getPromise(){return this.promise?this.promise:(this.promise=new Promise((A,g)=>{this._resolveCallback=A,this._rejectCallback=g,this.resolve=this.onResolve.bind(this),this.reject=this.onReject.bind(this)}),this._loopCallback=this.onLoop.bind(this),this._finishedCallback=this.onFinished.bind(this),this.mixer.addEventListener("loop",this._loopCallback),this.mixer.addEventListener("finished",this._finishedCallback),this.promise)}_update(){this._options&&this._options.endTime!==void 0&&this.action.time>this._options.endTime&&(this._options.loop===!0?this.action.time=this._options.startTime??0:(this.action.time=this._options.endTime,this.action.timeScale=0,this.onResolve()))}onResolve(){var A,g;this.dispose(),(A=this._resolvedOrRejectedCallback)==null||A.call(this,this),(g=this._resolveCallback)==null||g.call(this,this.action)}onReject(A){var g,I;this.dispose(),(g=this._resolvedOrRejectedCallback)==null||g.call(this,this),(I=this._rejectCallback)==null||I.call(this,A)}onLoop(A){}onFinished(A){A.action===this.action&&this.onResolve()}dispose(){this._loopCallback&&this.mixer.removeEventListener("loop",this._loopCallback),this._finishedCallback&&this.mixer.removeEventListener("finished",this._finishedCallback),this._loopCallback=void 0,this._finishedCallback=void 0}}class QQ extends Yi{constructor(A){super(A),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.animationPointerResolver=null,this.pluginCallbacks=[],this.register(function(g){return new SO(g)}),this.register(function(g){return new mO(g)}),this.register(function(g){return new NO(g)}),this.register(function(g){return new kO(g)}),this.register(function(g){return new MO(g)}),this.register(function(g){return new UO(g)}),this.register(function(g){return new RO(g)}),this.register(function(g){return new yO(g)}),this.register(function(g){return new FO(g)}),this.register(function(g){return new GO(g)}),this.register(function(g){return new uO(g)}),this.register(function(g){return new KO(g)}),this.register(function(g){return new JO(g)}),this.register(function(g){return new fO(g)})}load(A,g,I,i){const e=this;let C;this.resourcePath!==""?C=this.resourcePath:this.path!==""?C=this.path:C=gC.extractUrlBase(A),this.manager.itemStart(A);const o=function(s){i?i(s):console.error(s),e.manager.itemError(A),e.manager.itemEnd(A)},B=new ii(this.manager);B.setPath(this.path),B.setResponseType("arraybuffer"),B.setRequestHeader(this.requestHeader),B.setWithCredentials(this.withCredentials),B.load(A,function(s){try{e.parse(s,C,function(n){g(n),e.manager.itemEnd(A)},o)}catch(n){o(n)}},I,o)}setDRACOLoader(A){return this.dracoLoader=A,this}setDDSLoader(){throw new Error('THREE.GLTFLoader: "MSFT_texture_dds" no longer supported. Please update to "KHR_texture_basisu".')}setKTX2Loader(A){return this.ktx2Loader=A,this}setMeshoptDecoder(A){return this.meshoptDecoder=A,this}setAnimationPointerResolver(A){return this.animationPointerResolver=A,this}register(A){return this.pluginCallbacks.indexOf(A)===-1&&this.pluginCallbacks.push(A),this}unregister(A){return this.pluginCallbacks.indexOf(A)!==-1&&this.pluginCallbacks.splice(this.pluginCallbacks.indexOf(A),1),this}parse(A,g,I,i){let e;const C={},o={};if(typeof A=="string")e=JSON.parse(A);else if(A instanceof ArrayBuffer)if(gC.decodeText(new Uint8Array(A,0,4))===eF){try{C[Rg.KHR_BINARY_GLTF]=new qO(A)}catch(n){i&&i(n);return}e=JSON.parse(C[Rg.KHR_BINARY_GLTF].content)}else e=JSON.parse(gC.decodeText(new Uint8Array(A)));else e=A;if(e.asset===void 0||e.asset.version[0]<2){i&&i(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const B=new WO(e,{path:g||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder,animationPointerResolver:this.animationPointerResolver});B.fileLoader.setRequestHeader(this.requestHeader);for(let s=0;s<this.pluginCallbacks.length;s++){const n=this.pluginCallbacks[s](B);o[n.name]=n,C[n.name]=!0}if(e.extensionsUsed)for(let s=0;s<e.extensionsUsed.length;++s){const n=e.extensionsUsed[s],a=e.extensionsRequired||[];switch(n){case Rg.KHR_MATERIALS_UNLIT:C[n]=new pO;break;case Rg.KHR_DRACO_MESH_COMPRESSION:C[n]=new LO(e,this.dracoLoader);break;case Rg.KHR_TEXTURE_TRANSFORM:C[n]=new bO;break;case Rg.KHR_MESH_QUANTIZATION:C[n]=new YO;break;default:a.indexOf(n)>=0&&o[n]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+n+'".')}}B.setExtensions(C),B.setPlugins(o),B.parse(I,i)}parseAsync(A,g){const I=this;return new Promise(function(i,e){I.parse(A,g,i,e)})}}function wO(){let t={};return{get:function(A){return t[A]},add:function(A,g){t[A]=g},remove:function(A){delete t[A]},removeAll:function(){t={}}}}const Rg={KHR_BINARY_GLTF:"KHR_binary_glTF",KHR_DRACO_MESH_COMPRESSION:"KHR_draco_mesh_compression",KHR_LIGHTS_PUNCTUAL:"KHR_lights_punctual",KHR_MATERIALS_CLEARCOAT:"KHR_materials_clearcoat",KHR_MATERIALS_IOR:"KHR_materials_ior",KHR_MATERIALS_SHEEN:"KHR_materials_sheen",KHR_MATERIALS_SPECULAR:"KHR_materials_specular",KHR_MATERIALS_TRANSMISSION:"KHR_materials_transmission",KHR_MATERIALS_IRIDESCENCE:"KHR_materials_iridescence",KHR_MATERIALS_UNLIT:"KHR_materials_unlit",KHR_MATERIALS_VOLUME:"KHR_materials_volume",KHR_TEXTURE_BASISU:"KHR_texture_basisu",KHR_TEXTURE_TRANSFORM:"KHR_texture_transform",KHR_MESH_QUANTIZATION:"KHR_mesh_quantization",KHR_MATERIALS_EMISSIVE_STRENGTH:"KHR_materials_emissive_strength",KHR_ANIMATION_POINTER:"KHR_animation_pointer",EXT_TEXTURE_WEBP:"EXT_texture_webp",EXT_MESHOPT_COMPRESSION:"EXT_meshopt_compression",EXT_MESH_GPU_INSTANCING:"EXT_mesh_gpu_instancing"};class uO{constructor(A){this.parser=A,this.name=Rg.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const A=this.parser,g=this.parser.json.nodes||[];for(let I=0,i=g.length;I<i;I++){const e=g[I];e.extensions&&e.extensions[this.name]&&e.extensions[this.name].light!==void 0&&A._addNodeRef(this.cache,e.extensions[this.name].light)}}_loadLight(A){const g=this.parser,I="light:"+A;let i=g.cache.get(I);if(i)return i;const e=g.json,B=((e.extensions&&e.extensions[this.name]||{}).lights||[])[A];let s;const n=new T(16777215);B.color!==void 0&&n.fromArray(B.color);const a=B.range!==void 0?B.range:0;switch(B.type){case"directional":s=new wh(n),s.target.position.set(0,0,-1),s.add(s.target);break;case"point":s=new dh(n),s.distance=a;break;case"spot":s=new Dh(n),s.distance=a,B.spot=B.spot||{},B.spot.innerConeAngle=B.spot.innerConeAngle!==void 0?B.spot.innerConeAngle:0,B.spot.outerConeAngle=B.spot.outerConeAngle!==void 0?B.spot.outerConeAngle:Math.PI/4,s.angle=B.spot.outerConeAngle,s.penumbra=1-B.spot.innerConeAngle/B.spot.outerConeAngle,s.target.position.set(0,0,-1),s.add(s.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+B.type)}return s.position.set(0,0,0),s.decay=2,BB(s,B),B.intensity!==void 0&&(s.intensity=B.intensity),s.name=g.createUniqueName(B.name||"light_"+A),i=Promise.resolve(s),g.cache.add(I,i),i}getDependency(A,g){if(A==="light")return this._loadLight(g)}createNodeAttachment(A){const g=this,I=this.parser,e=I.json.nodes[A],o=(e.extensions&&e.extensions[this.name]||{}).light;return o===void 0?null:this._loadLight(o).then(function(B){return I._getNodeRef(g.cache,o,B)})}}let pO=class{constructor(){this.name=Rg.KHR_MATERIALS_UNLIT}getMaterialType(){return tI}extendParams(A,g,I){const i=[];A.color=new T(1,1,1),A.opacity=1;const e=g.pbrMetallicRoughness;if(e){if(Array.isArray(e.baseColorFactor)){const C=e.baseColorFactor;A.color.fromArray(C),A.opacity=C[3]}e.baseColorTexture!==void 0&&i.push(I.assignTexture(A,"map",e.baseColorTexture,Dg))}return Promise.all(i)}};class yO{constructor(A){this.parser=A,this.name=Rg.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(A,g){const i=this.parser.json.materials[A];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const e=i.extensions[this.name].emissiveStrength;return e!==void 0&&(g.emissiveIntensity=e),Promise.resolve()}}let SO=class{constructor(A){this.parser=A,this.name=Rg.KHR_MATERIALS_CLEARCOAT}getMaterialType(A){const I=this.parser.json.materials[A];return!I.extensions||!I.extensions[this.name]?null:VC}extendMaterialParams(A,g){const I=this.parser,i=I.json.materials[A];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const e=[],C=i.extensions[this.name];if(C.clearcoatFactor!==void 0&&(g.clearcoat=C.clearcoatFactor),C.clearcoatTexture!==void 0&&e.push(I.assignTexture(g,"clearcoatMap",C.clearcoatTexture)),C.clearcoatRoughnessFactor!==void 0&&(g.clearcoatRoughness=C.clearcoatRoughnessFactor),C.clearcoatRoughnessTexture!==void 0&&e.push(I.assignTexture(g,"clearcoatRoughnessMap",C.clearcoatRoughnessTexture)),C.clearcoatNormalTexture!==void 0&&(e.push(I.assignTexture(g,"clearcoatNormalMap",C.clearcoatNormalTexture)),C.clearcoatNormalTexture.scale!==void 0)){const o=C.clearcoatNormalTexture.scale;g.clearcoatNormalScale=new QA(o,o)}return Promise.all(e)}};class fO{constructor(A){r(this,"ANIMATION_TARGET_TYPE",{node:"node",material:"material",camera:"camera",light:"light"});r(this,"_animationPointerDebug",!1);r(this,"_havePatchedPropertyBindings",!1);this.parser=A,this.name=Rg.KHR_ANIMATION_POINTER}_patchPropertyBindingFindNode(){if(this._havePatchedPropertyBindings)return;this._havePatchedPropertyBindings=!0;const A=Ug.findNode;Ug.findNode=(g,I)=>{if(I.startsWith(".materials.")){this._animationPointerDebug&&console.log("FIND",I);const i=I.substring(11).substring(I.indexOf(".")),e=i.indexOf("."),C=e<0?i:i.substring(0,e);let o=null;return g.traverse(B=>{var s,n;o!==null||B.type!=="Mesh"||(((s=B.material)==null?void 0:s.uuid)===C||((n=B.material)==null?void 0:n.name)===C)&&(o=B.material,this._animationPointerDebug&&console.log(o,i),o!==null&&(i.endsWith(".map")?o=o.map:i.endsWith(".emissiveMap")&&(o=o.emissiveMap)))}),o}else if(I.startsWith(".nodes.")||I.startsWith(".lights.")||I.startsWith(".cameras.")){const i=I.split(".");let e;for(let C=1;C<i.length;C++){const o=i[C];if(o.length==36)e=g.getObjectByProperty("uuid",o);else if(e&&e[o]){const s=Number.parseInt(o);let n=o;s>=0&&(n=s),e=e[n],this._animationPointerDebug&&console.log(e)}else{const s=g.getObjectByName(o);s&&(e=s)}}if(!e){const C=A(g,i[2]);return C||console.warn(Rg.KHR_ANIMATION_POINTER+": Property binding not found",I,g,g.name,i),C}return this._animationPointerDebug&&console.log("NODE",I,e),e}return A(g,I)}}loadAnimationTargetFromChannel(A){this._havePatchedPropertyBindings||this._patchPropertyBindingFindNode();const g=A.target,I=g.extensions&&g.extensions[Rg.KHR_ANIMATION_POINTER]&&g.path&&g.path==="pointer";if(!I)return null;let i,e=this.ANIMATION_TARGET_TYPE.node,C;if(I){const B=g.extensions[Rg.KHR_ANIMATION_POINTER];let s=B.pointer;if(this._animationPointerDebug&&console.log("Original path: "+s,g),!s){console.warn("Invalid path",B,g);return}if(s.startsWith("/materials/")?e=this.ANIMATION_TARGET_TYPE.material:s.startsWith("/extensions/KHR_lights_punctual/lights/")?e=this.ANIMATION_TARGET_TYPE.light:s.startsWith("/cameras/")&&(e=this.ANIMATION_TARGET_TYPE.camera),C=this._tryResolveTargetId(s,e),C===null||isNaN(C)){console.warn("Failed resolving animation node id: "+C,s);return}else this._animationPointerDebug&&console.log("Resolved node ID for "+e,C);switch(e){case this.ANIMATION_TARGET_TYPE.material:const a=("/materials/"+C.toString()+"/").length,Q=s.substring(0,a);switch(i=s.substring(a),i){case"pbrMetallicRoughness/baseColorFactor":i="color";break;case"pbrMetallicRoughness/roughnessFactor":i="roughness";break;case"pbrMetallicRoughness/metallicFactor":i="metalness";break;case"emissiveFactor":i="emissive";break;case"alphaCutoff":i="alphaTest";break;case"occlusionTexture/strength":i="aoMapIntensity";break;case"normalTexture/scale":i="normalScale";break;case"pbrMetallicRoughness/baseColorTexture/extensions/KHR_texture_transform/scale":i="map/repeat";break;case"pbrMetallicRoughness/baseColorTexture/extensions/KHR_texture_transform/offset":i="map/offset";break;case"emissiveTexture/extensions/KHR_texture_transform/scale":i="emissiveMap/repeat";break;case"emissiveTexture/extensions/KHR_texture_transform/offset":i="emissiveMap/offset";break;case"extensions/KHR_materials_emissive_strength/emissiveStrength":i="emissiveIntensity";break;case"extensions/KHR_materials_transmission/transmissionFactor":i="transmission";break;case"extensions/KHR_materials_ior/ior":i="ior";break;case"extensions/KHR_materials_volume/thicknessFactor":i="thickness";break;case"extensions/KHR_materials_volume/attenuationColor":i="attenuationColor";break;case"extensions/KHR_materials_volume/attenuationDistance":i="attenuationDistance";break;case"extensions/KHR_materials_iridescence/iridescenceFactor":i="iridescence";break;case"extensions/KHR_materials_iridescence/iridescenceIor":i="iridescenceIOR";break;case"extensions/KHR_materials_iridescence/iridescenceThicknessMinimum":i="iridescenceThicknessRange[0]";break;case"extensions/KHR_materials_iridescence/iridescenceThicknessMaximum":i="iridescenceThicknessRange[1]";break;case"extensions/KHR_materials_clearcoat/clearcoatFactor":i="clearcoat";break;case"extensions/KHR_materials_clearcoat/clearcoatRoughnessFactor":i="clearcoatRoughness";break;case"extensions/KHR_materials_sheen/sheenColorFactor":i="sheenColor";break;case"extensions/KHR_materials_sheen/sheenRoughnessFactor":i="sheenRoughness";break;case"extensions/KHR_materials_specular/specularFactor":i="specularIntensity";break;case"extensions/KHR_materials_specular/specularColorFactor":i="specularColor";break}s=Q+i,this._animationPointerDebug&&console.log("PROPERTY PATH",Q,i,s);break;case this.ANIMATION_TARGET_TYPE.node:const E=("/nodes/"+C.toString()+"/").length,c=s.substring(0,E);switch(i=s.substring(E),i){case"translation":i="position";break;case"rotation":i="quaternion";break;case"scale":i="scale";break;case"weights":i="morphTargetInfluences";break}s=c+i;break;case this.ANIMATION_TARGET_TYPE.light:const h=("/extensions/KHR_lights_punctual/lights/"+C.toString()+"/").length;switch(i=s.substring(h),i){case"color":break;case"intensity":break;case"spot/innerConeAngle":i="penumbra";break;case"spot/outerConeAngle":i="angle";break;case"range":i="distance";break}s="/lights/"+C.toString()+"/"+i;break;case this.ANIMATION_TARGET_TYPE.camera:const l=("/cameras/"+C.toString()+"/").length,w=s.substring(0,l);switch(i=s.substring(l),i){case"perspective/yfov":i="fov";break;case"perspective/znear":case"orthographic/znear":i="near";break;case"perspective/zfar":case"orthographic/zfar":i="far";break;case"perspective/aspect":i="aspect";break;case"orthographic/xmag":i="zoom";break;case"orthographic/ymag":i="zoom";break}s=w+i;break}const n=this.parser.options.animationPointerResolver;n&&n.resolvePath&&(s=n.resolvePath(s)),g.extensions[Rg.KHR_ANIMATION_POINTER].pointer=s}if(C===null||isNaN(C)){console.warn("Failed resolving animation node id: "+C,g);return}let o;return e===this.ANIMATION_TARGET_TYPE.node?o=this.parser.getDependency("node",C):e===this.ANIMATION_TARGET_TYPE.material?o=this.parser.getDependency("material",C):e===this.ANIMATION_TARGET_TYPE.light?o=this.parser.getDependency("light",C):e===this.ANIMATION_TARGET_TYPE.camera?o=this.parser.getDependency("camera",C):console.error("Unhandled type",e),o}createAnimationTracks(A,g,I,i,e){if(!(e.extensions&&e.extensions[Rg.KHR_ANIMATION_POINTER]&&e.path&&e.path==="pointer"))return null;let o=e.extensions[Rg.KHR_ANIMATION_POINTER].pointer;if(!o)return null;const B=[];o=o.replaceAll("/",".");const s=o.split(".");s[2]=A.name??A.uuid,o=s.join("."),this._animationPointerDebug&&console.log(A,g,I,e,o);let n;switch(I.itemSize){case 1:n=Oo;break;case 2:case 3:n=_o;break;case 4:o.endsWith(".quaternion")?n=AC:n=Ar;break}const a=i.interpolation!==void 0?sF[i.interpolation]:xC;let Q=QF(I);o.endsWith(".fov")&&(Q=Q.map(c=>c/Math.PI*180));const E=new n(o,g.array,Q,a);if(a==="CUBICSPLINE"&&Hy(E),B.push(E),o&&I.itemSize===4&&o.startsWith(".materials.")&&o.endsWith(".color")){const c=new Float32Array(Q.length/4);for(let l=0,w=Q.length/4;l<w;l+=1)c[l]=Q[l*4+3];const h=new n(o.replace(".color",".opacity"),g.array,c,a);a==="CUBICSPLINE"&&Hy(E),B.push(h)}return B}_tryResolveTargetId(A,g){let I="";return g==="node"?I=A.substring(7):g==="material"?I=A.substring(11):g==="light"?I=A.substring(39):g==="camera"&&(I=A.substring(9)),I=I.substring(0,I.indexOf("/")),Number.parseInt(I)}}let GO=class{constructor(A){this.parser=A,this.name=Rg.KHR_MATERIALS_IRIDESCENCE}getMaterialType(A){const I=this.parser.json.materials[A];return!I.extensions||!I.extensions[this.name]?null:VC}extendMaterialParams(A,g){const I=this.parser,i=I.json.materials[A];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const e=[],C=i.extensions[this.name];return C.iridescenceFactor!==void 0&&(g.iridescence=C.iridescenceFactor),C.iridescenceTexture!==void 0&&e.push(I.assignTexture(g,"iridescenceMap",C.iridescenceTexture)),C.iridescenceIor!==void 0&&(g.iridescenceIOR=C.iridescenceIor),g.iridescenceThicknessRange===void 0&&(g.iridescenceThicknessRange=[100,400]),C.iridescenceThicknessMinimum!==void 0&&(g.iridescenceThicknessRange[0]=C.iridescenceThicknessMinimum),C.iridescenceThicknessMaximum!==void 0&&(g.iridescenceThicknessRange[1]=C.iridescenceThicknessMaximum),C.iridescenceThicknessTexture!==void 0&&e.push(I.assignTexture(g,"iridescenceThicknessMap",C.iridescenceThicknessTexture)),Promise.all(e)}};class kO{constructor(A){this.parser=A,this.name=Rg.KHR_MATERIALS_SHEEN}getMaterialType(A){const I=this.parser.json.materials[A];return!I.extensions||!I.extensions[this.name]?null:VC}extendMaterialParams(A,g){const I=this.parser,i=I.json.materials[A];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const e=[];g.sheenColor=new T(0,0,0),g.sheenRoughness=0,g.sheen=1;const C=i.extensions[this.name];return C.sheenColorFactor!==void 0&&g.sheenColor.fromArray(C.sheenColorFactor),C.sheenRoughnessFactor!==void 0&&(g.sheenRoughness=C.sheenRoughnessFactor),C.sheenColorTexture!==void 0&&e.push(I.assignTexture(g,"sheenColorMap",C.sheenColorTexture,Dg)),C.sheenRoughnessTexture!==void 0&&e.push(I.assignTexture(g,"sheenRoughnessMap",C.sheenRoughnessTexture)),Promise.all(e)}}let MO=class{constructor(A){this.parser=A,this.name=Rg.KHR_MATERIALS_TRANSMISSION}getMaterialType(A){const I=this.parser.json.materials[A];return!I.extensions||!I.extensions[this.name]?null:VC}extendMaterialParams(A,g){const I=this.parser,i=I.json.materials[A];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const e=[],C=i.extensions[this.name];return C.transmissionFactor!==void 0&&(g.transmission=C.transmissionFactor),C.transmissionTexture!==void 0&&e.push(I.assignTexture(g,"transmissionMap",C.transmissionTexture)),Promise.all(e)}},UO=class{constructor(A){this.parser=A,this.name=Rg.KHR_MATERIALS_VOLUME}getMaterialType(A){const I=this.parser.json.materials[A];return!I.extensions||!I.extensions[this.name]?null:VC}extendMaterialParams(A,g){const I=this.parser,i=I.json.materials[A];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const e=[],C=i.extensions[this.name];g.thickness=C.thicknessFactor!==void 0?C.thicknessFactor:0,C.thicknessTexture!==void 0&&e.push(I.assignTexture(g,"thicknessMap",C.thicknessTexture)),g.attenuationDistance=C.attenuationDistance||1/0;const o=C.attenuationColor||[1,1,1];return g.attenuationColor=new T(o[0],o[1],o[2]),Promise.all(e)}};class RO{constructor(A){this.parser=A,this.name=Rg.KHR_MATERIALS_IOR}getMaterialType(A){const I=this.parser.json.materials[A];return!I.extensions||!I.extensions[this.name]?null:VC}extendMaterialParams(A,g){const i=this.parser.json.materials[A];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const e=i.extensions[this.name];return g.ior=e.ior!==void 0?e.ior:1.5,Promise.resolve()}}class FO{constructor(A){this.parser=A,this.name=Rg.KHR_MATERIALS_SPECULAR}getMaterialType(A){const I=this.parser.json.materials[A];return!I.extensions||!I.extensions[this.name]?null:VC}extendMaterialParams(A,g){const I=this.parser,i=I.json.materials[A];if(!i.extensions||!i.extensions[this.name])return Promise.resolve();const e=[],C=i.extensions[this.name];g.specularIntensity=C.specularFactor!==void 0?C.specularFactor:1,C.specularTexture!==void 0&&e.push(I.assignTexture(g,"specularIntensityMap",C.specularTexture));const o=C.specularColorFactor||[1,1,1];return g.specularColor=new T(o[0],o[1],o[2]),C.specularColorTexture!==void 0&&e.push(I.assignTexture(g,"specularColorMap",C.specularColorTexture,Dg)),Promise.all(e)}}class mO{constructor(A){this.parser=A,this.name=Rg.KHR_TEXTURE_BASISU}loadTexture(A){const g=this.parser,I=g.json,i=I.textures[A];if(!i.extensions||!i.extensions[this.name])return null;const e=i.extensions[this.name],C=g.options.ktx2Loader;if(!C){if(I.extensionsRequired&&I.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setKTX2Loader must be called before loading KTX2 textures");return null}return g.loadTextureImage(A,e.source,C)}}class NO{constructor(A){this.parser=A,this.name=Rg.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(A){const g=this.name,I=this.parser,i=I.json,e=i.textures[A];if(!e.extensions||!e.extensions[g])return null;const C=e.extensions[g],o=i.images[C.source];let B=I.textureLoader;if(o.uri){const s=I.options.manager.getHandler(o.uri);s!==null&&(B=s)}return this.detectSupport().then(function(s){if(s)return I.loadTextureImage(A,C.source,B);if(i.extensionsRequired&&i.extensionsRequired.indexOf(g)>=0)throw new Error("THREE.GLTFLoader: WebP required by asset but unsupported.");return I.loadTexture(A)})}detectSupport(){return this.isSupported||(this.isSupported=new Promise(function(A){const g=new Image;g.src="data:image/webp;base64,UklGRiIAAABXRUJQVlA4IBYAAAAwAQCdASoBAAEADsD+JaQAA3AAAAAA",g.onload=g.onerror=function(){A(g.height===1)}})),this.isSupported}}class KO{constructor(A){this.name=Rg.EXT_MESHOPT_COMPRESSION,this.parser=A}loadBufferView(A){const g=this.parser.json,I=g.bufferViews[A];if(I.extensions&&I.extensions[this.name]){const i=I.extensions[this.name],e=this.parser.getDependency("buffer",i.buffer),C=this.parser.options.meshoptDecoder;if(!C||!C.supported){if(g.extensionsRequired&&g.extensionsRequired.indexOf(this.name)>=0)throw new Error("THREE.GLTFLoader: setMeshoptDecoder must be called before loading compressed files");return null}return e.then(function(o){const B=i.byteOffset||0,s=i.byteLength||0,n=i.count,a=i.byteStride,Q=new Uint8Array(o,B,s);return C.decodeGltfBufferAsync?C.decodeGltfBufferAsync(n,a,Q,i.mode,i.filter).then(function(E){return E.buffer}):C.ready.then(function(){const E=new ArrayBuffer(n*a);return C.decodeGltfBuffer(new Uint8Array(E),n,a,Q,i.mode,i.filter),E})})}else return null}}class JO{constructor(A){this.name=Rg.EXT_MESH_GPU_INSTANCING,this.parser=A}createNodeMesh(A){const g=this.parser.json,I=g.nodes[A];if(!I.extensions||!I.extensions[this.name]||I.mesh===void 0)return null;const i=g.meshes[I.mesh];for(const s of i.primitives)if(s.mode!==et.TRIANGLES&&s.mode!==et.TRIANGLE_STRIP&&s.mode!==et.TRIANGLE_FAN&&s.mode!==void 0)return null;const C=I.extensions[this.name].attributes,o=[],B={};for(const s in C)o.push(this.parser.getDependency("accessor",C[s]).then(n=>(B[s]=n,B[s])));return o.length<1?null:(o.push(this.parser.createNodeMesh(A)),Promise.all(o).then(s=>{const n=s.pop(),a=n.isGroup?n.children:[n],Q=s[0].count,E=[];for(const c of a){const h=new $A,l=new M,w=new kA,p=new M(1,1,1),D=new eh(c.geometry,c.material,Q);for(let d=0;d<Q;d++)B.TRANSLATION&&l.fromBufferAttribute(B.TRANSLATION,d),B.ROTATION&&w.fromBufferAttribute(B.ROTATION,d),B.SCALE&&p.fromBufferAttribute(B.SCALE,d),D.setMatrixAt(d,h.compose(l,w,p));for(const d in B)d!=="TRANSLATION"&&d!=="ROTATION"&&d!=="SCALE"&&c.geometry.setAttribute(d,B[d]);LA.prototype.copy.call(D,c),D.frustumCulled=!1,this.parser.assignFinalMaterial(D),E.push(D)}return n.isGroup?(n.clear(),n.add(...E),n):E[0]}))}}const eF="glTF",Kr=12,tF={JSON:1313821514,BIN:5130562};class qO{constructor(A){this.name=Rg.KHR_BINARY_GLTF,this.content=null,this.body=null;const g=new DataView(A,0,Kr);if(this.header={magic:gC.decodeText(new Uint8Array(A.slice(0,4))),version:g.getUint32(4,!0),length:g.getUint32(8,!0)},this.header.magic!==eF)throw new Error("THREE.GLTFLoader: Unsupported glTF-Binary header.");if(this.header.version<2)throw new Error("THREE.GLTFLoader: Legacy binary file detected.");const I=this.header.length-Kr,i=new DataView(A,Kr);let e=0;for(;e<I;){const C=i.getUint32(e,!0);e+=4;const o=i.getUint32(e,!0);if(e+=4,o===tF.JSON){const B=new Uint8Array(A,Kr+e,C);this.content=gC.decodeText(B)}else if(o===tF.BIN){const B=Kr+e;this.body=A.slice(B,B+C)}e+=C}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class LO{constructor(A,g){if(!g)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=Rg.KHR_DRACO_MESH_COMPRESSION,this.json=A,this.dracoLoader=g,this.dracoLoader.preload()}decodePrimitive(A,g){const I=this.json,i=this.dracoLoader,e=A.extensions[this.name].bufferView,C=A.extensions[this.name].attributes,o={},B={},s={};for(const n in C){const a=by[n]||n.toLowerCase();o[a]=C[n]}for(const n in A.attributes){const a=by[n]||n.toLowerCase();if(C[n]!==void 0){const Q=I.accessors[A.attributes[n]],E=aQ[Q.componentType];s[a]=E.name,B[a]=Q.normalized===!0}}return g.getDependency("bufferView",e).then(function(n){return new Promise(function(a){i.decodeDracoFile(n,function(Q){for(const E in Q.attributes){const c=Q.attributes[E],h=B[E];h!==void 0&&(c.normalized=h)}a(Q)},o,s)})})}}class bO{constructor(){this.name=Rg.KHR_TEXTURE_TRANSFORM}extendTexture(A,g){return g.texCoord!==void 0&&console.warn('THREE.GLTFLoader: Custom UV sets in "'+this.name+'" extension not yet supported.'),g.offset===void 0&&g.rotation===void 0&&g.scale===void 0||(A=A.clone(),g.offset!==void 0&&A.offset.fromArray(g.offset),g.rotation!==void 0&&(A.rotation=g.rotation),g.scale!==void 0&&A.repeat.fromArray(g.scale),A.needsUpdate=!0),A}}class YO{constructor(){this.name=Rg.KHR_MESH_QUANTIZATION}}class CF extends Pn{constructor(A,g,I,i){super(A,g,I,i)}copySampleValue_(A){const g=this.resultBuffer,I=this.sampleValues,i=this.valueSize,e=A*i*3+i;for(let C=0;C!==i;C++)g[C]=I[e+C];return g}interpolate_(A,g,I,i){const e=this.resultBuffer,C=this.sampleValues,o=this.valueSize,B=o*2,s=o*3,n=i-g,a=(I-g)/n,Q=a*a,E=Q*a,c=A*s,h=c-s,l=-2*E+3*Q,w=E-Q,p=1-l,D=w-Q+a;for(let d=0;d!==o;d++){const u=C[h+d+o],y=C[h+d+B]*n,f=C[c+d+o],S=C[c+d]*n;e[d]=p*u+D*y+l*f+w*S}return e}}const xO=new kA;class HO extends CF{interpolate_(A,g,I,i){const e=super.interpolate_(A,g,I,i);return xO.fromArray(e).normalize().toArray(e),e}}const et={FLOAT:5126,FLOAT_MAT3:35675,FLOAT_MAT4:35676,FLOAT_VEC2:35664,FLOAT_VEC3:35665,FLOAT_VEC4:35666,LINEAR:9729,REPEAT:10497,SAMPLER_2D:35678,POINTS:0,LINES:1,LINE_LOOP:2,LINE_STRIP:3,TRIANGLES:4,TRIANGLE_STRIP:5,TRIANGLE_FAN:6,UNSIGNED_BYTE:5121,UNSIGNED_SHORT:5123},aQ={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},oF={9728:eI,9729:Tg,9984:cn,9985:Ea,9986:hn,9987:dt},BF={33071:si,33648:YC,10497:Dt},Ly={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},by={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},oB={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},sF={CUBICSPLINE:void 0,LINEAR:xC,STEP:_B},Yy={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function vO(t){return t.DefaultMaterial===void 0&&(t.DefaultMaterial=new $a({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:Se})),t.DefaultMaterial}function Jr(t,A,g){for(const I in g.extensions)t[I]===void 0&&(A.userData.gltfExtensions=A.userData.gltfExtensions||{},A.userData.gltfExtensions[I]=g.extensions[I])}function BB(t,A){A.extras!==void 0&&(typeof A.extras=="object"?Object.assign(t.userData,A.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+A.extras))}function TO(t,A,g){let I=!1,i=!1,e=!1;for(let s=0,n=A.length;s<n;s++){const a=A[s];if(a.POSITION!==void 0&&(I=!0),a.NORMAL!==void 0&&(i=!0),a.COLOR_0!==void 0&&(e=!0),I&&i&&e)break}if(!I&&!i&&!e)return Promise.resolve(t);const C=[],o=[],B=[];for(let s=0,n=A.length;s<n;s++){const a=A[s];if(I){const Q=a.POSITION!==void 0?g.getDependency("accessor",a.POSITION):t.attributes.position;C.push(Q)}if(i){const Q=a.NORMAL!==void 0?g.getDependency("accessor",a.NORMAL):t.attributes.normal;o.push(Q)}if(e){const Q=a.COLOR_0!==void 0?g.getDependency("accessor",a.COLOR_0):t.attributes.color;B.push(Q)}}return Promise.all([Promise.all(C),Promise.all(o),Promise.all(B)]).then(function(s){const n=s[0],a=s[1],Q=s[2];return I&&(t.morphAttributes.position=n),i&&(t.morphAttributes.normal=a),e&&(t.morphAttributes.color=Q),t.morphTargetsRelative=!0,t})}function OO(t,A){if(t.updateMorphTargets(),A.weights!==void 0)for(let g=0,I=A.weights.length;g<I;g++)t.morphTargetInfluences[g]=A.weights[g];if(A.extras&&Array.isArray(A.extras.targetNames)){const g=A.extras.targetNames;if(t.morphTargetInfluences.length===g.length){t.morphTargetDictionary={};for(let I=0,i=g.length;I<i;I++)t.morphTargetDictionary[g[I]]=I}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function _O(t){const A=t.extensions&&t.extensions[Rg.KHR_DRACO_MESH_COMPRESSION];let g;return A?g="draco:"+A.bufferView+":"+A.indices+":"+nF(A.attributes):g=t.indices+":"+nF(t.attributes)+":"+t.mode,g}function nF(t){let A="";const g=Object.keys(t).sort();for(let I=0,i=g.length;I<i;I++)A+=g[I]+":"+t[g[I]]+";";return A}function xy(t){switch(t){case Int8Array:return 1/127;case Uint8Array:return 1/255;case Int16Array:return 1/32767;case Uint16Array:return 1/65535;default:throw new Error("THREE.GLTFLoader: Unsupported normalized accessor component type.")}}function QF(t){let A=t.array;if(t.normalized){const g=xy(A.constructor),I=new Float32Array(A.length);for(let i=0,e=A.length;i<e;i++)I[i]=A[i]*g;A=I}return A}function Hy(t){t.createInterpolant=function(g){const I=this instanceof AC?HO:CF;return new I(this.times,this.values,this.getValueSize()/3,g)},t.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}function PO(t){return t.search(/\.jpe?g($|\?)/i)>0||t.search(/^data\:image\/jpeg/)===0?"image/jpeg":t.search(/\.webp($|\?)/i)>0||t.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}class WO{constructor(A={},g={}){this.json=A,this.extensions={},this.plugins={},this.options=g,this.cache=new wO,this.associations=new Map,this.primitiveCache={},this.meshCache={refs:{},uses:{}},this.cameraCache={refs:{},uses:{}},this.lightCache={refs:{},uses:{}},this.sourceCache={},this.textureCache={},this.nodeNamesUsed={};let I=!1,i=!1,e=-1;typeof navigator<"u"&&(I=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,i=navigator.userAgent.indexOf("Firefox")>-1,e=i?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||I||i&&e<98?this.textureLoader=new Po(this.options.manager):this.textureLoader=new MM(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new ii(this.options.manager),this.fileLoader.setResponseType("arraybuffer"),this.options.crossOrigin==="use-credentials"&&this.fileLoader.setWithCredentials(!0)}setExtensions(A){this.extensions=A}setPlugins(A){this.plugins=A}parse(A,g){const I=this,i=this.json,e=this.extensions;this.cache.removeAll(),this._invokeAll(function(C){return C._markDefs&&C._markDefs()}),Promise.all(this._invokeAll(function(C){return C.beforeRoot&&C.beforeRoot()})).then(function(){return Promise.all([I.getDependencies("scene"),I.getDependencies("animation"),I.getDependencies("camera")])}).then(function(C){const o={scene:C[0][i.scene||0],scenes:C[0],animations:C[1],cameras:C[2],asset:i.asset,parser:I,userData:{}};Jr(e,o,i),BB(o,i),Promise.all(I._invokeAll(function(B){return B.afterRoot&&B.afterRoot(o)})).then(function(){A(o)})}).catch(g)}_markDefs(){const A=this.json.nodes||[],g=this.json.skins||[],I=this.json.meshes||[];for(let i=0,e=g.length;i<e;i++){const C=g[i].joints;for(let o=0,B=C.length;o<B;o++)A[C[o]].isBone=!0}for(let i=0,e=A.length;i<e;i++){const C=A[i];C.mesh!==void 0&&(this._addNodeRef(this.meshCache,C.mesh),C.skin!==void 0&&(I[C.mesh].isSkinnedMesh=!0)),C.camera!==void 0&&this._addNodeRef(this.cameraCache,C.camera)}}_addNodeRef(A,g){g!==void 0&&(A.refs[g]===void 0&&(A.refs[g]=A.uses[g]=0),A.refs[g]++)}_getNodeRef(A,g,I){if(A.refs[g]<=1)return I;const i=I.clone(),e=(C,o)=>{const B=this.associations.get(C);B!=null&&this.associations.set(o,B);for(const[s,n]of C.children.entries())e(n,o.children[s])};return e(I,i),i.name+="_instance_"+A.uses[g]++,i}_invokeOne(A){const g=Object.values(this.plugins);g.push(this);for(let I=0;I<g.length;I++){const i=A(g[I]);if(i)return i}return null}_invokeAll(A){const g=Object.values(this.plugins);g.unshift(this);const I=[];for(let i=0;i<g.length;i++){const e=A(g[i]);e&&I.push(e)}return I}getDependency(A,g){const I=A+":"+g;let i=this.cache.get(I);if(!i){switch(A){case"scene":i=this.loadScene(g);break;case"node":i=this.loadNode(g);break;case"mesh":i=this._invokeOne(function(e){return e.loadMesh&&e.loadMesh(g)});break;case"accessor":i=this.loadAccessor(g);break;case"bufferView":i=this._invokeOne(function(e){return e.loadBufferView&&e.loadBufferView(g)});break;case"buffer":i=this.loadBuffer(g);break;case"material":i=this._invokeOne(function(e){return e.loadMaterial&&e.loadMaterial(g)});break;case"texture":i=this._invokeOne(function(e){return e.loadTexture&&e.loadTexture(g)});break;case"skin":i=this.loadSkin(g);break;case"animation":i=this._invokeOne(function(e){return e.loadAnimation&&e.loadAnimation(g)});break;case"camera":i=this.loadCamera(g);break;case"light":i=this._invokeOne(function(e){return e._loadLight&&e._loadLight(g)});break;default:if(i=this._invokeOne(function(e){return e!=this&&e.getDependency&&e.getDependency(A,g)}),!i)throw new Error("Unknown type: "+A);break}this.cache.add(I,i)}return i}getDependencies(A){let g=this.cache.get(A);if(!g){const I=this,i=this.json[A+(A==="mesh"?"es":"s")]||[];g=Promise.all(i.map(function(e,C){return I.getDependency(A,C)})),this.cache.add(A,g)}return g}loadBuffer(A){const g=this.json.buffers[A],I=this.fileLoader;if(g.type&&g.type!=="arraybuffer")throw new Error("THREE.GLTFLoader: "+g.type+" buffer type is not supported.");if(g.uri===void 0&&A===0)return Promise.resolve(this.extensions[Rg.KHR_BINARY_GLTF].body);const i=this.options;return new Promise(function(e,C){I.load(gC.resolveURL(g.uri,i.path),e,void 0,function(){C(new Error('THREE.GLTFLoader: Failed to load buffer "'+g.uri+'".'))})})}loadBufferView(A){const g=this.json.bufferViews[A];return this.getDependency("buffer",g.buffer).then(function(I){const i=g.byteLength||0,e=g.byteOffset||0;return I.slice(e,e+i)})}loadAccessor(A){const g=this,I=this.json,i=this.json.accessors[A];if(i.bufferView===void 0&&i.sparse===void 0){const C=Ly[i.type],o=aQ[i.componentType],B=i.normalized===!0,s=new o(i.count*C);return Promise.resolve(new Eg(s,C,B))}const e=[];return i.bufferView!==void 0?e.push(this.getDependency("bufferView",i.bufferView)):e.push(null),i.sparse!==void 0&&(e.push(this.getDependency("bufferView",i.sparse.indices.bufferView)),e.push(this.getDependency("bufferView",i.sparse.values.bufferView))),Promise.all(e).then(function(C){const o=C[0],B=Ly[i.type],s=aQ[i.componentType],n=s.BYTES_PER_ELEMENT,a=n*B,Q=i.byteOffset||0,E=i.bufferView!==void 0?I.bufferViews[i.bufferView].byteStride:void 0,c=i.normalized===!0;let h,l;if(E&&E!==a){const w=Math.floor(Q/E),p="InterleavedBuffer:"+i.bufferView+":"+i.componentType+":"+w+":"+i.count;let D=g.cache.get(p);D||(h=new s(o,w*E,i.count*E/n),D=new ma(h,E/n),g.cache.add(p,D)),l=new To(D,B,Q%E/n,c)}else o===null?h=new s(i.count*B):h=new s(o,Q,i.count*B),l=new Eg(h,B,c);if(i.sparse!==void 0){const w=Ly.SCALAR,p=aQ[i.sparse.indices.componentType],D=i.sparse.indices.byteOffset||0,d=i.sparse.values.byteOffset||0,u=new p(C[1],D,i.sparse.count*w),y=new s(C[2],d,i.sparse.count*B);o!==null&&(l=new Eg(l.array.slice(),l.itemSize,l.normalized));for(let f=0,S=u.length;f<S;f++){const G=u[f];if(l.setX(G,y[f*B]),B>=2&&l.setY(G,y[f*B+1]),B>=3&&l.setZ(G,y[f*B+2]),B>=4&&l.setW(G,y[f*B+3]),B>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return l})}loadTexture(A){const g=this.json,I=this.options,e=g.textures[A].source,C=g.images[e];let o=this.textureLoader;if(C.uri){const B=I.manager.getHandler(C.uri);B!==null&&(o=B)}return this.loadTextureImage(A,e,o)}loadTextureImage(A,g,I){const i=this,e=this.json,C=e.textures[A],o=e.images[g],B=(o.uri||o.bufferView)+":"+C.sampler;if(this.textureCache[B])return this.textureCache[B];const s=this.loadImageSource(g,I).then(function(n){n.flipY=!1,n.name=C.name||o.name||"";const Q=(e.samplers||{})[C.sampler]||{};return n.magFilter=oF[Q.magFilter]||Tg,n.minFilter=oF[Q.minFilter]||dt,n.wrapS=BF[Q.wrapS]||Dt,n.wrapT=BF[Q.wrapT]||Dt,n.anisotropy=4,i.associations.set(n,{textures:A}),n}).catch(function(){return null});return this.textureCache[B]=s,s}loadImageSource(A,g){const I=this,i=this.json,e=this.options;if(this.sourceCache[A]!==void 0)return this.sourceCache[A].then(a=>a.clone());const C=i.images[A],o=self.URL||self.webkitURL;let B=C.uri||"",s=!1;if(C.bufferView!==void 0)B=I.getDependency("bufferView",C.bufferView).then(function(a){s=!0;const Q=new Blob([a],{type:C.mimeType});return B=o.createObjectURL(Q),B});else if(C.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+A+" is missing URI and bufferView");const n=Promise.resolve(B).then(function(a){return new Promise(function(Q,E){let c=Q;g.isImageBitmapLoader===!0&&(c=function(h){const l=new Wg(h);l.needsUpdate=!0,Q(l)}),g.load(gC.resolveURL(a,e.path),c,void 0,E)})}).then(function(a){return s===!0&&o.revokeObjectURL(B),a.userData.mimeType=C.mimeType||PO(C.uri),a}).catch(function(a){throw console.error("THREE.GLTFLoader: Couldn't load texture",B),a});return this.sourceCache[A]=n,n}assignTexture(A,g,I,i){const e=this;return this.getDependency("texture",I.index).then(function(C){if(I.texCoord!==void 0&&I.texCoord!=0&&!(g==="aoMap"&&I.texCoord==1)&&console.warn("THREE.GLTFLoader: Custom UV set "+I.texCoord+" for texture "+g+" not yet supported."),e.extensions[Rg.KHR_TEXTURE_TRANSFORM]){const o=I.extensions!==void 0?I.extensions[Rg.KHR_TEXTURE_TRANSFORM]:void 0;if(o){const B=e.associations.get(C);C=e.extensions[Rg.KHR_TEXTURE_TRANSFORM].extendTexture(C,o),e.associations.set(C,B)}}return i!==void 0&&C&&(C.encoding=i),A[g]=C,C})}assignFinalMaterial(A){const g=A.geometry;let I=A.material;const i=g.attributes.tangent===void 0,e=g.attributes.color!==void 0,C=g.attributes.normal===void 0;if(A.isPoints){const o="PointsMaterial:"+I.uuid;let B=this.cache.get(o);B||(B=new Ch,DI.prototype.copy.call(B,I),B.color.copy(I.color),B.map=I.map,B.sizeAttenuation=!1,this.cache.add(o,B)),I=B}else if(A.isLine){const o="LineBasicMaterial:"+I.uuid;let B=this.cache.get(o);B||(B=new mI,DI.prototype.copy.call(B,I),B.color.copy(I.color),this.cache.add(o,B)),I=B}if(i||e||C){let o="ClonedMaterial:"+I.uuid+":";i&&(o+="derivative-tangents:"),e&&(o+="vertex-colors:"),C&&(o+="flat-shading:");let B=this.cache.get(o);B||(B=I.clone(),e&&(B.vertexColors=!0),C&&(B.flatShading=!0),i&&(B.normalScale&&(B.normalScale.y*=-1),B.clearcoatNormalScale&&(B.clearcoatNormalScale.y*=-1)),this.cache.add(o,B),this.associations.set(B,this.associations.get(I))),I=B}I.aoMap&&g.attributes.uv2===void 0&&g.attributes.uv!==void 0&&g.setAttribute("uv2",g.attributes.uv),A.material=I}getMaterialType(){return $a}loadMaterial(A){const g=this,I=this.json,i=this.extensions,e=I.materials[A];let C;const o={},B=e.extensions||{},s=[];if(B[Rg.KHR_MATERIALS_UNLIT]){const a=i[Rg.KHR_MATERIALS_UNLIT];C=a.getMaterialType(),s.push(a.extendParams(o,e,g))}else{const a=e.pbrMetallicRoughness||{};if(o.color=new T(1,1,1),o.opacity=1,Array.isArray(a.baseColorFactor)){const Q=a.baseColorFactor;o.color.fromArray(Q),o.opacity=Q[3]}a.baseColorTexture!==void 0&&s.push(g.assignTexture(o,"map",a.baseColorTexture,Dg)),o.metalness=a.metallicFactor!==void 0?a.metallicFactor:1,o.roughness=a.roughnessFactor!==void 0?a.roughnessFactor:1,a.metallicRoughnessTexture!==void 0&&(s.push(g.assignTexture(o,"metalnessMap",a.metallicRoughnessTexture)),s.push(g.assignTexture(o,"roughnessMap",a.metallicRoughnessTexture))),C=this._invokeOne(function(Q){return Q.getMaterialType&&Q.getMaterialType(A)}),s.push(Promise.all(this._invokeAll(function(Q){return Q.extendMaterialParams&&Q.extendMaterialParams(A,o)})))}e.doubleSided===!0&&(o.side=HI);const n=e.alphaMode||Yy.OPAQUE;if(n===Yy.BLEND?(o.transparent=!0,o.depthWrite=!1):(o.transparent=!1,n===Yy.MASK&&(o.alphaTest=e.alphaCutoff!==void 0?e.alphaCutoff:.5)),e.normalTexture!==void 0&&C!==tI&&(s.push(g.assignTexture(o,"normalMap",e.normalTexture)),o.normalScale=new QA(1,1),e.normalTexture.scale!==void 0)){const a=e.normalTexture.scale;o.normalScale.set(a,a)}return e.occlusionTexture!==void 0&&C!==tI&&(s.push(g.assignTexture(o,"aoMap",e.occlusionTexture)),e.occlusionTexture.strength!==void 0&&(o.aoMapIntensity=e.occlusionTexture.strength)),e.emissiveFactor!==void 0&&C!==tI&&(o.emissive=new T().fromArray(e.emissiveFactor)),e.emissiveTexture!==void 0&&C!==tI&&s.push(g.assignTexture(o,"emissiveMap",e.emissiveTexture,Dg)),Promise.all(s).then(function(){const a=new C(o);return e.name&&(a.name=e.name),BB(a,e),g.associations.set(a,{materials:A}),e.extensions&&Jr(i,a,e),a})}createUniqueName(A){const g=Ug.sanitizeNodeName(A||"");let I=g;for(let i=1;this.nodeNamesUsed[I];++i)I=g+"_"+i;return this.nodeNamesUsed[I]=!0,I}loadGeometries(A){const g=this,I=this.extensions,i=this.primitiveCache;function e(o){return I[Rg.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(o,g).then(function(B){return rF(B,o,g)})}const C=[];for(let o=0,B=A.length;o<B;o++){const s=A[o],n=_O(s),a=i[n];if(a)C.push(a.promise);else{let Q;s.extensions&&s.extensions[Rg.KHR_DRACO_MESH_COMPRESSION]?Q=e(s):Q=rF(new cg,s,g),i[n]={primitive:s,promise:Q},C.push(Q)}}return Promise.all(C)}loadMesh(A){const g=this,I=this.json,i=this.extensions,e=I.meshes[A],C=e.primitives,o=[];for(let B=0,s=C.length;B<s;B++){const n=C[B].material===void 0?vO(this.cache):this.getDependency("material",C[B].material);o.push(n)}return o.push(g.loadGeometries(C)),Promise.all(o).then(function(B){const s=B.slice(0,B.length-1),n=B[B.length-1],a=[];for(let E=0,c=n.length;E<c;E++){const h=n[E],l=C[E];let w;const p=s[E];if(l.mode===et.TRIANGLES||l.mode===et.TRIANGLE_STRIP||l.mode===et.TRIANGLE_FAN||l.mode===void 0)w=e.isSkinnedMesh===!0?new mu(h,p):new UA(h,p),w.isSkinnedMesh===!0&&!w.geometry.attributes.skinWeight.normalized&&w.normalizeSkinWeights(),l.mode===et.TRIANGLE_STRIP?w.geometry=EF(w.geometry,dG):l.mode===et.TRIANGLE_FAN&&(w.geometry=EF(w.geometry,xw));else if(l.mode===et.LINES)w=new Re(h,p);else if(l.mode===et.LINE_STRIP)w=new NI(h,p);else if(l.mode===et.LINE_LOOP)w=new Ku(h,p);else if(l.mode===et.POINTS)w=new qu(h,p);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+l.mode);Object.keys(w.geometry.morphAttributes).length>0&&OO(w,e),w.name=g.createUniqueName(e.name||"mesh_"+A),BB(w,e),l.extensions&&Jr(i,w,l),g.assignFinalMaterial(w),a.push(w)}for(let E=0,c=a.length;E<c;E++)g.associations.set(a[E],{meshes:A,primitives:E});if(a.length===1)return a[0];const Q=new Gt;g.associations.set(Q,{meshes:A});for(let E=0,c=a.length;E<c;E++)Q.add(a[E]);return Q})}loadCamera(A){let g;const I=this.json.cameras[A],i=I[I.type];if(!i){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return I.type==="perspective"?g=new zg(Be.radToDeg(i.yfov),i.aspectRatio||1,i.znear||1,i.zfar||2e6):I.type==="orthographic"&&(g=new Ho(-i.xmag,i.xmag,i.ymag,-i.ymag,i.znear,i.zfar)),I.name&&(g.name=this.createUniqueName(I.name)),BB(g,I),Promise.resolve(g)}loadSkin(A){const g=this.json.skins[A],I={joints:g.joints};return g.inverseBindMatrices===void 0?Promise.resolve(I):this.getDependency("accessor",g.inverseBindMatrices).then(function(i){return I.inverseBindMatrices=i,I})}loadAnimation(A){const g=this.json,I=this,i=g.animations[A],e=[],C=[],o=[],B=[],s=[];let n=0,a=i.channels.length;for(n=0,a=i.channels.length;n<a;n++){const Q=i.channels[n],E=i.samplers[Q.sampler],c=Q.target,h=i.parameters!==void 0?i.parameters[E.input]:E.input,l=i.parameters!==void 0?i.parameters[E.output]:E.output,w=I._invokeOne(function(p){return p.loadAnimationTargetFromChannel&&p.loadAnimationTargetFromChannel(Q)});e.push(w),C.push(this.getDependency("accessor",h)),o.push(this.getDependency("accessor",l)),B.push(E),s.push(c)}return Promise.all([Promise.all(e),Promise.all(C),Promise.all(o),Promise.all(B),Promise.all(s)]).then(function(Q){const E=Q[0],c=Q[1],h=Q[2],l=Q[3],w=Q[4],p=[];for(n=0,a=E.length;n<a;n++){const d=E[n],u=c[n],y=h[n],f=l[n],S=w[n];if(d===void 0)continue;d.updateMatrix&&(d.updateMatrix(),d.matrixAutoUpdate=!0);const G=I._invokeOne(function(k){return k.createAnimationTracks&&k.createAnimationTracks(d,u,y,f,S)});if(G)for(let k=0;k<G.length;k++)p.push(G[k])}const D=i.name?i.name:"animation_"+A;return new Mt(D,void 0,p)})}createNodeMesh(A){const g=this.json,I=this,i=g.nodes[A];return i.mesh===void 0?null:I.getDependency("mesh",i.mesh).then(function(e){const C=I._getNodeRef(I.meshCache,i.mesh,e);return i.weights!==void 0&&C.traverse(function(o){if(o.isMesh)for(let B=0,s=i.weights.length;B<s;B++)o.morphTargetInfluences[B]=i.weights[B]}),C})}loadNode(A){const g=this.json,I=this.extensions,i=this,e=g.nodes[A],C=e.name?i.createUniqueName(e.name):"";return function(){const o=[],B=i._invokeOne(function(s){return s.createNodeMesh&&s.createNodeMesh(A)});return B&&o.push(B),e.camera!==void 0&&o.push(i.getDependency("camera",e.camera).then(function(s){return i._getNodeRef(i.cameraCache,e.camera,s)})),i._invokeAll(function(s){return s.createNodeAttachment&&s.createNodeAttachment(A)}).forEach(function(s){o.push(s)}),Promise.all(o)}().then(function(o){let B;if(e.isBone===!0?B=new Ih:o.length>1?B=new Gt:o.length===1?B=o[0]:B=new LA,B!==o[0])for(let s=0,n=o.length;s<n;s++)B.add(o[s]);if(e.name&&(B.userData.name=e.name,B.name=C),BB(B,e),e.extensions&&Jr(I,B,e),e.matrix!==void 0){const s=new $A;s.fromArray(e.matrix),B.applyMatrix4(s)}else e.translation!==void 0&&B.position.fromArray(e.translation),e.rotation!==void 0&&B.quaternion.fromArray(e.rotation),e.scale!==void 0&&B.scale.fromArray(e.scale);return i.associations.has(B)||i.associations.set(B,{}),i.associations.get(B).nodes=A,B})}loadScene(A){const g=this.json,I=this.extensions,i=this.json.scenes[A],e=this,C=new Gt;i.name&&(C.name=e.createUniqueName(i.name)),BB(C,i),i.extensions&&Jr(I,C,i);const o=i.nodes||[],B=[];for(let s=0,n=o.length;s<n;s++)B.push(aF(o[s],C,g,e));return Promise.all(B).then(function(){const s=n=>{const a=new Map;for(const[Q,E]of e.associations)(Q instanceof DI||Q instanceof Wg)&&a.set(Q,E);return n.traverse(Q=>{const E=e.associations.get(Q);E!=null&&a.set(Q,E)}),a};return e.associations=s(C),C})}loadAnimationTargetFromChannel(A){const g=A.target,I=g.node!==void 0?g.node:g.id;return this.getDependency("node",I)}createAnimationTracks(A,g,I,i,e){const C=[],o=A.name?A.name:A.uuid,B=[];oB[e.path]===oB.weights?A.traverse(function(Q){Q.morphTargetInfluences&&B.push(Q.name?Q.name:Q.uuid)}):B.push(o);let s;switch(oB[e.path]){case oB.weights:s=Oo;break;case oB.rotation:s=AC;break;case oB.position:case oB.scale:default:switch(I.itemSize){case 1:s=Oo;break;case 2:case 3:s=_o;break;case 4:s=Ar;break}break}const n=i.interpolation!==void 0?sF[i.interpolation]:xC,a=QF(I);for(let Q=0,E=B.length;Q<E;Q++){const c=new s(B[Q]+"."+oB[e.path],g.array,a,n);n==="CUBICSPLINE"&&Hy(c),C.push(c)}return C}}function aF(t,A,g,I){const i=g.nodes[t];return I.getDependency("node",t).then(function(e){if(i.skin===void 0)return e;let C;return I.getDependency("skin",i.skin).then(function(o){C=o;const B=[];for(let s=0,n=C.joints.length;s<n;s++)B.push(I.getDependency("node",C.joints[s]));return Promise.all(B)}).then(function(o){return e.traverse(function(B){if(!B.isMesh)return;const s=[],n=[];for(let a=0,Q=o.length;a<Q;a++){const E=o[a];if(E){s.push(E);const c=new $A;C.inverseBindMatrices!==void 0&&c.fromArray(C.inverseBindMatrices.array,a*16),n.push(c)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',C.joints[a])}B.bind(new qa(s,n),B.matrixWorld)}),e})}).then(function(e){A.add(e);const C=[];if(i.children){const o=i.children;for(let B=0,s=o.length;B<s;B++){const n=o[B];C.push(aF(n,e,g,I))}}return Promise.all(C)})}function jO(t,A,g){const I=A.attributes,i=new bi;if(I.POSITION!==void 0){const o=g.json.accessors[I.POSITION],B=o.min,s=o.max;if(B!==void 0&&s!==void 0){if(i.set(new M(B[0],B[1],B[2]),new M(s[0],s[1],s[2])),o.normalized){const n=xy(aQ[o.componentType]);i.min.multiplyScalar(n),i.max.multiplyScalar(n)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const e=A.targets;if(e!==void 0){const o=new M,B=new M;for(let s=0,n=e.length;s<n;s++){const a=e[s];if(a.POSITION!==void 0){const Q=g.json.accessors[a.POSITION],E=Q.min,c=Q.max;if(E!==void 0&&c!==void 0){if(B.setX(Math.max(Math.abs(E[0]),Math.abs(c[0]))),B.setY(Math.max(Math.abs(E[1]),Math.abs(c[1]))),B.setZ(Math.max(Math.abs(E[2]),Math.abs(c[2]))),Q.normalized){const h=xy(aQ[Q.componentType]);B.multiplyScalar(h)}o.max(B)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}i.expandByVector(o)}t.boundingBox=i;const C=new Zt;i.getCenter(C.center),C.radius=i.min.distanceTo(i.max)/2,t.boundingSphere=C}function rF(t,A,g){const I=A.attributes,i=[];function e(C,o){return g.getDependency("accessor",C).then(function(B){t.setAttribute(o,B)})}for(const C in I){const o=by[C]||C.toLowerCase();o in t.attributes||i.push(e(I[C],o))}if(A.indices!==void 0&&!t.index){const C=g.getDependency("accessor",A.indices).then(function(o){t.setIndex(o)});i.push(C)}return BB(t,A),jO(t,A,g),Promise.all(i).then(function(){return A.targets!==void 0?TO(t,A.targets,g):t})}function EF(t,A){let g=t.getIndex();if(g===null){const C=[],o=t.getAttribute("position");if(o!==void 0){for(let B=0;B<o.count;B++)C.push(B);t.setIndex(C),g=t.getIndex()}else return console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),t}const I=g.count-2,i=[];if(A===xw)for(let C=1;C<=I;C++)i.push(g.getX(0)),i.push(g.getX(C)),i.push(g.getX(C+1));else for(let C=0;C<I;C++)C%2===0?(i.push(g.getX(C)),i.push(g.getX(C+1)),i.push(g.getX(C+2))):(i.push(g.getX(C+2)),i.push(g.getX(C+1)),i.push(g.getX(C)));i.length/3!==I&&console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const e=t.clone();return e.setIndex(i),e}const vy=new WeakMap;class Ty extends Yi{constructor(A){super(A),this.decoderPath="",this.decoderConfig={},this.decoderBinary=null,this.decoderPending=null,this.workerLimit=4,this.workerPool=[],this.workerNextTaskID=1,this.workerSourceURL="",this.defaultAttributeIDs={position:"POSITION",normal:"NORMAL",color:"COLOR",uv:"TEX_COORD"},this.defaultAttributeTypes={position:"Float32Array",normal:"Float32Array",color:"Float32Array",uv:"Float32Array"}}setDecoderPath(A){return this.decoderPath=A,this}setDecoderConfig(A){return this.decoderConfig=A,this}setWorkerLimit(A){return this.workerLimit=A,this}load(A,g,I,i){const e=new ii(this.manager);e.setPath(this.path),e.setResponseType("arraybuffer"),e.setRequestHeader(this.requestHeader),e.setWithCredentials(this.withCredentials),e.load(A,C=>{this.decodeDracoFile(C,g).catch(i)},I,i)}decodeDracoFile(A,g,I,i){const e={attributeIDs:I||this.defaultAttributeIDs,attributeTypes:i||this.defaultAttributeTypes,useUniqueIDs:!!I};return this.decodeGeometry(A,e).then(g)}decodeGeometry(A,g){const I=JSON.stringify(g);if(vy.has(A)){const B=vy.get(A);if(B.key===I)return B.promise;if(A.byteLength===0)throw new Error("THREE.DRACOLoader: Unable to re-decode a buffer with different settings. Buffer has already been transferred.")}let i;const e=this.workerNextTaskID++,C=A.byteLength,o=this._getWorker(e,C).then(B=>(i=B,new Promise((s,n)=>{i._callbacks[e]={resolve:s,reject:n},i.postMessage({type:"decode",id:e,taskConfig:g,buffer:A},[A])}))).then(B=>this._createGeometry(B.geometry));return o.catch(()=>!0).then(()=>{i&&e&&this._releaseTask(i,e)}),vy.set(A,{key:I,promise:o}),o}_createGeometry(A){const g=new cg;A.index&&g.setIndex(new Eg(A.index.array,1));for(let I=0;I<A.attributes.length;I++){const i=A.attributes[I],e=i.name,C=i.array,o=i.itemSize;g.setAttribute(e,new Eg(C,o))}return g}_loadLibrary(A,g){const I=new ii(this.manager);return I.setPath(this.decoderPath),I.setResponseType(g),I.setWithCredentials(this.withCredentials),new Promise((i,e)=>{I.load(A,i,void 0,e)})}preload(){return this._initDecoder(),this}_initDecoder(){if(this.decoderPending)return this.decoderPending;const A=typeof WebAssembly!="object"||this.decoderConfig.type==="js",g=[];return A?g.push(this._loadLibrary("draco_decoder.js","text")):(g.push(this._loadLibrary("draco_wasm_wrapper.js","text")),g.push(this._loadLibrary("draco_decoder.wasm","arraybuffer"))),this.decoderPending=Promise.all(g).then(I=>{const i=I[0];A||(this.decoderConfig.wasmBinary=I[1]);const e=ZO.toString(),C=["/* draco decoder */",i,"","/* worker */",e.substring(e.indexOf("{")+1,e.lastIndexOf("}"))].join(`
|
|
3404
3404
|
`);this.workerSourceURL=URL.createObjectURL(new Blob([C]))}),this.decoderPending}_getWorker(A,g){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){const i=new Worker(this.workerSourceURL);i._callbacks={},i._taskCosts={},i._taskLoad=0,i.postMessage({type:"init",decoderConfig:this.decoderConfig}),i.onmessage=function(e){const C=e.data;switch(C.type){case"decode":i._callbacks[C.id].resolve(C);break;case"error":i._callbacks[C.id].reject(C);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+C.type+'"')}},this.workerPool.push(i)}else this.workerPool.sort(function(i,e){return i._taskLoad>e._taskLoad?-1:1});const I=this.workerPool[this.workerPool.length-1];return I._taskCosts[A]=g,I._taskLoad+=g,I})}_releaseTask(A,g){A._taskLoad-=A._taskCosts[g],delete A._callbacks[g],delete A._taskCosts[g]}debug(){console.log("Task load: ",this.workerPool.map(A=>A._taskLoad))}dispose(){for(let A=0;A<this.workerPool.length;++A)this.workerPool[A].terminate();return this.workerPool.length=0,this}}function ZO(){let t,A;onmessage=function(C){const o=C.data;switch(o.type){case"init":t=o.decoderConfig,A=new Promise(function(n){t.onModuleLoaded=function(a){n({draco:a})},DracoDecoderModule(t)});break;case"decode":const B=o.buffer,s=o.taskConfig;A.then(n=>{const a=n.draco,Q=new a.Decoder,E=new a.DecoderBuffer;E.Init(new Int8Array(B),B.byteLength);try{const c=g(a,Q,E,s),h=c.attributes.map(l=>l.array.buffer);c.index&&h.push(c.index.array.buffer),self.postMessage({type:"decode",id:o.id,geometry:c},h)}catch(c){console.error(c),self.postMessage({type:"error",id:o.id,error:c.message})}finally{a.destroy(E),a.destroy(Q)}});break}};function g(C,o,B,s){const n=s.attributeIDs,a=s.attributeTypes;let Q,E;const c=o.GetEncodedGeometryType(B);if(c===C.TRIANGULAR_MESH)Q=new C.Mesh,E=o.DecodeBufferToMesh(B,Q);else if(c===C.POINT_CLOUD)Q=new C.PointCloud,E=o.DecodeBufferToPointCloud(B,Q);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!E.ok()||Q.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+E.error_msg());const h={index:null,attributes:[]};for(const l in n){const w=self[a[l]];let p,D;if(s.useUniqueIDs)D=n[l],p=o.GetAttributeByUniqueId(Q,D);else{if(D=o.GetAttributeId(Q,C[n[l]]),D===-1)continue;p=o.GetAttribute(Q,D)}h.attributes.push(i(C,o,Q,l,w,p))}return c===C.TRIANGULAR_MESH&&(h.index=I(C,o,Q)),C.destroy(Q),h}function I(C,o,B){const n=B.num_faces()*3,a=n*4,Q=C._malloc(a);o.GetTrianglesUInt32Array(B,a,Q);const E=new Uint32Array(C.HEAPF32.buffer,Q,n).slice();return C._free(Q),{array:E,itemSize:1}}function i(C,o,B,s,n,a){const Q=a.num_components(),c=B.num_points()*Q,h=c*n.BYTES_PER_ELEMENT,l=e(C,n),w=C._malloc(h);o.GetAttributeDataArrayForAllPoints(B,a,l,h,w);const p=new n(C.HEAPF32.buffer,w,c).slice();return C._free(w),{name:s,array:p,itemSize:Q}}function e(C,o){switch(o){case Float32Array:return C.DT_FLOAT32;case Int8Array:return C.DT_INT8;case Int16Array:return C.DT_INT16;case Int32Array:return C.DT_INT32;case Uint8Array:return C.DT_UINT8;case Uint16Array:return C.DT_UINT16;case Uint32Array:return C.DT_UINT32}}}class VO{constructor(A=4){this.pool=A,this.queue=[],this.workers=[],this.workersResolve=[],this.workerStatus=0}_initWorker(A){if(!this.workers[A]){const g=this.workerCreator();g.addEventListener("message",this._onMessage.bind(this,A)),this.workers[A]=g}}_getIdleWorker(){for(let A=0;A<this.pool;A++)if(!(this.workerStatus&1<<A))return A;return-1}_onMessage(A,g){const I=this.workersResolve[A];if(I&&I(g),this.queue.length){const{resolve:i,msg:e,transfer:C}=this.queue.shift();this.workersResolve[A]=i,this.workers[A].postMessage(e,C)}else this.workerStatus^=1<<A}setWorkerCreator(A){this.workerCreator=A}setWorkerLimit(A){this.pool=A}postMessage(A,g){return new Promise(I=>{const i=this._getIdleWorker();i!==-1?(this._initWorker(i),this.workerStatus|=1<<i,this.workersResolve[i]=I,this.workers[i].postMessage(A,g)):this.queue.push({resolve:I,msg:A,transfer:g})})}dispose(){this.workers.forEach(A=>A.terminate()),this.workersResolve.length=0,this.workers.length=0,this.queue.length=0,this.workerStatus=0}}const zO=0,XO=2,$O=1,A_=2,g_=0,cF=9,Oy=15,hF=16,_y=22,lF=37,Py=43,DF=76,dF=83,wF=97,uF=100,pF=103,yF=109;class I_{constructor(){this.vkFormat=0,this.typeSize=1,this.pixelWidth=0,this.pixelHeight=0,this.pixelDepth=0,this.layerCount=0,this.faceCount=1,this.supercompressionScheme=0,this.levels=[],this.dataFormatDescriptor=[{vendorId:0,descriptorType:0,descriptorBlockSize:0,versionNumber:2,colorModel:0,colorPrimaries:1,transferFunction:2,flags:0,texelBlockDimension:[0,0,0,0],bytesPlane:[0,0,0,0,0,0,0,0],samples:[]}],this.keyValue={},this.globalData=null}}class qr{constructor(A,g,I,i){this._dataView=new DataView(A.buffer,A.byteOffset+g,I),this._littleEndian=i,this._offset=0}_nextUint8(){const A=this._dataView.getUint8(this._offset);return this._offset+=1,A}_nextUint16(){const A=this._dataView.getUint16(this._offset,this._littleEndian);return this._offset+=2,A}_nextUint32(){const A=this._dataView.getUint32(this._offset,this._littleEndian);return this._offset+=4,A}_nextUint64(){const A=this._dataView.getUint32(this._offset,this._littleEndian)+4294967296*this._dataView.getUint32(this._offset+4,this._littleEndian);return this._offset+=8,A}_nextInt32(){const A=this._dataView.getInt32(this._offset,this._littleEndian);return this._offset+=4,A}_skip(A){return this._offset+=A,this}_scan(A,g=0){const I=this._offset;let i=0;for(;this._dataView.getUint8(this._offset)!==g&&i<A;)i++,this._offset++;return i<A&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+I,i)}}const zi=[171,75,84,88,32,50,48,187,13,10,26,10];function SF(t){return typeof TextDecoder<"u"?new TextDecoder().decode(t):Buffer.from(t).toString("utf8")}function i_(t){const A=new Uint8Array(t.buffer,t.byteOffset,zi.length);if(A[0]!==zi[0]||A[1]!==zi[1]||A[2]!==zi[2]||A[3]!==zi[3]||A[4]!==zi[4]||A[5]!==zi[5]||A[6]!==zi[6]||A[7]!==zi[7]||A[8]!==zi[8]||A[9]!==zi[9]||A[10]!==zi[10]||A[11]!==zi[11])throw new Error("Missing KTX 2.0 identifier.");const g=new I_,I=17*Uint32Array.BYTES_PER_ELEMENT,i=new qr(t,zi.length,I,!0);g.vkFormat=i._nextUint32(),g.typeSize=i._nextUint32(),g.pixelWidth=i._nextUint32(),g.pixelHeight=i._nextUint32(),g.pixelDepth=i._nextUint32(),g.layerCount=i._nextUint32(),g.faceCount=i._nextUint32();const e=i._nextUint32();g.supercompressionScheme=i._nextUint32();const C=i._nextUint32(),o=i._nextUint32(),B=i._nextUint32(),s=i._nextUint32(),n=i._nextUint64(),a=i._nextUint64(),Q=new qr(t,zi.length+I,3*e*8,!0);for(let P=0;P<e;P++)g.levels.push({levelData:new Uint8Array(t.buffer,t.byteOffset+Q._nextUint64(),Q._nextUint64()),uncompressedByteLength:Q._nextUint64()});const E=new qr(t,C,o,!0),c={vendorId:E._skip(4)._nextUint16(),descriptorType:E._nextUint16(),versionNumber:E._nextUint16(),descriptorBlockSize:E._nextUint16(),colorModel:E._nextUint8(),colorPrimaries:E._nextUint8(),transferFunction:E._nextUint8(),flags:E._nextUint8(),texelBlockDimension:[E._nextUint8(),E._nextUint8(),E._nextUint8(),E._nextUint8()],bytesPlane:[E._nextUint8(),E._nextUint8(),E._nextUint8(),E._nextUint8(),E._nextUint8(),E._nextUint8(),E._nextUint8(),E._nextUint8()],samples:[]},h=(c.descriptorBlockSize/4-6)/4;for(let P=0;P<h;P++){const j={bitOffset:E._nextUint16(),bitLength:E._nextUint8(),channelType:E._nextUint8(),samplePosition:[E._nextUint8(),E._nextUint8(),E._nextUint8(),E._nextUint8()],sampleLower:-1/0,sampleUpper:1/0};64&j.channelType?(j.sampleLower=E._nextInt32(),j.sampleUpper=E._nextInt32()):(j.sampleLower=E._nextUint32(),j.sampleUpper=E._nextUint32()),c.samples[P]=j}g.dataFormatDescriptor.length=0,g.dataFormatDescriptor.push(c);const l=new qr(t,B,s,!0);for(;l._offset<s;){const P=l._nextUint32(),j=l._scan(P),iA=SF(j),EA=l._scan(P-j.byteLength);g.keyValue[iA]=iA.match(/^ktx/i)?SF(EA):EA,l._offset%4&&l._skip(4-l._offset%4)}if(a<=0)return g;const w=new qr(t,n,a,!0),p=w._nextUint16(),D=w._nextUint16(),d=w._nextUint32(),u=w._nextUint32(),y=w._nextUint32(),f=w._nextUint32(),S=[];for(let P=0;P<e;P++)S.push({imageFlags:w._nextUint32(),rgbSliceByteOffset:w._nextUint32(),rgbSliceByteLength:w._nextUint32(),alphaSliceByteOffset:w._nextUint32(),alphaSliceByteLength:w._nextUint32()});const G=n+w._offset,k=G+d,m=k+u,q=m+y,N=new Uint8Array(t.buffer,t.byteOffset+G,d),K=new Uint8Array(t.buffer,t.byteOffset+k,u),x=new Uint8Array(t.buffer,t.byteOffset+m,y),_=new Uint8Array(t.buffer,t.byteOffset+q,f);return g.globalData={endpointCount:p,selectorCount:D,imageDescs:S,endpointsData:N,selectorsData:K,tablesData:x,extendedData:_},g}let Wy,oo,jy;const Zy={env:{emscripten_notify_memory_growth:function(t){jy=new Uint8Array(oo.exports.memory.buffer)}}};class e_{init(){return Wy||(Wy=typeof fetch<"u"?fetch("data:application/wasm;base64,"+fF).then(A=>A.arrayBuffer()).then(A=>WebAssembly.instantiate(A,Zy)).then(this._init):WebAssembly.instantiate(Buffer.from(fF,"base64"),Zy).then(this._init),Wy)}_init(A){oo=A.instance,Zy.env.emscripten_notify_memory_growth(0)}decode(A,g=0){if(!oo)throw new Error("ZSTDDecoder: Await .init() before decoding.");const I=A.byteLength,i=oo.exports.malloc(I);jy.set(A,i),g=g||Number(oo.exports.ZSTD_findDecompressedSize(i,I));const e=oo.exports.malloc(g),C=oo.exports.ZSTD_decompress(e,g,i,I),o=jy.slice(e,e+C);return oo.exports.free(i),oo.exports.free(e),o}}const fF="AGFzbQEAAAABpQEVYAF/AX9gAn9/AGADf39/AX9gBX9/f39/AX9gAX8AYAJ/fwF/YAR/f39/AX9gA39/fwBgBn9/f39/fwF/YAd/f39/f39/AX9gAn9/AX5gAn5+AX5gAABgBX9/f39/AGAGf39/f39/AGAIf39/f39/f38AYAl/f39/f39/f38AYAABf2AIf39/f39/f38Bf2ANf39/f39/f39/f39/fwF/YAF/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQU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aiEDIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2AgAgARAEGiAAIAJBCGo2AgQLCAAgAGdBH3MLugUBDX8jAEEQayIKJAACfyAEQQNNBEAgCkEANgIMIApBDGogAyAEEAsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBBCksNABogAiAAQQVqNgIAIAMgBGoiAkF8aiEMIAJBeWohDiACQXtqIRAgAEEGaiELQQQhBSAGQQR2IQRBICAAdCIAQQFyIQkgASgCACEPQQAhAiADIQYCQANAIAlBAkggAiAPS3JFBEAgAiEHAkAgCARAA0AgBEH//wNxQf//A0YEQCAHQRhqIQcgBiAQSQR/IAZBAmoiBigAACAFdgUgBUE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AIQMgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAAkAgA0EBRg0AIAEoAAAiBkGo6r5pRg0AQXYhAyAGQXBxQdDUtMIBRw0BQQghAyACQQhJDQEgAEEAQSgQECEAIAEoAAQhASAAQQE2AhQgACABrTcDAEEADwsgASACIAMQLyIDIAJLDQAgACADNgIYQXIhAyABIARqIgVBf2otAAAiAkEIcQ0AIAJBIHEiBkUEQEFwIQMgBS0AACIFQacBSw0BIAVBB3GtQgEgBUEDdkEKaq2GIgdCA4h+IAd8IQggBEEBaiEECyACQQZ2IQMgAkECdiEFAkAgAkEDcUF/aiICQQJLBEBBACECDAELAkACQAJAIAJBAWsOAgECAAsgASAEai0AACECIARBAWohBAwCCyABIARqLwAAIQIgBEECaiEEDAELIAEgBGooAAA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CAKEAcgAkERTwRAIARBEGohAgNAIAIgCkEQaiIKEAcgAkEQaiICIAhJDQALCyAIIAlrIQIgByATNgJcIAkgCCAOa0sEQCAJIAggEWtLBEBBbCELDAILIBAgAiAOayICaiIKIANqIBBNBEAgCCAKIAMQDxoMAgsgCCAKQQAgAmsQDyEIIAcgAiADaiIDNgJkIAggAmshCCAOIQILIAlBEE8EQCADIAhqIQMDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALDAELAkAgCUEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgCUECdCIDQcAeaigCAGoiAhAXIAIgA0HgHmooAgBrIQIgBygCZCEDDAELIAggAhAMCyADQQlJDQAgAyAIaiEDIAhBCGoiCCACQQhqIgJrQQ9MBEADQCAIIAIQDCACQQhqIQIgCEEIaiIIIANJDQAMAgALAAsDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALCyAHQRhqEAQaIAsgDCALEAMiAhshDCAEIAQgC2ogAhshBCAFQX9qIgUNAAsgDBADDQFBbCEMIAdBGGoQBEECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWohCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCA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YIQcgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrO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AEBlMAAAAAAAcGgwAAAAAACQYDAgAAEAAABAQAAAAAAAAEBQAAACAAAAUGAAAAAAAABQcAAAAgAAAFCQAAAAAAAAUKAAAAAAAABgwAAAAAAAAGDwAAAAAAAAYSAAAAAAAABhUAAAAAAAAGGAAAAAAAAAYbAAAAAAAABh4AAAAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/AAAA/wAAAP8BAAD/AwAA/wcAAP8PAAD/HwAA/z8AAP9/AAD//wAA//8BAP//AwD//wcA//8PAP//HwD//z8A//9/AP///wD///8B////A////wf///8P////H////z////9/AAAAAAEAAAACAAAABAAAAAAAAAACAAAABAAAAAgAAAAAAAAAAQAAAAIAAAABAAAABAAAAAQAAAAEAAAABAAAAAgAAAAIAAAACAAAAAcAAAAIAAAACQAAAAoAAAALAEGgIAsDwBBQ",Vy=new WeakMap;let zy=0,Xy;class Jt extends Yi{constructor(A){super(A),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new VO,this.workerSourceURL="",this.workerConfig=null,typeof MSC_TRANSCODER<"u"&&console.warn('THREE.KTX2Loader: Please update to latest "basis_transcoder". "msc_basis_transcoder" is no longer supported in three.js r125+.')}setTranscoderPath(A){return this.transcoderPath=A,this}setWorkerLimit(A){return this.workerPool.setWorkerLimit(A),this}detectSupport(A){return this.workerConfig={astcSupported:A.extensions.has("WEBGL_compressed_texture_astc"),etc1Supported:A.extensions.has("WEBGL_compressed_texture_etc1"),etc2Supported:A.extensions.has("WEBGL_compressed_texture_etc"),dxtSupported:A.extensions.has("WEBGL_compressed_texture_s3tc"),bptcSupported:A.extensions.has("EXT_texture_compression_bptc"),pvrtcSupported:A.extensions.has("WEBGL_compressed_texture_pvrtc")||A.extensions.has("WEBKIT_WEBGL_compressed_texture_pvrtc")},A.capabilities.isWebGL2&&(this.workerConfig.etc1Supported=!1),this}init(){if(!this.transcoderPending){const A=new ii(this.manager);A.setPath(this.transcoderPath),A.setWithCredentials(this.withCredentials);const g=A.loadAsync("basis_transcoder.js"),I=new ii(this.manager);I.setPath(this.transcoderPath),I.setResponseType("arraybuffer"),I.setWithCredentials(this.withCredentials);const i=I.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([g,i]).then(([e,C])=>{const o=Jt.BasisWorker.toString(),B=["/* constants */","let _EngineFormat = "+JSON.stringify(Jt.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(Jt.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(Jt.BasisFormat),"/* basis_transcoder.js */",e,"/* worker */",o.substring(o.indexOf("{")+1,o.lastIndexOf("}"))].join(`
|
|
3405
|
-
`);this.workerSourceURL=URL.createObjectURL(new Blob([B])),this.transcoderBinary=C,this.workerPool.setWorkerCreator(()=>{const s=new Worker(this.workerSourceURL),n=this.transcoderBinary.slice(0);return s.postMessage({type:"init",config:this.workerConfig,transcoderBinary:n},[n]),s})}),zy>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),zy++}return this.transcoderPending}load(A,g,I,i){if(this.workerConfig===null)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");const e=new ii(this.manager);e.setResponseType("arraybuffer"),e.setWithCredentials(this.withCredentials),e.load(A,C=>{if(Vy.has(C))return Vy.get(C).promise.then(g).catch(i);this._createTexture(C).then(o=>g?g(o):null).catch(i)},I,i)}_createTextureFrom(A,g){const{mipmaps:I,width:i,height:e,format:C,type:o,error:B,dfdTransferFn:s,dfdFlags:n}=A;if(o==="error")return Promise.reject(B);const a=g.layerCount>1?new jk(I,i,e,g.layerCount,C,Ni):new jC(I,i,e,C,Ni);return a.minFilter=I.length===1?Tg:dt,a.magFilter=Tg,a.generateMipmaps=!1,a.needsUpdate=!0,a.encoding=s===A_?Dg:$I,a.premultiplyAlpha=!!(n&$O),a}async _createTexture(A,g={}){const I=i_(new Uint8Array(A));if(I.vkFormat!==g_)return C_(I);const i=g,e=this.init().then(()=>this.workerPool.postMessage({type:"transcode",buffer:A,taskConfig:i},[A])).then(C=>this._createTextureFrom(C.data,I));return Vy.set(A,{promise:e}),e}dispose(){return this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),zy--,this}}Jt.BasisFormat={ETC1S:0,UASTC_4x4:1},Jt.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16},Jt.EngineFormat={RGBAFormat:lI,RGBA_ASTC_4x4_Format:dc,RGBA_BPTC_Format:wc,RGBA_ETC2_EAC_Format:Dc,RGBA_PVRTC_4BPPV1_Format:hc,RGBA_S3TC_DXT5_Format:ha,RGB_ETC1_Format:Sw,RGB_ETC2_Format:lc,RGB_PVRTC_4BPPV1_Format:cc,RGB_S3TC_DXT1_Format:ca},Jt.BasisWorker=function(){let t,A,g;const I=_EngineFormat,i=_TranscoderFormat,e=_BasisFormat;self.addEventListener("message",function(c){const h=c.data;switch(h.type){case"init":t=h.config,C(h.transcoderBinary);break;case"transcode":A.then(()=>{try{const{width:l,height:w,hasAlpha:p,mipmaps:D,format:d,dfdTransferFn:u,dfdFlags:y}=o(h.buffer),f=[];for(let S=0;S<D.length;++S)f.push(D[S].data.buffer);self.postMessage({type:"transcode",id:h.id,width:l,height:w,hasAlpha:p,mipmaps:D,format:d,dfdTransferFn:u,dfdFlags:y},f)}catch(l){console.error(l),self.postMessage({type:"error",id:h.id,error:l.message})}});break}});function C(c){A=new Promise(h=>{g={wasmBinary:c,onRuntimeInitialized:h},BASIS(g)}).then(()=>{g.initializeBasis(),g.KTX2File===void 0&&console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")})}function o(c){const h=new g.KTX2File(new Uint8Array(c));function l(){h.close(),h.delete()}if(!h.isValid())throw l(),new Error("THREE.KTX2Loader: Invalid or unsupported .ktx2 file");const w=h.isUASTC()?e.UASTC_4x4:e.ETC1S,p=h.getWidth(),D=h.getHeight(),d=h.getLayers()||1,u=h.getLevels(),y=h.getHasAlpha(),f=h.getDFDTransferFunc(),S=h.getDFDFlags(),{transcoderFormat:G,engineFormat:k}=a(w,p,D,y);if(!p||!D||!u)throw l(),new Error("THREE.KTX2Loader: Invalid texture");if(!h.startTranscoding())throw l(),new Error("THREE.KTX2Loader: .startTranscoding failed");const m=[];for(let q=0;q<u;q++){const N=[];let K,x;for(let _=0;_<d;_++){const P=h.getImageLevelInfo(q,_,0);K=P.origWidth,x=P.origHeight;const j=new Uint8Array(h.getImageTranscodedSizeInBytes(q,_,0,G));if(!h.transcodeImage(j,q,_,0,G,0,-1,-1))throw l(),new Error("THREE.KTX2Loader: .transcodeImage failed.");N.push(j)}m.push({data:E(N),width:K,height:x})}return l(),{width:p,height:D,hasAlpha:y,mipmaps:m,format:k,dfdTransferFn:f,dfdFlags:S}}const B=[{if:"astcSupported",basisFormat:[e.UASTC_4x4],transcoderFormat:[i.ASTC_4x4,i.ASTC_4x4],engineFormat:[I.RGBA_ASTC_4x4_Format,I.RGBA_ASTC_4x4_Format],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[e.ETC1S,e.UASTC_4x4],transcoderFormat:[i.BC7_M5,i.BC7_M5],engineFormat:[I.RGBA_BPTC_Format,I.RGBA_BPTC_Format],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[e.ETC1S,e.UASTC_4x4],transcoderFormat:[i.BC1,i.BC3],engineFormat:[I.RGB_S3TC_DXT1_Format,I.RGBA_S3TC_DXT5_Format],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[e.ETC1S,e.UASTC_4x4],transcoderFormat:[i.ETC1,i.ETC2],engineFormat:[I.RGB_ETC2_Format,I.RGBA_ETC2_EAC_Format],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[e.ETC1S,e.UASTC_4x4],transcoderFormat:[i.ETC1],engineFormat:[I.RGB_ETC1_Format],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[e.ETC1S,e.UASTC_4x4],transcoderFormat:[i.PVRTC1_4_RGB,i.PVRTC1_4_RGBA],engineFormat:[I.RGB_PVRTC_4BPPV1_Format,I.RGBA_PVRTC_4BPPV1_Format],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0}],s=B.sort(function(c,h){return c.priorityETC1S-h.priorityETC1S}),n=B.sort(function(c,h){return c.priorityUASTC-h.priorityUASTC});function a(c,h,l,w){let p,D;const d=c===e.ETC1S?s:n;for(let u=0;u<d.length;u++){const y=d[u];if(t[y.if]&&y.basisFormat.includes(c)&&!(w&&y.transcoderFormat.length<2)&&!(y.needsPowerOfTwo&&!(Q(h)&&Q(l))))return p=y.transcoderFormat[w?1:0],D=y.engineFormat[w?1:0],{transcoderFormat:p,engineFormat:D}}return console.warn("THREE.KTX2Loader: No suitable compressed texture format found. Decoding to RGBA32."),p=i.RGBA32,D=I.RGBAFormat,{transcoderFormat:p,engineFormat:D}}function Q(c){return c<=2?!0:(c&c-1)===0&&c!==0}function E(c){let h=0;for(const p of c)h+=p.byteLength;const l=new Uint8Array(h);let w=0;for(const p of c)l.set(p,w),w+=p.byteLength;return l}};const GF={[yF]:lI,[wF]:lI,[lF]:lI,[Py]:lI,[pF]:ln,[dF]:ln,[hF]:ln,[_y]:ln,[uF]:OB,[DF]:OB,[Oy]:OB,[cF]:OB},$y={[yF]:XI,[wF]:ni,[lF]:Ni,[Py]:Ni,[pF]:XI,[dF]:ni,[hF]:Ni,[_y]:Ni,[uF]:XI,[DF]:ni,[Oy]:Ni,[cF]:Ni},t_={[Py]:Dg,[_y]:Dg,[Oy]:Dg};async function C_(t){const{vkFormat:A,pixelWidth:g,pixelHeight:I,pixelDepth:i}=t;if(GF[A]===void 0)throw new Error("THREE.KTX2Loader: Unsupported vkFormat.");const e=t.levels[0];let C,o;if(t.supercompressionScheme===zO)C=e.levelData;else if(t.supercompressionScheme===XO)Xy||(Xy=new Promise(async s=>{const n=new e_;await n.init(),s(n)})),C=(await Xy).decode(e.levelData,e.uncompressedByteLength);else throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");$y[A]===XI?o=new Float32Array(C.buffer,C.byteOffset,C.byteLength/Float32Array.BYTES_PER_ELEMENT):$y[A]===ni?o=new Uint16Array(C.buffer,C.byteOffset,C.byteLength/Uint16Array.BYTES_PER_ELEMENT):o=C;const B=i===0?new Vt(o,g,I):new fa(o,g,I,i);return B.type=$y[A],B.format=GF[A],B.encoding=t_[A]||$I,B.needsUpdate=!0,Promise.resolve(B)}var o_=function(){var t="b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuikqbeeedddillviebeoweuec:q;iekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbol79IV9Rbrq:P8Yqdbk;3sezu8Jjjjjbcj;eb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Radz1jjjbhwcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhDcbhqinaqae9pmeaDaeaq9RaqaDfae6Egkcsfgocl4cifcd4hxdndndndnaoc9WGgmTmbcbhPcehsawcjdfhzalhHinaraH9Rax6midnaraHaxfgl9RcK6mbczhoinawcj;cbfaogifgoc9WfhOdndndndndnaHaic9WfgAco4fRbbaAci4coG4ciGPlbedibkaO9cb83ibaOcwf9cb83ibxikaOalRblalRbbgAco4gCaCciSgCE86bbaocGfalclfaCfgORbbaAcl4ciGgCaCciSgCE86bbaocVfaOaCfgORbbaAcd4ciGgCaCciSgCE86bbaoc7faOaCfgORbbaAciGgAaAciSgAE86bbaoctfaOaAfgARbbalRbegOco4gCaCciSgCE86bbaoc91faAaCfgARbbaOcl4ciGgCaCciSgCE86bbaoc4faAaCfgARbbaOcd4ciGgCaCciSgCE86bbaoc93faAaCfgARbbaOciGgOaOciSgOE86bbaoc94faAaOfgARbbalRbdgOco4gCaCciSgCE86bbaoc95faAaCfgARbbaOcl4ciGgCaCciSgCE86bbaoc96faAaCfgARbbaOcd4ciGgCaCciSgCE86bbaoc97faAaCfgARbbaOciGgOaOciSgOE86bbaoc98faAaOfgORbbalRbiglco4gAaAciSgAE86bbaoc99faOaAfgORbbalcl4ciGgAaAciSgAE86bbaoc9:faOaAfgORbbalcd4ciGgAaAciSgAE86bbaocufaOaAfgoRbbalciGglalciSglE86bbaoalfhlxdkaOalRbwalRbbgAcl4gCaCcsSgCE86bbaocGfalcwfaCfgORbbaAcsGgAaAcsSgAE86bbaocVfaOaAfgORbbalRbegAcl4gCaCcsSgCE86bbaoc7faOaCfgORbbaAcsGgAaAcsSgAE86bbaoctfaOaAfgORbbalRbdgAcl4gCaCcsSgCE86bbaoc91faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc4faOaAfgORbbalRbigAcl4gCaCcsSgCE86bbaoc93faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc94faOaAfgORbbalRblgAcl4gCaCcsSgCE86bbaoc95faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc96faOaAfgORbbalRbvgAcl4gCaCcsSgCE86bbaoc97faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc98faOaAfgORbbalRbogAcl4gCaCcsSgCE86bbaoc99faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc9:faOaAfgORbbalRbrglcl4gAaAcsSgAE86bbaocufaOaAfgoRbbalcsGglalcsSglE86bbaoalfhlxekaOal8Pbb83bbaOcwfalcwf8Pbb83bbalczfhlkdnaiam9pmbaiczfhoaral9RcL0mekkaiam6mialTmidnakTmbawaPfRbbhOcbhoazhiinaiawcj;cbfaofRbbgAce4cbaAceG9R7aOfgO86bbaiadfhiaocefgoak9hmbkkazcefhzaPcefgPad6hsalhHaPad9hmexvkkcbhlasceGmdxikalaxad2fhCdnakTmbcbhHcehsawcjdfhminaral9Rax6mialTmdalaxfhlawaHfRbbhOcbhoamhiinaiawcj;cbfaofRbbgAce4cbaAceG9R7aOfgO86bbaiadfhiaocefgoak9hmbkamcefhmaHcefgHad6hsaHad9hmbkaChlxikcbhocehsinaral9Rax6mdalTmealaxfhlaocefgoad6hsadao9hmbkaChlxdkcbhlasceGTmekc9:hoxikabaqad2fawcjdfakad2z1jjjb8Aawawcjdfakcufad2fadz1jjjb8Aakaqfhqalmbkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;ebf8Kjjjjbaok;yzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecjez:jjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhDcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgrc;Ve0mbavc;abfalarcl4cu7fcsGcitfgPydlhsaPydbhzdnarcsGgPak9pmbavaiarcu7fcsGcdtfydbaxaPEhraPThPdndnadcd9hmbabaDcetfgHaz87ebaHcdfas87ebaHclfar87ebxekabaDcdtfgHazBdbaHclfasBdbaHcwfarBdbkaxaPfhxavc;abfalcitfgHarBdbaHasBdlavaicdtfarBdbavc;abfalcefcsGglcitfgHazBdbaHarBdlaiaPfhialcefhlxdkdndnaPcsSmbamaPfaPc987fcefhmxekaocefhrao8SbbgPcFeGhHdndnaPcu9mmbarhoxekaocvfhoaHcFbGhHcrhPdninar8SbbgOcFbGaPtaHVhHaOcu9kmearcefhraPcrfgPc8J9hmbxdkkarcefhokaHce4cbaHceG9R7amfhmkdndnadcd9hmbabaDcetfgraz87ebarcdfas87ebarclfam87ebxekabaDcdtfgrazBdbarclfasBdbarcwfamBdbkavc;abfalcitfgramBdbarasBdlavaicdtfamBdbavc;abfalcefcsGglcitfgrazBdbaramBdlaicefhialcefhlxekdnarcpe0mbaxcefgOavaiaqarcsGfRbbgPcl49RcsGcdtfydbaPcz6gHEhravaiaP9RcsGcdtfydbaOaHfgsaPcsGgOEhPaOThOdndnadcd9hmbabaDcetfgzax87ebazcdfar87ebazclfaP87ebxekabaDcdtfgzaxBdbazclfarBdbazcwfaPBdbkavaicdtfaxBdbavc;abfalcitfgzarBdbazaxBdlavaicefgicsGcdtfarBdbavc;abfalcefcsGcitfgzaPBdbazarBdlavaiaHfcsGgicdtfaPBdbavc;abfalcdfcsGglcitfgraxBdbaraPBdlalcefhlaiaOfhiasaOfhxxekaxcbaoRbbgzEgAarc;:eSgrfhsazcsGhCazcl4hXdndnazcs0mbascefhOxekashOavaiaX9RcsGcdtfydbhskdndnaCmbaOcefhxxekaOhxavaiaz9RcsGcdtfydbhOkdndnarTmbaocefhrxekaocdfhrao8SbegHcFeGhPdnaHcu9kmbaocofhAaPcFbGhPcrhodninar8SbbgHcFbGaotaPVhPaHcu9kmearcefhraocrfgoc8J9hmbkaAhrxekarcefhrkaPce4cbaPceG9R7amfgmhAkdndnaXcsSmbarhPxekarcefhPar8SbbgocFeGhHdnaocu9kmbarcvfhsaHcFbGhHcrhodninaP8SbbgrcFbGaotaHVhHarcu9kmeaPcefhPaocrfgoc8J9hmbkashPxekaPcefhPkaHce4cbaHceG9R7amfgmhskdndnaCcsSmbaPhoxekaPcefhoaP8SbbgrcFeGhHdnarcu9kmbaPcvfhOaHcFbGhHcrhrdninao8SbbgPcFbGartaHVhHaPcu9kmeaocefhoarcrfgrc8J9hmbkaOhoxekaocefhokaHce4cbaHceG9R7amfgmhOkdndnadcd9hmbabaDcetfgraA87ebarcdfas87ebarclfaO87ebxekabaDcdtfgraABdbarclfasBdbarcwfaOBdbkavc;abfalcitfgrasBdbaraABdlavaicdtfaABdbavc;abfalcefcsGcitfgraOBdbarasBdlavaicefgicsGcdtfasBdbavc;abfalcdfcsGcitfgraABdbaraOBdlavaiazcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiaDcifgDae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:llevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk;siliui99iue99dnaeTmbcbhiabhlindndnJ;Zl81Zalcof8UebgvciV:Y:vgoal8Ueb:YNgrJb;:FSNJbbbZJbbb:;arJbbbb9GEMgw:lJbbb9p9DTmbaw:OhDxekcjjjj94hDkalclf8Uebhqalcdf8UebhkabavcefciGaiVcetfaD87ebdndnaoak:YNgwJb;:FSNJbbbZJbbb:;awJbbbb9GEMgx:lJbbb9p9DTmbax:Ohkxekcjjjj94hkkabavcdfciGaiVcetfak87ebdndnaoaq:YNgoJb;:FSNJbbbZJbbb:;aoJbbbb9GEMgx:lJbbb9p9DTmbax:Ohqxekcjjjj94hqkabavcufciGaiVcetfaq87ebdndnJbbjZararN:tawawN:taoaoN:tgrJbbbbarJbbbb9GE:rJb;:FSNJbbbZMgr:lJbbb9p9DTmbar:Ohqxekcjjjj94hqkabavciGaiVcetfaq87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2geTmbinababydbgdcwtcw91:Yadce91cjjj;8ifcjjj98G::NUdbabclfhbaecufgembkkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaiczfhiaeczfheadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkkkebcjwklz9Kbb",A="b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuikqbbebeedddilve9Weeeviebeoweuec:q;Aekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbwl79IV9RbDq;t9tqlbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk;h8JlHud97euo978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Rad;8qbbcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhwcbhDinaDae9pmeawaeaD9RaDawfae6Egqcsfgoc9WGgkci2hxakcethmaocl4cifcd4hPabaDad2fhscbhzdnincehHalhOcbhAdninaraO9RaP6miavcj;cbfaAak2fhCaOaPfhlcbhidnakc;ab6mbaral9Rc;Gb6mbcbhoinaCaofhidndndndndnaOaoco4fRbbgXciGPlbedibkaipxbbbbbbbbbbbbbbbbpklbxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklbalczfhlkdndndndndnaXcd4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklzxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklzalczfhlkdndndndndnaXcl4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklaxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklaalczfhlkdndndndndnaXco4Plbedibkaipxbbbbbbbbbbbbbbbbpkl8WxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalclfaYpQbfaXc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalcwfaYpQbfaXc:q:yjjbfRbbfhlxekaialpbbbpkl8Walczfhlkaoc;abfhiaocjefak0meaihoaral9Rc;Fb0mbkkdndnaiak9pmbaici4hoinaral9RcK6mdaCaifhXdndndndndnaOaico4fRbbaocoG4ciGPlbedibkaXpxbbbbbbbbbbbbbbbbpklbxikaXalpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaXalpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaXalpbbbpklbalczfhlkaocdfhoaiczfgiak6mbkkalTmbaAci6hHalhOaAcefgohAaoclSmdxekkcbhlaHceGmdkdnakTmbavcjdfazfhiavazfpbdbhYcbhXinaiavcj;cbfaXfgopblbgLcep9TaLpxeeeeeeeeeeeeeeeegQp9op9Hp9rgLaoakfpblbg8Acep9Ta8AaQp9op9Hp9rg8ApmbzeHdOiAlCvXoQrLgEaoamfpblbg3cep9Ta3aQp9op9Hp9rg3aoaxfpblbg5cep9Ta5aQp9op9Hp9rg5pmbzeHdOiAlCvXoQrLg8EpmbezHdiOAlvCXorQLgQaQpmbedibedibedibediaYp9UgYp9AdbbaiadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaEa8EpmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwKDYq8AkEx3m5P8Es8FgLa3a5pmwKDYq8AkEx3m5P8Es8Fg8ApmbezHdiOAlvCXorQLgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfhiaXczfgXak6mbkkazclfgzad6mbkasavcjdfaqad2;8qbbavavcjdfaqcufad2fad;8qbbaqaDfhDc9:hoalmexikkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;kbf8Kjjjjbaokwbz:bjjjbk;uzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhDcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgrc;Ve0mbavc;abfalarcl4cu7fcsGcitfgPydlhsaPydbhzdnarcsGgPak9pmbavaiarcu7fcsGcdtfydbaxaPEhraPThPdndnadcd9hmbabaDcetfgHaz87ebaHcdfas87ebaHclfar87ebxekabaDcdtfgHazBdbaHclfasBdbaHcwfarBdbkaxaPfhxavc;abfalcitfgHarBdbaHasBdlavaicdtfarBdbavc;abfalcefcsGglcitfgHazBdbaHarBdlaiaPfhialcefhlxdkdndnaPcsSmbamaPfaPc987fcefhmxekaocefhrao8SbbgPcFeGhHdndnaPcu9mmbarhoxekaocvfhoaHcFbGhHcrhPdninar8SbbgOcFbGaPtaHVhHaOcu9kmearcefhraPcrfgPc8J9hmbxdkkarcefhokaHce4cbaHceG9R7amfhmkdndnadcd9hmbabaDcetfgraz87ebarcdfas87ebarclfam87ebxekabaDcdtfgrazBdbarclfasBdbarcwfamBdbkavc;abfalcitfgramBdbarasBdlavaicdtfamBdbavc;abfalcefcsGglcitfgrazBdbaramBdlaicefhialcefhlxekdnarcpe0mbaxcefgOavaiaqarcsGfRbbgPcl49RcsGcdtfydbaPcz6gHEhravaiaP9RcsGcdtfydbaOaHfgsaPcsGgOEhPaOThOdndnadcd9hmbabaDcetfgzax87ebazcdfar87ebazclfaP87ebxekabaDcdtfgzaxBdbazclfarBdbazcwfaPBdbkavaicdtfaxBdbavc;abfalcitfgzarBdbazaxBdlavaicefgicsGcdtfarBdbavc;abfalcefcsGcitfgzaPBdbazarBdlavaiaHfcsGgicdtfaPBdbavc;abfalcdfcsGglcitfgraxBdbaraPBdlalcefhlaiaOfhiasaOfhxxekaxcbaoRbbgzEgAarc;:eSgrfhsazcsGhCazcl4hXdndnazcs0mbascefhOxekashOavaiaX9RcsGcdtfydbhskdndnaCmbaOcefhxxekaOhxavaiaz9RcsGcdtfydbhOkdndnarTmbaocefhrxekaocdfhrao8SbegHcFeGhPdnaHcu9kmbaocofhAaPcFbGhPcrhodninar8SbbgHcFbGaotaPVhPaHcu9kmearcefhraocrfgoc8J9hmbkaAhrxekarcefhrkaPce4cbaPceG9R7amfgmhAkdndnaXcsSmbarhPxekarcefhPar8SbbgocFeGhHdnaocu9kmbarcvfhsaHcFbGhHcrhodninaP8SbbgrcFbGaotaHVhHarcu9kmeaPcefhPaocrfgoc8J9hmbkashPxekaPcefhPkaHce4cbaHceG9R7amfgmhskdndnaCcsSmbaPhoxekaPcefhoaP8SbbgrcFeGhHdnarcu9kmbaPcvfhOaHcFbGhHcrhrdninao8SbbgPcFbGartaHVhHaPcu9kmeaocefhoarcrfgrc8J9hmbkaOhoxekaocefhokaHce4cbaHceG9R7amfgmhOkdndnadcd9hmbabaDcetfgraA87ebarcdfas87ebarclfaO87ebxekabaDcdtfgraABdbarclfasBdbarcwfaOBdbkavc;abfalcitfgrasBdbaraABdlavaicdtfaABdbavc;abfalcefcsGcitfgraOBdbarasBdlavaicefgicsGcdtfasBdbavc;abfalcdfcsGcitfgraABdbaraOBdlavaiazcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiaDcifgDae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:llevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:EPliuo97eue978Jjjjjbca9Rhidndnadcl9hmbdnaec98GglTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalae9pmeaiaeciGgvcdtgdVcbczad9R;8kbaiabalcdtfglad;8qbbdnavTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkalaiad;8qbbskdnaec98GgxTmbcbhvabhdinadczfglalpbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oawaopmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgvax6mbkkaxae9pmbaiaeciGgvcitgdfcbcaad9R;8kbaiabaxcitfglad;8qbbdnavTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oawaopmbezHdiOAlvCXorQLp9qpklbkalaiad;8qbbkk;4wllue97euv978Jjjjjbc8W9Rhidnaec98GglTmbcbhvabhoinaiaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklbaopxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblbpEb:T:j83ibaocwfarp5eaipblbpEe:T:j83ibawaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblbpEd:T:j83ibaocKfakp5eaipblbpEi:T:j83ibaocafhoavclfgval6mbkkdnalae9pmbaiaeciGgvcitgofcbcaao9R;8kbaiabalcitfgwao;8qbbdnavTmbaiaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklaaipxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblapEb:T:j83ibaiarp5eaipblapEe:T:j83iwaiaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblapEd:T:j83izaiakp5eaipblapEi:T:j83iKkawaiao;8qbbkk:Pddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbhdabheinaeaepbbbgocwp:Recwp:Sep;6eaocep:SepxbbjZbbjZbbjZbbjZp:UepxbbjFbbjFbbjFbbjFp9op;Mepkbbaeczfheadclfgdav6mbkkdnaval9pmbaialciGgdcdtgeVcbc;abae9R;8kbaiabavcdtfgvae;8qbbdnadTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjZbbjZbbjZbbjZp:UepxbbjFbbjFbbjFbbjFp9op;Mepklbkavaiae;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz9Tbb",g=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),I=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var i=WebAssembly.validate(g)?A:t,e,C=WebAssembly.instantiate(o(i),{}).then(function(w){e=w.instance,e.exports.__wasm_call_ctors()});function o(w){for(var p=new Uint8Array(w.length),D=0;D<w.length;++D){var d=w.charCodeAt(D);p[D]=d>96?d-97:d>64?d-39:d+4}for(var u=0,D=0;D<w.length;++D)p[u++]=p[D]<60?I[p[D]]:(p[D]-60)*64+p[++D];return p.buffer.slice(0,u)}function B(w,p,D,d,u,y){var f=e.exports.sbrk,S=D+3&-4,G=f(S*d),k=f(u.length),m=new Uint8Array(e.exports.memory.buffer);m.set(u,k);var q=w(G,D,d,k,u.length);if(q==0&&y&&y(G,S,d),p.set(m.subarray(G,G+D*d)),f(G-f(0)),q!=0)throw new Error("Malformed buffer data: "+q)}var s={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},n={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"},a=[],Q=0;function E(w){var p={object:new Worker(w),pending:0,requests:{}};return p.object.onmessage=function(D){var d=D.data;p.pending-=d.count,p.requests[d.id][d.action](d.value),delete p.requests[d.id]},p}function c(w){for(var p="var instance; var ready = WebAssembly.instantiate(new Uint8Array(["+new Uint8Array(o(i))+"]), {}).then(function(result) { instance = result.instance; instance.exports.__wasm_call_ctors(); });self.onmessage = workerProcess;"+B.toString()+l.toString(),D=new Blob([p],{type:"text/javascript"}),d=URL.createObjectURL(D),u=0;u<w;++u)a[u]=E(d);URL.revokeObjectURL(d)}function h(w,p,D,d,u){for(var y=a[0],f=1;f<a.length;++f)a[f].pending<y.pending&&(y=a[f]);return new Promise(function(S,G){var k=new Uint8Array(D),m=Q++;y.pending+=w,y.requests[m]={resolve:S,reject:G},y.object.postMessage({id:m,count:w,size:p,source:k,mode:d,filter:u},[k.buffer])})}function l(w){C.then(function(){var p=w.data;try{var D=new Uint8Array(p.count*p.size);B(e.exports[p.mode],D,p.count,p.size,p.source,e.exports[p.filter]),self.postMessage({id:p.id,count:p.count,action:"resolve",value:D},[D.buffer])}catch(d){self.postMessage({id:p.id,count:p.count,action:"reject",value:d})}})}return{ready:C,supported:!0,useWorkers:function(w){c(w)},decodeVertexBuffer:function(w,p,D,d,u){B(e.exports.meshopt_decodeVertexBuffer,w,p,D,d,e.exports[s[u]])},decodeIndexBuffer:function(w,p,D,d){B(e.exports.meshopt_decodeIndexBuffer,w,p,D,d)},decodeIndexSequence:function(w,p,D,d){B(e.exports.meshopt_decodeIndexSequence,w,p,D,d)},decodeGltfBuffer:function(w,p,D,d,u,y){B(e.exports[n[u]],w,p,D,d,e.exports[s[y]])},decodeGltfBufferAsync:function(w,p,D,d,u){return a.length>0?h(w,p,D,n[d],s[u]):C.then(function(){var y=new Uint8Array(w*p);return B(e.exports[n[d]],y,w,p,D,e.exports[s[u]]),y})}}}();const rQ=wA("debugdecoders"),kF="https://www.gstatic.com/draco/versioned/decoders/1.4.1/",MF="https://www.gstatic.com/basis-universal/versioned/2021-04-15-ba1c3e4/";let qt,AS,sB;function UF(t){t!==void 0&&typeof t=="string"&&(qt||(qt=new Ty),rQ&&console.log("Setting draco decoder path to",t),qt.setDecoderPath(t))}function RF(t){t!==void 0&&typeof t=="string"&&(qt||(qt=new Ty),rQ&&console.log("Setting draco decoder type to",t),qt.setDecoderConfig({type:t}))}function FF(t){t!==void 0&&typeof t=="string"&&(sB||(sB=new Jt),rQ&&console.log("Setting ktx2 transcoder path to",t),sB.setTranscoderPath(t))}function Lr(t,A){qt||(qt=new Ty,qt.setDecoderPath(kF),qt.setDecoderConfig({type:"js"}),rQ&&console.log("Setting draco decoder path to",kF)),sB||(sB=new Jt,sB.setTranscoderPath(MF),rQ&&console.log("Setting ktx2 transcoder path to",MF),A.renderer&&sB.detectSupport(A.renderer)),AS||(AS=o_,rQ&&console.log("Using the default meshopt decoder")),t.setDRACOLoader(qt),t.setKTX2Loader(sB),t.setMeshoptDecoder(AS)}var mF=(t=>(t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_VEC2=35664]="FLOAT_VEC2",t[t.FLOAT_VEC3=35665]="FLOAT_VEC3",t[t.FLOAT_VEC4=35666]="FLOAT_VEC4",t[t.INT_VEC2=35667]="INT_VEC2",t[t.INT_VEC3=35668]="INT_VEC3",t[t.INT_VEC4=35669]="INT_VEC4",t[t.BOOL=35670]="BOOL",t[t.BOOL_VEC2=35671]="BOOL_VEC2",t[t.BOOL_VEC3=35672]="BOOL_VEC3",t[t.BOOL_VEC4=35673]="BOOL_VEC4",t[t.FLOAT_MAT2=35674]="FLOAT_MAT2",t[t.FLOAT_MAT3=35675]="FLOAT_MAT3",t[t.FLOAT_MAT4=35676]="FLOAT_MAT4",t[t.SAMPLER_2D=35678]="SAMPLER_2D",t[t.SAMPLER_3D=35680]="SAMPLER_3D",t[t.SAMPLER_CUBE=35681]="SAMPLER_CUBE",t[t.UNKNOWN=0]="UNKNOWN",t))(mF||{});const Bo=wA("debugshaders"),EQ="NEEDLE_techniques_webgl";class B_{constructor(){r(this,"objectToWorldMatrix",new $A);r(this,"worldToObjectMatrix",new $A);r(this,"objectToWorld",new Array);r(this,"worldToObject",new Array)}updateFrom(A){this.objectToWorldMatrix.copy(A.matrixWorld),Ml(this.objectToWorldMatrix,this.objectToWorld),this.worldToObjectMatrix.copy(A.matrixWorld).invert(),Ml(this.worldToObjectMatrix,this.worldToObject)}}const hI=class extends Xu{constructor(g,...I){super(...I);r(this,"identifier");r(this,"onBeforeRenderSceneCallback",this.onBeforeRenderScene.bind(this));r(this,"_sphericalHarmonicsName","unity_SpecCube0");r(this,"_objToWorldName","hlslcc_mtx4x4unity_ObjectToWorld");r(this,"_worldToObjectName","hlslcc_mtx4x4unity_WorldToObject");r(this,"_viewProjectionName","hlslcc_mtx4x4unity_MatrixVP");r(this,"_viewMatrixName","hlslcc_mtx4x4unity_MatrixV");r(this,"_rendererData",new B_);this.identifier=g,Bo&&console.log(this),this.type="NEEDLE_CUSTOM_SHADER",this.uniforms[this._objToWorldName]||(this.uniforms[this._objToWorldName]={value:[]}),this.uniforms[this._worldToObjectName]||(this.uniforms[this._worldToObjectName]={value:[]}),this.uniforms[this._viewProjectionName]||(this.uniforms[this._viewProjectionName]={value:[]}),this.uniforms[this._sphericalHarmonicsName]&&this.waitForLighting(),(this.depthTextureUniform||this.opaqueTextureUniform)&&Ng.Current.pre_render_callbacks.push(this.onBeforeRenderSceneCallback)}clone(){const g=super.clone();return NF(g),g}dispose(){super.dispose();const g=Ng.Current.pre_render_callbacks.indexOf(this.onBeforeRenderSceneCallback);g>=0&&Ng.Current.pre_render_callbacks.splice(g,1)}async waitForLighting(){const g=Ng.Current;if(!g){console.error("Missing context");return}const I=await g.rendererData.getSceneLightingData(this.identifier);if(!I||!I.array){console.warn("Missing lighting data for custom shader, getSceneLightingData did not return anything");return}Bo&&console.log(I);const i=I.array,e=I.texture;this.uniforms.unity_SpecCube0={value:e},xR(this.uniforms,i);const C=Math.sqrt(Math.PI*.5);this.uniforms.unity_SpecCube0_HDR={value:new sg(C,C,C,C)},Bo&&console.log("Set environment lighting",this.uniforms)}get depthTextureUniform(){if(this.uniforms)return this.uniforms._CameraDepthTexture}get opaqueTextureUniform(){if(this.uniforms)return this.uniforms._CameraOpaqueTexture}onBeforeRenderScene(){this.opaqueTextureUniform&&Ng.Current.setRequireColor(!0),this.depthTextureUniform&&Ng.Current.setRequireDepth(!0)}onBeforeRender(g,I,i,e,C,o){e.attributes.tangent||e.computeTangents(),this.onUpdateUniforms(i,C)}onUpdateUniforms(g,I){const i=Ng.Current;g&&(hI.viewProjection&&this.uniforms[this._viewProjectionName]&&(hI.viewProjection.copy(g.projectionMatrix).multiply(g.matrixWorldInverse),Ml(hI.viewProjection,hI._viewProjectionValues)),hI.viewMatrix&&this.uniforms[this._viewMatrixName]&&(hI.viewMatrix.copy(g.matrixWorldInverse),Ml(hI.viewMatrix,hI._viewMatrixValues)),this.uniforms[hI._worldSpaceCameraPosName]&&hI._worldSpaceCameraPos.setFromMatrixPosition(g.matrixWorld)),this.uniforms._TimeParameters?this.uniforms._TimeParameters.value=i.rendererData.timeVec4:this.uniforms._Time&&(this.uniforms._Time.value=i.rendererData.timeVec4);const e=i.mainLight;if(e){const B=pg(e.gameObject,hI._mainLightPosition);this.uniforms._MainLightPosition={value:B.normalize()},hI._mainLightColor.set(e.color.r,e.color.g,e.color.b,0),this.uniforms._MainLightColor={value:hI._mainLightColor};const s=e.intensity;hI._lightData.z=s,this.uniforms.unity_LightData={value:hI._lightData}}if(g&&(hI.viewProjection&&this.uniforms[this._viewProjectionName]&&(this.uniforms[this._viewProjectionName].value=hI._viewProjectionValues),hI.viewMatrix&&this.uniforms[this._viewMatrixName]&&(this.uniforms[this._viewMatrixName].value=hI._viewMatrixValues),this.uniforms[hI._worldSpaceCameraPosName]&&(this.uniforms[hI._worldSpaceCameraPosName]={value:hI._worldSpaceCameraPos}),i.mainCameraComponent)){if(this.uniforms._ProjectionParams){const B=this.uniforms._ProjectionParams.value;B.x=1,B.y=i.mainCameraComponent.nearClipPlane,B.z=i.mainCameraComponent.farClipPlane,B.w=1/B.z,this.uniforms._ProjectionParams.value=B}if(this.uniforms._ZBufferParams){const B=this.uniforms._ZBufferParams.value,s=i.mainCameraComponent;B.x=1-s.farClipPlane/s.nearClipPlane,B.y=s.farClipPlane/s.nearClipPlane,B.z=B.x/s.farClipPlane,B.w=B.y/s.farClipPlane,this.uniforms._ZBufferParams.value=B}if(this.uniforms._ScreenParams){const B=this.uniforms._ScreenParams.value;B.x=i.domWidth,B.y=i.domHeight,B.z=1+1/B.x,B.w=1+1/B.y,this.uniforms._ScreenParams.value=B}}const C=this.depthTextureUniform;C&&(C.value=i.depthTexture);const o=this.opaqueTextureUniform;if(o&&(o.value=i.opaqueColorTexture),I){const B=this._rendererData;B.updateFrom(I),this.uniforms[this._worldToObjectName].value=B.worldToObject,this.uniforms[this._objToWorldName].value=B.objectToWorld}this.uniformsNeedUpdate=!0}};let tt=hI;r(tt,"viewProjection",new $A),r(tt,"_viewProjectionValues",[]),r(tt,"viewMatrix",new $A),r(tt,"_viewMatrixValues",[]),r(tt,"_worldSpaceCameraPosName","_WorldSpaceCameraPos"),r(tt,"_worldSpaceCameraPos",new M),r(tt,"_mainLightColor",new sg),r(tt,"_mainLightPosition",new M),r(tt,"_lightData",new sg);class s_{constructor(A,g){r(this,"parser");r(this,"identifier");this.parser=A,this.identifier=g}get name(){return EQ}loadMaterial(A){const g=this.parser.json.materials[A];if(!g)return Bo&&console.log(A,this.parser.json.materials),null;if(!g.extensions||!g.extensions[EQ])return Bo&&console.log("material "+A+" does not use NEEDLE_techniques_webgl"),null;const I=g.extensions[EQ].technique;if(I<0)return null;const i=this.parser.json.extensions[EQ];if(!i)return null;Bo&&console.log(i);const e=i.techniques[I];return e?new Promise(async(C,o)=>{var w,p,D;const B=await H2(i,e.program),s=B==null?void 0:B.fragmentShader,n=B==null?void 0:B.vertexShader;if(!s||!n)return o();Bo&&console.log("loadMaterial",g,B);const a={},Q=e.uniforms;n.includes("_Time")&&(a._Time={value:new sg(0,0,0,0)});for(const d in Q){const u=d;switch(u){case"_TimeParameters":const y=new sg;a[u]={value:y};break;case"hlslcc_mtx4x4unity_MatrixV":case"hlslcc_mtx4x4unity_MatrixVP":a[u]={value:[]};break;case"_MainLightPosition":case"_MainLightColor":case"_WorldSpaceCameraPos":a[u]={value:[0,0,0,1]};break;case"unity_OrthoParams":break;case"unity_SpecCube0":a[u]={value:null};break;default:case"_ScreenParams":case"_ZBufferParams":case"_ProjectionParams":a[u]={value:[0,0,0,0]};break;case"_CameraOpaqueTexture":case"_CameraDepthTexture":a[u]={value:null};break}}let E=!1;if(g.extensions&&g.extensions[EQ]){const d=g.extensions[EQ];if(d.technique===I){Bo&&console.log(g.name,"Material Properties",d);for(const u in d.values){const y=d.values[u];if(typeof y=="string"){if(y.startsWith("/textures/")){const f=y.substring(10),S=Number.parseInt(f);if(S>=0){const G=await this.parser.getDependency("texture",S);G&&(G.encoding=$I,G.needsUpdate=!0),a[u]={value:G};continue}}switch(u){case"alphaMode":y==="BLEND"&&(E=!0);continue}}if(Array.isArray(y)&&y.length===4){a[u]={value:new sg(y[0],y[1],y[2],y[3])};continue}a[u]={value:y}}}}const c=new tt(this.identifier,{name:g.name??"",uniforms:a,vertexShader:n,fragmentShader:s,lights:!1});switch((w=a._Cull)==null?void 0:w.value){case 0:c.side=HI;break;case 1:c.side=oe;break;case 2:c.side=Se;break;default:c.side=Se;break}switch((p=a._ZTest)==null?void 0:p.value){case 3:c.depthTest=!0,c.depthFunc=hw;break;case 6:c.depthTest=!0,c.depthFunc=dw;break;case 2:c.depthTest=!0,c.depthFunc=cw;break;case 4:c.depthTest=!0,c.depthFunc=Qa;break;case 5:c.depthTest=!0,c.depthFunc=Dw;break;case 7:c.depthTest=!0,c.depthFunc=lw;break;case 8:c.depthTest=!1,c.depthFunc=Ew;break}c.transparent=E,E&&(c.depthWrite=!1),xR(a),c.onUpdateUniforms();for(const d in Q){const u=d,y=Q[d].type;if(((D=a[u])==null?void 0:D.value)===void 0)switch(y){case mF.SAMPLER_2D:a[u]={value:b2},console.warn("Missing/unassigned texture, fallback to white: "+u);break;default:console.warn("TODO: EXPECTED UNIFORM / fallback NOT SET: "+u,Q[d]);break}}Bo&&console.log(c.uuid,a),NF(c),C(c)}):null}}function NF(t){if(t.uniforms)for(const A in t.uniforms)Object.getOwnPropertyDescriptor(t,A)||Object.defineProperty(t,A,{get:()=>t.uniforms[A].value,set:g=>{t.uniforms[A].value=g,t.needsUpdate=!0}})}const nB=xi,Kl="$___Export_Components",n_="NEEDLE_components";class Q_{constructor(){r(this,Wj)}}Wj=$n;class a_{constructor(A,g,I){r(this,"node");r(this,"nodeIndex");r(this,"nodeDef");this.node=A,this.nodeIndex=g,this.nodeDef=I}}class KF{constructor(){r(this,"parser");r(this,"nodeToObjectMap",{});r(this,"exportContext");r(this,"objectToNodeMap",{});r(this,"context");r(this,"writer")}get name(){return n_}registerExport(A){A.register(g=>{if("serializeUserData"in g){const I=g.serializeUserData.bind(g);this.writer=g,g.serializeUserData=(i,e)=>{try{this.serializeUserData(i,e),I(i,e)}finally{this.afterSerializeUserData(i,e)}}}return this})}beforeParse(){this.exportContext={},this.objectToNodeMap={}}serializeUserData(A,g){var i;const I=(i=A.userData)==null?void 0:i.components;!I||I.length<=0||(delete A.userData.components,A[Kl]=I)}afterSerializeUserData(A,g){if(A.type==="Scene"&&nB&&console.log("DONE",JSON.stringify(g)),A[Kl]===void 0)return;const I=A[Kl];delete A[Kl],I!==null&&(A.userData.components=I)}writeNode(A,g){let I=this.writer.json.nodes.length;console.log(A.name,I,A.uuid);const i=new a_(A,I,g);this.exportContext[I]=i,this.objectToNodeMap[A.uuid]=I}afterParse(A){var g;nB&&console.log("AFTER",A);for(const I in this.exportContext){const i=this.exportContext[I],e=i.node,C=i.nodeDef,o=i.nodeIndex,B=(g=e.userData)==null?void 0:g.components;if(!B||B.length<=0)continue;const s=new Q_;C.extensions=C.extensions||{},C.extensions[this.name]=s,this.context.object=e,this.context.nodeId=o,this.context.objectToNode=this.objectToNodeMap;const n=[];for(const a of B){this.context.target=a;const Q=rC().writeBuiltinComponentData(a,this.context);Q!==null&&n.push(Q)}n.length>0&&(s[$n]=n,nB&&console.log("DID WRITE",e,"nodeIndex",o,n))}}beforeRoot(){return nB&&console.log("BEGIN LOAD"),this.nodeToObjectMap={},null}async afterRoot(A){const g=A.parser,I=g==null?void 0:g.extensions;if(!I)return;const i=I[this.name];nB&&console.log("After root",A,this.parser,I);const e=[];if(i===!0){const C=g.json.nodes;for(let o=0;o<C.length;o++){const B=await g.getDependency("node",o);this.nodeToObjectMap[o]=B}for(let o=0;o<C.length;o++){const B=C[o],s=o,n=B.extensions;if(!n)continue;const a=n[this.name];if(!a)continue;nB&&console.log("NODE",B);const Q=this.nodeToObjectMap[s];if(!Q){console.error("Could not find object for node index: "+s,B,g);continue}vh(Q),e.push(this.createComponents(Q,a))}}await Promise.all(e)}async createComponents(A,g){if(!g)return;const I=g[$n];if(I){const i=new Array;nB&&console.log(A.name,I);for(const e in I){const C=I[e];nB&&console.log("Serialized data",JSON.parse(JSON.stringify(C))),C&&this.parser&&i.push(yp(this.parser,C)),A.userData=A.userData||{},A.userData[$n]=A.userData[$n]||[],A.userData[$n].push(C)}await Promise.all(i)}}}/*!
|
|
3405
|
+
`);this.workerSourceURL=URL.createObjectURL(new Blob([B])),this.transcoderBinary=C,this.workerPool.setWorkerCreator(()=>{const s=new Worker(this.workerSourceURL),n=this.transcoderBinary.slice(0);return s.postMessage({type:"init",config:this.workerConfig,transcoderBinary:n},[n]),s})}),zy>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),zy++}return this.transcoderPending}load(A,g,I,i){if(this.workerConfig===null)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");const e=new ii(this.manager);e.setResponseType("arraybuffer"),e.setWithCredentials(this.withCredentials),e.load(A,C=>{if(Vy.has(C))return Vy.get(C).promise.then(g).catch(i);this._createTexture(C).then(o=>g?g(o):null).catch(i)},I,i)}_createTextureFrom(A,g){const{mipmaps:I,width:i,height:e,format:C,type:o,error:B,dfdTransferFn:s,dfdFlags:n}=A;if(o==="error")return Promise.reject(B);const a=g.layerCount>1?new jk(I,i,e,g.layerCount,C,Ni):new jC(I,i,e,C,Ni);return a.minFilter=I.length===1?Tg:dt,a.magFilter=Tg,a.generateMipmaps=!1,a.needsUpdate=!0,a.encoding=s===A_?Dg:$I,a.premultiplyAlpha=!!(n&$O),a}async _createTexture(A,g={}){const I=i_(new Uint8Array(A));if(I.vkFormat!==g_)return C_(I);const i=g,e=this.init().then(()=>this.workerPool.postMessage({type:"transcode",buffer:A,taskConfig:i},[A])).then(C=>this._createTextureFrom(C.data,I));return Vy.set(A,{promise:e}),e}dispose(){return this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),zy--,this}}Jt.BasisFormat={ETC1S:0,UASTC_4x4:1},Jt.TranscoderFormat={ETC1:0,ETC2:1,BC1:2,BC3:3,BC4:4,BC5:5,BC7_M6_OPAQUE_ONLY:6,BC7_M5:7,PVRTC1_4_RGB:8,PVRTC1_4_RGBA:9,ASTC_4x4:10,ATC_RGB:11,ATC_RGBA_INTERPOLATED_ALPHA:12,RGBA32:13,RGB565:14,BGR565:15,RGBA4444:16},Jt.EngineFormat={RGBAFormat:lI,RGBA_ASTC_4x4_Format:dc,RGBA_BPTC_Format:wc,RGBA_ETC2_EAC_Format:Dc,RGBA_PVRTC_4BPPV1_Format:hc,RGBA_S3TC_DXT5_Format:ha,RGB_ETC1_Format:Sw,RGB_ETC2_Format:lc,RGB_PVRTC_4BPPV1_Format:cc,RGB_S3TC_DXT1_Format:ca},Jt.BasisWorker=function(){let t,A,g;const I=_EngineFormat,i=_TranscoderFormat,e=_BasisFormat;self.addEventListener("message",function(c){const h=c.data;switch(h.type){case"init":t=h.config,C(h.transcoderBinary);break;case"transcode":A.then(()=>{try{const{width:l,height:w,hasAlpha:p,mipmaps:D,format:d,dfdTransferFn:u,dfdFlags:y}=o(h.buffer),f=[];for(let S=0;S<D.length;++S)f.push(D[S].data.buffer);self.postMessage({type:"transcode",id:h.id,width:l,height:w,hasAlpha:p,mipmaps:D,format:d,dfdTransferFn:u,dfdFlags:y},f)}catch(l){console.error(l),self.postMessage({type:"error",id:h.id,error:l.message})}});break}});function C(c){A=new Promise(h=>{g={wasmBinary:c,onRuntimeInitialized:h},BASIS(g)}).then(()=>{g.initializeBasis(),g.KTX2File===void 0&&console.warn("THREE.KTX2Loader: Please update Basis Universal transcoder.")})}function o(c){const h=new g.KTX2File(new Uint8Array(c));function l(){h.close(),h.delete()}if(!h.isValid())throw l(),new Error("THREE.KTX2Loader: Invalid or unsupported .ktx2 file");const w=h.isUASTC()?e.UASTC_4x4:e.ETC1S,p=h.getWidth(),D=h.getHeight(),d=h.getLayers()||1,u=h.getLevels(),y=h.getHasAlpha(),f=h.getDFDTransferFunc(),S=h.getDFDFlags(),{transcoderFormat:G,engineFormat:k}=a(w,p,D,y);if(!p||!D||!u)throw l(),new Error("THREE.KTX2Loader: Invalid texture");if(!h.startTranscoding())throw l(),new Error("THREE.KTX2Loader: .startTranscoding failed");const m=[];for(let q=0;q<u;q++){const N=[];let K,x;for(let _=0;_<d;_++){const P=h.getImageLevelInfo(q,_,0);K=P.origWidth,x=P.origHeight;const j=new Uint8Array(h.getImageTranscodedSizeInBytes(q,_,0,G));if(!h.transcodeImage(j,q,_,0,G,0,-1,-1))throw l(),new Error("THREE.KTX2Loader: .transcodeImage failed.");N.push(j)}m.push({data:E(N),width:K,height:x})}return l(),{width:p,height:D,hasAlpha:y,mipmaps:m,format:k,dfdTransferFn:f,dfdFlags:S}}const B=[{if:"astcSupported",basisFormat:[e.UASTC_4x4],transcoderFormat:[i.ASTC_4x4,i.ASTC_4x4],engineFormat:[I.RGBA_ASTC_4x4_Format,I.RGBA_ASTC_4x4_Format],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[e.ETC1S,e.UASTC_4x4],transcoderFormat:[i.BC7_M5,i.BC7_M5],engineFormat:[I.RGBA_BPTC_Format,I.RGBA_BPTC_Format],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[e.ETC1S,e.UASTC_4x4],transcoderFormat:[i.BC1,i.BC3],engineFormat:[I.RGB_S3TC_DXT1_Format,I.RGBA_S3TC_DXT5_Format],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[e.ETC1S,e.UASTC_4x4],transcoderFormat:[i.ETC1,i.ETC2],engineFormat:[I.RGB_ETC2_Format,I.RGBA_ETC2_EAC_Format],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[e.ETC1S,e.UASTC_4x4],transcoderFormat:[i.ETC1],engineFormat:[I.RGB_ETC1_Format],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[e.ETC1S,e.UASTC_4x4],transcoderFormat:[i.PVRTC1_4_RGB,i.PVRTC1_4_RGBA],engineFormat:[I.RGB_PVRTC_4BPPV1_Format,I.RGBA_PVRTC_4BPPV1_Format],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0}],s=B.sort(function(c,h){return c.priorityETC1S-h.priorityETC1S}),n=B.sort(function(c,h){return c.priorityUASTC-h.priorityUASTC});function a(c,h,l,w){let p,D;const d=c===e.ETC1S?s:n;for(let u=0;u<d.length;u++){const y=d[u];if(t[y.if]&&y.basisFormat.includes(c)&&!(w&&y.transcoderFormat.length<2)&&!(y.needsPowerOfTwo&&!(Q(h)&&Q(l))))return p=y.transcoderFormat[w?1:0],D=y.engineFormat[w?1:0],{transcoderFormat:p,engineFormat:D}}return console.warn("THREE.KTX2Loader: No suitable compressed texture format found. Decoding to RGBA32."),p=i.RGBA32,D=I.RGBAFormat,{transcoderFormat:p,engineFormat:D}}function Q(c){return c<=2?!0:(c&c-1)===0&&c!==0}function E(c){let h=0;for(const p of c)h+=p.byteLength;const l=new Uint8Array(h);let w=0;for(const p of c)l.set(p,w),w+=p.byteLength;return l}};const GF={[yF]:lI,[wF]:lI,[lF]:lI,[Py]:lI,[pF]:ln,[dF]:ln,[hF]:ln,[_y]:ln,[uF]:OB,[DF]:OB,[Oy]:OB,[cF]:OB},$y={[yF]:XI,[wF]:ni,[lF]:Ni,[Py]:Ni,[pF]:XI,[dF]:ni,[hF]:Ni,[_y]:Ni,[uF]:XI,[DF]:ni,[Oy]:Ni,[cF]:Ni},t_={[Py]:Dg,[_y]:Dg,[Oy]:Dg};async function C_(t){const{vkFormat:A,pixelWidth:g,pixelHeight:I,pixelDepth:i}=t;if(GF[A]===void 0)throw new Error("THREE.KTX2Loader: Unsupported vkFormat.");const e=t.levels[0];let C,o;if(t.supercompressionScheme===zO)C=e.levelData;else if(t.supercompressionScheme===XO)Xy||(Xy=new Promise(async s=>{const n=new e_;await n.init(),s(n)})),C=(await Xy).decode(e.levelData,e.uncompressedByteLength);else throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");$y[A]===XI?o=new Float32Array(C.buffer,C.byteOffset,C.byteLength/Float32Array.BYTES_PER_ELEMENT):$y[A]===ni?o=new Uint16Array(C.buffer,C.byteOffset,C.byteLength/Uint16Array.BYTES_PER_ELEMENT):o=C;const B=i===0?new Vt(o,g,I):new fa(o,g,I,i);return B.type=$y[A],B.format=GF[A],B.encoding=t_[A]||$I,B.needsUpdate=!0,Promise.resolve(B)}var o_=function(){var t="b9H79Tebbbe8Fv9Gbb9Gvuuuuueu9Giuuub9Geueu9Giuuueuikqbeeedddillviebeoweuec:q;iekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbeY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVbdE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbiL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtblK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbol79IV9Rbrq:P8Yqdbk;3sezu8Jjjjjbcj;eb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Radz1jjjbhwcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhDcbhqinaqae9pmeaDaeaq9RaqaDfae6Egkcsfgocl4cifcd4hxdndndndnaoc9WGgmTmbcbhPcehsawcjdfhzalhHinaraH9Rax6midnaraHaxfgl9RcK6mbczhoinawcj;cbfaogifgoc9WfhOdndndndndnaHaic9WfgAco4fRbbaAci4coG4ciGPlbedibkaO9cb83ibaOcwf9cb83ibxikaOalRblalRbbgAco4gCaCciSgCE86bbaocGfalclfaCfgORbbaAcl4ciGgCaCciSgCE86bbaocVfaOaCfgORbbaAcd4ciGgCaCciSgCE86bbaoc7faOaCfgORbbaAciGgAaAciSgAE86bbaoctfaOaAfgARbbalRbegOco4gCaCciSgCE86bbaoc91faAaCfgARbbaOcl4ciGgCaCciSgCE86bbaoc4faAaCfgARbbaOcd4ciGgCaCciSgCE86bbaoc93faAaCfgARbbaOciGgOaOciSgOE86bbaoc94faAaOfgARbbalRbdgOco4gCaCciSgCE86bbaoc95faAaCfgARbbaOcl4ciGgCaCciSgCE86bbaoc96faAaCfgARbbaOcd4ciGgCaCciSgCE86bbaoc97faAaCfgARbbaOciGgOaOciSgOE86bbaoc98faAaOfgORbbalRbiglco4gAaAciSgAE86bbaoc99faOaAfgORbbalcl4ciGgAaAciSgAE86bbaoc9:faOaAfgORbbalcd4ciGgAaAciSgAE86bbaocufaOaAfgoRbbalciGglalciSglE86bbaoalfhlxdkaOalRbwalRbbgAcl4gCaCcsSgCE86bbaocGfalcwfaCfgORbbaAcsGgAaAcsSgAE86bbaocVfaOaAfgORbbalRbegAcl4gCaCcsSgCE86bbaoc7faOaCfgORbbaAcsGgAaAcsSgAE86bbaoctfaOaAfgORbbalRbdgAcl4gCaCcsSgCE86bbaoc91faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc4faOaAfgORbbalRbigAcl4gCaCcsSgCE86bbaoc93faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc94faOaAfgORbbalRblgAcl4gCaCcsSgCE86bbaoc95faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc96faOaAfgORbbalRbvgAcl4gCaCcsSgCE86bbaoc97faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc98faOaAfgORbbalRbogAcl4gCaCcsSgCE86bbaoc99faOaCfgORbbaAcsGgAaAcsSgAE86bbaoc9:faOaAfgORbbalRbrglcl4gAaAcsSgAE86bbaocufaOaAfgoRbbalcsGglalcsSglE86bbaoalfhlxekaOal8Pbb83bbaOcwfalcwf8Pbb83bbalczfhlkdnaiam9pmbaiczfhoaral9RcL0mekkaiam6mialTmidnakTmbawaPfRbbhOcbhoazhiinaiawcj;cbfaofRbbgAce4cbaAceG9R7aOfgO86bbaiadfhiaocefgoak9hmbkkazcefhzaPcefgPad6hsalhHaPad9hmexvkkcbhlasceGmdxikalaxad2fhCdnakTmbcbhHcehsawcjdfhminaral9Rax6mialTmdalaxfhlawaHfRbbhOcbhoamhiinaiawcj;cbfaofRbbgAce4cbaAceG9R7aOfgO86bbaiadfhiaocefgoak9hmbkamcefhmaHcefgHad6hsaHad9hmbkaChlxikcbhocehsinaral9Rax6mdalTmealaxfhlaocefgoad6hsadao9hmbkaChlxdkcbhlasceGTmekc9:hoxikabaqad2fawcjdfakad2z1jjjb8Aawawcjdfakcufad2fadz1jjjb8Aakaqfhqalmbkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;ebf8Kjjjjbaok;yzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecjez:jjjjb8AavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhDcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgrc;Ve0mbavc;abfalarcl4cu7fcsGcitfgPydlhsaPydbhzdnarcsGgPak9pmbavaiarcu7fcsGcdtfydbaxaPEhraPThPdndnadcd9hmbabaDcetfgHaz87ebaHcdfas87ebaHclfar87ebxekabaDcdtfgHazBdbaHclfasBdbaHcwfarBdbkaxaPfhxavc;abfalcitfgHarBdbaHasBdlavaicdtfarBdbavc;abfalcefcsGglcitfgHazBdbaHarBdlaiaPfhialcefhlxdkdndnaPcsSmbamaPfaPc987fcefhmxekaocefhrao8SbbgPcFeGhHdndnaPcu9mmbarhoxekaocvfhoaHcFbGhHcrhPdninar8SbbgOcFbGaPtaHVhHaOcu9kmearcefhraPcrfgPc8J9hmbxdkkarcefhokaHce4cbaHceG9R7amfhmkdndnadcd9hmbabaDcetfgraz87ebarcdfas87ebarclfam87ebxekabaDcdtfgrazBdbarclfasBdbarcwfamBdbkavc;abfalcitfgramBdbarasBdlavaicdtfamBdbavc;abfalcefcsGglcitfgrazBdbaramBdlaicefhialcefhlxekdnarcpe0mbaxcefgOavaiaqarcsGfRbbgPcl49RcsGcdtfydbaPcz6gHEhravaiaP9RcsGcdtfydbaOaHfgsaPcsGgOEhPaOThOdndnadcd9hmbabaDcetfgzax87ebazcdfar87ebazclfaP87ebxekabaDcdtfgzaxBdbazclfarBdbazcwfaPBdbkavaicdtfaxBdbavc;abfalcitfgzarBdbazaxBdlavaicefgicsGcdtfarBdbavc;abfalcefcsGcitfgzaPBdbazarBdlavaiaHfcsGgicdtfaPBdbavc;abfalcdfcsGglcitfgraxBdbaraPBdlalcefhlaiaOfhiasaOfhxxekaxcbaoRbbgzEgAarc;:eSgrfhsazcsGhCazcl4hXdndnazcs0mbascefhOxekashOavaiaX9RcsGcdtfydbhskdndnaCmbaOcefhxxekaOhxavaiaz9RcsGcdtfydbhOkdndnarTmbaocefhrxekaocdfhrao8SbegHcFeGhPdnaHcu9kmbaocofhAaPcFbGhPcrhodninar8SbbgHcFbGaotaPVhPaHcu9kmearcefhraocrfgoc8J9hmbkaAhrxekarcefhrkaPce4cbaPceG9R7amfgmhAkdndnaXcsSmbarhPxekarcefhPar8SbbgocFeGhHdnaocu9kmbarcvfhsaHcFbGhHcrhodninaP8SbbgrcFbGaotaHVhHarcu9kmeaPcefhPaocrfgoc8J9hmbkashPxekaPcefhPkaHce4cbaHceG9R7amfgmhskdndnaCcsSmbaPhoxekaPcefhoaP8SbbgrcFeGhHdnarcu9kmbaPcvfhOaHcFbGhHcrhrdninao8SbbgPcFbGartaHVhHaPcu9kmeaocefhoarcrfgrc8J9hmbkaOhoxekaocefhokaHce4cbaHceG9R7amfgmhOkdndnadcd9hmbabaDcetfgraA87ebarcdfas87ebarclfaO87ebxekabaDcdtfgraABdbarclfasBdbarcwfaOBdbkavc;abfalcitfgrasBdbaraABdlavaicdtfaABdbavc;abfalcefcsGcitfgraOBdbarasBdlavaicefgicsGcdtfasBdbavc;abfalcdfcsGcitfgraABdbaraOBdlavaiazcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiaDcifgDae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:llevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:Lvoeue99dud99eud99dndnadcl9hmbaeTmeindndnabcdfgd8Sbb:Yab8Sbbgi:Ygl:l:tabcefgv8Sbbgo:Ygr:l:tgwJbb;:9cawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai86bbdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad86bbdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad86bbabclfhbaecufgembxdkkaeTmbindndnabclfgd8Ueb:Yab8Uebgi:Ygl:l:tabcdfgv8Uebgo:Ygr:l:tgwJb;:FSawawNJbbbbawawJbbbb9GgDEgq:mgkaqaicb9iEalMgwawNakaqaocb9iEarMgqaqNMM:r:vglNJbbbZJbbb:;aDEMgr:lJbbb9p9DTmbar:Ohixekcjjjj94hikadai87ebdndnaqalNJbbbZJbbb:;aqJbbbb9GEMgq:lJbbb9p9DTmbaq:Ohdxekcjjjj94hdkavad87ebdndnawalNJbbbZJbbb:;awJbbbb9GEMgw:lJbbb9p9DTmbaw:Ohdxekcjjjj94hdkabad87ebabcwfhbaecufgembkkk;siliui99iue99dnaeTmbcbhiabhlindndnJ;Zl81Zalcof8UebgvciV:Y:vgoal8Ueb:YNgrJb;:FSNJbbbZJbbb:;arJbbbb9GEMgw:lJbbb9p9DTmbaw:OhDxekcjjjj94hDkalclf8Uebhqalcdf8UebhkabavcefciGaiVcetfaD87ebdndnaoak:YNgwJb;:FSNJbbbZJbbb:;awJbbbb9GEMgx:lJbbb9p9DTmbax:Ohkxekcjjjj94hkkabavcdfciGaiVcetfak87ebdndnaoaq:YNgoJb;:FSNJbbbZJbbb:;aoJbbbb9GEMgx:lJbbb9p9DTmbax:Ohqxekcjjjj94hqkabavcufciGaiVcetfaq87ebdndnJbbjZararN:tawawN:taoaoN:tgrJbbbbarJbbbb9GE:rJb;:FSNJbbbZMgr:lJbbb9p9DTmbar:Ohqxekcjjjj94hqkabavciGaiVcetfaq87ebalcwfhlaiclfhiaecufgembkkk9mbdnadcd4ae2geTmbinababydbgdcwtcw91:Yadce91cjjj;8ifcjjj98G::NUdbabclfhbaecufgembkkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaik;LeeeudndnaeabVciGTmbabhixekdndnadcz9pmbabhixekabhiinaiaeydbBdbaiclfaeclfydbBdbaicwfaecwfydbBdbaicxfaecxfydbBdbaiczfhiaeczfheadc9Wfgdcs0mbkkadcl6mbinaiaeydbBdbaeclfheaiclfhiadc98fgdci0mbkkdnadTmbinaiaeRbb86bbaicefhiaecefheadcufgdmbkkabk;aeedudndnabciGTmbabhixekaecFeGc:b:c:ew2hldndnadcz9pmbabhixekabhiinaialBdbaicxfalBdbaicwfalBdbaiclfalBdbaiczfhiadc9Wfgdcs0mbkkadcl6mbinaialBdbaiclfhiadc98fgdci0mbkkdnadTmbinaiae86bbaicefhiadcufgdmbkkabkkkebcjwklz9Kbb",A="b9H79TebbbeKl9Gbb9Gvuuuuueu9Giuuub9Geueuikqbbebeedddilve9Weeeviebeoweuec:q;Aekr;leDo9TW9T9VV95dbH9F9F939H79T9F9J9H229F9Jt9VV7bb8A9TW79O9V9Wt9F9KW9J9V9KW9wWVtW949c919M9MWVbdY9TW79O9V9Wt9F9KW9J9V9KW69U9KW949c919M9MWVblE9TW79O9V9Wt9F9KW9J9V9KW69U9KW949tWG91W9U9JWbvL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9p9JtboK9TW79O9V9Wt9F9KW9J9V9KWS9P2tWV9r919HtbrL9TW79O9V9Wt9F9KW9J9V9KWS9P2tWVT949Wbwl79IV9RbDq;t9tqlbzik9:evu8Jjjjjbcz9Rhbcbheincbhdcbhiinabcwfadfaicjuaead4ceGglE86bbaialfhiadcefgdcw9hmbkaec:q:yjjbfai86bbaecitc:q1jjbfab8Piw83ibaecefgecjd9hmbkk;h8JlHud97euo978Jjjjjbcj;kb9Rgv8Kjjjjbc9:hodnadcefal0mbcuhoaiRbbc:Ge9hmbavaialfgrad9Rad;8qbbcj;abad9UhoaicefhldnadTmbaoc;WFbGgocjdaocjd6EhwcbhDinaDae9pmeawaeaD9RaDawfae6Egqcsfgoc9WGgkci2hxakcethmaocl4cifcd4hPabaDad2fhscbhzdnincehHalhOcbhAdninaraO9RaP6miavcj;cbfaAak2fhCaOaPfhlcbhidnakc;ab6mbaral9Rc;Gb6mbcbhoinaCaofhidndndndndnaOaoco4fRbbgXciGPlbedibkaipxbbbbbbbbbbbbbbbbpklbxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklbalczfhlkdndndndndnaXcd4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklzxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklzalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklzalczfhlkdndndndndnaXcl4ciGPlbedibkaipxbbbbbbbbbbbbbbbbpklaxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklaalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaialpbbbpklaalczfhlkdndndndndnaXco4Plbedibkaipxbbbbbbbbbbbbbbbbpkl8WxikaialpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalclfaYpQbfaXc:q:yjjbfRbbfhlxdkaialpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibaXc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgXcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spkl8WalcwfaYpQbfaXc:q:yjjbfRbbfhlxekaialpbbbpkl8Walczfhlkaoc;abfhiaocjefak0meaihoaral9Rc;Fb0mbkkdndnaiak9pmbaici4hoinaral9RcK6mdaCaifhXdndndndndnaOaico4fRbbaocoG4ciGPlbedibkaXpxbbbbbbbbbbbbbbbbpklbxikaXalpbblalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLgQcdp:meaQpmbzeHdOiAlCvXoQrLpxiiiiiiiiiiiiiiiip9ogLpxiiiiiiiiiiiiiiiip8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalclfaYpQbfaKc:q:yjjbfRbbfhlxdkaXalpbbwalpbbbgQclp:meaQpmbzeHdOiAlCvXoQrLpxssssssssssssssssp9ogLpxssssssssssssssssp8JgQp5b9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibaKc:q:yjjbfpbbbgYaYpmbbbbbbbbbbbbbbbbaQp5e9cjF;8;4;W;G;ab9:9cU1:NgKcitc:q1jjbfpbibp9UpmbedilvorzHOACXQLpPaLaQp9spklbalcwfaYpQbfaKc:q:yjjbfRbbfhlxekaXalpbbbpklbalczfhlkaocdfhoaiczfgiak6mbkkalTmbaAci6hHalhOaAcefgohAaoclSmdxekkcbhlaHceGmdkdnakTmbavcjdfazfhiavazfpbdbhYcbhXinaiavcj;cbfaXfgopblbgLcep9TaLpxeeeeeeeeeeeeeeeegQp9op9Hp9rgLaoakfpblbg8Acep9Ta8AaQp9op9Hp9rg8ApmbzeHdOiAlCvXoQrLgEaoamfpblbg3cep9Ta3aQp9op9Hp9rg3aoaxfpblbg5cep9Ta5aQp9op9Hp9rg5pmbzeHdOiAlCvXoQrLg8EpmbezHdiOAlvCXorQLgQaQpmbedibedibedibediaYp9UgYp9AdbbaiadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaEa8EpmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwKDYq8AkEx3m5P8Es8FgLa3a5pmwKDYq8AkEx3m5P8Es8Fg8ApmbezHdiOAlvCXorQLgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfgoaYaLa8ApmwDKYqk8AExm35Ps8E8FgQaQpmbedibedibedibedip9UgYp9AdbbaoadfgoaYaQaQpmlvorlvorlvorlvorp9UgYp9AdbbaoadfgoaYaQaQpmwDqkwDqkwDqkwDqkp9UgYp9AdbbaoadfgoaYaQaQpmxmPsxmPsxmPsxmPsp9UgYp9AdbbaoadfhiaXczfgXak6mbkkazclfgzad6mbkasavcjdfaqad2;8qbbavavcjdfaqcufad2fad;8qbbaqaDfhDc9:hoalmexikkc9:hoxekcbc99aral9Radcaadca0ESEhokavcj;kbf8Kjjjjbaokwbz:bjjjbk;uzeHu8Jjjjjbc;ae9Rgv8Kjjjjbc9:hodnaeci9UgrcHfal0mbcuhoaiRbbgwc;WeGc;Ge9hmbawcsGgDce0mbavc;abfcFecje;8kbavcUf9cu83ibavc8Wf9cu83ibavcyf9cu83ibavcaf9cu83ibavcKf9cu83ibavczf9cu83ibav9cu83iwav9cu83ibaialfc9WfhqaicefgwarfhodnaeTmbcmcsaDceSEhkcbhxcbhmcbhDcbhicbhlindnaoaq9nmbc9:hoxikdndnawRbbgrc;Ve0mbavc;abfalarcl4cu7fcsGcitfgPydlhsaPydbhzdnarcsGgPak9pmbavaiarcu7fcsGcdtfydbaxaPEhraPThPdndnadcd9hmbabaDcetfgHaz87ebaHcdfas87ebaHclfar87ebxekabaDcdtfgHazBdbaHclfasBdbaHcwfarBdbkaxaPfhxavc;abfalcitfgHarBdbaHasBdlavaicdtfarBdbavc;abfalcefcsGglcitfgHazBdbaHarBdlaiaPfhialcefhlxdkdndnaPcsSmbamaPfaPc987fcefhmxekaocefhrao8SbbgPcFeGhHdndnaPcu9mmbarhoxekaocvfhoaHcFbGhHcrhPdninar8SbbgOcFbGaPtaHVhHaOcu9kmearcefhraPcrfgPc8J9hmbxdkkarcefhokaHce4cbaHceG9R7amfhmkdndnadcd9hmbabaDcetfgraz87ebarcdfas87ebarclfam87ebxekabaDcdtfgrazBdbarclfasBdbarcwfamBdbkavc;abfalcitfgramBdbarasBdlavaicdtfamBdbavc;abfalcefcsGglcitfgrazBdbaramBdlaicefhialcefhlxekdnarcpe0mbaxcefgOavaiaqarcsGfRbbgPcl49RcsGcdtfydbaPcz6gHEhravaiaP9RcsGcdtfydbaOaHfgsaPcsGgOEhPaOThOdndnadcd9hmbabaDcetfgzax87ebazcdfar87ebazclfaP87ebxekabaDcdtfgzaxBdbazclfarBdbazcwfaPBdbkavaicdtfaxBdbavc;abfalcitfgzarBdbazaxBdlavaicefgicsGcdtfarBdbavc;abfalcefcsGcitfgzaPBdbazarBdlavaiaHfcsGgicdtfaPBdbavc;abfalcdfcsGglcitfgraxBdbaraPBdlalcefhlaiaOfhiasaOfhxxekaxcbaoRbbgzEgAarc;:eSgrfhsazcsGhCazcl4hXdndnazcs0mbascefhOxekashOavaiaX9RcsGcdtfydbhskdndnaCmbaOcefhxxekaOhxavaiaz9RcsGcdtfydbhOkdndnarTmbaocefhrxekaocdfhrao8SbegHcFeGhPdnaHcu9kmbaocofhAaPcFbGhPcrhodninar8SbbgHcFbGaotaPVhPaHcu9kmearcefhraocrfgoc8J9hmbkaAhrxekarcefhrkaPce4cbaPceG9R7amfgmhAkdndnaXcsSmbarhPxekarcefhPar8SbbgocFeGhHdnaocu9kmbarcvfhsaHcFbGhHcrhodninaP8SbbgrcFbGaotaHVhHarcu9kmeaPcefhPaocrfgoc8J9hmbkashPxekaPcefhPkaHce4cbaHceG9R7amfgmhskdndnaCcsSmbaPhoxekaPcefhoaP8SbbgrcFeGhHdnarcu9kmbaPcvfhOaHcFbGhHcrhrdninao8SbbgPcFbGartaHVhHaPcu9kmeaocefhoarcrfgrc8J9hmbkaOhoxekaocefhokaHce4cbaHceG9R7amfgmhOkdndnadcd9hmbabaDcetfgraA87ebarcdfas87ebarclfaO87ebxekabaDcdtfgraABdbarclfasBdbarcwfaOBdbkavc;abfalcitfgrasBdbaraABdlavaicdtfaABdbavc;abfalcefcsGcitfgraOBdbarasBdlavaicefgicsGcdtfasBdbavc;abfalcdfcsGcitfgraABdbaraOBdlavaiazcz6aXcsSVfgicsGcdtfaOBdbaiaCTaCcsSVfhialcifhlkawcefhwalcsGhlaicsGhiaDcifgDae6mbkkcbc99aoaqSEhokavc;aef8Kjjjjbaok:llevu8Jjjjjbcz9Rhvc9:hodnaecvfal0mbcuhoaiRbbc;:eGc;qe9hmbav9cb83iwaicefhraialfc98fhwdnaeTmbdnadcdSmbcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcdtfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfglBdbaoalBdbaDcefgDae9hmbxdkkcbhDindnaraw6mbc9:skarcefhoar8SbbglcFeGhidndnalcu9mmbaohrxekarcvfhraicFbGhicrhldninao8SbbgdcFbGaltaiVhiadcu9kmeaocefhoalcrfglc8J9hmbxdkkaocefhrkabaDcetfaicd4cbaice4ceG9R7avcwfaiceGcdtVgoydbfgl87ebaoalBdbaDcefgDae9hmbkkcbc99arawSEhokaok:EPliuo97eue978Jjjjjbca9Rhidndnadcl9hmbdnaec98GglTmbcbhvabhdinadadpbbbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpkbbadczfhdavclfgval6mbkkalae9pmeaiaeciGgvcdtgdVcbczad9R;8kbaiabalcdtfglad;8qbbdnavTmbaiaipblbgocKp:RecKp:Sep;6egraocwp:RecKp:Sep;6earp;Geaoczp:RecKp:Sep;6egwp;Gep;Kep;LegDpxbbbbbbbbbbbbbbbbp:2egqarpxbbbjbbbjbbbjbbbjgkp9op9rp;Kegrpxbb;:9cbb;:9cbb;:9cbb;:9cararp;MeaDaDp;Meawaqawakp9op9rp;Kegrarp;Mep;Kep;Kep;Jep;Negwp;Mepxbbn0bbn0bbn0bbn0gqp;KepxFbbbFbbbFbbbFbbbp9oaopxbbbFbbbFbbbFbbbFp9op9qarawp;Meaqp;Kecwp:RepxbFbbbFbbbFbbbFbbp9op9qaDawp;Meaqp;Keczp:RepxbbFbbbFbbbFbbbFbp9op9qpklbkalaiad;8qbbskdnaec98GgxTmbcbhvabhdinadczfglalpbbbgopxbbbbbbFFbbbbbbFFgkp9oadpbbbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpkbbadaDakp9oawaopmbezHdiOAlvCXorQLp9qpkbbadcafhdavclfgvax6mbkkaxae9pmbaiaeciGgvcitgdfcbcaad9R;8kbaiabaxcitfglad;8qbbdnavTmbaiaipblzgopxbbbbbbFFbbbbbbFFgkp9oaipblbgDaopmlvorxmPsCXQL358E8FpxFubbFubbFubbFubbp9op;6eaDaopmbediwDqkzHOAKY8AEgoczp:Sep;6egrp;Geaoczp:Reczp:Sep;6egwp;Gep;Kep;Legopxb;:FSb;:FSb;:FSb;:FSawaopxbbbbbbbbbbbbbbbbp:2egqawpxbbbjbbbjbbbjbbbjgmp9op9rp;Kegwawp;Meaoaop;Mearaqaramp9op9rp;Kegoaop;Mep;Kep;Kep;Jep;Negrp;Mepxbbn0bbn0bbn0bbn0gqp;Keczp:Reawarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9op9qgwaoarp;Meaqp;KepxFFbbFFbbFFbbFFbbp9ogopmwDKYqk8AExm35Ps8E8Fp9qpklzaiaDakp9oawaopmbezHdiOAlvCXorQLp9qpklbkalaiad;8qbbkk;4wllue97euv978Jjjjjbc8W9Rhidnaec98GglTmbcbhvabhoinaiaopbbbgraoczfgwpbbbgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklbaopxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblbpEb:T:j83ibaocwfarp5eaipblbpEe:T:j83ibawaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblbpEd:T:j83ibaocKfakp5eaipblbpEi:T:j83ibaocafhoavclfgval6mbkkdnalae9pmbaiaeciGgvcitgofcbcaao9R;8kbaiabalcitfgwao;8qbbdnavTmbaiaipblbgraipblzgDpmlvorxmPsCXQL358E8Fgqczp:Segkclp:RepklaaipxbbjZbbjZbbjZbbjZpx;Zl81Z;Zl81Z;Zl81Z;Zl81Zakpxibbbibbbibbbibbbp9qp;6ep;NegkaraDpmbediwDqkzHOAKY8AEgrczp:Reczp:Sep;6ep;MegDaDp;Meakarczp:Sep;6ep;Megxaxp;Meakaqczp:Reczp:Sep;6ep;Megqaqp;Mep;Kep;Kep;Lepxbbbbbbbbbbbbbbbbp:4ep;Jepxb;:FSb;:FSb;:FSb;:FSgkp;Mepxbbn0bbn0bbn0bbn0grp;KepxFFbbFFbbFFbbFFbbgmp9oaxakp;Mearp;Keczp:Rep9qgxaqakp;Mearp;Keczp:ReaDakp;Mearp;Keamp9op9qgkpmbezHdiOAlvCXorQLgrp5baipblapEb:T:j83ibaiarp5eaipblapEe:T:j83iwaiaxakpmwDKYqk8AExm35Ps8E8Fgkp5baipblapEd:T:j83izaiakp5eaipblapEi:T:j83iKkawaiao;8qbbkk:Pddiue978Jjjjjbc;ab9Rhidnadcd4ae2glc98GgvTmbcbhdabheinaeaepbbbgocwp:Recwp:Sep;6eaocep:SepxbbjZbbjZbbjZbbjZp:UepxbbjFbbjFbbjFbbjFp9op;Mepkbbaeczfheadclfgdav6mbkkdnaval9pmbaialciGgdcdtgeVcbc;abae9R;8kbaiabavcdtfgvae;8qbbdnadTmbaiaipblbgocwp:Recwp:Sep;6eaocep:SepxbbjZbbjZbbjZbbjZp:UepxbbjFbbjFbbjFbbjFp9op;Mepklbkavaiae;8qbbkk9teiucbcbydj1jjbgeabcifc98GfgbBdj1jjbdndnabZbcztgd9nmbcuhiabad9RcFFifcz4nbcuSmekaehikaikkkebcjwklz9Tbb",g=new Uint8Array([0,97,115,109,1,0,0,0,1,4,1,96,0,0,3,3,2,0,0,5,3,1,0,1,12,1,0,10,22,2,12,0,65,0,65,0,65,0,252,10,0,0,11,7,0,65,0,253,15,26,11]),I=new Uint8Array([32,0,65,2,1,106,34,33,3,128,11,4,13,64,6,253,10,7,15,116,127,5,8,12,40,16,19,54,20,9,27,255,113,17,42,67,24,23,146,148,18,14,22,45,70,69,56,114,101,21,25,63,75,136,108,28,118,29,73,115]);if(typeof WebAssembly!="object")return{supported:!1};var i=WebAssembly.validate(g)?A:t,e,C=WebAssembly.instantiate(o(i),{}).then(function(w){e=w.instance,e.exports.__wasm_call_ctors()});function o(w){for(var p=new Uint8Array(w.length),D=0;D<w.length;++D){var d=w.charCodeAt(D);p[D]=d>96?d-97:d>64?d-39:d+4}for(var u=0,D=0;D<w.length;++D)p[u++]=p[D]<60?I[p[D]]:(p[D]-60)*64+p[++D];return p.buffer.slice(0,u)}function B(w,p,D,d,u,y){var f=e.exports.sbrk,S=D+3&-4,G=f(S*d),k=f(u.length),m=new Uint8Array(e.exports.memory.buffer);m.set(u,k);var q=w(G,D,d,k,u.length);if(q==0&&y&&y(G,S,d),p.set(m.subarray(G,G+D*d)),f(G-f(0)),q!=0)throw new Error("Malformed buffer data: "+q)}var s={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},n={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"},a=[],Q=0;function E(w){var p={object:new Worker(w),pending:0,requests:{}};return p.object.onmessage=function(D){var d=D.data;p.pending-=d.count,p.requests[d.id][d.action](d.value),delete p.requests[d.id]},p}function c(w){for(var p="var instance; var ready = WebAssembly.instantiate(new Uint8Array(["+new Uint8Array(o(i))+"]), {}).then(function(result) { instance = result.instance; instance.exports.__wasm_call_ctors(); });self.onmessage = workerProcess;"+B.toString()+l.toString(),D=new Blob([p],{type:"text/javascript"}),d=URL.createObjectURL(D),u=0;u<w;++u)a[u]=E(d);URL.revokeObjectURL(d)}function h(w,p,D,d,u){for(var y=a[0],f=1;f<a.length;++f)a[f].pending<y.pending&&(y=a[f]);return new Promise(function(S,G){var k=new Uint8Array(D),m=Q++;y.pending+=w,y.requests[m]={resolve:S,reject:G},y.object.postMessage({id:m,count:w,size:p,source:k,mode:d,filter:u},[k.buffer])})}function l(w){C.then(function(){var p=w.data;try{var D=new Uint8Array(p.count*p.size);B(e.exports[p.mode],D,p.count,p.size,p.source,e.exports[p.filter]),self.postMessage({id:p.id,count:p.count,action:"resolve",value:D},[D.buffer])}catch(d){self.postMessage({id:p.id,count:p.count,action:"reject",value:d})}})}return{ready:C,supported:!0,useWorkers:function(w){c(w)},decodeVertexBuffer:function(w,p,D,d,u){B(e.exports.meshopt_decodeVertexBuffer,w,p,D,d,e.exports[s[u]])},decodeIndexBuffer:function(w,p,D,d){B(e.exports.meshopt_decodeIndexBuffer,w,p,D,d)},decodeIndexSequence:function(w,p,D,d){B(e.exports.meshopt_decodeIndexSequence,w,p,D,d)},decodeGltfBuffer:function(w,p,D,d,u,y){B(e.exports[n[u]],w,p,D,d,e.exports[s[y]])},decodeGltfBufferAsync:function(w,p,D,d,u){return a.length>0?h(w,p,D,n[d],s[u]):C.then(function(){var y=new Uint8Array(w*p);return B(e.exports[n[d]],y,w,p,D,e.exports[s[u]]),y})}}}();const rQ=wA("debugdecoders"),kF="https://www.gstatic.com/draco/versioned/decoders/1.4.1/",MF="https://www.gstatic.com/basis-universal/versioned/2021-04-15-ba1c3e4/";let qt,AS,sB;function UF(t){t!==void 0&&typeof t=="string"&&(qt||(qt=new Ty),rQ&&console.log("Setting draco decoder path to",t),qt.setDecoderPath(t))}function RF(t){t!==void 0&&typeof t=="string"&&(qt||(qt=new Ty),rQ&&console.log("Setting draco decoder type to",t),qt.setDecoderConfig({type:t}))}function FF(t){t!==void 0&&typeof t=="string"&&(sB||(sB=new Jt),rQ&&console.log("Setting ktx2 transcoder path to",t),sB.setTranscoderPath(t))}function Lr(t,A){qt||(qt=new Ty,qt.setDecoderPath(kF),qt.setDecoderConfig({type:"js"}),rQ&&console.log("Setting draco decoder path to",kF)),sB||(sB=new Jt,sB.setTranscoderPath(MF),rQ&&console.log("Setting ktx2 transcoder path to",MF),A.renderer&&sB.detectSupport(A.renderer)),AS||(AS=o_,rQ&&console.log("Using the default meshopt decoder")),t.setDRACOLoader(qt),t.setKTX2Loader(sB),t.setMeshoptDecoder(AS)}var mF=(t=>(t[t.INT=5124]="INT",t[t.FLOAT=5126]="FLOAT",t[t.FLOAT_VEC2=35664]="FLOAT_VEC2",t[t.FLOAT_VEC3=35665]="FLOAT_VEC3",t[t.FLOAT_VEC4=35666]="FLOAT_VEC4",t[t.INT_VEC2=35667]="INT_VEC2",t[t.INT_VEC3=35668]="INT_VEC3",t[t.INT_VEC4=35669]="INT_VEC4",t[t.BOOL=35670]="BOOL",t[t.BOOL_VEC2=35671]="BOOL_VEC2",t[t.BOOL_VEC3=35672]="BOOL_VEC3",t[t.BOOL_VEC4=35673]="BOOL_VEC4",t[t.FLOAT_MAT2=35674]="FLOAT_MAT2",t[t.FLOAT_MAT3=35675]="FLOAT_MAT3",t[t.FLOAT_MAT4=35676]="FLOAT_MAT4",t[t.SAMPLER_2D=35678]="SAMPLER_2D",t[t.SAMPLER_3D=35680]="SAMPLER_3D",t[t.SAMPLER_CUBE=35681]="SAMPLER_CUBE",t[t.UNKNOWN=0]="UNKNOWN",t))(mF||{});const Bo=wA("debugcustomshader"),EQ="NEEDLE_techniques_webgl";class B_{constructor(){r(this,"objectToWorldMatrix",new $A);r(this,"worldToObjectMatrix",new $A);r(this,"objectToWorld",new Array);r(this,"worldToObject",new Array)}updateFrom(A){this.objectToWorldMatrix.copy(A.matrixWorld),Ml(this.objectToWorldMatrix,this.objectToWorld),this.worldToObjectMatrix.copy(A.matrixWorld).invert(),Ml(this.worldToObjectMatrix,this.worldToObject)}}const hI=class extends Xu{constructor(g,...I){super(...I);r(this,"identifier");r(this,"onBeforeRenderSceneCallback",this.onBeforeRenderScene.bind(this));r(this,"_sphericalHarmonicsName","unity_SpecCube0");r(this,"_objToWorldName","hlslcc_mtx4x4unity_ObjectToWorld");r(this,"_worldToObjectName","hlslcc_mtx4x4unity_WorldToObject");r(this,"_viewProjectionName","hlslcc_mtx4x4unity_MatrixVP");r(this,"_viewMatrixName","hlslcc_mtx4x4unity_MatrixV");r(this,"_rendererData",new B_);this.identifier=g,Bo&&console.log(this),this.type="NEEDLE_CUSTOM_SHADER",this.uniforms[this._objToWorldName]||(this.uniforms[this._objToWorldName]={value:[]}),this.uniforms[this._worldToObjectName]||(this.uniforms[this._worldToObjectName]={value:[]}),this.uniforms[this._viewProjectionName]||(this.uniforms[this._viewProjectionName]={value:[]}),this.uniforms[this._sphericalHarmonicsName]&&this.waitForLighting(),(this.depthTextureUniform||this.opaqueTextureUniform)&&Ng.Current.pre_render_callbacks.push(this.onBeforeRenderSceneCallback)}clone(){const g=super.clone();return NF(g),g}dispose(){super.dispose();const g=Ng.Current.pre_render_callbacks.indexOf(this.onBeforeRenderSceneCallback);g>=0&&Ng.Current.pre_render_callbacks.splice(g,1)}async waitForLighting(){const g=Ng.Current;if(!g){console.error("Missing context");return}const I=await g.rendererData.getSceneLightingData(this.identifier);if(!I||!I.array){console.warn("Missing lighting data for custom shader, getSceneLightingData did not return anything");return}Bo&&console.log(I);const i=I.array,e=I.texture;this.uniforms.unity_SpecCube0={value:e},xR(this.uniforms,i);const C=Math.sqrt(Math.PI*.5);this.uniforms.unity_SpecCube0_HDR={value:new sg(C,C,C,C)},Bo&&console.log("Set environment lighting",this.uniforms)}get depthTextureUniform(){if(this.uniforms)return this.uniforms._CameraDepthTexture}get opaqueTextureUniform(){if(this.uniforms)return this.uniforms._CameraOpaqueTexture}onBeforeRenderScene(){this.opaqueTextureUniform&&Ng.Current.setRequireColor(!0),this.depthTextureUniform&&Ng.Current.setRequireDepth(!0)}onBeforeRender(g,I,i,e,C,o){e.attributes.tangent||e.computeTangents(),this.onUpdateUniforms(i,C)}onUpdateUniforms(g,I){const i=Ng.Current;g&&(hI.viewProjection&&this.uniforms[this._viewProjectionName]&&(hI.viewProjection.copy(g.projectionMatrix).multiply(g.matrixWorldInverse),Ml(hI.viewProjection,hI._viewProjectionValues)),hI.viewMatrix&&this.uniforms[this._viewMatrixName]&&(hI.viewMatrix.copy(g.matrixWorldInverse),Ml(hI.viewMatrix,hI._viewMatrixValues)),this.uniforms[hI._worldSpaceCameraPosName]&&hI._worldSpaceCameraPos.setFromMatrixPosition(g.matrixWorld)),this.uniforms._TimeParameters?this.uniforms._TimeParameters.value=i.rendererData.timeVec4:this.uniforms._Time&&(this.uniforms._Time.value=i.rendererData.timeVec4);const e=i.mainLight;if(e){const B=pg(e.gameObject,hI._mainLightPosition);this.uniforms._MainLightPosition={value:B.normalize()},hI._mainLightColor.set(e.color.r,e.color.g,e.color.b,0),this.uniforms._MainLightColor={value:hI._mainLightColor};const s=e.intensity;hI._lightData.z=s,this.uniforms.unity_LightData={value:hI._lightData}}if(g&&(hI.viewProjection&&this.uniforms[this._viewProjectionName]&&(this.uniforms[this._viewProjectionName].value=hI._viewProjectionValues),hI.viewMatrix&&this.uniforms[this._viewMatrixName]&&(this.uniforms[this._viewMatrixName].value=hI._viewMatrixValues),this.uniforms[hI._worldSpaceCameraPosName]&&(this.uniforms[hI._worldSpaceCameraPosName]={value:hI._worldSpaceCameraPos}),i.mainCameraComponent)){if(this.uniforms._ProjectionParams){const B=this.uniforms._ProjectionParams.value;B.x=1,B.y=i.mainCameraComponent.nearClipPlane,B.z=i.mainCameraComponent.farClipPlane,B.w=1/B.z,this.uniforms._ProjectionParams.value=B}if(this.uniforms._ZBufferParams){const B=this.uniforms._ZBufferParams.value,s=i.mainCameraComponent;B.x=1-s.farClipPlane/s.nearClipPlane,B.y=s.farClipPlane/s.nearClipPlane,B.z=B.x/s.farClipPlane,B.w=B.y/s.farClipPlane,this.uniforms._ZBufferParams.value=B}if(this.uniforms._ScreenParams){const B=this.uniforms._ScreenParams.value;B.x=i.domWidth,B.y=i.domHeight,B.z=1+1/B.x,B.w=1+1/B.y,this.uniforms._ScreenParams.value=B}}const C=this.depthTextureUniform;C&&(C.value=i.depthTexture);const o=this.opaqueTextureUniform;if(o&&(o.value=i.opaqueColorTexture),I){const B=this._rendererData;B.updateFrom(I),this.uniforms[this._worldToObjectName].value=B.worldToObject,this.uniforms[this._objToWorldName].value=B.objectToWorld}this.uniformsNeedUpdate=!0}};let tt=hI;r(tt,"viewProjection",new $A),r(tt,"_viewProjectionValues",[]),r(tt,"viewMatrix",new $A),r(tt,"_viewMatrixValues",[]),r(tt,"_worldSpaceCameraPosName","_WorldSpaceCameraPos"),r(tt,"_worldSpaceCameraPos",new M),r(tt,"_mainLightColor",new sg),r(tt,"_mainLightPosition",new M),r(tt,"_lightData",new sg);class s_{constructor(A,g){r(this,"parser");r(this,"identifier");this.parser=A,this.identifier=g}get name(){return EQ}loadMaterial(A){const g=this.parser.json.materials[A];if(!g)return Bo&&console.log(A,this.parser.json.materials),null;if(!g.extensions||!g.extensions[EQ])return Bo&&console.log("material "+A+" does not use NEEDLE_techniques_webgl"),null;const I=g.extensions[EQ].technique;if(I<0)return null;const i=this.parser.json.extensions[EQ];if(!i)return null;Bo&&console.log(i);const e=i.techniques[I];return e?new Promise(async(C,o)=>{var w,p,D;const B=await H2(i,e.program),s=B==null?void 0:B.fragmentShader,n=B==null?void 0:B.vertexShader;if(!s||!n)return o();Bo&&console.log("loadMaterial",g,B);const a={},Q=e.uniforms;n.includes("_Time")&&(a._Time={value:new sg(0,0,0,0)});for(const d in Q){const u=d;switch(u){case"_TimeParameters":const y=new sg;a[u]={value:y};break;case"hlslcc_mtx4x4unity_MatrixV":case"hlslcc_mtx4x4unity_MatrixVP":a[u]={value:[]};break;case"_MainLightPosition":case"_MainLightColor":case"_WorldSpaceCameraPos":a[u]={value:[0,0,0,1]};break;case"unity_OrthoParams":break;case"unity_SpecCube0":a[u]={value:null};break;default:case"_ScreenParams":case"_ZBufferParams":case"_ProjectionParams":a[u]={value:[0,0,0,0]};break;case"_CameraOpaqueTexture":case"_CameraDepthTexture":a[u]={value:null};break}}let E=!1;if(g.extensions&&g.extensions[EQ]){const d=g.extensions[EQ];if(d.technique===I){Bo&&console.log(g.name,"Material Properties",d);for(const u in d.values){const y=d.values[u];if(typeof y=="string"){if(y.startsWith("/textures/")){const f=y.substring(10),S=Number.parseInt(f);if(S>=0){const G=await this.parser.getDependency("texture",S);G&&(G.encoding=$I,G.needsUpdate=!0),a[u]={value:G};continue}}switch(u){case"alphaMode":y==="BLEND"&&(E=!0);continue}}if(Array.isArray(y)&&y.length===4){a[u]={value:new sg(y[0],y[1],y[2],y[3])};continue}a[u]={value:y}}}}const c=new tt(this.identifier,{name:g.name??"",uniforms:a,vertexShader:n,fragmentShader:s,lights:!1});switch((w=a._Cull)==null?void 0:w.value){case 0:c.side=HI;break;case 1:c.side=oe;break;case 2:c.side=Se;break;default:c.side=Se;break}switch((p=a._ZTest)==null?void 0:p.value){case 3:c.depthTest=!0,c.depthFunc=hw;break;case 6:c.depthTest=!0,c.depthFunc=dw;break;case 2:c.depthTest=!0,c.depthFunc=cw;break;case 4:c.depthTest=!0,c.depthFunc=Qa;break;case 5:c.depthTest=!0,c.depthFunc=Dw;break;case 7:c.depthTest=!0,c.depthFunc=lw;break;case 8:c.depthTest=!1,c.depthFunc=Ew;break}c.transparent=E,E&&(c.depthWrite=!1),xR(a),c.onUpdateUniforms();for(const d in Q){const u=d,y=Q[d].type;if(((D=a[u])==null?void 0:D.value)===void 0)switch(y){case mF.SAMPLER_2D:a[u]={value:b2},console.warn("Missing/unassigned texture, fallback to white: "+u);break;default:u==="unity_OrthoParams"||console.warn("TODO: EXPECTED UNIFORM / fallback NOT SET: "+u,Q[d]);break}}Bo&&console.log(c.uuid,a),NF(c),C(c)}):null}}function NF(t){if(t.uniforms)for(const A in t.uniforms)Object.getOwnPropertyDescriptor(t,A)||Object.defineProperty(t,A,{get:()=>t.uniforms[A].value,set:g=>{t.uniforms[A].value=g,t.needsUpdate=!0}})}const nB=xi,Kl="$___Export_Components",n_="NEEDLE_components";class Q_{constructor(){r(this,Wj)}}Wj=$n;class a_{constructor(A,g,I){r(this,"node");r(this,"nodeIndex");r(this,"nodeDef");this.node=A,this.nodeIndex=g,this.nodeDef=I}}class KF{constructor(){r(this,"parser");r(this,"nodeToObjectMap",{});r(this,"exportContext");r(this,"objectToNodeMap",{});r(this,"context");r(this,"writer")}get name(){return n_}registerExport(A){A.register(g=>{if("serializeUserData"in g){const I=g.serializeUserData.bind(g);this.writer=g,g.serializeUserData=(i,e)=>{try{this.serializeUserData(i,e),I(i,e)}finally{this.afterSerializeUserData(i,e)}}}return this})}beforeParse(){this.exportContext={},this.objectToNodeMap={}}serializeUserData(A,g){var i;const I=(i=A.userData)==null?void 0:i.components;!I||I.length<=0||(delete A.userData.components,A[Kl]=I)}afterSerializeUserData(A,g){if(A.type==="Scene"&&nB&&console.log("DONE",JSON.stringify(g)),A[Kl]===void 0)return;const I=A[Kl];delete A[Kl],I!==null&&(A.userData.components=I)}writeNode(A,g){let I=this.writer.json.nodes.length;console.log(A.name,I,A.uuid);const i=new a_(A,I,g);this.exportContext[I]=i,this.objectToNodeMap[A.uuid]=I}afterParse(A){var g;nB&&console.log("AFTER",A);for(const I in this.exportContext){const i=this.exportContext[I],e=i.node,C=i.nodeDef,o=i.nodeIndex,B=(g=e.userData)==null?void 0:g.components;if(!B||B.length<=0)continue;const s=new Q_;C.extensions=C.extensions||{},C.extensions[this.name]=s,this.context.object=e,this.context.nodeId=o,this.context.objectToNode=this.objectToNodeMap;const n=[];for(const a of B){this.context.target=a;const Q=rC().writeBuiltinComponentData(a,this.context);Q!==null&&n.push(Q)}n.length>0&&(s[$n]=n,nB&&console.log("DID WRITE",e,"nodeIndex",o,n))}}beforeRoot(){return nB&&console.log("BEGIN LOAD"),this.nodeToObjectMap={},null}async afterRoot(A){const g=A.parser,I=g==null?void 0:g.extensions;if(!I)return;const i=I[this.name];nB&&console.log("After root",A,this.parser,I);const e=[];if(i===!0){const C=g.json.nodes;for(let o=0;o<C.length;o++){const B=await g.getDependency("node",o);this.nodeToObjectMap[o]=B}for(let o=0;o<C.length;o++){const B=C[o],s=o,n=B.extensions;if(!n)continue;const a=n[this.name];if(!a)continue;nB&&console.log("NODE",B);const Q=this.nodeToObjectMap[s];if(!Q){console.error("Could not find object for node index: "+s,B,g);continue}vh(Q),e.push(this.createComponents(Q,a))}}await Promise.all(e)}async createComponents(A,g){if(!g)return;const I=g[$n];if(I){const i=new Array;nB&&console.log(A.name,I);for(const e in I){const C=I[e];nB&&console.log("Serialized data",JSON.parse(JSON.stringify(C))),C&&this.parser&&i.push(yp(this.parser,C)),A.userData=A.userData||{},A.userData[$n]=A.userData[$n]||[],A.userData[$n].push(C)}await Promise.all(i)}}}/*!
|
|
3406
3406
|
fflate - fast JavaScript compression/decompression
|
|
3407
3407
|
<https://101arrowz.github.io/fflate>
|
|
3408
3408
|
Licensed under MIT. https://github.com/101arrowz/fflate/blob/master/LICENSE
|