@needle-tools/engine 2.67.10-pre → 2.67.11-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.
@@ -3252,7 +3252,7 @@ in script ${I}.ts
3252
3252
  uv.y = 1.0 - uv.y;
3253
3253
  gl_FragColor = texture2D( map, uv);
3254
3254
  // gl_FragColor = vec4(uv.xy, 0, 1);
3255
- }`),Q(_t,"blipMaterial",new Og({uniforms:{map:new MA(null)},vertexShader:xQ.vertex,fragmentShader:xQ.fragment})),Q(_t,"mesh",new GA(xQ.planeGeometry,xQ.blipMaterial));function nO(i){return _t.copyTexture(i)}function BO(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas||typeof ImageBitmap<"u"&&i instanceof ImageBitmap}const RR=new CC(()=>new M,20);class aO{constructor(A,g,I,e,t){Q(this,"_point");Q(this,"_normal");Q(this,"distance");Q(this,"impulse");Q(this,"friction");this._point=A,this.distance=g,this._normal=I,this.impulse=e,this.friction=t}get point(){return RR.get().set(this._point.x,this._point.y,this._point.z)}get normal(){return RR.get().set(this._normal.x,this._normal.y,this._normal.z)}}class mR{constructor(A,g,I){Q(this,"contacts");Q(this,"me");Q(this,"_collider");Q(this,"_gameObject");this.me=A,this._collider=g,this._gameObject=g.gameObject,this.contacts=I}get collider(){return this._collider}get gameObject(){return this._gameObject}get rigidBody(){var A;return(A=this.collider)==null?void 0:A.attachedRigidbody}}function ka(i,A){try{A?i(A):i()}catch(g){return console.error(g),!1}return!0}const cs=Symbol("isActiveInHierarchy"),Ma="builtin_components",Ol=Symbol("originalGuid"),QO=cA("debugnewscripts"),rO=cA("debughierarchy"),JI=[];function Pr(i){if(!(i.new_scripts.length<=0)){if(QO&&console.log("Register new components",i.new_scripts.length,[...i.new_scripts],i.alias?"element: "+i.alias:i.hash,i),i.new_scripts_pre_setup_callbacks.length>0){for(const A of i.new_scripts_pre_setup_callbacks)A&&A();i.new_scripts_pre_setup_callbacks.length=0}JI.length=0,i.new_scripts.length>0&&JI.push(...i.new_scripts),i.new_scripts.length=0;for(let A=0;A<JI.length;A++)try{const g=JI[A];if(g.destroyed)continue;if(!g.gameObject){console.error("MISSING GAMEOBJECT - will ignore",g),JI.splice(A,1),A--;continue}g.context=i,Wr(g.gameObject),NR(g,i)}catch(g){console.error(g),hs(JI[A],i),JI.splice(A,1),A--}for(let A=0;A<JI.length;A++)try{const g=JI[A];if(g.destroyed){hs(JI[A],i),JI.splice(A,1),A--;continue}if(g.registering)try{g.registering()}catch(I){console.error(I)}g.__internalAwake!==void 0&&(g.gameObject||console.error("MISSING GAMEOBJECT",g,g.gameObject),Wr(g.gameObject),g.activeAndEnabled&&ka(g.__internalAwake.bind(g)))}catch(g){console.error(g),hs(JI[A],i),JI.splice(A,1),A--}for(let A=0;A<JI.length;A++)try{const g=JI[A];if(g.destroyed||g.enabled===!1||(Wr(g.gameObject),g.activeAndEnabled===!1))continue;g.__internalEnable!==void 0&&(g.enabled=!0,ka(g.__internalEnable.bind(g)))}catch(g){console.error(g),hs(JI[A],i),JI.splice(A,1),A--}for(let A=0;A<JI.length;A++)try{const g=JI[A];if(g.destroyed||!g.gameObject)continue;i.new_script_start.push(g)}catch(g){console.error(g),hs(JI[A],i),JI.splice(A,1),A--}JI.length=0;for(const A of i.new_scripts_post_setup_callbacks)A&&A();i.new_scripts_post_setup_callbacks.length=0}}function EO(i){i&&(i.__internalDisable(),hs(i,i.context))}function FR(i,A){for(let g=0;g<i.new_script_start.length;g++)try{const I=i.new_script_start[g];if(A!==void 0&&I.gameObject!==A||I.destroyed||I.activeAndEnabled===!1)continue;ka(I.__internalAwake.bind(I)),ka(I.__internalEnable.bind(I)),ka(I.__internalStart.bind(I)),i.new_script_start.splice(g,1),g--}catch(I){console.error(I),hs(i.new_script_start[g],i),i.new_script_start.splice(g,1),g--}}function NR(i,A){A.scripts.indexOf(i)===-1&&(A.scripts.push(i),i.earlyUpdate&&A.scripts_earlyUpdate.push(i),i.update&&A.scripts_update.push(i),i.lateUpdate&&A.scripts_lateUpdate.push(i),i.onBeforeRender&&A.scripts_onBeforeRender.push(i),i.onAfterRender&&A.scripts_onAfterRender.push(i),i.onPausedChanged&&A.scripts_pausedChanged.push(i))}function hs(i,A){lo(i,A.new_scripts),lo(i,A.new_script_start),lo(i,A.scripts),lo(i,A.scripts_earlyUpdate),lo(i,A.scripts_update),lo(i,A.scripts_lateUpdate),lo(i,A.scripts_onBeforeRender),lo(i,A.scripts_onAfterRender),lo(i,A.scripts_pausedChanged),A.stopAllCoroutinesFrom(i)}function lo(i,A){const g=A.indexOf(i);g>=0&&A.splice(g,1)}function _l(i){if(i||(i=Ue.Current.scene),!i){console.trace("Invalid call - no current context.");return}const A=Fa(i);KR(i,A,!0)||(console.error('Failed to update active state in hierarchy of "'+i.name+'"',i),console.warn(" ↑ this error might be caused by circular references. Please make sure you don't have files with circular references (e.g. one GLB 1 is loading GLB 2 which is then loading GLB 1 again)."))}function KR(i,A,g,I=0){if(I>1e3)return console.warn("Hierarchy is too deep (> 1000 level) - will abort updating active state"),!1;const e=Fa(i);if(A&&(A=e,A&&i.parent)){const s=i.parent;A=s[cs],A===void 0&&(s instanceof ct||(A=!0))}const C=i[cs]!==A;i[cs]=A,C&&(rO&&console.warn("ACTIVE CHANGE",i.name,e,i.visible,A,"changed?"+C,i),g&&cO(i,s=>{A?s.enabled&&(ka(s.__internalAwake.bind(s)),s.__didEnable=!0,s.onEnable()):s.__didAwake&&(s.__didEnable=!1,s.onDisable())}));let o=!0;if(i.children){const s=I+1;for(const n of i.children)KR(n,A,g,s)===!1&&(o=!1)}return o}function Wr(i){let A=!0,g=i,I=!1;for(;g&&g;){if(g.type==="Scene"&&(I=!0),!Fa(g)){A=!1;break}g=g.parent}if(!i){console.error("GO is null");return}i[cs]=A&&I}function cO(i,A){var g;if((g=i.userData)!=null&&g.components)for(const I of i.userData.components)A(I)}const Pl=new Map,JR=Symbol("prewarmFlag"),Of=Symbol("waitingForPrewarm"),_f=cA("debugprewarm");function qR(i,A){if(!i||i[JR]===!0||i[Of]===!0)return;Pl.has(A)||Pl.set(A,[]),i[Of]=!0,Pl.get(A).push(i),_f&&console.debug("register prewarm",i.name)}let LR=null,bR=null;function hO(i){if(!i)return;const A=Pl.get(i);if(!(A!=null&&A.length))return;const g=i.mainCamera;if(g){_f&&console.log("prewarm",A.length,"objects",[...A]);const I=i.renderer,e=i.scene;I.compile(e,g),LR??(LR=new jh(64)),bR??(bR=new kw(.001,9999999,LR)),bR.update(I,e);for(const t of A)t[JR]=!0,t[Of]=!1;A.length=0,_f&&console.log("prewarm done")}}const lO=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function DO(i){return typeof i=="string"&&lO.test(i)}const Ne=[];for(let i=0;i<256;++i)Ne.push((i+256).toString(16).slice(1));function dO(i,A=0){return(Ne[i[A+0]]+Ne[i[A+1]]+Ne[i[A+2]]+Ne[i[A+3]]+"-"+Ne[i[A+4]]+Ne[i[A+5]]+"-"+Ne[i[A+6]]+Ne[i[A+7]]+"-"+Ne[i[A+8]]+Ne[i[A+9]]+"-"+Ne[i[A+10]]+Ne[i[A+11]]+Ne[i[A+12]]+Ne[i[A+13]]+Ne[i[A+14]]+Ne[i[A+15]]).toLowerCase()}function uO(i){if(!DO(i))throw TypeError("Invalid UUID");let A;const g=new Uint8Array(16);return g[0]=(A=parseInt(i.slice(0,8),16))>>>24,g[1]=A>>>16&255,g[2]=A>>>8&255,g[3]=A&255,g[4]=(A=parseInt(i.slice(9,13),16))>>>8,g[5]=A&255,g[6]=(A=parseInt(i.slice(14,18),16))>>>8,g[7]=A&255,g[8]=(A=parseInt(i.slice(19,23),16))>>>8,g[9]=A&255,g[10]=(A=parseInt(i.slice(24,36),16))/1099511627776&255,g[11]=A/4294967296&255,g[12]=A>>>24&255,g[13]=A>>>16&255,g[14]=A>>>8&255,g[15]=A&255,g}function pO(i){i=unescape(encodeURIComponent(i));const A=[];for(let g=0;g<i.length;++g)A.push(i.charCodeAt(g));return A}const wO="6ba7b810-9dad-11d1-80b4-00c04fd430c8",fO="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function yO(i,A,g){function I(e,t,C,o){var s;if(typeof e=="string"&&(e=pO(e)),typeof t=="string"&&(t=uO(t)),((s=t)===null||s===void 0?void 0:s.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let n=new Uint8Array(16+e.length);if(n.set(t),n.set(e,t.length),n=g(n),n[6]=n[6]&15|A,n[8]=n[8]&63|128,C){o=o||0;for(let B=0;B<16;++B)C[o+B]=n[B];return C}return dO(n)}try{I.name=i}catch{}return I.DNS=wO,I.URL=fO,I}function SO(i,A,g,I){switch(i){case 0:return A&g^~A&I;case 1:return A^g^I;case 2:return A&g^A&I^g&I;case 3:return A^g^I}}function Pf(i,A){return i<<A|i>>>32-A}function GO(i){const A=[1518500249,1859775393,2400959708,3395469782],g=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof i=="string"){const C=unescape(encodeURIComponent(i));i=[];for(let o=0;o<C.length;++o)i.push(C.charCodeAt(o))}else Array.isArray(i)||(i=Array.prototype.slice.call(i));i.push(128);const I=i.length/4+2,e=Math.ceil(I/16),t=new Array(e);for(let C=0;C<e;++C){const o=new Uint32Array(16);for(let s=0;s<16;++s)o[s]=i[C*64+s*4]<<24|i[C*64+s*4+1]<<16|i[C*64+s*4+2]<<8|i[C*64+s*4+3];t[C]=o}t[e-1][14]=(i.length-1)*8/Math.pow(2,32),t[e-1][14]=Math.floor(t[e-1][14]),t[e-1][15]=(i.length-1)*8&4294967295;for(let C=0;C<e;++C){const o=new Uint32Array(80);for(let E=0;E<16;++E)o[E]=t[C][E];for(let E=16;E<80;++E)o[E]=Pf(o[E-3]^o[E-8]^o[E-14]^o[E-16],1);let s=g[0],n=g[1],B=g[2],r=g[3],a=g[4];for(let E=0;E<80;++E){const c=Math.floor(E/20),h=Pf(s,5)+SO(c,n,B,r)+a+A[c]+o[E]>>>0;a=r,r=B,B=Pf(n,30)>>>0,n=s,s=h}g[0]=g[0]+s>>>0,g[1]=g[1]+n>>>0,g[2]=g[2]+B>>>0,g[3]=g[3]+r>>>0,g[4]=g[4]+a>>>0}return[g[0]>>24&255,g[0]>>16&255,g[0]>>8&255,g[0]&255,g[1]>>24&255,g[1]>>16&255,g[1]>>8&255,g[1]&255,g[2]>>24&255,g[2]>>16&255,g[2]>>8&255,g[2]&255,g[3]>>24&255,g[3]>>16&255,g[3]>>8&255,g[3]&255,g[4]>>24&255,g[4]>>16&255,g[4]>>8&255,g[4]&255]}const vR=yO("v5",80,GO);var ji=(i=>(i[i.OnConnection=0]="OnConnection",i[i.OnRoomJoin=1]="OnRoomJoin",i[i.Queued=2]="Queued",i[i.Immediate=3]="Immediate",i))(ji||{});Ue.registerCallback(oC.ContextCreated,i=>{const A=i.context;RO(A),MO(A)});const Wl=cA("debugcomponents"),xR="eff8ba80-635d-11ec-90d6-0242ac120003";class wi{constructor(A){Q(this,"_originalSeed");Q(this,"_seed");typeof A=="string"&&(A=wi.hash(A)),this._originalSeed=A,this._seed=A}get seed(){return this._seed}set seed(A){this._seed=A}reset(){this._seed=this._originalSeed}generateUUID(A){if(typeof A=="string")return vR(A,xR);const g=this._seed;return this._seed-=1,vR(g.toString(),xR)}initialize(A){typeof A=="string"?this._seed=wi.hash(A):this._seed=A}static createFromString(A){return new wi(this.hash(A))}static hash(A){let g=0;for(let I=0;I<A.length;I++)g=A.charCodeAt(I)+((g<<5)-g);return g}}class YR{constructor(A){Q(this,"guid");this.guid=A}}function Wf(i,A,g=!0){if(!i)return;const I=i;if(Ds(i,g),!A){console.warn("Can not send destroy: No networking connection provided",i.guid);return}if(!A.isConnected){console.warn("Can not send destroy: not connected",i.guid);return}let e=i.guid;if(!e&&I.uuid&&(e=I.uuid),!e){console.warn("Can not send destroy: failed to find guid",i);return}const t=new YR(e);A.send("instance-destroyed",t,ji.Queued)}function kO(i,A){const g=new YR(i);A.send("instance-destroyed",g,ji.Queued)}function MO(i){i.connection.beginListen("instance-destroyed",A=>{Wl&&console.log("[Remote] Destroyed",i.scene,A);const g=eE(A.guid,i.scene);g&&Ds(g)})}class UO{constructor(A,g){Q(this,"guid");Q(this,"originalGuid");Q(this,"seed");Q(this,"visible");Q(this,"hostData");Q(this,"dontSave");Q(this,"parent");Q(this,"position");Q(this,"rotation");Q(this,"scale");this.originalGuid=A,this.guid=g}}function HR(i,A,g,I){var s;const e=i;if(!e.guid)return console.warn("Can not instantiate: No guid",e),null;if(A.context||(A.context=bg.Current),!A.context)return console.error("Missing network instantiate options / reference to network connection in sync instantiate"),null;const t=A?{...A}:null,{instance:C,seed:o}=mO(e,A);if(C){const n=C;if(n.guid){Wl&&console.log("[Local] new instance","gameobject:",C==null?void 0:C.guid);const B=new UO(e.guid,n.guid);B.seed=o,t&&(t.position&&(B.position={x:t.position.x,y:t.position.y,z:t.position.z}),t.rotation&&(B.rotation={x:t.rotation.x,y:t.rotation.y,z:t.rotation.z,w:t.rotation.w}),t.scale&&(B.scale={x:t.scale.x,y:t.scale.y,z:t.scale.z})),B.position||(B.position={x:n.position.x,y:n.position.y,z:n.position.z}),B.rotation||(B.rotation={x:n.quaternion.x,y:n.quaternion.y,z:n.quaternion.z,w:n.quaternion.w}),B.scale||(B.scale={x:n.scale.x,y:n.scale.y,z:n.scale.z}),B.visible=e.visible,t!=null&&t.parent&&(typeof t.parent=="string"?B.parent=t.parent:B.parent=t.parent.guid),B.hostData=g,I===!1&&(B.dontSave=!0),(s=A==null?void 0:A.context)==null||s.connection.send("new-instance-created",B)}else console.warn("Missing guid, can not send new instance event",n)}return C}function jf(){return Math.random()*9999999}function RO(i){i.connection.beginListen("new-instance-created",async A=>{const g=await NO(A.originalGuid,i.scene);if(!g){console.warn("could not find object that was instantiated: "+A.guid);return}const I=new DC;A.position&&(I.position=new M(A.position.x,A.position.y,A.position.z)),A.rotation&&(I.rotation=new RA(A.rotation.x,A.rotation.y,A.rotation.z,A.rotation.w)),A.scale&&(I.scale=new M(A.scale.x,A.scale.y,A.scale.z)),I.parent=A.parent,A.seed&&(I.idProvider=new wi(A.seed)),I.visible=A.visible,I.context=i,Wl&&i.alias&&console.log("[Remote] instantiate in: "+i.alias);const e=iE(g,I);e&&(A.parent==="scene"&&i.scene.add(e),Wl&&console.log("[Remote] new instance","gameobject:",e==null?void 0:e.guid,g))})}function mO(i,A){const g=jf(),I=A??new DC;I.idProvider=new wi(g);const e=iE(i,I);return{seed:g,instance:e}}const TR={};function FO(i,A){TR[i]=A}async function NO(i,A){const g=TR[i];if(g!=null){const I=await g(i);if(I)return I}return OR(i,A)}function OR(i,A){if(A===null||!i)return null;if(A.guid===i)return A;if(A.children)for(const g of A.children){const I=OR(i,g);if(I)return I}return null}const _R=new Map;function KO(i,A){if(!i)return;if(!A){console.warn("No prototype found",i,i.prototype,i.constructor);return}let g=_R.get(A);g&&g.apply(i)}function JO(i){const A=qO(i.prototype);_R.set(i,A)}function qO(i){return new LO(i)}class LO{constructor(A){Q(this,"$symbol");Q(this,"extensions");Q(this,"descriptors");this.$symbol=Symbol("prototype-extension"),this.extensions=Object.keys(A),this.descriptors=new Array;for(let g=0;g<this.extensions.length;g++){const I=this.extensions[g],e=Object.getOwnPropertyDescriptor(A,I);e&&this.descriptors.push(e)}}apply(A){if(!A[this.$symbol]){A[this.$symbol]=!0;for(let g=0;g<this.extensions.length;g++){const I=this.extensions[g],e=this.descriptors[g];e&&Object.defineProperty(A,I,e)}}}}const bO=new Map;var jl=(i=>(i.Added="component-added",i.Removing="removing-component",i))(jl||{});function Zf(i,A){const g=bO.get(i);if(g)for(const I of g)I(A)}const zf=cA("debuggetcomponent");function vO(i){return i==null||i.isObject3D?i:i.object&&i.object.isObject3D?i.object:i}function Vf(i,A){if(!i||!i.userData.components)return;const g=i.userData.components.indexOf(A);g<0||(Zf(jl.Removing,A),A.gameObject=null,i.userData.components.splice(g,1))}function Xf(i,A){const g=Ua(i,A);if(g)return g;const I=new A;return ls(i,I)}const xO=new wi("addComponentIdProvider");function ls(i,A,g=!0){i.userData||(i.userData={}),i.userData.components||(i.userData.components=[]),i.userData.components.push(A),A.gameObject=i,(A.guid===void 0||A.guid==="invalid")&&(A.guid=xO.generateUUID()),zl(i),xF(A);try{g&&A.__internalAwake&&(Wr(i),A.__internalAwake()),Zf(jl.Added,A)}catch(I){console.error(I)}return A}function PR(i,A){if(A.gameObject!==i){if(A.gameObject&&A.gameObject.userData.components){const g=A.gameObject.userData.components.indexOf(A);A.gameObject.userData.components.splice(g,1)}if(!i.userData.components)i.userData.components=[];else if(i.userData.components.includes(A))return;i.userData.components.push(A),A.gameObject=i}}function WR(i){if(i.gameObject&&i.gameObject.userData.components){const A=i.gameObject.userData.components.indexOf(i);i.gameObject.userData.components.splice(A,1)}i.__internalDisable&&i.__internalDisable(),i.onDestroy&&i.onDestroy(),hs(i,i.context??bg.Current),i.__internalDestroy(),i.gameObject=null}let jR=!1;function ZR(i,A,g){var I;if(i!=null){if(!i.isObject3D){console.error("Object is not object3D");return}if(!((I=i==null?void 0:i.userData)!=null&&I.components))return null;if(typeof A=="string"&&(jR||(jR=!0,console.warn(`Accessing components by name is not supported.
3255
+ }`),Q(_t,"blipMaterial",new Og({uniforms:{map:new MA(null)},vertexShader:xQ.vertex,fragmentShader:xQ.fragment})),Q(_t,"mesh",new GA(xQ.planeGeometry,xQ.blipMaterial));function nO(i){return _t.copyTexture(i)}function BO(i){return typeof HTMLImageElement<"u"&&i instanceof HTMLImageElement||typeof HTMLCanvasElement<"u"&&i instanceof HTMLCanvasElement||typeof OffscreenCanvas<"u"&&i instanceof OffscreenCanvas||typeof ImageBitmap<"u"&&i instanceof ImageBitmap}const RR=new CC(()=>new M,20);class aO{constructor(A,g,I,e,t){Q(this,"_point");Q(this,"_normal");Q(this,"distance");Q(this,"impulse");Q(this,"friction");this._point=A,this.distance=g,this._normal=I,this.impulse=e,this.friction=t}get point(){return RR.get().set(this._point.x,this._point.y,this._point.z)}get normal(){return RR.get().set(this._normal.x,this._normal.y,this._normal.z)}}class mR{constructor(A,g,I){Q(this,"contacts");Q(this,"me");Q(this,"_collider");Q(this,"_gameObject");this.me=A,this._collider=g,this._gameObject=g.gameObject,this.contacts=I}get collider(){return this._collider}get gameObject(){return this._gameObject}get rigidBody(){var A;return(A=this.collider)==null?void 0:A.attachedRigidbody}}function ka(i,A){try{A?i(A):i()}catch(g){return console.error(g),!1}return!0}const cs=Symbol("isActiveInHierarchy"),Ma="builtin_components",Ol=Symbol("originalGuid"),QO=cA("debugnewscripts"),rO=cA("debughierarchy"),JI=[];function Pr(i){if(!(i.new_scripts.length<=0)){if(QO&&console.log("Register new components",i.new_scripts.length,[...i.new_scripts],i.alias?"element: "+i.alias:i.hash,i),i.new_scripts_pre_setup_callbacks.length>0){for(const A of i.new_scripts_pre_setup_callbacks)A&&A();i.new_scripts_pre_setup_callbacks.length=0}JI.length=0,i.new_scripts.length>0&&JI.push(...i.new_scripts),i.new_scripts.length=0;for(let A=0;A<JI.length;A++)try{const g=JI[A];if(g.destroyed)continue;if(!g.gameObject){console.error("MISSING GAMEOBJECT - will ignore",g),JI.splice(A,1),A--;continue}g.context=i,Wr(g.gameObject),NR(g,i)}catch(g){console.error(g),hs(JI[A],i),JI.splice(A,1),A--}for(let A=0;A<JI.length;A++)try{const g=JI[A];if(g.destroyed){hs(JI[A],i),JI.splice(A,1),A--;continue}if(g.registering)try{g.registering()}catch(I){console.error(I)}g.__internalAwake!==void 0&&(g.gameObject||console.error("MISSING GAMEOBJECT",g,g.gameObject),Wr(g.gameObject),g.activeAndEnabled&&ka(g.__internalAwake.bind(g)))}catch(g){console.error(g),hs(JI[A],i),JI.splice(A,1),A--}for(let A=0;A<JI.length;A++)try{const g=JI[A];if(g.destroyed||g.enabled===!1||(Wr(g.gameObject),g.activeAndEnabled===!1))continue;g.__internalEnable!==void 0&&(g.enabled=!0,ka(g.__internalEnable.bind(g)))}catch(g){console.error(g),hs(JI[A],i),JI.splice(A,1),A--}for(let A=0;A<JI.length;A++)try{const g=JI[A];if(g.destroyed||!g.gameObject)continue;i.new_script_start.push(g)}catch(g){console.error(g),hs(JI[A],i),JI.splice(A,1),A--}JI.length=0;for(const A of i.new_scripts_post_setup_callbacks)A&&A();i.new_scripts_post_setup_callbacks.length=0}}function EO(i){i&&(i.__internalDisable(),hs(i,i.context))}function FR(i,A){for(let g=0;g<i.new_script_start.length;g++)try{const I=i.new_script_start[g];if(A!==void 0&&I.gameObject!==A||I.destroyed||I.activeAndEnabled===!1)continue;ka(I.__internalAwake.bind(I)),ka(I.__internalEnable.bind(I)),ka(I.__internalStart.bind(I)),i.new_script_start.splice(g,1),g--}catch(I){console.error(I),hs(i.new_script_start[g],i),i.new_script_start.splice(g,1),g--}}function NR(i,A){A.scripts.indexOf(i)===-1&&(A.scripts.push(i),i.earlyUpdate&&A.scripts_earlyUpdate.push(i),i.update&&A.scripts_update.push(i),i.lateUpdate&&A.scripts_lateUpdate.push(i),i.onBeforeRender&&A.scripts_onBeforeRender.push(i),i.onAfterRender&&A.scripts_onAfterRender.push(i),i.onPausedChanged&&A.scripts_pausedChanged.push(i))}function hs(i,A){lo(i,A.new_scripts),lo(i,A.new_script_start),lo(i,A.scripts),lo(i,A.scripts_earlyUpdate),lo(i,A.scripts_update),lo(i,A.scripts_lateUpdate),lo(i,A.scripts_onBeforeRender),lo(i,A.scripts_onAfterRender),lo(i,A.scripts_pausedChanged),A.stopAllCoroutinesFrom(i)}function lo(i,A){const g=A.indexOf(i);g>=0&&A.splice(g,1)}function _l(i){if(i||(i=Ue.Current.scene),!i){console.trace("Invalid call - no current context.");return}const A=Fa(i);KR(i,A,!0)||(console.error('Failed to update active state in hierarchy of "'+i.name+'"',i),console.warn(" ↑ this error might be caused by circular references. Please make sure you don't have files with circular references (e.g. one GLB 1 is loading GLB 2 which is then loading GLB 1 again)."))}function KR(i,A,g,I=0){if(I>1e3)return console.warn("Hierarchy is too deep (> 1000 level) - will abort updating active state"),!1;const e=Fa(i);if(A&&(A=e,A&&i.parent)){const s=i.parent;A=s[cs],A===void 0&&(s instanceof ct||(A=!0))}const C=i[cs]!==A;i[cs]=A,C&&(rO&&console.warn("ACTIVE CHANGE",i.name,e,i.visible,A,"changed?"+C,i),g&&cO(i,s=>{A?s.enabled&&(ka(s.__internalAwake.bind(s)),s.__didEnable=!0,s.onEnable()):s.__didAwake&&(s.__didEnable=!1,s.onDisable())}));let o=!0;if(i.children){const s=I+1;for(const n of i.children)KR(n,A,g,s)===!1&&(o=!1)}return o}function Wr(i){let A=!0,g=i,I=!1;for(;g&&g;){if(g.type==="Scene"&&(I=!0),!Fa(g)){A=!1;break}g=g.parent}if(!i){console.error("GO is null");return}i[cs]=A&&I}function cO(i,A){var g;if((g=i.userData)!=null&&g.components)for(const I of i.userData.components)A(I)}const Pl=new Map,JR=Symbol("prewarmFlag"),Of=Symbol("waitingForPrewarm"),_f=cA("debugprewarm");function qR(i,A){if(!i||i[JR]===!0||i[Of]===!0)return;Pl.has(A)||Pl.set(A,[]),i[Of]=!0,Pl.get(A).push(i),_f&&console.debug("register prewarm",i.name)}let LR=null,bR=null;function hO(i){if(!i)return;const A=Pl.get(i);if(!(A!=null&&A.length))return;const g=i.mainCamera;if(g){_f&&console.log("prewarm",A.length,"objects",[...A]);const I=i.renderer;if(I.compile){const e=i.scene;I.compile(e,g),LR??(LR=new jh(64)),bR??(bR=new kw(.001,9999999,LR)),bR.update(I,e);for(const t of A)t[JR]=!0,t[Of]=!1;A.length=0,_f&&console.log("prewarm done")}}}const lO=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function DO(i){return typeof i=="string"&&lO.test(i)}const Ne=[];for(let i=0;i<256;++i)Ne.push((i+256).toString(16).slice(1));function dO(i,A=0){return(Ne[i[A+0]]+Ne[i[A+1]]+Ne[i[A+2]]+Ne[i[A+3]]+"-"+Ne[i[A+4]]+Ne[i[A+5]]+"-"+Ne[i[A+6]]+Ne[i[A+7]]+"-"+Ne[i[A+8]]+Ne[i[A+9]]+"-"+Ne[i[A+10]]+Ne[i[A+11]]+Ne[i[A+12]]+Ne[i[A+13]]+Ne[i[A+14]]+Ne[i[A+15]]).toLowerCase()}function uO(i){if(!DO(i))throw TypeError("Invalid UUID");let A;const g=new Uint8Array(16);return g[0]=(A=parseInt(i.slice(0,8),16))>>>24,g[1]=A>>>16&255,g[2]=A>>>8&255,g[3]=A&255,g[4]=(A=parseInt(i.slice(9,13),16))>>>8,g[5]=A&255,g[6]=(A=parseInt(i.slice(14,18),16))>>>8,g[7]=A&255,g[8]=(A=parseInt(i.slice(19,23),16))>>>8,g[9]=A&255,g[10]=(A=parseInt(i.slice(24,36),16))/1099511627776&255,g[11]=A/4294967296&255,g[12]=A>>>24&255,g[13]=A>>>16&255,g[14]=A>>>8&255,g[15]=A&255,g}function pO(i){i=unescape(encodeURIComponent(i));const A=[];for(let g=0;g<i.length;++g)A.push(i.charCodeAt(g));return A}const wO="6ba7b810-9dad-11d1-80b4-00c04fd430c8",fO="6ba7b811-9dad-11d1-80b4-00c04fd430c8";function yO(i,A,g){function I(e,t,C,o){var s;if(typeof e=="string"&&(e=pO(e)),typeof t=="string"&&(t=uO(t)),((s=t)===null||s===void 0?void 0:s.length)!==16)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");let n=new Uint8Array(16+e.length);if(n.set(t),n.set(e,t.length),n=g(n),n[6]=n[6]&15|A,n[8]=n[8]&63|128,C){o=o||0;for(let B=0;B<16;++B)C[o+B]=n[B];return C}return dO(n)}try{I.name=i}catch{}return I.DNS=wO,I.URL=fO,I}function SO(i,A,g,I){switch(i){case 0:return A&g^~A&I;case 1:return A^g^I;case 2:return A&g^A&I^g&I;case 3:return A^g^I}}function Pf(i,A){return i<<A|i>>>32-A}function GO(i){const A=[1518500249,1859775393,2400959708,3395469782],g=[1732584193,4023233417,2562383102,271733878,3285377520];if(typeof i=="string"){const C=unescape(encodeURIComponent(i));i=[];for(let o=0;o<C.length;++o)i.push(C.charCodeAt(o))}else Array.isArray(i)||(i=Array.prototype.slice.call(i));i.push(128);const I=i.length/4+2,e=Math.ceil(I/16),t=new Array(e);for(let C=0;C<e;++C){const o=new Uint32Array(16);for(let s=0;s<16;++s)o[s]=i[C*64+s*4]<<24|i[C*64+s*4+1]<<16|i[C*64+s*4+2]<<8|i[C*64+s*4+3];t[C]=o}t[e-1][14]=(i.length-1)*8/Math.pow(2,32),t[e-1][14]=Math.floor(t[e-1][14]),t[e-1][15]=(i.length-1)*8&4294967295;for(let C=0;C<e;++C){const o=new Uint32Array(80);for(let E=0;E<16;++E)o[E]=t[C][E];for(let E=16;E<80;++E)o[E]=Pf(o[E-3]^o[E-8]^o[E-14]^o[E-16],1);let s=g[0],n=g[1],B=g[2],r=g[3],a=g[4];for(let E=0;E<80;++E){const c=Math.floor(E/20),h=Pf(s,5)+SO(c,n,B,r)+a+A[c]+o[E]>>>0;a=r,r=B,B=Pf(n,30)>>>0,n=s,s=h}g[0]=g[0]+s>>>0,g[1]=g[1]+n>>>0,g[2]=g[2]+B>>>0,g[3]=g[3]+r>>>0,g[4]=g[4]+a>>>0}return[g[0]>>24&255,g[0]>>16&255,g[0]>>8&255,g[0]&255,g[1]>>24&255,g[1]>>16&255,g[1]>>8&255,g[1]&255,g[2]>>24&255,g[2]>>16&255,g[2]>>8&255,g[2]&255,g[3]>>24&255,g[3]>>16&255,g[3]>>8&255,g[3]&255,g[4]>>24&255,g[4]>>16&255,g[4]>>8&255,g[4]&255]}const vR=yO("v5",80,GO);var ji=(i=>(i[i.OnConnection=0]="OnConnection",i[i.OnRoomJoin=1]="OnRoomJoin",i[i.Queued=2]="Queued",i[i.Immediate=3]="Immediate",i))(ji||{});Ue.registerCallback(oC.ContextCreated,i=>{const A=i.context;RO(A),MO(A)});const Wl=cA("debugcomponents"),xR="eff8ba80-635d-11ec-90d6-0242ac120003";class wi{constructor(A){Q(this,"_originalSeed");Q(this,"_seed");typeof A=="string"&&(A=wi.hash(A)),this._originalSeed=A,this._seed=A}get seed(){return this._seed}set seed(A){this._seed=A}reset(){this._seed=this._originalSeed}generateUUID(A){if(typeof A=="string")return vR(A,xR);const g=this._seed;return this._seed-=1,vR(g.toString(),xR)}initialize(A){typeof A=="string"?this._seed=wi.hash(A):this._seed=A}static createFromString(A){return new wi(this.hash(A))}static hash(A){let g=0;for(let I=0;I<A.length;I++)g=A.charCodeAt(I)+((g<<5)-g);return g}}class YR{constructor(A){Q(this,"guid");this.guid=A}}function Wf(i,A,g=!0){if(!i)return;const I=i;if(Ds(i,g),!A){console.warn("Can not send destroy: No networking connection provided",i.guid);return}if(!A.isConnected){console.warn("Can not send destroy: not connected",i.guid);return}let e=i.guid;if(!e&&I.uuid&&(e=I.uuid),!e){console.warn("Can not send destroy: failed to find guid",i);return}const t=new YR(e);A.send("instance-destroyed",t,ji.Queued)}function kO(i,A){const g=new YR(i);A.send("instance-destroyed",g,ji.Queued)}function MO(i){i.connection.beginListen("instance-destroyed",A=>{Wl&&console.log("[Remote] Destroyed",i.scene,A);const g=eE(A.guid,i.scene);g&&Ds(g)})}class UO{constructor(A,g){Q(this,"guid");Q(this,"originalGuid");Q(this,"seed");Q(this,"visible");Q(this,"hostData");Q(this,"dontSave");Q(this,"parent");Q(this,"position");Q(this,"rotation");Q(this,"scale");this.originalGuid=A,this.guid=g}}function HR(i,A,g,I){var s;const e=i;if(!e.guid)return console.warn("Can not instantiate: No guid",e),null;if(A.context||(A.context=bg.Current),!A.context)return console.error("Missing network instantiate options / reference to network connection in sync instantiate"),null;const t=A?{...A}:null,{instance:C,seed:o}=mO(e,A);if(C){const n=C;if(n.guid){Wl&&console.log("[Local] new instance","gameobject:",C==null?void 0:C.guid);const B=new UO(e.guid,n.guid);B.seed=o,t&&(t.position&&(B.position={x:t.position.x,y:t.position.y,z:t.position.z}),t.rotation&&(B.rotation={x:t.rotation.x,y:t.rotation.y,z:t.rotation.z,w:t.rotation.w}),t.scale&&(B.scale={x:t.scale.x,y:t.scale.y,z:t.scale.z})),B.position||(B.position={x:n.position.x,y:n.position.y,z:n.position.z}),B.rotation||(B.rotation={x:n.quaternion.x,y:n.quaternion.y,z:n.quaternion.z,w:n.quaternion.w}),B.scale||(B.scale={x:n.scale.x,y:n.scale.y,z:n.scale.z}),B.visible=e.visible,t!=null&&t.parent&&(typeof t.parent=="string"?B.parent=t.parent:B.parent=t.parent.guid),B.hostData=g,I===!1&&(B.dontSave=!0),(s=A==null?void 0:A.context)==null||s.connection.send("new-instance-created",B)}else console.warn("Missing guid, can not send new instance event",n)}return C}function jf(){return Math.random()*9999999}function RO(i){i.connection.beginListen("new-instance-created",async A=>{const g=await NO(A.originalGuid,i.scene);if(!g){console.warn("could not find object that was instantiated: "+A.guid);return}const I=new DC;A.position&&(I.position=new M(A.position.x,A.position.y,A.position.z)),A.rotation&&(I.rotation=new RA(A.rotation.x,A.rotation.y,A.rotation.z,A.rotation.w)),A.scale&&(I.scale=new M(A.scale.x,A.scale.y,A.scale.z)),I.parent=A.parent,A.seed&&(I.idProvider=new wi(A.seed)),I.visible=A.visible,I.context=i,Wl&&i.alias&&console.log("[Remote] instantiate in: "+i.alias);const e=iE(g,I);e&&(A.parent==="scene"&&i.scene.add(e),Wl&&console.log("[Remote] new instance","gameobject:",e==null?void 0:e.guid,g))})}function mO(i,A){const g=jf(),I=A??new DC;I.idProvider=new wi(g);const e=iE(i,I);return{seed:g,instance:e}}const TR={};function FO(i,A){TR[i]=A}async function NO(i,A){const g=TR[i];if(g!=null){const I=await g(i);if(I)return I}return OR(i,A)}function OR(i,A){if(A===null||!i)return null;if(A.guid===i)return A;if(A.children)for(const g of A.children){const I=OR(i,g);if(I)return I}return null}const _R=new Map;function KO(i,A){if(!i)return;if(!A){console.warn("No prototype found",i,i.prototype,i.constructor);return}let g=_R.get(A);g&&g.apply(i)}function JO(i){const A=qO(i.prototype);_R.set(i,A)}function qO(i){return new LO(i)}class LO{constructor(A){Q(this,"$symbol");Q(this,"extensions");Q(this,"descriptors");this.$symbol=Symbol("prototype-extension"),this.extensions=Object.keys(A),this.descriptors=new Array;for(let g=0;g<this.extensions.length;g++){const I=this.extensions[g],e=Object.getOwnPropertyDescriptor(A,I);e&&this.descriptors.push(e)}}apply(A){if(!A[this.$symbol]){A[this.$symbol]=!0;for(let g=0;g<this.extensions.length;g++){const I=this.extensions[g],e=this.descriptors[g];e&&Object.defineProperty(A,I,e)}}}}const bO=new Map;var jl=(i=>(i.Added="component-added",i.Removing="removing-component",i))(jl||{});function Zf(i,A){const g=bO.get(i);if(g)for(const I of g)I(A)}const zf=cA("debuggetcomponent");function vO(i){return i==null||i.isObject3D?i:i.object&&i.object.isObject3D?i.object:i}function Vf(i,A){if(!i||!i.userData.components)return;const g=i.userData.components.indexOf(A);g<0||(Zf(jl.Removing,A),A.gameObject=null,i.userData.components.splice(g,1))}function Xf(i,A){const g=Ua(i,A);if(g)return g;const I=new A;return ls(i,I)}const xO=new wi("addComponentIdProvider");function ls(i,A,g=!0){i.userData||(i.userData={}),i.userData.components||(i.userData.components=[]),i.userData.components.push(A),A.gameObject=i,(A.guid===void 0||A.guid==="invalid")&&(A.guid=xO.generateUUID()),zl(i),xF(A);try{g&&A.__internalAwake&&(Wr(i),A.__internalAwake()),Zf(jl.Added,A)}catch(I){console.error(I)}return A}function PR(i,A){if(A.gameObject!==i){if(A.gameObject&&A.gameObject.userData.components){const g=A.gameObject.userData.components.indexOf(A);A.gameObject.userData.components.splice(g,1)}if(!i.userData.components)i.userData.components=[];else if(i.userData.components.includes(A))return;i.userData.components.push(A),A.gameObject=i}}function WR(i){if(i.gameObject&&i.gameObject.userData.components){const A=i.gameObject.userData.components.indexOf(i);i.gameObject.userData.components.splice(A,1)}i.__internalDisable&&i.__internalDisable(),i.onDestroy&&i.onDestroy(),hs(i,i.context??bg.Current),i.__internalDestroy(),i.gameObject=null}let jR=!1;function ZR(i,A,g){var I;if(i!=null){if(!i.isObject3D){console.error("Object is not object3D");return}if(!((I=i==null?void 0:i.userData)!=null&&I.components))return null;if(typeof A=="string"&&(jR||(jR=!0,console.warn(`Accessing components by name is not supported.
3256
3256
  Please use the component type instead. This may keep working in local development but it will fail when bundling your application.
3257
3257
 
3258
3258
  You can import other modules your main module to get access to types
@@ -3826,7 +3826,7 @@ outputColor=vec4(color,inputColor.a);}`,yF=class extends UC{constructor({blendFu
3826
3826
  irradiance += 0.;
3827
3827
  #else
3828
3828
  irradiance += getLightProbeIrradiance( lightProbe, geometry.normal );
3829
- #endif`),ZA.lightmap.lightmapScaleOffset={value:new ng(1,1,0,0)};const H1=cA("debugplayerview");var wo=(i=>(i.Browser="browser",i.Headset="headset",i.Handheld="handheld",i))(wo||{});class T1{constructor(A,g){Q(this,"userId");Q(this,"context");Q(this,"viewDevice","browser");Q(this,"removed",!1);Q(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 O1{constructor(A){Q(this,"context");Q(this,"playerViews",new Map);this.context=A}setPlayerView(A,g,I){let e=this.playerViews.get(A);e||(e=new T1(A,this.context),this.playerViews.set(A,e)),e.viewDevice=I,e.currentObject=g,e.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&&(H1&&console.log("REMOVE",A),I.removed=!0,this.playerViews.delete(A))}}const _1=cA("debugSetup"),P1=cA("stats"),W1=cA("debugactive"),j1=cA("debugframerate");var ki=(i=>(i[i.EarlyUpdate=0]="EarlyUpdate",i[i.Update=1]="Update",i[i.LateUpdate=2]="LateUpdate",i[i.OnBeforeRender=3]="OnBeforeRender",i[i.OnAfterRender=4]="OnAfterRender",i[i.PrePhysicsStep=9]="PrePhysicsStep",i[i.PostPhysicsStep=10]="PostPhysicsStep",i[i.Undefined=-1]="Undefined",i))(ki||{}),jD=(i=>(i.ImmersiveVR="immersive-vr",i.ImmersiveAR="immersive-ar",i))(jD||{});function xF(i,A){if(!i)return;const g=(A==null?void 0:A.new_scripts)??bg.Current.new_scripts;g.includes(i)||g.push(i)}const Ii=class{constructor(A){Q(this,"name");Q(this,"alias");Q(this,"isManagedExternally",!1);Q(this,"isPaused",!1);Q(this,"runInBackground",!1);Q(this,"targetFrameRate");Q(this,"hash");Q(this,"domElement");Q(this,"_resolutionScaleFactor",1);Q(this,"_boundingClientRectFrame",-1);Q(this,"_boundingClientRect",null);Q(this,"_domX");Q(this,"_domY");Q(this,"xrSessionMode");Q(this,"_currentFrameEvent",-1);Q(this,"scene");Q(this,"renderer");Q(this,"composer",null);Q(this,"scripts",[]);Q(this,"scripts_pausedChanged",[]);Q(this,"scripts_earlyUpdate",[]);Q(this,"scripts_update",[]);Q(this,"scripts_lateUpdate",[]);Q(this,"scripts_onBeforeRender",[]);Q(this,"scripts_onAfterRender",[]);Q(this,"scripts_WithCorroutines",[]);Q(this,"coroutines",{});Q(this,"mainCameraComponent");Q(this,"post_setup_callbacks",[]);Q(this,"pre_update_callbacks",[]);Q(this,"pre_render_callbacks",[]);Q(this,"post_render_callbacks",[]);Q(this,"new_scripts",[]);Q(this,"new_script_start",[]);Q(this,"new_scripts_pre_setup_callbacks",[]);Q(this,"new_scripts_post_setup_callbacks",[]);Q(this,"application");Q(this,"time");Q(this,"input");Q(this,"physics");Q(this,"connection");Q(this,"assets");Q(this,"mainLight",null);Q(this,"rendererData");Q(this,"addressables");Q(this,"lightmaps");Q(this,"players");Q(this,"_sizeChanged",!1);Q(this,"_isCreated",!1);Q(this,"_isVisible",!1);Q(this,"_stats",P1?p1():null);Q(this,"_intersectionObserver",null);Q(this,"_disposeCallbacks",[]);Q(this,"_cameraStack",[]);Q(this,"_onBeforeRenderListeners",{});Q(this,"_requireDepthTexture",!1);Q(this,"_requireColorTexture",!1);Q(this,"_renderTarget");Q(this,"_isRendering",!1);Q(this,"_accumulatedTime",0);Q(this,"_framerateClock",new Rl);Q(this,"_wasPaused",!1);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):(this.renderer=new fn({antialias:!0}),this.renderer.toneMappingExposure=1,this.renderer.toneMapping=ei,this.renderer.setClearColor(new fA("lightgrey"),0),this.renderer.antialias=!0,this.renderer.alpha=!1,this.renderer.shadowMap.enabled=!0,this.renderer.shadowMap.type=wp,this.renderer.setSize(this.domWidth,this.domHeight),this.renderer.outputEncoding=gg,this.renderer.physicallyCorrectLights=!0),this.scene=new ct,Ue.register(this),this.application=new b1(this),this.time=new l_,this.input=new gO(this),this.physics=new Pn(this),this.connection=new m_(this),this.assets=new OO,this.rendererData=new M1(this),this.addressables=new q1(this),this.lightmaps=new Y1(this),this.players=new O1(this);const g=()=>this._sizeChanged=!0;window.addEventListener("resize",g),this._disposeCallbacks.push(()=>window.removeEventListener("resize",g));const I=new ResizeObserver(e=>this._sizeChanged=!0);I.observe(this.domElement),this._disposeCallbacks.push(()=>I.disconnect()),this._intersectionObserver=new IntersectionObserver(e=>{this._isVisible=e[0].isIntersecting}),this._disposeCallbacks.push(()=>{var e;return(e=this._intersectionObserver)==null?void 0:e.disconnect()})}static get Current(){return this._current}static set Current(A){Ue.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,e=this.domWidth*I,t=this.domHeight*I,C=this.mainCamera;this.updateAspect(C),this.renderer.setSize(e,t),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,e,t),"setPixelRatio"in this.composer&&typeof this.composer.setPixelRatio=="function"&&((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 e=A.aspect;A.aspect=g/I,e!==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 e of this._disposeCallbacks)try{e()}catch(t){console.error("Error in on dispose callback:",t,e)}(I=this.domElement)!=null&&I.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Ue.dispatchCallback(oC.ContextDestroyed,this),Ue.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(e=>e.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 e=I.length-1;e>=0;e--)I[e].comp===A&&I.splice(e,1)}}setCurrentCamera(A){var e;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),(e=this.mainCameraComponent)==null||e.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=(e,t,C,o,s,n)=>{const B=this._onBeforeRenderListeners[A.uuid];if(B)for(let r=0;r<B.length;r++){const a=B[r];a(e,t,C,o,s,n)}};A.onBeforeRender=I}this._onBeforeRenderListeners[A.uuid].push(g)}removeBeforeRenderListener(A,g){if(this._onBeforeRenderListeners[A.uuid]){const I=this._onBeforeRenderListeners[A.uuid],e=I.indexOf(g);e>=0&&I.splice(e,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{Ii.Current=this,A&&await A(this,g)}catch(e){console.error(e),I=!1}if(I){this.internalOnUpdateVisible(),this.isManagedExternally||this.domElement.prepend(this.renderer.domElement),Ii._current=this,Ii._current=this;for(let e=0;e<this.new_scripts.length;e++){const t=this.new_scripts[e];if(t.gameObject!==void 0&&t.gameObject!==null){t.gameObject.userData===void 0&&(t.gameObject.userData={}),t.gameObject.userData.components===void 0&&(t.gameObject.userData.components=[]);const C=t.gameObject.userData.components;C.includes(t)||C.push(t)}}if(this.post_setup_callbacks)for(let e=0;e<this.post_setup_callbacks.length;e++)Ii._current=this,await this.post_setup_callbacks[e](this);if(!this.mainCamera){Ii._current=this;let e=null;Yn(this.scene,t=>{const C=t;if(C!=null&&C.isCamera){if(Wr(C.gameObject),!C.activeAndEnabled)return;if(C.tag==="MainCamera")return e=C,!0;e=C}}),e?this.setCurrentCamera(e):(Ue.dispatchCallback(oC.MissingCamera,this),!this.mainCamera&&!this.isManagedExternally&&console.error("MISSING camera",this))}if(Ii._current=this,Pr(this),!this.isManagedExternally&&this.composer&&this.mainCamera){const e=new PD(this.scene,this.mainCamera);this.renderer.setSize(this.domWidth,this.domHeight),this.composer.addPass(e),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)),_1&&Tf(this.scene,!0),Ue.dispatchCallback(oC.ContextCreated,this)}}render(A,g){var t,C;if(this._currentFrameEvent=-1,this.isInXR===!1&&this.targetFrameRate!==void 0){if(this._accumulatedTime+=this._framerateClock.getDelta(),this._accumulatedTime<1/this.targetFrameRate)return;this._accumulatedTime=0}if((t=this._stats)==null||t.begin(),Ii._current=this,this.onHandlePaused())return;for(Ii._current=this,this.time.update(),j1&&console.log("FPS",this.time.smoothedFps.toFixed(0)),Pr(this),_l(this.scene),FR(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 s=this.scripts_earlyUpdate[o];s.activeAndEnabled&&s.earlyUpdate!==void 0&&(Ii._current=this,s.earlyUpdate())}if(this.executeCoroutines(0),this.onHandlePaused())return;this._currentFrameEvent=1;for(let o=0;o<this.scripts_update.length;o++){const s=this.scripts_update[o];s.activeAndEnabled&&s.update!==void 0&&(Ii._current=this,s.update())}if(this.executeCoroutines(1),this.onHandlePaused())return;this._currentFrameEvent=2;for(let o=0;o<this.scripts_lateUpdate.length;o++){const s=this.scripts_lateUpdate[o];s.activeAndEnabled&&s.lateUpdate!==void 0&&(Ii._current=this,s.lateUpdate())}if(this.executeCoroutines(2),this.onHandlePaused())return;const I=1,e=this.time.deltaTime/I;for(let o=0;o<I;o++)this._currentFrameEvent=9,this.executeCoroutines(9),this.physics.step(e),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 s=this.scripts_onBeforeRender[o];s.activeAndEnabled&&s.onBeforeRender!==void 0&&(Ii._current=this,s.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||(hO(this),this._currentFrameEvent=-1,this.renderNow(),this._currentFrameEvent=4);for(let o=0;o<this.scripts_onAfterRender.length;o++){const s=this.scripts_onAfterRender[o];s.activeAndEnabled&&s.onAfterRender!==void 0&&(Ii._current=this,s.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(),this.time.frame===1&&this.domElement.dispatchEvent(new CustomEvent("ready"))}}renderNow(A){return!A&&(A=this.mainCamera,!A)?!1:(this._isRendering=!0,this.renderRequiredTextures(),this.composer&&!this.isInXR?this.composer.render(this.time.deltaTime):A&&this.renderer.render(this.scene,A),this._isRendering=!1,!0)}onHandlePaused(){const A=this.evaluatePaused();if(this._wasPaused!==A){W1&&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&&(Ii._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 II(this.domWidth,this.domHeight),this._requireDepthTexture){const I=new Il(this.domWidth,this.domHeight);this._renderTarget.depthTexture=I}this._requireColorTexture&&(this._renderTarget.texture=new qg,this._renderTarget.texture.generateMipmaps=!1,this._renderTarget.texture.minFilter=Zg,this._renderTarget.texture.magFilter=Zg,this._renderTarget.texture.format=dI)}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 e=0;e<I.length;e++)try{const t=I[e];if(!t.comp||t.comp.destroyed||!t.main||t.comp.enabled===!1){I.splice(e,1),--e;continue}const o=t.chained;if(o&&o.length>0){const r=o[o.length-1].next();if(r.done&&o.pop(),g(r)&&(t.chained||(t.chained=[]),t.chained.push(r.value)),!r.done)continue}const s=t.main.next();if(s.done===!0){I.splice(e,1),--e;continue}const n=s.value;if(g(n)){if(n.next().done)continue;t.chained||(t.chained=[]),t.chained.push(n)}}catch(t){console.error(t)}}function g(I){return!!(I&&I.next&&I.return)}}};let bg=Ii;Q(bg,"_current");const Z1=cA("debugaroverlay"),jn="ar",YF="quit-ar";class z1{constructor(){Q(this,"arContainer",null);Q(this,"closeARCallback");Q(this,"currentSession",null);Q(this,"registeredCloseEventElements",[]);Q(this,"_createdAROnlyElements",[]);Q(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(`.${jn}`).forEach(C=>{var o;C&&C!==this.arContainer&&(this._reparentedObjects.push({el:C,previousParent:C.parentElement}),(o=this.arContainer)==null||o.appendChild(C))});const t=g.getElementsByClassName(YF);if(!t||t.length<=0)console.warn(`Missing quit AR elements, creating fallback X button. Use class name '${YF}' to override.`),this.createFallbackCloseARButton(this.arContainer);else for(let C=0;C<t.length;C++){const o=t[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 e=I.el;(g=I.previousParent)==null||g.appendChild(e)}this._reparentedObjects.length=0,Ep()&&setTimeout(()=>{const I=A.renderer.domElement;I&&A.domElement.insertBefore(I,A.domElement.firstChild);const e=document.querySelectorAll("*");for(var t=0;t<e.length;t++){const C=e[t];C&&C._displayChanged!==void 0&&C._displayWas!==void 0&&(C.style.display=C._displayWas)}},10)}findOrCreateARContainer(A){if(A.classList.contains(jn))return A;if(A.children)for(let e=0;e<A.children.length;e++){const t=A.children[e];if(!(!t||!t.classList)&&t.classList.contains(jn))return t}const g=document.getElementsByClassName(jn);if(g&&g.length>0)return g[0];Z1&&console.log("No overlay container found in document - generating new ony");const I=document.createElement("div");return I.classList.add(jn),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);Q(this,"guid")}static isDestroyed(g){return Iy(g)}static setActive(g,I,e=!0){g&&(IE(g,I),_l(g),I&&e&&FR(bg.Current,g))}static isActiveSelf(g){return Fa(g)}static isActiveInHierarchy(g){return om(g)}static markAsInstancedRendered(g,I){sm(g,I)}static isUsingInstancing(g){return ID(g)}static foreachComponent(g,I,e=!0){return Yn(g,I,e)}static instantiateSynced(g,I){return g?HR(g,I):null}static instantiate(g,I=null){return iE(g,I)}static destroySynced(g,I,e=!0){if(!g)return;const t=g;I=I??bg.Current,Wf(t,I.connection,e)}static destroy(g,I=!0,e=!0){return Ds(g,I,e)}static add(g,I,e){if(!(!g||!I)){if(g===I){console.warn("Can not add object to self",g);return}e||(e=bg.Current),I.add(g),IE(g,!0),_l(g),e?sA.foreachComponent(g,t=>{NR(t,e),!t.__internalDidAwakeAndStart&&e.new_script_start.includes(t)===!1&&e.new_script_start.push(t)},!0):console.warn("Missing context")}}static remove(g){var I;g&&((I=g.parent)==null||I.remove(g),IE(g,!1),_l(g),sA.foreachComponent(g,e=>{EO(e)},!0))}static invokeOnChildren(g,I,...e){this.invoke(g,I,!0,e)}static invoke(g,I,e=!1,...t){g&&this.foreachComponent(g,C=>{const o=C[I];o&&typeof o=="function"&&(o==null||o.call(C,...t))},e)}static addNewComponent(g,I,e=!0){const t=new I;return ls(g,t,e),t}static addComponent(g,I){return this.moveComponent(g,I)}static moveComponent(g,I){if(I.gameObject==null)throw new Error("Did you mean to create a new component? Use addNewComponent");PR(g,I)}static removeComponent(g){return Vf(g.gameObject,g),g}static getOrAddComponent(g,I){return Xf(g,I)}static getComponent(g,I){return g===null?null:Ua(g,I)}static getComponents(g,I,e=null){return g===null?e??[]:jr(g,I,e)}static findByGuid(g,I){return eE(g,I)}static findObjectOfType(g,I,e=!0){return zR(g,I??bg.Current,e)}static findObjectsOfType(g,I){const e=[];return VR(g,e,I),e}static getComponentInChildren(g,I){return Ra(g,I)}static getComponentsInChildren(g,I,e=null){return Zr(g,I,e??void 0)}static getComponentInParent(g,I){return zr(g,I)}static getComponentsInParent(g,I,e=null){return Zl(g,I,e)}static getAllComponents(g){var t;return[...(t=g.userData)==null?void 0:t.components]}static*iterateComponents(g){var e;const I=(e=g==null?void 0:g.userData)==null?void 0:e.components;if(I&&Array.isArray(I))for(let t=0;t<I.length;t++)yield I[t]}}let fE=(vI=class{constructor(){Q(this,"__context");Q(this,"__name");Q(this,"gameObject");Q(this,"guid","invalid");Q(this,"sourceId");Q(this,"__didAwake",!1);Q(this,"__didStart",!1);Q(this,"__didEnable",!1);Q(this,"__isEnabled");Q(this,"__destroyed",!1);Q(this,"_worldPosition");Q(this,"_worldQuaternion");Q(this,"_worldEuler");Q(this,"_worldRotation");Q(this,"_eventListeners",new Map);this.__internalNewInstanceCreated()}get isComponent(){return!0}get context(){return this.__context??bg.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[cs];return A===void 0?!0:A}set __isActiveInHierarchy(A){this.gameObject&&(this.gameObject[cs]=A)}awake(){}onEnable(){}onDisable(){}onDestroy(){this.__destroyed=!0}startCoroutine(A,g=ki.Update){return this.context.registerCoroutineUpdate(this,A,g)}stopCoroutine(A,g=ki.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),WR(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),fg(this.gameObject,this._worldPosition),this._worldPosition}set worldPosition(A){Fe(this.gameObject,A)}setWorldPosition(A,g,I){vI._worldPositionBuffer.set(A,g,I),this.worldPosition=vI._worldPositionBuffer}get worldQuaternion(){return this._worldQuaternion||(this._worldQuaternion=new RA),Wi(this.gameObject,this._worldQuaternion)}set worldQuaternion(A){hC(this.gameObject,A)}setWorldQuaternion(A,g,I,e){vI._worldQuaternionBuffer.set(A,g,I,e),this.worldQuaternion=vI._worldQuaternionBuffer}get worldEuler(){return this._worldEuler||(this._worldEuler=new $I),this._worldEuler.setFromQuaternion(this.worldQuaternion),this._worldEuler}set worldEuler(A){var g;this._worldQuaternion||(this._worldQuaternion=new RA),(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=Ig.toDegrees(g.x),g.y=Ig.toDegrees(g.y),g.z=Ig.toDegrees(g.z),g}set worldRotation(A){this.setWorldRotation(A.x,A.y,A.z,!0)}setWorldRotation(A,g,I,e=!0){e&&(A=Ig.toRadians(A),g=Ig.toRadians(g),I=Ig.toRadians(I)),vI._worldEulerBuffer.set(A,g,I),vI._worldQuaternionBuffer.setFromEuler(vI._worldEulerBuffer),this.worldQuaternion=vI._worldQuaternionBuffer}get forward(){return vI._forward.set(0,0,-1).applyQuaternion(this.worldQuaternion)}get right(){return vI._right.set(1,0,0).applyQuaternion(this.worldQuaternion)}get up(){return vI._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}},Q(vI,"_worldPositionBuffer",new M),Q(vI,"_worldQuaternionBuffer",new RA),Q(vI,"_worldEulerBuffer",new $I),Q(vI,"_tempQuaternionBuffer2",new RA),Q(vI,"_forward",new M),Q(vI,"_right",new M),Q(vI,"_up",new M),vI);class OA extends fE{}const V1=Object.freeze(Object.defineProperty({__proto__:null,Behaviour:OA,Component:fE,GameObject:sA},Symbol.toStringTag,{value:"Module"})),HF="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiPz48c3ZnIGlkPSJFYmVuZV8zIiB4bWxucz0iaHR0cDovL3d3dy53My5vcmcvMjAwMC9zdmciIHhtbG5zOnhsaW5rPSJodHRwOi8vd3d3LnczLm9yZy8xOTk5L3hsaW5rIiB2aWV3Qm94PSIwIDAgMTYwIDE4Ny43NCI+PGRlZnM+PHN0eWxlPi5jbHMtMXtmaWxsOnVybCgjVW5iZW5hbm50ZXJfVmVybGF1Zl8xMjIpO30uY2xzLTJ7ZmlsbDojZjNlNjAwO30uY2xzLTN7ZmlsbDp1cmwoI1VuYmVuYW5udGVyX1ZlcmxhdWZfMTEzKTt9LmNscy00e2ZpbGw6dXJsKCNncmFkaWVudC02KTt9LmNscy01e2ZpbGw6dXJsKCNVbmJlbmFubnRlcl9WZXJsYXVmXzExMCk7fS5jbHMtNntmaWxsOnVybCgjVW5iZW5hbm50ZXJfVmVybGF1Zl8xMDEpO30uY2xzLTd7ZmlsbDojOWMzO30uY2xzLTh7ZmlsbDojZmZlMTEzO30uY2xzLTl7ZmlsbDp1cmwoI2dyYWRpZW50LTUpO308L3N0eWxlPjxsaW5lYXJHcmFkaWVudCBpZD0iVW5iZW5hbm50ZXJfVmVybGF1Zl8xMTMiIHgxPSI4OS42NCIgeTE9IjE4NC44MSIgeDI9IjkwLjQ4IiB5Mj0iMj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xMzUuMTkgMTM0LjgyIDc4LjY5Ii8+PHBvbHlnb24gY2xhc3M9ImNscy04IiBwb2ludHM9IjE2MCA2NC4xIDE0MS4zMSA0MS44NCAxMTYuMTQgNTYuMzYgMTM0LjgxIDc4LjY5IDE2MCA2NC4xIi8+PHBvbHlnb24gY2xhc3M9ImNscy0yIiBwb2ludHM9IjEwMS41OSAxOC4yMyA3OS4zMiAwIDU3LjA1IDE4LjIzIDc5LjMyIDM2Ljk4IDEwMS41OSAxOC4yMyIvPjwvZz48L3N5bWJvbD48L2RlZnM+PHVzZSB3aWR0aD0iMTYwIiBoZWlnaHQ9IjE4Ny43NCIgeGxpbms6aHJlZj0iI25lZWRsZS1pY29uIi8+PC9zdmc+",Zn=cA("debugloadingbar"),Xy=cA("debugloadingbarrendering");let yE=0,TF;function OF(i){Zn&&console.log(i.progress.loaded.toFixed(0)+"/"+i.progress.total.toFixed(0),i);const A=i.count,g=i.progress.total;g===0||g===void 0?(TF!==i.name&&(yE=0),TF=i.name,yE+=(1-yE)*.001,Zn&&cC("Loading "+i.name+" did not report total size")):yE=i.progress.loaded/g;const I=i.index/A+yE/A;return Ig.clamp01(I)}const Xu=class{constructor(A,g){Q(this,"loadingProgress",0);Q(this,"container");Q(this,"_progress",0);Q(this,"_allowCustomLoadingElement",!0);Q(this,"_loadingElement");Q(this,"_loadingTextContainer",null);Q(this,"_loadingBar",null);Q(this,"_messageContainer",null);Q(this,"_loadingElementOptions");Q(this,"_progressLoop");this.container=A,this._loadingElementOptions=g}onLoadingBegin(A){if(Zn&&console.log("Begin Loading"),!this._loadingElement){for(let g=0;g<this.container.children.length;g++){const I=this.container.children[g];if(I.classList.contains(Xu.LoadingContainerClassName)){if(!this._allowCustomLoadingElement){Zn&&console.warn("Remove custom loading container"),this.container.removeChild(I);continue}this._loadingElement=this.createLoadingElement(I)}}this._loadingElement||(this._loadingElement=this.createLoadingElement())}this._progress=0,this.loadingProgress=0,this._loadingElement.style.display="flex",this.container.appendChild(this._loadingElement),this.smoothProgressLoop(),this.setMessage(A??"")}onLoadingUpdate(A,g){var e;(e=this._loadingElement)!=null&&e.parentElement||this.onLoadingBegin(g);let I=0;typeof A=="number"?I=A:("index"in A&&(I=OF(A)),!g&&"name"in A&&this.setMessage("loading "+A.name)),this.loadingProgress=I,g&&this.setMessage(g),this.updateDisplay()}onLoadingFinished(){Zn&&console.warn("Finished Loading"),this.loadingProgress=1,this.onDoneLoading()}setMessage(A){this._messageContainer&&(this._messageContainer.innerText=A)}smoothProgressLoop(){if(this._progressLoop)return;let A=1/12;Xy&&(A=1/500,typeof Xy=="number"&&(A*=Xy)),this._progressLoop=setInterval(()=>{this.loadingProgress>=.95&&(A=.9),this._progress=Ig.lerp(this._progress,this.loadingProgress,A*this.loadingProgress),this.updateDisplay()},A)}onDoneLoading(){this._loadingElement&&(Zn&&console.log("Hiding loading element"),this._loadingElement.style.display="none",this._loadingElement.remove()),this._progressLoop&&clearInterval(this._progressLoop),this._progressLoop=null}updateDisplay(){const A=this._progress,g=(A*100).toFixed(0)+"%";this._loadingBar&&(this._loadingBar.style.width=A*100+"%"),this._loadingTextContainer&&(this._loadingTextContainer.textContent=g)}createLoadingElement(A){var n,B;Zn&&!A&&console.log("Creating loading element"),this._loadingElement=A||document.createElement("div"),A||(this._loadingElement.style.position="fixed",this._loadingElement.style.width="100%",this._loadingElement.style.height="100%",this._loadingElement.style.left="0",this._loadingElement.style.top="0",this._loadingElement.style.backgroundColor="#000000",this._loadingElement.style.display="flex",this._loadingElement.style.alignItems="center",this._loadingElement.style.justifyContent="center",this._loadingElement.style.zIndex="1000",this._loadingElement.style.flexDirection="column",this._loadingElement.style.pointerEvents="none",this._loadingElement.style.color="white");const g=((n=this._loadingElementOptions)==null?void 0:n.className)??Xu.LoadingContainerClassName;if(this._loadingElement.classList.add(g),(B=this._loadingElementOptions)!=null&&B.additionalClasses)for(const r of this._loadingElementOptions.additionalClasses)this._loadingElement.classList.add(r);const I=document.createElement("div"),e=30;I.style.display="flex",I.style.width=e+"%",I.style.height="2px",I.style.background="rgba(255,255,255,.2)",this._loadingElement.appendChild(I);const t=document.createElement("img"),C=64;t.style.width=`${C}px`,t.style.height=`${C}px`,t.style.position="absolute",t.style.left="50%",t.style.transform=`translate(-${C*.5}px, -${C+32}px)`,t.addEventListener("click",()=>window.open("https://needle.tools","_blank")),t.style.cursor="pointer",t.style.userSelect="none",t.style.pointerEvents="all",t.src=HF,I.appendChild(t),this._loadingBar=document.createElement("div"),I.appendChild(this._loadingBar);const o=function(r){return Ig.lerp(e*.5,100-e*.5,r)+"%"};this._loadingBar.style.background=`linear-gradient(90deg, #02022B ${o(0)}, #0BA398 ${o(.4)}, #99CC33 ${o(.5)}, #D7DB0A ${o(1)})`,this._loadingBar.style.backgroundAttachment="fixed",this._loadingBar.style.width="0%",this._loadingBar.style.height="100%",this._loadingTextContainer=document.createElement("div"),this._loadingTextContainer.style.display="flex",this._loadingTextContainer.style.justifyContent="center",this._loadingTextContainer.style.marginTop="1.2em",this._loadingElement.appendChild(this._loadingTextContainer);const s=document.createElement("div");return this._messageContainer=s,s.style.display="flex",s.style.fontSize=".8em",s.style.paddingTop=".5em",s.style.color="rgba(255,255,255,.5)",s.style.fontWeight="200",s.style.fontFamily="Roboto, sans-serif",s.style.justifyContent="center",this._loadingElement.appendChild(s),this._loadingElement}};let ZD=Xu;Q(ZD,"LoadingContainerClassName","loading");const $y=new WeakMap;class AS extends Ze{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,e){const t=new re(this.manager);t.setPath(this.path),t.setResponseType("arraybuffer"),t.setRequestHeader(this.requestHeader),t.setWithCredentials(this.withCredentials),t.load(A,C=>{this.decodeDracoFile(C,g).catch(e)},I,e)}decodeDracoFile(A,g,I,e){const t={attributeIDs:I||this.defaultAttributeIDs,attributeTypes:e||this.defaultAttributeTypes,useUniqueIDs:!!I};return this.decodeGeometry(A,t).then(g)}decodeGeometry(A,g){const I=JSON.stringify(g);if($y.has(A)){const s=$y.get(A);if(s.key===I)return s.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 e;const t=this.workerNextTaskID++,C=A.byteLength,o=this._getWorker(t,C).then(s=>(e=s,new Promise((n,B)=>{e._callbacks[t]={resolve:n,reject:B},e.postMessage({type:"decode",id:t,taskConfig:g,buffer:A},[A])}))).then(s=>this._createGeometry(s.geometry));return o.catch(()=>!0).then(()=>{e&&t&&this._releaseTask(e,t)}),$y.set(A,{key:I,promise:o}),o}_createGeometry(A){const g=new lg;A.index&&g.setIndex(new Qg(A.index.array,1));for(let I=0;I<A.attributes.length;I++){const e=A.attributes[I],t=e.name,C=e.array,o=e.itemSize;g.setAttribute(t,new Qg(C,o))}return g}_loadLibrary(A,g){const I=new re(this.manager);return I.setPath(this.decoderPath),I.setResponseType(g),I.setWithCredentials(this.withCredentials),new Promise((e,t)=>{I.load(A,e,void 0,t)})}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 e=I[0];A||(this.decoderConfig.wasmBinary=I[1]);const t=X1.toString(),C=["/* draco decoder */",e,"","/* worker */",t.substring(t.indexOf("{")+1,t.lastIndexOf("}"))].join(`
3829
+ #endif`),ZA.lightmap.lightmapScaleOffset={value:new ng(1,1,0,0)};const H1=cA("debugplayerview");var wo=(i=>(i.Browser="browser",i.Headset="headset",i.Handheld="handheld",i))(wo||{});class T1{constructor(A,g){Q(this,"userId");Q(this,"context");Q(this,"viewDevice","browser");Q(this,"removed",!1);Q(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 O1{constructor(A){Q(this,"context");Q(this,"playerViews",new Map);this.context=A}setPlayerView(A,g,I){let e=this.playerViews.get(A);e||(e=new T1(A,this.context),this.playerViews.set(A,e)),e.viewDevice=I,e.currentObject=g,e.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&&(H1&&console.log("REMOVE",A),I.removed=!0,this.playerViews.delete(A))}}const _1=cA("debugSetup"),P1=cA("stats"),W1=cA("debugactive"),j1=cA("debugframerate");var ki=(i=>(i[i.EarlyUpdate=0]="EarlyUpdate",i[i.Update=1]="Update",i[i.LateUpdate=2]="LateUpdate",i[i.OnBeforeRender=3]="OnBeforeRender",i[i.OnAfterRender=4]="OnAfterRender",i[i.PrePhysicsStep=9]="PrePhysicsStep",i[i.PostPhysicsStep=10]="PostPhysicsStep",i[i.Undefined=-1]="Undefined",i))(ki||{}),jD=(i=>(i.ImmersiveVR="immersive-vr",i.ImmersiveAR="immersive-ar",i))(jD||{});function xF(i,A){if(!i)return;const g=(A==null?void 0:A.new_scripts)??bg.Current.new_scripts;g.includes(i)||g.push(i)}const Ii=class{constructor(A){Q(this,"name");Q(this,"alias");Q(this,"isManagedExternally",!1);Q(this,"isPaused",!1);Q(this,"runInBackground",!1);Q(this,"targetFrameRate");Q(this,"hash");Q(this,"domElement");Q(this,"_resolutionScaleFactor",1);Q(this,"_boundingClientRectFrame",-1);Q(this,"_boundingClientRect",null);Q(this,"_domX");Q(this,"_domY");Q(this,"xrSessionMode");Q(this,"_currentFrameEvent",-1);Q(this,"scene");Q(this,"renderer");Q(this,"composer",null);Q(this,"scripts",[]);Q(this,"scripts_pausedChanged",[]);Q(this,"scripts_earlyUpdate",[]);Q(this,"scripts_update",[]);Q(this,"scripts_lateUpdate",[]);Q(this,"scripts_onBeforeRender",[]);Q(this,"scripts_onAfterRender",[]);Q(this,"scripts_WithCorroutines",[]);Q(this,"coroutines",{});Q(this,"mainCameraComponent");Q(this,"post_setup_callbacks",[]);Q(this,"pre_update_callbacks",[]);Q(this,"pre_render_callbacks",[]);Q(this,"post_render_callbacks",[]);Q(this,"new_scripts",[]);Q(this,"new_script_start",[]);Q(this,"new_scripts_pre_setup_callbacks",[]);Q(this,"new_scripts_post_setup_callbacks",[]);Q(this,"application");Q(this,"time");Q(this,"input");Q(this,"physics");Q(this,"connection");Q(this,"assets");Q(this,"mainLight",null);Q(this,"rendererData");Q(this,"addressables");Q(this,"lightmaps");Q(this,"players");Q(this,"_sizeChanged",!1);Q(this,"_isCreated",!1);Q(this,"_isVisible",!1);Q(this,"_stats",P1?p1():null);Q(this,"_intersectionObserver",null);Q(this,"_disposeCallbacks",[]);Q(this,"_cameraStack",[]);Q(this,"_onBeforeRenderListeners",{});Q(this,"_requireDepthTexture",!1);Q(this,"_requireColorTexture",!1);Q(this,"_renderTarget");Q(this,"_isRendering",!1);Q(this,"_accumulatedTime",0);Q(this,"_framerateClock",new Rl);Q(this,"_wasPaused",!1);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):(this.renderer=new fn({antialias:!0}),this.renderer.toneMappingExposure=1,this.renderer.toneMapping=ei,this.renderer.setClearColor(new fA("lightgrey"),0),this.renderer.antialias=!0,this.renderer.alpha=!1,this.renderer.shadowMap.enabled=!0,this.renderer.shadowMap.type=wp,this.renderer.setSize(this.domWidth,this.domHeight),this.renderer.outputEncoding=gg,this.renderer.physicallyCorrectLights=!0),this.scene=new ct,Ue.register(this),this.application=new b1(this),this.time=new l_,this.input=new gO(this),this.physics=new Pn(this),this.connection=new m_(this),this.assets=new OO,this.rendererData=new M1(this),this.addressables=new q1(this),this.lightmaps=new Y1(this),this.players=new O1(this);const g=()=>this._sizeChanged=!0;window.addEventListener("resize",g),this._disposeCallbacks.push(()=>window.removeEventListener("resize",g));const I=new ResizeObserver(e=>this._sizeChanged=!0);I.observe(this.domElement),this._disposeCallbacks.push(()=>I.disconnect()),this._intersectionObserver=new IntersectionObserver(e=>{this._isVisible=e[0].isIntersecting}),this._disposeCallbacks.push(()=>{var e;return(e=this._intersectionObserver)==null?void 0:e.disconnect()})}static get Current(){return this._current}static set Current(A){Ue.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,I;if(!this.isManagedExternally&&((A=this.renderer.xr)==null?void 0:A.isPresenting)===!1){this._sizeChanged=!1;const e=this.resolutionScaleFactor,t=this.domWidth*e,C=this.domHeight*e,o=this.mainCamera;this.updateAspect(o),this.renderer.setSize(t,C),this.renderer.setPixelRatio(window.devicePixelRatio),this.renderer.domElement.style.width="100%",this.renderer.domElement.style.height="100%",this.composer&&((g=this.composer.setSize)==null||g.call(this.composer,t,C),"setPixelRatio"in this.composer&&typeof this.composer.setPixelRatio=="function"&&((I=this.composer.setPixelRatio)==null||I.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 e=A.aspect;A.aspect=g/I,e!==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 e of this._disposeCallbacks)try{e()}catch(t){console.error("Error in on dispose callback:",t,e)}(I=this.domElement)!=null&&I.parentElement&&this.domElement.parentElement.removeChild(this.domElement),Ue.dispatchCallback(oC.ContextDestroyed,this),Ue.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(e=>e.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 e=I.length-1;e>=0;e--)I[e].comp===A&&I.splice(e,1)}}setCurrentCamera(A){var e;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),(e=this.mainCameraComponent)==null||e.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=(e,t,C,o,s,n)=>{const B=this._onBeforeRenderListeners[A.uuid];if(B)for(let r=0;r<B.length;r++){const a=B[r];a(e,t,C,o,s,n)}};A.onBeforeRender=I}this._onBeforeRenderListeners[A.uuid].push(g)}removeBeforeRenderListener(A,g){if(this._onBeforeRenderListeners[A.uuid]){const I=this._onBeforeRenderListeners[A.uuid],e=I.indexOf(g);e>=0&&I.splice(e,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{Ii.Current=this,A&&await A(this,g)}catch(e){console.error(e),I=!1}if(I){this.internalOnUpdateVisible(),this.isManagedExternally||this.domElement.prepend(this.renderer.domElement),Ii._current=this,Ii._current=this;for(let e=0;e<this.new_scripts.length;e++){const t=this.new_scripts[e];if(t.gameObject!==void 0&&t.gameObject!==null){t.gameObject.userData===void 0&&(t.gameObject.userData={}),t.gameObject.userData.components===void 0&&(t.gameObject.userData.components=[]);const C=t.gameObject.userData.components;C.includes(t)||C.push(t)}}if(this.post_setup_callbacks)for(let e=0;e<this.post_setup_callbacks.length;e++)Ii._current=this,await this.post_setup_callbacks[e](this);if(!this.mainCamera){Ii._current=this;let e=null;Yn(this.scene,t=>{const C=t;if(C!=null&&C.isCamera){if(Wr(C.gameObject),!C.activeAndEnabled)return;if(C.tag==="MainCamera")return e=C,!0;e=C}}),e?this.setCurrentCamera(e):(Ue.dispatchCallback(oC.MissingCamera,this),!this.mainCamera&&!this.isManagedExternally&&console.error("MISSING camera",this))}if(Ii._current=this,Pr(this),!this.isManagedExternally&&this.composer&&this.mainCamera){const e=new PD(this.scene,this.mainCamera);this.renderer.setSize(this.domWidth,this.domHeight),this.composer.addPass(e),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)),_1&&Tf(this.scene,!0),Ue.dispatchCallback(oC.ContextCreated,this)}}render(A,g){var t,C;if(this._currentFrameEvent=-1,this.isInXR===!1&&this.targetFrameRate!==void 0){if(this._accumulatedTime+=this._framerateClock.getDelta(),this._accumulatedTime<1/this.targetFrameRate)return;this._accumulatedTime=0}if((t=this._stats)==null||t.begin(),Ii._current=this,this.onHandlePaused())return;for(Ii._current=this,this.time.update(),j1&&console.log("FPS",this.time.smoothedFps.toFixed(0)),Pr(this),_l(this.scene),FR(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 s=this.scripts_earlyUpdate[o];s.activeAndEnabled&&s.earlyUpdate!==void 0&&(Ii._current=this,s.earlyUpdate())}if(this.executeCoroutines(0),this.onHandlePaused())return;this._currentFrameEvent=1;for(let o=0;o<this.scripts_update.length;o++){const s=this.scripts_update[o];s.activeAndEnabled&&s.update!==void 0&&(Ii._current=this,s.update())}if(this.executeCoroutines(1),this.onHandlePaused())return;this._currentFrameEvent=2;for(let o=0;o<this.scripts_lateUpdate.length;o++){const s=this.scripts_lateUpdate[o];s.activeAndEnabled&&s.lateUpdate!==void 0&&(Ii._current=this,s.lateUpdate())}if(this.executeCoroutines(2),this.onHandlePaused())return;const I=1,e=this.time.deltaTime/I;for(let o=0;o<I;o++)this._currentFrameEvent=9,this.executeCoroutines(9),this.physics.step(e),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 s=this.scripts_onBeforeRender[o];s.activeAndEnabled&&s.onBeforeRender!==void 0&&(Ii._current=this,s.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||(hO(this),this._currentFrameEvent=-1,this.renderNow(),this._currentFrameEvent=4);for(let o=0;o<this.scripts_onAfterRender.length;o++){const s=this.scripts_onAfterRender[o];s.activeAndEnabled&&s.onAfterRender!==void 0&&(Ii._current=this,s.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(),this.time.frame===1&&this.domElement.dispatchEvent(new CustomEvent("ready"))}}renderNow(A){return!A&&(A=this.mainCamera,!A)?!1:(this._isRendering=!0,this.renderRequiredTextures(),this.composer&&!this.isInXR?this.composer.render(this.time.deltaTime):A&&this.renderer.render(this.scene,A),this._isRendering=!1,!0)}onHandlePaused(){const A=this.evaluatePaused();if(this._wasPaused!==A){W1&&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&&(Ii._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 II(this.domWidth,this.domHeight),this._requireDepthTexture){const I=new Il(this.domWidth,this.domHeight);this._renderTarget.depthTexture=I}this._requireColorTexture&&(this._renderTarget.texture=new qg,this._renderTarget.texture.generateMipmaps=!1,this._renderTarget.texture.minFilter=Zg,this._renderTarget.texture.magFilter=Zg,this._renderTarget.texture.format=dI)}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 e=0;e<I.length;e++)try{const t=I[e];if(!t.comp||t.comp.destroyed||!t.main||t.comp.enabled===!1){I.splice(e,1),--e;continue}const o=t.chained;if(o&&o.length>0){const r=o[o.length-1].next();if(r.done&&o.pop(),g(r)&&(t.chained||(t.chained=[]),t.chained.push(r.value)),!r.done)continue}const s=t.main.next();if(s.done===!0){I.splice(e,1),--e;continue}const n=s.value;if(g(n)){if(n.next().done)continue;t.chained||(t.chained=[]),t.chained.push(n)}}catch(t){console.error(t)}}function g(I){return!!(I&&I.next&&I.return)}}};let bg=Ii;Q(bg,"_current");const Z1=cA("debugaroverlay"),jn="ar",YF="quit-ar";class z1{constructor(){Q(this,"arContainer",null);Q(this,"closeARCallback");Q(this,"currentSession",null);Q(this,"registeredCloseEventElements",[]);Q(this,"_createdAROnlyElements",[]);Q(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(`.${jn}`).forEach(C=>{var o;C&&C!==this.arContainer&&(this._reparentedObjects.push({el:C,previousParent:C.parentElement}),(o=this.arContainer)==null||o.appendChild(C))});const t=g.getElementsByClassName(YF);if(!t||t.length<=0)console.warn(`Missing quit AR elements, creating fallback X button. Use class name '${YF}' to override.`),this.createFallbackCloseARButton(this.arContainer);else for(let C=0;C<t.length;C++){const o=t[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 e=I.el;(g=I.previousParent)==null||g.appendChild(e)}this._reparentedObjects.length=0,Ep()&&setTimeout(()=>{const I=A.renderer.domElement;I&&A.domElement.insertBefore(I,A.domElement.firstChild);const e=document.querySelectorAll("*");for(var t=0;t<e.length;t++){const C=e[t];C&&C._displayChanged!==void 0&&C._displayWas!==void 0&&(C.style.display=C._displayWas)}},10)}findOrCreateARContainer(A){if(A.classList.contains(jn))return A;if(A.children)for(let e=0;e<A.children.length;e++){const t=A.children[e];if(!(!t||!t.classList)&&t.classList.contains(jn))return t}const g=document.getElementsByClassName(jn);if(g&&g.length>0)return g[0];Z1&&console.log("No overlay container found in document - generating new ony");const I=document.createElement("div");return I.classList.add(jn),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);Q(this,"guid")}static isDestroyed(g){return Iy(g)}static setActive(g,I,e=!0){g&&(IE(g,I),_l(g),I&&e&&FR(bg.Current,g))}static isActiveSelf(g){return Fa(g)}static isActiveInHierarchy(g){return om(g)}static markAsInstancedRendered(g,I){sm(g,I)}static isUsingInstancing(g){return ID(g)}static foreachComponent(g,I,e=!0){return Yn(g,I,e)}static instantiateSynced(g,I){return g?HR(g,I):null}static instantiate(g,I=null){return iE(g,I)}static destroySynced(g,I,e=!0){if(!g)return;const t=g;I=I??bg.Current,Wf(t,I.connection,e)}static destroy(g,I=!0,e=!0){return Ds(g,I,e)}static add(g,I,e){if(!(!g||!I)){if(g===I){console.warn("Can not add object to self",g);return}e||(e=bg.Current),I.add(g),IE(g,!0),_l(g),e?sA.foreachComponent(g,t=>{NR(t,e),!t.__internalDidAwakeAndStart&&e.new_script_start.includes(t)===!1&&e.new_script_start.push(t)},!0):console.warn("Missing context")}}static remove(g){var I;g&&((I=g.parent)==null||I.remove(g),IE(g,!1),_l(g),sA.foreachComponent(g,e=>{EO(e)},!0))}static invokeOnChildren(g,I,...e){this.invoke(g,I,!0,e)}static invoke(g,I,e=!1,...t){g&&this.foreachComponent(g,C=>{const o=C[I];o&&typeof o=="function"&&(o==null||o.call(C,...t))},e)}static addNewComponent(g,I,e=!0){const t=new I;return ls(g,t,e),t}static addComponent(g,I){return this.moveComponent(g,I)}static moveComponent(g,I){if(I.gameObject==null)throw new Error("Did you mean to create a new component? Use addNewComponent");PR(g,I)}static removeComponent(g){return Vf(g.gameObject,g),g}static getOrAddComponent(g,I){return Xf(g,I)}static getComponent(g,I){return g===null?null:Ua(g,I)}static getComponents(g,I,e=null){return g===null?e??[]:jr(g,I,e)}static findByGuid(g,I){return eE(g,I)}static findObjectOfType(g,I,e=!0){return zR(g,I??bg.Current,e)}static findObjectsOfType(g,I){const e=[];return VR(g,e,I),e}static getComponentInChildren(g,I){return Ra(g,I)}static getComponentsInChildren(g,I,e=null){return Zr(g,I,e??void 0)}static getComponentInParent(g,I){return zr(g,I)}static getComponentsInParent(g,I,e=null){return Zl(g,I,e)}static getAllComponents(g){var t;return[...(t=g.userData)==null?void 0:t.components]}static*iterateComponents(g){var e;const I=(e=g==null?void 0:g.userData)==null?void 0:e.components;if(I&&Array.isArray(I))for(let t=0;t<I.length;t++)yield I[t]}}let fE=(vI=class{constructor(){Q(this,"__context");Q(this,"__name");Q(this,"gameObject");Q(this,"guid","invalid");Q(this,"sourceId");Q(this,"__didAwake",!1);Q(this,"__didStart",!1);Q(this,"__didEnable",!1);Q(this,"__isEnabled");Q(this,"__destroyed",!1);Q(this,"_worldPosition");Q(this,"_worldQuaternion");Q(this,"_worldEuler");Q(this,"_worldRotation");Q(this,"_eventListeners",new Map);this.__internalNewInstanceCreated()}get isComponent(){return!0}get context(){return this.__context??bg.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[cs];return A===void 0?!0:A}set __isActiveInHierarchy(A){this.gameObject&&(this.gameObject[cs]=A)}awake(){}onEnable(){}onDisable(){}onDestroy(){this.__destroyed=!0}startCoroutine(A,g=ki.Update){return this.context.registerCoroutineUpdate(this,A,g)}stopCoroutine(A,g=ki.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),WR(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),fg(this.gameObject,this._worldPosition),this._worldPosition}set worldPosition(A){Fe(this.gameObject,A)}setWorldPosition(A,g,I){vI._worldPositionBuffer.set(A,g,I),this.worldPosition=vI._worldPositionBuffer}get worldQuaternion(){return this._worldQuaternion||(this._worldQuaternion=new RA),Wi(this.gameObject,this._worldQuaternion)}set worldQuaternion(A){hC(this.gameObject,A)}setWorldQuaternion(A,g,I,e){vI._worldQuaternionBuffer.set(A,g,I,e),this.worldQuaternion=vI._worldQuaternionBuffer}get worldEuler(){return this._worldEuler||(this._worldEuler=new $I),this._worldEuler.setFromQuaternion(this.worldQuaternion),this._worldEuler}set worldEuler(A){var g;this._worldQuaternion||(this._worldQuaternion=new RA),(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=Ig.toDegrees(g.x),g.y=Ig.toDegrees(g.y),g.z=Ig.toDegrees(g.z),g}set worldRotation(A){this.setWorldRotation(A.x,A.y,A.z,!0)}setWorldRotation(A,g,I,e=!0){e&&(A=Ig.toRadians(A),g=Ig.toRadians(g),I=Ig.toRadians(I)),vI._worldEulerBuffer.set(A,g,I),vI._worldQuaternionBuffer.setFromEuler(vI._worldEulerBuffer),this.worldQuaternion=vI._worldQuaternionBuffer}get forward(){return vI._forward.set(0,0,-1).applyQuaternion(this.worldQuaternion)}get right(){return vI._right.set(1,0,0).applyQuaternion(this.worldQuaternion)}get up(){return vI._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}},Q(vI,"_worldPositionBuffer",new M),Q(vI,"_worldQuaternionBuffer",new RA),Q(vI,"_worldEulerBuffer",new $I),Q(vI,"_tempQuaternionBuffer2",new RA),Q(vI,"_forward",new M),Q(vI,"_right",new M),Q(vI,"_up",new M),vI);class OA extends fE{}const V1=Object.freeze(Object.defineProperty({__proto__:null,Behaviour:OA,Component:fE,GameObject:sA},Symbol.toStringTag,{value:"Module"})),HF="data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZG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HJlZj0iI25lZWRsZS1pY29uIi8+PC9zdmc+",Zn=cA("debugloadingbar"),Xy=cA("debugloadingbarrendering");let yE=0,TF;function OF(i){Zn&&console.log(i.progress.loaded.toFixed(0)+"/"+i.progress.total.toFixed(0),i);const A=i.count,g=i.progress.total;g===0||g===void 0?(TF!==i.name&&(yE=0),TF=i.name,yE+=(1-yE)*.001,Zn&&cC("Loading "+i.name+" did not report total size")):yE=i.progress.loaded/g;const I=i.index/A+yE/A;return Ig.clamp01(I)}const Xu=class{constructor(A,g){Q(this,"loadingProgress",0);Q(this,"container");Q(this,"_progress",0);Q(this,"_allowCustomLoadingElement",!0);Q(this,"_loadingElement");Q(this,"_loadingTextContainer",null);Q(this,"_loadingBar",null);Q(this,"_messageContainer",null);Q(this,"_loadingElementOptions");Q(this,"_progressLoop");this.container=A,this._loadingElementOptions=g}onLoadingBegin(A){if(Zn&&console.log("Begin Loading"),!this._loadingElement){for(let g=0;g<this.container.children.length;g++){const I=this.container.children[g];if(I.classList.contains(Xu.LoadingContainerClassName)){if(!this._allowCustomLoadingElement){Zn&&console.warn("Remove custom loading container"),this.container.removeChild(I);continue}this._loadingElement=this.createLoadingElement(I)}}this._loadingElement||(this._loadingElement=this.createLoadingElement())}this._progress=0,this.loadingProgress=0,this._loadingElement.style.display="flex",this.container.appendChild(this._loadingElement),this.smoothProgressLoop(),this.setMessage(A??"")}onLoadingUpdate(A,g){var e;(e=this._loadingElement)!=null&&e.parentElement||this.onLoadingBegin(g);let I=0;typeof A=="number"?I=A:("index"in A&&(I=OF(A)),!g&&"name"in A&&this.setMessage("loading "+A.name)),this.loadingProgress=I,g&&this.setMessage(g),this.updateDisplay()}onLoadingFinished(){Zn&&console.warn("Finished Loading"),this.loadingProgress=1,this.onDoneLoading()}setMessage(A){this._messageContainer&&(this._messageContainer.innerText=A)}smoothProgressLoop(){if(this._progressLoop)return;let A=1/12;Xy&&(A=1/500,typeof Xy=="number"&&(A*=Xy)),this._progressLoop=setInterval(()=>{this.loadingProgress>=.95&&(A=.9),this._progress=Ig.lerp(this._progress,this.loadingProgress,A*this.loadingProgress),this.updateDisplay()},A)}onDoneLoading(){this._loadingElement&&(Zn&&console.log("Hiding loading element"),this._loadingElement.style.display="none",this._loadingElement.remove()),this._progressLoop&&clearInterval(this._progressLoop),this._progressLoop=null}updateDisplay(){const A=this._progress,g=(A*100).toFixed(0)+"%";this._loadingBar&&(this._loadingBar.style.width=A*100+"%"),this._loadingTextContainer&&(this._loadingTextContainer.textContent=g)}createLoadingElement(A){var n,B;Zn&&!A&&console.log("Creating loading element"),this._loadingElement=A||document.createElement("div"),A||(this._loadingElement.style.position="fixed",this._loadingElement.style.width="100%",this._loadingElement.style.height="100%",this._loadingElement.style.left="0",this._loadingElement.style.top="0",this._loadingElement.style.backgroundColor="#000000",this._loadingElement.style.display="flex",this._loadingElement.style.alignItems="center",this._loadingElement.style.justifyContent="center",this._loadingElement.style.zIndex="1000",this._loadingElement.style.flexDirection="column",this._loadingElement.style.pointerEvents="none",this._loadingElement.style.color="white");const g=((n=this._loadingElementOptions)==null?void 0:n.className)??Xu.LoadingContainerClassName;if(this._loadingElement.classList.add(g),(B=this._loadingElementOptions)!=null&&B.additionalClasses)for(const r of this._loadingElementOptions.additionalClasses)this._loadingElement.classList.add(r);const I=document.createElement("div"),e=30;I.style.display="flex",I.style.width=e+"%",I.style.height="2px",I.style.background="rgba(255,255,255,.2)",this._loadingElement.appendChild(I);const t=document.createElement("img"),C=64;t.style.width=`${C}px`,t.style.height=`${C}px`,t.style.position="absolute",t.style.left="50%",t.style.transform=`translate(-${C*.5}px, -${C+32}px)`,t.addEventListener("click",()=>window.open("https://needle.tools","_blank")),t.style.cursor="pointer",t.style.userSelect="none",t.style.pointerEvents="all",t.src=HF,I.appendChild(t),this._loadingBar=document.createElement("div"),I.appendChild(this._loadingBar);const o=function(r){return Ig.lerp(e*.5,100-e*.5,r)+"%"};this._loadingBar.style.background=`linear-gradient(90deg, #02022B ${o(0)}, #0BA398 ${o(.4)}, #99CC33 ${o(.5)}, #D7DB0A ${o(1)})`,this._loadingBar.style.backgroundAttachment="fixed",this._loadingBar.style.width="0%",this._loadingBar.style.height="100%",this._loadingTextContainer=document.createElement("div"),this._loadingTextContainer.style.display="flex",this._loadingTextContainer.style.justifyContent="center",this._loadingTextContainer.style.marginTop="1.2em",this._loadingElement.appendChild(this._loadingTextContainer);const s=document.createElement("div");return this._messageContainer=s,s.style.display="flex",s.style.fontSize=".8em",s.style.paddingTop=".5em",s.style.color="rgba(255,255,255,.5)",s.style.fontWeight="200",s.style.fontFamily="Roboto, sans-serif",s.style.justifyContent="center",this._loadingElement.appendChild(s),this._loadingElement}};let ZD=Xu;Q(ZD,"LoadingContainerClassName","loading");const $y=new WeakMap;class AS extends Ze{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,e){const t=new re(this.manager);t.setPath(this.path),t.setResponseType("arraybuffer"),t.setRequestHeader(this.requestHeader),t.setWithCredentials(this.withCredentials),t.load(A,C=>{this.decodeDracoFile(C,g).catch(e)},I,e)}decodeDracoFile(A,g,I,e){const t={attributeIDs:I||this.defaultAttributeIDs,attributeTypes:e||this.defaultAttributeTypes,useUniqueIDs:!!I};return this.decodeGeometry(A,t).then(g)}decodeGeometry(A,g){const I=JSON.stringify(g);if($y.has(A)){const s=$y.get(A);if(s.key===I)return s.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 e;const t=this.workerNextTaskID++,C=A.byteLength,o=this._getWorker(t,C).then(s=>(e=s,new Promise((n,B)=>{e._callbacks[t]={resolve:n,reject:B},e.postMessage({type:"decode",id:t,taskConfig:g,buffer:A},[A])}))).then(s=>this._createGeometry(s.geometry));return o.catch(()=>!0).then(()=>{e&&t&&this._releaseTask(e,t)}),$y.set(A,{key:I,promise:o}),o}_createGeometry(A){const g=new lg;A.index&&g.setIndex(new Qg(A.index.array,1));for(let I=0;I<A.attributes.length;I++){const e=A.attributes[I],t=e.name,C=e.array,o=e.itemSize;g.setAttribute(t,new Qg(C,o))}return g}_loadLibrary(A,g){const I=new re(this.manager);return I.setPath(this.decoderPath),I.setResponseType(g),I.setWithCredentials(this.withCredentials),new Promise((e,t)=>{I.load(A,e,void 0,t)})}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 e=I[0];A||(this.decoderConfig.wasmBinary=I[1]);const t=X1.toString(),C=["/* draco decoder */",e,"","/* worker */",t.substring(t.indexOf("{")+1,t.lastIndexOf("}"))].join(`
3830
3830
  `);this.workerSourceURL=URL.createObjectURL(new Blob([C]))}),this.decoderPending}_getWorker(A,g){return this._initDecoder().then(()=>{if(this.workerPool.length<this.workerLimit){const e=new Worker(this.workerSourceURL);e._callbacks={},e._taskCosts={},e._taskLoad=0,e.postMessage({type:"init",decoderConfig:this.decoderConfig}),e.onmessage=function(t){const C=t.data;switch(C.type){case"decode":e._callbacks[C.id].resolve(C);break;case"error":e._callbacks[C.id].reject(C);break;default:console.error('THREE.DRACOLoader: Unexpected message, "'+C.type+'"')}},this.workerPool.push(e)}else this.workerPool.sort(function(e,t){return e._taskLoad>t._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 X1(){let i,A;onmessage=function(C){const o=C.data;switch(o.type){case"init":i=o.decoderConfig,A=new Promise(function(B){i.onModuleLoaded=function(r){B({draco:r})},DracoDecoderModule(i)});break;case"decode":const s=o.buffer,n=o.taskConfig;A.then(B=>{const r=B.draco,a=new r.Decoder,E=new r.DecoderBuffer;E.Init(new Int8Array(s),s.byteLength);try{const c=g(r,a,E,n),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{r.destroy(E),r.destroy(a)}});break}};function g(C,o,s,n){const B=n.attributeIDs,r=n.attributeTypes;let a,E;const c=o.GetEncodedGeometryType(s);if(c===C.TRIANGULAR_MESH)a=new C.Mesh,E=o.DecodeBufferToMesh(s,a);else if(c===C.POINT_CLOUD)a=new C.PointCloud,E=o.DecodeBufferToPointCloud(s,a);else throw new Error("THREE.DRACOLoader: Unexpected geometry type.");if(!E.ok()||a.ptr===0)throw new Error("THREE.DRACOLoader: Decoding failed: "+E.error_msg());const h={index:null,attributes:[]};for(const l in B){const u=self[r[l]];let w,D;if(n.useUniqueIDs)D=B[l],w=o.GetAttributeByUniqueId(a,D);else{if(D=o.GetAttributeId(a,C[B[l]]),D===-1)continue;w=o.GetAttribute(a,D)}h.attributes.push(e(C,o,a,l,u,w))}return c===C.TRIANGULAR_MESH&&(h.index=I(C,o,a)),C.destroy(a),h}function I(C,o,s){const B=s.num_faces()*3,r=B*4,a=C._malloc(r);o.GetTrianglesUInt32Array(s,r,a);const E=new Uint32Array(C.HEAPF32.buffer,a,B).slice();return C._free(a),{array:E,itemSize:1}}function e(C,o,s,n,B,r){const a=r.num_components(),c=s.num_points()*a,h=c*B.BYTES_PER_ELEMENT,l=t(C,B),u=C._malloc(h);o.GetAttributeDataArrayForAllPoints(s,r,l,h,u);const w=new B(C.HEAPF32.buffer,u,c).slice();return C._free(u),{name:n,array:w,itemSize:a}}function t(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 $1{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:e,msg:t,transfer:C}=this.queue.shift();this.workersResolve[A]=e,this.workers[A].postMessage(t,C)}else this.workerStatus^=1<<A}setWorkerCreator(A){this.workerCreator=A}setWorkerLimit(A){this.pool=A}postMessage(A,g){return new Promise(I=>{const e=this._getIdleWorker();e!==-1?(this._initWorker(e),this.workerStatus|=1<<e,this.workersResolve[e]=I,this.workers[e].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 A3=0,g3=2,I3=1,e3=2,i3=0,_F=9,gS=15,PF=16,IS=22,WF=37,eS=43,jF=76,ZF=83,zF=97,VF=100,XF=103,$F=109;class t3{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 SE{constructor(A,g,I,e){this._dataView=new DataView(A.buffer,A.byteOffset+g,I),this._littleEndian=e,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 e=0;for(;this._dataView.getUint8(this._offset)!==g&&e<A;)e++,this._offset++;return e<A&&this._offset++,new Uint8Array(this._dataView.buffer,this._dataView.byteOffset+I,e)}}const ni=[171,75,84,88,32,50,48,187,13,10,26,10];function AN(i){return typeof TextDecoder<"u"?new TextDecoder().decode(i):Buffer.from(i).toString("utf8")}function C3(i){const A=new Uint8Array(i.buffer,i.byteOffset,ni.length);if(A[0]!==ni[0]||A[1]!==ni[1]||A[2]!==ni[2]||A[3]!==ni[3]||A[4]!==ni[4]||A[5]!==ni[5]||A[6]!==ni[6]||A[7]!==ni[7]||A[8]!==ni[8]||A[9]!==ni[9]||A[10]!==ni[10]||A[11]!==ni[11])throw new Error("Missing KTX 2.0 identifier.");const g=new t3,I=17*Uint32Array.BYTES_PER_ELEMENT,e=new SE(i,ni.length,I,!0);g.vkFormat=e._nextUint32(),g.typeSize=e._nextUint32(),g.pixelWidth=e._nextUint32(),g.pixelHeight=e._nextUint32(),g.pixelDepth=e._nextUint32(),g.layerCount=e._nextUint32(),g.faceCount=e._nextUint32();const t=e._nextUint32();g.supercompressionScheme=e._nextUint32();const C=e._nextUint32(),o=e._nextUint32(),s=e._nextUint32(),n=e._nextUint32(),B=e._nextUint64(),r=e._nextUint64(),a=new SE(i,ni.length+I,3*t*8,!0);for(let _=0;_<t;_++)g.levels.push({levelData:new Uint8Array(i.buffer,i.byteOffset+a._nextUint64(),a._nextUint64()),uncompressedByteLength:a._nextUint64()});const E=new SE(i,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 _=0;_<h;_++){const W={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&W.channelType?(W.sampleLower=E._nextInt32(),W.sampleUpper=E._nextInt32()):(W.sampleLower=E._nextUint32(),W.sampleUpper=E._nextUint32()),c.samples[_]=W}g.dataFormatDescriptor.length=0,g.dataFormatDescriptor.push(c);const l=new SE(i,s,n,!0);for(;l._offset<n;){const _=l._nextUint32(),W=l._scan(_),IA=AN(W),EA=l._scan(_-W.byteLength);g.keyValue[IA]=IA.match(/^ktx/i)?AN(EA):EA,l._offset%4&&l._skip(4-l._offset%4)}if(r<=0)return g;const u=new SE(i,B,r,!0),w=u._nextUint16(),D=u._nextUint16(),d=u._nextUint32(),p=u._nextUint32(),f=u._nextUint32(),S=u._nextUint32(),y=[];for(let _=0;_<t;_++)y.push({imageFlags:u._nextUint32(),rgbSliceByteOffset:u._nextUint32(),rgbSliceByteLength:u._nextUint32(),alphaSliceByteOffset:u._nextUint32(),alphaSliceByteLength:u._nextUint32()});const G=B+u._offset,k=G+d,F=k+p,J=F+f,N=new Uint8Array(i.buffer,i.byteOffset+G,d),K=new Uint8Array(i.buffer,i.byteOffset+k,p),x=new Uint8Array(i.buffer,i.byteOffset+F,f),O=new Uint8Array(i.buffer,i.byteOffset+J,S);return g.globalData={endpointCount:w,selectorCount:D,imageDescs:y,endpointsData:N,selectorsData:K,tablesData:x,extendedData:O},g}let iS,fo,tS;const CS={env:{emscripten_notify_memory_growth:function(i){tS=new Uint8Array(fo.exports.memory.buffer)}}};class o3{init(){return iS||(iS=typeof fetch<"u"?fetch("data:application/wasm;base64,"+gN).then(A=>A.arrayBuffer()).then(A=>WebAssembly.instantiate(A,CS)).then(this._init):WebAssembly.instantiate(Buffer.from(gN,"base64"),CS).then(this._init),iS)}_init(A){fo=A.instance,CS.env.emscripten_notify_memory_growth(0)}decode(A,g=0){if(!fo)throw new Error("ZSTDDecoder: Await .init() before decoding.");const I=A.byteLength,e=fo.exports.malloc(I);tS.set(A,e),g=g||Number(fo.exports.ZSTD_findDecompressedSize(e,I));const t=fo.exports.malloc(g),C=fo.exports.ZSTD_decompress(t,g,e,I),o=tS.slice(t,t+C);return fo.exports.free(e),fo.exports.free(t),o}}const gN="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/AX4CJwEDZW52H2Vtc2NyaXB0ZW5fbm90aWZ5X21lbW9yeV9ncm93dGgABANpaAEFAAAFAgEFCwACAQABAgIFBQcAAwABDgsBAQcAEhMHAAUBDAQEAAANBwQCAgYCBAgDAwMDBgEACQkHBgICAAYGAgQUBwY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DIARBfGoiBEEDSw0ACyACQQNxIQILIAJFDQADQCADIAEtAAA6AAAgA0EBaiEDIAFBAWohASACQX9qIgINAAsLIAAL8wICAn8BfgJAIAJFDQAgACACaiIDQX9qIAE6AAAgACABOgAAIAJBA0kNACADQX5qIAE6AAAgACABOgABIANBfWogAToAACAAIAE6AAIgAkEHSQ0AIANBfGogAToAACAAIAE6AAMgAkEJSQ0AIABBACAAa0EDcSIEaiIDIAFB/wFxQYGChAhsIgE2AgAgAyACIARrQXxxIgRqIgJBfGogATYCACAEQQlJDQAgAyABNgIIIAMgATYCBCACQXhqIAE2AgAgAkF0aiABNgIAIARBGUkNACADIAE2AhggAyABNgIUIAMgATYCECADIAE2AgwgAkFwaiABNgIAIAJBbGogATYCACACQWhqIAE2AgAgAkFkaiABNgIAIAQgA0EEcUEYciIEayICQSBJDQAgAa0iBUIghiAFhCEFIAMgBGohAQNAIAEgBTcDGCABIAU3AxAgASAFNwMIIAEgBTcDACABQSBqIQEgAkFgaiICQR9LDQALCyAACy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAIajYCACADCy8BAn8gACgCBCAAKAIAQQJ0aiICLQACIQMgACACLwEAIAEgAi0AAxAFajYCACADCx8AIAAgASACKAIEEAg2AgAgARAEGiAAIAJBCGo2AgQLCAAgAGdBH3MLugUBDX8jAEEQayIKJAACfyAEQQNNBEAgCkEANgIMIApBDGogAyAEEAsaIAAgASACIApBDGpBBBAVIgBBbCAAEAMbIAAgACAESxsMAQsgAEEAIAEoAgBBAXRBAmoQECENQVQgAygAACIGQQ9xIgBBCksNABogAiAAQQVqNgIAIAMgBGoiAkF8aiEMIAJBeWohDiACQXtqIRAgAEEGaiELQQQhBSAGQQR2IQRBICAAdCIAQQFyIQkgASgCACEPQQAhAiADIQYCQANAIAlBAkggAiAPS3JFBEAgAiEHAkAgCARAA0AgBEH//wNxQf//A0YEQCAHQRhqIQcgBiAQSQR/IAZBAmoiBigAACAFdgUgBUEQai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MgAiEEA0AgAyAEEAwgBEEIaiEEIANBCGoiAyABSQ0ACwwCCwNAIAAgAhAHIAJBEGohAiAAQRBqIgAgAUkNAAsMAwsgACEDIAIhBANAIAMgBBAHIARBEGohBCADQRBqIgMgAUkNAAsLIAIgASAAa2ohAgsDQCABIAVPDQEgASACLQAAOgAAIAFBAWohASACQQFqIQIMAAALAAsLQQECfyAAIAAoArjgASIDNgLE4AEgACgCvOABIQQgACABNgK84AEgACABIAJqNgK44AEgACABIAQgA2tqNgLA4AELpgEBAX8gACAAKALs4QEQFjYCyOABIABCADcD+OABIABCADcDuOABIABBwOABakIANwMAIABBqNAAaiIBQYyAgOAANgIAIABBADYCmOIBIABCADcDiOEBIABCAzcDgOEBIABBrNABakHgEikCADcCACAAQbTQAWpB6BIoAgA2AgAgACABNgIMIAAgAEGYIGo2AgggACAAQaAwajYCBCAAIABBEGo2AgALYQEBf0G4fyEDAkAgAUEDSQ0AIAIgABAhIgFBA3YiADYCCCACIAFBAXE2AgQgAiABQQF2QQNxIgM2AgACQCADQX9qIgFBAksNAAJAIAFBAWsOAgEAAgtBbA8LIAAhAwsgAwsMACAAIAEgAkEAEC4LiAQCA38CfiADEBYhBCAAQQBBKBAQIQAgBCACSwRAIAQPCyABRQRAQX8PCwJAAkAgA0EBRg0AIAEoAAAiBkGo6r5pRg0AQXYhAyAGQXBxQdDUtMIBRw0BQQghAyACQQhJDQEgAEEAQSgQECEAIAEoAAQhASAAQQE2AhQgACABrTcDAEEADwsgASACIAMQLyIDIAJLDQAgACADNgIYQXIhAyABIARqIgVBf2otAAAiAkEIcQ0AIAJBIHEiBkUEQEFwIQMgBS0AACIFQacBSw0BIAVBB3GtQgEgBUEDdkEKaq2GIgdCA4h+IAd8IQggBEEBaiEECyACQQZ2IQMgAkECdiEFAkAgAkEDcUF/aiICQQJLBEBBACECDAELAkACQAJAIAJBAWsOAgECAAsgASAEai0AACECIARBAWohBAwCCyABIARqLwAAIQIgBEECaiEEDAELIAEgBGooAAAhAi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EAcgAkERTwRAIARBEGohAgNAIAIgCkEQaiIKEAcgAkEQaiICIAhJDQALCyAIIAlrIQIgByATNgJcIAkgCCAOa0sEQCAJIAggEWtLBEBBbCELDAILIBAgAiAOayICaiIKIANqIBBNBEAgCCAKIAMQDxoMAgsgCCAKQQAgAmsQDyEIIAcgAiADaiIDNgJkIAggAmshCCAOIQILIAlBEE8EQCADIAhqIQMDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALDAELAkAgCUEHTQRAIAggAi0AADoAACAIIAItAAE6AAEgCCACLQACOgACIAggAi0AAzoAAyAIQQRqIAIgCUECdCIDQcAeaigCAGoiAhAXIAIgA0HgHmooAgBrIQIgBygCZCEDDAELIAggAhAMCyADQQlJDQAgAyAIaiEDIAhBCGoiCCACQQhqIgJrQQ9MBEADQCAIIAIQDCACQQhqIQIgCEEIaiIIIANJDQAMAgALAAsDQCAIIAIQByACQRBqIQIgCEEQaiIIIANJDQALCyAHQRhqEAQaIAsgDCALEAMiAhshDCAEIAQgC2ogAhshBCAFQX9qIgUNAAsgDBADDQFBbCEMIAdBGGoQBEECSQ0BQQAhCANAIAhBA0cEQCAAIAhBAnQiAmpBrNABaiACIAdqKAJENgIAIAhBAWohCAwBCwsgBygCXCEIC0G6fyEMIA8gCGsiACANIARrSw0AIAQEfyAEIAggABALIABqBUEACyABayEMCyAHQfAAaiQAIAwLkRcCFn8FfiMAQdABayIHJAAgByAAKALw4QEiCDYCvAEgASACaiESIAggACgCgOIBaiETAkACQCAFRQRAIAEhAwwBCyAAKALE4AEhESAAKALA4AEhFSAAKAK84AEhDyAAQQE2AozhAUEAIQgDQCAIQQNHBEAgByAIQQJ0IgJqIAAgAmpBrNABaigCADYCVCAIQQFqIQgMAQsLIAcgETYCZCAHIA82AmAgByABIA9rNgJoQWwhECAHQShqIAMgBBAGEAMNASAFQQQgBUEESBshFyAHQTxqIAdBKGogACgCABATIAdBxABqIAdBKGogACgCCBATIAdBzABqIAdBKGogACgCBBATQQAhBCAHQe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cgAEEANgIEIAAgAyABazYCACAAIAIgBmytIAcgB0J/URs3AwgLIARBQGskAAslAQF/IwBBEGsiAiQAIAIgACABEFEgAigCACEAIAJBEGokACAAC30BBH8jAEGQBGsiBCQAIARB/wE2AggCQCAEQRBqIARBCGogBEEMaiABIAIQFSIGEAMEQCAGIQUMAQtBVCEFIAQoAgwiB0EGSw0AIAMgBEEQaiAEKAIIIAcQQSIFEAMNACAAIAEgBmogAiAGayADEDwhBQsgBEGQBGokACAFC4cBAgJ/An5BABAWIQMCQANAIAEgA08EQAJAIAAoAABBcHFB0NS0wgFGBEAgACABECIiAhADRQ0BQn4PCyAAIAEQVSIEQn1WDQMgBCAFfCIFIARUIQJCfiEEIAINAyAAIAEQUiICEAMNAwsgASACayEBIAAgAmohAAwBCwtCfiAFIAEbIQQLIAQLPwIBfwF+IwBBMGsiAiQAAn5CfiACQQhqIAAgARAtDQAaQgAgAigCHEEBRg0AGiACKQMICyEDIAJBMGokACADC40BAQJ/IwBBMGsiASQAAkAgAEUNACAAKAKI4gENACABIABB/OEBaigCADYCKCABIAApAvThATcDICAAEDAgACgCqOIBIQIgASABKAIoNgIYIAEgASkDIDcDECACIAFBEGoQGyAAQQA2AqjiASABIAEoAig2AgggASABKQMgNwMAIAAgARAbCyABQTBqJAALKgECfyMAQRBrIgAkACAAQQA2AgggAEIANwMAIAAQWCEBIABBEGokACABC4cBAQN/IwBBEGsiAiQAAkAgACgCAEUgACgCBEVzDQAgAiAAKAIINgIIIAIgACkCADcDAAJ/IAIoAgAiAQRAIAIoAghBqOMJIAERBQAMAQtBqOMJECgLIgFFDQAgASAAKQIANwL04QEgAUH84QFqIAAoAgg2AgAgARBZIAEhAwsgAkEQaiQAIAMLywEBAn8jAEEgayIBJAAgAEGBgIDAADYCtOIBIABBADYCiOIBIABBADYC7OEBIABCADcDkOIBIABBADYCpOMJIABBADYC3OIBIABCADcCzOIBIABBADYCvOIBIABBADYCxOABIABCADcCnOIBIABBpOIBakIANwIAIABBrOIBak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lMAAAAAAAcGgwAAAAAACQYDAgAAEAAABAQAAAAAAAAEBQAAACAAAAUGAAAAAAAABQcAAAAgAAAFCQAAAAAAAAUKAAAAAAAABgwAAAAAAAAGDwAAAAAAAAYSAAAAAAAABhUAAAAAAAAGGAAAAAAAAAYbAAAAAAAABh4AAAAAAAAGIQAAAAAAAQYjAAAAAAABBicAAAAAAAIGKwAAAAAAAwYzAAAAAAAEBkMAAAAAAAUGYwAAAAAACAYDAQAAIAAABAQAAAAwAAAEBAAAABAAAAQFAAAAIAAABQcAAAAgAAAFCAAAACAAAAUKAAAAIAAABQsAAAAAAAAGDgAAAAAAAAYRAAAAAAAABhQAAAAAAAAGFwAAAAAAAAYaAAAAAAAABh0AAAAAAAAGIAAAAAAAEAYDAAEAAAAPBgOAAAAAAA4GA0AAAAAADQYDIAAAAAAMBgMQAAAAAAsGAwgAAAAACgYDBABBpB0L2QEBAAAAAwAAAAcAAAAPAAAAHwAAAD8AAAB/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",oS=new WeakMap;let sS=0,nS;class jt extends Ze{constructor(A){super(A),this.transcoderPath="",this.transcoderBinary=null,this.transcoderPending=null,this.workerPool=new $1,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 re(this.manager);A.setPath(this.transcoderPath),A.setWithCredentials(this.withCredentials);const g=A.loadAsync("basis_transcoder.js"),I=new re(this.manager);I.setPath(this.transcoderPath),I.setResponseType("arraybuffer"),I.setWithCredentials(this.withCredentials);const e=I.loadAsync("basis_transcoder.wasm");this.transcoderPending=Promise.all([g,e]).then(([t,C])=>{const o=jt.BasisWorker.toString(),s=["/* constants */","let _EngineFormat = "+JSON.stringify(jt.EngineFormat),"let _TranscoderFormat = "+JSON.stringify(jt.TranscoderFormat),"let _BasisFormat = "+JSON.stringify(jt.BasisFormat),"/* basis_transcoder.js */",t,"/* worker */",o.substring(o.indexOf("{")+1,o.lastIndexOf("}"))].join(`
3831
3831
  `);this.workerSourceURL=URL.createObjectURL(new Blob([s])),this.transcoderBinary=C,this.workerPool.setWorkerCreator(()=>{const n=new Worker(this.workerSourceURL),B=this.transcoderBinary.slice(0);return n.postMessage({type:"init",config:this.workerConfig,transcoderBinary:B},[B]),n})}),sS>0&&console.warn("THREE.KTX2Loader: Multiple active KTX2 loaders may cause performance issues. Use a single KTX2Loader instance, or call .dispose() on old instances."),sS++}return this.transcoderPending}load(A,g,I,e){if(this.workerConfig===null)throw new Error("THREE.KTX2Loader: Missing initialization with `.detectSupport( renderer )`.");const t=new re(this.manager);t.setResponseType("arraybuffer"),t.setWithCredentials(this.withCredentials),t.load(A,C=>{if(oS.has(C))return oS.get(C).promise.then(g).catch(e);this._createTexture(C).then(o=>g?g(o):null).catch(e)},I,e)}_createTextureFrom(A,g){const{mipmaps:I,width:e,height:t,format:C,type:o,error:s,dfdTransferFn:n,dfdFlags:B}=A;if(o==="error")return Promise.reject(s);const r=g.layerCount>1?new rU(I,e,t,g.layerCount,C,sI):new ao(I,e,t,C,sI);return r.minFilter=I.length===1?Jg:Jt,r.magFilter=Jg,r.generateMipmaps=!1,r.needsUpdate=!0,r.encoding=n===e3?gg:xI,r.premultiplyAlpha=!!(B&I3),r}async _createTexture(A,g={}){const I=C3(new Uint8Array(A));if(I.vkFormat!==i3)return n3(I);const e=g,t=this.init().then(()=>this.workerPool.postMessage({type:"transcode",buffer:A,taskConfig:e},[A])).then(C=>this._createTextureFrom(C.data,I));return oS.set(A,{promise:t}),t}dispose(){return this.workerPool.dispose(),this.workerSourceURL&&URL.revokeObjectURL(this.workerSourceURL),sS--,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:dI,RGBA_ASTC_4x4_Format:fh,RGBA_BPTC_Format:yh,RGBA_ETC2_EAC_Format:wh,RGBA_PVRTC_4BPPV1_Format:uh,RGBA_S3TC_DXT5_Format:Ir,RGB_ETC1_Format:Jp,RGB_ETC2_Format:ph,RGB_PVRTC_4BPPV1_Format:dh,RGB_S3TC_DXT1_Format:gr},jt.BasisWorker=function(){let i,A,g;const I=_EngineFormat,e=_TranscoderFormat,t=_BasisFormat;self.addEventListener("message",function(c){const h=c.data;switch(h.type){case"init":i=h.config,C(h.transcoderBinary);break;case"transcode":A.then(()=>{try{const{width:l,height:u,hasAlpha:w,mipmaps:D,format:d,dfdTransferFn:p,dfdFlags:f}=o(h.buffer),S=[];for(let y=0;y<D.length;++y)S.push(D[y].data.buffer);self.postMessage({type:"transcode",id:h.id,width:l,height:u,hasAlpha:w,mipmaps:D,format:d,dfdTransferFn:p,dfdFlags:f},S)}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 u=h.isUASTC()?t.UASTC_4x4:t.ETC1S,w=h.getWidth(),D=h.getHeight(),d=h.getLayers()||1,p=h.getLevels(),f=h.getHasAlpha(),S=h.getDFDTransferFunc(),y=h.getDFDFlags(),{transcoderFormat:G,engineFormat:k}=r(u,w,D,f);if(!w||!D||!p)throw l(),new Error("THREE.KTX2Loader: Invalid texture");if(!h.startTranscoding())throw l(),new Error("THREE.KTX2Loader: .startTranscoding failed");const F=[];for(let J=0;J<p;J++){const N=[];let K,x;for(let O=0;O<d;O++){const _=h.getImageLevelInfo(J,O,0);K=_.origWidth,x=_.origHeight;const W=new Uint8Array(h.getImageTranscodedSizeInBytes(J,O,0,G));if(!h.transcodeImage(W,J,O,0,G,0,-1,-1))throw l(),new Error("THREE.KTX2Loader: .transcodeImage failed.");N.push(W)}F.push({data:E(N),width:K,height:x})}return l(),{width:w,height:D,hasAlpha:f,mipmaps:F,format:k,dfdTransferFn:S,dfdFlags:y}}const s=[{if:"astcSupported",basisFormat:[t.UASTC_4x4],transcoderFormat:[e.ASTC_4x4,e.ASTC_4x4],engineFormat:[I.RGBA_ASTC_4x4_Format,I.RGBA_ASTC_4x4_Format],priorityETC1S:1/0,priorityUASTC:1,needsPowerOfTwo:!1},{if:"bptcSupported",basisFormat:[t.ETC1S,t.UASTC_4x4],transcoderFormat:[e.BC7_M5,e.BC7_M5],engineFormat:[I.RGBA_BPTC_Format,I.RGBA_BPTC_Format],priorityETC1S:3,priorityUASTC:2,needsPowerOfTwo:!1},{if:"dxtSupported",basisFormat:[t.ETC1S,t.UASTC_4x4],transcoderFormat:[e.BC1,e.BC3],engineFormat:[I.RGB_S3TC_DXT1_Format,I.RGBA_S3TC_DXT5_Format],priorityETC1S:4,priorityUASTC:5,needsPowerOfTwo:!1},{if:"etc2Supported",basisFormat:[t.ETC1S,t.UASTC_4x4],transcoderFormat:[e.ETC1,e.ETC2],engineFormat:[I.RGB_ETC2_Format,I.RGBA_ETC2_EAC_Format],priorityETC1S:1,priorityUASTC:3,needsPowerOfTwo:!1},{if:"etc1Supported",basisFormat:[t.ETC1S,t.UASTC_4x4],transcoderFormat:[e.ETC1],engineFormat:[I.RGB_ETC1_Format],priorityETC1S:2,priorityUASTC:4,needsPowerOfTwo:!1},{if:"pvrtcSupported",basisFormat:[t.ETC1S,t.UASTC_4x4],transcoderFormat:[e.PVRTC1_4_RGB,e.PVRTC1_4_RGBA],engineFormat:[I.RGB_PVRTC_4BPPV1_Format,I.RGBA_PVRTC_4BPPV1_Format],priorityETC1S:5,priorityUASTC:6,needsPowerOfTwo:!0}],n=s.sort(function(c,h){return c.priorityETC1S-h.priorityETC1S}),B=s.sort(function(c,h){return c.priorityUASTC-h.priorityUASTC});function r(c,h,l,u){let w,D;const d=c===t.ETC1S?n:B;for(let p=0;p<d.length;p++){const f=d[p];if(i[f.if]&&f.basisFormat.includes(c)&&!(u&&f.transcoderFormat.length<2)&&!(f.needsPowerOfTwo&&!(a(h)&&a(l))))return w=f.transcoderFormat[u?1:0],D=f.engineFormat[u?1:0],{transcoderFormat:w,engineFormat:D}}return console.warn("THREE.KTX2Loader: No suitable compressed texture format found. Decoding to RGBA32."),w=e.RGBA32,D=I.RGBAFormat,{transcoderFormat:w,engineFormat:D}}function a(c){return c<=2?!0:(c&c-1)===0&&c!==0}function E(c){let h=0;for(const w of c)h+=w.byteLength;const l=new Uint8Array(h);let u=0;for(const w of c)l.set(w,u),u+=w.byteLength;return l}};const IN={[$F]:dI,[zF]:dI,[WF]:dI,[eS]:dI,[XF]:Qn,[ZF]:Qn,[PF]:Qn,[IS]:Qn,[VF]:As,[jF]:As,[gS]:As,[_F]:As},BS={[$F]:VI,[zF]:ne,[WF]:sI,[eS]:sI,[XF]:VI,[ZF]:ne,[PF]:sI,[IS]:sI,[VF]:VI,[jF]:ne,[gS]:sI,[_F]:sI},s3={[eS]:gg,[IS]:gg,[gS]:gg};async function n3(i){const{vkFormat:A,pixelWidth:g,pixelHeight:I,pixelDepth:e}=i;if(IN[A]===void 0)throw new Error("THREE.KTX2Loader: Unsupported vkFormat.");const t=i.levels[0];let C,o;if(i.supercompressionScheme===A3)C=t.levelData;else if(i.supercompressionScheme===g3)nS||(nS=new Promise(async n=>{const B=new o3;await B.init(),n(B)})),C=(await nS).decode(t.levelData,t.uncompressedByteLength);else throw new Error("THREE.KTX2Loader: Unsupported supercompressionScheme.");BS[A]===VI?o=new Float32Array(C.buffer,C.byteOffset,C.byteLength/Float32Array.BYTES_PER_ELEMENT):BS[A]===ne?o=new Uint16Array(C.buffer,C.byteOffset,C.byteLength/Uint16Array.BYTES_PER_ELEMENT):o=C;const s=e===0?new Yt(o,g,I):new Br(o,g,I,e);return s.type=BS[A],s.format=IN[A],s.encoding=s3[A]||xI,s.needsUpdate=!0,Promise.resolve(s)}var B3=function(){var i="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 e=WebAssembly.validate(g)?A:i,t,C=WebAssembly.instantiate(o(e),{}).then(function(u){t=u.instance,t.exports.__wasm_call_ctors()});function o(u){for(var w=new Uint8Array(u.length),D=0;D<u.length;++D){var d=u.charCodeAt(D);w[D]=d>96?d-97:d>64?d-39:d+4}for(var p=0,D=0;D<u.length;++D)w[p++]=w[D]<60?I[w[D]]:(w[D]-60)*64+w[++D];return w.buffer.slice(0,p)}function s(u,w,D,d,p,f){var S=t.exports.sbrk,y=D+3&-4,G=S(y*d),k=S(p.length),F=new Uint8Array(t.exports.memory.buffer);F.set(p,k);var J=u(G,D,d,k,p.length);if(J==0&&f&&f(G,y,d),w.set(F.subarray(G,G+D*d)),S(G-S(0)),J!=0)throw new Error("Malformed buffer data: "+J)}var n={NONE:"",OCTAHEDRAL:"meshopt_decodeFilterOct",QUATERNION:"meshopt_decodeFilterQuat",EXPONENTIAL:"meshopt_decodeFilterExp"},B={ATTRIBUTES:"meshopt_decodeVertexBuffer",TRIANGLES:"meshopt_decodeIndexBuffer",INDICES:"meshopt_decodeIndexSequence"},r=[],a=0;function E(u){var w={object:new Worker(u),pending:0,requests:{}};return w.object.onmessage=function(D){var d=D.data;w.pending-=d.count,w.requests[d.id][d.action](d.value),delete w.requests[d.id]},w}function c(u){for(var w="var instance; var ready = WebAssembly.instantiate(new Uint8Array(["+new Uint8Array(o(e))+"]), {}).then(function(result) { instance = result.instance; instance.exports.__wasm_call_ctors(); });self.onmessage = workerProcess;"+s.toString()+l.toString(),D=new Blob([w],{type:"text/javascript"}),d=URL.createObjectURL(D),p=0;p<u;++p)r[p]=E(d);URL.revokeObjectURL(d)}function h(u,w,D,d,p){for(var f=r[0],S=1;S<r.length;++S)r[S].pending<f.pending&&(f=r[S]);return new Promise(function(y,G){var k=new Uint8Array(D),F=a++;f.pending+=u,f.requests[F]={resolve:y,reject:G},f.object.postMessage({id:F,count:u,size:w,source:k,mode:d,filter:p},[k.buffer])})}function l(u){C.then(function(){var w=u.data;try{var D=new Uint8Array(w.count*w.size);s(t.exports[w.mode],D,w.count,w.size,w.source,t.exports[w.filter]),self.postMessage({id:w.id,count:w.count,action:"resolve",value:D},[D.buffer])}catch(d){self.postMessage({id:w.id,count:w.count,action:"reject",value:d})}})}return{ready:C,supported:!0,useWorkers:function(u){c(u)},decodeVertexBuffer:function(u,w,D,d,p){s(t.exports.meshopt_decodeVertexBuffer,u,w,D,d,t.exports[n[p]])},decodeIndexBuffer:function(u,w,D,d){s(t.exports.meshopt_decodeIndexBuffer,u,w,D,d)},decodeIndexSequence:function(u,w,D,d){s(t.exports.meshopt_decodeIndexSequence,u,w,D,d)},decodeGltfBuffer:function(u,w,D,d,p,f){s(t.exports[B[p]],u,w,D,d,t.exports[n[f]])},decodeGltfBufferAsync:function(u,w,D,d,p){return r.length>0?h(u,w,D,B[d],n[p]):C.then(function(){var f=new Uint8Array(u*w);return s(t.exports[B[d]],f,u,w,D,t.exports[n[p]]),f})}}}();const Ta=cA("debugdecoders"),eN="https://www.gstatic.com/draco/versioned/decoders/1.4.1/",iN="https://www.gstatic.com/basis-universal/versioned/2021-04-15-ba1c3e4/";let Zt,aS,Us;function tN(i){i!==void 0&&typeof i=="string"&&(Zt||(Zt=new AS),Ta&&console.log("Setting draco decoder path to",i),Zt.setDecoderPath(i))}function CN(i){i!==void 0&&typeof i=="string"&&(Zt||(Zt=new AS),Ta&&console.log("Setting draco decoder type to",i),Zt.setDecoderConfig({type:i}))}function oN(i){i!==void 0&&typeof i=="string"&&(Us||(Us=new jt),Ta&&console.log("Setting ktx2 transcoder path to",i),Us.setTranscoderPath(i))}function GE(i,A){Zt||(Zt=new AS,Zt.setDecoderPath(eN),Zt.setDecoderConfig({type:"js"}),Ta&&console.log("Setting draco decoder path to",eN)),Us||(Us=new jt,Us.setTranscoderPath(iN),Ta&&console.log("Setting ktx2 transcoder path to",iN),A.renderer&&Us.detectSupport(A.renderer)),aS||(aS=B3,Ta&&console.log("Using the default meshopt decoder")),i.setDRACOLoader(Zt),i.setKTX2Loader(Us),i.setMeshoptDecoder(aS)}class QS{constructor(A,g,I,e){Q(this,"_name");Q(this,"_nameHash");Q(this,"_normalizedTime");Q(this,"_length");Q(this,"_speed");this._name=A.name,this._nameHash=A.hash,this._normalizedTime=g,this._length=I,this._speed=e}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 a3(i,A){return{name:"",isLooping:!1,guid:(A==null?void 0:A.generateUUID())??ui.generateUUID(),index:-1,clip:new Tt(i,1,[])}}var zn=(i=>(i[i.If=1]="If",i[i.IfNot=2]="IfNot",i[i.Greater=3]="Greater",i[i.Less=4]="Less",i[i.Equals=6]="Equals",i[i.NotEqual=7]="NotEqual",i))(zn||{}),sN=(i=>(i[i.Float=1]="Float",i[i.Int=3]="Int",i[i.Bool=4]="Bool",i[i.Trigger=9]="Trigger",i))(sN||{});const yo=cA("debuganimatorcontroller"),zD=cA("debugrootmotion");class Vn{constructor(A){Q(this,"normalizedStartOffset",0);Q(this,"_speed",1);Q(this,"animator");Q(this,"model");Q(this,"_mixer");Q(this,"_activeState");Q(this,"_activeStates",[]);Q(this,"rootMotionHandler");this.model=A,yo&&console.log(this)}play(A,g=-1,I=Number.NEGATIVE_INFINITY,e=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){yo&&console.log("transition to ",o),this.transitionTo(o,e,I);return}console.warn("Could not find "+A+" to play")}reset(){this.setStartTransition()}setBool(A,g){var e,t;const I=typeof A=="string"?"name":"hash";return(t=(e=this.model)==null?void 0:e.parameters)==null?void 0:t.filter(C=>C[I]===A).forEach(C=>C.value=g)}getBool(A){var I,e,t;const g=typeof A=="string"?"name":"hash";return((t=(e=(I=this.model)==null?void 0:I.parameters)==null?void 0:e.find(C=>C[g]===A))==null?void 0:t.value)??!1}setFloat(A,g){var e,t;const I=typeof A=="string"?"name":"hash";return(t=(e=this.model)==null?void 0:e.parameters)==null?void 0:t.filter(C=>C[I]===A).forEach(C=>C.value=g)}getFloat(A){var I,e,t;const g=typeof A=="string"?"name":"hash";return((t=(e=(I=this.model)==null?void 0:I.parameters)==null?void 0:e.find(C=>C[g]===A))==null?void 0:t.value)??0}setInteger(A,g){var e,t;const I=typeof A=="string"?"name":"hash";return(t=(e=this.model)==null?void 0:e.parameters)==null?void 0:t.filter(C=>C[I]===A).forEach(C=>C.value=g)}getInteger(A){var I,e,t;const g=typeof A=="string"?"name":"hash";return((t=(e=(I=this.model)==null?void 0:I.parameters)==null?void 0:e.find(C=>C[g]===A))==null?void 0:t.value)??0}setTrigger(A){var I,e;yo&&console.log("SET TRIGGER",A);const g=typeof A=="string"?"name":"hash";return(e=(I=this.model)==null?void 0:I.parameters)==null?void 0:e.filter(t=>t[g]===A).forEach(t=>t.value=!0)}resetTrigger(A){var I,e;const g=typeof A=="string"?"name":"hash";return(e=(I=this.model)==null?void 0:I.parameters)==null?void 0:e.filter(t=>t[g]===A).forEach(t=>t.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 Fl(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=ap(this.model,(I,e,t)=>t==null?!0:!(t.type==="Object3D"||t.isObject3D===!0||sO(t)||t.tracks!==void 0));return console.assert(A!==this.model),new Vn(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 e=I.action;e.getEffectiveWeight()<=0&&!e.isRunning()&&(yo&&console.debug("REMOVE",g.name,e.getEffectiveWeight(),e.isRunning(),e.isScheduled()),this._activeStates.splice(A,1),A--)}}}setStartTransition(){for(const A of this.model.layers){const g=A.stateMachine;g.defaultState===void 0&&(yo&&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 t;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 s of C.conditions)if(!this.evaluateCondition(s)){o=!1;break}if(o){for(const s of C.conditions){const n=this.model.parameters.find(B=>B.name===s.parameter);(n==null?void 0:n.type)===sN.Trigger&&(n.value=!1)}if(I){const s=g.motion.clip.duration,n=s<=0?1:I.time/s;if(C.hasExitTime?n>=C.exitTime:!0){I.clampWhenFinished=!0,yo&&console.log("transition to "+C.destinationState,C,n,C.exitTime,C.hasExitTime),this.transitionTo(C.destinationState,C.duration,C.offset);return}}else{this.transitionTo(C.destinationState,C.duration,C.offset);return}}}let e=!1;if(g.motion.isLooping&&I&&I.time>=I.getClip().duration&&(e=!0,I.reset(),I.time=0,I.play()),!e&&g&&!A&&I&&this.animator&&g.behaviours){const C=I==null?void 0:I.getClip().duration,o=I.time/C,s=new QS(this._activeState,o,C,this._speed);for(const n of g.behaviours)n.instance&&((t=n.instance.onStateUpdate)==null||t.call(n.instance,this.animator,s,0))}}getState(A,g){return typeof A=="number"&&(A==-1&&(A=this.model.layers[g].stateMachine.defaultState,A===void 0&&(yo&&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 n,B,r,a,E,c,h,l;if(!this.animator)return;const e=0;if(A=this.getState(A,e),!(A!=null&&A.motion)||!A.motion.clip)return;const t=this._activeState===A;if(t){const u=A.motion;!u.action_loopback&&u.clip&&(this._mixer.uncacheAction(u.clip,this.animator.gameObject),u.action_loopback=this.createAction(u.clip))}if((n=this._activeState)!=null&&n.behaviours&&this._activeState.motion.action){const u=(B=this._activeState)==null?void 0:B.motion.clip.duration,w=this._activeState.motion.action.time/u,D=new QS(this._activeState,w,u,this._speed);for(const d of this._activeState.behaviours)(a=(r=d.instance)==null?void 0:r.onStateExit)==null||a.call(d.instance,this.animator,D,e)}const C=(E=this._activeState)==null?void 0:E.motion.action;C&&C.fadeOut(g),t&&(A.motion.action=A.motion.action_loopback,A.motion.action_loopback=C);const o=this._activeState;this._activeState=A;const s=(c=A.motion)==null?void 0:c.action;if(s){I=Math.max(0,Math.min(1,I)),s.isRunning()&&s.stop(),s.reset(),s.timeScale=this._speed,s.enabled=!0;const u=A.motion.clip.duration;if(s.time=I*u,s.clampWhenFinished=!0,s.setLoop(er,0),g>0?s.fadeIn(g):s.setEffectiveWeight(1),s.play(),this.rootMotionHandler&&this.rootMotionHandler.onStart(s),this._activeStates.includes(A)||this._activeStates.push(A),this._activeState.behaviours){const w=new QS(A,I,u,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,w,e)}}else console.warn("No action",A.motion,this);yo&&console.log("TRANSITION FROM "+(o==null?void 0:o.name)+" TO "+A.name,g,C,s,s==null?void 0:s.getEffectiveTimeScale(),s==null?void 0:s.getEffectiveWeight(),s==null?void 0:s.isRunning(),s==null?void 0:s.isScheduled(),s==null?void 0:s.paused)}createAction(A){var I,e;if(this._mixer.existingAction(A)&&this._mixer.uncacheAction(A,(I=this.animator)==null?void 0:I.gameObject),(e=this.animator)!=null&&e.applyRootMotion){this.rootMotionHandler||(this.rootMotionHandler=new Q3(this));const t=this.animator.gameObject;return this.rootMotionHandler.createClip(this._mixer,t,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 zn.If:return g.value===!0;case zn.IfNot:return g.value===!1;case zn.Greater:return g.value>A.threshold;case zn.Less:return g.value<A.threshold;case zn.Equals:return g.value===A.threshold;case zn.NotEqual:return g.value!==A.threshold}return!1}createActions(A){var g,I;for(const e of this.model.layers){const t=e.stateMachine;for(let C=0;C<t.states.length;C++){const o=t.states[C];o.transitions||(o.transitions=[]);for(const s of o.transitions)s.conditions||(s.conditions=[]);if(o.motion||(o.motion=a3(o.name)),this.animator&&o.motion.clips){const s=(g=o.motion.clips)==null?void 0:g.find(n=>{var B,r;return n.node.name===((r=(B=this.animator)==null?void 0:B.gameObject)==null?void 0:r.name)});o.motion.clip=s==null?void 0:s.clip}if(!o.motion.clip){const s=new Tt(void 0,void 0,[]);o.motion.clip=s}if((I=o.motion)!=null&&I.clip){const s=o.motion.clip,n=this.createAction(s);o.motion.action=n}if(o.behaviours&&Array.isArray(o.behaviours))for(const s of o.behaviours){if(!(s!=null&&s.typeName))continue;const n=X.get(s.typeName),B=new n;B.isStateMachineBehaviour&&(B._context=this.context??void 0,bn(B,s.properties),s.instance=B),yo&&console.log("Created animator controller behaviour",o.name,s.typeName,s.properties,B)}}}}*enumerateActions(){for(const A of this.model.layers){const g=A.stateMachine;for(let I=0;I<g.states.length;I++){const e=g.states[I];e!=null&&e.motion&&(e.motion.action&&(yield e.motion.action),e.motion.action_loopback&&(yield e.motion.action_loopback))}}}}class nN{constructor(A,g){Q(this,"track");Q(this,"createdInterpolant");Q(this,"originalEvaluate");Q(this,"customEvaluate");this.track=A;const I=A,e=I.createInterpolant.bind(A);I.createInterpolant=()=>(I.createInterpolant=e,this.createdInterpolant=e(),this.originalEvaluate=this.createdInterpolant.evaluate.bind(this.createdInterpolant),this.customEvaluate=t=>{if(!this.originalEvaluate)return;const C=this.originalEvaluate(t);return g(t,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 oe=class{constructor(A,g,I,e,t){Q(this,"_action");Q(this,"root");Q(this,"clip");Q(this,"positionWrapper",null);Q(this,"rotationWrapper",null);Q(this,"context");Q(this,"positionChange",new M);Q(this,"rotationChange",new RA);if(this.context=A,this.root=g,this.clip=I,oe.firstKeyframeRotation[I.uuid]||(oe.firstKeyframeRotation[I.uuid]=new RA),t){const C=t.values;oe.firstKeyframeRotation[I.uuid].set(C[0],C[1],C[2],C[3])}oe.spaceRotation[I.uuid]||(oe.spaceRotation[I.uuid]=new RA),oe.effectiveSpaceRotation[I.uuid]||(oe.effectiveSpaceRotation[I.uuid]=new RA),oe.clipOffsetRotation[I.uuid]=new RA,t&&oe.clipOffsetRotation[I.uuid].set(t.values[0],t.values[1],t.values[2],t.values[3]).invert(),this.handlePosition(I,e),this.handleRotation(I,t)}set action(A){this._action=A}get action(){return this._action}onStart(A){if(A.getClip()!==this.clip)return;const g=oe.lastObjRotation[this.root.uuid];if(oe.spaceRotation[this.clip.uuid].copy(g),zD){const I=new $I().setFromQuaternion(g);console.log("START",this.clip.name,Ig.toDegrees(I.y))}}getClipRotationOffset(){return oe.clipOffsetRotation[this.clip.uuid]}handlePosition(A,g){if(g){const I=this.root;zD&&I.add(new ya),oe.lastObjPosition[I.uuid]||(oe.lastObjPosition[I.uuid]=new M);const e=new M,t=new M;let C=0;this.positionWrapper=new nN(g,(o,s)=>{const n=this.action.getEffectiveWeight();if(zD&&I.position.length()>8&&I.position.set(0,I.position.y,0),o>C){e.set(s[0],s[1],s[2]),e.sub(t),e.multiplyScalar(n),e.applyQuaternion(this.getClipRotationOffset());const B=this.clip.uuid;e.applyQuaternion(oe.spaceRotation[B]),this.positionChange.copy(e)}return t.fromArray(s),C=o,s[0]=0,s[1]=0,s[2]=0,s})}}handleRotation(A,g){if(g){if(zD){const o=g.values,s=new $I().setFromQuaternion(new RA(o[0],o[1],o[2],o[3]));console.log(A.name,g.name,"FIRST ROTATION IN TRACK",Ig.toDegrees(s.y));const n=g.values.length-4,B=new RA().set(o[n],o[n+1],o[n+2],o[n+3]),r=new $I().setFromQuaternion(B);console.log(A.name,g.name,"LAST ROTATION IN TRACK",Ig.toDegrees(r.y))}const I=this.root;oe.lastObjRotation[I.uuid]||(oe.lastObjRotation[I.uuid]=new RA);let e=0;const t=new RA,C=new RA;this.rotationWrapper=new nN(g,(o,s)=>(o>e&&(C.set(s[0],s[1],s[2],s[3]),t.invert(),C.multiply(t),this.rotationChange.copy(C)),t.fromArray(s),e=o,s[0]=0,s[1]=0,s[2]=0,s[3]=1,s))}}onBeforeUpdate(){this.positionChange.set(0,0,0),this.rotationChange.set(0,0,0,1)}onAfterUpdate(){if(!this.action)return;const A=this.action.getEffectiveWeight();this.positionChange.multiplyScalar(A),this.rotationChange.slerp(oe.identityQuaternion,1-A)}};let zt=oe;Q(zt,"lastObjPosition",{}),Q(zt,"lastObjRotation",{}),Q(zt,"firstKeyframeRotation",{}),Q(zt,"spaceRotation",{}),Q(zt,"effectiveSpaceRotation",{}),Q(zt,"clipOffsetRotation",{}),Q(zt,"identityQuaternion",new RA);class Q3{constructor(A){Q(this,"controller");Q(this,"handler",[]);Q(this,"root");Q(this,"summedPosition",new M);Q(this,"summedRotation",new RA);this.controller=A}createClip(A,g,I){this.root=g,g&&"name"in g&&g.name;const e=this.findRootTrack(I,".position"),t=this.findRootTrack(I,".quaternion"),C=new zt(this.controller.context,g,I,e,t);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),zt.lastObjRotation[this.root.uuid].copy(this.root.quaternion)}findRootTrack(A,g){const I=A.tracks;if(!I)return null;for(const e of I)if(e.name.endsWith(g))return e;return null}}const Oa=function(i){return U(i)},U=function(i){if(i===void 0&&(i=null),!Array.isArray(i))i=BN(i);else for(let A=0;A<i.length;A++){const g=i[A];i[A]=BN(g)}return function(A,g){Object.getOwnPropertyDescriptor(A,"$serializedTypes")||(A.$serializedTypes={});const I=A.$serializedTypes=A.$serializedTypes||{};I[g]=i}};function BN(i){var A,g;switch((g=(A=i==null?void 0:i.prototype)==null?void 0:A.constructor)==null?void 0:g.name){case"Number":case"String":case"Boolean":return null}return i}var r3=Object.defineProperty,E3=Object.getOwnPropertyDescriptor,VD=(i,A,g,I)=>{for(var e=I>1?void 0:I?E3(A,g):A,t=i.length-1,C;t>=0;t--)(C=i[t])&&(e=(I?C(A,g,e):C(e))||e);return I&&e&&r3(A,g,e),e};const aN=cA("debuganimator");class Xi extends OA{constructor(){super(...arguments);Q(this,"applyRootMotion",!1);Q(this,"hasRootMotion",!1);Q(this,"keepAnimatorControllerStateOnDisable",!1);Q(this,"speed",1);Q(this,"normalizedStartOffset",0);Q(this,"_animatorController",null)}set runtimeAnimatorController(g){this._animatorController&&this._animatorController.model===g||(g?g instanceof Vn?this._animatorController=g:(aN&&console.log("Assign animator controller",g,this),this._animatorController=new Vn(g)):this._animatorController=null)}get runtimeAnimatorController(){return this._animatorController}Play(g,I=-1,e=Number.NEGATIVE_INFINITY,t=0){this.play(g,I,e,t)}play(g,I=-1,e=Number.NEGATIVE_INFINITY,t=0){var C;(C=this.runtimeAnimatorController)==null||C.play(g,I,e,t)}Reset(){this.reset()}reset(){var g;(g=this._animatorController)==null||g.reset()}SetBool(g,I){this.setBool(g,I)}setBool(g,I){var e;(e=this.runtimeAnimatorController)==null||e.setBool(g,I)}GetBool(g){return this.getBool(g)}getBool(g){var I;return((I=this.runtimeAnimatorController)==null?void 0:I.getBool(g))??!1}SetFloat(g,I){this.setFloat(g,I)}setFloat(g,I){var e;(e=this.runtimeAnimatorController)==null||e.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 e;(e=this.runtimeAnimatorController)==null||e.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=Ig.lerp(g.x,g.y,Math.random())}set minMaxOffsetNormalized(g){this.normalizedStartOffset=Ig.lerp(g.x,g.y,Math.random()),this.runtimeAnimatorController&&(this.runtimeAnimatorController.normalizedStartOffset=this.normalizedStartOffset)}awake(){if(aN&&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()}}VD([U()],Xi.prototype,"applyRootMotion",2),VD([U()],Xi.prototype,"hasRootMotion",2),VD([U()],Xi.prototype,"keepAnimatorControllerStateOnDisable",2),VD([U()],Xi.prototype,"runtimeAnimatorController",1);var c3=Object.defineProperty,h3=Object.getOwnPropertyDescriptor,kE=(i,A,g,I)=>{for(var e=I>1?void 0:I?h3(A,g):A,t=i.length-1,C;t>=0;t--)(C=i[t])&&(e=(I?C(A,g,e):C(e))||e);return I&&e&&c3(A,g,e),e};const Rs=cA("debuganimation");class Vt extends OA{constructor(){super(...arguments);Q(this,"playAutomatically",!0);Q(this,"randomStartTime",!0);Q(this,"minMaxSpeed");Q(this,"minMaxOffsetNormalized");Q(this,"loop",!0);Q(this,"clampWhenFinished",!1);Q(this,"_tempAnimationClipBeforeGameObjectExisted",null);Q(this,"mixer");Q(this,"_actions",[]);Q(this,"_currentActions",[]);Q(this,"_handles",[]);Q(this,"_didInit",!1)}get clip(){var g;return(g=this.animations)!=null&&g.length?this.animations[0]:null}set clip(g){if(!this.__didAwake){Rs&&console.log("Assign clip during serialization",g),this._tempAnimationClipBeforeGameObjectExisted=g;return}g&&(Rs&&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){Rs&&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(){Rs&&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(e=>e.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(Rs&&console.log("PLAY",g),this.init(),!this.mixer){Rs&&console.warn("Missing mixer",this);return}g===void 0&&(g=0);let e=g;if(typeof g=="number"){if(g>=this.animations.length){Rs&&console.log("No animation at index",g);return}e=this.animations[g]}else typeof g=="string"&&(e=this.animations.find(C=>C.name===g));if(!e){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()===e)return this.internalOnPlay(C,I);const t=this.mixer.clipAction(e);return this.actions.push(t),this.internalOnPlay(t,I)}internalOnPlay(g,I){var e=this.currentAction;if(e===g&&e.isRunning()&&e.time<e.getClip().duration){const s=this.tryFindHandle(g);if(s)return s.getPromise()}const t=(I==null?void 0:I.exclusive)??!0;I!=null&&I.fadeDuration?(t&&(e==null||e.fadeOut(I.fadeDuration)),g.fadeIn(I.fadeDuration)):t&&(e==null||e.stop()),g.reset(),g.enabled=!0,g.time=0,g.timeScale=1;const C=g.getClip();I!=null&&I.minMaxOffsetNormalized&&(g.time=Ig.lerp(I.minMaxOffsetNormalized.x,I.minMaxOffsetNormalized.y,Math.random())*C.duration),I!=null&&I.minMaxSpeed&&(g.timeScale=Ig.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?Zp:er:g.loop=er,g.play(),Rs&&console.log("PLAY",g.getClip().name,g);const o=new l3(g,this.mixer,I,s=>{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 Fl(this.gameObject)))}}kE([U()],Vt.prototype,"playAutomatically",2),kE([U()],Vt.prototype,"randomStartTime",2),kE([U()],Vt.prototype,"loop",2),kE([U()],Vt.prototype,"clampWhenFinished",2),kE([U(Tt)],Vt.prototype,"clips",1);class l3{constructor(A,g,I,e){Q(this,"mixer");Q(this,"action");Q(this,"promise",null);Q(this,"resolve",null);Q(this,"reject",null);Q(this,"_options");Q(this,"_resolveCallback",null);Q(this,"_rejectCallback",null);Q(this,"_loopCallback");Q(this,"_finishedCallback");Q(this,"_resolvedOrRejectedCallback");this.action=A,this.mixer=g,this._resolvedOrRejectedCallback=e,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 _a extends Ze{constructor(A){super(A),this.dracoLoader=null,this.ktx2Loader=null,this.meshoptDecoder=null,this.animationPointerResolver=null,this.pluginCallbacks=[],this.register(function(g){return new w3(g)}),this.register(function(g){return new R3(g)}),this.register(function(g){return new m3(g)}),this.register(function(g){return new S3(g)}),this.register(function(g){return new G3(g)}),this.register(function(g){return new k3(g)}),this.register(function(g){return new M3(g)}),this.register(function(g){return new p3(g)}),this.register(function(g){return new U3(g)}),this.register(function(g){return new y3(g)}),this.register(function(g){return new d3(g)}),this.register(function(g){return new F3(g)}),this.register(function(g){return new N3(g)}),this.register(function(g){return new f3(g)})}load(A,g,I,e){const t=this;let C;this.resourcePath!==""?C=this.resourcePath:this.path!==""?C=this.path:C=rC.extractUrlBase(A),this.manager.itemStart(A);const o=function(n){e?e(n):console.error(n),t.manager.itemError(A),t.manager.itemEnd(A)},s=new re(this.manager);s.setPath(this.path),s.setResponseType("arraybuffer"),s.setRequestHeader(this.requestHeader),s.setWithCredentials(this.withCredentials),s.load(A,function(n){try{t.parse(n,C,function(B){g(B),t.manager.itemEnd(A)},o)}catch(B){o(B)}},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,e){let t;const C={},o={};if(typeof A=="string")t=JSON.parse(A);else if(A instanceof ArrayBuffer)if(rC.decodeText(new Uint8Array(A,0,4))===QN){try{C[Kg.KHR_BINARY_GLTF]=new K3(A)}catch(B){e&&e(B);return}t=JSON.parse(C[Kg.KHR_BINARY_GLTF].content)}else t=JSON.parse(rC.decodeText(new Uint8Array(A)));else t=A;if(t.asset===void 0||t.asset.version[0]<2){e&&e(new Error("THREE.GLTFLoader: Unsupported asset. glTF versions >=2.0 are supported."));return}const s=new _3(t,{path:g||this.resourcePath||"",crossOrigin:this.crossOrigin,requestHeader:this.requestHeader,manager:this.manager,ktx2Loader:this.ktx2Loader,meshoptDecoder:this.meshoptDecoder,animationPointerResolver:this.animationPointerResolver});s.fileLoader.setRequestHeader(this.requestHeader);for(let n=0;n<this.pluginCallbacks.length;n++){const B=this.pluginCallbacks[n](s);o[B.name]=B,C[B.name]=!0}if(t.extensionsUsed)for(let n=0;n<t.extensionsUsed.length;++n){const B=t.extensionsUsed[n],r=t.extensionsRequired||[];switch(B){case Kg.KHR_MATERIALS_UNLIT:C[B]=new u3;break;case Kg.KHR_DRACO_MESH_COMPRESSION:C[B]=new J3(t,this.dracoLoader);break;case Kg.KHR_TEXTURE_TRANSFORM:C[B]=new q3;break;case Kg.KHR_MESH_QUANTIZATION:C[B]=new L3;break;default:r.indexOf(B)>=0&&o[B]===void 0&&console.warn('THREE.GLTFLoader: Unknown extension "'+B+'".')}}s.setExtensions(C),s.setPlugins(o),s.parse(I,e)}parseAsync(A,g){const I=this;return new Promise(function(e,t){I.parse(A,g,e,t)})}}function D3(){let i={};return{get:function(A){return i[A]},add:function(A,g){i[A]=g},remove:function(A){delete i[A]},removeAll:function(){i={}}}}const Kg={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 d3{constructor(A){this.parser=A,this.name=Kg.KHR_LIGHTS_PUNCTUAL,this.cache={refs:{},uses:{}}}_markDefs(){const A=this.parser,g=this.parser.json.nodes||[];for(let I=0,e=g.length;I<e;I++){const t=g[I];t.extensions&&t.extensions[this.name]&&t.extensions[this.name].light!==void 0&&A._addNodeRef(this.cache,t.extensions[this.name].light)}}_loadLight(A){const g=this.parser,I="light:"+A;let e=g.cache.get(I);if(e)return e;const t=g.json,s=((t.extensions&&t.extensions[this.name]||{}).lights||[])[A];let n;const B=new fA(16777215);s.color!==void 0&&B.fromArray(s.color);const r=s.range!==void 0?s.range:0;switch(s.type){case"directional":n=new Gl(B),n.target.position.set(0,0,-1),n.add(n.target);break;case"point":n=new Sl(B),n.distance=r;break;case"spot":n=new yl(B),n.distance=r,s.spot=s.spot||{},s.spot.innerConeAngle=s.spot.innerConeAngle!==void 0?s.spot.innerConeAngle:0,s.spot.outerConeAngle=s.spot.outerConeAngle!==void 0?s.spot.outerConeAngle:Math.PI/4,n.angle=s.spot.outerConeAngle,n.penumbra=1-s.spot.innerConeAngle/s.spot.outerConeAngle,n.target.position.set(0,0,-1),n.add(n.target);break;default:throw new Error("THREE.GLTFLoader: Unexpected light type: "+s.type)}return n.position.set(0,0,0),n.decay=2,Fs(n,s),s.intensity!==void 0&&(n.intensity=s.intensity),n.name=g.createUniqueName(s.name||"light_"+A),e=Promise.resolve(n),g.cache.add(I,e),e}getDependency(A,g){if(A==="light")return this._loadLight(g)}createNodeAttachment(A){const g=this,I=this.parser,t=I.json.nodes[A],o=(t.extensions&&t.extensions[this.name]||{}).light;return o===void 0?null:this._loadLight(o).then(function(s){return I._getNodeRef(g.cache,o,s)})}}let u3=class{constructor(){this.name=Kg.KHR_MATERIALS_UNLIT}getMaterialType(){return aI}extendParams(A,g,I){const e=[];A.color=new fA(1,1,1),A.opacity=1;const t=g.pbrMetallicRoughness;if(t){if(Array.isArray(t.baseColorFactor)){const C=t.baseColorFactor;A.color.fromArray(C),A.opacity=C[3]}t.baseColorTexture!==void 0&&e.push(I.assignTexture(A,"map",t.baseColorTexture,gg))}return Promise.all(e)}};class p3{constructor(A){this.parser=A,this.name=Kg.KHR_MATERIALS_EMISSIVE_STRENGTH}extendMaterialParams(A,g){const e=this.parser.json.materials[A];if(!e.extensions||!e.extensions[this.name])return Promise.resolve();const t=e.extensions[this.name].emissiveStrength;return t!==void 0&&(g.emissiveIntensity=t),Promise.resolve()}}let w3=class{constructor(A){this.parser=A,this.name=Kg.KHR_MATERIALS_CLEARCOAT}getMaterialType(A){const I=this.parser.json.materials[A];return!I.extensions||!I.extensions[this.name]?null:ro}extendMaterialParams(A,g){const I=this.parser,e=I.json.materials[A];if(!e.extensions||!e.extensions[this.name])return Promise.resolve();const t=[],C=e.extensions[this.name];if(C.clearcoatFactor!==void 0&&(g.clearcoat=C.clearcoatFactor),C.clearcoatTexture!==void 0&&t.push(I.assignTexture(g,"clearcoatMap",C.clearcoatTexture)),C.clearcoatRoughnessFactor!==void 0&&(g.clearcoatRoughness=C.clearcoatRoughnessFactor),C.clearcoatRoughnessTexture!==void 0&&t.push(I.assignTexture(g,"clearcoatRoughnessMap",C.clearcoatRoughnessTexture)),C.clearcoatNormalTexture!==void 0&&(t.push(I.assignTexture(g,"clearcoatNormalMap",C.clearcoatNormalTexture)),C.clearcoatNormalTexture.scale!==void 0)){const o=C.clearcoatNormalTexture.scale;g.clearcoatNormalScale=new AA(o,o)}return Promise.all(t)}};class f3{constructor(A){Q(this,"ANIMATION_TARGET_TYPE",{node:"node",material:"material",camera:"camera",light:"light"});Q(this,"_animationPointerDebug",!1);Q(this,"_havePatchedPropertyBindings",!1);this.parser=A,this.name=Kg.KHR_ANIMATION_POINTER}_patchPropertyBindingFindNode(){if(this._havePatchedPropertyBindings)return;this._havePatchedPropertyBindings=!0;const A=Ng.findNode;Ng.findNode=(g,I)=>{if(I.startsWith(".materials.")){this._animationPointerDebug&&console.log("FIND",I);const e=I.substring(11).substring(I.indexOf(".")),t=e.indexOf("."),C=t<0?e:e.substring(0,t);let o=null;return g.traverse(s=>{var n,B;o!==null||s.type!=="Mesh"||(((n=s.material)==null?void 0:n.uuid)===C||((B=s.material)==null?void 0:B.name)===C)&&(o=s.material,this._animationPointerDebug&&console.log(o,e),o!==null&&(e.endsWith(".map")?o=o.map:e.endsWith(".emissiveMap")&&(o=o.emissiveMap)))}),o}else if(I.startsWith(".nodes.")||I.startsWith(".lights.")||I.startsWith(".cameras.")){const e=I.split(".");let t;for(let C=1;C<e.length;C++){const o=e[C];if(o.length==36)t=g.getObjectByProperty("uuid",o);else if(t&&t[o]){const n=Number.parseInt(o);let B=o;n>=0&&(B=n),t=t[B],this._animationPointerDebug&&console.log(t)}else{const n=g.getObjectByName(o);n&&(t=n)}}if(!t){const C=A(g,e[2]);return C||console.warn(Kg.KHR_ANIMATION_POINTER+": Property binding not found",I,g,g.name,e),C}return this._animationPointerDebug&&console.log("NODE",I,t),t}return A(g,I)}}loadAnimationTargetFromChannel(A){this._havePatchedPropertyBindings||this._patchPropertyBindingFindNode();const g=A.target,I=g.extensions&&g.extensions[Kg.KHR_ANIMATION_POINTER]&&g.path&&g.path==="pointer";if(!I)return null;let e,t=this.ANIMATION_TARGET_TYPE.node,C;if(I){const s=g.extensions[Kg.KHR_ANIMATION_POINTER];let n=s.pointer;if(this._animationPointerDebug&&console.log("Original path: "+n,g),!n){console.warn("Invalid path",s,g);return}if(n.startsWith("/materials/")?t=this.ANIMATION_TARGET_TYPE.material:n.startsWith("/extensions/KHR_lights_punctual/lights/")?t=this.ANIMATION_TARGET_TYPE.light:n.startsWith("/cameras/")&&(t=this.ANIMATION_TARGET_TYPE.camera),C=this._tryResolveTargetId(n,t),C===null||isNaN(C)){console.warn("Failed resolving animation node id: "+C,n);return}else this._animationPointerDebug&&console.log("Resolved node ID for "+t,C);switch(t){case this.ANIMATION_TARGET_TYPE.material:const r=("/materials/"+C.toString()+"/").length,a=n.substring(0,r);switch(e=n.substring(r),e){case"pbrMetallicRoughness/baseColorFactor":e="color";break;case"pbrMetallicRoughness/roughnessFactor":e="roughness";break;case"pbrMetallicRoughness/metallicFactor":e="metalness";break;case"emissiveFactor":e="emissive";break;case"alphaCutoff":e="alphaTest";break;case"occlusionTexture/strength":e="aoMapIntensity";break;case"normalTexture/scale":e="normalScale";break;case"pbrMetallicRoughness/baseColorTexture/extensions/KHR_texture_transform/scale":e="map/repeat";break;case"pbrMetallicRoughness/baseColorTexture/extensions/KHR_texture_transform/offset":e="map/offset";break;case"emissiveTexture/extensions/KHR_texture_transform/scale":e="emissiveMap/repeat";break;case"emissiveTexture/extensions/KHR_texture_transform/offset":e="emissiveMap/offset";break;case"extensions/KHR_materials_emissive_strength/emissiveStrength":e="emissiveIntensity";break;case"extensions/KHR_materials_transmission/transmissionFactor":e="transmission";break;case"extensions/KHR_materials_ior/ior":e="ior";break;case"extensions/KHR_materials_volume/thicknessFactor":e="thickness";break;case"extensions/KHR_materials_volume/attenuationColor":e="attenuationColor";break;case"extensions/KHR_materials_volume/attenuationDistance":e="attenuationDistance";break;case"extensions/KHR_materials_iridescence/iridescenceFactor":e="iridescence";break;case"extensions/KHR_materials_iridescence/iridescenceIor":e="iridescenceIOR";break;case"extensions/KHR_materials_iridescence/iridescenceThicknessMinimum":e="iridescenceThicknessRange[0]";break;case"extensions/KHR_materials_iridescence/iridescenceThicknessMaximum":e="iridescenceThicknessRange[1]";break;case"extensions/KHR_materials_clearcoat/clearcoatFactor":e="clearcoat";break;case"extensions/KHR_materials_clearcoat/clearcoatRoughnessFactor":e="clearcoatRoughness";break;case"extensions/KHR_materials_sheen/sheenColorFactor":e="sheenColor";break;case"extensions/KHR_materials_sheen/sheenRoughnessFactor":e="sheenRoughness";break;case"extensions/KHR_materials_specular/specularFactor":e="specularIntensity";break;case"extensions/KHR_materials_specular/specularColorFactor":e="specularColor";break}n=a+e,this._animationPointerDebug&&console.log("PROPERTY PATH",a,e,n);break;case this.ANIMATION_TARGET_TYPE.node:const E=("/nodes/"+C.toString()+"/").length,c=n.substring(0,E);switch(e=n.substring(E),e){case"translation":e="position";break;case"rotation":e="quaternion";break;case"scale":e="scale";break;case"weights":e="morphTargetInfluences";break}n=c+e;break;case this.ANIMATION_TARGET_TYPE.light:const h=("/extensions/KHR_lights_punctual/lights/"+C.toString()+"/").length;switch(e=n.substring(h),e){case"color":break;case"intensity":break;case"spot/innerConeAngle":e="penumbra";break;case"spot/outerConeAngle":e="angle";break;case"range":e="distance";break}n="/lights/"+C.toString()+"/"+e;break;case this.ANIMATION_TARGET_TYPE.camera:const l=("/cameras/"+C.toString()+"/").length,u=n.substring(0,l);switch(e=n.substring(l),e){case"perspective/yfov":e="fov";break;case"perspective/znear":case"orthographic/znear":e="near";break;case"perspective/zfar":case"orthographic/zfar":e="far";break;case"perspective/aspect":e="aspect";break;case"orthographic/xmag":e="zoom";break;case"orthographic/ymag":e="zoom";break}n=u+e;break}const B=this.parser.options.animationPointerResolver;B&&B.resolvePath&&(n=B.resolvePath(n)),g.extensions[Kg.KHR_ANIMATION_POINTER].pointer=n}if(C===null||isNaN(C)){console.warn("Failed resolving animation node id: "+C,g);return}let o;return t===this.ANIMATION_TARGET_TYPE.node?o=this.parser.getDependency("node",C):t===this.ANIMATION_TARGET_TYPE.material?o=this.parser.getDependency("material",C):t===this.ANIMATION_TARGET_TYPE.light?o=this.parser.getDependency("light",C):t===this.ANIMATION_TARGET_TYPE.camera?o=this.parser.getDependency("camera",C):console.error("Unhandled type",t),o}createAnimationTracks(A,g,I,e,t){if(!(t.extensions&&t.extensions[Kg.KHR_ANIMATION_POINTER]&&t.path&&t.path==="pointer"))return null;let o=t.extensions[Kg.KHR_ANIMATION_POINTER].pointer;if(!o)return null;const s=[];o=o.replaceAll("/",".");const n=o.split(".");n[2]=A.name??A.uuid,o=n.join("."),this._animationPointerDebug&&console.log(A,g,I,t,o);let B;switch(I.itemSize){case 1:B=Bs;break;case 2:case 3:B=as;break;case 4:o.endsWith(".quaternion")?B=QC:B=xr;break}const r=e.interpolation!==void 0?lN[e.interpolation]:Io;let a=dN(I);o.endsWith(".fov")&&(a=a.map(c=>c/Math.PI*180));const E=new B(o,g.array,a,r);if(r==="CUBICSPLINE"&&lS(E),s.push(E),o&&I.itemSize===4&&o.startsWith(".materials.")&&o.endsWith(".color")){const c=new Float32Array(a.length/4);for(let l=0,u=a.length/4;l<u;l+=1)c[l]=a[l*4+3];const h=new B(o.replace(".color",".opacity"),g.array,c,r);r==="CUBICSPLINE"&&lS(E),s.push(h)}return s}_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 y3=class{constructor(A){this.parser=A,this.name=Kg.KHR_MATERIALS_IRIDESCENCE}getMaterialType(A){const I=this.parser.json.materials[A];return!I.extensions||!I.extensions[this.name]?null:ro}extendMaterialParams(A,g){const I=this.parser,e=I.json.materials[A];if(!e.extensions||!e.extensions[this.name])return Promise.resolve();const t=[],C=e.extensions[this.name];return C.iridescenceFactor!==void 0&&(g.iridescence=C.iridescenceFactor),C.iridescenceTexture!==void 0&&t.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&&t.push(I.assignTexture(g,"iridescenceThicknessMap",C.iridescenceThicknessTexture)),Promise.all(t)}};class S3{constructor(A){this.parser=A,this.name=Kg.KHR_MATERIALS_SHEEN}getMaterialType(A){const I=this.parser.json.materials[A];return!I.extensions||!I.extensions[this.name]?null:ro}extendMaterialParams(A,g){const I=this.parser,e=I.json.materials[A];if(!e.extensions||!e.extensions[this.name])return Promise.resolve();const t=[];g.sheenColor=new fA(0,0,0),g.sheenRoughness=0,g.sheen=1;const C=e.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&&t.push(I.assignTexture(g,"sheenColorMap",C.sheenColorTexture,gg)),C.sheenRoughnessTexture!==void 0&&t.push(I.assignTexture(g,"sheenRoughnessMap",C.sheenRoughnessTexture)),Promise.all(t)}}let G3=class{constructor(A){this.parser=A,this.name=Kg.KHR_MATERIALS_TRANSMISSION}getMaterialType(A){const I=this.parser.json.materials[A];return!I.extensions||!I.extensions[this.name]?null:ro}extendMaterialParams(A,g){const I=this.parser,e=I.json.materials[A];if(!e.extensions||!e.extensions[this.name])return Promise.resolve();const t=[],C=e.extensions[this.name];return C.transmissionFactor!==void 0&&(g.transmission=C.transmissionFactor),C.transmissionTexture!==void 0&&t.push(I.assignTexture(g,"transmissionMap",C.transmissionTexture)),Promise.all(t)}},k3=class{constructor(A){this.parser=A,this.name=Kg.KHR_MATERIALS_VOLUME}getMaterialType(A){const I=this.parser.json.materials[A];return!I.extensions||!I.extensions[this.name]?null:ro}extendMaterialParams(A,g){const I=this.parser,e=I.json.materials[A];if(!e.extensions||!e.extensions[this.name])return Promise.resolve();const t=[],C=e.extensions[this.name];g.thickness=C.thicknessFactor!==void 0?C.thicknessFactor:0,C.thicknessTexture!==void 0&&t.push(I.assignTexture(g,"thicknessMap",C.thicknessTexture)),g.attenuationDistance=C.attenuationDistance||1/0;const o=C.attenuationColor||[1,1,1];return g.attenuationColor=new fA(o[0],o[1],o[2]),Promise.all(t)}};class M3{constructor(A){this.parser=A,this.name=Kg.KHR_MATERIALS_IOR}getMaterialType(A){const I=this.parser.json.materials[A];return!I.extensions||!I.extensions[this.name]?null:ro}extendMaterialParams(A,g){const e=this.parser.json.materials[A];if(!e.extensions||!e.extensions[this.name])return Promise.resolve();const t=e.extensions[this.name];return g.ior=t.ior!==void 0?t.ior:1.5,Promise.resolve()}}class U3{constructor(A){this.parser=A,this.name=Kg.KHR_MATERIALS_SPECULAR}getMaterialType(A){const I=this.parser.json.materials[A];return!I.extensions||!I.extensions[this.name]?null:ro}extendMaterialParams(A,g){const I=this.parser,e=I.json.materials[A];if(!e.extensions||!e.extensions[this.name])return Promise.resolve();const t=[],C=e.extensions[this.name];g.specularIntensity=C.specularFactor!==void 0?C.specularFactor:1,C.specularTexture!==void 0&&t.push(I.assignTexture(g,"specularIntensityMap",C.specularTexture));const o=C.specularColorFactor||[1,1,1];return g.specularColor=new fA(o[0],o[1],o[2]),C.specularColorTexture!==void 0&&t.push(I.assignTexture(g,"specularColorMap",C.specularColorTexture,gg)),Promise.all(t)}}class R3{constructor(A){this.parser=A,this.name=Kg.KHR_TEXTURE_BASISU}loadTexture(A){const g=this.parser,I=g.json,e=I.textures[A];if(!e.extensions||!e.extensions[this.name])return null;const t=e.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,t.source,C)}}class m3{constructor(A){this.parser=A,this.name=Kg.EXT_TEXTURE_WEBP,this.isSupported=null}loadTexture(A){const g=this.name,I=this.parser,e=I.json,t=e.textures[A];if(!t.extensions||!t.extensions[g])return null;const C=t.extensions[g],o=e.images[C.source];let s=I.textureLoader;if(o.uri){const n=I.options.manager.getHandler(o.uri);n!==null&&(s=n)}return this.detectSupport().then(function(n){if(n)return I.loadTextureImage(A,C.source,s);if(e.extensionsRequired&&e.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 F3{constructor(A){this.name=Kg.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 e=I.extensions[this.name],t=this.parser.getDependency("buffer",e.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 t.then(function(o){const s=e.byteOffset||0,n=e.byteLength||0,B=e.count,r=e.byteStride,a=new Uint8Array(o,s,n);return C.decodeGltfBufferAsync?C.decodeGltfBufferAsync(B,r,a,e.mode,e.filter).then(function(E){return E.buffer}):C.ready.then(function(){const E=new ArrayBuffer(B*r);return C.decodeGltfBuffer(new Uint8Array(E),B,r,a,e.mode,e.filter),E})})}else return null}}class N3{constructor(A){this.name=Kg.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 e=g.meshes[I.mesh];for(const n of e.primitives)if(n.mode!==pt.TRIANGLES&&n.mode!==pt.TRIANGLE_STRIP&&n.mode!==pt.TRIANGLE_FAN&&n.mode!==void 0)return null;const C=I.extensions[this.name].attributes,o=[],s={};for(const n in C)o.push(this.parser.getDependency("accessor",C[n]).then(B=>(s[n]=B,s[n])));return o.length<1?null:(o.push(this.parser.createNodeMesh(A)),Promise.all(o).then(n=>{const B=n.pop(),r=B.isGroup?B.children:[B],a=n[0].count,E=[];for(const c of r){const h=new zA,l=new M,u=new RA,w=new M(1,1,1),D=new nl(c.geometry,c.material,a);for(let d=0;d<a;d++)s.TRANSLATION&&l.fromBufferAttribute(s.TRANSLATION,d),s.ROTATION&&u.fromBufferAttribute(s.ROTATION,d),s.SCALE&&w.fromBufferAttribute(s.SCALE,d),D.setMatrixAt(d,h.compose(l,u,w));for(const d in s)d!=="TRANSLATION"&&d!=="ROTATION"&&d!=="SCALE"&&c.geometry.setAttribute(d,s[d]);LA.prototype.copy.call(D,c),D.frustumCulled=!1,this.parser.assignFinalMaterial(D),E.push(D)}return B.isGroup?(B.clear(),B.add(...E),B):E[0]}))}}const QN="glTF",ME=12,rN={JSON:1313821514,BIN:5130562};class K3{constructor(A){this.name=Kg.KHR_BINARY_GLTF,this.content=null,this.body=null;const g=new DataView(A,0,ME);if(this.header={magic:rC.decodeText(new Uint8Array(A.slice(0,4))),version:g.getUint32(4,!0),length:g.getUint32(8,!0)},this.header.magic!==QN)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-ME,e=new DataView(A,ME);let t=0;for(;t<I;){const C=e.getUint32(t,!0);t+=4;const o=e.getUint32(t,!0);if(t+=4,o===rN.JSON){const s=new Uint8Array(A,ME+t,C);this.content=rC.decodeText(s)}else if(o===rN.BIN){const s=ME+t;this.body=A.slice(s,s+C)}t+=C}if(this.content===null)throw new Error("THREE.GLTFLoader: JSON content not found.")}}class J3{constructor(A,g){if(!g)throw new Error("THREE.GLTFLoader: No DRACOLoader instance provided.");this.name=Kg.KHR_DRACO_MESH_COMPRESSION,this.json=A,this.dracoLoader=g,this.dracoLoader.preload()}decodePrimitive(A,g){const I=this.json,e=this.dracoLoader,t=A.extensions[this.name].bufferView,C=A.extensions[this.name].attributes,o={},s={},n={};for(const B in C){const r=ES[B]||B.toLowerCase();o[r]=C[B]}for(const B in A.attributes){const r=ES[B]||B.toLowerCase();if(C[B]!==void 0){const a=I.accessors[A.attributes[B]],E=Pa[a.componentType];n[r]=E.name,s[r]=a.normalized===!0}}return g.getDependency("bufferView",t).then(function(B){return new Promise(function(r){e.decodeDracoFile(B,function(a){for(const E in a.attributes){const c=a.attributes[E],h=s[E];h!==void 0&&(c.normalized=h)}r(a)},o,n)})})}}class q3{constructor(){this.name=Kg.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 L3{constructor(){this.name=Kg.KHR_MESH_QUANTIZATION}}class EN extends ua{constructor(A,g,I,e){super(A,g,I,e)}copySampleValue_(A){const g=this.resultBuffer,I=this.sampleValues,e=this.valueSize,t=A*e*3+e;for(let C=0;C!==e;C++)g[C]=I[t+C];return g}interpolate_(A,g,I,e){const t=this.resultBuffer,C=this.sampleValues,o=this.valueSize,s=o*2,n=o*3,B=e-g,r=(I-g)/B,a=r*r,E=a*r,c=A*n,h=c-n,l=-2*E+3*a,u=E-a,w=1-l,D=u-a+r;for(let d=0;d!==o;d++){const p=C[h+d+o],f=C[h+d+s]*B,S=C[c+d+o],y=C[c+d]*B;t[d]=w*p+D*f+l*S+u*y}return t}}const b3=new RA;class v3 extends EN{interpolate_(A,g,I,e){const t=super.interpolate_(A,g,I,e);return b3.fromArray(t).normalize().toArray(t),t}}const pt={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},Pa={5120:Int8Array,5121:Uint8Array,5122:Int16Array,5123:Uint16Array,5125:Uint32Array,5126:Float32Array},cN={9728:Zg,9729:Jg,9984:YB,9985:Ar,9986:HB,9987:Jt},hN={33071:de,33648:Ao,10497:at},rS={SCALAR:1,VEC2:2,VEC3:3,VEC4:4,MAT2:4,MAT3:9,MAT4:16},ES={POSITION:"position",NORMAL:"normal",TANGENT:"tangent",TEXCOORD_0:"uv",TEXCOORD_1:"uv2",COLOR_0:"color",WEIGHTS_0:"skinWeight",JOINTS_0:"skinIndex"},ms={scale:"scale",translation:"position",rotation:"quaternion",weights:"morphTargetInfluences"},lN={CUBICSPLINE:void 0,LINEAR:Io,STEP:rn},cS={OPAQUE:"OPAQUE",MASK:"MASK",BLEND:"BLEND"};function x3(i){return i.DefaultMaterial===void 0&&(i.DefaultMaterial=new vr({color:16777215,emissive:0,metalness:1,roughness:1,transparent:!1,depthTest:!0,side:di})),i.DefaultMaterial}function UE(i,A,g){for(const I in g.extensions)i[I]===void 0&&(A.userData.gltfExtensions=A.userData.gltfExtensions||{},A.userData.gltfExtensions[I]=g.extensions[I])}function Fs(i,A){A.extras!==void 0&&(typeof A.extras=="object"?Object.assign(i.userData,A.extras):console.warn("THREE.GLTFLoader: Ignoring primitive type .extras, "+A.extras))}function Y3(i,A,g){let I=!1,e=!1,t=!1;for(let n=0,B=A.length;n<B;n++){const r=A[n];if(r.POSITION!==void 0&&(I=!0),r.NORMAL!==void 0&&(e=!0),r.COLOR_0!==void 0&&(t=!0),I&&e&&t)break}if(!I&&!e&&!t)return Promise.resolve(i);const C=[],o=[],s=[];for(let n=0,B=A.length;n<B;n++){const r=A[n];if(I){const a=r.POSITION!==void 0?g.getDependency("accessor",r.POSITION):i.attributes.position;C.push(a)}if(e){const a=r.NORMAL!==void 0?g.getDependency("accessor",r.NORMAL):i.attributes.normal;o.push(a)}if(t){const a=r.COLOR_0!==void 0?g.getDependency("accessor",r.COLOR_0):i.attributes.color;s.push(a)}}return Promise.all([Promise.all(C),Promise.all(o),Promise.all(s)]).then(function(n){const B=n[0],r=n[1],a=n[2];return I&&(i.morphAttributes.position=B),e&&(i.morphAttributes.normal=r),t&&(i.morphAttributes.color=a),i.morphTargetsRelative=!0,i})}function H3(i,A){if(i.updateMorphTargets(),A.weights!==void 0)for(let g=0,I=A.weights.length;g<I;g++)i.morphTargetInfluences[g]=A.weights[g];if(A.extras&&Array.isArray(A.extras.targetNames)){const g=A.extras.targetNames;if(i.morphTargetInfluences.length===g.length){i.morphTargetDictionary={};for(let I=0,e=g.length;I<e;I++)i.morphTargetDictionary[g[I]]=I}else console.warn("THREE.GLTFLoader: Invalid extras.targetNames length. Ignoring names.")}}function T3(i){const A=i.extensions&&i.extensions[Kg.KHR_DRACO_MESH_COMPRESSION];let g;return A?g="draco:"+A.bufferView+":"+A.indices+":"+DN(A.attributes):g=i.indices+":"+DN(i.attributes)+":"+i.mode,g}function DN(i){let A="";const g=Object.keys(i).sort();for(let I=0,e=g.length;I<e;I++)A+=g[I]+":"+i[g[I]]+";";return A}function hS(i){switch(i){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 dN(i){let A=i.array;if(i.normalized){const g=hS(A.constructor),I=new Float32Array(A.length);for(let e=0,t=A.length;e<t;e++)I[e]=A[e]*g;A=I}return A}function lS(i){i.createInterpolant=function(g){const I=this instanceof QC?v3:EN;return new I(this.times,this.values,this.getValueSize()/3,g)},i.createInterpolant.isInterpolantFactoryMethodGLTFCubicSpline=!0}function O3(i){return i.search(/\.jpe?g($|\?)/i)>0||i.search(/^data\:image\/jpeg/)===0?"image/jpeg":i.search(/\.webp($|\?)/i)>0||i.search(/^data\:image\/webp/)===0?"image/webp":"image/png"}class _3{constructor(A={},g={}){this.json=A,this.extensions={},this.plugins={},this.options=g,this.cache=new D3,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,e=!1,t=-1;typeof navigator<"u"&&(I=/^((?!chrome|android).)*safari/i.test(navigator.userAgent)===!0,e=navigator.userAgent.indexOf("Firefox")>-1,t=e?navigator.userAgent.match(/Firefox\/([0-9]+)\./)[1]:-1),typeof createImageBitmap>"u"||I||e&&t<98?this.textureLoader=new Rn(this.options.manager):this.textureLoader=new PU(this.options.manager),this.textureLoader.setCrossOrigin(this.options.crossOrigin),this.textureLoader.setRequestHeader(this.options.requestHeader),this.fileLoader=new re(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,e=this.json,t=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][e.scene||0],scenes:C[0],animations:C[1],cameras:C[2],asset:e.asset,parser:I,userData:{}};UE(t,o,e),Fs(o,e),Promise.all(I._invokeAll(function(s){return s.afterRoot&&s.afterRoot(o)})).then(function(){A(o)})}).catch(g)}_markDefs(){const A=this.json.nodes||[],g=this.json.skins||[],I=this.json.meshes||[];for(let e=0,t=g.length;e<t;e++){const C=g[e].joints;for(let o=0,s=C.length;o<s;o++)A[C[o]].isBone=!0}for(let e=0,t=A.length;e<t;e++){const C=A[e];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 e=I.clone(),t=(C,o)=>{const s=this.associations.get(C);s!=null&&this.associations.set(o,s);for(const[n,B]of C.children.entries())t(B,o.children[n])};return t(I,e),e.name+="_instance_"+A.uses[g]++,e}_invokeOne(A){const g=Object.values(this.plugins);g.push(this);for(let I=0;I<g.length;I++){const e=A(g[I]);if(e)return e}return null}_invokeAll(A){const g=Object.values(this.plugins);g.unshift(this);const I=[];for(let e=0;e<g.length;e++){const t=A(g[e]);t&&I.push(t)}return I}getDependency(A,g){const I=A+":"+g;let e=this.cache.get(I);if(!e){switch(A){case"scene":e=this.loadScene(g);break;case"node":e=this.loadNode(g);break;case"mesh":e=this._invokeOne(function(t){return t.loadMesh&&t.loadMesh(g)});break;case"accessor":e=this.loadAccessor(g);break;case"bufferView":e=this._invokeOne(function(t){return t.loadBufferView&&t.loadBufferView(g)});break;case"buffer":e=this.loadBuffer(g);break;case"material":e=this._invokeOne(function(t){return t.loadMaterial&&t.loadMaterial(g)});break;case"texture":e=this._invokeOne(function(t){return t.loadTexture&&t.loadTexture(g)});break;case"skin":e=this.loadSkin(g);break;case"animation":e=this._invokeOne(function(t){return t.loadAnimation&&t.loadAnimation(g)});break;case"camera":e=this.loadCamera(g);break;case"light":e=this._invokeOne(function(t){return t._loadLight&&t._loadLight(g)});break;default:if(e=this._invokeOne(function(t){return t!=this&&t.getDependency&&t.getDependency(A,g)}),!e)throw new Error("Unknown type: "+A);break}this.cache.add(I,e)}return e}getDependencies(A){let g=this.cache.get(A);if(!g){const I=this,e=this.json[A+(A==="mesh"?"es":"s")]||[];g=Promise.all(e.map(function(t,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[Kg.KHR_BINARY_GLTF].body);const e=this.options;return new Promise(function(t,C){I.load(rC.resolveURL(g.uri,e.path),t,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 e=g.byteLength||0,t=g.byteOffset||0;return I.slice(t,t+e)})}loadAccessor(A){const g=this,I=this.json,e=this.json.accessors[A];if(e.bufferView===void 0&&e.sparse===void 0){const C=rS[e.type],o=Pa[e.componentType],s=e.normalized===!0,n=new o(e.count*C);return Promise.resolve(new Qg(n,C,s))}const t=[];return e.bufferView!==void 0?t.push(this.getDependency("bufferView",e.bufferView)):t.push(null),e.sparse!==void 0&&(t.push(this.getDependency("bufferView",e.sparse.indices.bufferView)),t.push(this.getDependency("bufferView",e.sparse.values.bufferView))),Promise.all(t).then(function(C){const o=C[0],s=rS[e.type],n=Pa[e.componentType],B=n.BYTES_PER_ELEMENT,r=B*s,a=e.byteOffset||0,E=e.bufferView!==void 0?I.bufferViews[e.bufferView].byteStride:void 0,c=e.normalized===!0;let h,l;if(E&&E!==r){const u=Math.floor(a/E),w="InterleavedBuffer:"+e.bufferView+":"+e.componentType+":"+u+":"+e.count;let D=g.cache.get(w);D||(h=new n(o,u*E,e.count*E/B),D=new lr(h,E/B),g.cache.add(w,D)),l=new Bo(D,s,a%E/B,c)}else o===null?h=new n(e.count*s):h=new n(o,a,e.count*s),l=new Qg(h,s,c);if(e.sparse!==void 0){const u=rS.SCALAR,w=Pa[e.sparse.indices.componentType],D=e.sparse.indices.byteOffset||0,d=e.sparse.values.byteOffset||0,p=new w(C[1],D,e.sparse.count*u),f=new n(C[2],d,e.sparse.count*s);o!==null&&(l=new Qg(l.array.slice(),l.itemSize,l.normalized));for(let S=0,y=p.length;S<y;S++){const G=p[S];if(l.setX(G,f[S*s]),s>=2&&l.setY(G,f[S*s+1]),s>=3&&l.setZ(G,f[S*s+2]),s>=4&&l.setW(G,f[S*s+3]),s>=5)throw new Error("THREE.GLTFLoader: Unsupported itemSize in sparse BufferAttribute.")}}return l})}loadTexture(A){const g=this.json,I=this.options,t=g.textures[A].source,C=g.images[t];let o=this.textureLoader;if(C.uri){const s=I.manager.getHandler(C.uri);s!==null&&(o=s)}return this.loadTextureImage(A,t,o)}loadTextureImage(A,g,I){const e=this,t=this.json,C=t.textures[A],o=t.images[g],s=(o.uri||o.bufferView)+":"+C.sampler;if(this.textureCache[s])return this.textureCache[s];const n=this.loadImageSource(g,I).then(function(B){B.flipY=!1,B.name=C.name||o.name||"";const a=(t.samplers||{})[C.sampler]||{};return B.magFilter=cN[a.magFilter]||Jg,B.minFilter=cN[a.minFilter]||Jt,B.wrapS=hN[a.wrapS]||at,B.wrapT=hN[a.wrapT]||at,B.anisotropy=4,e.associations.set(B,{textures:A}),B}).catch(function(){return null});return this.textureCache[s]=n,n}loadImageSource(A,g){const I=this,e=this.json,t=this.options;if(this.sourceCache[A]!==void 0)return this.sourceCache[A].then(r=>r.clone());const C=e.images[A],o=self.URL||self.webkitURL;let s=C.uri||"",n=!1;if(C.bufferView!==void 0)s=I.getDependency("bufferView",C.bufferView).then(function(r){n=!0;const a=new Blob([r],{type:C.mimeType});return s=o.createObjectURL(a),s});else if(C.uri===void 0)throw new Error("THREE.GLTFLoader: Image "+A+" is missing URI and bufferView");const B=Promise.resolve(s).then(function(r){return new Promise(function(a,E){let c=a;g.isImageBitmapLoader===!0&&(c=function(h){const l=new qg(h);l.needsUpdate=!0,a(l)}),g.load(rC.resolveURL(r,t.path),c,void 0,E)})}).then(function(r){return n===!0&&o.revokeObjectURL(s),r.userData.mimeType=C.mimeType||O3(C.uri),r}).catch(function(r){throw console.error("THREE.GLTFLoader: Couldn't load texture",s),r});return this.sourceCache[A]=B,B}assignTexture(A,g,I,e){const t=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."),t.extensions[Kg.KHR_TEXTURE_TRANSFORM]){const o=I.extensions!==void 0?I.extensions[Kg.KHR_TEXTURE_TRANSFORM]:void 0;if(o){const s=t.associations.get(C);C=t.extensions[Kg.KHR_TEXTURE_TRANSFORM].extendTexture(C,o),t.associations.set(C,s)}}return e!==void 0&&C&&(C.encoding=e),A[g]=C,C})}assignFinalMaterial(A){const g=A.geometry;let I=A.material;const e=g.attributes.tangent===void 0,t=g.attributes.color!==void 0,C=g.attributes.normal===void 0;if(A.isPoints){const o="PointsMaterial:"+I.uuid;let s=this.cache.get(o);s||(s=new al,Fg.prototype.copy.call(s,I),s.color.copy(I.color),s.map=I.map,s.sizeAttenuation=!1,this.cache.add(o,s)),I=s}else if(A.isLine){const o="LineBasicMaterial:"+I.uuid;let s=this.cache.get(o);s||(s=new HI,Fg.prototype.copy.call(s,I),s.color.copy(I.color),this.cache.add(o,s)),I=s}if(e||t||C){let o="ClonedMaterial:"+I.uuid+":";e&&(o+="derivative-tangents:"),t&&(o+="vertex-colors:"),C&&(o+="flat-shading:");let s=this.cache.get(o);s||(s=I.clone(),t&&(s.vertexColors=!0),C&&(s.flatShading=!0),e&&(s.normalScale&&(s.normalScale.y*=-1),s.clearcoatNormalScale&&(s.clearcoatNormalScale.y*=-1)),this.cache.add(o,s),this.associations.set(s,this.associations.get(I))),I=s}I.aoMap&&g.attributes.uv2===void 0&&g.attributes.uv!==void 0&&g.setAttribute("uv2",g.attributes.uv),A.material=I}getMaterialType(){return vr}loadMaterial(A){const g=this,I=this.json,e=this.extensions,t=I.materials[A];let C;const o={},s=t.extensions||{},n=[];if(s[Kg.KHR_MATERIALS_UNLIT]){const r=e[Kg.KHR_MATERIALS_UNLIT];C=r.getMaterialType(),n.push(r.extendParams(o,t,g))}else{const r=t.pbrMetallicRoughness||{};if(o.color=new fA(1,1,1),o.opacity=1,Array.isArray(r.baseColorFactor)){const a=r.baseColorFactor;o.color.fromArray(a),o.opacity=a[3]}r.baseColorTexture!==void 0&&n.push(g.assignTexture(o,"map",r.baseColorTexture,gg)),o.metalness=r.metallicFactor!==void 0?r.metallicFactor:1,o.roughness=r.roughnessFactor!==void 0?r.roughnessFactor:1,r.metallicRoughnessTexture!==void 0&&(n.push(g.assignTexture(o,"metalnessMap",r.metallicRoughnessTexture)),n.push(g.assignTexture(o,"roughnessMap",r.metallicRoughnessTexture))),C=this._invokeOne(function(a){return a.getMaterialType&&a.getMaterialType(A)}),n.push(Promise.all(this._invokeAll(function(a){return a.extendMaterialParams&&a.extendMaterialParams(A,o)})))}t.doubleSided===!0&&(o.side=DI);const B=t.alphaMode||cS.OPAQUE;if(B===cS.BLEND?(o.transparent=!0,o.depthWrite=!1):(o.transparent=!1,B===cS.MASK&&(o.alphaTest=t.alphaCutoff!==void 0?t.alphaCutoff:.5)),t.normalTexture!==void 0&&C!==aI&&(n.push(g.assignTexture(o,"normalMap",t.normalTexture)),o.normalScale=new AA(1,1),t.normalTexture.scale!==void 0)){const r=t.normalTexture.scale;o.normalScale.set(r,r)}return t.occlusionTexture!==void 0&&C!==aI&&(n.push(g.assignTexture(o,"aoMap",t.occlusionTexture)),t.occlusionTexture.strength!==void 0&&(o.aoMapIntensity=t.occlusionTexture.strength)),t.emissiveFactor!==void 0&&C!==aI&&(o.emissive=new fA().fromArray(t.emissiveFactor)),t.emissiveTexture!==void 0&&C!==aI&&n.push(g.assignTexture(o,"emissiveMap",t.emissiveTexture,gg)),Promise.all(n).then(function(){const r=new C(o);return t.name&&(r.name=t.name),Fs(r,t),g.associations.set(r,{materials:A}),t.extensions&&UE(e,r,t),r})}createUniqueName(A){const g=Ng.sanitizeNodeName(A||"");let I=g;for(let e=1;this.nodeNamesUsed[I];++e)I=g+"_"+e;return this.nodeNamesUsed[I]=!0,I}loadGeometries(A){const g=this,I=this.extensions,e=this.primitiveCache;function t(o){return I[Kg.KHR_DRACO_MESH_COMPRESSION].decodePrimitive(o,g).then(function(s){return pN(s,o,g)})}const C=[];for(let o=0,s=A.length;o<s;o++){const n=A[o],B=T3(n),r=e[B];if(r)C.push(r.promise);else{let a;n.extensions&&n.extensions[Kg.KHR_DRACO_MESH_COMPRESSION]?a=t(n):a=pN(new lg,n,g),e[B]={primitive:n,promise:a},C.push(a)}}return Promise.all(C)}loadMesh(A){const g=this,I=this.json,e=this.extensions,t=I.meshes[A],C=t.primitives,o=[];for(let s=0,n=C.length;s<n;s++){const B=C[s].material===void 0?x3(this.cache):this.getDependency("material",C[s].material);o.push(B)}return o.push(g.loadGeometries(C)),Promise.all(o).then(function(s){const n=s.slice(0,s.length-1),B=s[s.length-1],r=[];for(let E=0,c=B.length;E<c;E++){const h=B[E],l=C[E];let u;const w=n[E];if(l.mode===pt.TRIANGLES||l.mode===pt.TRIANGLE_STRIP||l.mode===pt.TRIANGLE_FAN||l.mode===void 0)u=t.isSkinnedMesh===!0?new pr(h,w):new GA(h,w),u.isSkinnedMesh===!0&&!u.geometry.attributes.skinWeight.normalized&&u.normalizeSkinWeights(),l.mode===pt.TRIANGLE_STRIP?u.geometry=wN(u.geometry,xk):l.mode===pt.TRIANGLE_FAN&&(u.geometry=wN(u.geometry,Vp));else if(l.mode===pt.LINES)u=new Oi(h,w);else if(l.mode===pt.LINE_STRIP)u=new TI(h,w);else if(l.mode===pt.LINE_LOOP)u=new Hw(h,w);else if(l.mode===pt.POINTS)u=new Ow(h,w);else throw new Error("THREE.GLTFLoader: Primitive mode unsupported: "+l.mode);Object.keys(u.geometry.morphAttributes).length>0&&H3(u,t),u.name=g.createUniqueName(t.name||"mesh_"+A),Fs(u,t),l.extensions&&UE(e,u,l),g.assignFinalMaterial(u),r.push(u)}for(let E=0,c=r.length;E<c;E++)g.associations.set(r[E],{meshes:A,primitives:E});if(r.length===1)return r[0];const a=new xt;g.associations.set(a,{meshes:A});for(let E=0,c=r.length;E<c;E++)a.add(r[E]);return a})}loadCamera(A){let g;const I=this.json.cameras[A],e=I[I.type];if(!e){console.warn("THREE.GLTFLoader: Missing camera parameters.");return}return I.type==="perspective"?g=new zg(ui.radToDeg(e.yfov),e.aspectRatio||1,e.znear||1,e.zfar||2e6):I.type==="orthographic"&&(g=new oa(-e.xmag,e.xmag,e.ymag,-e.ymag,e.znear,e.zfar)),I.name&&(g.name=this.createUniqueName(I.name)),Fs(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(e){return I.inverseBindMatrices=e,I})}loadAnimation(A){const g=this.json,I=this,e=g.animations[A],t=[],C=[],o=[],s=[],n=[];let B=0,r=e.channels.length;for(B=0,r=e.channels.length;B<r;B++){const a=e.channels[B],E=e.samplers[a.sampler],c=a.target,h=e.parameters!==void 0?e.parameters[E.input]:E.input,l=e.parameters!==void 0?e.parameters[E.output]:E.output,u=I._invokeOne(function(w){return w.loadAnimationTargetFromChannel&&w.loadAnimationTargetFromChannel(a)});t.push(u),C.push(this.getDependency("accessor",h)),o.push(this.getDependency("accessor",l)),s.push(E),n.push(c)}return Promise.all([Promise.all(t),Promise.all(C),Promise.all(o),Promise.all(s),Promise.all(n)]).then(function(a){const E=a[0],c=a[1],h=a[2],l=a[3],u=a[4],w=[];for(B=0,r=E.length;B<r;B++){const d=E[B],p=c[B],f=h[B],S=l[B],y=u[B];if(d===void 0)continue;d.updateMatrix&&(d.updateMatrix(),d.matrixAutoUpdate=!0);const G=I._invokeOne(function(k){return k.createAnimationTracks&&k.createAnimationTracks(d,p,f,S,y)});if(G)for(let k=0;k<G.length;k++)w.push(G[k])}const D=e.name?e.name:"animation_"+A;return new Tt(D,void 0,w)})}createNodeMesh(A){const g=this.json,I=this,e=g.nodes[A];return e.mesh===void 0?null:I.getDependency("mesh",e.mesh).then(function(t){const C=I._getNodeRef(I.meshCache,e.mesh,t);return e.weights!==void 0&&C.traverse(function(o){if(o.isMesh)for(let s=0,n=e.weights.length;s<n;s++)o.morphTargetInfluences[s]=e.weights[s]}),C})}loadNode(A){const g=this.json,I=this.extensions,e=this,t=g.nodes[A],C=t.name?e.createUniqueName(t.name):"";return function(){const o=[],s=e._invokeOne(function(n){return n.createNodeMesh&&n.createNodeMesh(A)});return s&&o.push(s),t.camera!==void 0&&o.push(e.getDependency("camera",t.camera).then(function(n){return e._getNodeRef(e.cameraCache,t.camera,n)})),e._invokeAll(function(n){return n.createNodeAttachment&&n.createNodeAttachment(A)}).forEach(function(n){o.push(n)}),Promise.all(o)}().then(function(o){let s;if(t.isBone===!0?s=new wr:o.length>1?s=new xt:o.length===1?s=o[0]:s=new LA,s!==o[0])for(let n=0,B=o.length;n<B;n++)s.add(o[n]);if(t.name&&(s.userData.name=t.name,s.name=C),Fs(s,t),t.extensions&&UE(I,s,t),t.matrix!==void 0){const n=new zA;n.fromArray(t.matrix),s.applyMatrix4(n)}else t.translation!==void 0&&s.position.fromArray(t.translation),t.rotation!==void 0&&s.quaternion.fromArray(t.rotation),t.scale!==void 0&&s.scale.fromArray(t.scale);return e.associations.has(s)||e.associations.set(s,{}),e.associations.get(s).nodes=A,s})}loadScene(A){const g=this.json,I=this.extensions,e=this.json.scenes[A],t=this,C=new xt;e.name&&(C.name=t.createUniqueName(e.name)),Fs(C,e),e.extensions&&UE(I,C,e);const o=e.nodes||[],s=[];for(let n=0,B=o.length;n<B;n++)s.push(uN(o[n],C,g,t));return Promise.all(s).then(function(){const n=B=>{const r=new Map;for(const[a,E]of t.associations)(a instanceof Fg||a instanceof qg)&&r.set(a,E);return B.traverse(a=>{const E=t.associations.get(a);E!=null&&r.set(a,E)}),r};return t.associations=n(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,e,t){const C=[],o=A.name?A.name:A.uuid,s=[];ms[t.path]===ms.weights?A.traverse(function(a){a.morphTargetInfluences&&s.push(a.name?a.name:a.uuid)}):s.push(o);let n;switch(ms[t.path]){case ms.weights:n=Bs;break;case ms.rotation:n=QC;break;case ms.position:case ms.scale:default:switch(I.itemSize){case 1:n=Bs;break;case 2:case 3:n=as;break;case 4:n=xr;break}break}const B=e.interpolation!==void 0?lN[e.interpolation]:Io,r=dN(I);for(let a=0,E=s.length;a<E;a++){const c=new n(s[a]+"."+ms[t.path],g.array,r,B);B==="CUBICSPLINE"&&lS(c),C.push(c)}return C}}function uN(i,A,g,I){const e=g.nodes[i];return I.getDependency("node",i).then(function(t){if(e.skin===void 0)return t;let C;return I.getDependency("skin",e.skin).then(function(o){C=o;const s=[];for(let n=0,B=C.joints.length;n<B;n++)s.push(I.getDependency("node",C.joints[n]));return Promise.all(s)}).then(function(o){return t.traverse(function(s){if(!s.isMesh)return;const n=[],B=[];for(let r=0,a=o.length;r<a;r++){const E=o[r];if(E){n.push(E);const c=new zA;C.inverseBindMatrices!==void 0&&c.fromArray(C.inverseBindMatrices.array,r*16),B.push(c)}else console.warn('THREE.GLTFLoader: Joint "%s" could not be found.',C.joints[r])}s.bind(new ca(n,B),s.matrixWorld)}),t})}).then(function(t){A.add(t);const C=[];if(e.children){const o=e.children;for(let s=0,n=o.length;s<n;s++){const B=o[s];C.push(uN(B,t,g,I))}}return Promise.all(C)})}function P3(i,A,g){const I=A.attributes,e=new je;if(I.POSITION!==void 0){const o=g.json.accessors[I.POSITION],s=o.min,n=o.max;if(s!==void 0&&n!==void 0){if(e.set(new M(s[0],s[1],s[2]),new M(n[0],n[1],n[2])),o.normalized){const B=hS(Pa[o.componentType]);e.min.multiplyScalar(B),e.max.multiplyScalar(B)}}else{console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.");return}}else return;const t=A.targets;if(t!==void 0){const o=new M,s=new M;for(let n=0,B=t.length;n<B;n++){const r=t[n];if(r.POSITION!==void 0){const a=g.json.accessors[r.POSITION],E=a.min,c=a.max;if(E!==void 0&&c!==void 0){if(s.setX(Math.max(Math.abs(E[0]),Math.abs(c[0]))),s.setY(Math.max(Math.abs(E[1]),Math.abs(c[1]))),s.setZ(Math.max(Math.abs(E[2]),Math.abs(c[2]))),a.normalized){const h=hS(Pa[a.componentType]);s.multiplyScalar(h)}o.max(s)}else console.warn("THREE.GLTFLoader: Missing min/max properties for accessor POSITION.")}}e.expandByVector(o)}i.boundingBox=e;const C=new sC;e.getCenter(C.center),C.radius=e.min.distanceTo(e.max)/2,i.boundingSphere=C}function pN(i,A,g){const I=A.attributes,e=[];function t(C,o){return g.getDependency("accessor",C).then(function(s){i.setAttribute(o,s)})}for(const C in I){const o=ES[C]||C.toLowerCase();o in i.attributes||e.push(t(I[C],o))}if(A.indices!==void 0&&!i.index){const C=g.getDependency("accessor",A.indices).then(function(o){i.setIndex(o)});e.push(C)}return Fs(i,A),P3(i,A,g),Promise.all(e).then(function(){return A.targets!==void 0?Y3(i,A.targets,g):i})}function wN(i,A){let g=i.getIndex();if(g===null){const C=[],o=i.getAttribute("position");if(o!==void 0){for(let s=0;s<o.count;s++)C.push(s);i.setIndex(C),g=i.getIndex()}else return console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Undefined position attribute. Processing not possible."),i}const I=g.count-2,e=[];if(A===Vp)for(let C=1;C<=I;C++)e.push(g.getX(0)),e.push(g.getX(C)),e.push(g.getX(C+1));else for(let C=0;C<I;C++)C%2===0?(e.push(g.getX(C)),e.push(g.getX(C+1)),e.push(g.getX(C+2))):(e.push(g.getX(C+2)),e.push(g.getX(C+1)),e.push(g.getX(C)));e.length/3!==I&&console.error("THREE.GLTFLoader.toTrianglesDrawMode(): Unable to generate correct amount of triangles.");const t=i.clone();return t.setIndex(e),t}var fN=(i=>(i[i.INT=5124]="INT",i[i.FLOAT=5126]="FLOAT",i[i.FLOAT_VEC2=35664]="FLOAT_VEC2",i[i.FLOAT_VEC3=35665]="FLOAT_VEC3",i[i.FLOAT_VEC4=35666]="FLOAT_VEC4",i[i.INT_VEC2=35667]="INT_VEC2",i[i.INT_VEC3=35668]="INT_VEC3",i[i.INT_VEC4=35669]="INT_VEC4",i[i.BOOL=35670]="BOOL",i[i.BOOL_VEC2=35671]="BOOL_VEC2",i[i.BOOL_VEC3=35672]="BOOL_VEC3",i[i.BOOL_VEC4=35673]="BOOL_VEC4",i[i.FLOAT_MAT2=35674]="FLOAT_MAT2",i[i.FLOAT_MAT3=35675]="FLOAT_MAT3",i[i.FLOAT_MAT4=35676]="FLOAT_MAT4",i[i.SAMPLER_2D=35678]="SAMPLER_2D",i[i.SAMPLER_3D=35680]="SAMPLER_3D",i[i.SAMPLER_CUBE=35681]="SAMPLER_CUBE",i[i.UNKNOWN=0]="UNKNOWN",i))(fN||{});const So=cA("debugcustomshader"),Wa="NEEDLE_techniques_webgl";class W3{constructor(){Q(this,"objectToWorldMatrix",new zA);Q(this,"worldToObjectMatrix",new zA);Q(this,"objectToWorld",new Array);Q(this,"worldToObject",new Array)}updateFrom(A){this.objectToWorldMatrix.copy(A.matrixWorld),WD(this.objectToWorldMatrix,this.objectToWorld),this.worldToObjectMatrix.copy(A.matrixWorld).invert(),WD(this.worldToObjectMatrix,this.worldToObject)}}const kI=class extends of{constructor(g,...I){super(...I);Q(this,"identifier");Q(this,"onBeforeRenderSceneCallback",this.onBeforeRenderScene.bind(this));Q(this,"_sphericalHarmonicsName","unity_SpecCube0");Q(this,"_objToWorldName","hlslcc_mtx4x4unity_ObjectToWorld");Q(this,"_worldToObjectName","hlslcc_mtx4x4unity_WorldToObject");Q(this,"_viewProjectionName","hlslcc_mtx4x4unity_MatrixVP");Q(this,"_viewMatrixName","hlslcc_mtx4x4unity_MatrixV");Q(this,"_rendererData",new W3);this.identifier=g,So&&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)&&bg.Current.pre_render_callbacks.push(this.onBeforeRenderSceneCallback)}clone(){const g=super.clone();return yN(g),g}dispose(){super.dispose();const g=bg.Current.pre_render_callbacks.indexOf(this.onBeforeRenderSceneCallback);g>=0&&bg.Current.pre_render_callbacks.splice(g,1)}async waitForLighting(){const g=bg.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}So&&console.log(I);const e=I.array,t=I.texture;this.uniforms.unity_SpecCube0={value:t},MF(this.uniforms,e);const C=Math.sqrt(Math.PI*.5);this.uniforms.unity_SpecCube0_HDR={value:new ng(C,C,C,C)},So&&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&&bg.Current.setRequireColor(!0),this.depthTextureUniform&&bg.Current.setRequireDepth(!0)}onBeforeRender(g,I,e,t,C,o){t.attributes.tangent||t.computeTangents(),this.onUpdateUniforms(e,C)}onUpdateUniforms(g,I){const e=bg.Current;g&&(kI.viewProjection&&this.uniforms[this._viewProjectionName]&&(kI.viewProjection.copy(g.projectionMatrix).multiply(g.matrixWorldInverse),WD(kI.viewProjection,kI._viewProjectionValues)),kI.viewMatrix&&this.uniforms[this._viewMatrixName]&&(kI.viewMatrix.copy(g.matrixWorldInverse),WD(kI.viewMatrix,kI._viewMatrixValues)),this.uniforms[kI._worldSpaceCameraPosName]&&kI._worldSpaceCameraPos.setFromMatrixPosition(g.matrixWorld)),this.uniforms._TimeParameters?this.uniforms._TimeParameters.value=e.rendererData.timeVec4:this.uniforms._Time&&(this.uniforms._Time.value=e.rendererData.timeVec4);const t=e.mainLight;if(t){const s=fg(t.gameObject,kI._mainLightPosition);this.uniforms._MainLightPosition={value:s.normalize()},kI._mainLightColor.set(t.color.r,t.color.g,t.color.b,0),this.uniforms._MainLightColor={value:kI._mainLightColor};const n=t.intensity;kI._lightData.z=n,this.uniforms.unity_LightData={value:kI._lightData}}if(g&&(kI.viewProjection&&this.uniforms[this._viewProjectionName]&&(this.uniforms[this._viewProjectionName].value=kI._viewProjectionValues),kI.viewMatrix&&this.uniforms[this._viewMatrixName]&&(this.uniforms[this._viewMatrixName].value=kI._viewMatrixValues),this.uniforms[kI._worldSpaceCameraPosName]&&(this.uniforms[kI._worldSpaceCameraPosName]={value:kI._worldSpaceCameraPos}),e.mainCameraComponent)){if(this.uniforms._ProjectionParams){const s=this.uniforms._ProjectionParams.value;s.x=1,s.y=e.mainCameraComponent.nearClipPlane,s.z=e.mainCameraComponent.farClipPlane,s.w=1/s.z,this.uniforms._ProjectionParams.value=s}if(this.uniforms._ZBufferParams){const s=this.uniforms._ZBufferParams.value,n=e.mainCameraComponent;s.x=1-n.farClipPlane/n.nearClipPlane,s.y=n.farClipPlane/n.nearClipPlane,s.z=s.x/n.farClipPlane,s.w=s.y/n.farClipPlane,this.uniforms._ZBufferParams.value=s}if(this.uniforms._ScreenParams){const s=this.uniforms._ScreenParams.value;s.x=e.domWidth,s.y=e.domHeight,s.z=1+1/s.x,s.w=1+1/s.y,this.uniforms._ScreenParams.value=s}}const C=this.depthTextureUniform;C&&(C.value=e.depthTexture);const o=this.opaqueTextureUniform;if(o&&(o.value=e.opaqueColorTexture),I){const s=this._rendererData;s.updateFrom(I),this.uniforms[this._worldToObjectName].value=s.worldToObject,this.uniforms[this._objToWorldName].value=s.objectToWorld}this.uniformsNeedUpdate=!0}};let wt=kI;Q(wt,"viewProjection",new zA),Q(wt,"_viewProjectionValues",[]),Q(wt,"viewMatrix",new zA),Q(wt,"_viewMatrixValues",[]),Q(wt,"_worldSpaceCameraPosName","_WorldSpaceCameraPos"),Q(wt,"_worldSpaceCameraPos",new M),Q(wt,"_mainLightColor",new ng),Q(wt,"_mainLightPosition",new M),Q(wt,"_lightData",new ng);class j3{constructor(A,g){Q(this,"parser");Q(this,"identifier");this.parser=A,this.identifier=g}get name(){return Wa}loadMaterial(A){const g=this.parser.json.materials[A];if(!g)return So&&console.log(A,this.parser.json.materials),null;if(!g.extensions||!g.extensions[Wa])return So&&console.log("material "+A+" does not use NEEDLE_techniques_webgl"),null;const I=g.extensions[Wa].technique;if(I<0)return null;const e=this.parser.json.extensions[Wa];if(!e)return null;So&&console.log(e);const t=e.techniques[I];return t?new Promise(async(C,o)=>{var u,w,D;const s=await G1(e,t.program),n=s==null?void 0:s.fragmentShader,B=s==null?void 0:s.vertexShader;if(!n||!B)return o();So&&console.log("loadMaterial",g,s);const r={},a=t.uniforms;B.includes("_Time")&&(r._Time={value:new ng(0,0,0,0)});for(const d in a){const p=d;switch(p){case"_TimeParameters":const f=new ng;r[p]={value:f};break;case"hlslcc_mtx4x4unity_MatrixV":case"hlslcc_mtx4x4unity_MatrixVP":r[p]={value:[]};break;case"_MainLightPosition":case"_MainLightColor":case"_WorldSpaceCameraPos":r[p]={value:[0,0,0,1]};break;case"unity_OrthoParams":break;case"unity_SpecCube0":r[p]={value:null};break;default:case"_ScreenParams":case"_ZBufferParams":case"_ProjectionParams":r[p]={value:[0,0,0,0]};break;case"_CameraOpaqueTexture":case"_CameraDepthTexture":r[p]={value:null};break}}let E=!1;if(g.extensions&&g.extensions[Wa]){const d=g.extensions[Wa];if(d.technique===I){So&&console.log(g.name,"Material Properties",d);for(const p in d.values){const f=d.values[p];if(typeof f=="string"){if(f.startsWith("/textures/")){const S=f.substring(10),y=Number.parseInt(S);if(y>=0){const G=await this.parser.getDependency("texture",y);G&&(G.encoding=xI,G.needsUpdate=!0),r[p]={value:G};continue}}switch(p){case"alphaMode":f==="BLEND"&&(E=!0);continue}}if(Array.isArray(f)&&f.length===4){r[p]={value:new ng(f[0],f[1],f[2],f[3])};continue}r[p]={value:f}}}}const c=new wt(this.identifier,{name:g.name??"",uniforms:r,vertexShader:B,fragmentShader:n,lights:!1});switch((u=r._Cull)==null?void 0:u.value){case 0:c.side=DI;break;case 1:c.side=De;break;case 2:c.side=di;break;default:c.side=di;break}switch((w=r._ZTest)==null?void 0:w.value){case 3:c.depthTest=!0,c.depthFunc=bB;break;case 6:c.depthTest=!0,c.depthFunc=VQ;break;case 2:c.depthTest=!0,c.depthFunc=zQ;break;case 4:c.depthTest=!0,c.depthFunc=LB;break;case 5:c.depthTest=!0,c.depthFunc=Eh;break;case 7:c.depthTest=!0,c.depthFunc=rh;break;case 8:c.depthTest=!1,c.depthFunc=Qh;break}c.transparent=E,E&&(c.depthWrite=!1),MF(r),c.onUpdateUniforms();for(const d in a){const p=d,f=a[d].type;if(((D=r[p])==null?void 0:D.value)===void 0)switch(f){case fN.SAMPLER_2D:r[p]={value:f1},console.warn("Missing/unassigned texture, fallback to white: "+p);break;default:p==="unity_OrthoParams"||console.warn("TODO: EXPECTED UNIFORM / fallback NOT SET: "+p,a[d]);break}}So&&console.log(c.uuid,r),yN(c),C(c)}):null}}function yN(i){if(i.uniforms)for(const A in i.uniforms)Object.getOwnPropertyDescriptor(i,A)||Object.defineProperty(i,A,{get:()=>i.uniforms[A].value,set:g=>{i.uniforms[A].value=g,i.needsUpdate=!0}})}const Ns=ze,XD="$___Export_Components",Z3="NEEDLE_components";class z3{constructor(){Q(this,fX)}}fX=Ma;class V3{constructor(A,g,I){Q(this,"node");Q(this,"nodeIndex");Q(this,"nodeDef");this.node=A,this.nodeIndex=g,this.nodeDef=I}}class SN{constructor(){Q(this,"parser");Q(this,"nodeToObjectMap",{});Q(this,"exportContext");Q(this,"objectToNodeMap",{});Q(this,"context");Q(this,"writer")}get name(){return Z3}registerExport(A){A.register(g=>{if("serializeUserData"in g){const I=g.serializeUserData.bind(g);this.writer=g,g.serializeUserData=(e,t)=>{try{this.serializeUserData(e,t),I(e,t)}finally{this.afterSerializeUserData(e,t)}}}return this})}beforeParse(){this.exportContext={},this.objectToNodeMap={}}serializeUserData(A,g){var e;const I=(e=A.userData)==null?void 0:e.components;!I||I.length<=0||(delete A.userData.components,A[XD]=I)}afterSerializeUserData(A,g){if(A.type==="Scene"&&Ns&&console.log("DONE",JSON.stringify(g)),A[XD]===void 0)return;const I=A[XD];delete A[XD],I!==null&&(A.userData.components=I)}writeNode(A,g){let I=this.writer.json.nodes.length;console.log(A.name,I,A.uuid);const e=new V3(A,I,g);this.exportContext[I]=e,this.objectToNodeMap[A.uuid]=I}afterParse(A){var g;Ns&&console.log("AFTER",A);for(const I in this.exportContext){const e=this.exportContext[I],t=e.node,C=e.nodeDef,o=e.nodeIndex,s=(g=t.userData)==null?void 0:g.components;if(!s||s.length<=0)continue;const n=new z3;C.extensions=C.extensions||{},C.extensions[this.name]=n,this.context.object=t,this.context.nodeId=o,this.context.objectToNode=this.objectToNodeMap;const B=[];for(const r of s){this.context.target=r;const a=RC().writeBuiltinComponentData(r,this.context);a!==null&&B.push(a)}B.length>0&&(n[Ma]=B,Ns&&console.log("DID WRITE",t,"nodeIndex",o,B))}}beforeRoot(){return Ns&&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 e=I[this.name];Ns&&console.log("After root",A,this.parser,I);const t=[];if(e===!0){const C=g.json.nodes;for(let o=0;o<C.length;o++){const s=await g.getDependency("node",o);this.nodeToObjectMap[o]=s}for(let o=0;o<C.length;o++){const s=C[o],n=o,B=s.extensions;if(!B)continue;const r=B[this.name];if(!r)continue;Ns&&console.log("NODE",s);const a=this.nodeToObjectMap[n];if(!a){console.error("Could not find object for node index: "+n,s,g);continue}zl(a),t.push(this.createComponents(a,r))}}await Promise.all(t)}async createComponents(A,g){if(!g)return;const I=g[Ma];if(I){const e=new Array;Ns&&console.log(A.name,I);for(const t in I){const C=I[t];Ns&&console.log("Serialized data",JSON.parse(JSON.stringify(C))),C&&this.parser&&e.push(Ff(this.parser,C)),A.userData=A.userData||{},A.userData[Ma]=A.userData[Ma]||[],A.userData[Ma].push(C)}await Promise.all(e)}}}/*!
3832
3832
  fflate - fast JavaScript compression/decompression
@@ -3877,7 +3877,7 @@ version 0.6.9
3877
3877
  metersPerUnit = 1
3878
3878
  upAxis = "Y"
3879
3879
  )
3880
- `}function Y4(i){let A=x4();return A+=i,NC(A)}function ad(i){return i.name.replace(/[-<>\(\)\[\]§$%&\/\\\=\?\,\;]/g,"")+"_"+i.id}function uK(i,A,g){const I=i.matrix,e=i.geometry,t=i.material,C=i.camera,o=i.name,s=pK(I);if(I.determinant()<0&&console.warn("THREE.USDZExporter: USDZ does not support negative scales",path),e?A.beginBlock(`def Xform "${o}" (prepend references = @./geometries/Geometry_${e.id}.usd@</Geometry>)`):C?A.beginBlock(`def Camera "${o}"`):A.beginBlock(`def Xform "${o}"`),t&&A.appendLine(`rel material:binding = </Materials/Material_${t.id}>`),A.appendLine(`matrix4d xformOp:transform = ${s}`),A.appendLine('uniform token[] xformOpOrder = ["xformOp:transform"]'),C&&(C.isOrthographicCamera?(A.appendLine(`float2 clippingRange = (${C.near}, ${C.far})`),A.appendLine(`float horizontalAperture = ${((Math.abs(C.left)+Math.abs(C.right))*10).toPrecision($i)}`),A.appendLine(`float verticalAperture = ${((Math.abs(C.top)+Math.abs(C.bottom))*10).toPrecision($i)}`),A.appendLine('token projection = "orthographic"')):(A.appendLine(`float2 clippingRange = (${C.near.toPrecision($i)}, ${C.far.toPrecision($i)})`),A.appendLine(`float focalLength = ${C.getFocalLength().toPrecision($i)}`),A.appendLine(`float focusDistance = ${C.focus.toPrecision($i)}`),A.appendLine(`float horizontalAperture = ${C.getFilmWidth().toPrecision($i)}`),A.appendLine('token projection = "perspective"'),A.appendLine(`float verticalAperture = ${C.getFilmHeight().toPrecision($i)}`))),i.onSerialize&&i.onSerialize(A,g),i.children){A.appendLine();for(const n of i.children)uK(n,A,g)}A.closeBlock()}function pK(i){const A=i.elements;return`( ${Qd(A,0)}, ${Qd(A,4)}, ${Qd(A,8)}, ${Qd(A,12)} )`}function Qd(i,A){return`(${i[A+0]}, ${i[A+1]}, ${i[A+2]}, ${i[A+3]})`}function H4(i){return`
3880
+ `}function Y4(i){let A=x4();return A+=i,NC(A)}function ad(i){return i.name.replace(/[-<>\(\)\[\]§$%&\/\\\=\?\,\;]/g,"")+"_"+i.id}function uK(i,A,g){const I=i.matrix,e=i.geometry,t=i.material,C=i.camera,o=i.name,s=pK(I);if(I.determinant()<0&&console.warn("THREE.USDZExporter: USDZ does not support negative scales",o),e?A.beginBlock(`def Xform "${o}" (prepend references = @./geometries/Geometry_${e.id}.usd@</Geometry>)`):C?A.beginBlock(`def Camera "${o}"`):A.beginBlock(`def Xform "${o}"`),t&&A.appendLine(`rel material:binding = </Materials/Material_${t.id}>`),A.appendLine(`matrix4d xformOp:transform = ${s}`),A.appendLine('uniform token[] xformOpOrder = ["xformOp:transform"]'),C&&(C.isOrthographicCamera?(A.appendLine(`float2 clippingRange = (${C.near}, ${C.far})`),A.appendLine(`float horizontalAperture = ${((Math.abs(C.left)+Math.abs(C.right))*10).toPrecision($i)}`),A.appendLine(`float verticalAperture = ${((Math.abs(C.top)+Math.abs(C.bottom))*10).toPrecision($i)}`),A.appendLine('token projection = "orthographic"')):(A.appendLine(`float2 clippingRange = (${C.near.toPrecision($i)}, ${C.far.toPrecision($i)})`),A.appendLine(`float focalLength = ${C.getFocalLength().toPrecision($i)}`),A.appendLine(`float focusDistance = ${C.focus.toPrecision($i)}`),A.appendLine(`float horizontalAperture = ${C.getFilmWidth().toPrecision($i)}`),A.appendLine('token projection = "perspective"'),A.appendLine(`float verticalAperture = ${C.getFilmHeight().toPrecision($i)}`))),i.onSerialize&&i.onSerialize(A,g),i.children){A.appendLine();for(const n of i.children)uK(n,A,g)}A.closeBlock()}function pK(i){const A=i.elements;return`( ${Qd(A,0)}, ${Qd(A,4)}, ${Qd(A,8)}, ${Qd(A,12)} )`}function Qd(i,A){return`(${i[A+0]}, ${i[A+1]}, ${i[A+2]}, ${i[A+3]})`}function H4(i){return`
3881
3881
  def "Geometry"
3882
3882
  {
3883
3883
  ${T4(i)}